Trying to replace UA using SQL, what am I doing wrong?

GPuzzle

Available in wax cylinder!
Joined
Jul 31, 2014
Messages
2,184
Location
алриг


This keeps happening, and I have no idea why.

Quick look at the code for SQL:

Code:
DELETE FROM Leader_Traits WHERE LeaderType = 'LEADER_THEODORA';
INSERT INTO Leader_Traits
			(LeaderType,		TraitType)
VALUES		('LEADER_THEODORA', 'TRAIT_GPUZ_BYZANTINE');

INSERT OR REPLACE INTO Traits
			(Type,		Description, ShortDescription, BonusReligiousBelief)
VALUES		('TRAIT_GPUZ_BYZANTINE', 'TXT_KEY_TRAIT_GPUZ_BYZANTINE', 'TXT_KEY_TRAIT_GPUZ_BYZANTINE_SHORT', '1' );
--================================================================================================

INSERT INTO Trait_ImprovementYieldChanges 
			(TraitType, 				ImprovementType, 				YieldType,		Yield)
VALUES		('TRAIT_GPUZ_BYZANTINE', 		'IMPROVEMENT_FORT', 		'YIELD_FAITH',	'2' );
INSERT INTO Trait_ImprovementYieldChanges 
			(TraitType, 				ImprovementType, 				YieldType,		Yield)
VALUES		('TRAIT_GPUZ_BYZANTINE', 		'IMPROVEMENT_FORT', 		'YIELD_PRODUCTION',	'1' );
INSERT INTO Trait_ImprovementYieldChanges 
			(TraitType, 				ImprovementType, 				YieldType,		Yield)
VALUES		('TRAIT_GPUZ_BYZANTINE', 		'IMPROVEMENT_FORT', 		'YIELD_FOOD',	'1' );

And the XML that is the Game Text:

Code:
<GameData>
	<Traits>
		<Language_en_US>
			<Row Tag="TXT_KEY_TRAIT_GPUZ_BYZANTINE">
				<Text>Choose one more Belief than normal when you found a Religion. Units within 2 tiles of a Fort gain +10% Combat Strength. Forts give +1 [ICON_FOOD] Food, +1 [ICON_PRODUCTION] Production and +2 [ICON_PEACE] Faith.</Text>
			</Row>
			<Row Tag="TXT_KEY_TRAIT_GPUZ_BYZANTINE_SHORT">
				<Text>Enhanced Patriarchate of Constantinople</Text>
			</Row>
		</Language_en_US>
	</Traits>
</GameData>
 
because you are attempting to wrap one table with another in the XML file:
Code:
<GameData>
	[COLOR="Red"]<Traits>[/COLOR]
		<Language_en_US>
			<Row Tag="TXT_KEY_TRAIT_GPUZ_BYZANTINE">
				<Text>Choose one more Belief than normal when you found a Religion. Units within 2 tiles of a Fort gain +10% Combat Strength. Forts give +1 [ICON_FOOD] Food, +1 [ICON_PRODUCTION] Production and +2 [ICON_PEACE] Faith.</Text>
			</Row>
			<Row Tag="TXT_KEY_TRAIT_GPUZ_BYZANTINE_SHORT">
				<Text>Enhanced Patriarchate of Constantinople</Text>
			</Row>
		</Language_en_US>
	[COLOR="red"]</Traits>[/COLOR]
</GameData>
<Language_en_US> is its own stand-alone table and is never "wrapped" or "encapsulated" within another table.

[added by Edit]Whenever you see in-game a display of TXT_KEY_BLAH_SOMETHING it is an indication there is an error occuring in the file where you have your Language_en_US rows. It indicates that the building, civ, unit, policy, trait, etc., is functioning properly but that there's a mistake that is causing the game to discard the whole file where the <Language_en_US> definitions of what text to display in-game are made.
 
Thanks! I probably wouldn't have figured it out myself, though, I thought it was a problem with the SQL!

SQL is definetively more fun and easier to use than XML, IMO, it's just that there's very little reference of it anywhere.
 
Top Bottom