iieeann
Chieftain
- Joined
- Nov 30, 2017
- Messages
- 21
Hi, i am new to using mod 2 days ago. Before this for years i directly alter the base xml file but i am sick of after every update the files are reset.
I use the same format for Kurgan (Scythia unique land improvement) and Kampung (Indonesia unique water improvement) as below. For Kurgan it works, but it crashed for Kampung.
Original xml lines for both Kurgan (base game) and Kampung (DLC) are as below, they look like having the same structure.
What I tried to mod:-
The error code is as below:-
In the mod I can change the TerrainType of Kampung, but not the yield. I tried alter only the existing Food and Production yet the game crashed. Please advise, thank you.
At the moment i directly alter the Indonesia_Khmer_GamepayData.xml to get the result i want while waiting for solution for mod.
I use the same format for Kurgan (Scythia unique land improvement) and Kampung (Indonesia unique water improvement) as below. For Kurgan it works, but it crashed for Kampung.
Original xml lines for both Kurgan (base game) and Kampung (DLC) are as below, they look like having the same structure.
Code:
<Improvement_YieldChanges>
<Row ImprovementType="IMPROVEMENT_KURGAN" YieldType="YIELD_GOLD" YieldChange="3"/>
<Row ImprovementType="IMPROVEMENT_KURGAN" YieldType="YIELD_FAITH" YieldChange="1"/>
</Improvement_YieldChanges>
<Improvement_YieldChanges>
<Row ImprovementType="IMPROVEMENT_KAMPUNG" YieldType="YIELD_FOOD" YieldChange="0"/>
<Row ImprovementType="IMPROVEMENT_KAMPUNG" YieldType="YIELD_PRODUCTION" YieldChange="1"/>
</Improvement_YieldChanges>
What I tried to mod:-
Code:
INSERT OR REPLACE INTO Improvement_YieldChanges (ImprovementType, YieldType, YieldChange) VALUES
('IMPROVEMENT_KURGAN', 'YIELD_GOLD', '3'),
('IMPROVEMENT_KURGAN', 'YIELD_FAITH', '2'),
('IMPROVEMENT_KURGAN', 'YIELD_SCIENCE', '1'),
('IMPROVEMENT_KURGAN', 'YIELD_PRODUCTION', '4'),
('IMPROVEMENT_KURGAN', 'YIELD_FOOD', '2'),
('IMPROVEMENT_KAMPUNG', 'YIELD_FOOD', '2'),
('IMPROVEMENT_KAMPUNG', 'YIELD_PRODUCTION', '4'),
('IMPROVEMENT_KAMPUNG', 'YIELD_GOLD', '2'),
('IMPROVEMENT_KAMPUNG', 'YIELD_FAITH', '2'),
('IMPROVEMENT_KAMPUNG', 'YIELD_SCIENCE', '1');
The error code is as below:-
Code:
[Gameplay] ERROR: UNIQUE constraint failed: Improvement_YieldChanges.ImprovementType, Improvement_YieldChanges.YieldType
[Gameplay]: While executing - 'insert into Improvement_YieldChanges('ImprovementType', 'YieldType', 'YieldChange') values (?, ?, ?);'
[Gameplay]: In XMLSerializer while inserting row into table insert into Improvement_YieldChanges('ImprovementType', 'YieldType', 'YieldChange') with values (IMPROVEMENT_KAMPUNG, YIELD_FOOD, 2, ).
[Gameplay]: In XMLSerializer while updating table Improvement_YieldChanges from file Indonesia_Khmer_GameplayData.xml.
[Gameplay] ERROR: UNIQUE constraint failed: Improvement_YieldChanges.ImprovementType, Improvement_YieldChanges.YieldType
[Gameplay] ERROR: FOREIGN KEY constraint failed
In the mod I can change the TerrainType of Kampung, but not the yield. I tried alter only the existing Food and Production yet the game crashed. Please advise, thank you.
At the moment i directly alter the Indonesia_Khmer_GamepayData.xml to get the result i want while waiting for solution for mod.
Last edited: