• 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 Empty Civilopedia

tchristensen

Emperor
Joined
Jul 21, 2010
Messages
1,241
Location
Grand Rapids, Mi
I have a small problem that is driving me a bit crazy. I have added a ton of units to my ExtremeMod without any issue. The other day I added a couple of more units and now those units both have no civilopeidia entries nor do they get the controls to show up when it is their turn to take an action.

I bet I am just missing something very simple, but I can't figure it out. I can post the units XML if that is helpful.

All XML was copied from pre-existing units that work fine.

What controls tie the entries into the civilopedia? I bet anything it is a naming convention I have screwed up, but glaring at the files I see nothing wrong with them anywhere?

Anyone have any ideas?
 
Could be a wrong tag or a missing TXT_KEY or God knows what. I'm assuming that you did actually write the Civilopedia entries and integrate them properly...
 
Could be a wrong tag or a missing TXT_KEY or God knows what. I'm assuming that you did actually write the Civilopedia entries and integrate them properly...

I don't use TXT_KEYS but rather just write inside of the <civilopedia> control:

<Civilopedia>A powerful man of the tribe that was believed to control the elemantal forces. The druids were an engmatic class that travelled the ancient world spreading knowledge and hope.</Civilopedia>
<Strategy>Powerful religious warriors</Strategy>

I have added 65 units thusly with never a problem until now?
 
No idea.

It reminds me, however, of the fact that the Sumerians seem to be absent from my copy of unmodded BtS ever since I removed them from my mod to be used as raw material for the Israelites...
 
Here is how I do it (I took the Minuteman of my 2nd UU modcomp for RFC in my sig):

CIV4UnitInfos.xml
Code:
		<UnitInfo>
			<Class>UNITCLASS_RIFLEMAN</Class>
			<Type>UNIT_AMERICA_MINUTEMAN</Type>
			<UniqueNames/>
			<Special>NONE</Special>
			<Capture>NONE</Capture>
			<Combat>UNITCOMBAT_GUN</Combat>
			<Domain>DOMAIN_LAND</Domain>
			<DefaultUnitAI>UNITAI_CITY_DEFENSE</DefaultUnitAI>
			<Invisible>NONE</Invisible>
			<SeeInvisible>NONE</SeeInvisible>
			<Description>[B]TXT_KEY_UNIT_AMERICA_MINUTEMAN[/B]</Description>
			<Civilopedia>[B]TXT_KEY_UNIT_AMERICA_MINUTEMAN_PEDIA[/B]</Civilopedia>
			<Strategy>[B]TXT_KEY_UNIT_AMERICA_MINUTEMAN_STRATEGY[/B]</Strategy>
			<Advisor>ADVISOR_MILITARY</Advisor>
			<bAnimal>0</bAnimal>
			<bFood>0</bFood>
			[...]

The bolded sections are the ones that matter. It doesn't really matter what the code is, but if you do it like this (it's the same as the standard civ 4 code), it is the most easiest way.

After you gave this sections the "code", you can make a new text files. (What I did is: copy the original text file of BTS (CIV4GameText_Civilopedia_BTS.xml) and renamed it to CIV4GameText_2ndUU.xml. (The bolded section can be what ever you want. In you case, I would name them CIV4GameText_ExtremeMod.xml or something))
After you have done this, you can delete all existing text files in the file you just created. This is what you should left:
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by lcollins (Firaxis Games) -->
<!-- Sid Meier's Civilization 4 -->
<!-- Copyright Firaxis Games 2005 -->
<!-- -->
<!-- Game Text - New -->
<Civ4GameText xmlns="http://www.firaxis.com">

</Civ4GameText>

Now you can fill in the text files.
Code:
	<TEXT>
		<Tag>[B]TXT_KEY_UNIT_AMERICA_MINUTEMAN_PEDIA[/B]</Tag>
		<English>:):):):):)Minutemen were members of teams of select men from the American colonial militia during the American Revolutionary War. They vowed to be ready for battle against the British within one minute of receiving notice. These teams consisted about a fourth of the entire militia, and generally were the younger and more mobile, serving as part of a network for early response to any threat. [PARAGRAPH:1]The minutemen were 25 years old or younger, and were chosen for their enthusiasm, political reliability, and strength. They were the first armed militia to arrive at or await a battle. Officers, as in the rest of the militia, were elected by popular vote, and each unit drafted a formal written covenant to be signed upon enlistment. The militia typically assembled as an entire unit in each town between two and four times per year for training during peacetime, but as the inevitability of a war became apparent, the militia trained more often. The minute companies trained three to four times per week. It was common for officers to make decisions through consultation and consensus with their men as opposed to giving orders to be followed without question, sometimes even in the midst of battle.</English>
	</TEXT>

	[...]

	<TEXT>
		<Tag>[B]TXT_KEY_UNIT_AMERICA_MINUTEMAN[/B]</Tag>
		<English>Minuteman</English>
		<French>Minuteman</French>
		<German>Minuteman</German>
		<Italian>Minuteman</Italian>
		<Spanish>Minuteman</Spanish>
	</TEXT>

Make sure the bolded sections are in the Unitinfos.xml and your text file are the same.
(I hope this is clear enough for you)

(I didn't have a strategy, because the RFC civilopedia doesn't show them, but the work the same as the pedia.)
 
Here is how I do it (I took the Minuteman of my 2nd UU modcomp for RFC in my sig):

CIV4UnitInfos.xml
Code:
		<UnitInfo>
			<Class>UNITCLASS_RIFLEMAN</Class>
			<Type>UNIT_AMERICA_MINUTEMAN</Type>
			<UniqueNames/>
			<Special>NONE</Special>
			<Capture>NONE</Capture>
			<Combat>UNITCOMBAT_GUN</Combat>
			<Domain>DOMAIN_LAND</Domain>
			<DefaultUnitAI>UNITAI_CITY_DEFENSE</DefaultUnitAI>
			<Invisible>NONE</Invisible>
			<SeeInvisible>NONE</SeeInvisible>
			<Description>[B]TXT_KEY_UNIT_AMERICA_MINUTEMAN[/B]</Description>
			<Civilopedia>[B]TXT_KEY_UNIT_AMERICA_MINUTEMAN_PEDIA[/B]</Civilopedia>
			<Strategy>[B]TXT_KEY_UNIT_AMERICA_MINUTEMAN_STRATEGY[/B]</Strategy>
			<Advisor>ADVISOR_MILITARY</Advisor>
			<bAnimal>0</bAnimal>
			<bFood>0</bFood>
			[...]

The bolded sections are the ones that matter. It doesn't really matter what the code is, but if you do it like this (it's the same as the standard civ 4 code), it is the most easiest way.

After you gave this sections the "code", you can make a new text files. (What I did is: copy the original text file of BTS (CIV4GameText_Civilopedia_BTS.xml) and renamed it to CIV4GameText_2ndUU.xml. (The bolded section can be what ever you want. In you case, I would name them CIV4GameText_ExtremeMod.xml or something))
After you have done this, you can delete all existing text files in the file you just created. This is what you should left:
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by lcollins (Firaxis Games) -->
<!-- Sid Meier's Civilization 4 -->
<!-- Copyright Firaxis Games 2005 -->
<!-- -->
<!-- Game Text - New -->
<Civ4GameText xmlns="http://www.firaxis.com">

</Civ4GameText>

Now you can fill in the text files.
Code:
	<TEXT>
		<Tag>[B]TXT_KEY_UNIT_AMERICA_MINUTEMAN_PEDIA[/B]</Tag>
		<English>:):):):):)Minutemen were members of teams of select men from the American colonial militia during the American Revolutionary War. They vowed to be ready for battle against the British within one minute of receiving notice. These teams consisted about a fourth of the entire militia, and generally were the younger and more mobile, serving as part of a network for early response to any threat. [PARAGRAPH:1]The minutemen were 25 years old or younger, and were chosen for their enthusiasm, political reliability, and strength. They were the first armed militia to arrive at or await a battle. Officers, as in the rest of the militia, were elected by popular vote, and each unit drafted a formal written covenant to be signed upon enlistment. The militia typically assembled as an entire unit in each town between two and four times per year for training during peacetime, but as the inevitability of a war became apparent, the militia trained more often. The minute companies trained three to four times per week. It was common for officers to make decisions through consultation and consensus with their men as opposed to giving orders to be followed without question, sometimes even in the midst of battle.</English>
	</TEXT>

	[...]

	<TEXT>
		<Tag>[B]TXT_KEY_UNIT_AMERICA_MINUTEMAN[/B]</Tag>
		<English>Minuteman</English>
		<French>Minuteman</French>
		<German>Minuteman</German>
		<Italian>Minuteman</Italian>
		<Spanish>Minuteman</Spanish>
	</TEXT>

Make sure the bolded sections are in the Unitinfos.xml and your text file are the same.
(I hope this is clear enough for you)

(I didn't have a strategy, because the RFC civilopedia doesn't show them, but the work the same as the pedia.)

Thanks for the help -- I may use your ideas because the mod is just getting way out of control now by not using the TXT. It is much simpler to keep everything in the XML files, but they can get pretty big.

Thanks again for the help.
 
Specifying the texts in the unitinfo files directly as you did before is a bad habit anyways. If anyone wants to translate your mod, it'll become a true pain. Not to mention that my JTranslator won't work...
 
Specifying the texts in the unitinfo files directly as you did before is a bad habit anyways. If anyone wants to translate your mod, it'll become a true pain. Not to mention that my JTranslator won't work...


There is no plan on translating my mod, and to be honest what I have seen from others in their attempt to translate mods has been at least a joke and at best rather insulting. Translating is more than pushing text through Google Translate, or worse just copying the English into the foreign language text controls.

This will be the fourth time I have tried to respond to this -- seems like the forum is a bit busier these days!
 
Well, I have never used google translator or the like and I know that what is translated on the hungarian forum - yes, not too much mods are translated, but they are at least interested in translations - is pretty solid. Still, there are people around that have big problems with xml. It's hard to only teach them the technical aspects of translating if the mod is set up the standard way. The last guy I tried to, gave it up. Now, guess what happens if they try to translate your super special mod. Also, using the english texts for other languages isn't something bad. If someone has a user translated civ4 and tries to run a mod where there is no entry for that language at all, then there is no text at all. It's better to have the english text then having nothing. And that's actually the same as what happens if one does it your way: the user gets the english texts. But doing it the standard way, at least others will find it easy to translate the texts later. In other words: you don't want to translate your mod, but maybe others would do. You can never know. At least, I really don't see why you feel insulted by this. Not to mention that your oversimplification sounds like disrespect towards those who really care to translate mods.
 
Well, I have never used google translator or the like and I know that what is translated on the hungarian forum - yes, not too much mods are translated, but they are at least interested in translations - is pretty solid. Still, there are people around that have big problems with xml. It's hard to only teach them the technical aspects of translating if the mod is set up the standard way. The last guy I tried to, gave it up. Now, guess what happens if they try to translate your super special mod. Also, using the english texts for other languages isn't something bad. If someone has a user translated civ4 and tries to run a mod where there is no entry for that language at all, then there is no text at all. It's better to have the english text then having nothing. And that's actually the same as what happens if one does it your way: the user gets the english texts. But doing it the standard way, at least others will find it easy to translate the texts later. In other words: you don't want to translate your mod, but maybe others would do. You can never know. At least, I really don't see why you feel insulted by this. Not to mention that your oversimplification sounds like disrespect towards those who really care to translate mods.

You pose a good argument. Sadly, ExtremeMod is too far along now to change the way I am doing things.

As I said, I would feel honored that anyone would take up the task of translating my mod and I give them my praise upfront.
 
No; it sounds like there may be an error with the units animation.

No, not really, but related.
The problem is, that in the .kfm files the name of the related .nif file is mentiond (e.g. in the marines.kfm there is the marines.nif mentioned).
If you now use a .nif where the file name is another one, the algorithm to place the units in the pedia/for selecting the units will fail to find the .nif and will crash, which leads to a half empty interface at this point.
You would probably see some python exceptions if they were enabled.

So, the solution is: Rename all .nif files to its original name.
 
No, not really, but related.
The problem is, that in the .kfm files the name of the related .nif file is mentiond (e.g. in the marines.kfm there is the marines.nif mentioned).
If you now use a .nif where the file name is another one, the algorithm to place the units in the pedia/for selecting the units will fail to find the .nif and will crash, which leads to a half empty interface at this point.
You would probably see some python exceptions if they were enabled.

So, the solution is: Rename all .nif files to its original name.

Thanks! I was ready to chuck the entire mod in the trash before I figured it out. Since then, I have had my most creative day in months with the mod -- adding 6 new bonus resources, 5 new technologies, and 8 new units.

I should have spent the day studying and reading my history book, but it was refreshing to see so much positive work done on the mod.
 
Back
Top Bottom