Mod modifier not working

JerryZ

Chieftain
Joined
Sep 7, 2018
Messages
12
Hi everyone, this is the first mod I have made, but I'm encountering some difficulties that I could not figure out why. The mod i made is suppose to modify in-game values (in my case food production), but for some strange reasons it failed to work.

and this information is in the .modinfo file

<?xml version="1.0" encoding="utf-8"?>
<Mod id="633e64a9-8818-4d35-b137-401ba6e48b44" version="1">
<Properties>
<Name>Much More Food</Name>
<Description>Much more food for the whole game</Description>
<Teaser>Much more food for the whole game</Teaser>
<Authors>JerryZ</Authors>
<SpecialThanks>Gabe_oz</SpecialThanks>
</Properties>
<FrontEndActions>
<UpdateDatabase id="NewAction">
<File>Base1.xml</File>
</UpdateDatabase>
</FrontEndActions>
<InGameActions>
<UpdateDatabase id="NewAction">
<File priority="1">Base1.xml</File>
</UpdateDatabase>
</InGameActions>
</Mod>
 

Attachments

  1. I see no <Files> section in your modinfo code. This is required, as like this from one of my mods
    Code:
      <Files>
        <File>MyCiv6SQL_Changes.sql</File>
        <File>MyCiv6XMLGameplayChanges.xml</File>
        <File>MyCiv6XMLNewIconDefinitions.xml</File>
        <File>MyCiv6XMLTextChanges.xml</File>
        <File>MyCiv6Changes_Gameplay.lua</File>
        <File>A.lua</File>
      </Files>
    You must place your <Files> section at the same level within the modinfo file as <FrontEndActions> and <InGameActions>. Don't inadvertently place your files section within either the <FrontEndActions> or <InGameActions>.
  2. You do not need nor want the <FrontEndActions> you've specified for your Base1.xml file. All your code within that Base1.xml file is only valid within the <InGameActions> side of the database, and merely causes clog in the Database.log file when attempted from a <FrontEndActions>.
  3. Make sure no other mods are also running which might simply over-write part or all of your code. In such cases the last mod to load its code into the game's InGame Database will be the one to control what yields are used for Improvements, Terrains, Resources, etc.
 
I added the the last few line to modinfo, but it didn't change any values. I tested my mod with rest of mod disabled. Also do you know how to make the civ 6 modboddy to add that code to the file? Because everytime i build the solution that section just dissappears.
Code:
<?xml version="1.0" encoding="utf-8"?>
<Mod id="633e64a9-8818-4d35-b137-401ba6e48b44" version="1">
  <Properties>
    <Name>Much More Food</Name>
    <Description>Much more food for the whole game</Description>
    <Teaser>Much more food for the whole game</Teaser>
    <Authors>JerryZ</Authors>
    <SpecialThanks>Gabe_oz</SpecialThanks>
  </Properties>
  <FrontEndActions>
    <UpdateDatabase id="NewAction">
      <File>Base1.xml</File>
    </UpdateDatabase>
  </FrontEndActions>
  <InGameActions>
    <UpdateDatabase id="NewAction">
      <File priority="1">Base1.xml</File>
    </UpdateDatabase>
  </InGameActions>
  <Files>
    <File>Base1.xml</File>
  </Files>
</Mod>
 
How are you adding Base1.xml to the modbuddy project? Are you using the ModBuddy menus to do so or are you just plopping the file into the Modbuddy project folder?

What if anything is being reported in Database.log related to your file Base1.xml ? What about modding.log ?

Zip the mod's folder as it is from the ~\Documents\My Games\Sid Meier's Civilization VI\Mods folder and attach to a post.
 
I used the ModBuddy menus to created mod and typed the code into the base1.xml.
There is no errors in database.log, but there is a problem in modding.log
here is the error section
Code:
[3074594.334] Applied in-game actions (in order of application):
[3074594.334] No active mods.
[3074594.337] Target in-game actions (in order of application):
[3074594.338] 633e64a9-8818-4d35-b137-401ba6e48b44 (Much More Food)
[3074594.338]  * NewAction (UpdateDatabase)
[3074594.340] Game content needs to change to match target config.
[3074594.340] Performing pre configure processing.
[3074594.350] Unloading Gameplay DLL.
[3074594.357] Reloading Gameplay DLL.
[3074594.360] Localization database unchanged, no rollback needed.
[3074594.360] Rebuilding gameplay database.
[3074594.592] Reverted Gameplay database to its original state.
[3074594.592] Updating gameplay database with embedded GameCore data.
[3074594.607] Updated gameplay database with GameCore data.
[3074594.607] Applying mod components.
[3074594.607] Modding Framework - Applying Components
[3074594.631] Applying Component - NewAction (UpdateDatabase)
[3074594.632] UpdateDatabase - Loading Base1.xml
[3074594.632] Warning: UpdateDatabase - Error Loading XML.
[3074594.656] Modding Framework - Finished Apply Components
[3074594.656] Applied all components of enabled mods.
[3074594.670] Initializing Gameplay DLL.
[3074594.758] Saving a debug version of the gameplay database.
[3074594.844] Performing post configure processing.
[3074595.050] Reloading Tuner states.
[3074595.058] Reloading icons.
[3074595.113] Successfully reconfigured game.
[3074624.118] Modding Framework - Shutting down framework.
[3074624.118] Releasing Modding Framework Services...
[3074624.118] Services released!
[3074624.118] Releasing Modding Framework database queries...
[3074624.118] Queries released!
 

Attachments

Your zipped folder shows no file called "Base1.xml" anywhere within the mod, which is your problem.

When you created this file called "Base1.xml" did you use the Modbuddy menus ?
  1. right-click on the name of the mod in the solution explorer panel
  2. Choose "Add" from the dropdown menu
  3. Choose "New Item"
  4. Select option called "Database(XML)" from the pop-up that occurs when "New Item" is chosen
  5. Give the XML file a different filename from the default suggested name if desired
  6. Complete the file-adding process by clicking the "Add" button in the lower-right corner of the pop-up panel to accept the new file and its filename.
Or did you copy/paste the file into the mod from somewhere else on your computer ?
 
The Mod now work flawlessly. I used the empty template from the default to build my mod, instead of Database and that was the problem. Thanks a lot for the help.
 
Back
Top Bottom