TheLunarArmy
Chieftain
Hi, I'm new to the modding scene I must say I despise the repetitive XML coding. To make writing tedious code over and over a lot easier I developed a little program to help with city names.
This little c# console app will covert a list of city names (separated by new line) and exports them with the appropriate Game Text and optionally CityName XML formats.
For example:
Will be converted to:
And optionally:
Click here for DOWNLOAD
Instructions:
This little c# console app will covert a list of city names (separated by new line) and exports them with the appropriate Game Text and optionally CityName XML formats.
For example:
Code:
Toronto
Montreal
Calgary
Ottawa
Will be converted to:
Code:
<Row Tag="TXT_KEY_CITY_NAME_CANADA_CITY_00">
<Text>Toronto</Text>
</Row>
<Row Tag="TXT_KEY_CITY_NAME_CANADA_CITY_01">
<Text>Montreal</Text>
</Row>
<Row Tag="TXT_KEY_CITY_NAME_CANADA_CITY_02">
<Text>Calgary</Text>
</Row>
<Row Tag="TXT_KEY_CITY_NAME_CANADA_CITY_03">
<Text>Ottawa</Text>
</Row>
And optionally:
Code:
<Civilization_CityNames>
<Row>
<CivilizationType>CIVILIZATION_CANADA</CivilizationType>
<CityName>TXT_KEY_CITY_NAME_CANADA_CITY_00</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_CANADA</CivilizationType>
<CityName>TXT_KEY_CITY_NAME_CANADA_CITY_01</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_CANADA</CivilizationType>
<CityName>TXT_KEY_CITY_NAME_CANADA_CITY_02</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_CANADA</CivilizationType>
<CityName>TXT_KEY_CITY_NAME_CANADA_CITY_03</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_CANADA</CivilizationType>
<CityName>TXT_KEY_CITY_NAME_CANADA_CITY_04</CityName>
</Row>
</Civilization_CityNames>
Click here for DOWNLOAD
Instructions:
Spoiler :
Code:
1. Download the .rar
2. Unpack the folder anywhere you like.
3. Open the "cities.txt" file, add your city names (each name on its own line) and save.
4. Run the application, answer all the prompted input.
5. Once finished your XML code will found as a txt file in the same folder as the app.
6. Tell your modding friends :P