+1 Health for State Religion

cfkane

Emperor
Joined
Feb 7, 2006
Messages
1,196
I'm trying to create a new wonder: The Holy Grail.

I want the effect to be extra health for state religion buildings, but I'm not sure how to write it. In XML it's easy just to have wealth for state religion buildings, or science, culture or espionage. But how might I do that with health?

Is it possible to define health in the fifth "iCommerce" slot?
 
If you know C++, you might be able to write a new tag similar to <BuildingHappinessChanges/>.

Less "clean" methods:

If you know python, you might use that to create a building which gives +1 health in cities with state religion buildings, and if the civ has the wonder.

If you only know XML, you could let the Holy Grail provide a bonus resource, and let state religion buildings give +1 health with that bonus.
 
In the CvEventManager there is a onBuildingBuilt function. Try activating it and then checking to see if the building is the one you want and if it is add the health to the city.

This is the easy and quick way for you. However, this will slow the game down as python is pretty slow. Adding a tag in C++ will be a lot more work and require more skill but would be faster for the player.

-ClassicThunder
 
Add a new building cost(-1, so it can't be built works else might work here) that give health make it require the same religion as the state religion, instead of the wonder granting health have it grant this new building that gives health.
 
Back
Top Bottom