nyuuzyou/wikis huggingface dataset:
Content Streaming

Steam supports streaming content delivery - that is, not having to have to have the whole game downloaded in order to play it. This is achieved with the GCF virtual filesystem and lists of files needed to perform certain actions, known as reslists. At the time of writing there are four types of reslist: engine.lst, preload.lst, precache.lst, exclude.lst and one list for each map file in the game.
Reslist files can be found at root/reslists/ in any cache that streams.
==engine.lst==
The engine.lst file is likely to specify the files required before the game becomes 'Ready to play' and can launch to the main menu. It should contain code, resources needed for the menu system, and any content that is needed for all maps in the game (for instance, HUD elements or in a traditional multiplayer game all weapon models).
Half-Life 2’s engline.lst also calls for all of the game’s maps among other seemingly wasteful files. This is probably an error.
==preload.lst==
Defines what content Steam should download when the application is not running. Usually contains all reslists.
==precache.lst==
The content that must be present before a game launches. As such, defines how soon a user can load the game.
==exclude.lst==
Defines what content should be excluded, good to use in case there are some things NOT used in the map.
==Map reslists==
Each map reslist contains all of the content required to run that map. In Half-Life 2 there is also much unnecessary content in these files, particularly in the form of voiceover speech, that is never used in the map. This is again likely to be an error.
==Consultation==
engine.lst, preload.lst and precache.lst are consulted by Steam when updating or launching a game. Map reslists are probably only directly consulted when loading that particular map. When a list is consulted, the game will not proceed until all of the content it (and any sub-lists) references is fully acquired.
==Generation==
To generate a reslist file for your mod or map, use the following extra parameters when launching:
 -w 640 -sw -console -condebug -nocrashdialog -makereslists -usereslistfile maplist.txt %1 %2 %3 %4 %5
"condebug" is used for logging, "console" allows to see the progress, using a 640x480 window makes loading faster and less likely to crash or freeze randomly, "makereslists" puts the game into reslist mode. "usereslistsfile maplist.txt" tells the game to look at maplist.txt and load any maps listed there in order to generate their reslists (if you only want to generate the three non-map reslists, leave this command out). The %X figures allow for passing additional command line arguments. 
You could also make each reslist by hand but is it not recommended since the task is time consuming and tedious to do. Reslists do not accept wildcards.
Category:Steam
Context

Category:AI Programming
Map placed entities can have contexts assigned to them via ResponseContext keyvalue or AddContext input or via other means. They take the form: 
<key>:<value>[:<expirationTime>][,<key2>:<value2>[:<expirationTime2>]]
Where <key>:<value> is a minimal requirement for the context to be added and [:<expirationTime>] is an optional float value which tells when to expire the context in seconds, default is 0 which means no expiration time. You can also provide multiple contexts in one go by comma separating them.
==Context Value Operations==
Contexts provide a way to modify already stored context value. There are 4 available operations:
*Copy : (default operation) Copies the contents of the new value in place of the old one.
*Increment : ++<amount> Increments the stored value by the provided amount.
*Decrement : --<amount> Decrements the stored value by the provided amount.
*Toggle : ! Inverts the truthfulness of the stored value, the end result value would be either 0 or 1.
Examples of such operations:
*Incrementing the value by 5 of context contextName:
:contextName:++5
*Toggling the value of context contextName:
:contextName:!
==Context Usage==
When an entity with any such context keypairs is asked to dispatch a response, the keypairs are added to the Criteria set passed to the Rules system. Thus, map placed entities and triggers can specify their own context keypairs and these can be hooked up to response rules to do map-specific and appropriate responses.
For example, there is a npc_citizen with ResponseContext keyvalue is "customs_queue:1" in sdk_d1_trainstation_01.vmf.
This context will match the following criterion from script/talker/npc_citizen_terminal.txt:
criterion "IsTerminalCustomsQueue" "customs_queue" "1" required
And then according to this rule, response CitizenCustomsQueue would be chosen.
rule CitizenCustomsQueue
{
	criteria		IsCitizen ConceptTalkUse IsTerminalCustomsQueue NPCIdle
	response		CitizenCustomsQueue
}
==Related Entities==
*worldspawn
*CBaseEntity
**KeyValue:
***ResponseContext(string) : "Response Contexts" : "" : "Response system context(s) for this entity. When this entity speaks, the context(s) will be passed to the response rules system."
**Input
***AddContext(string) : "Adds a context to this entity's list of response contexts."
***RemoveContext(string) : "Remove a context from this entity's list of response contexts. The name should match the 'key' of a previously added context."
***ClearContext(void) : "Removes all contexts in this entity's list of response contexts."
*env_speaker (this can have a script file containing rules for playing appropriate sounds.)
*ai_speechfilter
*filter_activator_context (allow filtering based on the contexts of an entity)
Control Point (particles)

Control Points are used to pass data into and between particle systems. A system can have up to 64, each of which can store the following:
* An attachment type
* An attachment point
* An origin
* A matrix (usually for rotation)
* An associated entity
The meanings of these values are flexible however, and "cheats" such storing an RGB colour in the origin value are supported.
Particle systems inherit the control points of their parents.
== Defining ==
=== Within a particle system ===
Use one of these Operators:
* Set Control Point Positions
* Set Control Point To Particles' Center
* Set Control Point To Player
* Set child control points from particle positions
* Movement Match Particle Velocities
=== In a map ===
Fill in the fields of the info particle system used to spawn the system. CP0 is the origin of the entity.
=== In code ===
See Particles In Code#Control points.
=== In a QC ===
 However, see the Position on Model Random initializer.
== Mapping to other values ==
=== Mapping functions ===
; Operators
: Remap Control Point to Scalar
: Remap Distance to Control Point to Scalar
: Remap Distance Between Two Control Points to Scalar
; Initializers
: Remap Control Point to Vector 
: Remap Control Point to Scalar
: Remap Initial Distance to Control Point to Scalar
=== Potential targets ===
; Scalar
: Lifespan
: Creation time
: Radius
: Roll speed
: Alpha
: Alpha alternate
: Sequence number
: Sequence number 1
: Trail length
: Particle ID
: Yaw
; Vector
: Position
: Roll
: RGB Colour (normalised)
=== Other ===
These sample values from CPs rather than remapping their literal values:
* Color Light from Control Point
* Velocity Inherit from Control Point
== Spawning children at control points ==
By default, child systems spawn at their parent's origin. To change this, use one of the "Position" Initializers with a reference to the appropriate CP number.
Category:Particle System
Category:Glossary
Controlling portals

Controlling portals is the basis for nearly any puzzle-based Portal map. If your player can create portals anywhere, most puzzles become trivial and not fun. The following suggestions aim at forcing players into using portals on specific areas and also how to help them control their portals.
== Textures ==
Portals cannot be made on textures which have "%noportal" 1 in their .vmt file. For the default Portal texture set, most textures that are concrete are portal-enabled while metal ones are not. This is the main way to prevent players from putting a portal on a wall.
== ==
This brush entity stops any portals from being made within it. To create one, just cover an area you wish to disallow portals (like the ceiling and floors of an elevator room) in a brush textured with tools/toolsinvisible and tie it to the entity.
== ==
This brush entity is used on the edges between portal-enabled and portal-disabled textures. If the player shoots their portal not fully onto the portal-enabled surface, this entity will "bump" it so the portal is fully on the portal-enabled surface. To create one, create a brush just in front of the edge where the two surfaces meet, cover it with the texture tools/toolsinvisible and tie it to the entity.
== ==
When a player passes through this trigger, their portals will be erased. It can also be set to dissolve any physics objects (like cubes, spheres or cameras). To create one, make a brush across the area where you want it to trigger, apply the tools/toolstrigger texture to it and tie it to the entity. This is mainly used when creating a portal/object fizzler.
== ==
This brush entity rotates portals based in it's volume so they are always facing a certain direction. To create one, make a brush textured with tools/toolsinvisible and tie it to the entity. Then set the AnglesToFace value to whichever direction you want the bottom of the portal facing.
== See also ==
* Portal Level Creation
Category:Entities by topic
Category:Level Design
Category:Tutorials
Category:Portal
Convert TGA to VTF In-engine

This is a helper method that accepts a source TGA path, and spits out a VTF to to specified path based on the TGA. To use it, you will need to include "vtf/vtf.h" in your code to pass through texture flag arguments such as "TEXTUREFLAGS_NOMIP".
It was created to use with a custom load game menu as there doesn't seem any clear way to load TGAs into the interface at present, and all code that does this is part of the closed source GameUI DLL. It was compiled using camomaterialproxy.cpp (reading a TGA) and VBSP's cubemap.cpp (writing VTFs). If you need to extend this, the code in those files is a good place to start.
#include "filesystem.h"
#include "bitmap/tgaloader.h"
#include "vtf/vtf.h"
[...]
// Converts the source TGA to the destination VTF on disk. Returns true on success.
// VTF flags are members of the enum CompiledVtfFlags in vtf.h.
// Pass the optional argument as true to remove the source TGA after a successful conversion.
bool ConvertTGAtoVTF(const char *pSourceTGA, const char *pDestVTF, int pVTFFlags, bool pRemoveSourceTGA = false)
{
	enum ImageFormat indexImageFormat;
	int indexImageSize;
	float gamma;
	int w, h;
	if (!TGALoader::GetInfo(pSourceTGA, &w, &h, &indexImageFormat, &gamma))
	{
		Warning("Unable to find TGA: %s\n", pSourceTGA);
		return false;
	}
	indexImageSize = ImageLoader::GetMemRequired(w, h, 1, indexImageFormat, false);
	unsigned char *pImage = (unsigned char*)new unsigned char[indexImageSize];
	if (!TGALoader::Load( pImage, pSourceTGA, w, h, indexImageFormat, gamma, false ) )
	{
		Warning("Unable to load TGA: %s\n", pSourceTGA);
		return false;
	}
	// Create a new VTF
	IVTFTexture *vtf = CreateVTFTexture();
	// Initialise it with some flags (nomipmap is good for using in the VGUI)
	vtf->Init(w, h, 1, indexImageFormat, pVTFFlags, 1);
	unsigned char* pDest = vtf->ImageData(0, 0, 0);
	// Memcpy it to the VTF
	memcpy(pDest, pImage, indexImageSize);
	// Write
	CUtlBuffer buffer;
	vtf->Serialize(buffer);
	bool vtfWriteSuccess = g_pFullFileSystem->WriteFile(pDestVTF, "MOD", buffer);
	// Clean up
	DestroyVTFTexture(vtf);
	buffer.Clear();
	if (!vtfWriteSuccess)
	{
		Warning("Unable to write VTF: %s\n", pDestVTF);
		return false;
	}
	// Remove the original
	if (pRemoveSourceTGA)
	{
		g_pFullFileSystem->RemoveFile(pSourceTGA, "MOD");
	}
	return true;
}
Category:Free source code
Convert WAD to VMT...

The Convert WAD to VMT... tool in allows you to fix the scale of non-power-of-two WAD textures after converting to VTFs and VMTs with xwad, as well as change the materials to include preceding paths. Additionally, some common tool textures will be changed from their GoldSrc counterparts to their Source 1 counterparts (example: becomes , becomes , etc.).
==See also==
* Goldsource to Source content porting tutorial
Category:Hammer Tools
Category:GoldSrc to Source
Converting brushes to models with XSI

Category:Level Design
Category:Tutorials
Category:XSI
Not all geometry is suitable for brushes. Anything that needs to be repeated over and over, be lit dynamically or be highly detailed is generally better off as a model. This tutorial will guide you through the process of exporting a brush from Hammer into the XSI Mod Tool and then out again to a compiled model ready for use as a prop.
*1 unit in Hammer = 1 unit in XSI
*You'll have to set Texture UV in XSI again, so don't spend much time tuning texture in hammer.
== Exporting from Hammer ==
With the geometry you want to convert selected, press or click the "Create Prefab" button (in the New Object toolbox). It doesn't matter which tool you have active.
Save the file somewhere accessible.
== Importing to XSI ==
In XSI, click and select the prefab file you just saved from Hammer. Ignore the Texture Path option.
:
**Go to visibility options(click eye icon in each view), select the Visibility options button, then in its pop up window, select the Visual Cues Tab, then set U/V Cell/Snap Size to 16 or 32 in Floor/Grid Setup, then click Copy to Translate Snap Increment.
:*In the Snap panel, click ON and grid icons.
*Now XSI works like Hammer's Snap to Grid. 
*Move loaded mesh to the world origin. The world origin in XSI will be the pivot point in Hammer. See Animators Guide to Scripted Sequences for details.
Move the brush so that the World Origin to be centered on the ground
Moved correctly
*Select the mesh, then click cut button in the Constrain panel. This will free the mesh from MapRoot which has rotations.
*Delete MapRoot.
*Select the mesh, do Freeze and Freeze All Transformation.
*Now you can edit it as you like, give it more detail, etc. Don't forget to texture it, for SMD exporter only export mesh with material and UV informations.
*If you are happy with your mesh, Freeze and Freeze All Transformation again, then click ValveSource>Export SMD, and export as a reference SMD.
Export SMD
==Compile==
*Now compile the model and textures. Here Cannonfodder's StudioCompiler was used for compiling prop_static model and texture.
Compiling Model
Compiling Texture
*Preview the compiled model in HLMV
==Hammer again==
*Place it as prop_static in hammer.
*Set the World Model in entity properties.
*Now place the model as you like.
Convexer

__NOTOC__
Convexer is a mapping tool for in the form of a blender addon. It has a free Linux/GNU Version and a paid Windows version available for $30 USD via paypal located on the website.
== Install Instructions ==
=== Building on common linux distributions ===
Install GCC, G++ compilers, next input the following into your terminal to download the addon
Once it has downloaded we will build the binaries as such
Now that the binarys are built we will move the files to "Blender/3.2/scripts/addons/convexer"
==Media==
== See also ==
== External links ==
Category:Third Party Source Tools
Coordinates

Coordinates are used to describe locations. Each one is a group of "ordinate" numbers which taken together can be plotted on a grid, one ordinate per dimension.
Coordinates in Source are (X,Y,Z), where X is forward/East, Y is left/North, and Z is up. (0,0,1) is a point one unit directly above the origin.
Source is using right handed coordinate system.
Coordinates are often stored alongside a set of rotation angles.
== Origin ==
The origin of an object is the point at which its local coordinates are (0,0,0). It is the mathematical centre from which local coordinates are relative. It is rarely the centre of the visible object, however.
== See also ==
* Vector
* QAngle
* Dimensions
* Wikipedia:Coordinate system
* GetAbsOrigin()
* $origin and $autocenter (for models)
Category:Glossary
Core (shader)

It is used to create a unstable, reflecting and refracting core of energy, used exclusively for the Core reactor in the Citadel in Episode One.
==Shader Parameters==
==Example==
The Core material used in Episode One, materials/models/props_combine/core_sheet.vmt
 "Core"
 {
 	"$normalmap" "Models/props_combine/core_normal"
 	"$dudvmap" "Models/props_combine/core_dudv"
 
 	"$corecolortexture" "models/props_combine/corewarpcolor"
 	"$flowmap" "models/props_combine/core_flow"
 
 	"$model" 1
 	"$REFRACTAmOUNT" "0.15"
 	"$FLOWMAPSCROLLRATE" "[.0475 .133]"
 //	"$envmap" "CustomCubeMaps/core"
 	"$envmap" "env_cubemap"
 	"$refracttint" "[0.7 0.7 0.6]"
 	"$envmaptint" "[0.8 0.6 0.6]"
 	"$FLOWMAPTEXCOORDOFFSET" "1.0"
 	"$TempMin" 0
 	"$TempMax" 1
 
 	
 	"core_dx70"
 	{
 		"$fallbackmaterial" "models/props_combine/coredx70"
 	}
 
 	"core_dx80"
 	{
 		"$normalmap" "dev/water_normal"
 		"$dudvmap" "dev/water_dudv"
 		"$bumptransform" "center .5 .5 scale 5 5 rotate 0 translate 0 0"
 		"$envmapcontrast" "1.0"
 	}
 
 	"Proxies"
 	{
 
 		"Sine"
 		{
 			"resultVar" "$FLOWMAPTEXCOORDOFFSET"
 			"sineperiod" 4
 			"sinemin" "$TempMin"
 			"sinemax" "$TempMax"
 		}
 		"AnimatedTexture"
 		{
 			"animatedtexturevar" "$normalmap" 
 			"animatedtextureframenumvar" "$bumpframe"
 			"animatedtextureframerate" 29.00
 		}
 	}
 }
Costly collision model

A costly collision model is one with over 20 convex parts. You will receive this error when going over it:
 WARNING: COSTLY COLLISION MODEL!!!! (30 parts - 20 allowed)
 WARNING: Error with convex elements of myfirstmodel-phys.smd, building single convex!!!!
 Model has 31 convex sub-parts
 Collision model completed.
The appearance of "error with convex elements" is itself an error, so ignore it. Your meshes are (probably) fine.
==Solution for Orange Box ==
Either try to decrease the number of convex meshes, or if you really do need that many of them (usually only excusable on very large models), to use the $maxconvexpieces command to override the limit to one of your own preference. For instance:
 $collisionmodel "myfirstmodel-phys.smd" { $concave $maxconvexpieces 30 }
==Solution for Ep1 ==
Episode One engine users must run studiomdl with the -fullcollide parameter when compiling instead.
Open a text editor and copy and paste the following:
 @echo on
 cd "%sourcesdk%\bin\ep1\bin\"
 studiomdl.exe -fullcollide %1
 @pause
Save the text file as a .bat (wrap quote marks around the filename if you are using Notepad to make sure it's not saved as a .txt instead). Then drag and drop your QC files onto the file to use it.
Category:Modeling
Category:Errors
Counter-Strike.rad

RAD files for various vanilla maps.
Some of the maps may have also been compiled using one of the default lights.rad from the , see Lights.rad/Half-Life SDK.
== de_cbble ==
== de_chateau ==
== de_dust ==
== de_dust2 ==
== de_piranesi ==
== de_vegas ==
Category:Counter-Strike
Category:Level Design
Category:RAD
Category:GoldSrc RAD files
Counter-Strike/Level Design

__NOTOC__
 This article focuses on Level Design. For general mapping tutorials, see :Category:Level Design.
== Getting Started ==
* [steam://install/254430/ Install Half-Life SDK (3.4) from Steam (must own Half-Life 1 on Steam)]
:* Download Hammer 3.4 from GameBanana
* Configuring Hammer for Counter-Strike
== General ==
For Counter-Strike:
* List of Counter-Strike entities
* List of Counter-Strike Skies
For Counter-Strike: Condition Zero:
* List of Counter-Strike: Condition Zero entities
== Map Types ==
* Assassination Scenario
* Escape Scenario
* Defusion Scenario
* Hostage Scenario
== Additional Information ==
=== Forge Game Data ===
For Counter-Strike:
* Official Counter-Strike FGD
* Custom improved Counter-Strike FGD
For Counter-Strike: Condition Zero:
*Official Counter-Strike: Condition Zero FGD
== External Tools ==
=== General ===
* GoldSrc External Tool Resource Site
=== Compiling Programs ===
* Zoner's Half-Life Tools
* Vluzacn's Map Compile Tools
=== Modelling Programs ===
* MilkShape 3D (purchase required)
: Download
* Blender (free)
: Download
* 3ds Max (purchase required)
: Download
=== Texture Editors ===
* GIMP (free)
* Photoshop (purchase required)
* Wally (free)
=== Alternative Mapping Tools ===
* An alternative to Hammer for GoldSrc created by Russian modders. J.A.C.K. offers many additional features for level editing and modding for Half-Life, as well as Quake 2 and 3. 
* An alternative to Hammer for GoldSrc. Development cancelled.
Category:Level Design
Category:Counter-Strike
Counter-Strike/Level Design/Assassination Scenario

The Assassination scenario was introduced for beta6, and works as follows: One player on the Counter-terrorist team acts as a VIP. With the protection of the Counter-terrorist team, he must reach a predefined goal without dying. The Terrorist team must kill him before he reaches the goal. Some ideas that are on the table for this scenario are vehicles/trains that drive the VIP to the escape zone while the Terrorists try to pick him off. If the VIP player makes it safely to one of the escape zones, the Counter-Terrorists win the round. If the Terrorists kill the VIP, they win the round. If the time runs out, the round is called a draw. Both teams will be limited to what guns they can buy (ie. T's can't buy MP5s, CTs can't buy AWPs).
Your map should be similar to a TFC hunted map in architecture. Have the Terrorists spawn not all in one group, spread them out. Also, construct elevated sniper roosts where the T's will spawn. The T's will all be in hiding spots and roosts that a typical Assassin would be in (ready and waiting with his AWP to pick off that VIP). You'll want to make your map with plenty of open space. Remember, most Assassins will be snipers, so give them plenty of roosts and spots great for sniping. Maps should be relatively linear, with the VIP having to get from one end to the other. However, make sure you have alternate routes, (more than one, perhaps 2 routes)
Make sure:
* Your map must have Terrorist spawns that are sniper roosts and hiding spots.
* CTs should have 13 spawns, T's should have 10 spawns
* Your map must have more than 1 route to the escapezone, vary it.
* Your map must have open spaces suitable for sniping.
* Your map must have at least one escape zone, preferably 2
* Your map should be similar to TFC-hunted maps, but the gameplay is not all that similar.
* Your map must not have any entities from other modes of play in it, ie hostage_entitys.
* Your map should be fairly linear, but with a few different routes.
* Your map should have a car or helicopter or something to denote escapezones.
* Your map must have the prefix As_. Example: As_Oilrig
Category: Level DesignCategory:Counter-Strike
Counter-Strike/Level Design/Defusion Scenario

Defusion (also known as c4 bombing) was introduced with beta4 of . The scenario is one of the most popular and is host to many of the most played CS maps.
A player on the Terrorist team starts with the bomb. He is to place it at a specified location in the map (). If the bomb explodes on the target, the T's win. If the CT's defuse it in time, they win. CT's can also buy kits that allow them to defuse faster. Each team can also win if they eliminate the entire other team. 
Make sure:
* Place two bomb target entities on your map. These are where you want the T's to place the bomb.
**You must make the bomb targets stand out, place a decal on the target. Directions for applying the decal: [Select the "Apply decals" tool in your toolbar (looks like a little explosion) and the "Selection tool". Next, select the "{TARGET" or "{TARGET2" decals from the texture browser. Now just select the surface of your choice in the 3D preview and you'll get your decal.]
**Strategically place the bomb target in a central location, somewhere between the CT and T spawn areas. Don't put it in an area that is easy to camp in, and make the distance between the two points no more than a 10-15 second walk from each other.
*Your explosion is nice and dramatic, please use this tutorial as a reference for how to blow things up!
Maps must be named in the form of de_mapname, to differentiate between hostage rescue maps.
Category: Level DesignCategory: Counter-Strike