damocles88
Chieftain
- Joined
- Dec 10, 2009
- Messages
- 42
I never did manage to get the insert command working properly through SQL, so I ended up using SQL purely for updating the existing scout data, like this:
UPDATE Units SET Moves="3", Cost="35" WHERE Type="UNIT_SCOUT";
That's it. That's the entirety of the sql file in the mod
I then had to use an xml file to add new rows into the free promotions section, like this:
I have no idea why the insert sql command wasn't working. I checked, double checked, and triple checked the code. Then I went online to make sure I was using the syntax properly (I hate it when a bug makes me doubt what I already know). I can only assume that civ5 is not using a proper sql engine, and instead is using something they cobbled together themselves. So if the insert token is supported in civ5's sql, there may be a different syntax or something.
UPDATE Units SET Moves="3", Cost="35" WHERE Type="UNIT_SCOUT";
That's it. That's the entirety of the sql file in the mod

I then had to use an xml file to add new rows into the free promotions section, like this:
Code:
<GameData>
<Unit_FreePromotions>
<Row>
<UnitType>UNIT_SCOUT</UnitType>
<PromotionType>PROMOTION_EXTRA_SIGHT_I</PromotionType>
</Row>
</Unit_FreePromotions>
</GameData>
I have no idea why the insert sql command wasn't working. I checked, double checked, and triple checked the code. Then I went online to make sure I was using the syntax properly (I hate it when a bug makes me doubt what I already know). I can only assume that civ5 is not using a proper sql engine, and instead is using something they cobbled together themselves. So if the insert token is supported in civ5's sql, there may be a different syntax or something.