Modifying Source GameUI: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
 
mNo edit summary
Line 1: Line 1:
[[Category:Tutorials]] [[Category:Programming]] [[Category:Modding]]
[[Category:Tutorials]] [[Category:Programming]] [[Category:Modding]]
Changing the appearance of the HL2 GUI is as easy as changing the values in the <code>SteamApps\YourMod\Resource\SourceScheme.res</code> using notepad. If you have not started to create your own hl2 mod you will need to extract the SourceScheme.res file from the <code>SteamApps\source engine.gcf</code> group file. I personally use [[GCFScape]]. to extract the files I need. Look under <code>root\hl2\resource\SourceScheme.res</code> to find the file. You will need to extract the SourceScheme.res file into the <code>SteamApps\youremail\half-life2\hl2\resource</code> folder. Or if you want to customize your own mod then extract the file to <code>SteamApps\YourMod\Resource\SourceScheme.res</code>.
Changing the appearance of Source's GameUI is as easy as changing the values in the <code>SteamApps\YourMod\Resource\SourceScheme.res</code> using notepad. If you have not started to create your own [[Half-Life 2]] mod you will need to extract the <code>SourceScheme.res</code> file from the <code>source engine.[[gcf]]</code> file in the <code>SteamApps</code> folder. Look under <code>root\hl2\resource\SourceScheme.res</code> to find the file. You will need to extract the <code>SourceScheme.res</code> file into a game's resource folder or your mod's folder.


Lets take a look at changing the color of all GUI items to a blue tint. Open the SourceScheme.res file in notepad and scroll down to about line 63 you should see something like this...
Let's take a look at changing the color of all GameUI elements to a blue tint. Open the <code>SourceScheme.res</code> file in notepad and scroll down to about line 63 you should see something like this...


<pre>
<pre>

Revision as of 19:27, 23 December 2005

Changing the appearance of Source's GameUI is as easy as changing the values in the SteamApps\YourMod\Resource\SourceScheme.res using notepad. If you have not started to create your own Half-Life 2 mod you will need to extract the SourceScheme.res file from the source engine.gcf file in the SteamApps folder. Look under root\hl2\resource\SourceScheme.res to find the file. You will need to extract the SourceScheme.res file into a game's resource folder or your mod's folder.

Let's take a look at changing the color of all GameUI elements to a blue tint. Open the SourceScheme.res file in notepad and scroll down to about line 63 you should see something like this...

		Frame.TitleTextInsetX			16
		Frame.ClientInsetX			8
		Frame.ClientInsetY			6
		Frame.BgColor				"160 160 160 128"
		Frame.OutOfFocusBgColor			"160 160 160 32"
		Frame.FocusTransitionEffectTime		"0.3"	// time it takes for a window to fade in/out on focus/out of focus
		Frame.TransitionEffectTime		"0.08"	// time it takes for a window to fade in/out on open/close
		Frame.AutoSnapRange			"0"

Simply change the values for Frame.BgColor to 160 160 255 128. Colors are ordered RGBA (Red-Green-Blue-Alpha). Now save the file and run your mod. Voila! You now have a blue tinted GUI.