Python help with UnitCombatTypes needed

hr_oskar

Deity
Joined
Jun 21, 2002
Messages
624
Location
Iceland
When a new unit is built, the game checks if that's the first unit you have built of that UnitCombatType, and if so, displays the pop-up strategy advice saying something like "You have just built your first Mounted Unit..."

I expect the code for this is written somewhere in the Python files. Now, if you mod UnitCombat in XML and replace the vanilla types with something completely different, the game no longer finds the old types and then displays all the pop-ups once you build your first unit.

I could probably fix this if only I could find it in the Python files. Anybody here who could tell me where it is?
 
You can either kill them in CvEventManager.py under onUnitBuilt, or in CvAdvisorUtils.py - def unitBuiltFeats(pCity, pUnit):

To add a new feat, I think you have to tinker with the SDK. You can use the current names, and just change when they are triggered, and what text they diplay, but you don't seem to be able to add new ones.
 
Back
Top Bottom