[GS] Adding leader to Rome. No build errors, but also doesn't work

ewindmill

Chieftain
Joined
Apr 14, 2020
Messages
9
Howdy,

I know theres a lot of context needed to debug, but perhaps without that context someone knows the answer to this highlevel question.

I've created a new leader for Rome. When I run `build`, it builds without any errors. When I run the game and go to the mods under 'Additional Content', I can see my mod there. I can confirm that the ID matches as well. But, when I go to start a game and choose my civ, the leader doesn't exist.

Any suggestions to how I could actually get some errors so I can debug this?
 
follow up question: Do I have to include a modinfo file, or is that a legacy thing? I'm seeing what seems to be the same functionality from a .Art.xml file
 
Database.log at
C:\Users\UserName\Documents\My Games\Sid Meier's Civilization VI\Logs
Modbuddy does not report errors related to code syntax when you conduct the "Build" function.

The modinfo file is generated automatically when you conduct the "Build" function in Modbuddy.

The output from the "Build" function is sent to
C:\Users\UserName\Documents\My Games\Sid Meier's Civilization VI\Mods
This output is the actual mod the game uses. What is in Modbuddy is a project from which a usable mod is created, but is itself not a mod, so there is no modinfo file anywhere within a Modbuddy project.

------------------

So far as diagnosing your problem there are just too many errors a novice modder can make to be able to even take a guess as to which one you've made.
  1. Zip the version of the mod the game is actually trying to use, which will be found as a sub-folder in ~\Documents\My Games\Sid Meier's Civilization VI\Mods. Zip the whole sub-folder for your mod.
    • Do not (unless specifically asked by someone trying to help diagnose your problem) zip the modbuddy project folder
      Spoiler why not :
      1. This is useless in most cases and requires us to dump it into our modbuddy folder and then start modbuddy and then attempt to analyse what you are doing wrong.
      2. If we cannot spot the issue we then have to create the built and usable version of the mod on our end, which is what we really needed in the 1st place.
      3. And in all this process we have to hope that we are not wasting our time in the event the modbuddy project does not contain the same code as the built version of the mod that is non-functional
      4. People completely corrupt via fix-attempts the built version of the mod in the game's MODS folder and then package and send the modbuddy solution all the time. This results in what we see being different from what the novice mod-maker is seeing in-game.
  2. To attach the zip to a forum post, look for a button called Upload A File when composing your thread reply: this button opens a browse menu where you can select the zipped folder to attach directly to a forum post.
  3. If the zipped folder is too large for the forum to accept then upload the zipped mod to a file-sharing site such as dropbox and provide a link where the mod can be downloaded.
    • Mediafire is not really a very good choice any more because they have become rife with spam and malware, as well as attempts to get you to download unwanted and uneeded kludge by confusing the layout of the download pages. You'll note for example that Mediafire links are no longer allowed on Steam, whereas CFC (this site) and dropbox links are still allowed.
 
Database.log atModbuddy does not report errors related to code syntax when you conduct the "Build" function.

Thank you! this is exactly what I was looking for. I'm not quite ready to post all my code.... no need for someone else to comb over it only to find some typos if I haven't tried to debug myself yet.
 
To find clues as to the issue with your mod, make sure the mod is enabled, and then start a game. Exit directly to desktop, and then open and inspect the file Database.log found at
C:\Users\UserNamer\Documents\My Games\Sid Meier's Civilization VI\Logs
Errors of syntax will be reported in Database.log.

But if you do not have anything being executed in the mod's FrontEnd Actions, this is the reason the leader does not show as being selectable as a leader.
 
Excellent, the logs allowed me to track down the issue pretty easily. Missing comma :cry:

I'm getting another error that is confusing to me.... ```[2586644.092] [Configuration] ERROR: no such table: Types```

Because.... there _is_ a Types table, no? This is coming from the front-end actions, btw.
 
Table "Types" does not exist in the FrontEnd Database. It only exists on the InGame side.

No single file can be loaded by UpdateDatabase Action-types in both the FrontEnd and the InGame Actions. The two sides of the database have completely different implementation and completely different sets of valid game-tables. Unfortunately there is more than one "Template" mod floating around the internet that were created by people who did not actually understand how the game works, so there's still bad advice floating around the internet that it will be fine to load the same file in both ends of the game's database system. While it does not actually hurt anything if you load a file with invalid tables in the wrong database (so long as you do not mix code from the front end and in-game within the same file) what occurs is unnecessary and confusing error messages in the Database.log
 
wait..... no single file can be uploaded to both action types. I'm basing this off of a template/tutorial that specifically encourages adding files to both 'just in case'. HA glad to know thats not correct at all. So I'm guessing I just add the player config file to the front end and all the other database files to InGame. (I know theres no way for you to confirm or deny that, I'm just thinking out loud here)
 
That's why I stated it as I did. The rule only applies to UpdateDatabase actions.

I'm basing this off of a template/tutorial that specifically encourages adding files to both 'just in case'.
The advice you mention from that third party is the very sort of thing I was referring to with people offering templates that are not constructed correctly. The end result is not failure of the mod to load correctly, the result is a "teacher" encouraging "students" to use methods that accomplish nothing at all but needless clutter of Database.log with meaningless error messages. I've seen copies of some people's Database.logs that literally have multiple pages of these meaningless error messages, which makes it just all that much more difficult to find the real error messages that actually mean something in order to help diagnose what is broken with a mod.

Most novice modders also have the same reaction as you did -- confusion as to what is going on in Database.log wrt to a message that seems to make no sense. And then they either freak out or else proceed to waste time fixing a problem in their code which does not actually exist.

---------------------------------------

Ranting aside, yes, you only need your configuration stuff to be loaded in the FrontEnd Actions, and anything else that needs a UpdateDatabase Action should be done in an InGame Action. A FrontEnd UpdateDatabase Action should only contain files that write data for these tables:
Code:
'Credits'
'Logos'
'Defeats'
'Difficulties'
'Eras'
'GameCores'
'GameSpeeds'
'Maps'
'MapLeaders'
'MapStartPositions'
'MapSizes'
'Rulesets'
'RulesetTypes'
'Players'
'PlayerItems'
'DuplicateLeaders'
'DuplicateCivilizations'
'TurnTimers'
'TurnPhases'
'Victories'
'MapDomainOverrides'
'RulesetDomainOverrides'
'MapSupportedValues'
'MapUnSupportedValues'
'RulesetSupportedValues'
'RulesetUnSupportedValues'
  1. Additionally there are perhaps a couple dozen more very corner-case oddball FrontEnd tables which are used by Firaxis but which I have omitted since there's very little likelihood the average modder will ever need to use those tables.
  2. For the most part the average modder only ever really needs to use
    Code:
    'Players'
    'PlayerItems'
    'DuplicateLeaders'
    'DuplicateCivilizations'
  3. One should bear in mind also that the definition and use of tables that occur in both the FrontEnd and InGame databases are in fact quite different. For example there is a table called 'Eras' in both the FrontEnd and the InGame database, but the definitions of these tables is completely different between the two "sides" of the game.
 
Last edited:
Top Bottom