Replacing the main menu's background image

Civitar

Adventurer
Joined
Mar 23, 2014
Messages
1,507
Location
Switzerland
I'm trying to replace the background image of the pregame menus for Warhammer. FramedArchitect has pulled this off somehow in Faerun, but looking at his code I can't for the life of me figure out how.
As far as I can tell, in Faerun he adds an <Image> control to the AdvancedSetup.xml, GameSetupScreen.xml, and SelectCivilization.xml files named BackgroundImage that overlays the original image. When I copy that code in Warhammer, it only appears in the Advanced Setup menu. Looking at the lua and xml files for all 3 of those menus, the only difference I can see is that GameSetupScreen.xml has AdvancedSetup as a child context (or whatever the proper term is) with DeferLoad set to 1. However, when I set DeferLoad=1 for SelectCivilization from GameSetupScreen in the Warhammer mod, the background image stayed the same. I think that's because a SelectCivilization context had already been loaded by the game before the mod was loaded. So my question is, how can I force the game to reload a UI context once the mod has been loaded, assuming I haven't missed anything in my reasoning up to this point.
 
I know that the R.E.D WWII mod also did this, where they allow the setup screen to have a background image of a battle ship. (or well, last time I checked/played which was perhaps half a year ago).
I don't know how they did this, or if they've done this the same way as in Faerun, as I've not checked out the code myself.

I know that was not specifically your question (for which I do not have an answer), but I felt like it might be of use in some way?
 
What if they just replaced the original background image with their background image?
 
What if they just replaced the original background image with their background image?
I've tried that, it doesn't work. The background image is loaded when Civ5 first launches, before any mods are activated. Once a mod is activated, the image is already there. That's why I need to find out how to reload a menu, because the GameSetupScreen or SelectCivilizations UI files have been edited but the game has already run the vanilla ones so it doesn't actually affect anything.
 
Back
Top Bottom