nyuuzyou/wikis huggingface dataset:
Add Non-Steam Game

Non-Steam Games are saved in the file: <<Steam Installation>>\userdata\<<User ID>>\config\shortcuts.vdf.
Null (NUL) characters are used to denote the end of a key.
A key surrounded by two Null (NUL) characters denote the beginning of a set. (e.g. NULSet NameNUL)
Start of Header (SOH) characters are used to denote that next key is actually a value to assign to this key. (e.g. SOHKeyNULValueNUL)
Start of Text (STX) characters are used to denote that the next several keys are values to assign to this key. (Always four special characters - Could be one SOH and three NUL, or four NUL in a row)
Backspace (BS) characters are used to denote the end of a set. (e.g. NULSet NameNULDefinitionBS)
Typical format is as follows (New lines and indentation added for clarity; characters within two vertical separators [e.g. |NUL|] represent special characters):
|NUL|shortcuts|NUL|
 |NUL|0|NUL|
 |STX|appid|NUL||NUL||NUL||NUL||NUL|
 |SOH|AppName|NUL|APP NAME WITHOUT QUOTES|NUL|
 |SOH|Exe|NUL|"PATH TO EXE"|NUL|
 |SOH|StartDir|NUL|"DIRECTORY TO START IN"|NUL|
 |SOH|icon|NUL|"PATH TO ICON"|NUL|
 |SOH|ShortcutPath|NUL||NUL|
 |SOH|LaunchOptions|NUL||NUL|
 |STX|IsHidden|NUL||NUL||NUL||NUL||NUL|
 |STX|AllowDesktopConfig|NUL||SOH||NUL||NUL||NUL|
 |STX|AllowOverlay|NUL||SOH||NUL||NUL||NUL|
 |STX|OpenVR|NUL||NUL||NUL||NUL||NUL|
 |STX|Devkit|NUL||NUL||NUL||NUL||NUL|
 |SOH|DevkitGameID|NUL||NUL|
 |STX|LastPlayTime|NUL||NUL||NUL||NUL||NUL|
 |NUL|tags|NUL|
 |SOH|0|NUL|favorite|NUL|
 |BS|
 |BS|
 |NUL|1|NUL|
 ...
 |BS|
|BS|
Adding Convars to the Multiplayer Advanced Tab

This page discusses how to add your own convars to the 'Advanced' section in the Multiplayer tab of the Options menu. 
By default there should be nothing in this tab for your mod. To add convars to it create a user_default.scr file and place it in the cfg folder inside your mod folder.
Or just edit the "settings.scr", also in the cfg folder. That file comes with the mod
Add the following inside it:
// NOTE: THIS FILE IS AUTOMATICALLY REGENERATED, 
//DO NOT EDIT THIS HEADER, YOUR COMMENTS WILL BE LOST IF YOU DO
// User options script
//
// Format:
// Version [float]
// Options description followed by 
// Options defaults
//
// Option description syntax:
//
// "cvar" { "Prompt" { type [ type info ] } { default } }
//
// type = 
// BOOL (a yes/no toggle)
// STRING
// NUMBER
// LIST
//
// type info:
// BOOL no type info
// NUMBER min max range, use -1 -1 for no limits
// STRING no type info
// LIST delimited list of options value pairs
//
//
// default depends on type
// BOOL is "0" or "1"
// NUMBER is "value"
// STRING is "value"
// LIST is "index", where index "0" is the first element of the list
// Half-Life User Info Configuration Layout Script (stores last settings chosen, too)
// File generated: Tue May 26 04:33:22 AM
//
//
// Cvar	-	Setting
VERSION 1.0
DESCRIPTION INFO_OPTIONS
{
	"r_drawviewmodel" //the convar
	{
		"Draw the viewmodel" //the description
		{ BOOL } //the type of convar
		{ "1" } //the boolean value
	}	
	
	"viewmodel_fov" //the convar
	{
		"Adjust the field of view" //the description
		{ SLIDER 54 70 } //the type of convar
		{ "1" } //the boolean value
	}	
}
There's 2 example convars in there. One is a 'slider' and one a boolean. It's self explanatory how to add your own.
Category:Tutorials Category:Modding
Adding Credits To Your Map

The easiest way to add credits is using this as a .txt file:
<nowiki>
<php>
COMMUNITYMAPCREDITS: 
Eyal282
</php>
You can use the old HTML tags to add any text to your map, example:
<php>
 New! 
 Closed Double doors to allow CT to reach B easier.
Credits:
 Eyal282
</php>
</nowiki>
Adding Flexes to Bodygroups

Category:Modeling
There's an issue in Source with flexes (shapekeys) applied on bodygroup meshes that effectively makes them useless. This is frequent,for example, on models that have head bodygroup variations with flex controllers assigned to them. 
== The fix ==
You will need Blender and the other essential source exporting tools (Crowbar, Blender Source Tools) for this fix.
Assuming the shape keys already exist, split the mesh that will be used as a separate bodygroup. 
To ship bodygroups with flex controllers, select the mesh you're using as the bodygroup and then go to the flex properties panel and set it from "Simple" to "Advanced".
Next, create a .txt file with the following:
<!-- dmx encoding keyvalues2 1 format model 1 -->
"DmElement"
{
	"id" "elementid" "12345678-1234-1234-1234-012345678910"
	"name" "string" "root"
	"combinationOperator" "DmeCombinationOperator"
	{
		"id" "elementid" "01234567-8910-1112-1314-151617181920"
		"name" "string" "combinationOperator"
		"controls" "element_array" []
		"controlValues" "vector3_array" []
		"controlValuesLagged" "vector3_array" []
		"usesLaggedValues" "bool" "0"
		"dominators" "element_array" []
		"targets" "element_array" []
	}
}
Save this file somewhere and paste its location on the box that says "Controller Source", in the bodygroup's properties.
Then export your .DMX meshes. You'll get a warning that says there are missing shapekeys but that can be ignored.
Compile your model using Crowbar and this fix should work.
== Stereo Flexes ==
In order for stereo flexes to work with this method, you will need to manually split the stereo flexes on the mesh(es) without controllers defined into "[flexname]L" and "[flexname]R" versions, with only the left and right sides affected respectively.
== References == 
https://web.archive.org/web/20200710074830/https://steamcommunity.com/app/1840/discussions/0/2153224488982782040/
Adding Headlights to the Buggy

== The Tutorial ==
This tutorial explains how to add headlights to the Buggy.
It requires a basic understanding of C++ but the actual code is very simple.
For a video-based version of this tutorial, check out TheMaster974's YouTube video guide.
== The Code ==
=== vehicle_jeep.h ===
First, open vehicle_jeep.h.
Find:
	bool HeadlightIsOn( void ) { return m_bHeadlightIsOn; }
	void HeadlightTurnOn( void ) { m_bHeadlightIsOn = true; }
	void HeadlightTurnOff( void ) { m_bHeadlightIsOn = false; }
and replace them with:
	bool HeadlightIsOn( void ) { return m_bHeadlightIsOn; }
	void HeadlightTurnOn( void );
	void HeadlightTurnOff( void );
=== vehicle_jeep.cpp ===
Now for vehicle_jeep.cpp.
Go to void CPropJeep::Precache( void ) and add these:
	PrecacheScriptSound( "Airboat_headlight_on" );
	PrecacheScriptSound( "Airboat_headlight_off" );
Then in void CPropJeep::DriveVehicle( ... ) uncomment the following block of code:
	/*if ( ucmd->impulse == 100 )
	{
		if ( HeadlightIsOn() )
		{
			HeadlightTurnOff();
		}
		else
		{
			HeadlightTurnOn();
		}
	}*/
At the end of the file add:
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CPropJeep::HeadlightTurnOn( void )
{
	EmitSound( "Airboat_headlight_on" );
	m_bHeadlightIsOn = true;
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CPropJeep::HeadlightTurnOff( void )
{
	EmitSound( "Airboat_headlight_off" );
	m_bHeadlightIsOn = false;
}
Next, in void CPropJeep::ExitVehicle( int nRole ) replace:
	HeadlightTurnOff();
with:
	if ( HeadlightIsOn() )
	{
		‎‎‎‎HeadlightTurnOff();
	}
== Conclusion ==
And we're done! All we needed to do was uncomment some code and add a sound to play.
Now when you enter the car you can turn the headlights on and off by pressing your assigned flashlight key.
Category:Programming
Category:Vehicle Programming
Category:Free source code
Category:Tutorials
Adding Light

Now we’ll add some lighting to the room. If no lights are placed your map will automatically be lit “fullbright” when it is loaded in the game, but as you’ll have noticed this is hardly ideal. Creating lights will make your map look far more realistic.
# Activate the (lights are entities too) and pick from the drop-down list in the Object Toolbar. This is the most basic light of them all, and it shines all around from an invisible source. Place one in the center of the ceiling now by clicking in the 3D view:
# We are now going to edit the color and brightness of this light. Switch back to the , then double-click on the light entity in the 3D View to open the Object Properties dialog. To bring up the settings for the light’s brightness, find and click on the Brightness field in the Keyvalues list.
# While you could type a color into the new text box directly, it’s better to use Hammer’s built-in dialog by clicking the Pick color button, just beneath the text box:
# The Color dialog will now appear, letting us change the color of the light.
## Change the hue and saturation of the color by clicking in the square color spectrum area on the right.
## Because luminance is set to max, the color will still be white. Lower the luminance to change the color from bright white to something of the hue you picked. You can see how the color changes in the preview square at the bottom of the dialog to something more colorful, instead of white.
## Click the OK button to confirm your choice:
# We have now set the color of the light, but this has not affected its intensity. The color is described by the first three numbers of the Brightness setting, leaving the brightness value itself as the fourth number. Mark this number (currently 200) with the mouse, and enter 800 instead, to have the light shine four times as intensely: 
# Now that we’ve made changes to the light’s parameters, hit the Apply button to commit them. The color of the light’s icon will change to the color you have selected for it.
== Results ==
When you compile your map, you will see a sphere of light projected onto the walls that is brightest near to your light entity and darkest further away. Remember to disable if necessary!
Your light won’t have a visual source, however—it just appears from nowhere. You’ll be able to fix this in the next article.
== See also ==
* Intermediate Lighting
* Advanced Lighting
=== Light Entities ===
* — A basic, omnidirectional light source.
* — A directed light that shines in a cone.
* — The controller for global light cast from a skybox.
* — A dynamic light source that can be changed and moved in-game.
* — A dynamic light source like a light_dynamic, but it can also cast proper dynamic shadows. 
Category:Level Design
Category:Lighting
Category:Tutorials
Adding Menu Photos

Menu Photos are shown on the loading screen while the map is loading and on the map introduction. Players will be able to see how the map will look like if they are playing on the map for the first time.
__TOC__
== Creating your Menu Photos ==
Menu Photos are pretty simple to make but you should have some experience with materials and an image editor of your choice.
There are 2 files that are needed for menu photos:
*menu_photos_[mapname].vtf
*menu_photos_[mapname].vmt
The VTF is just a simple transparent overlay that contains the two thumbnails.
=== Creating the VTF file ===
# First, take some nice screenshots that show an important place in your map.
# Use GCFScape to extract one of the existing menu photos to use as a template for your VTF. You can find them in tf\materials\vgui\maps\menu_photos_[mapname].vtf.
# Choose one of the textures with "menu_photos_" in its name.
# Open the VTF of your choise with VTFEdit and export it as a PNG image.
# Open your PNG and your two screenshots with an image editor.
# Scale and rotate your screenshots so they fit perfectly on the existing thumbnails.
# Save your new image and export it to a VTF file again using VTFEdit. Save it as menu_photos_[your map's name].vtf.
# Move the file to tf\materials\vgui\maps. If the directories do not exist yet, create them.
=== Creating the VMT file ===
* Create a new file with notepad and paste the following code into it:
 "UnlitGeneric"
 {
 "$basetexture" "vgui\maps\menu_photos_mapname"
 "$translucent" 1
 "$ignorez" 1
 "$vertexcolor" 1
 }
* Replace "menu_photos_mapname" with your VTF file.
* Save the file as "menu_photos_[mapname].vmt" in the same directory as your VTF file.
* Move the file to tf\materials\vgui\maps. If the directories do not exist yet, create them.
=== Result ===
Test it out! You should now have a beautiful loading screen!
== See also ==
*Material Creation
*Team Fortress 2 Level Creation
Adding
Adding More Detail to a map (Black Mesa)

=Guide to Detailing=
Adding detail to your map can make it look more convincing and it's pleasing to the eye. This can also apply to other games, but mostly .
==Support Beams and Pillars==
One of the most simplest ways to add a lot of detail, is to create pillars along corridor walls, or outdoor buildings. This makes it look like the room/building is actually being held up by something, rather than no supports at all. You can also add beams like a i-beam along ceilings of corridors/buildings, then you may add a light strip suspended on the i-beam. Make sure, if you are using brushes for either the pillars/supports, that you tie them to a func_detail. This will greatly help with VIS. There are i-beam static props in , that you may add instead of making detail brushes.
==Decals==
Probably one of the easiest ways to detail you map is by using decals. Just by adding waste or dirt decals into an industrial area, makes it look like people actually had a job there, or that the floor hasn't been mopped in a while. You can also add posters, signs, cracks, papers, and trash decals to add even more detail. Make sure not to overuse decals though, as this will make your map look too cluttered or over-detailed.
==Props==
The most obvious way to detail your map, is by using different props. You probably will mostly use the prop_static to detail. Static props are used for objects that will not move, and are just for looks and to create atmosphere. You might use static props for metal crates, shelves, inaccessible doors, forklifts, desks, tables, counters, computers, and other things that will detail your map. The prop_physics will also probably be used more frequently. Physics props encourage the player to explore the world around them, and making a fun world as well. You can use them for puzzles or debris from an explosion for example. They are used for radios, chairs, stools, crates, (see item_crate), computers, monitors, wooden boards, and much more. Another type of prop that can be used is the prop_dynamic, which is used for props with animations, for example, a security camera that moves from side to side.
==Locked/Static Doors==
Locked/static doors are seen a lot throughout . They are created to make it seem like Black Mesa is way bigger than the player's bounds. The static doors are static props and they are placed inside a door frame. The player cannot interact with the doors. There are 14 skins for the door, suiting it for all types of areas, the door can also be used to block off areas that the player can't get to or get to yet. Some of the doors seen in have signs next to them that say "AUTHORIZED PERSONNEL ONLY" or "MAINTENANCE PERSONNEL ONLY", etc.. Those signs can give the idea of where the doors lead to, along with other methods. The locked lab door/sliding door can also be used when in lab areas. You can give the lab door the "buzz" sound when the player tries to enter it when it's locked, indicating that they are not authorized to enter. They also use the locked/red texture on the doors, (the door is made from a func_door.)
Also see: Static Doors.
Adding Muzzle Flashes that lights up the world

This tutorial will show how to add dlight muzzle flash that lights up the world around the player dynamically in GoldSrc.
== Coding ==
First navigate to ev_hldm.h and scroll to the bottom. After that, add this
void EV_HLDM_MuzzleFlash( vec3_t pos, float amount );
Then, open ev_hldm.cpp and find:
float EV_HLDM_PlayTextureSound( int idx, pmtrace_t *ptr, float *vecSrc, float *vecEnd, int iBulletType )
Below that, add this:
void EV_HLDM_MuzzleFlash(vec3_t pos, float amount)
{
 // make a dlight first
 dlight_t *dl = gEngfuncs.pEfxAPI->CL_AllocDlight(0);
 // Original color values
 int originalR = 231;
 int originalG = 219;
 int originalB = 14;
 // Randomize color components within the range of +/- 20
 dl->color.r = originalR + gEngfuncs.pfnRandomLong(-20, 20);
 dl->color.g = originalG + gEngfuncs.pfnRandomLong(-20, 20);
 dl->color.b = originalB + gEngfuncs.pfnRandomLong(0, 0);
 // Randomize the die value by +/- 0.01
 dl->die = gEngfuncs.GetClientTime() + 0.05 + gEngfuncs.pfnRandomFloat(-0.01, 0.01);
 // Randomize the radius based on amount
 dl->radius = gEngfuncs.pfnRandomFloat(245.0f, 256.0f);
 // Randomize the decay value
 dl->decay = gEngfuncs.pfnRandomFloat(400.0f, 600.0f);
}
Then, find the function definition:
void EV_FireWeaponName(event_args_t *args) // replace WeaponName with your weapon’s name
Find this in that function:
EV_GetGunPosition( args, vecSrc, origin );
Just after that, add this:
EV_HLDM_MuzzleFlash( vecSrc, 1.0 + gEngfuncs.pfnRandomFloat( -0.2, 0.2 ) );
== Credits and Reference ==
* This guide is a modified version of the guide from VERC and TWHL.
# https://web.archive.org/web/20061027233737/http://collective.valve-erc.com/index.php?doc=1031137353-13157900
# https://twhl.info/wiki/page/VERC%3A_Adding_muzzle_flashes_that_also_light_up_world_brushes
# This article's randomizer code was used here
* Also, there’s something called elights which doesn’t light up the world but entities and models.
Adding Point Entities

Now we’ll add some entities to the map. Entities are objects which have behaviors, and which can (usually) be interacted with somehow.
This page covers point entities, which are those that exist at a single point on the grid. Brush entities, covered by the next article, are slightly different.
----
	Entities are placed using the . Select it with , or from the left-hand icon bar.
----
	
Next we pick which entity to insert. There is a list of available entities in the Object Toolbar, which is in the lower-right corner of the Hammer window.
The one that we want at the moment is a spawn location for the player. Its exact name varies slightly. See :Category:Player spawn entities for a list.
* Singleplayer game: 
* Deathmatch game: 
* Team game: info_player_<team> (red/blue, terrorist/counterterrorist, axis/allies, etc.)
----
	
Now we’ll place this entity in the map.
When placing entities aligned with a surface, you can do this simply by clicking where on the surface you want it in the 3D View, so click somewhere on the floor of the room, like in the image here, and the entity will be placed at the spot you click:
----
===Placing Guns===
		
Many Source games involve shooting guns, so let’s place one. Weapons also vary from game to game, of course, but they always have names starting with weapon_.
You can search the entity list for that term to see a list of what’s available. If you're working with anything related to you'll have the option of creating a , like this:
Depending on the rules of the game you’re working with, you may need to create ammunition for the gun too before the player is able to fire it.
Not all games provide ammo entities however, and it’s not obvious which ammo type goes with which weapon even for those that do.
Try searching for item_ammo_ entities, but if that fails you can always use the Developer Console to enable cheats, and then give yourself ammo (after picking the weapon up) with the givecurrentammo command.
==Compiling==
Once a player start exists you can compile your map and walk around in it, hopefully without seeing any strange warnings. If you want to do this now, skip ahead to Saving and Compiling. 
Category:Level Design
Category:Tutorials
Adding Proximity Voice

This tutorial is going to show how to create a proximity chat for a HL2MP mod or equivalent.
This was implemented in the Source Mod Faceless by Ethereal Entertainment.
Open game/shared/voice_gamemgr.cpp
Then go to around line 228...
bool bProximity = false;
Change that to...
bool bProximity = true;
Next you need to change the distance at which it will project the voice. Locate line 106 and change...
m_iProximityDistance = -1;
To this...
m_iProximityDistance = 10;
Source:
http://t-plusplus.com/creating-proximity-chat-in-the-source-engine-sdk/
Category:Programming
Category:Tutorials
Adding Voice To Scratch SDK

If you start a Scratch SDK Project you will notice voice chat does not work or the icon will not show on the HUD, to fix:
== Steps ==
1. Add hud_voicestatus.cpp to the clientside project
2. Add this to scripts/HudLayout.res in your steam directory
	HudVoiceSelfStatus
	{
		"fieldName" "HudVoiceSelfStatus"
		"visible" "1"
		"enabled" "1"
		"xpos" "r43"
		"ypos" "355"
		"wide" "24"
		"tall" "24"
	}
	HudVoiceStatus
	{
		"fieldName" "HudVoiceStatus"
		"visible" "1"
		"enabled" "1"
		"xpos" "r200"
		"ypos" "0"
		"wide" "100"
		"tall" "400"
		"item_tall"	"24"
		"item_wide"	"100"
		"item_spacing" "2"
		"icon_ypos"	"0"
		"icon_xpos"	"0"
		"icon_tall"	"24"
		"icon_wide"	"24"
		"text_xpos"	"26"
	}
3. Make a file scripts/modtextures.txt and put this inside it:
"sprites/640_hud"
{
	TextureData
	{
		"voice_player"
		{
				"file"		"voice/icntlk_sv"
				"x"		"0"
				"y"		"0"
				"width"		"32"
				"height"	"32"
		}
		"voice_self"
		{
				"file"		"voice/icntlk_local"
				"x"		"0"
				"y"		"0"
				"width"		"32"
				"height"	"32"
		}
			
	}	
}
== Extra Notes ==
If voice transmission to other players isn't working you need to make sure that the GameRules class calls BaseClass::Think()
Thanks go to Rek55 and Tony Sergi.
Category:Programming
Adding Your Logo to the Menu

Instead of displaying your mod's name as a string of characters, you can have a logo image. To do this:
# Add gamelogo 1 to the top of gameinfo.txt (same block as game, type, etc.).
# Create <mod>\resource\GameLogo.res, a text file, with this template:
Resource/GameLogo.res
{
	GameLogo
	{
		ControlName	EditablePanel
		fieldName	GameLogo
		xpos		0
		ypos		0
		zpos		50
		wide		400
		tall		100
		autoResize	1
		pinCorner	0
		visible		1
		enabled		1
		offsetX		-20
		offsetY		-15
	}
	Logo
	{
		ControlName	ImagePanel
		fieldName	Logo
		xpos		0
		ypos		0
		zpos		50
		wide		400
		tall		100
		visible		1
		enabled		1
		image		../logo/TF2_Logo
		scaleImage	1		
	}
}
The path of the image field is relative to materials\vgui\. As you can see in the example above, the TF2 logo is actually stored in materials\logo\!
Do not include a file extension in the path.
Category:Modding
Category:Material System