Change Civ ingame

I have found one thing that can't be done for this in Python. There are no Python functions available to add and remove a nation from a team. Thus if you "upgrade" a nation it will not remain on the same team as the old nation.
 
There is also no AI_setAttitudeVal function; the value gets constantly recomputed. The persistent elements of that computation are memory values (e.g. MEMORY_DECLARED_WAR) and treaty counters (e.g. for "years of peace"). Looks like the setters for those values aren't exposed to Python.
2. For all nations
Get current relationship with old Nation
Set new Nation relationship to this value
 
There is also no AI_setAttitudeVal function; the value gets constantly recomputed. The persistent elements of that computation are memory values (e.g. MEMORY_DECLARED_WAR) and treaty counters (e.g. for "years of peace"). Looks like the setters for those values aren't exposed to Python.
While it is true that that function is not available to Python a number of existing wonders do use Python to adjust the AI attitude values. It is horrendous code as all you can do is loop adding or subtracting one until you reach the required value.:crazyeye:
 
Looks like you'd need about half the changeCiv() function. I can split it up and expose to python.
 
Top Bottom