Game crashes when starting a match (probable cause: leader images)

SpaceCommunist

Warlord
Joined
Apr 11, 2016
Messages
119
Location
Malachor V
So, I've found absolutely no information elsewhere that can help me out, so I'm just gonna beg for help here.

I've spent a very, very, very, very, very long time trying to create a leader mod (using the Leader/Civilization Example mod as a base). I've made custom icons, leader images, files, etc. to get this working properly.

However, thanks to the backwards way that ModBuddy/AssEdit handles custom images, things have gotten...complicated, to say the least.

I'll try to spare the details, but basically the system has been fighting me throughout the entire process. It took me a while to arrange the XML files properly so that the game wouldn't crash upon launch, but now...well, it's gotten to a rather unpleasant standstill.

Currently, I can get to the Create A New Game screen. The issue here is that the leader image and icons do not appear for my leader (I didn't replace the civilization's icons so they appear just fine). The space to the left of the leader list/game settings is empty - it only has the default world map background. When I attempt to start the game under any settings, it goes to "LOADING, PLEASE WAIT" - until the audio stutters (the sign I've taken to mean the game is already crashing), and the game shuts down completely.

I've done a bit of checking to see what the issue is. I'm almost certain that it has nothing to do with my XML files - the Logs don't indicate any changes (though half the time my Logs never update...) in regards to them. I have good reason to believe it is either the ArtDef/XLP files or the images themselves, for differing reasons:
  • ArtDef/XLP seems like a possibility because I've had to scrounge around here and there for some time, getting the text settings to work properly. I've added in various lines of text and copied and pasted from different guides (particularly the Deutschland and How To Make A Civilization Icon In Way Too Many Steps tutorials), making sure not to leave anything out or mix things together.
  • The images themselves seem likely because details as to the image properties have been rare to come by - most of what I know comes from the aforementioned How To Make A Civ Icon guide and various search results for the Fallback/Leader_Neutral images that say 1024 for height but no clear indication of width.
So...yeah. Pretty frustrating, to say the very least. If I had some indication of what I (or possibly ModBuddy/AssEdit) am doing wrong, then that would make things easier...but I don't. There's literally nothing obvious or indicative about modding in these programs - everything I've had to do has come from either loose fan guides, extremely time-intensive trial and error, reverse-engineering of AssEdit-accessed files, and sometimes even just sheer luck and guesswork. So now I'm here, asking for some help, so that I can clear up this issue of my game crashing...so that I can continue testing the mod.

Some tidbits to consider:
  • AssEdit will not open my FallbackLeaders.artdef file, at all. The last edit to the file was done in ModBuddy, via copy-pasting the text from the Deutschland guide and editing it appropriately.
  • The last time I was able to open the FallbackLeaders.artdef file in AssEdit, I was unable to find my leader's FALLBACK_NEUTRAL_[name] file, despite having created the .tex file and importing it and the .dds version into ModBuddy (not pasting via explorer).
  • The LEADER_[name]_NEUTRAL file and the icons appear to be the only affected files missing (though I'm not sure whether or not the LEADER_[name]_NEUTRAL file or the FALLBACK_NEUTRAL_[name] file is used for the Create A New Game screen).
  • All the images involved (Fallback, Leader Neutral, icons, and diplo background - the [name]_1,2,3,4 files) have been set to import as FrontEnd Actions.
  • The (Mod Art Dependency File) commands included in the Jasper Kitty Example have been deleted.
 
Okay, I would SERIOUSLY appreciate some help with this guys...here, I'll even provide the files if that's what it takes. It's taken me way too much time to develop this, and I REALLY don't want to abandon a project when I'm so close to completion because of errors that I can't get an explanation for.

Edit - Just realized I uploaded an older version of the mod, here's the current version.
 

Attachments

  • Soviet Union - Lenin.zip
    5.6 MB · Views: 50
Last edited:
The LEADER_[name]_NEUTRAL file and the icons appear to be the only affected files missing (though I'm not sure whether or not the LEADER_[name]_NEUTRAL file or the FALLBACK_NEUTRAL_[name] file is used for the Create A New Game screen).
Every time I've messed with the structure of these apart from renaming them (and changing the corresponding text in the XLP's) I've seen drastic problems, though I don't remember the actual error messages. Similarly the XLP files made with the Jasper Kitty stuff, UILeaders and LeaderFallbacks don't appear to be optional. You can add entries to UILeaders (for instance for images like those I'll mention below) but don't try that with LeaderFallbacks – there lies build failure.

I suggest that you make a new Jasper Kitty to copy them over and then change them accordingly, though of course you may have backups from before you deleted them where you've done that.

Regarding the DDS's/TEX's here's what I've discovered ():

LEADER_[name]_NEUTRAL is (by default) the Civ choice image and the right hand side of the loading screen image (only top 969 or so pixels show), but they don't have to be the same – see below.
FALLBACK_NEUTRAL_[name] is the right hand side of the diplomacy screen.

However, it's also possible to override the diplomacy and loading backgrounds (and the loading foreground). I use this to make the foregrounds transparent 2x2 images, thus making the character and background in one go (it being easier to make this look good in Gimp, I think). The following code (I put it in my Leader xml) may be helpful:
Code:
    <LoadingInfo>
        <Row LeaderType="LEADER_BORIS" ForegroundImage="FOUR_PIXELS" BackgroundImage="Boris Loading" EraText="LOC_LOADING_INFO_LEADER_DEFAULT" PlayDawnOfManAudio="0"/>
    </LoadingInfo>

    <DiplomacyInfo>
        <Row Type="LEADER_BORIS" BackgroundImage="Boris Diplomacy"/>
    </DiplomacyInfo>
This approach also separates the Civ choice image from the loading screen image.
 
Thanks for the help so far! I managed to get the icons fixed, so now in the Create A Game screen everything that should show up does show up...however, the game still crashes when I try to actually start the match. With the icons and all taken care of, there doesn't appear to be any sign of things that are apparently wrong - the Logs still won't update, the files in ModBuddy and AssEdit work fine...

So now I've got a situation where some issues were solved, but I'm left with the game still crashing and absolutely no indication of what the cause could be. One step forward, two steps back. :(

Here's a copy of the most recent version of the mod, in case anybody can find the issue(s).
 

Attachments

  • Lenin (Russian Leader).zip
    6.8 MB · Views: 30
I'm glad you're making progress, but you won't be able to start a game without functional versions of UILeaders.xlp and LeaderFallbacks.xlp. I suggest that you start by making a new Jasper Kitty solution and copy the xlp and texture folders' contents into the same folders in your mod. Rename some of your files (if you haven't already) first to get them out of the way. Then test it. It might run. If it does take a backup of the whole thing at that point.

Regardless of whether it runs at that point ensure that the sections in the Jasper Kitty Mod.Art.xml that mention UILeaders and LeaderFallbacks are replicated in your Mod.Art.xml. Test again. If it runs at this point take a backup again.

If it still doesn't you might at least have started getting meaningful errors in the log files.

If it does run at this point, then you can start renaming files and references to them carefully to make it work as intended. Don't rename UILeaders.xlp or LeaderFallbacks.xlp, just alter their contents.
 
Okay, so I've created another Leader/Civ Example solution from scratch, as you suggested. The only changes I've made were:
  • Changed LEADER_JASPER_KITTY to LEADER_SC_[my leader's name] in all files where that value was present
  • Imported the texture files from the main solution
  • Changed the references to the Jasper Kitty textures in UILeaders.xlp, LeaderFallbacks.xlp, and FallbackLeaders.artdef to reference my leader images (i.e. FALLBACK_NEUTRAL_JASPERKITTY is now FALLBACK_NEUTRAL_SC_[my leader's name]
I checked to make sure that UILeaders and LeaderFallbacks were present in the Mod.Art.xml file, and they were, so there's that. I also performed a brief test with the Example solution before I edited things around, and it started up just fine - so I know that it's not the Example solution that's causing the problem.

So after performing these changes and whatnot, I tried to start a new game - but it crashed. I'm certain that I've altered all references to the leader name so it can't be that (the Logs would state as such, and I used the Replace - All Open Documents command with all files open). I'm led to believe that this must be a texture issue, not an xml or xlp or artdef one, as the only changes there have been labels.

Considering that the base Example solution does not reference and/or utilize icons, that leaves just two possible culprits: FALLBACK_NEUTRAL_SC_[my leader's name].dds and LEADER_SC_[my leader's name]_NEUTRAL.dds. Something must either be wrong with the files themselves, or the .tex files based on them. What's interesting is that the leader image appears just fine in the Create A New Game screen, yet the game seemingly can't load it again for the loading screen.

For editing purposes, I created the images via Gimp. For the FALLBACK file:
  • Size - 751 x 1024
  • Compression - None
  • Format - RGBA8
  • Save - Selected Layer (can't be changed?)
  • Mipmaps - Generate mipmaps
As for the LEADER_[name]_NEUTRAL file:
  • Size - 751 x 1024
  • Compression - None
  • Format - RGBA8
  • Save - Selected Layer (still can't be changed)
  • Mipmaps - No mipmaps
I suspect the Gimp settings may be the issue, as I've had to make educated guesses based on secondhand info (the mipmaps I hadn't even known until I threw another mod's FALLBACK image into Gimp), but the issue could also be the .tex files. The manner in which I handled this in AssEdit was as follows:

For the FALLBACK file:
  • Class Name: Leader_Fallback
  • .tex file name and source file name are identical
  • No other changes have been made to the .tex settings
For the LEADER_[name]_NEUTRAL file:
  • Class Name: UserInterface
  • .tex file name and source file name are identical
  • Value IsScalable is NOT checked
  • Value IsStandalone is NOT checked
  • Value IsTiled is NOT checked
For reference, I've included the files themselves below (both the .dds ones and the .tex ones).
 

Attachments

  • FALLBACK and LEADER_NEUTRAL files.zip
    676.2 KB · Views: 50
Did you get any error messages in the Logs folder? I'm thinking Modding.log, but I'd take a look at all of them TBH.

I'm not sure what difference the mipmaps make. I usually stick with no Mipmaps, but taking the other option may not be your problem.

Presuming that it's something to do with your images I think that it may be semi-transparent pixels. In the past when I've tried to soften the edges of my leader images by making some of the pixels at the edge semi-transparent it's crashed. I'm not sure , because I had the issues with semi-transparency some time ago, when adding images was new to me, but the following might work.

To get around that without sacrificing your nice sharp edges I suggest that you take my approach from a previous post in this thread and add Lenin to a background image to remove any semi-transparency in the files that the program sees while keeping your sharp edges, and use a 2x2 totally transparent image for the foreground. Do this for both the loading screen and the diplomacy screen.
 
Did you get any error messages in the Logs folder? I'm thinking Modding.log, but I'd take a look at all of them TBH.

I have, actually. None of the Logs files are showing any errors. Modding, ArtDef, Database...all of them show no errors. It's really frustrating, given that one of the main purposes of having log files in the first place is to show any possible errors. :/

I'm not sure what difference the mipmaps make. I usually stick with no Mipmaps, but taking the other option may not be your problem.

In all honesty I'm only using mipmaps for just the FALLBACK image, and only because all the FALLBACK images I've opened from other mods had them. I have no idea if they have any impact on the modding process at all...mostly because there are no guidelines to follow...

Presuming that it's something to do with your images I think that it may be semi-transparent pixels. In the past when I've tried to soften the edges of my leader images by making some of the pixels at the edge semi-transparent it's crashed.

Yeah, see, here's the thing: I just went into Gimp and tried my best to remove any and all soft edges by adding a black background layer, recropping, and then duplicating+merging the same layer about a dozen times. I compared the edges to a few other leader images from other mods, and it was on the same level of non-transparency, if not more, than the others after I did this process.

But the game is still crashing when I start a match, so...yeah. I'm not sure if the transparency is the issue here - and if it is, that's really stupid on Firaxis's part to have transparent pixels as an issue for images. Heck, everything about this so far has been nightmarishly difficult and frustrating, with absolutely no explanation, guidelines, help, etc. on Firaxis's part.

Can't we just go back to the way the old Modbuddy worked? Just drop a few .dds images from explorer into the Modbuddy folder, add them in the Ingame Actions section, and be good to go? Like, that was child's play compared to this...

I'm not sure , because I had the issues with semi-transparency some time ago, when adding images was new to me, but the following might work

To get around that without sacrificing your nice sharp edges I suggest that you take my approach from a previous post in this thread and add Lenin to a background image to remove any semi-transparency in the files that the program sees while keeping your sharp edges, and use a 2x2 totally transparent image for the foreground. Do this for both the loading screen and the diplomacy screen.

I did that actually, for the loading screen at least - you can check that out in the second .zip file. I didn't change the diplomacy screen because that results in some awful clipping issues, where the black lines that the game generates automatically over the diplomacy background will clip over the leader image.

Not that I don't find the advice helpful, mind you - it's just that I'd prefer the system to actually work properly, because otherwise I'd have to be literally tricking the system into showing a specific screen at the cost of artistic integrity (that is, the art itself gets clipped and messed up).

Besides, with the exception of the Hylian mod, I have yet to find a leader/civ mod that utilizes the diplomacy screen feature in their xml files. If they can manage it, somehow everyone else should be able to do so.
 
I did that actually, for the loading screen at least - you can check that out in the second .zip file.
But in the second zip file you still didn't have UILeader.xlp etc, so it still wouldn't have worked and there was no way to tell whether "merging down" the images was an improvement. I think it's worth trying again now that you have the missing files. I've been where you are now, tearing my hair out (what's left of it) in frustration. Don't give up – I think you're getting closer.I've been where you are now, tearing my hair out (what's left of it) in frustration.
 
But in the second zip file you still didn't have UILeader.xlp etc

Um...what? But I do very much have UILeaders.xlp and LeaderFallbacks.xlp in the mod. I've got them open right now...



I just checked the .zip, and the mod file location - neither appear to actually have the files in them. The only .xlp present is Icons.xlp, which is the one I created from scratch. It's really weird because FallbackLeaders.artdef is present, but not UILeaders.xlp or LeaderFallbacks.xlp...

Edit: It appears that the LeaderFallbacks.xlp and UILeaders.xlp files only actually exist in Documents/Firaxis Modbuddy/Civilization VI/[mod name]/[mod name]/XLPs, not in My Games/Sid Meier's Civilization VI/Mods/[mod name]/XLPs, which I'm certain is where the mod is read (as an unpublished mod on my PC, not one downloaded, say, from Steam - then it would be from the Steam directory of course). I have absolutely no idea why the files won't appear.

Perhaps I need to create new .xml files from scratch and rewrite the entire .xlp files onto them? That's how I was able to create the Icons.xlp file, and that ended up solving the Icon issue...

Edit 2, Edited Boogaloo: Also, thanks for the support. I really do appreciate it, even if my responses don't come off that way. This really shouldn't be as frustrating process as it is...
 
Last edited:
Top Bottom