I don't understand ... anything.

varus

Prince
Joined
Nov 3, 2005
Messages
130
All I want to do is create a simple mod so I can figure out how this process even works. Right now all I'm trying to do is change the text for Washington's DOM quote, that's it.

Believe it or not, I can't figure out how.

I did read Kael's guide, but I can't figure out how anything works!
I see this entry in the civilizations xml:
Code:
<DawnOfManQuote>TXT_KEY_CIV5_DAWN_UNITEDSTATES_TEXT</DawnOfManQuote>

But what the heck does that mean?? Where is the text itself actually stored? How do you change it?

I figured it would be easy enough to just create a new text "object" and reference that instead, so I tried creating a new little xml file like so:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 10/21/2010 12:20:12 AM -->
<GameData>
	<Language_en_US>
		<Row Tag="NEW_WASH_DOM_TEXT">
			<TEXT>You have succesfully changed washington's display text!</TEXT>
		</Row>

	</Language_en_US>
	
	<Civilizations>

		<Update>
		  <Where Type="CIVILIZATION_AMERICA"></Where>
		  <Set DawnOfManQuote="NEW_WASH_DOM_TEXT" />

		</Update>
	</Civilizations>
	

  
</GameData>

But it seems to have no effect whatsoever. This is very discouraging.
What's worse is that I can't figure out how to trouble shoot. There are so many options that I don't even know exist, how am I supposed to know what I didn't do?

Take ACTIONS for example, in mod properties. Thanks's to Kael's guide I happen to know that the tab exists and that it has to do stuff for the mod to work, but I really have no idea what it should say. There is no list of options for each box, and I have no way to know what I'm supposed to type in there. So I wing it:
action boxes said:
onmodactivated >> updatedatabase >> XML/Game Rules 1.xml

Now that I'm satisfied that I've at least managed to do something I right click my mod and select Build. Then I launch the game, load up the mod (I think?? How can I be sure?) and start a game.

Sure enough, the text on the DOM screen has not changed.

Good grief. I tried this about 6 times in different ways, but I have successfully managed to have zero effect whatsoever.

How in the heck do you guys learn to do this?? How do you know when you have left something out?

How do you find all the crazy files that the game seems to reference but doesn't tell you what they actually are?

Example on point, the first thing I tried to do was change the VOICE file for the DOM quote for washington. I figured replacing an MP3 was easy enough. And sure, if I do it that way it works just fine. But how can you do it in the XML? I mean, what in the heck is this:

Code:
<DawnOfManAudio>AS2D_DOM_SPEECH_UNITED_STATES</DawnOfManAudio>
That says nothing useful (to my eyes)! How does it know which MP3 to play just based on that? How can I refer it to a different one?
 
OK, so even this had no effect:

Code:
<GameData>
	
	<Civilizations>

		<Update>
		  <Where Type="CIVILIZATION_AMERICA" />
		  <Set Playable="False" />

		</Update>
	</Civilizations>
	

  
</GameData>

This tells me there is something wrong with the basics. Maybe I'm not loading the mod correctly, or building it, or I haven't set up the actions correctly, or any number of things. I have no idea what. But if I can't even set a faction to non-playable then I am certainly missing something.

Could anyone help me troubleshoot this?
 
All I want to do is create a simple mod so I can figure out how this process even works. Right now all I'm trying to do is change the text for Washington's DOM quote, that's it.

Believe it or not, I can't figure out how.

I did read Kael's guide, but I can't figure out how anything works!
I see this entry in the civilizations xml:
Code:
<DawnOfManQuote>TXT_KEY_CIV5_DAWN_UNITEDSTATES_TEXT</DawnOfManQuote>

But what the heck does that mean?? Where is the text itself actually stored? How do you change it?

The line of code there that mentions the TXT_KEY... stuff refers to the actual text. It's a bit confusing, but makes sense once you understand it; the <DawnOfManQuote> field is giving you a text "key", or where it is storing the full text. In this case, the key is named ...DAWN_UNITEDSTATES_TEXT. I haven't checked out the file structure of Civ V yet, but in Civ IV, there was a folder in the XML section called "Text" (or something similar?). Anyway, all the actual text stuff was in their.

If that's as clear as mud, here's the simpler version: a text key points to the actual text. If a Civ's is called the "Americans", wherever the Civ is defined, there is a key that points to another .xml file that contains the actual text "Americans". So to edit the actual text, you have to find the OTHER (text) .xml file, search for the key, and then edit the text.

I hope that helps-- I'm not sure how else I could explain it without checking out the file structure (which I don't have handy at the moment, sorry!).

Cheers! :)
 
The line of code there that mentions the TXT_KEY... stuff refers to the actual text. It's a bit confusing, but makes sense once you understand it; the <DawnOfManQuote> field is giving you a text "key", or where it is storing the full text. In this case, the key is named ...DAWN_UNITEDSTATES_TEXT. I haven't checked out the file structure of Civ V yet, but in Civ IV, there was a folder in the XML section called "Text" (or something similar?). Anyway, all the actual text stuff was in their.

If that's as clear as mud, here's the simpler version: a text key points to the actual text. If a Civ's is called the "Americans", wherever the Civ is defined, there is a key that points to another .xml file that contains the actual text "Americans". So to edit the actual text, you have to find the OTHER (text) .xml file, search for the key, and then edit the text.

I hope that helps-- I'm not sure how else I could explain it without checking out the file structure (which I don't have handy at the moment, sorry!).

Cheers! :)


Right on, thanks man. I appreciate your time.
I had actually figured this much on my own. I guessed there was another file somewhere that had the actual text. My problem is that I can't find it and I'm not sure how to look.

However, taking your advice I looked at a folder called /xml/new text and discovered that it was full of text keys just like I was hoping to find.

Step forward!

Now, however, I have new problems:
  1. The particular entry that I am looking for I cannot find (that is the dawn of man quote)
  2. The entries that I DID find are not changing when I try to change them. This is a sign that I am doing something wrong on another level.
  3. Failing my ability to change the text keys that I did see, I tried to simply set the americans to unplayable to see if my mod was even taking hold, and it is not. So that's the threshold issue I need to fix first.

Thank you so much!
 
I was in the same situation as you. I still am, mostly, since I can't do anything fancy. But I have managed to create a mod that adds half a dozen new buildings and four new techs, so I must be doing something right. Here's my advice:

I started by just doing a mod that Kael had done. I followed his steps exactly. That was hard enough, because the guide can be ... murky ... on some key points. But after I got comfortable by making changes he made, I tried extending them. So, I started off by adding the Palisade building, which he does on pages 49-50. After I got that to work, I made new buildings with different features: ones that required nearby resources; or modified science; or modified culture; and so on. That way I got some solid, fun "builds" out of my testing while learning bit by bit what all I needed to do that Kael didn't cover. There is a LOT of stuff in the code that is obscure, like the quote and speech files you were trying to fiddle with. (I can't even figure out how to change the splash image that shows up when a wonder is built, which ought to be easy.) That's why it's better to stick to the stuff that Kael does explain, if all you're trying to do is get your feet wet.

EDIT: Also, if you try matching Kael, you can figure out if the troubles you have loading the mod are with the code you are writing or with Actions, Builds, Loading screens, or other stuff that is going on outside of the actual code. This is one of the few ways, apparently, that will help you narrow down the problems you are having.

I'd also suggest making copies of the original XML files and putting them in folders in your mod, so that you can quickly open them and reference them to see how actual, functioning entries work. For instance, when making buildings, I copied the Buildings.xml file from Civ 5 itself, and a Buildings.xml file from another mod (one that I knew worked). I renamed them (so I'd know what they were) put them into a new folder in my mod called "Reference." (DO NOT ADD ANY OF THOSE "REFERENCE" FILES TO THE ACTION TAB.) When my buildings didn't work as I expected, I could open the reference files up in ModBuddy and quickly compare them to my files to see what I had done wrong.

EDIT X2: I know, none of this is helpful as far as changing a Dawn of Man quote, but if you're trying to change the quote because you think that's an easy thing to change ... um, maybe the lesson is that it is not an easy change to make? ;)
 
The DAWN text key data you are looking for is in the Civ5GameTextInfos_Civilopedia.XML file which is in Assets/Gameplay/XML/NewText/EN-US
 
I noticed something:
You wrote : "onmodactivated / updatedatabase / ..."
You should have written : "OnModActivated / UpdateDatabase / ..."
Capital letters are very important
 
also if you need to find specific things like TXT_KEY_WHATEVER you should try using notepad++ or some other program that can do a find in files function. Makes life much easier. Keep in mind though its CaSe SeNsItIvE.
 
Even Windows allows you to search the file contents within a directory. So you should be a be able to find files within the XML folder that contain a specific string really easily.
 
also if you need to find specific things like TXT_KEY_WHATEVER you should try using notepad++ or some other program that can do a find in files function. Makes life much easier. Keep in mind though its CaSe SeNsItIvE.
Useful, thank you.

Even Windows allows you to search the file contents within a directory. So you should be a be able to find files within the XML folder that contain a specific string really easily.
Also very useful, thanks for the advice. I set windows to index the civ v directory so that i can search through the contents. I will see if that makes things easier. It should.

I noticed something:
You wrote : "onmodactivated / updatedatabase / ..."
You should have written : "OnModActivated / UpdateDatabase / ..."
Capital letters are very important

VERY helpful. I did not know that. It is indeed exactly what most of my problems were coming from.

Now that I have gotten my mods to take effect, things are moving along more nicely. Lots of simple changes are showing up, including some references to text. Thank you VERY much.

The problem I'm having now is how to get my mod to refer to a file (such as an mp3) that I bring into the root mod directory. For example:
Code:
<SoundData>
      <SoundID>SND_DOM_SPEECH_ARABIA</SoundID>
      <Filename>Arabia</Filename>
      <bDontCache/>
      <bOnlyLoadOneVariationEachTime/>
      <LoadType>DYNAMIC_RES</LoadType>
    </SoundData>
somehow the XML "knows" the file path to that file "Arabia." I don't know where it is getting the path from.

When I use an "update" command on this and change the Filename from Arabia to "NewArabia" it doesn't work. The reason is that the mp3 file "NewArabia" isn't in the directory that "Arabia" is in, but I'm not sure how to tell it to look somewhere else.

If anyone happens to know this, I would love them forever for sharing. Until then, I shall continue to try things. My guess is that if I just drop the "NewArabia" file into that directory and try the mod then, it will work. The next logical step would be to either figure out how to make my mod place the mp3 in that directory, or figure out how to get the xml to point somewhere else.
 
Top Bottom