nyuuzyou/wikis huggingface dataset:
Setup mod on steam

=Mod files=
In order to launch your mod, the necessary files need to be created in your steamapps folder. Source SDK 2013 provides some base files for you in the game/ directory. This folder contains all the necessary assets, binaries and scripts for your mod, the most important being gameinfo.txt, bin/client.dll and bin/server.dll.
* Singleplayer: Copy the directory from <your mod>/sp/game/mod_hl2 (or mod_episodic) to <steam_path>/steamapps/sourcemods/<your mod>
* Multiplayer: Copy the directory from <your mod>/mp/game/mod_hl2mp to <steam_path>/steamapps/sourcemods/<your mod>
Restart Steam after this step and you will find your mod listed in your Steam library.
=Symlink mod directory=
It would get tedious to copy over the mod directory every time we build our binaries, so instead we can symlink our mod_ folder so that it is always up-to-date. First, delete the folder we created in the previous step under sourcemods/ (if you have no other mods installed, this directory should be empty now).
# Open up your command prompt or terminal.
# Navigate to directory <steam_path>/steamapps/sourcemods/
# Create a symlink to your mod directory
* Windows:
mklink /J <mod_name> "<path_to_source>/<sp|mp>/game/<mod_hl2mp|mod_hl2|mod_episodic>"
* Linux:
mkdir <mod_name> && sudo mount --bind <path_to_source>/<sp|mp>/game/<mod_hl2mp|mod_hl2|mod_episodic> <mod_name>
Now, every time you update assets or rebuild your code in your game/mod_ directory the changes will automatically be there the next time you launch your mod.
=Change output directory=
You can change the output directory of your binaries to something other than mod_hl2, mod_episodic or mod_hl2mp by right clicking Project -> Properties -> Build events -> Post build events and changing the paths as desired. This must be done for both Client and Server.
Example:
if not exist "..\..\..\game\MY_MOD\bin\." mkdir "..\..\..\game\MY_MOD\bin\."
copy "$(TargetDir)$(TargetFileName)" "..\..\..\game\MY_MOD\bin\.\$(TargetFileName)"
if ERRORLEVEL 1 goto BuildEventFailed
if exist "$(TargetDir)$(TargetName).map" copy "$(TargetDir)$(TargetName).map" ..\..\..\game\MY_MOD\bin\.\$(TargetName).map
copy "$(TargetDir)$(TargetName).pdb" ..\..\..\game\MY_MOD\bin\.\$(TargetName).pdb
if ERRORLEVEL 1 goto BuildEventFailed
goto BuildEventOK
:BuildEventFailed
echo *** ERROR! PostBuildStep FAILED for $(ProjectName)! EXE or DLL is probably running. ***
del /q "$(TargetDir)$(TargetFileName)"
exit 1
:BuildEventOK
=Problems with running your mod=
If, at startup, after the intro video, your mod crashes while Steam is active, but it runs without problem if Steam is shut down, then you follow these instructions:
# - to Open file steam_api.h (src\public\steam)
# - Find this and DELETE/COMMENT (Lines 551 - 562):
	m_pSteamMusicRemote = SteamClient()->GetISteamMusicRemote( hSteamUser, hSteamPipe, STEAMMUSICREMOTE_INTERFACE_VERSION );
	if ( !m_pSteamMusicRemote )
	{
		return false;
	}
	
	m_pSteamHTMLSurface = SteamClient()->GetISteamHTMLSurface( hSteamUser, hSteamPipe, STEAMHTMLSURFACE_INTERFACE_VERSION );
	if ( !m_pSteamHTMLSurface )
	{
		return false;
	}
Category:Programming
Shader authoring/Compiling Shaders

To compile FXC files, list them in a text file (one per line), then run src\materialsystem\stdshaders\buildshaders.bat on the text file. It will go process your .fxc code and compile all the combinations into your mod's directory. The syntax of the buildshaders.bat command line is: 
 buildshaders.bat [text filename] -game [mod directory] -source [source directory]
Example:
 buildshaders.bat MyShaders -game "C:\Steam\SteamApps\SourceMods\MyMod" -source "C:\MyMod\Src"
Refer to stdshaders_dx8.txt and stdshaders_dx9.txt as examples of how to set up your shaders text file. All the source code for the shader DLL should be in the same directory as the .fxc, .vsh, and .psh files. After buildshaders.bat runs, you can look in the fxctmp9 sub-directory to see the include files generated by the shader compiler.
Category: ProgrammingCategory: Shaders
Shaders in Debug\

The Debug\ folder of Source Materials.gcf contain shaders dedicated to debugging purposes.
*UnlitGeneric is used for 18 materials, making it the mostly commonly used shader here.
*LightmappedGeneric is used for debuglightmapzbuffer.vmt.
** LightmappedGeneric_DX8 is used for debuglightmap.vmt.
==Dedicated Shaders==
The following shaders are more or less exclusively used for this folder:
===Wireframe===
* Used for 14 materials in this folder, out of a 19 materials in total.
===DebugLightingOnly===
* Only used by the material debuglightingonly.vmt. 
* Not found in released mod code. 
===DebugLuxels===
* Used by the materials debugluxels.vmt and debugluxelsnoalpha.vmt. Also used for the Valve Hammer Editor. (See Shaders in Editor\.)
* Not found in released mod code.
===hsv===
* Used in only one material: hsv.vmt
* This material is directly referred to in src\cl_dll\view_scene.cpp in the mod code.
===ShowDestAlpha===
* Used in only four materials showblurredcolor.vmt, showdestalpha.vmt, showdestalphatimescolor_blurred.vmt and showdestalpha_blurred.vmt, all in this folder.
* Not found in released mod code.
===VertexNormals===
* Use only in one material: debugworldnormals.vmt
* Not found in released mod code.
===yuv===
* Used in only one material: yuv.vmt
* Converts the screen from RGB to YUV colorspace. Post-process shader. 
* Material referred to in src\cl_dll\view_scene.cpp
Category:Shaders
Shaders in Decals\

The Decals\ folder of Source Materials.gcf (and its subfolders) contain shaders used for decals.
*LightmappedGeneric is used for numerous materials, making it the most common shader for this folder.
*VertexLitGeneric is used for 36 materials.
*UnlitGeneric is used for 9 materials.
===Subfolders===
Only three types of shaders are used here: DecalModulate, VertexLitGeneric and Subrect.
==Dedicated Shaders==
The following shaders are more or less exclusively used for this folder:
===Subrect===
* Used in 89 materials in these folders, always in files ending with _subrect.vmt.
* It is also, to a much lesser extent, used in the Effects\ and Sprites\ folders.
===DecalModulate===
* Used in 55 materials in these folders only.
* See Using Modulation on how to use this.
* Only referred to once (in src\utils\xwad\xwad.cpp) in the released mod code.
===DecalBaseTimesLightmapAlphaBlendSelfIllum===
* Used in the materials decalglasswindow003a.vmt, decalmetalvent004a.vmt and decalporthole001b.vmt in these folders only.
* Replaced by LightmappedGeneric in numerous materials in both this folder and the Props\ folder.
* Not found in released mod code.
===ShadowModel===
* Used in only one material: rendermodelshadow.vmt
* Probably referred once (in src\cl_dll\clientshadowmgr.cpp) in the released mod code.
* Do not confuse with the proxy by the same name.
===Shadow===
* Used in the materials rendershadow.vmt and simpleshadow.vmt only.
* Do not confuse with the proxy by the same name.
Category:Shaders
Shaders in Editor\

==Editor Shaders==
The Editor\ folder of Source Materials.gcf contains shaders dedicated to the Valve Hammer Editor.
Less intense shaders are generally used.
*Sprite is used for 56 materials, all being entity marker icons.
*UnlitGeneric is used for 17 materials of various use.
*VertexLitGeneric is used 9 materials, mostly node entities.
*LightmappedGeneric is used for cordon.vmt only.
*Wireframe is used for wireframe.vmt only.
*DebugLuxels is used for lightmapgrid.vmt and lightmapgriddecal.vmt only.
==Dedicated Shaders==
The following shaders are more or less exclusively used for this folder:
===TranslucentLightmap===
* Used in only one material: TranslucentLightmap.vmt
* Not found in released mod code.
Category:Shaders
Shaders in Engine\

The Engine\ folder of Source Materials.gcf contains the following shaders:
*UnlitGeneric is used for 6 materials.
*Modulate is used for modulatesinglecolor.vmt.
==Dedicated Shaders==
The following shaders are more or less exclusively used for this folder:
===ColorCorrection===
* Used in only one material: colorcorrection.vmt
===DepthWrite===
* Used in only one material: depthwrite.vmt
* Not found in released mod code.
* Do not confuse this shader with the proxy by the same name.
===FilmDust===
* Used in only one material: filmdust.vmt
* Not found in released mod code.
===FilmGrain===
* Used in only one material: filmgrain.vmt
* Not found in released mod code (but probably referred to).
===InternalFrameSync===
* Used by only one material: framesync.vmt.
* Not found in released mod code.
===Occlusion===
* Used by only one material: occlusionproxy.vmt
===ShadowBuild===
* Used in only one material: shadowbuild.vmt
* Valve remark: "Used to generate render-to-texture shadows"
* Not found in released mod code.
===VolumetricFog===
* Used by the material Engine\volumetricfog.vmt. Also used for shadertesting. (See Shaders in shadertest\.)
* No parameters are given.
* Not found in released mod code.
* Reported not to work.
===WriteZ===
* Used in only one material: WriteZ.vmt
* Material referred to in src\cl_dll\c_vguiscreen.cpp.
Category:Shaders
Shaders in Glass

The Glass folder of and contain shaders dedicated to windows and glass materials:
*LightmappedGeneric is used for 46 materials.
*LightmappedGeneric_DX6 is used for the glasswindowbreak070a.vmt material (as a fallback shader for the LightmappedGeneric shader).
==Dedicated Shaders==
The following shaders are more or less exclusively used for this folder.
===LightmappedTwoTexture===
* Two textures are mixed evenly and multiplied by a lightmap. Useful if one or both base textures are in motion.
* Used in only one material: glasswindow018a_cracked.vmt
* Not found in released mod code.
===ShatteredGlass===
* Used in only one material: glasswindowbreak070b.vmt
* Only referred to once in released mod code (in src\utils\vbsp\cubemap.cpp).
* Closely related to the $crackmaterial parameter, which in turn is related to the func_breakable_surf entity.
===ShatteredGlass_DX7===
* Used in the glasswindowbreak070b.vmt material (as a fallback shader for the ShatteredGlass shader). See above.
===ShatteredGlass_DX8===
* Used in the glasswindowbreak070b.vmt material (as a fallback shader for the ShatteredGlass shader). See above.
Category: Shaders
Shaders in Nature\

The Nature\ folder of hl2_misc_dir.vpk contains the following shaders:
*LightmappedGeneric is used for 71 materials.
*LightmappedGeneric_DX9 is used for 5 materials (as a fallback shader for LightmappedGeneric and WorldVertexTransition).
*Water is used for several materials.
*UnlitGeneric is used for the tree_card_clump.vmt and the water_movingplane_beneath.vmt materials.
==Dedicated Shaders==
The following shaders are more or less exclusively used for this folder.
===Cloud===
* Only used by the cloud001c.vmt material. Also used by 2 materials in the shadertest\ folder.
* Not found in released mod code.
===LightmappedGeneric_DX6===
* Used by the materials toxicslime002a.vmt and water_movingplane.vmt as a fallback shader for LightmappedGeneric. Also used in the Dev\ and Glass\ folders. 
* Referred to twice in src\materialsystem\stdshaders\lightmappedgeneric_dx8.cpp in the released mod code.
===Water_DX60===
* Used by 22 materials (as a fallback shader for the Water shader) in this folder. Also used in the Dev\ folder to a lesser extent.
* Referred to in src\materialsystem\stdshaders\water_dx60.cpp and src\materialsystem\stdshaders\water_dx80.cpp in the released mod code.
===Water_DX80===
* Used by 19 materials (as a fallback shader for the Water shader) in this folder only.
* Defined in src\materialsystem\stdshaders\water_dx80.cpp in the released mod code.
===Water_DX81===
* Used by 15 materials (as a fallback shader for the Water shader) in this folder only.
* Defined in src\materialsystem\stdshaders\water_dx81.cpp in the released mod code.
===Water_DX90===
* Only used by 3 materials in this folder. Also used by the dev_water3.vmt material in the Dev\ folder.
* Defined in src\materialsystem\stdshaders\water.cpp in the released mod code.
* Remarks from Valve: "Only used in dx90 and higher", "NOTE: These are only used by DX9 water, since forceExpensive isn't defined.", "ALSO NOTE: This *cannot* exist in the root level, because the presence of this is used to determine whether to do the reflection in the client DLL"
===WorldVertexTransition===
* Used by 46 materials in this folder. Also used in the Concrete\ and Dev\ folders, to a much lesser extent.
* Mostly used in materials starting with "blend".
* Probably referred to in released mod code.
* See WorldVertexTransition for more information.
===WorldVertexTransition_DX9===
* Used only in the canal_reeds.vmt material (as a fallback shader for the WorldVertexTransition shader).
* Not found in released mod code.
Category: Shaders
Shaders in Sprites\

The Sprites\ folder of Source Materials.gcf contain shaders handling sprites and HUD (Heads-Up Display) elements:
*UnlitGeneric is used for 52 materials.
*Refract is used for the heatwave.vmt material.
*Refract_DX60 is used for the heatwave.vmt material (as a fallback shader for the Refract shader).
*Subrect is used for the fire_floor_subrect.vmt material.
==Dedicated Shaders==
The following shaders are more or less exclusively used for this folder:
=== Sprite ===
* Used in numerous materials.
*
=== predator ===
* Used in only one material: predator.vmt
* Not found in released mod code.
Category:Shaders
Shaders in Tools\

The Tools\ folder of Source Materials.gcf contains the following shaders:
*LightmappedGeneric is used for 18 materials.
*UnlitGeneric is used for the toolsblack.vmt and toolsdotted.vmt materials.
==Dedicated Shaders==
The following shaders are more or less exclusively used for this folder:
===SkyFog===
* Used in only one material: toolsskyfog.vmt
* Not found in released mod code.
Category:Shaders
Shaders in cable\

The cable\ folder of Source Materials.gcf contain shaders dedicated to cables, all of them exclusively used for this folder only.
===Cable===
* Used in all 14 materials, in this folder only.
* Materials are referred to at various point in the mod code.
===UnlitGeneric_DX6===
* Used in 4 materials (as a fallback shader for the Cable shader).
* Probably referred to in src\materialsystem\stdshaders\unlitgeneric_dx8.cpp.
Category:Shaders
Shaders in hlmv\

The hlmv\ folder of Source Materials.gcf contain shaders dedicated to HLMV (Half-Life Model Viewer):
*VertexLitGeneric is used for the background.vmt material.
*UnlitGeneric is used for 5 materials.
*Wireframe is used for two materials: debugmrmwireframe.vmt and debugwireframe.vmt
Category:Shaders
Shaders in particle\

The particle\ folder of Source Materials.gcf contains the following shaders:
*UnlitGeneric is used for 10 materials.
==Dedicated Shaders==
The following shaders are more or less exclusively used for this folder:
===ParticleSphere===
* Used by only one material: SmokeStack.vmt
* Used for env_particlelight entity ?
* Referred to in particlemgr.h, but probably not defined in the released mod code.
Category:Shaders
Shaders in scripted\

The scripted\ folder of Source Materials.gcf contains only the following shaders:
*UnlitTwoTexture is used in the breen_fakemonitor_1.vmt material.
==Dedicated Shaders==
The following shaders are more or less exclusively used for this folder:
===introscreenspaceeffect===
* Used in only one material: intro_screenspaceeffect.vmt
* Not found in released mod code.
Category:Shaders
Shaders in shadertest\

The shadertest\ folder of Source Materials.gcf contain shaders dedicated to shadertesting:
*LightmappedGeneric is used for 48 materials.
*UnlitGeneric is used for 29 materials.
*Water is used for 4 materials.
*Cloud is used for two materials: cloud.vmt and jet.vmt
*Eyeball is used for the Eyeball.vmt material.
*Modulate is used for the Modulate.vmt material.
*Refract is used for the glassbrick.vmt material.
*Sprite is used for the Sprite.vmt material.
*UnlitTwoTexture is used for the UnlitTwoTexture.vmt material.
*Wireframe is used for two materials: Wireframe.vmt and WireFrameVertexColor.vmt
*VolumetricFog is used for the VolumetricFog.vmt material.
*WorldTwoTextureBlend is used for the WorldTwoTextureBlend.vmt material.
==Dedicated Shaders==
The following shaders are more or less exclusively used for this folder:
===BaseTimesLightmapTimesDetail===
* Used in only one material: BaseTimesLightmapTimes2Detail.vmt
* Not found in released mod code.
===BaseTimesLightmapWet===
* Used in only one material: BaseTimesLightmapWet.vmt
* Not found in released mod code.
===Camo===
* Used in only one material: Camo.vmt
* Probably not found in released mod code.
* Do not confuse with the proxy with the same name.
===DebugModifyVertex===
* Used in only one material: DebugModifyVertex.vmt
* Not found in released mod code.
===GooInGlass===
* Used in only one material: GooInGlass.vmt
* Used for realistic glass container, containing a violent fluid.
* The alpha channel of "$basetexture" decides how much basetexture is shown on top of the bump map.
* Not found in released mod code.
===vertextexturetest===
* Used in only one material: vertextexturetest.vmt
Category:Shaders
Shaders without folder

These shaders originate from a very old list of shaders, written by only one user, and hasn't been verified since. They can not be found in any folder within the source materials.gcf file. It is uncertain if these shaders are working (anymore), or how to use them. If you can get any of them to work, please provide further documentation.
Shader Name 	Working?
AlienScale 	Found in the 2003 Source leak. Used by TF2 Invasion for the alien team models. Doesn't work in retail.
Camo 	Used by the Combine Sniper in earlier versions of Half-Life 2. Does not work in retail.
DebugBumpedLightmap 	
DebugBumpedVertexLit 	
DebugFbTexture 	Used for debugging the framebuffer (mat_showframebuffertexture)
DebugLightmap 	
SebugNormalMap 	
DebugUnlit 	
DebugVertexLit 	
Dillrate 	Used for mat_fillrate (see fillrate for explanation)
JellyFish 	Used for the Hydra in the E3 builds of Half-Life 2, works in every version of source so far, except, probably, Episode 2. Needs confirmation.
Jojirium 	Found in the 2003 Source leak. Used by TF2 Invasion to render resource zones. Does not work in retail.
ModelAdditiveTransEnvMapwithMaskedTexture	
Overlay_Fit 	
ReflectTexture 	
WaterSurfaceBottom 	
WorldVertexAlpha 	Used for displacements (terrain). The base texture is lightmapped, and the displacement vertex alpha is used for translucency.
== See also ==
* List of Shader Commands
Category:Material System
Category:Shaders
Shadow (shader)

It is the shader used by dynamic render-to-texture shadows and requires the Shadow proxy to function. A variant of this shader, ShadowModel, is used to cast shadows on models and requires the ShadowModel proxy instead.
The shadow manager draws from decals/rendershadow.vmt and decals/rendermodelshadow.vmt for its shadows.
==Example==
 "Shadow"
 {
 //	"$basetexture" "Decals/simpleshadow"
 	"$no_fullbright" 1
 	"$decal" 1
 	"%noToolTexture" 1
 
 	"Proxies"
 	{		
 		"Shadow"
 		{
 		}
 	}
 }
 "ShadowModel"
 {
 	"$decal" 1
 	"$model" 1
 	"$no_fullbright" 1
 	"%noToolTexture" 1
 	"Proxies"
 	{		
 		"ShadowModel"
 		{
 		}
 	}
 }
== See also ==
* Dynamic shadows, which use these shaders.
* shadow_control, which is used to change the color of shadows loaded by the shadow manager.
Category:Shaders
Shantytown

== Overview ==
 Shantytown takes place in an imagined future reality where the earth has been largely overtaken by a jungle of poisonous fungus. Humanity has taken refuge in towering vertical cities protected by massive walls that spray fungicide into the jungle to keep it at bay. A heartless plutocracy controls these cities from the highest levels, while the poor and underprivileged live in squalid conditions in the lower levels. Our story takes place on the tenth level of one of these cities. Technology is more advanced than it is today, but it is only available to the wealthy people at the top. Most people in the city make do with run-down, dilapidated 21st century technology.
You control the heroine of the story, Ellie, a young inventor and her floating robot companion, T.E.D., who follows Ellie around wherever she goes.
== History ==
From start to finish it was about 5 months. However we [the students] had many other assignments and personal projects to do at the same time.
== External links ==
* Official website
=== Media ===
* Screenshots
* Trailer
=== Team ===
* Team credits
Category:Single Player Mods
Share Files Between Projects

In the creation of a mod, sometimes it is necessary to have a "global" file that both the "client" and "hl" projects can use. To set a file that can be updated from both projects, just follow these steps:
#Browse to your mod folder, e.g. C:\MyMods\Mod\ and go to the src directory. In this example, we are going to open the game_shared directory and create a new .cpp file.
#Create a text file by right-clicking the folder and clicking New -> Text Document. Rename it mysharedfile.cpp.
#Open up the solution file game.sln in VS.NET.
#Under the client project create a new folder under Source Files. Name it mod or whatever you prefer.
#Right-click the "mod" folder and select Add -> Add Existing Item.
#Browse to your C:\MyMod\Mod\src\game_shared directory and find mysharedfile.cpp. Double-click it to add it to your project.
#Repeat steps 4-6 for the hl project.
The point of doing this is that both projects now share the same file. This means it does NOT matter which project you use to edit your file, they will be updated and compiled by both. You can use this method for any type of file you want to share.
Category:Tutorials
Category:Programming