nyuuzyou/wikis huggingface dataset:
State

Category:AI Programming
The NPC's State and Condition helps the NPC decide on an ideal Schedule. At any given time the NPC will only ever be in one state. You can change the state anywhere in your NPC logic with SetState(), for instance SetState( NPC_STATE_ALERT );
The following is a list of the states.
NPC_STATE_INVALID 
NPC_STATE_NONE 
NPC_STATE_IDLE 
NPC_STATE_ALERT 
NPC_STATE_COMBAT 
NPC_STATE_SCRIPT
NPC_STATE_PLAYDEAD
NPC_STATE_PRONE
NPC_STATE_DEAD
One interesting method that deals with states is the SelectIdealState() method. This method chooses a state based on its current state and conditions. 
The method implementation has a switch statement that reverts Ideal state selection to specific functions to the current state. 
switch ( m_NPCState ) 
{ 
 case NPC_STATE_IDLE: 
 { 
 NPC_STATE nState = SelectIdleIdealState(); 
 if ( nState != NPC_STATE_INVALID ) 
 return nState; 
 } 
 break; 
 case NPC_STATE_ALERT: 
 { 
 NPC_STATE nState = SelectAlertIdealState(); 
 if ( nState != NPC_STATE_INVALID ) 
 return nState; 
 } 
 break; 
 case NPC_STATE_COMBAT: 
 { 
 // COMBAT goes to ALERT upon death of enemy 
 if ( GetEnemy() == NULL ) 
 { 
 return NPC_STATE_ALERT; 
 } 
 break; 
 } 
 case NPC_STATE_SCRIPT: 
 { 
 NPC_STATE nState = SelectScriptIdealState(); 
 if ( nState != NPC_STATE_INVALID ) 
 return nState; 
 } 
 break; 
 case NPC_STATE_DEAD: 
 return NPC_STATE_DEAD; 
} 
We can see the switch statement in the case of NPC_STATE_IDLE state selection will be reverted to SelectIdleIdealState() method.
Stealth deathmatch

== Overview ==
Stealth deathmatch is a mod of Half-Life 2 Deathmatch, and requires Half-Life 2 Deathmatch to be installed in order to run.
It features no new maps or weapons, but alters the gameplay in two important ways:
* All players are almost completely invisible, except when shooting
* All players have a panel on their hud showing the distance to the nearest opposing player
These changes combine to completely alter the gameplay dynamics, and turn a fast & furious shooter into a stealthy game of cat & mouse, where feints, bluffs, and general sneakiness are the order of the day. More information can be read on the mod's website.
This mod has the grand title of being the first one that Winston actually saw through to completion. All the rest fell by the wayside, in favour of the next mod idea...
== History ==
This mod has lain around for a long time, it probably started around the end of 2006 and was tidied up & completed mid-2007.
Barring a few lan sessions, it was finally actually released on the 6th April, 2008.
== External links ==
* Mod homepage
Category:Multiplayer Mods
SteamCMDui

(SteamCMD User Interface) is a program used as an interface for the SteamCMD. It lists all software listed by the Steam API and gives the user the ability to download servers and software that you can download with the SteamCMD. It also can be used to create batch files which can be used with the SteamCMD.
== External links ==
* Latest releases of SteamCMDui on GitHub
Category:Third Party Tools
SteamOS

is an Linux distribution created by Valve to run Steam games without any extra software. SteamOS 1.0 (released in December 2013) and 2.0 (released in 2015) were based on Debian GNU/Linux and came with the GNOME desktop environment, while SteamOS 3.0 is based on Arch Linux and comes with the KDE Plasma desktop environment. SteamOS 3.0 is designed for the , but will soon be available to download and install on any PC or handheld.
More information can be found on this page.
Category: Steam
Category: Steam DeckCategory: Valve
SteamVR

SteamVR is a suite of tools and services for VR including OpenVR, Chaperone, Compositor, Lighthouse Tracking, and more.
== SteamVR Home ==
* SteamVR Home
* SteamVR Workshop Tools Documentation
* Get Started with SteamVR Workshop Tools
== Getting started ==
* Room Setup Tool
* Updating Firmware
* Updating Firmware: Valve Index
* Frame Timing
* Installing GPUView
* Troubleshooting: SteamVR + Vive Pre
* Troubleshooting: SteamVR + 1st Generation Dev Kit
== Documentation ==
* steamvr.vrsettings
* chaperone_info.vrchap
* Error Codes
* SteamVR Desktop Game Theater
== External links ==
* SteamVR Community
* SteamVR Discussion Forum
* OpenVR API Documentation
* Reddit SteamVR
Category:SteamVR
Category:Articles that should not be deleted
SteamVR/Combined Logging

Instructions for setting up combined logging for SteamVR.
444px
1) Set environment variable to tell SteamVR to output a combined log file. From the Start menu, type 'env', wait a second for Windows to prompt you to 'Edit environment variables for your account', then hit return. Click 'New' in the top section and set:
* Variable name: VR_COMBINED_LOGGING
* Variable value: 1
2) Install two helper tools:
* Windows Server 2003 Resource Kit Tools (for tail.exe). It will prompt you about compatibility; just click Run Program.
* ConEmu - A powerful command prompt that supports ANSI colors, and has a nice Quake-style fold up option using Ctrl+Tilde.
3) Open NotePad, paste the following, and save as log.cmd in C:\Users\<your username> (update paths if different).
* "C:\Program Files (x86)\Windows Resource Kits\Tools\tail.exe" -f "C:\Program Files (x86)\Steam\logs\vrcombined_log.txt" | grcat openvr.log
4) Launch SteamVR once to ensure vrcombined_log.txt gets generated. Then launch ConEmu (which should default to your User folder used above), type log, hit enter and you're done. Just leave it running and it'll update as SteamVR spits out data to its various logs.
Category: SteamVR
SteamVR/Desktop Game Theater

The SteamVR Desktop Game Theater is the component of SteamVR responsible for displaying traditional desktop games, as well as media files like movies, in virtual reality for SteamVR.
The SteamVR Desktop Game Theater executable can be found in "C:\Program Files (x86)\Steam\SteamApps\common\SteamVR\tools\steamvr_desktop_game_theater\win64\steamvr_desktop_game_theater.exe" (assuming a default Steam install).
=== Command line arguments taken by steamvr_desktop_game_theater.exe ===
* -legacygame [name]: A string ([name]) for the name of the game being launched, eg. "Team Fortress 2". It's not exactly clear where or how this parameter is used.
* -overlaykey "valve.steam.desktopgame.[appid]": The app to launch in the Steam Overlay, where [appid] is the game's Steam Application ID. Other kinds of application may be acceptable with a different prefix (non-Steam games?)
* -pid [pid]: The PID ([pid]) of the Steam Client Bootstrapper (Steam.exe) process that is responsible for the theater.
Category: SteamVR
SteamVR/Environments/Adding Sound

== Adding Sound to your Environments ==
===== Sourcing and Editing Sound Assets =====
An introductory guide to gathering and editing sound assets: Sourcing Audio Assets.
===== Importing Sound Assets =====
To import a sound file, simply move or copy it under the directory. If the sounds directory doesn't exist, create it first. The tools will automatically convert any supported file formats into a .vsnd file, which will be visible in the asset browser. The Workshop Tools only support Microsoft PCM WAV and MP3 encoded sound.
To loop sounds, the tools rely on WAV cue points (an engine quirk dating back to ). The cue points need to be inserted using an third-party application. Note that this does not work for MP3 files. See the Looping a Sound page for additional information.
===== Soundscapes =====
The simplest way to add ambient sounds to your environment is through Soundscapes.
===== Soundevents =====
You can also use Soundevents, which can be set up and triggered through a point_soundevent entity, added to animations or played from scripts.
== Sound advice ==
===== Layering =====
Your environment may sound more interesting if there are multiple layers of sounds looping, either in 2D or from various locations in 3D space. Layered loops of varying length can mask short repetitive loops to some degree, just make sure the overall sonic experience is not too busy and confusing.
===== The Mix =====
Valve SteamVR Home environments have typically been mixed to be quieter and more subtle than most VR content, in order to provide a space to relax into VR, take a break between games, and to match a focus on exploration, curiosity and social interaction. Test the audio mix of your addon to match existing content to really make it part of the family!
Category:SteamVR
Category:SteamVR Home
SteamVR/Environments/Adding Sound/Soundscapes

=== A guide to adding Soundscapes to your Environments ===
* If it doesn't already, ensure your addon has a soundscapes_manifest.txt and soundscapes_template.txt file in the scripts directory under game/steamtours_addons/<youraddon> (note this is the game directory, not the content directory).
* Rename soundscapes_template.txt to suit the addon, and then adjust the reference in soundscapes_manifest.txt on line 3 accordingly.
* Sound files go in the content/<youraddon>/sounds/ folder.
Documentation on how to create custom soundscape entries exists here - 
Soundscape
The map entity required is documented here -
Env_soundscape
===== Example =====
Here is an example of a workflow for a simple soundscape, with a looping ambient bed and some randomized spot sounds around the listener.
* In your map, add an env_soundscape entity. Ensure the radius covers the info_player_start entity by moving it closer and/or adjusting the Radius property in Hammer.
* In the new env_soundscape entity, set the Soundscape property to the name you want for your soundscape, for example - soundscape_whitelodge
* Add your audio files to the sounds folder. In this case we'll say there is one looping .wav file called "forest.wav" and three ‘spot sound’ .wav files called "owl_01.wav", "owl_02.wav" and "owl_03.wav". Ensure looping sound files have loop markers set up.
* Open your soundscapes script and add the following.
"soundscape_whitelodge"
{
 "playlooping"
 {
 "volume" "0.5"
 "pitch" "100"
 "wave" "sounds/forest.vsnd"
 }
 "playrandom"
 {
 "volume" "0.35"
 "pitch" "100" 
 "time" "10, 15"
 "soundlevel" "SNDLVL_50dB"
 "position" "random"
 "rndwave"
 {
 "wave" "sounds/owl_01.vsnd"
 "wave" "sounds/owl_02.vsnd"
 "wave" "sounds/owl_03.vsnd" 
 }
 }
}
Note: The .vsnd extension is for the compiled version of audio files in Source 2. When the sound first plays, it will get compiled into a .vsnd automatically. You don't need to change the audio file extension by hand, just use .vsnd in the soundscape script.
* Build the map and you'd now be able to hear forest.wav looping, and at randomized start times with a 10 to 15 second gap one of the owl files playing from a random position around the listener.
* If you'd like the owl sound to emit from a single set location, swap "position" for "origin" and provide the "x, y, z" coordinates relevant to your map.
* Adjust the volume, pitch, time and soundlevel to suit. The VConsole command 'cl_soundscape_flush' will allow you to reload the soundscape to hear tweaks.
Note: If the playlooping or playrandom entry does not include a position, soundlevel will not affect anything as there is no falloff of volume over distance.
Category:SteamVR
SteamVR/Environments/Checklist

Here's a quick checklist to help make sure SteamVR Home environment has everything it needs!
== World lighting ==
* Press menu button on controller, go to 'Things' and add a prop to the scene. If the prop is correctly lit, then lighting is working properly!
** Prop is completely black: you need to add a light source.
** Prop is lit on one side but black on the other: you need to add a box cubemap for ambient lighting.
** Prop does not cast shadows on the world:
*** Go through the unlit shader materials used for your world geometry and set them to receive shadows but not cast them.
*** Make sure one light source is set to cast shadows (a light_environment is often a good idea).
== World has physical collisions ==
* Add a physics prop to the scene using the in-game menu and let it fall towards the floor. If it rests on the floor, you have collisions! Throw the prop around to test further.
** Prop falls through world: On model import, set the "Collision type" drop down to "Collision using exact geometry". You can re-import the model over the old one using the same name, but you will need to redo any changes you made to its materials.
	 
== World has sky (optional) ==
* Look around in VR. Is there a sky of some description?
** Inky black void: add a sky to your scene - some example skies are included with SteamVR Workshop Tools. There are also a few modelled skyspheres you can place into your scene by dragging them in from the asset browser. Make sure scale and position is set appropriately.
	 
== World has teleport areas and/or markers (optional) ==
* Teleport around with the controller trackpad - if you've placed teleport areas and markers then these should operate correctly.
** Teleport area is shown all the time: select it in Hammer, click 'Tie Selected Meshes to Entity' and type vr_teleport_area into the object type field.
** Can teleport to places outside highlighted area: change to 'Mesh' selection mode in Hammer, click on the teleport area and in the object properties make sure 'Physics Type' is set to 'Mesh'.
== Before submitting to the Workshop ==
* Once you are happy with your environment, make sure to remove any test and temporary maps from your maps directories.
** These are located in steamapps\common\SteamVR\tools\steamvr_environments\content\steamtours_addons\[your_addon_name]\maps and steamapps\common\\SteamVR\tools\steamvr_environments\game\steamtours_addons\[your_addon_name]\maps.
== After uploading to the Workshop ==
* Don't forget to sign the Workshop agreement, or others will not be able to see your work.
* It's also good to subscribe to your new environment to double-check how it appears to the public. It will appear as a separate item in the in-game Environments list, with a default Steam icon.
* Make sure to set it as accessible to the public once everything is ready!
Category:SteamVR
SteamVR/Environments/Fog Tutorial VTEX

<!-- dmx encoding keyvalues2_noids 1 format vtex 1 -->
"CDmeVtex"
{
"m_inputTextureArray" "element_array" 
[
"CDmeInputTexture"
{
"m_name" "string" "FogGradientTexture"
"m_fileName" "string" "materials/effects/steamvr_home_gradient_fog.psd"
"m_colorSpace" "string" "srgb"
"m_typeString" "string" "2D"
"m_imageProcessorArray" "element_array" 
[
]
}
]
"m_outputTypeString" "string" "2D"
"m_outputFormat" "string" "RGBA8888"
"m_outputClearColor" "vector4" "0 0 0 0"
"m_nOutputMinDimension" "int" "0"
"m_nOutputMaxDimension" "int" "0"
"m_textureOutputChannelArray" "element_array" 
[
"CDmeTextureOutputChannel"
{
"m_inputTextureArray" "string_array" [ "FogGradientTexture" ]
"m_srcChannels" "string" "rgba"
"m_dstChannels" "string" "rgba"
"m_mipAlgorithm" "CDmeImageProcessor"
{
"m_algorithm" "string" ""
"m_stringArg" "string" ""
"m_vFloat4Arg" "vector4" "0 0 0 0"
}
"m_outputColorSpace" "string" "srgb"
}
]
"m_vClamp" "vector3" "0 0 0"
"m_bNoLod" "bool" "0"
}
 
Category:SteamVR
Category:SteamVR Home
SteamVR/Environments/QuickPanels

== Adding SteamVR Quick Panels to your Environment ==
When creating a map, you can choose to add Steam Quick Panels. These give any player who visits your environment access to Rooms, Friends, and Recent Apps.
1. In Hammer, select the entity button (looks like a light bulb)
2. In the entity class field, type ‘steamvr’ – it should autocomplete to ‘point_clientui_steamvr_world_panel’. Select this.
3. Click in the main view area to place a world panel. Rotate it so that it is upright – the light grey side is the front, and the dark grey side is the back
4. Hold shift and drag the panel to duplicate it – there should be three panels in all
5. In the Object Properties of each panel, under panel_type, select which panel you would like each to be – Public Lobbies, Recent Apps, or Friends
== Adding the SteamVR Community Items Panel to your Environment ==
Unlike the Quick Panels, the large community panel consists of two generic point clientui world panel entities. One for the main layout, and another overlaid for the item description popup.
1. Like above add a new panel entity, selecting the point_clientui_world_panel class. 
2. In the Object Properties set the width to 200, the height to 100, the DPI to 18, and the Interact Distance to a suitable number like 256. Set the Layout XML property to: file://{resources}/layout/vr_community_home.xml
3. Double click the panel in the 3D viewport and select the Outputs tab. Use the Add button to add two new outputs, and fill in the information like this:
CustomOutput1 | !self | AddCSSClass | ScreenOn | 0
CustomOutput0 | !self | RemoveCSSClass | ScreenOn | 0
4. Make a copy of the panel, for example by holding down the Shift key and dragging it on the viewport. Place the new panel just in front of the old one, and change the Layout XML property of it to read: file://{resources}/layout/vr_community_item.xml
Category:SteamVR
SteamVR/Environments/Scripting

The SteamVR Workshop Tools include the VScript scripting system with an extensive API, allowing many modifications and extensions to the game, including access of the VR motion controllers. Scripting is done using the Lua language.
Many of the Dota 2 scripting features also apply to the SteamVR Workshop Tools. Some of the links below may have inconsistencies when scripting for SteamVR instead of Dota 2.
== Getting Started ==
There are three main ways of running scripts in SteamVR Home. Game mode scripts are specific to the add-on, and are executed when a map in the add-on loads. Map scripts are executed when the specific map is loaded, and receive callbacks from the scripting system on certain events. Entity Scripts are set up on specific entities and execute when the entity is spawned.
* Map Scripts
* Entity Scripts
* Debugging Lua scripts
== Common Techniques ==
* Thinker Functions
* Console Commands
* Dedicated VConsole Log Viewer
* Listening to Game Events
== References ==
* Scripting API
* Animation System API
== New: Examples ==
* Lua Scripting Intro
* Linking Lua with Hammer
* Linking Lua with Javascript
* Creating a Flashlight Tool
* Custom Tool Creation
== New: Lua Resources ==
* Official Lua Website
* Programming in Lua - Good resource for learning Lua. If you're new to Lua or programming this is a good reference point to start from.
* Programming In Lua - Online - First edition of the above book is available online for free.
Category:SteamVR
Category:SteamVR Home
Category:Scripting
SteamVR/Environments/Scripting/API/CBasePlayer.IsVRControllerButtonPressed

== Function Description ==
 bool IsVRControllerButtonPressed(int nButton) 
Checks if the specified button on the motion controller is pressed.
;Example
local player = Entities:FindByClassname(nil, "player")
if player:IsVRControllerButtonPressed(24)
then
	print("Trigger 1 is pressed!")
else
	print("Trigger 1 is not pressed!")
end
== Parameters ==
Type	Name 	Description
int 	nButton	Button index to check.
== Returns ==
bool - Whether the button is pressed.
== Button Indices ==
Enumeration 	Value
IN_USE_HAND0 		24
IN_USE_HAND1 		25
IN_PAD_LEFT_HAND0 		26
IN_PAD_RIGHT_HAND0		27
IN_PAD_UP_HAND0 		28
IN_PAD_DOWN_HAND0 		29
IN_PAD_LEFT_HAND1 		30
IN_PAD_RIGHT_HAND1		31
IN_PAD_UP_HAND1 		32
IN_PAD_DOWN_HAND1 		33
IN_MENU_HAND0 		34
IN_MENU_HAND1 		35
IN_GRIP_HAND0 		36
IN_GRIP_HAND1 		37
IN_PAD_HAND0 		38
IN_PAD_HAND1 		39
IN_PAD_TOUCH_HAND0		40
IN_PAD_TOUCH_HAND1		41
Category:SteamVR
Category:SteamVR Home
Category:Scripting
SteamVR/Environments/Scripting/Map Scripts

The SteamVR Workshop Tools support map specific scripts that are executed when the map loads. These scripts can contain specially named callback functions that get executed by the script system.
Map scripts are designated by naming the script the same as the map, and placing it into the \steamvr_environments\game\steamtours_addons\<addon_name>\scripts\vscripts\map_scripts\ directory.
== Callbacks ==
Adding a function with the specific signature to the map script lets it get called from the game code.
Function 	Signature 	Description
OnInit 	void OnInit() 	Called when the script system loads.
OnPostInit 	void OnPostInit() 	Called after the script system has been initialized.
OnPrecache 	void OnPrecache(handle context) 	Called when assets are precached.
OnActivate 	void OnActivate() 	
OnInit 	void OnInit() 	Called when the script system loads.
OnGameplayStart 	void OnGameplayStart() 	
OnPlayerSpawned 	void OnPlayerSpawned() 	Called after the hosting player has spawned.
OnHMDAvatarAndHandsSpawned	void OnHMDAvatarAndHandsSpawned()	Called when the VR equipment of the hosting player is accessible.
OnDeactivate 	void OnDeactivate() 	
OnPreShutdown 	void OnPreShutdown() 	
OnShutdown 	void OnShutdown() 	
== Script System Functions ==
Functions available to the map script from the script system.
Function 	Signature 	Description
ScriptSystem_AddPerFrameUpdateFunction 	void ScriptSystem_AddPerFrameUpdateFunction(function updateFunction) 	Adds a function in the map script to be called every frame (90 FPS, 0.011 seconds).
ScriptSystem_RemovePerFrameUpdateFunction	void ScriptSystem_RemovePerFrameUpdateFunction(function updateFunction) 	Removes a previously added update function.
AddConVar 	void AddConVar(string conVarName, variable defaultValue, string type, table scope, string helpText, function callback)	Adds a new console variable bound to the specified script function.
SetConVar 	void SetConVar(string conVarName, variable value) 	Sets a scripted convar value.
GetConVar 	string GetConVar(string conVarName, int prevIndex = nil) 	Returns the name? of the specified convar.
Category:SteamVR
Category:SteamVR Home
Category:Scripting
SteamVR/Environments/lightcookies/

== Light Cookies ==
Light cookies serve a similar usage to 
Gobos in photography, in video games a Cookie is a projected texture from your light source, imagine it as a texture that covers the lens of your light source and affects all light that passes through.
This is used to simulate the effect that light produces when passing through different types of light fixtures. Cookies are often used to simulate IES light profiles to achieve more realistic light shapes.
Bellow is a list of the currently available Cookies in SteamVR Home, there texture and their usage ingame.
= Flashlight =
Image:Cookie_tutorial_texture_flashlight.png|The Flashlight texture.
Image:Cookie_tutorial_example_flashlight.png|The Flashlight texture applied as a Cookie.
= Spotlight1 =
Image:Cookie_tutorial_texture_1.png|The Spotlight1 texture.
Image:Cookie_tutorial_example_1.png|The Spotlight1 texture applied as a Cookie.
= Spotlight2 =
Image:Cookie_tutorial_texture_2.png|The Spotlight2 texture.
Image:Cookie_tutorial_example_2.png|The Spotlight2 texture applied as a Cookie.
= Spotlight3 =
Image:Cookie_tutorial_texture_3.png|The Spotlight3 texture.
Image:Cookie_tutorial_example_3.png|The Spotlight3 texture applied as a Cookie.
= Spotlight4 =
Image:Cookie_tutorial_texture_4.png|The Spotlight4 texture.
Image:Cookie_tutorial_example_4.png|The Spotlight4 texture applied as a Cookie.
= Spotlight5 =
Image:Cookie_tutorial_texture_5.png|The Spotlight5 texture.
Image:Cookie_tutorial_example_5.png|The Spotlight5 texture applied as a Cookie.
= Usage =
To apply a Cookie texture to your spotlight, select it in hammer and find the “Light Cookie” field in the spotlights object properties. Here add the name of one of the Cookies from the list above.
right|250px|thumb|The object properties dialog box of the spotlight entity, showing where a Cookie texture is defined.
Category:SteamVR