• Custom loading screen
    19 replies, posted
[url]http://code.garrysmod.com/?into=garrysmod/lua/menu/loading[/url] 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? [b]Edit: [/b]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
[QUOTE=Nevec;15934505]You can't edit the loading screen files. They get overwritten when you launch the game.[/QUOTE] What if you make them read only?
[QUOTE=Skondra;15940140]What if you make them read only?[/QUOTE] Not sure. I'm not sure how source loads content, but it's most likely directly from the gcf instead of creating temp files.
[QUOTE=Nevec;15940261]Not sure. I'm not sure how source loads content, but it's most likely directly from the gcf instead of creating temp files.[/QUOTE] 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 [b][i]We need to try this.[/i][/b]
I have seen it done before but all that had gotten changed was the GMod Icon, switched with another custom one.
[QUOTE=Costest;15934105][url]http://code.garrysmod.com/?into=garrysmod/lua/menu/loading[/url] 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? [b]Edit: [/b]So if we create a different file in one of their places, that file should get ran instead?[/QUOTE] 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!" [code] Loaded Steam library ARE WE GOING TO CHANGE THE LOADING SCREEN!?!?!? HELL NO! Registering gamemode 'sandbox' derived from 'base' [/code]
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. [img]http://imgkk.com/i/Dv9RataM.png[/img] [img]http://imgkk.com/i/KiuBOXn3.png[/img] [img]http://imgkk.com/i/odx5u0C9.png[/img]
[QUOTE=slayer3032;15968709]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. *Badass pictures* [/QUOTE] Might there be a small tutorial on how to do that? I could have some fun with it. :)
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.
[QUOTE=blackops7799;15967829]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!" [code] Loaded Steam library ARE WE GOING TO CHANGE THE LOADING SCREEN!?!?!? HELL NO! Registering gamemode 'sandbox' derived from 'base' [/code][/QUOTE] 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.
I made one pretty easy: https://drive.google.com/open?id=17gtbSkr3uG-AlMZIpwRhCuHUz9TXbZ6p
Sorry, you need to Log In to post a reply to this thread.