nyuuzyou/wikis huggingface dataset:
Mounting multiple games

This code extends the Orange Box's AdditionalContentId system to support mounting of multiple Game Cache Files via the gameinfo.txt. It can be used with the Ep1 codebase too.
If the content you want to mount is required in order to play your mod properly, you may want to hard-code the ID instead of relying it to be in the gameinfo.txt. Remember when doing this that the int you pass to filesystem->MountSteamContent() must be negative!
== The code ==
This code needs to be added to both the client and the server.
; Client
: Search cdll_client_init.cpp for MountAdditionalContent() and replace it. If it didn't already exist, add the code above CHLClient::Init, then call it from that function right before if ( CommandLine()->FindParm( "-textmode" ) ).
; Server
: Search gameinterface.cpp for MountAdditionalContent() and replace it. If it didn't already exist, add the code above CServerGameDLL::DLLInit and call before the gpGlobals = pGlobals; line in that func.
static void MountAdditionalContent()
{
	KeyValues *pMainFile = new KeyValues( "gameinfo.txt" );
#ifndef _WINDOWS
	// case sensitivity
	pMainFile->LoadFromFile( filesystem, "GameInfo.txt", "MOD" );
	if (!pMainFile)
#endif
	pMainFile->LoadFromFile( filesystem, "gameinfo.txt", "MOD" );
	
	if (pMainFile)
	{
		KeyValues* pFileSystemInfo = pMainFile->FindKey( "FileSystem" );
		if (pFileSystemInfo)
			for ( KeyValues *pKey = pFileSystemInfo->GetFirstSubKey(); pKey; pKey = pKey->GetNextKey() )
			{
				if ( strcmp(pKey->GetName(),"AdditionalContentId") == 0 )
				{
					int appid = abs(pKey->GetInt());
					if (appid)
						if( filesystem->MountSteamContent(-appid) != FILESYSTEM_MOUNT_OK )
							Warning("Unable to mount extra content with appId: %i\n", appid);
				}
			}
	}	
	pMainFile->deleteThis();
}
== Implementing in gameinfo.txt ==
Now you can mount content by adding something like this after the ToolsAppId:
 AdditionalContentId 220 //HL2
 AdditionalContentId 240 //CS Source
 AdditionalContentId 280 //HL Source
 AdditionalContentId 320 //HL2 Deatmatch
 AdditionalContentId 340 //HL2 Lost Coast
 AdditionalContentId 360 //HL Deathmatch: Source
 AdditionalContentId 380 //Ep1
 AdditionalContentId 400 //Portal
 AdditionalContentId 420 //Ep2
 AdditionalContentId 440 //TF2
Don't forget to add the relevant SearchPaths too.
== Bugs ==
Really big numbers will crash the game with an Error-Dialog by Valve. You could check if the value is within a certain range to stop this from happening, but I think the user will get by himself that this value cannot be mounted.
== See also ==
* IFileSystem
* Gameinfo.txt
* Steam Application IDs
Category:Programming
Category:Tutorials
MoveType

MoveType defines the way entity behaves and moves. For example movetype 0 will freeze the entity and nothing can affect it until its MoveType is changed.
== Various MoveTypes in Valve Source Engine titles ==
Name 	Decimal	Description
MOVETYPE_NONE 	0 	Freezes the entity, outside sources can't move it.
MOVETYPE_ISOMETRIC 	1 	For players in TF2 commander view etc. Do not use this for normal players!
MOVETYPE_WALK 	2 	Default player (client) move type.
MOVETYPE_STEP 	3 	NPC movement
MOVETYPE_FLY 	4 	Fly with no gravity.
MOVETYPE_FLYGRAVITY	5 	Fly with gravity.
MOVETYPE_VPHYSICS 	6 	Physics movetype (prop models etc.)
MOVETYPE_PUSH 	7 	No clip to world, but pushes and crushes things.
MOVETYPE_NOCLIP 	8 	Noclip, behaves exactly the same as console command.
MOVETYPE_LADDER 	9 	For players, when moving on a ladder.
MOVETYPE_OBSERVER 	10 	Spectator movetype. DO NOT use this to make player spectate.
MOVETYPE_CUSTOM 	11 	Custom movetype, can be applied to the player to prevent the default movement code from running, while still calling the related hooks.
Move track

This entity doesn't exist in any game only in FGDs. "Track Move Behavior" Doesn't work. It is the first in a chain of some keyframe_track, however, this entity has been probably replaced by the path_track entity.
It acts in the same way the path_track is used, only with less options in how to control the train that passes on it. Therefor it is recommended to use path_tracks for higher control over the entities that will pass on it.
== Keyvalues ==
:* 0 : Yes
:* 1 : No
== See also ==
*path_track - Entity that has replaced this one.
*keyframe_track - Entity probably connected to this entity.
Movement Lerp to Hitbox

Movement lerp to hitbox will pull the particle back towards the same part of the model it was spawned on, kind of like a magnet. This can be used to both have particles move to follow animated characters, and to keep normal particle operators from moving the particles away from the model.
According to Chris Green it's meant to work with initializers such as "position on model random", "position on model at specified height", "set hitbox to closest hitbox", that assigns a hitbox index and hitbox relative coordinates to the new particle.
Category:Particle operators
Mp buy allow guns

determines the groups of weapons that players are allowed to buy in the buy menu.
== Syntax ==
Its value is an integer from 0 to 255, interpreted as a bitfield. Each of the eight bits (1,2,4,8,16,32,64,128) stands for a group of weapons that is either purchasable (> 0) or not (= 0).
 Weapon Groups
Value	Weapon Type 	Weapons
1 	Pistols 	Glock-18 / P2000 / USP-SDual BerettasP250Tec-9 / CZ75-Auto / Five-SeveNDesert Eagle / R8 Revolver
2 	SMGs 	MAC-10 / MP9MP7 / MP5-SDUMP-45P90PP-Bizon
4 	Rifles 	Galil AR / FAMASAK-47 / M4A4 / M4A1-SSG 553 / AUG
8 	Shotguns 	NovaXM1014Sawed-Off / MAG-7
16 	Sniper Rifles	SSG 08AWPG3SG1 / SCAR-20
32 	Heavy 	M249Negev
64 	- 	-
128 	- 	-
To disable only some of the groups, set this ConVar to 255 minus those groups' values.
To enable only some of the groups, set this ConVar to 0 plus those groups' values.
Adding or subtracting 64 or 128 makes no difference as those bits do not enable/disable anything.
=== Examples ===
* The value 255 enables the purchase of all weapons. It is the default value. Equivalent to 63, 127 and 191.
* The value 35 (= 1+2+32) enables the purchase of pistols, SMGs and heavy weapons. Rifles, shotguns and sniper rifles are not purchasable. Equivalent to 99, 163 and 227.
* The value 0 disables the purchase of all of these weapon groups. Equivalent to 64, 128 and 192.
Mudkip

== Overview ==
Mudkip is an extremely early development mod based on HL2MP, which aims to be comical, yet structured. Currently the main focus is on weapon modification and creating maps which direct players to not just aim to shoot each other for frags, but to enjoy themselves using the theme of the game. The game mode programming is currently on pause until the new Source SDK is released.
== Planned Features ==
Defend the cake:
* CTF style play, twisted to be not only teams against each other, but also with many map-based obstacles
Attack of the furries:
* Attacking team dressed in fursuits; only weapon is "yiff", which causes harm to the targeted enemy player
* Defending team armed with fire, possibly a one-use banhammer
== Media ==
Image:Mudkipss1.jpg
Image:Mudkipss2.jpg
Image:Mudkipss3.jpg
Image:Mudkipss4.jpg
Image:Mudkipss5.jpg
Image:Mudkipmod big.jpg
Image:Mudkipmod small.jpg
* Video (Warning: Contains profanities)
* More mud_bixnood screenshots
* More mud_lolwut screenshots
== History ==
Mudkip development started on the eleventh of October, 2007.
== Team ==
* tj9991 - Creator
* Suomynona - Audio
* Flavin - Mapping
== Localized versions ==
There is currently no localization, which will be taken care of at a much later time.
== External links ==
* 
Category:Multiplayer Mods
MultiBlend

MultiBlend is a shader found in newer versions of Source (Alien Swarm). It allows for blending only on displacement surfaces using up to four different materials.
The texture preview in hammer requires you to set up additional VMT files for each texture to show up in the dialog. Those are not used by the shader itself.
==Example==
 MultiBlend
 {
 	$basetexture nature/grass_00c
 	$spectexture nature/grass_00a_spec
 	$scale 1.5
 	$rotation 0.0
 
 	$basetexture2 nature/sand_cracked001
 	$spectexture2 nature/sand_cracked001_spec
 	$scale2 3.0
 	$rotation2 0.0
 
 	$basetexture3 nature/sand_path001
 	$spectexture3 nature/sand_path001_spec
 	$scale3 3.0
 	$rotation3 0.0
 
 	$basetexture4 stone/stone_path007
 	$spectexture4 stone/stone_path007_spec
 	$scale4 3.0
 	$rotation4 55.0
 
 	%tooltexture test/terraintest-1
 }
== Supported effects ==
* $spectexture
* $$fow
== See also ==
* Lightmapped_4WayBlend
* WorldTwoTextureBlend
* Displacement
Category:Shaders
Multi manager (GoldSrc)

Lets you trigger multiple entities, potentially with a delay before fire for each targeted entity.
To trigger an entity with it, you must first turn off smartedit, then add keyvalue pairs for the targets. The "key" is the targetname of the entity you want to target. The "value" is the delay in seconds before the entity is triggered after the multi_manager itself has been triggered. The same targetname can be targeted multiple times at different delays, however the keyvalue will become targetname#1 and so on.
A maximum of 16 targets can exist for a single multi_manager.
==Key Values==
==Flags==
:
== See Also ==
* 
Category:Half-Life
Category:Half-Life Entities
Multi manager (Half-Life: Source)

Deprecated entity from , replaced by in .
==Key Values==
== Inputs ==
== Outputs ==
== FGD Code ==
@PointClass base(Targetname) color(255 128 0) iconsprite("sprites/multi_manager.vmt")= multi_manager : "MultiTarget Manager" 
[
 input Trigger(void) : "Fire this entity's outputs"
 output OnTrigger(void) : "Fired when this entity receives the Trigger input."
]
== See Also ==
*
Multiplayer Maps Not Appearing

For a level to appear in the Half-Life 2: Deathmatch map list, it must have an info_player_deathmatch in it.
The info_player_deathmatch entity creates a player spawn point for multiplayer games. When a player spawns in a level (either because he is just entering the level, or he has just died and is respawning) his location will be picked randomly from all of the available info_player_deathmatch spawn points.
Its a good idea to include a large number of these spawn points to prevent predictable spawning.
Category:Level Design FAQ
Multiple Skins for a Single Model

In some cases, it can be helpful for a mapper to be able to choose between different skins for the model. It's easy to add more variety to your custom models with multiple skins without creating a totally new model.
The advantage of having several skins in one model instead of compiling several new models are:
* Easier to find because the model overview isn't cluttered
* Less disk space and in-game model load time
* Faster than compiling a new model for each skin
* Skins can be changed dynamically via the Skin input
__TOC__
== Basic example with one skin replaced ==
The example here is a lamp that is either on or off, a different skin for each situation will make the model look a lot better.
$modelname mymodelfolder/mylamp.mdl
$cdmaterials modeltextures/mytexturefolder
$surfaceprop metal
$staticprop
$body studio "mylamp.smd"
$texturegroup skinfamilies
{
	{ "lampon" }
	{ "lampoff" }
}
$sequence idle "mylamp.smd" fps 1
$collisionmodel "mylamp_phys.smd"
You define your different textures between $texturegroup skinfamilies { and }. The name of the first texture (in this case "lampon") needs to be similar to the texturename you used in your model (If you are not sure, open the .smd with a text editor, in the triangles block you'll find the name). Otherwise studiomdl.exe doesn't know which one to replace.
In the following lines, you can define the new textures between { and } that will be rendered instead of the original one.
== Creating Multiple Skin Combinations ==
In some circumstances, you may choose to divide your model texture into more than one material. This allows for multiple combinations that otherwise would require a larger amount of individual models. If, for example, you wanted to create a light that had two housing styles but three bulb colors, you could create these combinations under the $texturegroup. 
 
 $texturegroup skinfamilies
 {
 	{ "lampnew" "lightbulbred" }
 	{ "lampnew" "lightbulbgreen" }
 	{ "lampnew" "lightbulbblue" }
 	{ "lamprusty" "lightbulbred" }
 	{ "lamprusty" "lightbulbgreen" }
 	{ "lamprusty" "lightbulbblue" }
 }
Once again, you must ensure that your model uses the material names in the first line.
As you can see, creating a matrix of skin combinations has distinct advantages, however, using multiple materials on the same model creates a significant performance hit, so this technique should be used sparingly!
== General definition ==
Here's a general definition for reference if you have to use several skins:
 $texturegroup skinfamilies
 {
 	{ "original1" "original2" ... "originalX" }
 	{ "replace1_1" "replace1_2" ... "replace1_X" }
 	{ ... ... ... ... }
 	{ "replaceX_1" "replaceX_2" ... "replaceX_X" }
 }
== Further annotations ==
* Translucent models will only cast the shadows of the first skin
With the use of $shadowlod, you should be able to address the problem
== See also ==
* $texturegroup
* Source model skin editor
Category:Material SystemCategory:ModelingCategory:Tutorials
Multisource (GoldSrc)

==Entity description==
Multisource behaves exactly the opposite as multi_manager. Instead of receiving a single input and triggering multiple outputs, multisource recieves multiple inputs, and will trigger its target if and only if every entity that targets the multisource has triggered said multisource. For basic use cases, this is all you need to know.
This entity is also the only entity that can be used as a master.
(Entities that specify a master cannot be enabled unless their master is enabled.)
It can used be create mechanisms.
For example: a keycard for a slot.
== Keyvalues ==
== See Also ==
* 
Category:Half-Life
Category:Half-Life Entities
Multvar

multiplies the current value of the cvar provided by a factor while keeping it between two limits.
==Syntax==
*CVAR: a console variable we want to change.
*MINVALUE: a minimum bound for our variable.
*MAXVALUE: a maximum bound for our variable.
*FACTOR: the number to multiply the current value of the cvar by.
If the product is out of the range specific by MINVALUE and MAXVALUE, the product will be clamped.
==Examples==
Set the voice chat volume to 50% of its current value:
If voice_scale was 1, it is now at 0.5.
To set it back to its previous value use a factor of 2:
Flip the sign of viewmodel_fov from positive to negative
==See also==
* add instead of multiply
Music Composition

==Commercial Software Packages==
* Pro Tools The industry standard for all audio production
* FLStudio (Formerly known as Fruity Loops) is a complex yet fairly easy to use package
* Ableton
* Bitwig
* CakeWalk
* Reaper
* Steinberg Cubase
* Sound Forge audio editor
* ACID loop-based production
* Adobe Audition Record, Mix, Edit and Master Program
* Reason Music Sequencer, includes Synths (with many sound patches), Loops, Samplers,Mixers,Effects, and more!
* Finale
==Shareware and Freeware Software Package==
* Audacity audio editor for PC, Mac, and Linux
* Goldwave audio editing
* LMMS (free) alternative to FL Studio! Don't let the name fool you, there's an installer for Windows available (Linux Multi Media Studio)
* Wavosaur free audio editor great for sound looping (Only available for Windows PC)
* Anvil Studio a free MIDI Sequencer. Windows Only. 
* SynthFont a free SoundFont-based MIDI player - regardless if you own a SoundBlaster Card - Supports WAV exports (per-track, and as whole audio), and support for VST Instruments
==Links of Interest==
* KVRaudio large forum dedicated to open standard audio plugins.
* http://www.synthzone.com/
* Large list of software synthesizers (shareware, free and demo)
* SoundFont Collection Free SoundFont Banks
Category:Third Party Tools
Category:Sound System
Music track

This entity allows you to play music and control it dynamically, without the need to create lots of scripts. The best example of using this entity is the beginning of chapter . When player triggering the trigger - the first music track starts, which is looped (it loops itself, without help from other entities), when the soldiers leaves the ambush - the next track starts, which is also looped. When the fight with the helicopter ends, the last, final track starts, which is not looped. Before this system implementation, music was launching via ambient_generic, which just playing the full version of the music from beginning to end, which made certain parts of the music inappropriate for situations, or even ended when the helicopter didn't even arrive.
All code for original music tracks from placed in and , both placed in folder.
Represented by class CMusicTrack.
== Soundscript ==
This is example of sound script to make your music properly working with this entity. The comments explain what each line does.
== Looping ==
To make your music endless looping, you'll need to add in your file "loop point". Check out this guide.
== Keyvalues ==
== Inputs == 
== See Also ==
* 
* 
* 
* 
*
Muzzle Flash Lighting

This tutorial will show you how to create a muzzleflash that dynamically appears and lights up the world around the player, like in Counter-Strike: Source. These types of lights are called dlights on brushes, and elights on models.
This code was designed for any Orange Box based mod, singleplayer or multiplayer. It also works with NPCs, assuming they work properly.
== Implementing DLight-based Muzzleflashes ==
The coding begins! Only a few minor changes are needed here to make muzzleflashes look better than ever.
First off, open up c_baseanimating.cpp and search for the function void C_BaseAnimating::ProcessMuzzleFlashEvent()
Vector vAttachment;
QAngle dummyAngles;
GetAttachment( attachment, vAttachment, dummyAngles );
// Make an elight
dlight_t *el = effects->CL_AllocElight( LIGHT_INDEX_MUZZLEFLASH + index );
el->origin = vAttachment;
el->radius = random->RandomInt( 32, 64 ); 
el->decay = el->radius / 0.05f;
el->die = gpGlobals->curtime + 0.05f;
el->color.r = 255;
el->color.g = 192;
el->color.b = 64;
el->color.exponent = 5;
Valve went a little crazy here and the result was a seemingly ugly muzzleflash. This tutorial is all about making things pretty, so lets change that. Replace the entries above with this:
			Vector vAttachment, vAng;
			QAngle angles;
			GetAttachment(1, vAttachment, angles); // set 1 instead of "attachment"
			AngleVectors(angles, &vAng);
			vAttachment += vAng * 2;
			dlight_t *dl = effects->CL_AllocDlight(index);
			dl->origin = vAttachment;
			// Original color values
			int originalR = 231;
			int originalG = 219;
			int originalB = 14;
			// Randomize color components within the range of +/- 20
			dl->color.r = originalR + random->RandomInt(-20, 20);
			dl->color.g = originalG + random->RandomInt(-20, 20);
			dl->color.b = originalB + random->RandomInt(0, 0);
			// Randomize the die value by +/- 0.01
			dl->die = gpGlobals->curtime + 0.05f + random->RandomFloat(-0.01f, 0.01f);
			dl->radius = random->RandomFloat(245.0f, 256.0f);
			// Randomize the decay value
			dl->decay = random->RandomFloat(400.0f, 600.0f);
Category:Weapons programming
NC4C: Identity Crisis

== Overview ==
This project was concerned with the development of a prototype FPS/RTS game based on the Source Engine.
The concept is a sci-fi psychological game whereby the participant has to solve problems and use their intellect to obtain goals and advance their knowledge, experience and progress.
Set in the near future 2020-2030:
Awakening in a cold concrete cell block, our character begins the journey of re-discovering their identity and re-building their life.
All memories of the past are erased and you are unaware of how you came to be imprisoned.
You are in a converted semi-submerged cell block. One of the last made before they were completely phased out. This complex used to form part of a network of industrial fisheries used to restock the surrounding waters of the city. These complexes were part of ENKE Industries, now defunct, and were subsequently acquired by IPS (Internal Protective Services), also a now defunct Government Agency.
IPS was previously established to maintain order in the city alongside other central law enforcement agencies. However it was shutdown after deep-rooted internal corruption was discovered. The result being that all assets were left in limbo and frozen. These last remaining converted prison hulks are all that remain, and their occupants have been essentially left for dead. All records of IPS' operations were wiped after the corruption was leaked to the public.
== Media ==
=== Screenshots ===
thumb|left|Main menuthumb|left|Cell Block Complex Interiorthumb|left|Main menuthumb|left|Cell Block Complex
=== Videos ===
This video demostrates the basics of the sound design for the first level of the game. The idea is that it should be sparce and unimpossing while at the same time slightly sinister
This video shows the audio transition from inside to out. It shows the transition between a place that is life less to a place that shows hope. The audio is designed to be detailed and in sync with the visual world
This video shows the synthetic speech that was designed to be annoying. The idea behind the sound is that the player should feel uncomfortable listening to the speech - effectively a form of subtle torture
This video is the outside of the game, the sound design is very sparse to reflect the desolation of the world
Example of Game Dialogue
== History ==
This project was started as the practical component of two thesii at the University of Art and Design Helsinki, Finland (Taidekorkeakoulu / TaiK) - Media Lab in 2006.
The project was completed later that year with a playable level with customization for models, textures, a character and heavy sound design.
The next stage will be to add some more refinement and details to the level and release it as a playable/downloadable mod.
All custom content (c) darkpixelsytem. All Valve technology/content (c) Valve.
== External links ==
* darkpixelsystem.com
Category:Single Player Mods
NICE filtering

NICE is the default mipmap filter used by Vtex. Images downsampled with NICE tend to look sharp and have better-preserved edges, which is often preferred for mipmaps. The filter is equivalent to Lanczos-3 and acts similarly to the Sine Cardinal filter available in VTFLib.
The filter has a radius of 3, resulting in a 7x7 kernel. An implementation of NICE can be found inside imageloader.cpp in the Source SDK.
While there is no "best" kernel (which is one of the reasons VTFLib offers so many kernels) NICE filtering tends to produce cleaner results than simple box filtering as it better preserves high-frequency information. Textures mipmapped with it tend to look less blurry than those mipmapped with box filtering.
== Aliasing ==
Because NICE is a sharpening kernel, it tends to accentuate the edges of resampled images. While this works to our advantage on most textures, it may cause issues with non-color images such as bumpmaps and various masks. Because of this, Vtex will automatically disable NICE filtering on textures created with the '_normal' suffix. 
== Further reading ==
* Source SDK 2004 implementation imageloader.cpp
* ImageWorsener: Image Resampling
* Blinn, James F.: Jim Blinn's Corner: Dirty Pixels, Morgan Kaufmann Publishers, Inc., ISBN 1-55860-455-3
NPC

An NPC is a Non-Player Character. It is an entity with some form of AI that may be able to move around the map, attack with weapons, etc., that is not directly controlled by the player. Examples include Combine soldiers in and hostages in .
NPCs are sometimes referred to as monsters (especially in ), a terminology inherited from .
Multiplayer bots are not considered NPCs, as they are players.
== See also ==
* Creating an NPC
* List of NPCs
* Bot
* CAI_BaseNPC, the C++ BaseClass for NPCs in Source
* CBaseMonster, the C++ BaseClass for NPCs in GoldSrc
Category:Source
Category:NPCs