Adding City States

MAHRana

Prince
Joined
May 22, 2010
Messages
324
I was creating city states by using XML files and finished all of them. I also had created a TSL map but then I didn't know how to add the XML files into WorldBuilder. Do I have to use LUA files to add the city states into WorldBuilder? If so, how should I do it?
 
After you create the files you should have to activate them in mod buddy. After you do that, Go in to the world builder and click "Mods", then you will get a list of your downloaded mods, select your city state mod. exit, then create (or load ) a map. Go into scenario editor and select your city states and voila.
 
Problem solved. Reading this is for recreational purposes only, no philantropy to practice here. (Unless you can show me the fabled delete post button.)
Sorta related problem:

I've been making my own city states too (to get the hang of modding), but encountered a problem with names with spaces in. Basically, if a name consisted of two or more words and I wrote ...<ShortDescription>The Basque Nation</ShortDescription>... etc. it wouldn't show as the title in the city state dialogue screen (see pic).
Spoiler :
The think underlined in red would be missing.
CityStateDialogueScreen.png

No problems in the other places the name showed up (notifications and the text in that dialogue), nor with adding spaces between the <Description> tags.

Now I tried solving it by doing this in one file:
Spoiler :
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 10/29/2010 2:52:04 PM -->
<GameData>
  <!-- TODO: Insert table creation example here. -->
	<MinorCivilizations>
		<Row>
			<Type>MINOR_CIV_BASQUENATION</Type>
			<Description>TXT_KEY_CITYSTATE_BASQUE</Description>
			<ShortDescription>TXT_KEY_CITYSTATE_BASQUE</ShortDescription>
			<Adjective>Basque</Adjective>
			<Civilopedia>No info</Civilopedia>
			<DefaultPlayerColor>PLAYERCOLOR_MINOR_MIDDLE_CYAN</DefaultPlayerColor>
			<ArtDefineTag>ART_DEF_CIVILIZATION_MINOR</ArtDefineTag>
			<ArtStyleType>ARTSTYLE_EUROPEAN</ArtStyleType>
			<ArtStyleSuffix>_EURO</ArtStyleSuffix>
			<ArtStylePrefix>EUROPEAN</ArtStylePrefix>
			<MinorCivTrait>MINOR_TRAIT_CULTURED</MinorCivTrait>
		</Row>
	</MinorCivilizations>
	<MinorCivilization_CityNames>
		<Row>
			<MinorCivType>MINOR_CIV_BASQUENATION</MinorCivType>
			<CityName>TXT_KEY_CITYSTATE_BASQUE</CityName>
		</Row>
	</MinorCivilization_CityNames>
	<MinorCivilization_Flavors>
		<Row>
			<MinorCivType>MINOR_CIV_BASQUENATION</MinorCivType>
			<FlavorType>FLAVOR_EXPANSION</FlavorType>
			<Flavor>0</Flavor>
		</Row>
		<Row>
			<MinorCivType>MINOR_CIV_BASQUENATION</MinorCivType>
			<FlavorType>FLAVOR_CITY_DEFENSE</FlavorType>
			<Flavor>10</Flavor>
		</Row>
		<Row>
			<MinorCivType>MINOR_CIV_BASQUENATION</MinorCivType>
			<FlavorType>FLAVOR_DEFENSE</FlavorType>
			<Flavor>5</Flavor>
		</Row>
		<Row>
			<MinorCivType>MINOR_CIV_BASQUENATION</MinorCivType>
			<FlavorType>FLAVOR_WONDER</FlavorType>
			<Flavor>0</Flavor>
		</Row>
	</MinorCivilization_Flavors>
</GameData>
and adding a new one:
Spoiler :
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 10/30/2010 4:01:58 PM -->
<GameData>
	<Language_en_US>
		<Row Tag="TXT_KEY_CITYSTATE_BASQUE"
			<Text>Basque Nation</Text>
		</Row>
		<Row Tag="TXT_KEY_CITYSTATE_PYGMY"
			<Text>Pygmy Nation</Text>
		</Row>
	</Language_en_US>  
</GameData>
but now all the texts (including the one that didn't work before) simply display 'TXT_KEY_CITYSTATE_BASQUE' etc.
(For the record: I didn't forget to do OnModActivated UpdateDatabase TXT.xml)

I guess it doesn't see the TXT_KEY... as a variable, and rather as text, but I don't know how I'd have to change that.
'Load' that TXT.xml into the city state xml like you would with java?
Change all text fields (the adjective one, the civilopedia one) to contain variables instead of text?

Edit:
I might have found it. (I did <Row Type = "..." instead of <Row Type = "...">)
Will edit this again if it succeeds or fails in my test game.

Edit 2:
It worked. Complaining on a forum, it always works. :/
(For those that care, in the final build it will be 'The Basque Nation' to better suit the syntax.)
 
Problem solved. Reading this is for recreational purposes only, no philantropy to practice here. (Unless you can show me the fabled delete post button.)
Sorta related problem:

I've been making my own city states too (to get the hang of modding), but encountered a problem with names with spaces in. Basically, if a name consisted of two or more words and I wrote ...<ShortDescription>The Basque Nation</ShortDescription>... etc. it wouldn't show as the title in the city state dialogue screen (see pic).
Spoiler :
The think underlined in red would be missing.
CityStateDialogueScreen.png

No problems in the other places the name showed up (notifications and the text in that dialogue), nor with adding spaces between the <Description> tags.

Now I tried solving it by doing this in one file:
Spoiler :
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 10/29/2010 2:52:04 PM -->
<GameData>
  <!-- TODO: Insert table creation example here. -->
	<MinorCivilizations>
		<Row>
			<Type>MINOR_CIV_BASQUENATION</Type>
			<Description>TXT_KEY_CITYSTATE_BASQUE</Description>
			<ShortDescription>TXT_KEY_CITYSTATE_BASQUE</ShortDescription>
			<Adjective>Basque</Adjective>
			<Civilopedia>No info</Civilopedia>
			<DefaultPlayerColor>PLAYERCOLOR_MINOR_MIDDLE_CYAN</DefaultPlayerColor>
			<ArtDefineTag>ART_DEF_CIVILIZATION_MINOR</ArtDefineTag>
			<ArtStyleType>ARTSTYLE_EUROPEAN</ArtStyleType>
			<ArtStyleSuffix>_EURO</ArtStyleSuffix>
			<ArtStylePrefix>EUROPEAN</ArtStylePrefix>
			<MinorCivTrait>MINOR_TRAIT_CULTURED</MinorCivTrait>
		</Row>
	</MinorCivilizations>
	<MinorCivilization_CityNames>
		<Row>
			<MinorCivType>MINOR_CIV_BASQUENATION</MinorCivType>
			<CityName>TXT_KEY_CITYSTATE_BASQUE</CityName>
		</Row>
	</MinorCivilization_CityNames>
	<MinorCivilization_Flavors>
		<Row>
			<MinorCivType>MINOR_CIV_BASQUENATION</MinorCivType>
			<FlavorType>FLAVOR_EXPANSION</FlavorType>
			<Flavor>0</Flavor>
		</Row>
		<Row>
			<MinorCivType>MINOR_CIV_BASQUENATION</MinorCivType>
			<FlavorType>FLAVOR_CITY_DEFENSE</FlavorType>
			<Flavor>10</Flavor>
		</Row>
		<Row>
			<MinorCivType>MINOR_CIV_BASQUENATION</MinorCivType>
			<FlavorType>FLAVOR_DEFENSE</FlavorType>
			<Flavor>5</Flavor>
		</Row>
		<Row>
			<MinorCivType>MINOR_CIV_BASQUENATION</MinorCivType>
			<FlavorType>FLAVOR_WONDER</FlavorType>
			<Flavor>0</Flavor>
		</Row>
	</MinorCivilization_Flavors>
</GameData>
and adding a new one:
Spoiler :
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 10/30/2010 4:01:58 PM -->
<GameData>
	<Language_en_US>
		<Row Tag="TXT_KEY_CITYSTATE_BASQUE"
			<Text>Basque Nation</Text>
		</Row>
		<Row Tag="TXT_KEY_CITYSTATE_PYGMY"
			<Text>Pygmy Nation</Text>
		</Row>
	</Language_en_US>  
</GameData>
but now all the texts (including the one that didn't work before) simply display 'TXT_KEY_CITYSTATE_BASQUE' etc.
(For the record: I didn't forget to do OnModActivated UpdateDatabase TXT.xml)

I guess it doesn't see the TXT_KEY... as a variable, and rather as text, but I don't know how I'd have to change that.
'Load' that TXT.xml into the city state xml like you would with java?
Change all text fields (the adjective one, the civilopedia one) to contain variables instead of text?

Edit:
I might have found it. (I did <Row Type = "..." instead of <Row Type = "...">)
Will edit this again if it succeeds or fails in my test game.

Edit 2:
It worked. Complaining on a forum, it always works. :/
(For those that care, in the final build it will be 'The Basque Nation' to better suit the syntax.)

It's always the small details. Glad it worked out for you!
 
Back
Top Bottom