Adding specific benefits to Religions?

JorrelFraajic

Chieftain
Joined
Feb 8, 2009
Messages
12
Location
Apollo, PA
I'm attempting to sort of specialize the religion aspect (mostly for personal use only, but who knows?) by adding in specific pros and cons according to each respective religion. However, I've snagged a bit in getting the game to register some of the changes.

For example, I looked over the ReligionInfo and GameInfoSchema XMLs and saw that the Religion lacked several tags that I would end up requiring. I took a look further on and copied and modified the BuildingHeathModifier (from the Environmentalism civic - See Example 1) to a BonusHappinessModifier sort of deal. I expected it to give a negative happiness modification to the Pig, Clam, and Crab bonuses, and a positive happiness bonus to the Gold and Sheep. (Ex. 2) Everything booted up correctly, but nothing was applied.

Example 1:
Spoiler :
<ElementType name="BonusHappinessChange" content="eltOnly">
<element type="BonusType"/>
<element type="iHappinessChange"/>
</ElementType>
<ElementType name="BonusHappinessChanges" content="eltOnly">
<element type="BonusHappinessChange" minOccurs="0" maxOccurs="*"/>
</ElementType>


Example 2:
Spoiler :
<BonusHappinessChanges>
<BonusHappinessChange>
<BonusType>BONUS_PIG</BonusType>
<iHappinessChange>-2</iHappinessChange>
</BonusHappinessChange>
<BonusHappinessChange>
<BonusType>BONUS_CLAM</BonusType>
<iHappinessChange>-1</iHappinessChange>
</BonusHappinessChange>
<BonusHappinessChange>
<BonusType>BONUS_CRAB</BonusType>
<iHappinessChange>-1</iHappinessChange>
</BonusHappinessChange>
<BonusHappinessChange>
<BonusType>BONUS_GOLD</BonusType>
<iHappinessChange>1</iHappinessChange>
</BonusHappinessChange>
<BonusHappinessChange>
<BonusType>BONUS_SHEEP</BonusType>
<iHappinessChange>2</iHappinessChange>
</BonusHappinessChange>
</BonusHappinessChanges>


I can't figure out if it's an issue inherent with the ReligionInfo deal, or if it's something I'm missing somewhere else. Any ideas?

(Dunno if it's necessary, but running BtS, latest patch... Also working with Thomas' War mod, but everything I'm doing so far doesn't involve anything with the mod)
 
I'm attempting to sort of specialize the religion aspect (mostly for personal use only, but who knows?) by adding in specific pros and cons according to each respective religion. However, I've snagged a bit in getting the game to register some of the changes.

For example, I looked over the ReligionInfo and GameInfoSchema XMLs and saw that the Religion lacked several tags that I would end up requiring. I took a look further on and copied and modified the BuildingHeathModifier (from the Environmentalism civic - See Example 1) to a BonusHappinessModifier sort of deal. I expected it to give a negative happiness modification to the Pig, Clam, and Crab bonuses, and a positive happiness bonus to the Gold and Sheep. (Ex. 2) Everything booted up correctly, but nothing was applied.

Example 1:
Spoiler :
<ElementType name="BonusHappinessChange" content="eltOnly">
<element type="BonusType"/>
<element type="iHappinessChange"/>
</ElementType>
<ElementType name="BonusHappinessChanges" content="eltOnly">
<element type="BonusHappinessChange" minOccurs="0" maxOccurs="*"/>
</ElementType>


Example 2:
Spoiler :
<BonusHappinessChanges>
<BonusHappinessChange>
<BonusType>BONUS_PIG</BonusType>
<iHappinessChange>-2</iHappinessChange>
</BonusHappinessChange>
<BonusHappinessChange>
<BonusType>BONUS_CLAM</BonusType>
<iHappinessChange>-1</iHappinessChange>
</BonusHappinessChange>
<BonusHappinessChange>
<BonusType>BONUS_CRAB</BonusType>
<iHappinessChange>-1</iHappinessChange>
</BonusHappinessChange>
<BonusHappinessChange>
<BonusType>BONUS_GOLD</BonusType>
<iHappinessChange>1</iHappinessChange>
</BonusHappinessChange>
<BonusHappinessChange>
<BonusType>BONUS_SHEEP</BonusType>
<iHappinessChange>2</iHappinessChange>
</BonusHappinessChange>
</BonusHappinessChanges>


I can't figure out if it's an issue inherent with the ReligionInfo deal, or if it's something I'm missing somewhere else. Any ideas?

(Dunno if it's necessary, but running BtS, latest patch... Also working with Thomas' War mod, but everything I'm doing so far doesn't involve anything with the mod)

You can't just add or edit the tags found in the XML. If you want to add new XML tags or change how they function you need to define them in the SDK and recompile a new DLL.

On the plus side, I know Thomas' War doesn't use a custom DLL so if you wanted to compile a new one it will be a lot easier than trying to do so with some other big mods that do have one.
 
Well, that certainly explains things... :P

And you are correct (just a confirmation) that there was no custom DLL in TW, so I'll be open to get it working. Assuming I feel like learning a new programming language today.

Thanks again!
 
Yes, bad things happen when you mess with the schema, but if you can program, edit away.
Welcome to the Forums JorrelFraajic :beer:.
 
Back
Top Bottom