Am I losing my mind

NerdChieftain

Chieftain
Joined
Oct 20, 2010
Messages
12
So, I decided to try an ambitious little project... redesigning the Tech Tree.

There are some good mods out there to steal/borrow/learn from... AHEM.

So everything is going swell. I type up a frenzy... and yeah my MOD is ready to load. I find that all my new techs in the game have the TXT_KEY_TECH_{TECHNAME}_{ITEM} text for the values of the tech title, etc, instead of the strings they refer to.

I swear I copied the other mods as best I could... :blush:

It occurs to me that if the new Techs were loaded before the TXT_KEY were defined, the system might assume the TXT_KEY... is the intended text and then never load the value. But how would I accommodate for that in actions? Ironically, the project file is not included when I download someone else's mod... at least I can't find it.

Hopelessly Stuck,
NerdChieftain
 

Attachments

:confused: XML files do not work that way. So long as the TXT_KEY value exists in the database, that is what will be displayed. The game doesn't replace the TXT_KEYs with their value in the actual asset definition, it does it as and when the TXT_KEYs need to be displayed.

Moderator Action: ....and removing moderator tags is also an infractible action!
 
Moderator Action: *snip* and answering in that way is also not appropriate. Report posts, if you have a problem with them.
 
No, he's right on both counts. That's definitely not what "irony" means, and XML files don't load that way.

I can't look at your files themselves, since I'm at work (taking a break), but if it's not figured out within the next couple hours I can look at it when I get home.
 
I'm taking a look at it now... A few problems are present.
1. numbers can't be the first thing in file names.
2. it's easier if you sort the different parts of any XML ideal in one file, but not necessary.
3. in your XML files, there are some excess tabs that might throw it off, I'm not sure if it actually will for XML, but it might throw it off.
4. touching back on #2, there are a few parts that need to be in the same file and a few parts that are optional. Take a look at the technologies xml in the Assets/Gameplay/XML/Technologies
 
Yes Yes... Irony is a literary device and to apply it to one's life is a technical misnomer, although it is accepted in casual American English Lexicon. One can construct a metaphor of one's life, in this case a debugging exercise, as having a plot... at least I thought it was unexpected the project file isn't there. But I digress.

Thanks for the help.

I have been able to open the My Games\Sid Meier's Civilization V\Civ5DebugDatabase.db and Civ5ModsDatabase.db, although this seems to just confirm what I already now. The UpdateDatabase call is registered, but I don't see changes reflected. That would seem to indicate my syntax is wrong.... :(
 
Civ Fuehrer,

Those are some great suggestions. Renaming the files without numbers and removing extra tabs did not change the final result.

I have separated my files out to help me when debugging.. they are easier to turn ON and OFF that way. Thanks for the tip.

Thank you for help.
 
Can you post a screen shot of the error?

Took a quick look at your mod info file, Tech_Text_Keys_EN_US.xml is listed twice in the Actions tab of your mod properties.
 
Two screenshots are included below.

Also note that the tech prerequisites didn't load. I want to handle this one problem at a time, but it is noteworthy as it may be related.

Also, yes, I had added a second reference to the XML in the actions to try and get a different result... it had no impact. At any rate, here is the new project, cleaned up a bit. Instead of the text the TXT_KEY refers to, the fields say "TXT_KEY_...." instead.

Just to double check:
After I build the mod, all I have to do is copy it from ModBuddy directory into the Mods directory, load Civ5, goto Mods, hit the install button, select the Mod, and try it out, right?

I'd be curious to see if you get the same error on your system.

Thanks again
 

Attachments

  • TechTree.jpg
    TechTree.jpg
    121.1 KB · Views: 92
  • Civopedia.jpg
    Civopedia.jpg
    141.5 KB · Views: 84
  • Nerdchieftain's Eras and Techs.zip
    Nerdchieftain's Eras and Techs.zip
    83.8 KB · Views: 45
Seeing my own mods, I'd have to say to add the new tech text entries to the beginning of the newTech.xml and everything else not working about the new Techs after the main tech entries within newTech.xml.
The type bodies should go like this:
Code:
<GameData>
	<Language_en_US>
		<Row Tag="TXT_KEY_TECH_NAME">
			<Text>Name</Text>
		</Row>
		<Row Tag="TXT_KEY_TECH_OTHER_STUFF_LIKE_DESC_OR_ETC">
			<Text>Description or etc</Text>
		</Row>
	</Language_en_US>
	<Technologies>
		<Row>
			<Type>TECH_NAME</Type>
			<Cost>22</Cost>
			<Description>TXT_KEY_TECH_NAME</Description>
			<Civilopedia>TXT_KEY_TECH_NAME_DESC</Civilopedia>
			<Help>TXT_KEY_TECH_NAME_HELP</Help>
			<Era>ERA_WHATEVER_ERA</Era>
			(skipping a few lines)
		</Row>
	</Technologies>
	<Technology_Flavors>
		<Row>
			<TechType>TECH_NAME</TechType>
			<FlavorType>FLAVOR_SOMETHING</FlavorType>(the reason why the AI should research this)
			<Flavor>5</Flavor>(how important it should be to the AI)
		</Row>
	</Technology_Flavors>
	<Technology_PrereqTechs>
		<Row>
			<TechType>TECH_NAME</TechType>
			<PrereqTech>TECH_OTHER_TECH_NAME</PrereqTech>
		</Row>
	</Technology_PrereqTechs>
</GameData>
 
I have figured out at least in part what has been happening.

I normally delete my old compiled Mod version from the Mods directory, then copy the newly compiled mod over. I made some very small changes, such as the cost of a research tech.... and I found the changes aren't updating.

When I totally renamed the Mod, I got different results.

So now I need to figure out a new procedure for testing a newly compiled Mod version with proper updating and I think I may be in business...

Has anyone heard of such a thing?

-NerdChieftain
 
Back
Top Bottom