How to recruit custom faction troops during claimant rebellion?

Users who are viewing this thread

Ok, so I'm making a mod, and I want one of the features to be so that the claimant has his own type of troops during the rebellion (i.e. if you're helping Isolla, the troops you recruit from Swadian villages should be different from the standard Swadian troops), and should replace the standard Swadian troops once the rebellion is successful.

I faintly remember this being a thing in some mod I've played ages ago, so I can't remember any more, and thus cannot ask the developer how they did it.

I've tried activating the 'swadian rebels' faction in mod_factions, but that just added the rebels to the game's factions, and eliminates them after a few minutes of gameplay for not having any lords or lands.

I'm thinking I need to first create custom troops in mod_troops, then a custom culture in mod_scripts, but how to apply said culture to the rebels, I have no idea, because I can't find where the rebellion's culture is defined.

Any help?
 
Last edited:
I am not sure if your concept is that the recruits are different if the village is owned by the pretender faction or if you want the recruits of the village depend on if you support the pretender or not. In both ways the script script_update_volunteer_troops_in_village should be the place to look at. The pretender troop tree can have the normal culture of the other faction, no real need to create a new one (although I am not used to mod singleplayer, so not sure if there is any other effect due to this). You basically need to add an if-clause which checks if the player is supporting the rebellion or not (there should already be either a slot value or a global variable for this) and depending on that the available recruits are selected. Perhaps this helps:

That's the way how I would approach it.

For the lords recruiting, perhaps some combination of these two?
 
Back
Top Bottom