Where did you setup the disbanding of religious units on state religion change?

Deon

Lt. of Mordor
Joined
Jan 13, 2008
Messages
2,956
Location
St.Petersburg, Russian Federation
I want to know where should I look in the .py files to find the structure which disbands religious units when you change religions.

I am developing a small modmod for the Fury Road mod and I've added "slave" unit avaliable only with slavery civic, however I don't know how to disband them correctly if I change the civic to something else from Slavery.
 
The disbanding is handeled through the .dll

I don't see anything that responds to changing civics in the EventManager so if you put in the function it would have to be a do turn function.
 
Could you just model it off of the Royal Guard unit? It has
<PrereqCivic>CIVIC_ARISTOCRACY</PrereqCivic>
At the end of the UnitInfo description.
 
I was asking about it to implement with basic civ DLL. I think I need to dive into DLL editing to provide somewhat unique results for my mod. Thank you, Cyther :). I believe you can do it through Python too, however it may be a bit slow. Is there some function like OnCivicChange? I am a total noob with API so I'd like to get some tips :). If there was a quick ability to initialize code on civic change it would be easy to check the civics and loop through units and delete unappropriate ones.
 
No, in ordinary FfH there is no OnCivicChange.

Alas, if you wanted to make it happen with the civic you would have to get into the .DLL an area where I have no experence but I am still sure that there is such of a function in there.
 
It isn't set up to happen when you change civic/religions, but once per turn the dll checks to make sure that a bAbandon unit still meets the religion/civic requirements and kills it otherwise. At least I think that is how it works, as you can give yourself such units in worldbuilder and use them for 1 turn before loosing them.
 
Top Bottom