View Full Version : Obsoleting a Resource


phungus420
Jan 09, 2008, 04:27 PM
I'm trying to get Horses to go obsolete with industrialism (I've added a few units and it just makes more sense this way, and will stop the AI that teched odly from building knights when they can make armored cars). Anyway it's not in the Tech XML files. Finaly found the references to bonuses going obsolete in the main CIV files, it's under assets/terrain/bonusinfo. Interestingly enough there is not one of these in the Beyond the Sword assets folder.

At first I tried to copy this file to my custom assets folder for beyond the sword with the horse bonus set to obsolete at industrialism. And got your standard screwed up XML code start up (a bunch of flashing error messages). So then I tried to move it to the basic CIV custom assets folder. No errors, which is good, but no effect. Finaly frstrated I just edited the actual assets file in the CIV folder for bonues. Again, no error, but no effect...

WTF? What does this file do if you can't use it to define the values it implies it defines (tech visible, obsolete, etc.) Also How can I set an obsoleting tech (or an availability tech for that matter)?

Cheers to anyone who can help me out here. I tried search, but no dice, tried a bunch of different searches and on google, but couldn't find anything relevant. So I'm really hoping someone else knows how to do this. I'm really surprised the bonusinfo file didn't work, considering it implies it calls these values, but whatever, I'm probably just missing some corresponding change somewhere (or at least hoping so).

Seven05
Jan 09, 2008, 04:43 PM
That's the right file and it goes in your BTS/assets if you want it to work, you just have to find your typo so that it will work next time instead of spitting out all of those error messages :)

phungus420
Jan 09, 2008, 07:24 PM
It's broken then. It says line 25, which line 25 says <iHealth>0<iHealth> And definatly didn't touch no where close to line 25. What it's acting like is that the file is formatted differently for BTS.

Hmmm, I feel like I need to find the actual BTS relevent file. Editing the CIV main assets bonusinfo file has no effect on the game. So where is it pulling this file from for BTS? It's not in the BTS assets/xml/terrain folder, and cutting from the CIV main assets/xml/terrain and posting it in the BTS folder is borked.

Alternatively if I could just see a functional line for one Resource I could probably find out where the original CIV bonusinfo file is conflicting with the BTS change, but I'd rather just find the functional file, and copy and edit that to my customs assets folder.

Seven05
Jan 10, 2008, 01:03 AM
CIV4BonusInfos.xml will be in your Warlords/Assets/XML folder. You still put the modified verion into your BTS custom assets folder (or mod folder in BTS).

And, it if has the following line exactly like you typed it:

<iHealth>0<iHealth>

The error is that it isn't proper syntax, it should be:

<iHealth>0</iHealth>

phungus420
Jan 10, 2008, 01:32 PM
CIV4BonusInfos.xml will be in your Warlords/Assets/XML folder. You still put the modified verion into your BTS custom assets folder (or mod folder in BTS).

Aha! Thanks very much, that did the trick.