Help Needed, several mods won't load (including mine)

Trammells_IN

Chieftain
Joined
Jan 27, 2012
Messages
10
Location
Indiana
I apologize if I sound like a complete noob but I have not messed with making custom Civ mods since Civ2 (very different world then).

My problem may or may not be with just my mod (I will explain as I go) so I am going to give information in stages. I have attached two files:

Game Rules1.txt is the xml file. I renamed it from .xml so that it could be attached here.

Goody_Barb_Update (v 1).txt is the modinfo file. Once again, renamed so that it could be attached "as is".

My goals for this mod is to remove the XP cap on experience earnable from barbarians (or at least set it to 210 as I tried to do here) and to open all options for goody huts (ancient ruins) listed in the goody huts xml file created by Firaxis. In addition I want to open all possibilities regardless of difficulty level instead of having some options cut out as difficulty goes up.

It builds fine, goes into the mod folder fine, I can see it under the mod sections, I check the circle for it, but its effects never show up. I have tried the normal mod->single player->start as well as the "advanced setup" and even loading a saved game. I have followed Kael's guide which was mildly sort of helpful (it was more helpful to read through core xml files first, then Kael's guide made a lot more sense), but almost every tutorial/guide I can find is about "adding units", "adding art", "adding civs", which will be great when I get to that point but hasn't helped me where I'm at.

I confess I don't know xml that well nor sql, let alone lua... my programming experience is limited and novice during the age of Turbo C++ but I am trying to progress. I am not sure if I need to update another file as well? If I have tags wrong? Or what...

I tried simplifying it to just trying to update the barbarian xp cap as well, and I set the actions->update database too. I have tried with my file name, the prebuilt filenames (CIV5Handicaps.xml, etc). I tried without putting XML/filename, tried with XML/filename... I am lost...

I appreciate any and all help people can give.

To explain one thing from the beginning: I tried downloading and installing several "space bar" end turn mods, several different barbarian xp cap raisers/removers and none of them work. The only mods I have gotten to work are the "Legendary Earth" and the "Random Start Location" mods... so I know I figured out how to install them and use them ;) Not sure if they were broken or if I am facing a deeper issue with mods so I figured I should give all the info I could.
 

Attachments

First of all, OnModActivated / UpdateDatabase. If you don't know what I mean by that, then that's your problem.

Second, what do your log files say? This is what they're for; ANY error in an XML file invalidates the entire file, so before coming on here you should have made sure no errors were being recorded in your logs.

Third, when you want to attach something, just zip it up first. In this particular case, you can't just give us the XML, we need to see the entire mod package, including the .modinfo file. Without those extras, we can't try running these things on our own machine.
 
Spatzimaus,

I appreciate the quick reply, but did I do something to annoy or offend you? I explained at the top that I was new to this and the "that's your problem" comment was a bit unnecessary and rude.

First: I do know what you mean and, as is visible in the files I attached and as I stated above, the OnModActived/UpdateDatabase was done. I also mentioned trying to have it update different filenames.

Second: I have seen people mention log files, but I do not see any log files under my Mod directory, nor under my ModBuddy directory for the mod. It builds fine but I have no clue where to find the log files to check and I have yet to find a post that says where they'll be (but there are over 32 pages of threads here so I am positive I just missed it along the way).

Third: I will remember that in the future, but as I said above, I included BOTH the xml and modinfo file.
 
To help, here are the zip files asked for.

The first: Goody_Barb_Update.zip is the folder and files from the Mod Buddy directory.

The Second: Goody_Barb_Update (v 1).zip is the folder and files from the My Games\Civ5\Mods directory.

Hope this helps.
 

Attachments

Okay... I feel really stupid for two reasons...

1) Kael's Guide tells you where the log files are and
2) I found them...

I am attaching my log files because there are a couple things that make no sense to me. I reopened Civ5, disabled all but my mod, started a mod game.

Hope someone can see my stupid mistake in the code because the log files didn't help me any.
 

Attachments

as is visible in the files I attached and as I stated above, the OnModActived/UpdateDatabase was done.

The entry in the attached zip of the mod is incorrect

<UpdateDatabase>XML/Game Rules1.xml</UpdateDatabase>

The "Game Rules1.xml" file is not in the XML sub-directory

If you use ModBuddy (and don't create/edit the .modinfo file by hand) this can't happen as the values for this element come from a drop down list of files that are actually in the mod.

With that fixed the mod loads without error, but note that not all goody hut goodies actually work - the reveal resource one is definately broken, and the unit ones are tempermental at best.
 
Whoward69,

I can't thank you enough, once again you managed to find the error. One odd note though: Before I just selected the file through the drop down in Mod Buddy and it wasn't working... I'm thinking I may have accidentally commited the programmer's faux pas though and changed two things at once without realizing it... ugh... regardless, the goody hut portion is working beautifully.

I did note though, however, that the xp cap increase for barbarians does not seem to be working (I still can only earn 2 promotions off barbarians - there is no xp gain after that). If you have any insight into that please drop me a line. In the meantime I am going to try setting it to a lower value first to see if it makes a difference (perhaps 210 is an unrecognized/invalid amount?).

This is definately a frustratingly fun learning experience!
 
Found the problem with the xp earned changes, so I now have a fully functional MOD!

I am going to post the problem and fix here for any other newbies who may get confused by this too.

In the GlobalDefines.xml from Firaxis the area with XP earned (and Barbarian Max XP earnable) values the code looks like this:

<Row Name="BARBARIAN_MAX_XP_VALUE">
<Value>30</Value>
</Row>

The problem for me was that unlike other areas where there is a "one word" part, the "Row Name" part confounded me. I originally tried putting in code like:

<Where Row Name="BARBARIAN_MAX_XP_VALUE"/>

This is incorrect. I also tried "RowName" and then (in the code I posted here to get help for) tried "Type" in Row Name place. ALL of those are INCORRECT. I don't know why but I looked at it again today and it just clicked. "Row" is just the part of the code like <Row>. So the correct (and now working code was):

<Where Name="BARBARIAN_MAX_XP_VALUE"/>

Hopefully this will save someone else a whole lot of frustration.
 
I also tried "RowName" and then (in the code I posted here to get help for)

Never said it would work, just load without error - the two are not the same :) I have enough bugs in my own mods to fix without looking for them in others ;)

BTW, you will want to discover the delights of Fire/LiveTuner, as you can get it to display the values from database while the game is running - in this case a simple

GameDefines.BARBARIAN_MAX_XP_VALUE

in the Lua Console would show you what value the game is using and therefore if your XML is symantically correct (as well as being syntactically valid)

If you don't know the difference between XML elements and attributes, reading the W3C Schools guide would also be a good idea.
 
Thanks Whoward69 for the heads up and directions. I listed you in the "special thanks" portion when I uploaded the Mod. I've bookmarked some sources on Fire Tuner and Lua and will check out the W3C.

As to the reinventing the wheel... I tried every Mod I could find on Mod Hub for raising barbarian XP cap or removing it and not a single one worked. The level 3, 6, and I think the last one was 9? Mods all failed to work. That is the only reason I included that in this first Mod.

Once again, thanks for everything!
 
Thanks Whoward69 for the heads up and directions. I listed you in the "special thanks" portion when I uploaded the Mod. I've bookmarked some sources on Fire Tuner and Lua and will check out the W3C.

As to the reinventing the wheel... I tried every Mod I could find on Mod Hub for raising barbarian XP cap or removing it and not a single one worked. The level 3, 6, and I think the last one was 9? Mods all failed to work. That is the only reason I included that in this first Mod.

Once again, thanks for everything!
 
Back
Top Bottom