Change main menu image?

charon2112

King
Joined
May 8, 2009
Messages
990
Location
Massachusetts USA
There's many great images in G&K's loading screen, but I don't like the main menu screen. Can I replace it with one of the loading screen images?

Thanks.

Moderator Action: Moved to C&C.
 
anyone? I wouldn't think this would stump everyone.
 
I haven't done this, but you'll want to look in ...Assets/DLC/Expansion1/Assets/UI/FrontEnd (for G&K). Should be a pair of files in there (something.xml and something.lua) that control this screen (not sure what "something" is off the top of my head, but probably "LoadMenu" or somesuch). The dds image file is probably directly named in the xml file (though it is possible that the UI element is given an id in the xml and then controlled in the lua part). Change the image file name in the xml (or possibly lua) and then add this altered xml (or lua) file to your mod with VFS=true (keep the xml or lua file name the same as in base). You'll need to have a dds image of the same dimensions as the old one (use Gimp or similar). The new dds is added to your mod with VFS=true.
 
I'll give it a try. thanks!
 
For G&K, in the file "C:\Program Files (x86)\Steam\SteamApps\common\sid meier's civilization v\assets\DLC\Expansion\UI\FrontEnd\FrontEnd.lua", add the bit in red and the background image for the menus will be a random loading image from either G&K or the base game

Code:
    if( not bIsHide ) then
    	UIManager:SetUICursor( 0 );
        UIManager:QueuePopup( Controls.MainMenu, PopupPriority.MainMenu );
[COLOR="Red"]--        Controls.AtlasLogo:SetTexture( "CivilzationVAtlas.dds" );
		if (math.random(2) == 1) then
			-- G&K images are loading_1.dds to loading_11.dss and loading_13.dds to loading_19.dds
			local pic = math.random(2,19); if (pic == 12) then pic = 1 end
			Controls.AtlasLogo:SetTexture( string.format("loading_%d.dds", pic) );
		else
			-- Vanilla images are loadingbasegame_1.dds to loadingbasegame_20.dds
			Controls.AtlasLogo:SetTexture( string.format("loadingbasegame_%d.dds", math.random(20)) );
		end[/COLOR]    else
        Controls.AtlasLogo:UnloadTexture();
    end
 
For G&K, in the file "C:\Program Files (x86)\Steam\SteamApps\common\sid meier's civilization v\assets\DLC\Expansion\UI\FrontEnd\FrontEnd.lua", add the bit in red and the background image for the menus will be a random loading image from either G&K or the base game

Code:
    if( not bIsHide ) then
    	UIManager:SetUICursor( 0 );
        UIManager:QueuePopup( Controls.MainMenu, PopupPriority.MainMenu );
[COLOR="Red"]--        Controls.AtlasLogo:SetTexture( "CivilzationVAtlas.dds" );
		if (math.random(2) == 1) then
			-- G&K images are loading_1.dds to loading_11.dss and loading_13.dds to loading_19.dds
			local pic = math.random(2,19); if (pic == 12) then pic = 1 end
			Controls.AtlasLogo:SetTexture( string.format("loading_%d.dds", pic) );
		else
			-- Vanilla images are loadingbasegame_1.dds to loadingbasegame_20.dds
			Controls.AtlasLogo:SetTexture( string.format("loadingbasegame_%d.dds", math.random(20)) );
		end[/COLOR]    else
        Controls.AtlasLogo:UnloadTexture();
    end

Thank you very much for this! However, I don't have a frontend.lua file in this folder. I have a mainmenu.lua and that's all.
 
Oops! It's in

C:\Program Files (x86)\Steam\SteamApps\common\sid meier's civilization v\assets\UI\FrontEnd
 
It's always a pain to figure out whether to look in Assets/DLC/Expansion/Assets/UI/ or in Assets/UI/. The former has G&K files that replace vanilla files (which is many but not all of them) and new G&K files. But if there were no changes in G&K, then you have to look in the latter to find the relevant UI file.
 
Oops! It's in

C:\Program Files (x86)\Steam\SteamApps\common\sid meier's civilization v\assets\UI\FrontEnd

I made the change, but I didn't work. I still get the same generic main menu screen. With the guy with the hat.

This is the text in my frontend.lua file: Is just changing this one file enough, or is there a step I'm missing? Thanks! :)

-------------------------------------------------
-- FrontEnd
-------------------------------------------------

function ShowHideHandler( bIsHide, bIsInit )

if( not UI:HasShownLegal() ) then
UIManager:QueuePopup( Controls.LegalScreen, PopupPriority.LegalScreen );
end

if( not bIsHide ) then
UIManager:SetUICursor( 0 );
UIManager:QueuePopup( Controls.MainMenu, PopupPriority.MainMenu );
-- Controls.AtlasLogo:SetTexture( "CivilzationVAtlas.dds" );
if (math.random(2) == 1) then
-- G&K images are loading_1.dds to loading_11.dss and loading_13.dds to loading_19.dds
local pic = math.random(2,19); if (pic == 12) then pic = 1 end
Controls.AtlasLogo:SetTexture( string.format("loading_%d.dds", pic) );
else
-- Vanilla images are loadingbasegame_1.dds to loadingbasegame_20.dds
Controls.AtlasLogo:SetTexture( string.format("loadingbasegame_%d.dds", math.random(20)) );
end
Controls.AtlasLogo:SetTexture( "CivilzationVAtlas.dds" );
else
Controls.AtlasLogo:UnloadTexture();
end
end
ContextPtr:SetShowHideHandler( ShowHideHandler );
 
I figured it out, I had an extra line in there.

Thanks all!:)
 
However, I don't seem to be getting a random background, I always get the image with the person on the mountaintop preaching, with the sun rays in the background. Should the code give me a random image?

Thanks again.
 
It should be a random image (and it is on my system). Do you have the New Random Seed option enabled in the advanced setup screen?
 
It should be a random image (and it is on my system). Do you have the New Random Seed option enabled in the advanced setup screen?

I'm not sure if that's enabled, I can check later today. Should it be enabled or no? Would that affect the background image?

Thanks!

***It seems to be random now, I must have just had bad luck and got the same image three times in a row.***
 
I just finally got tired of looking at the hat-guy everyday, and searched for an alternative. That search brought me here, and your 'fix' worked perfect.

I can't help but wonder why it is set up to always load that hat-guy. He's not particularly representative of G&K, and they have all these other images sitting around looking like they were meant to be used as loading/menu screen, but aren't.

It's not a major bug or anything, just a strange aesthetic choice, I guess.

Any insight or guesses into this design decision?
 
Awesome stuff whoward! I was a lil' tired of seeing the dreary old smokestacks on Brave New World everyday. Quick question though. This code randomizes the images but does it also include Brave New World's images now or is there something to change to get them in there? The handful of times I've loaded the game since doing this I get a different screen but I don't think any have been from the new expansion.

Also, is there anyway to randomize the loading screens to include vanilla, G&K, and BNW? Thanks!
 
Could the "randomly cycling through background images" also be applied to the main menu's music? Maybe even switching everytime a song ends?
 
Updated for BNW and latest patch (1.0.3.142).

You'll need to manually unzip the file into "C:\Program Files (x86)\Steam\SteamApps\common\Sid Meier's Civilization V\assets\UI\FrontEnd"

(As this file is loaded a long time before any mods are activated you can't turn it into a mod)
 

Attachments

  • FrontEnd.zip
    754 bytes · Views: 449
Updated for BNW and latest patch (1.0.3.142).

You'll need to manually unzip the file into "C:\Program Files (x86)\Steam\SteamApps\common\Sid Meier's Civilization V\assets\UI\FrontEnd"

(As this file is loaded a long time before any mods are activated you can't turn it into a mod)

Thank you! :)
 
Updated for BNW and latest patch (1.0.3.142).

You'll need to manually unzip the file into "C:\Program Files (x86)\Steam\SteamApps\common\Sid Meier's Civilization V\assets\UI\FrontEnd"

(As this file is loaded a long time before any mods are activated you can't turn it into a mod)

Hmm... it seems like this isn't working unfortunately.
 
Top Bottom