Help a newbie with text

coachbradb

Chieftain
Joined
Jul 28, 2012
Messages
1
Hi all. I am very new to modding and I am trying to follow the moddersguide.pdf. I am having some issues with the text though. Even though I seem to have entered it all in right, when I load the mod I get the tags instead of the text. So it will show up like. LEADER_IRA TXT_KEY_CIV_AMC_DESC when you go to choose the Civ. Also I have to go into advanced setup to load the civ. The main selection page for this will not scroll. I am guessing these are common newbie problems. I have searched the forums and cant seem to find answers. Please help. Thanks
Moderator Action: Moved to appropriate forum.
 
My first assumption after reading your problem was that you either:

a) in your <Language_en_US> section, in the <Row>s, inside the <Text>, you actually put "LEADER_IRA TXT_KEY_CIV_AMC_DESC", as opposed to just "Ira" or "AMC", or whatever you wanted to have displayed on screen. pretty much, whatever you want to be displayed on screen, you need to put in between the <Text> and </Text>. Either that or...

b) you didnt create a new <Langauge_en_US> section at all.

Now thats what i originally thought you mighta done (which if that was your error and are still confused I/someone else can explain those further). However, when i was working on something just a few minutes ago, all the text was working just fine, but when i changed something, then went back to test it in game, all the text had reverted back to the format of LEADER_IRA TXT_KEY_CIV_AMC_DESC. I went back into my code, and turns out i had just typed a small error. (for me it was i had a random line of <row> that wasnt connected to anything).

so yeah, if its all your text that is messed up, then im guessing that if you go to where you put your new text, then you probably just have some small error, like a random word where its not supposed to be, or something like that.

go look over that and see if you can find anything out of place (if something if red underlined thats a big clue somethings wrong around there). If you cant find it, try posting it here, and maybe someone else can find the error.

good luck!
 
So it will show up like. LEADER_IRA TXT_KEY_CIV_AMC_DESC when you go to choose the Civ.

When you see TXT_KEY entries like that, the usual reason is that there's duplication somewhere. You see, the game can only handle having one definition for each key, so if you've got something like TXT_KEY_CITY_NEW_YORK, but the game already has a key of that name for the American civ, then the mod will break. Specifically, it'll ignore the entire contents of the file in which the duplicate entry appears, which, depending on how you've structured your mod, could either be relatively minor or completely game-breaking.
This comes up all the time with custom civs, especially for people with many DLCs, because the chances of your custom civ's city names overlapping with an existing civ become very high if you're not careful. The usual way to prevent this is to add some unique modifier to your mod's text keys. Something like TXT_KEY_CITY_SPATZ_NEW_YORK, to ensure that no other mod would ever conflict even if it had the same city name. (There's no uniqueness requirement for the keys' VALUES, so you can have two cities named "New York" without a conflict, even if they used two different keys to get to that point.)

However, if you're seeing something like "LEADER_IRA", with no TXT_KEY before it, then that's a totally different issue, and probably means you screwed up something in your XML. All text keys MUST start with "TXT_KEY_", no exceptions, and a Type variable (the only things that'll have names like "LEADER_IRA") should never be visible to the player. But figuring out this would require being able to see your actual code, or at the very least see your logfiles. (You DID turn on logging, didn't you? That's the very first thing you should be checking when you have an issue, before coming to this board.)
 
Back
Top Bottom