Zagaroth
Chieftain
- Joined
- Nov 27, 2009
- Messages
- 60
New modder myself, but I believe this is how it works:
So, the game's database is built from the XML files. The SQL files are often a good shorthand to basically edit the table entries as if you were writing additional entries into the XML file. Example:
Is effectively the same as
But frankly I find the SQL version more readable. The SQL file has additional advantages in that you can use OR to specify to either INSERT or REPLACE an entry if that entry already exists. If there are two XML files with the same entry, then I believe the database compiling process has to determine which one is used through some other prioritization process.
There may be some advantages to using xml directly, but it seems most modders have switched to using SQL.
So, the game's database is built from the XML files. The SQL files are often a good shorthand to basically edit the table entries as if you were writing additional entries into the XML file. Example:
Code:
INSERT INTO Types
(Type, Kind )
VALUES ('TRAIT_LEADER_ZAG_SUMETAL_UA', 'KIND_TRAIT' ),
('ABILITY_ZAG_SUMETAL_UA_GPM_POINTS', 'KIND_ABILITY' );
Is effectively the same as
Code:
<Types>
<row Type="TRAIT_LEADER_ZAG_SUMETAL_UA" Kind ="KIND_TRAIT" />
<row Type="ABILITY_ZAG_SUMETAL_UA_GPM_POINTS" Kind ="KIND_ABILITY" />
</type>
But frankly I find the SQL version more readable. The SQL file has additional advantages in that you can use OR to specify to either INSERT or REPLACE an entry if that entry already exists. If there are two XML files with the same entry, then I believe the database compiling process has to determine which one is used through some other prioritization process.
There may be some advantages to using xml directly, but it seems most modders have switched to using SQL.