Adding a more complex trait

LoneGamer

Warlord
Joined
Sep 27, 2010
Messages
138
So I see that this was added to the CIV5Traits.xml when they released the free DLC.

Code:
<Table name="Trait_MovesChangeUnitCombats">
<Column name="TraitType" type="text" reference="Traits(Type)"/>
<Column name="UnitCombatType" type="text" reference="UnitCombatInfos(Type)"/>
<Column name="MovesChange" type="int"/>
</Table>

Now I am wondering if I can add something like that to the .xml within a mod... To be more specific, I want to add a more complex trait but with the Tables they gave us that is impossible... I could add the trait but I would need to add the table to the CIV5Traits.xml manually. Is there a way to add a new table within a mod?

Edit: Never mind I think I figured it out but will leave this open so people can see as a reference.(Will post end result) :D
 
the Trait_MovesChangeUnitCombats table already was in place in the db before the DLC, it just wasn't populated, meaning the ability was already coded in just nothing in the game was using it. (iirc the civ kael made used this)

adding a new table isn't going to do anything, i dont think, unless the code is in there to recognize the new stuff, which it won't

so from the way i understand it, new traits have to use existing stuff
 
Big failed attempt on my part. I tried to add:

Code:
<Table name="Trait_FeatureYieldChangesAdd">
		<Column name="TraitType" type="text" reference="Traits(Type)"/>
		<Column name="BuildingType" type="text" reference="Buildings(Type)"/>
		<Column name="YieldType" type="text" reference="Yields(Type)"/>
		<Column name="Yield" type="integer"/>
	</Table>

So i put

Code:
<GameData>
<Table name="Trait_FeatureYieldChangesAdd">
		<Column name="TraitType" type="text" reference="Traits(Type)"/>
		<Column name="BuildingType" type="text" reference="Buildings(Type)"/>
		<Column name="YieldType" type="text" reference="Yields(Type)"/>
		<Column name="Yield" type="integer"/>
	</Table>
	<Traits>
		<Row>
			<Type>TRAIT_SCOT</Type>
			<Description>TXT_KEY_TRAIT_SCOT</Description>
			<ShortDescription>TXT_KEY_TRAIT_SCOT_SHORT</ShortDescription>
		</Row>
	</Traits>
	<Trait_FeatureYieldChangesAdd>
		<Row>
			<TraitType>TRAIT_SCOT</TraitType>
			<BuildingType>BUILDING_PALACE</BuildingType>
			<YieldType>YIELD_FOOD</YieldType>
			<Yield>20</Yield>
		</Row>
	</Trait_FeatureYieldChangesAdd>
</GameData>

Even tried adding it to the CIV5Traits.xml manually and still a no go.
 
the Trait_MovesChangeUnitCombats table already was in place in the db before the DLC, it just wasn't populated, meaning the ability was already coded in just nothing in the game was using it. (iirc the civ kael made used this)

adding a new table isn't going to do anything, i dont think, unless the code is in there to recognize the new stuff, which it won't

so from the way i understand it, new traits have to use existing stuff

Ah i see, didn't notice it in there before.
 
the SQLite addon for firefox (or even any lightweight sql browser) makes for a very easy visual look at all the xml data
 
Top Bottom