Adding Mercenaries

正在查看此主题的用户

Has anyone attempted to add mercenaries into the game?  I've been through the troop file, and checked out the troop editor, but was wondering if there would be problems in adding additional units because the troops file seems to have footers depicting where different lists of troop types end, and also may have a problem with me just adding stuff in the middle of the default list.  Also, what regulates when, where and for how much money they spawn in a tavern?  I've a few I'd like to add in myself to enhance the "mercenary" aspect of the game.
 
The Wandering Knight 说:
Has anyone attempted to add mercenaries into the game?  I've been through the troop file, and checked out the troop editor, but was wondering if there would be problems in adding additional units because the troops file seems to have footers depicting where different lists of troop types end, and also may have a problem with me just adding stuff in the middle of the default list.  Also, what regulates when, where and for how much money they spawn in a tavern?  I've a few I'd like to add in myself to enhance the "mercenary" aspect of the game.

I think money is based on mercanary level & skills? Not sure what controls where\how they spawn.

Using the module system I believe it is pretty easy to add new mercenaries.  However, as you saw it becomes more difficult when trying to directly modify the text files.  The problem is that each troop is referenced in other files (like party_templates.txt) by their troop #. So if you add a new troop into the middle of troops.txt then it messes up the troops in the other files (which is the reason I didn't add this functionality in my TroopEditor)  People have said they can add new troops to the bottom of troops.txt since this doesn't cause issues with other files, but my guess is that mercenaries have to be before that "trp_mercenaries_end" section which is in the middle.

Now, having said that, I really didn't try this much myself.  So if you want to try adding a mercenary just backup your files, add a few extra mercenaries before trp_mercenaries_end, and start a new game and see what happens.....  It it seems to work fine and the only think that is messed up are the parties then maybe only party_templates.txt needs to be fixed (ie. increase each troop number by 1). If thats the case I MIGHT be able to add a NEW button into my TroopEditor that would automatically re-calculate party_templates.txt....  However, if conversations, quests, spawn points, etc, are messed up then your only option would probably be to use the module system or modify another mod that already added more mercenaries.
 
with the module system its easy, just place them above mercenaries_end, it should work. (thats what i did in the last module system)
 
The module system is easy to use and adding mercenaries should be no problem. I have added 2 bodyguard types above mercenary_end and now I can hire them in taverns. Hiring in mercenary camps or in barracks would be much better though.
 
I've got it set up and will be playing with it in a bit.  I think there are several ways to go about hiring mercs that would be "good" -- taverns (which are amazingly small in some towns), specific halls (some cities having these, not others), or in their own camps (would be brigands otherwise probably).  Not so sure about the camps.  I plan to add a few mercs in, mostly for flavor.  These include a small merc line that are similar to manhunters, only recruitable -- for those who want to take their enemies alive.  They would be on foot though, to be honest.  A bit of a blend between swordsmen and manhunters.
 
Alright, I've got one unit set up and ready to test out if I can.  Sorry for the double post but I am hoping to attract some other modders attention.

插入代码块:
 ["mercenary_maceman","Mercenary Maceman","Mercenary Macemen",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_shield,no_scene,reserved,fac_commoners,
   [itm_club,itm_spiked_mace,itm_winged_mace,itm_mace_2,itm_spiked_club,itm_tab_shield_round_a,itm_tab_shield_round_b,itm_gambeson,itm_red_gambeson,itm_blue_gambeson,itm_hide_boots,itm_leather_boots,itm_kettle_hat,itm_padded_coif,itm_arming_cap, itm_leather_gloves],
   def_attrib|level(20),wp(100),knows_common|knows_athletics_4|knows_ironflesh_3|knows_shield_3|knows_power_strike_3,mercenary_face_1, mercenary_face_2],

Or plainly put, they have choice of:
Winged mace (20B)
Spiked mace (21P)
Club (14b)
Spiked club (20P)
Knobbed Mace (20b)

Gambeson, red, blue or white.
Padded cloth.

Kettle hats, padded coifs or arming caps.

Hide boots or leather boots, leather gloves.

Two different light round shields.

They've 4 athletics, so they're fairly fast, if I did that right.

Basically these are one of a few guys I'm adding.  Originally they where to be blunt only, but maces are maces, spiked or otherwise.  I noticed there seems to be two spiked maces, and two spiked clubs -- named the same but one does blunt and the other does pierce.  I chose the piercing ones for this unit.  I plan to give these guys two upgrade options -- one more skilled and focusing on capture alone (all blunt), and the other more heavily armored but more "combative" in terms of killing over capturing. 

Going to read through and make sure I didn't miss something.
 
后退
顶部 底部