[BTS] How to make leader who will be change in time?

oggr1

Chieftain
Joined
Feb 3, 2023
Messages
1
Hello all.
How to make changing leader who will be change in time?
Something like thats:
One was from one era, second for etc.
Or one from XXX year to YYY year?
 
The Change Player mod component allows leaders to be changed through a popup. I only know the implementation of Change Player that is included in the Better BtS AI (BBAI) mod – and thereby in many of the more complex mods. (I don't know if a standalone version of Change Player even exists.) In BBAI, I can press Ctrl+Shift+P to pick a different leader for my own civ. To assign a different leader to another civ, I can cycle the civ that I control via Alt+Z or (backwards) Alt+Shift+Z and then use Ctrl+Shift+P. The civ cycling shortcut should require the "chipotle" cheat code in My Games\Beyond the Sword\CivilizationIV.ini; the Change Player shortcut might also require that. I think this is mostly intended as a developer tool, so I wouldn't bet that the implementation is flawless, but most of the data that needs updating when a civ's leader changes seems to get updated.

As for doing this programmatically, the changeLeader function, implemented as a member of the CvPlayer class in the (GameCore) DLL, is exposed to Python, so, in a mod based on BBAI, it should be possible to call changeLeader from CvEventManager.py at the appropriate time, e.g. in onBeginGameTurn or onTechAcquired – without having to recompile the DLL. In a mod that also includes BUG, you may have to go through BugEventManager.py instead. In a mod that doesn't include Change Player, you'd need to first merge that mod component into the DLL source of your mod (or of BtS); not really feasible unless you know how to program in C/C++.

It's also possible that there is already a mod with just the mechanism that you have in mind, but I don't know of one – or it could be one the large mods whose other changes you may or may not like.
 
Top Bottom