Modding Problems

Matress_of_evil

Chieftain
Joined
Nov 15, 2005
Messages
90
Location
South Wales
Hi all, i'm having a go at modding Civilization: Beyond Earth, but i'm encountering some real problems that i'm scratching my head over.

I've made some basic mods for Civ 2, 3, and 4 before, so I tried creating a mod folder and i've edited some files and put them into that folder as i've always done. My mod shows in the list of mods, so I enable it...and it has no effect. The game works, it's just it plays vanilla. No matter what I change, my mods have no apparent effect on the game.

My mod is a simple mod that increases the yields of various terrain types, eg. Grass produces extra food, Plain produces extra production, and Desert produces extra energy. I've also made tweaks to some of the techs, buildings, and improvements for similar bonuses.

I've read somewhere that mods need to be made in a program called "ModBuddy". I've not heard of it before but i've downloaded it on Steam and i've used it to recreate my mod. Except the Build Solution option fails. I keep getting an error message saying "The CivBE Path must be defined. Use the project properties window to set it to the location where Civlization Beyond Earth is installed." (The typo in the message is part of the message)

I've right-clicked the solution and gone to the properties and tried setting the game source folder, but its telling me "The following directories were found in the 'Directories containing source code:' list that do not exist:"

There were two folders already set there and they linked to the program folders that the ModBuddy SDK is based in. I've tried setting it to the Beyond Earth folder, as well as various subfolders within it, but the same error message keeps coming up.

Anyone have any ideas what is wrong? None of the tutorials i've found cover this error message.

For reference, the location that i've got Beyond Earth installed to is:
E:\Program Files (X86)\Steam\SteamApps\common\Sid Meier's Civilization Beyond Earth

Edit: never mind, I found a solution myself now. The search facility yielded no results but someone else had the same problem and a solution was posted.
 
Whoops, thanks for moving my thread, moderator.

Anyways, after solving the error message problem in modBuddy, i'm still having no luck with my mod. No matter what I change in the xml files, my mod seems to have absolutely no impact on the game.

I've tried making small changes to the resource yields, and i've tried making massive changes as well to make them stand out. It simply doesn't work.

Grass constantly produces 2 food. I want it to produce 3 food. Or 20. I don't care about the numbers at the moment, I just want to be able to change the figures. And not just for Grass, but for Plains, Desert, etc. And the amounts for buildings and improvements. But my mod just isn't working. ModBuddy isn't throwing up any errors, it says my mod is fine. So what am I doing wrong?

I've attached my mod folder in case anyone is willing to have a look. It's only 17kb, made up of seven files; three .xml, one .modinfo, one .civbesuo, one .civbesln, and one .civbeproj.

Thanks for your help in advance.
 

Attachments

Enable logging (see the first link in my sig), and check the logs

Code:
[5705.533] no such table: Terrain_PlainYieldChanges
[5705.533] In Query - UPDATE Terrain_PlainYieldChanges SET "Yield" = ? WHERE "TerrainType" = ? AND "YieldType" = ?;
[5705.533] Database::XMLSerializer (XML/CivBETerrains_Updates.xml): There was an error executing the update statement! See Database.log for details.
[5705.533] In XMLSerializer while updating table Terrain_PlainYieldChanges from file XML/CivBETerrains_Updates.xml.

And there's no need to attach the ModBuddy project, just the built mod (second link in my sig)
 
Ok, so I enabled logging as you asked, then I copied the logs so i'd have a before and after version to compare and compared them in WinMerge.

Database.log
[165274.931] no such table: Terrain_PlainYieldChanges
[165274.931] In Query - UPDATE Terrain_PlainYieldChanges SET "Yield" = ? WHERE "TerrainType" = ? AND "YieldType" = ?;
[165274.931] Database::XMLSerializer (XML/CivBETerrains_Updates.xml): There was an error executing the update statement! See Database.log for details.
[165274.931] In XMLSerializer while updating table Terrain_PlainYieldChanges from file XML/CivBETerrains_Updates.xml.
[165275.368] Validating Foreign Key Constraints...

Lua.log
This file just seems to be a log of terrain placements from map generation. I couldn't see anything relevant in this file.

Xml.log
The files were virtually identical, except there was a massive chunk of text missing from the end of the log after I enabled my mod. I'm guessing this text was missing because some checks are failing so it's not completing the log or something.


So it looks like my problem is to do with the "no such table: Terrain_PlainYieldChanges" section.

...Any ideas what that means? :confused:
 
So it looks like my problem is to do with the "no such table: Terrain_PlainYieldChanges" section.

...Any ideas what that means? :confused:

If you look in the vanilla game files, in the CivBETerrains.xml file... there is no table called Terrain_PlainYieldChanges.
Since that table does not exist, the game gives an error when the xml in your mod tries to update it.

There's no Terrain_GrassYieldChanges table either, by the way.


The yields for various types of terrain are actualy defined in the Terrain_Yields table, so to change the numbers you need to update those already-existing entries. E.g.

Code:
<Terrain_Yields>
   <Update>
      <Where TerrainType="TERRAIN_GRASS" YieldType="YIELD_FOOD" />
      <Set Yield="5"/>
   </Update>

   <Update>
      <Where TerrainType="TERRAIN_PLAINS" YieldType="YIELD_PRODUCTION" />
      <Set Yield="5"/>
   </Update>

</Terrain_Yields>
 
Ah, that's what i've been doing wrong. Looks like I accidentally duplicated some of the code, and I ended up copying-and-pasting the mistake when I modded the Plains and Deserts.

Thanks for all your help. :goodjob:
 
Back
Top Bottom