Sin Episodes VGUI Screen Setup

From Valve Developer Community
Jump to: navigation, search
SiN Episodes Level Creation

Before Starting

This article explains how to create a custom VGUI Screen using the vgui_screen entity.

First, close Steam, open up your SteamApps folder usually located here "C:\Program Files\Steam\SteamApps". Then using a program such a GCFScapeopen the "sinepisodes core.gcf" file. When inside extract the files "SE1\scripts\vgui_screens.txt" and "SE1\scripts\screens\docks_1d_U4lab_entrance.res".

Making your custom vgui_screen

Open the docks_1d_U4lab_entrance.res file and edit it as you like, in my example I removed one button and renamed the remaining labels. Then rename the .res file to "whateveryouwant.res" and place it in your "sin episodes emergence\SE1\scripts\screens" folder (you may have to make the last two folders in the filepath yourself). Then add this code to the end of the vgui_screens.txt before the last bracket,

      "whateveryounamedtheresfile"
	{
		"type"			"vgui_screen_panel"
		"pixelswide"	"whatever pixels you defined in the res file for width"
		"pixelshigh"	"whatever pixels you defined in the res file for height"		
                "resfile"	"scripts/screens/whateveryouwant.res"
	}

Now you can use your custom vgui_screen in your map. If you wanted to use a premade vgui you could have skipped this.

In Hammer

Go to your vgui_screen entity and under "Panel Name" enter the line you used in the vgui_screens.txt for "whateveryounamedtheresfile". For "Panel Width in World" and "Panel Height in World" use whatever amount of units you need. Open your custom .res file and search for a line that starts "command", after that is a string (we will call "command") which you will use for input/output. In the vgui_screen entity's "Outputs" tab select add and under "My output named" type in "~command" without quotes. Then fill in target and input like you would with any other entity.

Make sure that your .res file is in "sin episodes emergence\SE1\scripts\screens" and your customized vgui_screens.txt is in "sin episodes emergence\SE1\scripts" before starting your map or else the screen will not appear.

Important! If you are releasing your map to other people with a modified vgui_screens.txt please BSPZipit so you do not overwrite their vgui_screens.txt, this file is used in single-player SiN and could possibly damage their game.