Multiple Resources for Text

GravityGames

Chieftain
Joined
Jan 20, 2015
Messages
35
Hello, I know it's possible to do, as the intro messages, the city names and the spy names all use this method, but I can't seem to get it working for the life of me. I've been modding diplomacy responses for a new sponsor, but I can't seem to anything but the first response to load.

I've tried using both TXT_KEY_LEADER_GROM_FIRSTGREETING_% and TXT_KEY_LEADER_GROM_FIRSTGREETING% for the reference to the text, and I've also set the text resources to the numbers with and without the underscores between text. I've also tried starting the numbers for the resources at both 0 and 1. Any tips on what I'm missing?
 
You have the correct associated entry in the <Diplomacy_Responses> table?

And have checked the database.log file for errors?

And have used SqliteSpy (or similar) to check that the database tables have been updated?

If so, sounds like it's time to attach the mod so we can look at the actual code rather than guessing what may be wrong
 
You have the correct associated entry in the <Diplomacy_Responses> table?
Yes.

And have checked the database.log file for errors?
No, how do I do this?

And have used SqliteSpy (or similar) to check that the database tables have been updated?
See previous response.

If you can't tell, I'm a total n00b when it comes to Civ modding. I guess in the meantime, I'll triple check my mod to see if anything is immediately obvious.
 
Are you modeling off of any particular sponsor mod? I know I've gotten multiple first greetings working for my sponsors. I can't remember who I used for an example with mine.

I looked at how the UKSA mod did a couple of things, but I mostly just referenced the originals.
 
Could it be random chance? Why don't you try commenting out the first response and see if the second response loads.

I actually just tried that, and it did load. I doubt it's random chance though, as literally every time the first response would load, and I've had the modded civ be the only one in the game, and I've tried 8 times not counting when I commented out the first response. I guess I'll post more of the code and see if it helps...

Here's the text that's loaded (text removed for spoiler reasons, for those who care, it's a civilization from a game I've been working on, and it's a non-human empire, which is something I've seen requested multiple times, though most people who know me outside of these forums probably know exactly what kind of dialog to expect, based solely on the name of the civilization...):

<Row Language="en_US" Tag="TXT_KEY_LEADER_GROM_FIRSTGREETING_0">
<Text></Text>
</Row>
<Row Language="en_US" Tag="TXT_KEY_LEADER_GROM_FIRSTGREETING_1">
<Text></Text>
</Row>

...and here's how it's referenced:

<Diplomacy_Responses>
<!--First Greeting message-->
<Row>
<ResponseType>DIPLO_MESSAGE_INTRO</ResponseType>
<Response>TXT_KEY_LEADER_GROM_FIRSTGREETING_%</Response>
<LeaderType>LEADER_GROM_EMPIRE</LeaderType>
</Row>
</Diplomacy_Responses>
 
Check database.log, the table holding the text keys doesn't have a Language column, so that XML looks wrong
 
Check database.log, the table holding the text keys doesn't have a Language column, so that XML looks wrong

When I removed the language tab, I got the error message "NO TAGS FOUND for message type DIPLO_MESSAGE_INTRO". Lemme try fiddling with it some more...

EDIT: I still have no clue what I did, but the other message popped up once while testing. Is it just extremely rare for anything other than the first message to be shown?
 
How were you testing it? Were you just loading from a save game or were you starting a new game each time. I do suspect that the message displayed is based off a seeded random number. Often when I continuously load the same save to test something, I get the same message in a row. I've never bothered to examine it more thoroughly however.
 
How were you testing it? Were you just loading from a save game or were you starting a new game each time. I do suspect that the message displayed is based off a seeded random number. Often when I continuously load the same save to test something, I get the same message in a row. I've never bothered to examine it more thoroughly however.

I disabled staggered start and just did new games each time on standard map size with 8 AI, mostly because I was too lazy to set it to massive with max AI. Even now, the first message shows WAY more often, the second usually only appearing two or sometimes three times...
 
If you want further help, you'll need to attach your mod, as whoward69 suggests (or at the very least attach your database.log file).

Your language file should look more like this:
Code:
<GameData>
    <Language_en_US>
        <Row Tag="TXT_KEY_LEADER_GROM_FIRSTGREETING_0">
            <Text></Text>
        </Row>
        <Row Tag="TXT_KEY_LEADER_GROM_FIRSTGREETING_1">
            <Text></Text>
        </Row>
    </Language_en_US>
</GameData>
 
If you want further help, you'll need to attach your mod, as whoward69 suggests (or at the very least attach your database.log file).

Your language file should look more like this:
Code:
<GameData>
    <Language_en_US>
        <Row Tag="TXT_KEY_LEADER_GROM_FIRSTGREETING_0">
            <Text></Text>
        </Row>
        <Row Tag="TXT_KEY_LEADER_GROM_FIRSTGREETING_1">
            <Text></Text>
        </Row>
    </Language_en_US>
</GameData>

Alright, I'll see if that works, or still works... you know what I mean. I'll also check if that's the way official text is defined, as that's typically the best to do, as it allows other modders to easily check the mod and see how things are done. Also, the initial release might be soon, I just have to change all the text and then see if I can change the sponsor image, and if I'm lucky, custom sound files! (I'll worry about the 3d sponsor in a later version...)
 
Back
Top Bottom