Andrew_Jay
Apr 23, 2007, 08:23 AM
Question about the several religion tags in UnitInfos.XML . . .
I'm trying to create a mechanic where civilizations can only build military units in cities that contain their state religion.
For example, if you have Hinduism as your state religion, it has to be present to train most units. If there is a city with Islam present (but not Hinduism), a conversion to Islam would allow you to train units (but only in Islamic cities), etc. I want to make this general - there aren't any "Islamic" units, the only thing is to match the religion with your state religion.
However, looking at the tags available, this doesn't seem easy to do:
PrereqReligion - I can define a unit as requiring a specific religion
StateReligion - I can define a unit as requiring a specific state religion
To make this work, am I going to have to create seven separate units, each using the above tags, for example:
<StateReligion>RELIGION_ISLAM</StateReligion>
<PrereqReligion>RELIGION_ISLAM</PrereqReligion>
<StateReligion>RELIGION_TAOISM</StateReligion>
<PrereqReligion>RELIGION_TAOISM</PrereqReligion>
<StateReligion>RELIGION_HINDUISM</StateReligion>
<PrereqReligion>RELIGION_HINDUISM</PrereqReligion>
etc.?
Or are am I missing the utility of one of the other religion tags, such as "ReligionType" or "bPrereqReligion"?
I'm trying to create a mechanic where civilizations can only build military units in cities that contain their state religion.
For example, if you have Hinduism as your state religion, it has to be present to train most units. If there is a city with Islam present (but not Hinduism), a conversion to Islam would allow you to train units (but only in Islamic cities), etc. I want to make this general - there aren't any "Islamic" units, the only thing is to match the religion with your state religion.
However, looking at the tags available, this doesn't seem easy to do:
PrereqReligion - I can define a unit as requiring a specific religion
StateReligion - I can define a unit as requiring a specific state religion
To make this work, am I going to have to create seven separate units, each using the above tags, for example:
<StateReligion>RELIGION_ISLAM</StateReligion>
<PrereqReligion>RELIGION_ISLAM</PrereqReligion>
<StateReligion>RELIGION_TAOISM</StateReligion>
<PrereqReligion>RELIGION_TAOISM</PrereqReligion>
<StateReligion>RELIGION_HINDUISM</StateReligion>
<PrereqReligion>RELIGION_HINDUISM</PrereqReligion>
etc.?
Or are am I missing the utility of one of the other religion tags, such as "ReligionType" or "bPrereqReligion"?