Custom loading screen

http://code.garrysmod.com/?into=garrysmod/lua/menu/loading
I see it’s all lua. So couldn’t we just design our own loading screens? Or is that code compiled with garrysmod? or in the GCF?
**Edit: **So if we create a different file in one of their places, that file should get ran instead?

If it would work it would be great. I hate that damn white loading screen. Especially when I’m tired and just plays when I have nothing to do.

You can’t edit the loading screen files. They get overwritten when you launch the game.

Snips

What if you make them read only?

Not sure. I’m not sure how source loads content, but it’s most likely directly from the gcf instead of creating temp files.

I don’t know if the same applies with Lua files, but in the case of resource files if Source finds a file in the Garry’s Mod folder that is also in the GCF file then it uses the one in the Garry’s Mod folder.

Or you could just run it as a source mod.

that’s what I thought
We need to try this.

I have seen it done before but all that had gotten changed was the GMod Icon, switched with another custom one.

Yes, you can easily put any file to /lua/vgui and getting it ran.
Then you overwrite the loading-screen VGUI. That’s what I’m doing to get the loading-screen black.

I’m not sure I get that… Care to explain?

filename: lua/vgui/zzz.lua

[lua]//Makes the loadingscreen black
if(not GetLoadPanel) then return end

local Loading = GetLoadPanel();

function Loading:Paint()
surface.SetDrawColor( 0, 0, 0, 255 );
surface.DrawRect( 0, 0, self:GetWide(), self:GetTall() );
end

[/lua]

Doesn’t work for me…

I added in some prints to see if it was working… and it was… kinda.

[lua]
print(“ARE WE GOING TO CHANGE THE LOADING SCREEN!?!?!?”)
if(not GetLoadPanel) then
print(“HELL NO!”);
return;
end

local Loading = GetLoadPanel();

function Loading:Paint()
surface.SetDrawColor( 0, 0, 0, 255 );
surface.DrawRect( 0, 0, self:GetWide(), self:GetTall() );
end

print(“HELL YES!”);
[/lua]

Always getting the “HELL NO!”



Loaded Steam library
ARE WE GOING TO CHANGE THE LOADING SCREEN!?!?!?
HELL NO!
Registering gamemode 'sandbox' derived from 'base'


I just extracted my GCF and made Gmod into a sourcemod.

I overwrote the loading screen files and replaced the .res files so now I have an epic looking console and source menus and stuff like that.

My server browser is epic.

http://imgkk.com/i/Dv9RataM.png

http://imgkk.com/i/KiuBOXn3.png

http://imgkk.com/i/odx5u0C9.png

Might there be a small tutorial on how to do that? I could have some fun with it. :slight_smile:

Extract the Garry’s Mod GCF to a folder named garrysmod in the sourcemod folder using GCFScape.

Restart Steam, Edit files to your liking.

Just remember to replace updated files with each Gmod update.

Then it needs to be loaded delayed. Add a timer. The LoadingScreen seems to be laoder after that vgui element.

Wouldnt that mean that you cant connect to Gmod servers?

GMod is forward and backwards compatible.