Is this done in XML or Python

Sarge85

Multiplayer Noob
Joined
Mar 27, 2008
Messages
138
Location
Pacific Northwest
Goal:

Unique Unit: Holy Warrior
Modifier: 25% reduction in build time in city with state religion.

What i've done so far:

Added to UnitInfosXML
<bStateReligion>1</bStateReligion>
<iStateReligionUnitProductionModifier>0</iStateReligionUnitProductionModifier>

Above was taken from the Organized Religon Civic

I added this to UnitSchema:
<ElementType name="bStateReligion" content="textOnly" dt:type="boolean"/>
<ElementType name="iStateReligionUnitProductionModifier" content="textOnly" dt:type="int"/>

I also added under:
<ElementType name="UnitInfo" content="eltOnly">
<element type="bStateReligion"/>
<element type="iStateReligionUnitProductionModifier"/>
=====

Sadly the XML won't load. I'm not at my game computer so I'm not sure what the exact message is.

Am I in the ball park though?
I was wondering if I have to list the <Element Type > in the Schema in a particular order

My other question is do I have to add:
<bStateReligion>1</bStateReligion>
<iStateReligionUnitProductionModifier>0</iStateReligionUnitProductionModifier>

to every single unit, or can i just leave it on the Holy Warrior?

===

Noob Modding
Sarge:gp:
 
You can't just add completely new Tag to the XML file and expect it to work...
You need to implement the new functionality, in order for these tags to do anything.
http://forums.civfanatics.com/showthread.php?t=166935

I guess you could override the units build cost in Python, without changing the XML at all.
 
You can't just add completely new Tag to the XML file and expect it to work...

The tags themselves are already active in the game - just in a different area - Civ4CivicInfos

Would that make a difference??

If I'm struggling with XML - I don't think getting into SDK is up my alley:blush:

edit:
In the UnitInfos for Settler - there is a production bonus for Imperialistic -- can I use something in those tags for what I want to accomplish?


Sarge:gp:
 
erm...what do you want to do?
A unit, which requires state-religion and the costs of the unit are reduced, when state-religion is present in the city?


I guess you could override the units build cost in Python, without changing the XML at all.

You can, tsentom does it with his Sphinx-wonder and his resourceful-trait.

The tags themselves are already active in the game - just in a different area - Civ4CivicInfos

Would that make a difference??

The difference IS the different area.

edit:
In the UnitInfos for Settler - there is a production bonus for Imperialistic -- can I use something in those tags for what I want to accomplish?

No, because you can't do anything there with the religion.
 
Back
Top Bottom