Question on XML

SoCalian

Deity
Joined
Apr 22, 2003
Messages
2,901
I need help trying to figure out what all of these tags do, I am looking at making more leader traits for the game(slready made a seafring one), but I don't know what each of the tags do. I am also wondering If I can add tags that do different things, like give a starting unit or something, or how do I get it to reduce building cost, ect. I'm looking for answers mostly for the boald ones.

<TraitInfo>
<Type>TRAIT_PHILOSOPHICAL</Type>
<Description>TXT_KEY_TRAIT_PHILOSOPHICAL</Description>
<ShortDescription>TXT_KEY_TRAIT_PHILOSOPHICAL_SHORT</ShortDescription>
<iHealth>0</iHealth>
<iMaxAnarchy>-1</iMaxAnarchy>
<iUpkeepModifier>0</iUpkeepModifier>
<iGreatPeopleRateModifier>100</iGreatPeopleRateModifier>
<iMaxGlobalBuildingProductionModifier>0</iMaxGlobalBuildingProductionModifier>
<iMaxTeamBuildingProductionModifier>0</iMaxTeamBuildingProductionModifier>
<iMaxPlayerBuildingProductionModifier>0</iMaxPlayerBuildingProductionModifier>
<ExtraYieldThresholds/>
<TradeYieldModifiers/>
<CommerceChanges/>
<CommerceModifiers/>

<FreePromotions/>
<FreePromotionUnitCombats/>
</TraitInfo>
 
Can you post the Wiki link in the Tutorial/Reference section please, Isak? I knew you were working on this but had no idea of this. I think it would be a logical place for everyone to find that info.

Thanks!
 
ok, now what about adding tags? Like could I take the <FreeUnitClasses> tag from the CIV4CivilizationInfos.xml, and put it under a specific trait?
 
SoCalian said:
ok, now what about adding tags? Like could I take the <FreeUnitClasses> tag from the CIV4CivilizationInfos.xml, and put it under a specific trait?
To use tags in a place where they aren't originally there you have to mess about with the Schema. Just add the entry into the right file, and... it might work! I'm not certain it will - some entries are obviously never going to work in the wrong place, but I think if both entries are from the same Schema, and you are just adding it to another file it should work...
 
like could I add a free unit tag from the civiliizations file to the traits file?
 
question on this one
Code:
 <ExtraYieldThresholds>: For every X of the specified Yield type a City produces, it will produce one extra, where X is the value entered.
how do i define the yeild? and what specificaly are you talking about withyeild, like Hammers Food Commerce? or is it something else.
 
SoCalian said:
question on this one
Code:
 <ExtraYieldThresholds>: For every X of the specified Yield type a City produces, it will produce one extra, where X is the value entered.
how do i define the yeild? and what specificaly are you talking about withyeild, like Hammers Food Commerce? or is it something else.

Yeah, it's Food Hammers Commerce (in that order).

The way it works is, if you enter a value of '2' for Food (the first one), then for every 2 Food the city produces, it will produce 1 extra. If you put in '4' as the value, it produces one extra for every 4 Food it normally produces, and so forth.
 
but how do I choose weather I want it food hammers or commerce? would I put someting like 020, would it be like +1 hammers for every two
?
 
SoCalian said:
but how do I choose weather I want it food hammers or commerce? would I put someting like 020, would it be like +1 hammers for every two
?

The format is like this (taken from the Financial Trait entry)

Code:
			<ExtraYieldThresholds>
				<iExtraYieldThreshold>0</iExtraYieldThreshold>
				<iExtraYieldThreshold>0</iExtraYieldThreshold>
				<iExtraYieldThreshold>2</iExtraYieldThreshold>
			</ExtraYieldThresholds>

This means 1 extra Commerce for every 2 Commerce produced.
 
Chinese American said:
no it's one extra per tile that produces 2 or more.
Yeah, sorry if I didn't make myself clear. :blush:

Edit: Fixed it in the Wiki page too now. Thanks Chinese American
 
Back
Top Bottom