• Please note that we've updated the Mount & Blade II: Bannerlord save file system which requires you to take certain steps in order for your save files to be compatible with e1.7.1 and any later updates. You can find the instructions here.

Changing the Troop Cost

Users who are viewing this thread

Ice_Death

Recruit
I have modded using the Module System, and I understand it well, but I have no clue how to change the troop cost.
Any thoughts?
Ideally I want to be able to change the cost of different types of troops, but if there's an equation used for all troops, I'd work with that instead.
 

Ice_Death

Recruit
You're right, but I want to edit the cost, not down the level of troops.
By lowering the level, you make troops easier to upgrade to. What I want is a level 60 troop that costs 0 gold.
 

kt0

Knight
If you're talking about wages, at the end of game_get_troop_wage you can add something like this (in red):
(try_begin),
(neq, ":troop_id", "trp_player"),
(neq, ":troop_id", "trp_kidnapped_girl"),
(neg|is_between, ":troop_id", pretenders_begin, pretenders_end),
(val_max, ":wage", 1),
(try_end),

(try_begin),
(eq, ":troop_id", "trp_this_guy_is_free"),
(assign, ":wage", 0),
(try_end),


(assign, reg0, ":wage"),
(set_trigger_result, reg0),

Note that the block above the red stuff forces zero values to one, so you'll have to stick it underneath it. 
 
Top Bottom