Can't seem to find CIV4TraitInfos.xml for trait editing

MantaRevan

Emperor
Joined
Oct 9, 2011
Messages
1,540
My BTS folder just doesn't have this file. Base civ 4 does. I'm trying to edit protective to add +25% trade route yield. But I can't seem to find the appropriate file in my sandbox mod, or in the main BTS files for that matter. A search for CIV4TraitInfos pulls up several files, but all of them as far as I can see in the regular civ 4 steam directory. There's also a file like this in the warlords folder, but that's not BTS either.

On a related note, I had heard that I wouldn't be able to change trade route yield in an increment of 25 without changes to python. Is that true? And if so, how do I do it?
 
File load order:
  1. Mod
  2. BTS
  3. Warlords
  4. Original
This means you will use the base file in the original should the file not be in Warlords or BTS.
Ok, I'll try copying the traits file from Warlords and moving it to my mod folder. A little concerned that this will cause the game to crash, but hey, why not test it and see?
 
I second that. Imo also worth trying if your TradeYieldModifier XML change will just work. In the C++ code that handles that modifier, it looks to me like the rounding should only hapen after all trade route profits have been summed up, i.e. shouldn't be too bad. A city with a total trade route income of at least 4 should then benefit from your 25% increase. It's worse for buildings like Harbor whose modifier gets applied on a per-TR basis.
 
Copying the file didn't cause my game to crash, but trying to change protective trade route yield did, I don't seem to understand the right grammer to get it done. 25% is probably an insignificant buff anyhow, but setting it to +50 caused an XML crash.
 
I haven't tested it, but, in the schema file (Civ4CivilizationSchema.xml), it looks like it should be the same structure as CommerceChanges,
Spoiler :
XML:
	<ElementType name="iYield" content="textOnly" dt:type="int"/>
	<ElementType name="TradeYieldModifiers" content="eltOnly">
		<element type="iYield" minOccurs="0" maxOccurs="*"/>
	</ElementType>
	<ElementType name="iCommerce" content="textOnly" dt:type="int"/>
	<ElementType name="CommerceChanges" content="eltOnly">
		<element type="iCommerce" minOccurs="0" maxOccurs="*"/>
	</ElementType>
... which the Creative trait uses as follows:
XML:
			<TradeYieldModifiers/>
			<CommerceChanges>
				<iCommerce>0</iCommerce>
				<iCommerce>0</iCommerce>
				<iCommerce>2</iCommerce>
			</CommerceChanges>
So I'd try
XML:
			<TradeYieldModifiers>
				<iYield>0</iYield>
				<iYield>0</iYield>
				<iYield>50</iYield>
			</TradeYieldModifiers>
See also CapitalYieldModifiers for Bureaucracy in Civ4CivicInfos.xml for reference:
XML:
			<CapitalYieldModifiers>
				<iYield>0</iYield>
				<iYield>50</iYield>
				<iYield>50</iYield>
			</CapitalYieldModifiers>
Seeing that the effect is unused in BtS, it's conceivable that it was never tested by Firaxis and somehow isn't handled correctly by the DLL. Let's hope that's not the problem.
 
Back
Top Bottom