[BTS] Super Basic Mod Help

Maestro_3295

Chieftain
Joined
Nov 13, 2005
Messages
16
After years and years, I've come back to Civ 4, and this time, Ima take a crack at modding. So, I do some research, and dig into some stuff, and I figure I start small.

I want to change the resource value of a bonus.

I go to C:\Program Files (x86)\Steam\steamapps\common\Sid Meier's Civilization IV Beyond the Sword\Assets\XML\Terrain\CIV4BonusInfos.xml

navigate to Wheat, change yeild from 1 to 10, save, close fire up civ4, new game, world editor, place wheat and...no change to yield.

What'd I miss???
 
What'd I miss???
Steam. It's possible that it detected a corrupted file and fixed it.

What you should do is to create a folder called Mods next to Colonization.exe. In that folder you can make your own mod as a folder (call it whatever you want) and inside there you can place files, which will be loaded instead of the vanilla files. Ideally you should never edit the vanilla files.

Code:
Assets\XML\Terrain\CIV4BonusInfos.xml
Mods\MyMod\Assets\XML\Terrain\CIV4BonusInfos.xml
Do this and you will have a mod called MyMod you can load in the game. Once loaded it will use the modded copy of the file. If you edit that file, then the changes should affect the game.
 
[...]
C:\Program Files (x86)\Steam\steamapps\common\Sid Meier's Civilization IV Beyond the Sword\Assets\XML\Terrain\CIV4BonusInfos.xml
[...]
I think you've modified the base game version of Civ4BonusInfos.xml. Those files are only loaded if none of the expansions have their own copy. With Steam, the BtS expansion is – confusingly – in Sid Meier's Civilization IV Beyond the Sword\Beyond the Sword
BtS does not have a copy of Civ4BonusInfos.xml, but Warlords does, so the file to work from is in the Warlords folder. (I don't have the Steam version myself; this is just based on what I've read about it – and based on not having Civ4BonusInfo.xml in my own BtS folder.)

I don't think it's an awful idea, for a quick initial test, to modify an original file, but, then, I wasn't aware that Steam might silently roll such changes back; in that case, I guess, it's really best to only work with a mod or with CustomAssets. (Not sure where that folder is with the Steam version; I have it under My Games.) Though a mod can also be loaded automatically through the Steam launch options (if that info is still up to date); so CustomAssets isn't the only way to load modified files automatically.
What you should do is to create a folder called Mods next to Colonization.exe. [...]
Which is to say: next to Civ4BeyondSword.exe :)
 
Steam. It's possible that it detected a corrupted file and fixed it.

What you should do is to create a folder called Mods next to Colonization.exe. In that folder you can make your own mod as a folder (call it whatever you want) and inside there you can place files, which will be loaded instead of the vanilla files. Ideally you should never edit the vanilla files.

Code:
Assets\XML\Terrain\CIV4BonusInfos.xml
Mods\MyMod\Assets\XML\Terrain\CIV4BonusInfos.xml
Do this and you will have a mod called MyMod you can load in the game. Once loaded it will use the modded copy of the file. If you edit that file, then the changes should affect the game.
I created a mod folder.

At first I copied the whole assets folder from BtS in. That pissed the game off when I tried to load my mod. Then I copied just the terrain xml files, and added in the bonusinfos file from the base game. It didn't like that either. Some sort of schema error. As a hail mary, I copied in the bonusinfos file from another mod, Rhye's and Fall of Civilization, then deleted the Rhye's information from the file, and that...worked??? Go figure. Then went in and tested a yield value, and yep, we're golden.
 
I think you've modified the base game version of Civ4BonusInfos.xml. Those files are only loaded if none of the expansions have their own copy. With Steam, the BtS expansion is – confusingly – in Sid Meier's Civilization IV Beyond the Sword\Beyond the Sword
BtS does not have a copy of Civ4BonusInfos.xml, but Warlords does, so the file to work from is in the Warlords folder. (I don't have the Steam version myself; this is just based on what I've read about it – and based on not having Civ4BonusInfo.xml in my own BtS folder.)

I don't think it's an awful idea, for a quick initial test, to modify an original file, but, then, I wasn't aware that Steam might silently roll such changes back; in that case, I guess, it's really best to only work with a mod or with CustomAssets. (Not sure where that folder is with the Steam version; I have it under My Games.) Though a mod can also be loaded automatically through the Steam launch options (if that info is still up to date); so CustomAssets isn't the only way to load modified files automatically.
Which is to say: next to Civ4BeyondSword.exe :)
I think you may have uncovered what was wrong with my original experiment. The Warlords info was overwriting my info. Furthermore, I think there was some sort of schema change between the base game and Warlords, because the original xml file caused errors, even when unchanged. I found a workaround without this information (see my other reply), but I think this was the root issue. Steam des verify integrity of files, but for this game at least, it appears to be only upon user request, so I don't think that was a problem.
 
Top Bottom