Civilization not appearing in Civilopedia

AHWM

Chieftain
Joined
Jul 23, 2014
Messages
35
I created a new Civilization, the United States of America. But it's not showing up at all in-game, not selectable, not in the civilopedia. The only thing that it even recognizes is enabling/disabling the mod.

I have the following things:
- Leader
- Traits
- The civilization itself
- Not two, but three unique units.

Screenshot of mod properties:


Github:
https://github.com/stormchaser206/Civilization-V---New-America-Civilization

Please help me with this. I'd like to create other civilizations after this, so I'd like to know how to get it added.
 
Are you saying that you didn't give a leader to the civilization? You probably need that.
 
Are you saying that you didn't give a leader to the civilization? You probably need that.

I'll try that now lol. I was following Kael's guide and I know a lot changed since he wrote that so it must be that now I need a leader for it to appear.
 
I've updated the post with all the new information and it's more detailed now. Please read this and help me if you can.
 
It's hard to say without error logs, but at the very least, you've got conflicts with the stock America Civ's city names.

TXT_KEY_CITY_NAME_BOSTON is the same as America's text key, thus the XML parser will see that it is a duplicate, freak out, and dump the entire file, thus never getting to the rest of your text keys, including the one that should show up in the Civ select screen to explain your UA.

Additionally, which version of Civ5 is this mod intended for?
If it is for BNW (perhaps G&K as well) it will crash because there are no Spy names defined for the Civilization.
You may also need to define a default religion.

Kael's guide is a great starting point, but ideally you should take the lessons he's taught in terms of parsing the XML and then applying that to the stock Civ files, and using the latter as a reference in terms of what tables you need to define. Alternatively, you can grab a copy of whoward's template files, though I dislike using those personally.
 
I play on BNW, so that is probably why. Is there a guide on here so I can make it work for all versions? Also, would keeping the city names but changing the "TXT_KEY_CITY_NAME_BOSTON" for example to "TXT_KEY_USACITY_BOSTON" work?
 
I'm not entirely sure how to make a Civ compatible with prior versions, since my Civ uses BNW-specific features pretty heavily to the point where it's required. I think you might be able to get away with simply adding the expansion-specific XML into their own files, though. That way, if the player is using vanilla, those files will error out but not affect the vanilla stuff from loading.

As to your latter question, yes that should be sufficient to make it unique. Alternatively, if you are going to be using Boston anyway, you could also omit it entirely and the game will just use the entry defined from America. Personally, I feel safer defining my own text, though.
 
I just tested what you said, and it still doesn't appear. There are no errors and the build is successful. I have synced my updated files to the GitHub. It is not appearing in the Civilopedia or the Civilization selection screen.
 
By 'error logs,' I mean the Database, XML and Lua logs that are generated when you run the game and attempt to load your mod. Please see here for instructions on how to enable logging.

With that said, checking your mod's modinfo file, I see this:
Spoiler :
<File md5="6021D1CD19E9D7D37C5456EF65C50928" import="0">Art/EisenhowerIcon128.dds</File>
<File md5="FC56DB2F3371E721DD176345FCD1D5C1" import="0">Art/EisenhowerIcon256.dds</File>
<File md5="0BEA07B0B605308E1DD8FB01B7A3CEB8" import="0">Art/EisenhowerIcon64.dds</File>
<File md5="21FD0B691B3C2617089B35A3973AA913" import="0">Art/USCivIcon128.dds</File>
<File md5="3586955CFF475D41AB60287560D023B7" import="0">Art/USCivIcon256.dds</File>
<File md5="26F35E1B7B4E32C2DACB01537EE5B462" import="0">Art/USCivIcon32.dds</File>
<File md5="9E271AEE5087B20F7E4933B68C7F9150" import="0">Art/USCivIcon45.dds</File>
<File md5="C6B58FF571EB3968780071E3F7BD1915" import="0">Art/USCivIcon64.dds</File>
<File md5="D2382E5B3BD484A552D14CD2E4CE8C2C" import="0">Art/USCivIcon80.dds</File>
<File md5="8005C777450EE0287F1B19A30A5CA9F9" import="0">Art/USLeaderBackground.dds</File>

In short, none of your art assets are being imported into VFS.
VFS is not covered in Kael's guide, because it didn't exist at his time of writing.
You'll need to go into ModBuddy, select all of your art files and under the VFS setting, toggle it to true.

Furthermore:
Spoiler :
<File md5="DE51881C3B37BFA2189F9850F906B86B" import="0">XML/Civilizations/CIV5Traits.xml</File>
<File md5="F4C42C2F5F03666AF96847290A37E402" import="0">XML/Civilizations/Civ_USA.xml</File>
<File md5="8D0D368CD9B8F74AD072CF60FB7E3EC9" import="0">XML/GameInfo/CIV5IconTextureAtlases.xml</File>
<File md5="CA4A899C95367F3562DE32274CDC9683" import="0">XML/Leaders/CIV5Leader_Eisenhower.xml</File>
<File md5="D1D63B9505FBE7DEFDDD6431EA7A80E7" import="0">XML/New Text/USA_Civ_Text.xml</File>
<File md5="F842D450A03620018E9F5A1E3A8222EB" import="0">XML/Units/CIV5Units.xml</File>

-----------------

<OnModActivated>
<UpdateDatabase>XML/Civilizations/Civ_USA.xml</UpdateDatabase>
<UpdateDatabase>XML/New Text/USA_Civ_Text.xml</UpdateDatabase>
<UpdateDatabase>XML/Leaders/CIV5Leader_Eisenhower.xml</UpdateDatabase>
<UpdateDatabase>XML/Units/CIV5Units.xml</UpdateDatabase>
</OnModActivated>


Your Trait and Texture Atlas XML are not being set to update the database as with the other files. This means those files are actually doing absolutely nothing, and the game has no idea what is in those files.
 
So basically every art file has to be imported into the VFS and every file that's not an art file has to be in the UpdateDatabase? Okay, I'll use that from now on. I'm going to test it now, I'll see what happens.
 
Every art file that you'll be using, yes, but not every non-art file doesn't!
There are a few exceptions to each rule, but in general, you can follow that rule of thumb.
For specific exceptions check this thread.
 
That database log seems like your mod caused the game to freak out and fail to load a number of other Civilizations.

This usually means something is wrong with your Civilization definition file, and I suspect it's because you do not have 2 uniques for your Civilization.

You have this:
Spoiler :
<Civilization_UnitClassOverrides>
<Row>
<CivilizationType>CIVILIZATION_USA</CivilizationType>
<UnitClassType>UNITCLASS_WORKER</UnitClassType>
<UnitType>UNIT_WORKER_OF_AMERICA</UnitType>
</Row>
<Row>
<CivilizationType>CIVILIZATION_USA</CivilizationType>
<UnitClassType>UNITCLASS_WORKER</UnitClassType>
<UnitType>UNIT_WORKER_OF_AMERICA</UnitType>
</Row>
</Civilization_UnitClassOverrides>


However, I don't quite understand what you were trying to do here.
Certainly, you can have two UU's, but you cannot specify the same thing twice. You've probably noticed by now the pattern: This game really does not like duplicates of any form.
You'll likely need to replace the second UU with your F-16.
 
You have double <GameData> -- </GameData> wraps in your civilization file and in some of the others:
Code:
<GameData> 
4 	<GameData> 
5 		<Civilizations>
This repeat may very well be causing a fail-mode of the entire file:
Code:
		<Civilization_UnitClassOverrides> 
169 			<Row> 
170 				<CivilizationType>CIVILIZATION_USA</CivilizationType> 
171 				<UnitClassType>UNITCLASS_WORKER</UnitClassType> 
172 				<UnitType>UNIT_WORKER_OF_AMERICA</UnitType> 
173 			</Row> 
174 			<Row> 
175 				<CivilizationType>CIVILIZATION_USA</CivilizationType> 
176 				<UnitClassType>UNITCLASS_WORKER</UnitClassType> 
177 				<UnitType>UNIT_WORKER_OF_AMERICA</UnitType> 
178 			</Row> 
179 		</Civilization_UnitClassOverrides>
If you haven't already defined a leader trait for Eisenhower, then there's nothing for the game to update here. You want to do <Row> structuring and not <Update> structuring if the game does not already have a <Row> with this info within the same game table. It does not matter what file the code is in, it matters what game table the code belongs to. But I think you have defined this same exact information elsewhere in your mod, so these lines are (a) unnecessary, and (b), actually counter-productive.
Code:
		<Leader_Traits> 
182 			<Update> 
183 				<Set TraitType="TRAIT_WORKERS_OF_AMERICA"/> 
184 				<Where LeaderType="LEADER_EISENHOWER"/> 
185 			</Update> 
186 		</Leader_Traits>
Also, it's a little hard to navigate through the Github folders, but I'm not sure you ever actually defined the Trait TRAIT_WORKERS_OF_AMERICA within the <Traits> table. It is much easier for us to look through your mod if you attach the actual mod to a post, as shown how here : whoward69's zip your mods and attach tutorial

Then we know for sure 100% that what you are showing us is what the game is seeing in the mod, and we can more easily add it to our MODS folder and run it ourselves in-game when looking through the files doesn't reveal the trouble.
 
You have double <GameData> -- </GameData> wraps in your civilization file and in some of the others:
Code:
<GameData> 
4 	<GameData> 
5 		<Civilizations>
This repeat may very well be causing a fail-mode of the entire file:
Code:
		<Civilization_UnitClassOverrides> 
169 			<Row> 
170 				<CivilizationType>CIVILIZATION_USA</CivilizationType> 
171 				<UnitClassType>UNITCLASS_WORKER</UnitClassType> 
172 				<UnitType>UNIT_WORKER_OF_AMERICA</UnitType> 
173 			</Row> 
174 			<Row> 
175 				<CivilizationType>CIVILIZATION_USA</CivilizationType> 
176 				<UnitClassType>UNITCLASS_WORKER</UnitClassType> 
177 				<UnitType>UNIT_WORKER_OF_AMERICA</UnitType> 
178 			</Row> 
179 		</Civilization_UnitClassOverrides>
If you haven't already defined a leader trait for Eisenhower, then there's nothing for the game to update here. You want to do <Row> structuring and not <Update> structuring if the game does not already have a <Row> with this info within the same game table. It does not matter what file the code is in, it matters what game table the code belongs to. But I think you have defined this same exact information elsewhere in your mod, so these lines are (a) unnecessary, and (b), actually counter-productive.
Code:
		<Leader_Traits> 
182 			<Update> 
183 				<Set TraitType="TRAIT_WORKERS_OF_AMERICA"/> 
184 				<Where LeaderType="LEADER_EISENHOWER"/> 
185 			</Update> 
186 		</Leader_Traits>
Also, it's a little hard to navigate through the Github folders, but I'm not sure you ever actually defined the Trait TRAIT_WORKERS_OF_AMERICA within the <Traits> table. It is much easier for us to look through your mod if you attach the actual mod to a post, as shown how here : whoward69's zip your mods and attach tutorial

Then we know for sure 100% that what you are showing us is what the game is seeing in the mod, and we can more easily add it to our MODS folder and run it ourselves in-game when looking through the files doesn't reveal the trouble.

I fixed the duplicate and I'm testing it right now, although I did not test the other things you mentioned. I have not added the updated files with the duplicate fixed yet to the GitHub. However, I have it updated in the .rar file attachment that it attached to this post. I will fix what you said above then test it.

Edit: The attachment now has all the fixes you posted. I'm testing it now to see if it appears.

Edit #2: He appeared now, but his ability was "Civ Specific 2" and when I selected him the screen went blank except for the BNW background. Also, the default America and the default Washington icons were appearing.
 

Attachments

  • United States of America.rar
    2.9 MB · Views: 28
The above post has been edited with the new .rar and some new info.
 
Quite a few errors and oversights still.

Your Leaders file defines Eisenhower's name as:
Spoiler :
Code:
<Description>TXT_KEY_CIVILOPEDIA_LEADERS_EISENHOWER_TEXT_1</Description>
<Civilopedia>TXT_KEY_CIVILOPEDIA_LEADERS_EISENHOWER_TEXT_1</Civilopedia>
...which you can see is exactly the same as his Civilopedia Entry.

Your Civ's UA appears as 'Civ Specific Bonus 2' because you have not defined the Trait's name nor description anywhere. The entirety of your trait file defines what the trait should do, but the game has absolutely no idea on how to present your trait.

Here's a random example from the game files for Russia's UA:
Spoiler :
Code:
<Row>
	<Type>TRAIT_STRATEGIC_RICHES</Type>
	<Description>TXT_KEY_TRAIT_STRATEGIC_RICHES</Description>
	<ShortDescription>TXT_KEY_TRAIT_STRATEGIC_RICHES_SHORT</ShortDescription>
</Row>

Moving on to debugging the other issues, the first stop is the database.log file, which reveals this:
Spoiler :
[2564343.564] Invalid Reference on Leaders.IconAtlas - "CIV_COLOR_ATLAS_ICONS" does not exist in IconTextureAtlases
[2564343.564] Invalid Reference on Leader_MajorCivApproachBiases.LeaderType - "LEADER_EISENOWER" does not exist in Leaders
[2564343.564] Invalid Reference on Leader_Traits.TraitType - "TRAIT_WORKERS_OF_AMERICA" does not exist in Traits

  1. It says your IconAtlas does not exist. This is because your TextureAtlas definition file contains two sets of <GameData> -- Remember again how much this game hates duplicates of anything.
  2. You've got a typo in your Leader XML file. EISENOWER is different from EISENHOWER.
  3. The game is again complaining that your trait doesn't actually exist.

Checking the Lua.log and xml.log doesn't reveal anything of interest, though.

Once all these are fixed, your Civ proceeds into the next screen (which you claimed came up blank) but your icons are missing. This means there are issues with your icons, or your texture atlases.

Checking your TextureAtlas XML file again, you have yet another instance of duplicates:
Spoiler :
Code:
<Row>
	<Atlas>CIV_COLOR_ATLAS_ICONS</Atlas>
	<IconSize>256</IconSize>
	<Filename>USCivIcon256.dds</Filename>
	<IconsPerRow>8</IconsPerRow>
	<IconsPerColumn>8</IconsPerColumn>
</Row>
------------------
<Row>
	<Atlas>CIV_COLOR_ATLAS_ICONS</Atlas>
	<IconSize>256</IconSize>
	<Filename>EisenhowerIcon256.dds</Filename>
	<IconsPerRow>8</IconsPerRow>
	<IconsPerColumn>8</IconsPerColumn>
</Row>
Your code tells the game to look for CIV_COLOR_ATLAS_ICONS in order to find the appropriate icons. The problem is... you've defined two completely different atlas files to use for this purpose. Which one is the game supposed to use for which display?

You must give the second "set" a unique name. (The various sizes will all share the same name with each other, as the game will check the appropriate section for a given size.)

That's all I've got at the moment.
 
I fixed those and the icons are still blank. By the blank screen, I mean when you select him as the player. The leader icon might be fixed in this, as I just changed the name of the icon atlas to the new one in his file without testing it.
 

Attachments

  • United States of America.rar
    2.9 MB · Views: 72
Top Bottom