Need some help

Kaxeon

Chieftain
Joined
Jan 4, 2006
Messages
55
I am going to copy and paste my thread from the official boards, as no one over there seems to be able to help me. I hope you guys can:

I have started working on a mod containing a few tweaks to the AI. However, I have a few questions you guys might be able to answer:

In ModBuddy I have created a new project/mod, made a copy of several of the AI XML-files, and imported them to my mod. I have then changed a few values, and would like to load my mod to test it.

When I load my mod, I get a couple of errors in database.log. All of which are similar to these:

[3270.280] Invalid Reference on Civilizations.CivilopediaTag - "TXT_KEY_CIV5_BABYLON" does not exist in Language_en_US

[3270.280] Invalid Reference on Civilizations.Civilopedia - "TXT_KEY_CIV_AMERICA_PEDIA" does not exist in Language_en_US

[3270.295] Invalid Reference on Feature_YieldChanges.FeatureType - "FEATURE_RIVER" does not exist in Features

I have not edited anything that would reference the above, and even if I had, should the game not contain the original XML-files, making invalid references impossible?

So, my questions are as follows:
1) If I make a new version of CIV5TacticalMoves.xml, and add the OnModActivated -> UpdateDatabase -> XML/AI/CIV5TacticalMoves.xml, should my file replace the original?
2) Should every file I do NOT include in the mod, automatically use the original file?
3) The database.log ends with [3270.295] Failed Validation. Does this mean that the mod was not loaded? I should mention, that the game starts just fine, and I am able to play.

Thank you
 
You don't want to siply copy existing game files and modify them. The way modding is set up in Civ 5, most lua/xml mods can be done by creating new files that modify the data used by the game. The xml files are parsed and stored in a sql database, so you can create new xml files to be loaded that replace data from existing game files. It sounds like you will want to convert your changes from being modifications of existing files and instead use the <update> tag.

Kael's guide is a great reference. The forum thread to download it and discuss it is: http://forums.civfanatics.com/showthread.php?t=385009
 
I know about the <update> tag, but I prefer to have the complete picture in my mod. Having all the values right there where I need them.

Are you saying that it ONLY works with <update>? I was under the impression that my XML-file would replace the original file when the mod loads.
 
No, update is simply the best way to do it so that conflicts between mods can be avoided. And in my opinion it makes it easier to track down errors. Unfortunately, my best guess is that you have a malformed tag or value in the changes you made that is corrupting the database values. If you really want to modify the whole files instead of using update, I would try starting with fresh files and making the changes one at a time until the one causing the problem is found, or all of them are made.
 
The funny thing is, it has happened twice. First time I deleted some of the files, tried to load my mod, and there was no problem. I then made new copies of the previously deleted files, edited them again (just changing a few integer values), and I was back where I started with the same database errors.

To me it looks like there is some kind of problem with one of the original files. I doubt that I by accident will have caused the same error twice, when taking into consideration that I have not edited ANY of the stuff mentioned in the log. Either that, or I need to include every single XML-file in the mod to be sure I am not missing some kind of reference.

I have not made up "FEATURE_RIVER". It is a standard reference from the original files, yet the game fails to find it.

Do you know if the mod fails to load with errors like that? The game starts, and I am able to play.
 
I would suggest reading some of the modding guides in the tutorials and reference. You don't want to copy and paste XML files and just place them in your mod and edit them. Doesn't work like that with civ5
 
Back
Top Bottom