Completely confused N00b! Super simple mod not working!?

kamex

Emperor
Joined
Sep 13, 2008
Messages
1,272
Location
UK
Can somebody please help me with this. I've started playing with the mod tools today. all i want to do is to rename the Colosseum building and change some text entries in the civlopedia.

Using modbuddy, started a new project, and added the following file:

Spoiler :
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 4/23/2011 11:06:16 PM -->
<GameData>
<!-- TODO: Insert table creation example here. -->

<!-- TODO: Insert table data example here.-->

<!-- Enter your Game Data here. -->

<Language_en_US>

<Row Tag="TXT_KEY_BUILDING_COLOSSEUM_STRATEGY">
<Text>The Amphitheatre increases a civilization's [ICON_HAPPINESS_1] Happiness. It cannot provide more Happiness than there are [ICON_CITIZEN] Citizens in a city.</Text>
</Row>

<Row Tag="TXT_KEY_BUILDING_CIRCUS_MAXIMUS_STRATEGY">
<Text>This National Wonder increases [ICON_HAPPINESS_1] Happiness in the empire by 5. It also provides +1 culture. A civilization must have an Amphitheatre in all cities before it can construct a Circus Maximus.</Text>
</Row>

<Row Tag="TXT_KEY_BUILDING_THEATRE_PEDIA">
<Text>The Greeks invented theatre as is known in the West today. The original theatres were open-air amphitheatres often constructed on the side of a hill. The audience sat on benches cut into the hill, while the performers worked on an open stage at the foot of the hill. Over time the stages moved indoors (especially in locations with risks of lots of inclement weather). A modern theatre still has a stage and seats for the audience, but it also includes sophisticated sound and lighting equipment, an orchestra pit, and an extensive backstage area for props and scenery. Still, an ancient theatre-goer would not be totally surprised by anything found within a modern theatre (except possibly the cost of the food and drinks sold during intermission). </Text>
</Row>

<Row Tag="TXT_KEY_BUILDING_THEATRE_STRATEGY">
<Text>A Theatre increases the happiness of the entire civilization (not just of the city in which it is constructed). The city must possess an Amphitheatre before the Theatre can be constructed. </Text>
</Row>

<Row Tag="TXT_KEY_CITIES_ANNEXINGCITY_HEADING3_BODY">
<Text>
If you annex the city, you make it a part of your empire. You have total control over the city, just as if you had constructed the city yourself. The one downside to annexation is that doing so makes your citizens very unhappy, and you will be required to construct happiness-related buildings like amphitheatress or connect up to luxury resources to counteract their extreme displeasure. Annexing too many cities too rapidly can bring your empire to a grinding halt.

</Text>
</Row>


<Row Tag="TXT_KEY_CIV5_BUILDINGS_COLISEUM_HEADING">
<Text>Amphitheatre</Text>
</Row>

<Row Tag="TXT_KEY_CIV5_BUILDINGS_COLISEUM_TEXT">
<Text>An amphitheatre is an outdoor venue where the public can watch sports events. Depending upon the time and place, the events might be gladiatorial contests, American football games, or soccer matches. Of the three contests mentioned, the gladiatorial battles were perhaps the hardest on the players involved, the soccer matches (occasionally) just about as dangerous for the participants.</Text>
</Row>

<Row Tag="TXT_KEY_CIV5_BUILDINGS_STADIUM_TEXT">
<Text>A stadium is a modern version of an amphitheatre, probably with a better selection of snacks. Modern stadiums hold upwards of 100,000 screaming fans watching a sports event, concert, or perhaps a political rally. Modern sports enthusiasts are not noticeably more sedate than their Classical Age ancestors, and today's stadiums come equipped with fences, guard rails, and loads of security guards for rampaging fans.</Text>
</Row>

<Row Tag="TXT_KEY_HAPPINESS_CAUSES_HEADING2_BODY">
<Text>
The following increase your population's happiness:[NEWLINE][NEWLINE]Natural Wonders: Each Natural Wonder you discover permanently increases your civilization's happiness.[NEWLINE][NEWLINE]Luxury Resources: Improve resources within your territory or trade for them with other civs. Each kind of resource improves your population's happiness (but you don't get extra happiness for having multiple copies of a single luxury).[NEWLINE][NEWLINE]Buildings: Certain buildings increase your population's happiness. These include the Amphitheatre, the Circus, the Theatre, and others. Each building constructed anywhere in your civ increases your overall happiness (so two Amphitheatress produce twice as much happiness as one, unlike Luxuries).[NEWLINE][NEWLINE]Wonders: Certain wonders like Notre Dame and the Hanging Gardens can give you a big boost in happiness.[NEWLINE][NEWLINE]Social Policies: Policies from the Piety branch provide a lot of happiness, as do a few policies in other branches.[NEWLINE][NEWLINE]Technologies: Technologies in themselves don't provide happiness, but they do unlock the buildings, wonders, resources and social policies which do.
</Text>
</Row>

<Row Tag="TXT_KEY_TECH_CONSTRUCTION_HELP">
<Text>Allows Workers to construct [COLOR_POSITIVE_TEXT]Lumbermills[ENDCOLOR] on forested map tiles, increasing their [ICON_PRODUCTION] Production. Also allows you to build the [COLOR_POSITIVE_TEXT]Amphitheatre[ENDCOLOR], which improves [ICON_HAPPINESS_1] Happiness in the empire, which in turn helps your city growth and makes [ICON_GOLDEN_AGE] Golden Ages more likely.</Text>
</Row>

<Row Tag="TXT_KEY_BUILDING_COLOSSEUM_STRATEGY">
<Text>The Amphitheatre increases a civilization's [ICON_HAPPINESS_1] Happiness. It cannot provide more Happiness than there are [ICON_CITIZEN] Citizens in a city.</Text>
</Row>

<Row Tag="TXT_KEY_BUILDING_CIRCUS_MAXIMUS_STRATEGY">
<Text>This National Wonder increases [ICON_HAPPINESS_1] Happiness in the empire by 5. It also provides +1 culture. A civilization must have an Amphitheatre in all cities before it can construct a Circus Maximus.</Text>
</Row>

<Row Tag="TXT_KEY_BUILDING_THEATRE_PEDIA">
<Text>The Greeks invented theatre as is known in the West today. The original theatres were open-air amphitheatres often constructed on the side of a hill. The audience sat on benches cut into the hill, while the performers worked on an open stage at the foot of the hill. Over time the stages moved indoors (especially in locations with risks of lots of inclement weather). A modern theatre still has a stage and seats for the audience, but it also includes sophisticated sound and lighting equipment, an orchestra pit, and an extensive backstage area for props and scenery. Still, an ancient theatre-goer would not be totally surprised by anything found within a modern theatre (except possibly the cost of the food and drinks sold during intermission). </Text>
</Row>

<Row Tag="TXT_KEY_BUILDING_THEATRE_STRATEGY">
<Text>A Theatre increases the happiness of the entire civilization (not just of the city in which it is constructed). The city must possess an Amphitheatre before the Theatre can be constructed. </Text>
</Row>

<Row Tag="TXT_KEY_CITIES_ANNEXINGCITY_HEADING3_BODY">
<Text>
If you annex the city, you make it a part of your empire. You have total control over the city, just as if you had constructed the city yourself. The one downside to annexation is that doing so makes your citizens very unhappy, and you will be required to construct happiness-related buildings like amphitheatress or connect up to luxury resources to counteract their extreme displeasure. Annexing too many cities too rapidly can bring your empire to a grinding halt.

</Text>
</Row>

<Row Tag="TXT_KEY_CIV5_BUILDINGS_COLISEUM_HEADING">
<Text>Amphitheatre</Text>
</Row>

<Row Tag="TXT_KEY_CIV5_BUILDINGS_COLISEUM_TEXT">
<Text>An amphitheatre is an outdoor venue where the public can watch sports events. Depending upon the time and place, the events might be gladiatorial contests, American football games, or soccer matches. Of the three contests mentioned, the gladiatorial battles were perhaps the hardest on the players involved, the soccer matches (occasionally) just about as dangerous for the participants.</Text>
</Row>

<Row Tag="TXT_KEY_CIV5_BUILDINGS_STADIUM_TEXT">
<Text>A stadium is a modern version of an amphitheatre, probably with a better selection of snacks. Modern stadiums hold upwards of 100,000 screaming fans watching a sports event, concert, or perhaps a political rally. Modern sports enthusiasts are not noticeably more sedate than their Classical Age ancestors, and today's stadiums come equipped with fences, guard rails, and loads of security guards for rampaging fans.</Text>
</Row>

<Row Tag="TXT_KEY_HAPPINESS_CAUSES_HEADING2_BODY">
<Text>
The following increase your population's happiness:[NEWLINE][NEWLINE]Natural Wonders: Each Natural Wonder you discover permanently increases your civilization's happiness.[NEWLINE][NEWLINE]Luxury Resources: Improve resources within your territory or trade for them with other civs. Each kind of resource improves your population's happiness (but you don't get extra happiness for having multiple copies of a single luxury).[NEWLINE][NEWLINE]Buildings: Certain buildings increase your population's happiness. These include the Amphitheatre, the Circus, the Theatre, and others. Each building constructed anywhere in your civ increases your overall happiness (so two Amphitheatress produce twice as much happiness as one, unlike Luxuries).[NEWLINE][NEWLINE]Wonders: Certain wonders like Notre Dame and the Hanging Gardens can give you a big boost in happiness.[NEWLINE][NEWLINE]Social Policies: Policies from the Piety branch provide a lot of happiness, as do a few policies in other branches.[NEWLINE][NEWLINE]Technologies: Technologies in themselves don't provide happiness, but they do unlock the buildings, wonders, resources and social policies which do.
</Text>
</Row>

<Row Tag="TXT_KEY_TECH_CONSTRUCTION_HELP">
<Text>Allows Workers to construct [COLOR_POSITIVE_TEXT]Lumbermills[ENDCOLOR] on forested map tiles, increasing their [ICON_PRODUCTION] Production. Also allows you to build the [COLOR_POSITIVE_TEXT]Amphitheatre[ENDCOLOR], which improves [ICON_HAPPINESS_1] Happiness in the empire, which in turn helps your city growth and makes [ICON_GOLDEN_AGE] Golden Ages more likely.</Text>
</Row>

</Language_en_US>


</GameData>


I have added the file Actions list in the mod properties, and built the mod and activated it in game! There is no difference in the civlopedia though. Somethings not quite right. Could somebody please explains where I'm going wrong?

Thanks :)
 
Just tried:

Spoiler :
<Update>
<Where Tag="TXT_KEY_BUILDING_COLOSSEUM_STRATEGY"/>
<Set Text="The Amphitheatre increases a civilization's [ICON_HAPPINESS_1] Happiness. It cannot provide more Happiness than there are [ICON_CITIZEN] Citizens in a city."/>
</Update>



Still not working! :(
 
Just tried:

Spoiler :
<Update>
<Where Tag="TXT_KEY_BUILDING_COLOSSEUM_STRATEGY"/>
<Set Text="The Amphitheatre increases a civilization's [ICON_HAPPINESS_1] Happiness. It cannot provide more Happiness than there are [ICON_CITIZEN] Citizens in a city."/>
</Update>



Still not working! :(

This code is correct - you either have the wrong info in the Actions Tab or you're adding stuff before or after this line of code that's incorrect and causing the changes to not show up in-game. Just one incorrect line anywhere will cause the entire block of code to not trigger.

Have you set the Actions Tab to be OnModActivated/UpdateDatabase/YourFileNameGoesHere ?
 
Two things.

1> If you're editing an existing tag, you can't use the <Row> syntax. You need to use the <Update> one instead, and that's declared a little differently, like you had in your second post. So all of the modified entries need to be changed that way.

2> If you have an error ANYWHERE in the file, then the whole thing won't load. It's not a piecemeal thing. So the error could be in any one of those declarations, and it'd cause all of them to stop working. (And this brings us back to #1.)

I'm also assuming that you set up the OnModActivated/UpdateDatabase correctly. You said that you'd added it in the Actions tab, but that doesn't tell me whether you added it correctly.
 
This code is correct - you either have the wrong info in the Actions Tab or you're adding stuff before or after this line of code that's incorrect and causing the changes to not show up in-game. Just one incorrect line anywhere will cause the entire block of code to not trigger.

Have you set the Actions Tab to be OnModActivated/UpdateDatabase/YourFileNameGoesHere ?

Two things.

1> If you're editing an existing tag, you can't use the <Row> syntax. You need to use the <Update> one instead, and that's declared a little differently, like you had in your second post. So all of the modified entries need to be changed that way.

2> If you have an error ANYWHERE in the file, then the whole thing won't load. It's not a piecemeal thing. So the error could be in any one of those declarations, and it'd cause all of them to stop working. (And this brings us back to #1.)

I'm also assuming that you set up the OnModActivated/UpdateDatabase correctly. You said that you'd added it in the Actions tab, but that doesn't tell me whether you added it correctly.

Thanks for the swift replies guys! Yeah, the Actions tab is definitely correct as you both described. At the moment, I've only used <Update> once so far n the file as seen in the second file. I'm sure if I do that for the rest of the entries, it will work (but will just take ages) :) ;)

I'll continue work tomorrow guys, its 1.00am here in the UK and i'm shattered! lol :lol:

Thanks for helping me learn the basics. i used to mod in Civ IV, where the new file completely overwrote the base file. It seems in CiV the old files are always refered to unless you specifically update or delete them. Seems cool but will take getting used to. :goodjob:
 
I'm sure if I do that for the rest of the entries, it will work (but will just take ages)

This is part of why it's a good idea to split updates into multiple files. You'll notice that in the vanilla game's XML, the text keys are put into a number of files. If you're editing a lot for your own mod, it's useful to follow a similar pattern. Or at least test it after the first few changes before putting in any more.

It seems in CiV the old files are always refered to unless you specifically update or delete them.

Only for GameData XML/SQL modifications. Other types of XML (like UI definitions, or the XML used to define the animations or 3D models used for a unit), or Lua files, replace the originals in their entirety. There, you get into the VFS flagging, and don't use the OnModActivated syntax.
 
Back
Top Bottom