• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

Help with Kael's guide to modding

Burgerlips

Chieftain
Joined
Nov 18, 2012
Messages
4
I new to modding Civ5 and I'm walking alone with Kael's guide to get used to the coding. I'm working on creating a new civ but evn though I'm following alone and basically copy and pasting, the Civ_Celt.xml doesn't seem to be referencing the GameText.xml. In game the game text is just what is shown in the Civ_Celt.xml, I've added the actions for mod start up as well so I'm not sure what I missed.

Thanks
 
I new to modding Civ5 and I'm walking alone with Kael's guide to get used to the coding. I'm working on creating a new civ but evn though I'm following alone and basically copy and pasting, the Civ_Celt.xml doesn't seem to be referencing the GameText.xml. In game the game text is just what is shown in the Civ_Celt.xml, I've added the actions for mod start up as well so I'm not sure what I missed.

Thanks

Do you mind telling us what your issue is? Don't tell us what you think is going wrong in a system you don't seem to understand, tell us what you expect to happen and what actually happened (or didn't.) Also, post your code.

During your stay here at C&C, remember that it's always better to overdescribe than to underdescribe.

Also, I'm considering doing an annotated version of Kael's guide. Anyone here think that's a good idea? If you don't have anything to add to the thread otherwise, shoot me a PM.
 
Well like I said the Civ_Celt isn't referencing the GameText file which are just copy and pastes. Here is the Civ_Celt file:



<GameData>
<Civilizations>
<Row>
<Type>CIVILIZATION_CELT</Type>
<Description>TXT_KEY_CIV_CELT_DESC</Description>
<ShortDescription>TXT_KEY_CIV_CELT_SHORT_DESC</ShortDescription>
<Adjective>TXT_KEY_CIV_CELT_ADJECTIVE</Adjective>
<Civilopedia>TXT_KEY_CIV_CELT_PEDIA</Civilopedia>
<CivilopediaTag>TXT_KEY_CIV5_CELT</CivilopediaTag>
<DefaultPlayerColor>PLAYERCOLOR_DARK_GREEN</DefaultPlayerColor>
<ArtDefineTag>ART_DEF_CIVILIZATION_ENGLAND</ArtDefineTag>
<ArtStyleType>ARTSTYLE_EUROPEAN</ArtStyleType>
<ArtStyleSuffix>_EURO</ArtStyleSuffix>
<ArtStylePrefix>EUROPEAN </ArtStylePrefix>
<PortraitIndex>6</PortraitIndex>
<IconAtlas>CIV_COLOR_ATLAS</IconAtlas>
<AlphaIconAtlas>CIV_ALPHA_ATLAS</AlphaIconAtlas>
<MapImage>MapEngland512.dds</MapImage>
<DawnOfManQuote>TXT_KEY_CIV5_CELT_TEXT_1</DawnOfManQuote>
<DawnOfManImage>DOM_Elizabeth.dds</DawnOfManImage>
</Row>
</Civilizations>
<Civilization_CityNames>
<Row>
<CivilizationType>CIVILIZATION_CELT</CivilizationType>
<CityName>TXT_KEY_CITY_NAME_BIBRACTE</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_CELT</CivilizationType>
<CityName>TXT_KEY_CITY_NAME_VIENNE</CityName>
</Row>
<Row>
<CivilizationType>CIVILIZATION_CELT</CivilizationType>
<CityName>TXT_KEY_CITY_NAME_TOLOSA</CityName>
</Row>
</Civilization_CityNames>
<Civilization_FreeBuildingClasses>
<Row>
<CivilizationType>CIVILIZATION_CELT</CivilizationType>
<BuildingClassType>BUILDINGCLASS_PALACE</BuildingClassType>
</Row>
</Civilization_FreeBuildingClasses>
<Civilization_FreeTechs>
<Row>
<CivilizationType>CIVILIZATION_CELT</CivilizationType>
<TechType>TECH_AGRICULTURE</TechType>
</Row>
</Civilization_FreeTechs>
<Civilization_FreeUnits>
<Row>
<CivilizationType>CIVILIZATION_CELT</CivilizationType>
<UnitClassType>UNITCLASS_SETTLER</UnitClassType>
<Count>1</Count>
<UnitAIType>UNITAI_SETTLE</UnitAIType>
</Row>
</Civilization_FreeUnits>
<Civilization_Leaders>
<Row>
<CivilizationType>CIVILIZATION_CELT</CivilizationType>
<LeaderheadType>LEADER_ELIZABETH</LeaderheadType>
</Row>
</Civilization_Leaders>
<Civilization_Start_Region_Priority>
<Row>
<CivilizationType>CIVILIZATION_CELT</CivilizationType>
<RegionType>REGION_FOREST</RegionType>
</Row>
</Civilization_Start_Region_Priority>
</GameData>


And here's the Game Text:

<GameData>
<Language_en_US>
<Row Tag="TXT_KEY_CITY_NAME_BIBRACTE">
<Text>Bibracte</Text>
</Row>
<Row Tag="TXT_KEY_CITY_NAME_VIENNE">
<Text>Vienne</Text>
</Row>
<Row Tag="TXT_KEY_CITY_NAME_TOLOSA">
<Text>Tolosa</Text>
</Row>
<Row Tag="TXT_KEY_CIV_CELT_ADJECTIVE">
<Text>Celtic</Text>
</Row>
<Row Tag="TXT_KEY_CIV_CELT_DESC">
<Text>Celtic Empire</Text>
</Row>
<Row Tag="TXT_KEY_CIV_CELT_SHORT_DESC">
<Text>Celtia</Text>
</Row>
<Row Tag="TXT_KEY_CIV5_CELT_HEADING_1">
<Text>History</Text>
</Row>
<Row Tag="TXT_KEY_CIV5_CELT_TEXT_1">
<Text>
The Celts were a diverse group of tribal societies in Iron Age and Roman-era Europe who spoke Celtic
languages......
</Text>
</Row>
</Language_en_US>
</GameData>



And the actions tab:

OnModActivated
UpdateDatabase - XML/Civilizations/Civ_Celt.xml
UpdateDatabase - XML/NewText/GameText.xml



For example, when I run the mod the description for the Civ is:

TXT_KEY_CIV_CELT_DESC

which should reference

<Row Tag="TXT_KEY_CIV_CELT_DESC">
<Text>Celtic Empire</Text>
</Row>

but I end up with Elizabeth_TXT_KEY_CIV_CELT_DESC as the description.
 
Probably you define text keys that already exist in the game, this will make the entire file that contains them fail to load (database.log should tell you this).
 
Urm try renaming all your Celt Tags to include a number : - TXT_KEY_CIV_CELT2_DESC, this will prevent any overlappign with the Celt stuff included in Gods and Kings. As someone else has asked, Post the log files I am 99%(the 1% been you only have Vanilla Civ5) sure your database.log will be full of "tag is not unique" errors.

EDIT:

:rotfl:
Same time post PawelS!
 
Also, use Replace instead of Row on text keys. It's just a good idea and will save you a lot of headache.

Replace is really nifty for when you'll be putting something there that is in DLC. If the User doesn't have the DLC, Replace acts like Row in that circumstance. if they do, it just replaces whatever data is there with yours.

One of the major ticks with Text is that if you use Row on text, and that text already exists, it just stops parsing the XML file on that line.
 
After dropping this to work on my portfolio and do some freelancing I'm giving this another shot.

The "replace" command instead of "row" seemed to fix all my old problems, thanks a lot for that.

I've run into an issue now that gets rid of my unit command menu in the bottom left whenever I start the mod. I've verified game cache in steam and retraced my steps backwards but nothing I do seems to bring it back. Is there a command in game to show/hide the menu or is this a problem somewhere in my xml?

I have the feeling it happened when I loaded dds icons that were missing the alpha by mistake or it may have been when I added the new leader.

http://imgur.com/We0K3

Img is for ref in case you don't know which menu I mean.

Thanks!


EDIT: Fixed, I changed the default colour and didn't use all caps.
 
Back
Top Bottom