[BNW] Marathon Research Times

ZWeakley

Chieftain
Joined
Jul 23, 2018
Messages
3
Having trouble getting a mod to work, not sure what I'm doing wrong. I've made a new project in the Civ 5 SDK/ModBuddy, added the XML file to it, generated a ModInfo file, saved and built everything. Moved it to my MODS folder, it shows up in-game, it runs without issues. But it doesn't actually change any research times or build speeds.

Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 7/23/2018 9:48:29 AM -->
<GameData>
   <GameSpeeds>
       <Update>
           <Where Type="GAMESPEED_MARATHON"/>
           <Set DealDuration="90" />
           <Set GrowthPercent="67" />
           <Set TrainPercent="67" />
           <Set ConstructPercent="67" />
           <Set CreatePercent="67" />
           <Set ResearchPercent="300" />
           <Set GoldPercent="67" />
           <Set GoldGiftMod="125" />
           <Set BuildPercent="67" />
           <Set ImprovementPercent="67" />
           <Set GreatPeoplePercent="67" />
           <Set CulturePercent="67" />
           <Set BarbPercent="67" />
           <Set FeatureProductionPercent="67" />
           <Set UnitDiscoverPercent="67" />
           <Set UnitHurryPercent="67" />
           <Set UnitTradePercent="67" />
           <Set GoldenAgePercent="100" />
           <Set InflationPercent="45" />
           <Set InflationOffset="-60" />
           <Set VictoryDelayPercent="67" />
       </Update>
       <Update>
           <Where Type="GAMESPEED_EPIC"/>
           <Set DealDuration="90" />
           <Set GrowthPercent="67" />
           <Set TrainPercent="67" />
           <Set ConstructPercent="67" />
           <Set CreatePercent="67" />
           <Set ResearchPercent="300" />
           <Set GoldPercent="67" />
           <Set GoldGiftMod="125" />
           <Set BuildPercent="67" />
           <Set ImprovementPercent="67" />
           <Set GreatPeoplePercent="67" />
           <Set CulturePercent="67" />
           <Set BarbPercent="67" />
           <Set FeatureProductionPercent="67" />
           <Set UnitDiscoverPercent="67" />
           <Set UnitHurryPercent="67" />
           <Set UnitTradePercent="67" />
           <Set GoldenAgePercent="100" />
           <Set InflationPercent="45" />
           <Set InflationOffset="-60" />
           <Set VictoryDelayPercent="67" />
       </Update>
       <Update>
           <Where Type="GAMESPEED_STANDARD"/>
           <Set DealDuration="90" />
           <Set GrowthPercent="67" />
           <Set TrainPercent="67" />
           <Set ConstructPercent="67" />
           <Set CreatePercent="67" />
           <Set ResearchPercent="300" />
           <Set GoldPercent="67" />
           <Set GoldGiftMod="125" />
           <Set BuildPercent="67" />
           <Set ImprovementPercent="67" />
           <Set GreatPeoplePercent="67" />
           <Set CulturePercent="67" />
           <Set BarbPercent="67" />
           <Set FeatureProductionPercent="67" />
           <Set UnitDiscoverPercent="67" />
           <Set UnitHurryPercent="67" />
           <Set UnitTradePercent="67" />
           <Set GoldenAgePercent="100" />
           <Set InflationPercent="45" />
           <Set InflationOffset="-60" />
           <Set VictoryDelayPercent="67" />
       </Update>
       <Update>
           <Where Type="GAMESPEED_QUICK"/>
           <Set DealDuration="90" />
           <Set GrowthPercent="67" />
           <Set TrainPercent="67" />
           <Set ConstructPercent="67" />
           <Set CreatePercent="67" />
           <Set ResearchPercent="300" />
           <Set GoldPercent="67" />
           <Set GoldGiftMod="125" />
           <Set BuildPercent="67" />
           <Set ImprovementPercent="67" />
           <Set GreatPeoplePercent="67" />
           <Set CulturePercent="67" />
           <Set BarbPercent="67" />
           <Set FeatureProductionPercent="67" />
           <Set UnitDiscoverPercent="67" />
           <Set UnitHurryPercent="67" />
           <Set UnitTradePercent="67" />
           <Set GoldenAgePercent="100" />
           <Set InflationPercent="45" />
           <Set InflationOffset="-60" />
           <Set VictoryDelayPercent="67" />
       </Update>
   </GameSpeeds>
</GameData>
 
Have you set your files to update database on load in your project's properties?
If not, then the game has no idea what to do with those.
 
Have you set your files to update database on load in your project's properties?
If not, then the game has no idea what to do with those.

I hadn't, but I just tried that and same result... unless I'm doing it wrong. Went to the third tab in project properties, added OnModLoad, Update Database.
 
Code:
<Set DealDuration="90" />
<Set GrowthPercent="67" />

...doesn't work, you can only have one "Set" per Update.

The proper way to do it:

Code:
<Set DealDuration="90"
     GrowthPercent="67" />

It's very easy to find such issues by looking at the logs, so you should read a guide on how to do that.
 
then debugging time begins for you ;]

- first check whether that entry is indeed in your mod's .modinfo file
- delete all log files from Civ5\Logs folder in your documents
- enable logging as instructed here
- start the game, and enable only your mod, and continue to civ game's setup screen
- then alt+tab out of the ghame, and inspect xml.log and database.log files - if there will be errors related to your mod, then fix it.
 
Ah, thanks much Ryika! That was the problem. I would have done more reading, but I have no intentions of getting deep into Civ 5 modding. I pretty much just wanted to make this one simple mod and get out, figured I could do it by just changing a text file, but there was a lot more to it!
 
Good to know. I smelled something fishy over there ;] but wasn't sure as xml not my stuff.

I usually do this in SQL, a bit more readable:
Code:
UPDATE GameSpeeds SET
    DealDuration = 90,
    GrowthPercent = 67,
    TrainPercent = 67,
    ConstructPercent = 67,
    CreatePercent = 67,
    ResearchPercent = 300,
    GoldPercent = 67,
    GoldGiftMod = 125,
    BuildPercent = 67,
    ImprovementPercent = 67,
    GreatPeoplePercent = 67,
    CulturePercent = 67,
    BarbPercent = 67,
    FeatureProductionPercent = 67,
    UnitDiscoverPercent = 67,
    UnitHurryPercent = 67,
    UnitTradePercent = 67,
    GoldenAgePercent = 100,
    InflationPercent = 45,
    InflationOffset = -60,
    VictoryDelayPercent = 67
WHERE Type = 'GAMESPEED_MARATHON';



figured I could do it by just changing a text file, but there was a lot more to it!

That's because the game does not use any text files for direct configuration. All xml files are parsed by the game's engine, and converted to SQL queries which insert the values into game's database, and then the game uses those values from DB for setting everything later.
 
Last edited:
Top Bottom