[Vanilla] Custom civilization crashes and is missing artwork

Marcus_Virgil

Chieftain
Joined
Nov 23, 2012
Messages
12
Hi, all. I've been in the process of creating a civilization mod, but I've run into a few roadblocks that I haven't been able to push through on my own for a while now. For coding context, I've used Josh Atkins' mod template (
) and also followed Keniisu's instructions (
).

The civ is meant to:
  • With the leader bonus: start the game with an extra Economic card slot, provide +1 Great Engineer point with Monument buildings, and Builders can use charges to complete 15% of wonder cost.
  • With the civ ability: have +25% toward District, Building, and Builders production, have district adjacency bonuses from adjacent districts, and +1 Housing when built next to a river.
  • Have one unique building: the Aerodrome, which unlocks at Steam Power.

The current problems are:
  • There's no leader portrait, background, or icon art. Only Teddy on the load screen and question marks elsewhere.
  • The game crashes on trying to end the first turn.
  • Monuments don't give Engineer points.
  • There's way too much production being provided.
  • Before the crashing error appeared when I tried to pick things up again a few days ago, districts weren't providing housing and the adjacency bonuses didn't appear to be working.

I've uploaded the FiraxisModBuddy folder here for anyone who could look it over. Any help in pinning down the errors would be much appreciated; thanks very much!
 

Attachments

  • Marcus Virgil's Lindblum.zip
    9.9 MB · Views: 200
Does anyone have a suggestion for one of the points above, if possible? I've still not had any luck in figuring out the errors.
 
I've encountered similar issues. Here's what I think you need to do.

First, the Mod.Art.xml file needs to refer to the leader art and icons. I also followed the same tutorials, and I don't remember them showing this. Here are the substitutions to make:

Code:
        <Element>
            <consumerName text="LeaderFallback"/>
            <relativeArtDefPaths>
            </relativeArtDefPaths>
            <libraryDependencies>
                <Element text="LeaderFallback"/>
            </libraryDependencies>
            <loadsLibraries>true</loadsLibraries>
        </Element>
This becomes:
Code:
        <Element>
            <consumerName text="LeaderFallback"/>
            <relativeArtDefPaths>
                <Element text="FallbackLeaders.artdef"/>
            </relativeArtDefPaths>
            <libraryDependencies>
                <Element text="LeaderFallback"/>
            </libraryDependencies>
            <loadsLibraries>true</loadsLibraries>
        </Element>
This will load your FallbackLeaders.artdef.

Code:
        <Element>
            <libraryName text="LeaderFallback"/>
            <relativePackagePaths>
            </relativePackagePaths>
        </Element>
This becomes:
Code:
        <Element>
            <libraryName text="LeaderFallback"/>
            <relativePackagePaths>
                <Element text="LeaderFallbacks"/>
            </relativePackagePaths>
        </Element>

Code:
        <Element>
            <libraryName text="UITexture"/>
            <relativePackagePaths>
            </relativePackagePaths>
        </Element>
This becomes:
Code:
        <Element>
            <libraryName text="UITexture"/>
            <relativePackagePaths>
                <Element text="UILeaders"/>
                <Element text="LeaderBackgrounds"/>
                <Element text="Leader_Cid_Fabool"/>
                <Element text="Icons"/>
            </relativePackagePaths>
        </Element>
These match the names of the your xlp files.

This is a particularly tricky bug to troubleshoot because, at least to my knowledge, it doesn't create any error messages, it just silently doesn't bother loading your art.

There are also a few errors that do show up in the database.log file (located in My Documents/My Games/Sid Meier's Civilization VI/Logs), which give some hints about your other issues:

Code:
[3122658.213] [Configuration] ERROR: no such table: Types
[3122658.213] [Configuration]: In Query - insert into Types('Type', 'Kind') values (?, ?);
[3122658.213] [Configuration]: In XMLSerializer while updating table Types from file MVs_Lindblum_Template_Buildings.xml.
[3122658.214] [Configuration] ERROR: no such table: IconTextureAtlases
[3122658.214] [Configuration]: In Query - insert into IconTextureAtlases('Name', 'IconSize', 'IconsPerRow', 'IconsPerColumn', 'Filename') values (?, ?, ?, ?, ?);
[3122658.214] [Configuration]: In XMLSerializer while updating table IconTextureAtlases from file MVs_Lindblum_Template_Icons.xml.

The error about icons happens because in your properties file, you forgot to change the Front-end action for loading icons to "UpdateIcons" from "UpdateDatabase".

I think, but I'm not sure, that the reason for the other error is that you're loading your buildings xml file as a front-end action, when you only need to load it as an in-game action.

These changes are at least enough to get your art to load up correctly.

To use the city planner agenda, I think you need to add the Nubia DLC as a Dependency in the Association tab of your properties file.

Note that as it stands, your mod will only add your civ and leader to a standard rules game, and not a R&F game. You can change this in your config sql file by adding a new column called Domain, and adding a copy of your leader and civ with Domain value 'Players:StandardPlayers' as well as a second copy with Domain value 'Players:Expansion1_Players'.

I think the reason you're getting so much production is that the Amount field for the modifier you're using is a flat bonus, not a percentage, so you're just giving +25 production. I think the reason you're not getting the great person points is that the modifier you're using can only affect yields (Culture, Science, Gold, etc.) and not great person points. I'm not sure if there is a modifier to adjust great person points yield for a building (there is one for districts, though). If you can't find a modifier, you could give them a unique monument building that has the extra yield.

I'm not sure why the game is crashing at the end of the turn, but I would try to diagnose it by disabling the leader traits, civ traits and building one at a time, to see if any of them fix it. Then you can narrow it down from there.
 
That's really helpful, yes; thanks very much! The art is all working now, and I can start looking at the modifiers next. I haven't started looking into the crash causes in detail yet, but the only thing out of place in the database.log now is:

"[3135585.328] [Localization]: StartupErrorMessages.xml

[3135585.328] [Localization]: Input XML does not contain database entry tags. GameData, GameInfo or Database"

Which seems to be the result of some recent change, judging from other posts online. I'm not sure what to make of that, since those do seem to be present.
 
That's really helpful, yes; thanks very much! The art is all working now, and I can start looking at the modifiers next. I haven't started looking into the crash causes in detail yet, but the only thing out of place in the database.log now is:

"[3135585.328] [Localization]: StartupErrorMessages.xml

[3135585.328] [Localization]: Input XML does not contain database entry tags. GameData, GameInfo or Database"

Which seems to be the result of some recent change, judging from other posts online. I'm not sure what to make of that, since those do seem to be present.
Those messages seem to appear even for mods which work fine. I would ignore that.
 
I'll definitely have to use that tool if I end up making another civ. Thanks!

Imnimo, I think the Domain addition worked; the mod plays with both the base game and Rise and Fall active. I ended up trying to shift the Great Engineer points to the City Center district instead of to a building, and that seemed to fix the crash issue--though the points still aren't appearing and counting as of yet. Otherwise, I'm not quite sure why the Amount modifier is behaving flatly; I based it off of Hojo's trait, which uses a percentage with a value of 100. Things are definitely improving, though!
 

Attachments

  • Marcus Virgil's Lindblum.zip
    10.5 MB · Views: 181
I'll definitely have to use that tool if I end up making another civ. Thanks!

Imnimo, I think the Domain addition worked; the mod plays with both the base game and Rise and Fall active. I ended up trying to shift the Great Engineer points to the City Center district instead of to a building, and that seemed to fix the crash issue--though the points still aren't appearing and counting as of yet. Otherwise, I'm not quite sure why the Amount modifier is behaving flatly; I based it off of Hojo's trait, which uses a percentage with a value of 100. Things are definitely improving, though!

Some modifiers are percentage-based, and some are flat bonuses, and the only way to tell is to look at examples that use those modifiers and see which they're doing. What I imagine happened is that Firaxis just made modifiers as they needed them - if someone wanted to make an ability that was +100% production, like Hojo's district bonus, they'd make a modifier that applied a percentage bonus. If someone else wanted to make a flat bonus, like for the city state influence bonuses, they'd make a modifier that did that. And there was no naming convention or anything to keep track of what is what. It's a real crapshoot whether the effect you want will be achievable with the existing modifiers, so my general procedure is to find a modifier I like, and build around that, rather than coming up with the idea and then trying to find a modifier.

I know more advanced modders have created their own modifiers via Lua scripting, but I don't know how that works at all.
 
Top Bottom