Linkman226
#anarchy
- Joined
- Sep 14, 2007
- Messages
- 2,493
Thought it would be better to discuss this in a separate thread.
I'll start off with something I posted in a convo with J. Pride in another thread:
Leoreth, what do you think of this?
I'll start off with something I posted in a convo with J. Pride in another thread:
I was just reading the code. Well in the DLL we have this: void CvDeal::doTurn()
That is called every turn so you can definitely add it there.
The "neater" option, I suppose, would be to add a new type of vassal- so vassals can have an attribute isAColony or something like that. Now in CvDeal.cpp, we have CvDeal::addTrades, which, well, adds trades. So in there we'd perform a check: Is the civ a colony? And if it is, set the vassal civ has having a trade to transfer the gold/ resources.
We also have CvTeam::canVassalRevolt, which checks if a vassal state can break free. So we can set it 'true' if certain conditions are met, whatever those conditions are that Leoreth/I may come up for our respective mods.
Lastly, in CvTeam::freeVassal (called when a vassal is freed) we'd have to change it so that colonies stop paying tribute and are set to war with the mother country.
The only hard part is AI coding.
In my opinion the DLL provides a cleaner solution than python, but is also more time consuming, but ultimately provides more functionality and prevents certain problems in the future (suppose in the future we need to check if a vassal is also a colony in the DLL... it's easier if we set it up now).
I'm going to send this to Leoreth as well.
Leoreth, what do you think of this?