I have a question to SQL experts - is it possible to make creating city names easier?
In XML it looks like this, and you can see that that it contains lots or redundancy:
(It's just an example, actually I'm going to use more names than 16. The city names I used here are "borrowed" from FFH, I hope nobody objects if I use them in my mod too...)
Would it be possible to use SQL to create series of data using less instructions, like I describe using pseudocode below:
In "Civilization_CityNames" create 16 rows with CivilizationType set to CIVILIZATION_DREAMERS and CityName set to TXT_KEY_DRE_xx, where xx ranges from 01 to 16.
In Language_en_US create 16 rows with Tag set to TXT_KEY_DRE_xx (xx is generated analogically to the above) and Text set to the following: Innsmouth, Dunwich, Kingsport... (a list of 16 names comes here).
If such thing is possible, it would really help me making my mod.
In XML it looks like this, and you can see that that it contains lots or redundancy:
Spoiler :
Code:
<GameData>
<Civilization_CityNames>
<Row>
<CivilizationType>CIVILIZATION_DREAMERS</CivilizationType>
<CityName>TXT_KEY_DRE_01</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_DREAMERS</CivilizationType>
<CityName>TXT_KEY_DRE_02</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_DREAMERS</CivilizationType>
<CityName>TXT_KEY_DRE_03</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_DREAMERS</CivilizationType>
<CityName>TXT_KEY_DRE_04</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_DREAMERS</CivilizationType>
<CityName>TXT_KEY_DRE_05</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_DREAMERS</CivilizationType>
<CityName>TXT_KEY_DRE_06</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_DREAMERS</CivilizationType>
<CityName>TXT_KEY_DRE_07</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_DREAMERS</CivilizationType>
<CityName>TXT_KEY_DRE_08</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_DREAMERS</CivilizationType>
<CityName>TXT_KEY_DRE_09</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_DREAMERS</CivilizationType>
<CityName>TXT_KEY_DRE_10</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_DREAMERS</CivilizationType>
<CityName>TXT_KEY_DRE_11</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_DREAMERS</CivilizationType>
<CityName>TXT_KEY_DRE_12</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_DREAMERS</CivilizationType>
<CityName>TXT_KEY_DRE_13</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_DREAMERS</CivilizationType>
<CityName>TXT_KEY_DRE_14</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_DREAMERS</CivilizationType>
<CityName>TXT_KEY_DRE_15</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_DREAMERS</CivilizationType>
<CityName>TXT_KEY_DRE_16</CityName>
</Row>
</Civilization_CityNames>
<Language_en_US>
<Row Tag="TXT_KEY_DRE_01">
<Text>Innsmouth</Text>
</Row>
<Row Tag="TXT_KEY_DRE_02">
<Text>Dunwich</Text>
</Row>
<Row Tag="TXT_KEY_DRE_03">
<Text>Kingsport</Text>
</Row>
<Row Tag="TXT_KEY_DRE_04">
<Text>Aylesbury</Text>
</Row>
<Row Tag="TXT_KEY_DRE_05">
<Text>Paradera</Text>
</Row>
<Row Tag="TXT_KEY_DRE_06">
<Text>Bolans</Text>
</Row>
<Row Tag="TXT_KEY_DRE_07">
<Text>Seroe Vakas</Text>
</Row>
<Row Tag="TXT_KEY_DRE_08">
<Text>Bathsheba</Text>
</Row>
<Row Tag="TXT_KEY_DRE_09">
<Text>Oistins</Text>
</Row>
<Row Tag="TXT_KEY_DRE_10">
<Text>Boscobelle</Text>
</Row>
<Row Tag="TXT_KEY_DRE_11">
<Text>Speightstown</Text>
</Row>
<Row Tag="TXT_KEY_DRE_12">
<Text>Willikies</Text>
</Row>
<Row Tag="TXT_KEY_DRE_13">
<Text>Garrislyr</Text>
</Row>
<Row Tag="TXT_KEY_DRE_14">
<Text>Villanon</Text>
</Row>
<Row Tag="TXT_KEY_DRE_15">
<Text>Undertow</Text>
</Row>
<Row Tag="TXT_KEY_DRE_16">
<Text>Bren Bagage</Text>
</Row>
</Language_en_US>
</GameData>
(It's just an example, actually I'm going to use more names than 16. The city names I used here are "borrowed" from FFH, I hope nobody objects if I use them in my mod too...)
Would it be possible to use SQL to create series of data using less instructions, like I describe using pseudocode below:
In "Civilization_CityNames" create 16 rows with CivilizationType set to CIVILIZATION_DREAMERS and CityName set to TXT_KEY_DRE_xx, where xx ranges from 01 to 16.
In Language_en_US create 16 rows with Tag set to TXT_KEY_DRE_xx (xx is generated analogically to the above) and Text set to the following: Innsmouth, Dunwich, Kingsport... (a list of 16 names comes here).
If such thing is possible, it would really help me making my mod.