Text Not Working...

Aidence

The Archduke
Joined
Nov 23, 2013
Messages
224
Hey, so I am making a civ and it appears in game but the config and maybe the gameplay text doesn't work. I don't know what I'm doing wrong. Here is my code for my config text and .modinfo:
Spoiler :

Code:
<Mod id="8581c405-8a84-42cc-b6bb-a707ce10ba88" version="1">
    <Properties>
        <Name>Kingdom of Jerusalem</Name>
        <Teaser>Adds the Kingdom of Jerusalem as a playable civilization.</Teaser>
        <Description>Adds a whole new civilization to the game that you can play as: the Kingdom of Jerusalem.</Description>
        <Authors>Aidence the Lionheart</Authors>
    </Properties?>
    <Components>
        <LocalizedText id="JERUSALEM_GAMEPLAY_TEXT">
            <Items>
                <File>Text/Jerusalem_ConfigText.xml</File>
                <File>Text/Jerusalem_GameplayText.xml</File>
            </Items>
        </LocalizedText>
    </Components>
    <Settings>
        <Custom id="JERUSALEM_CONFIG_DATA">
            <Items>
                <File>Data/Jerusalem_ConfigData.xml</File>
            </Items>
        </Custom>
    </Settings>
    <Files>
        <File>Data/Jerusalem_ConfigData.xml</File>
        <File>Text/Jerusalem_ConfigText.xml</File>
        <File>Data/Jerusalem_GameplayData.xml</File>
        <File>Text/Jerusalem_GameplayText.xml</File>
    </Files>
</Mod>
Code:
<GameData>
    <BaseGameText>
        <Row Tag="LOC_CIVILIZATION_KINGDOM_OF_JERUSALEM_NAME">
            <Text>Jerusalem</Text>
        </Row>
        <Row Tag="LOC_LEADER_BALDWIN_IV_NAME">
            <Text>Baldwin IV</Text>
        </Row>
        <Row Tag="LOC_TRAIT_CIVILIZATION_CRUSADER_STATE_NAME">
            <Text>Crusader State</Text>
        </Row>
        <Row Tag="LOC_TRAIT_CIVILIZATION_CRUSADER_STATE_DESCRIPTION">
            <Text>Units receive a combat bonus against players following other religions. Additional Military policy slot.</Text>
        </Row>
        <Row Tag="LOC_TRAIT_LEADER_THE_LEPER_KING_NAME">
            <Text>The Leper King</Text>
        </Row>
        <Row Tag="LOC_TRAIT_LEADER_THE_LEPER_KING_DESCRIPTION">
            <Text>Baldwin IV’s units heal up to fifty HP when they eliminate a unit. Builds Encampment and Holy Site districts in half the time.</Text>
        </Row>
        <Row Tag="LOC_TRAIT_LEADER_THE_LEPER_KING_ALT_DESCRIPTION">
            <Text>Baldwin IV’s units heal up to fifty HP when they eliminate a unit. Builds Encampment and Holy Site districts in half the time.</Text>
        </Row>
        <Row Tag="LOC_BUILDING_TEMPLAR_HOUSE_NAME">
            <Text>Templar House</Text>
        </Row>
        <Row Tag="LOC_BUILDING_TEMPLAR_HOUSE_DESCRIPTION">
            <Text>A building unique to Jerusalem. Replaces the Bank and is Available with the Stirrups technology.</Text>
        </Row>
        <Row Tag="LOC_UNIT_CRUSADER_NAME">
            <Text>Crusader</Text>
        </Row>
        <Row Tag="LOC_UNIT_CRUSADER_DESCRIPTION">
            <Text>Jerusalemite unique C era unit. Pushes defending enemy units back from their hex in any battle where they score more damage. Defenders that cannot retreat suffer additional damage.</Text>
        </Row>
    </BaseGameText>
</GameData>
 
Something appears to be missing from your modinfo file. I can't quite put my finger on it because I don't have a functional file in front of me at the moment. I recommend looking at some modinfo files in other mods. I bet you figure it out.

Edit: <Properties?> doesn't need a question mark.
 
You need to include the Text file in both the Components and Settings sections, assuming the text there needs to show up in the menus prior to starting the game. Also it looks like your _GameplayData xml is never run, because its not located in the Components.

Also, delete question mark behind Properties. Going forward, you can use this site to check your XML structure to make sure there are no basic errors: https://www.xmlvalidation.com/

There may be some other errors in here. Take a look at the tutorials section and make sure every tag is correct. I kept trying to compare to an existing mod and wasn't sure all the tags work as designed.


<Mod id="8581c405-8a84-42cc-b6bb-a707ce10ba88" version="1">
<Properties>
<Name>Kingdom of Jerusalem</Name>
<Teaser>Adds the Kingdom of Jerusalem as a playable civilization.</Teaser>
<Description>Adds a whole new civilization to the game that you can play as: the Kingdom of Jerusalem.</Description>
<Authors>Aidence the Lionheart</Authors>
</Properties?>
<Components>
<UpdateDatabase id="JERUSALEM_GAMEPLAY_DATA">
<Items>
<File>Data/Jerusalem_GameplayData.xml</File>
</Items>
</UpdateDatabase>

<LocalizedText id="JERUSALEM_GAMEPLAY_TEXT">
<Items>
<File>Text/Jerusalem_ConfigText.xml</File>
<File>Text/Jerusalem_GameplayText.xml</File>
</Items>
</LocalizedText>
</Components>
<Settings>
<UpdateDatabase id="JERUSALEM_CONFIG_DATA">
<Items>
<File>Data/Jerusalem_ConfigData.xml</File>
</Items>
</UpdateDatabase>
<LocalizedText id="JERUSALEM_CONFIG_TEXT">
<Items>
<File>Text/Jerusalem_ConfigText.xml</File>
<File>Text/Jerusalem_GameplayText.xml</File>
</Items>
</LocalizedText>

</Settings>
<Files>
<File>Data/Jerusalem_ConfigData.xml</File>
<File>Text/Jerusalem_ConfigText.xml</File>
<File>Data/Jerusalem_GameplayData.xml</File>
<File>Text/Jerusalem_GameplayText.xml</File>
</Files>
</Mod>
 
Last edited:
Back
Top Bottom