Modding the way vassals work

loseth

Warlord
Joined
Feb 13, 2004
Messages
135
Location
London
I'm having great fun with Dale & co's Road to War mod at the moment, but I'd like to play around with the way vassalage works, to make it fit more with a WWII vibe (basically changing from a system of master-vassal to one of guarantor-guaranteed nation, but where the 'guarantee' is stronger than just a defensive pact). I'd like to know if the changes I want to make are feasible for someone who's good with xml but crap with Python. So, here are the things I'd like to do:

1. Change what the vassal's master gets from having vassals (I think that as a default the master gets +1 global happiness and some extra maintenance, no?).

2. Change it so that it's very easy for the vassal to break free of its master (really, the guaranteed nation should be able to break free pretty much whenever it pleases).

3. Add in a second kind of vassalship to represent master-puppet relations (more like the default vassalship).

4. Make it so that the player can offer to become a vassal of an AI.

So, are any of these possible without any real Python work? I'd be happy if I could manage two out of four. :)
 
1. XML/Python/C++: Depends on what is "what". Happiness value is defined in GlobalDefines.xml (VASSAL_HAPPINESS). Masters pay for city number maintenance of their vassals and this can only be changed in the DLL (C++). Other stuff has to be implemented in Python or C++.

2. XML: Change FREE_VASSAL_LAND_PERCENT and FREE_VASSAL_POPULATION_PERCENT in GlobalDefines.xml

3. C++: Adding a new deal is a major DLL work.

4. C++: It requires DLL work, though Better BTS AI (which is a component of manys mods) has this feature - it can be turned on in GlobalDefines.xml (BBAI_HUMAN_AS_VASSAL_OPTION). That being said, the default implementation isn't very good. It requires extra work to prevent easy exploits from the human player (the default AI loves to feed its vassals with techs and other free gifts).
 
Thanks Embryodead. I made the xml changes for 2. Unfortunately, for 4, the BUG AI isn't part of this mod. :(

On a related topic, I really like the AI in the K-Mod. Just out of curiosity, what would happen if I took the classes and infoclasses xml files for buildings, units, religions and techs from Road to War and then copied them into K-Mod (replacing all relevant K-Mod content), along with the relevant art files. Am I just asking for trouble if I try this?

Thanks again!
 
Thanks Embryodead. I made the xml changes for 2. Unfortunately, for 4, the BUG AI isn't part of this mod. :(

I'm fairly sure BBAI is part of K-Mod though (K-Mod was based on BBAI), if you ever want to divert from RtW.

On a related topic, I really like the AI in the K-Mod. Just out of curiosity, what would happen if I took the classes and infoclasses xml files for buildings, units, religions and techs from Road to War and then copied them into K-Mod (replacing all relevant K-Mod content), along with the relevant art files. Am I just asking for trouble if I try this?

That doesn't work like that. Merging mods is much more complicated matter. You can try copying the art assets and then copying XML entries one by one (not file by file) to get some results, but that won't get you anywhere near "The Road to War with K-Mod's AI". To achieve that you would have to merge most of the K-mod's DLL changes into RtW's sourcecode and recompile it.

Tools such are WinMerge are very helpful in merging mods, but there may be (and certainly are, in this case) differences between the mod's DLL files so many XML entries copied from one mod to another won't work at all (you'll get an error while loading the mod due to wrong XML schemas). Then there are also Python files which have to be merged separately.
 
You can try copying the art assets and then copying XML entries one by one (not file by file) to get some results, but that won't get you anywhere near "The Road to War with K-Mod's AI".

What I'd be after in this case is K-Mod base (AI & the way things work in-game) + RtW units, buidlings, techs & religions. More like a WWII version of K-Mod than a merger of the two mods. Does that sound like a more feasible target for xml cutting and pasting?
 
What I'd be after in this case is K-Mod base (AI & the way things work in-game) + RtW units, buidlings, techs & religions. More like a WWII version of K-Mod than a merger of the two mods. Does that sound like a more feasible target for xml cutting and pasting?

Yes, that will take some trial and error but should be achievable entirely with XML.
 
Top Bottom