nyuuzyou/wikis huggingface dataset:
VMEX

Valve Map Extractor () is a decompiler for engine maps. It converts BSP format files back into VMF format maps that can be loaded into Hammer. Since version 0.98g it supports all of Valve's games up to Left 4 Dead.
=== ===
To decompile maps for The Ship, download the modified version: VMEX (v0.98e) here.
=== ===
A modified version of vmex was created for decompiling Left 4 Dead maps by TerabyteDragon with permission by the original author. This modification resolves an issue with static props (specifically how large the entries are in the BSP file). This version can be downloaded from the link below. 
=== ===
A pre-processor to modify Left 4 Dead 2 BSPs to be decompilable by VMEX written by Omnicoder can be downloaded below.
== Windows Vista Java fix ==
The current VMEx version (098g) does not work with Windows Vista until you manually set the environmental variable path for Java. (The application will refuse to open, and if you run it from a command prompt, you will also get the error message "Java is not recognized as an internal or external command".)
To set the path, follow these steps:
# Locate the Java executable (Java.exe) and make a note of where it is located. It should be either in C:\Program Files\Java\jre6\bin (on 32 bit Windows) or in C:\Program Files (x86)\Java\jre6\bin (on 64 bit Windows). Remember this path. (If you are unable to locate a Java executable, this might mean that Java (Runtime Environment) is not even installed on your computer. If not, go to Javas official site to download and install it.)
# Click on the Start icon in the lower left corner, then Control Panel, then System, and then System again.
# Click on the Advanced System Settings link on the left.
# Under the current tab, click the Environment Variables button.
# In the lower section (labeled System Variables), scroll through and find the item labeled Path and double-click it to edit it.
# In the field labeled Variable value, go to the end of the long line, and add a semicolon (;), and then the previously mentioned path of Java.exe (either C:\Program Files\Java\jre6\bin or C:\Program Files (x86)\Java\jre6\bin).
== See also ==
* BSPSource - unofficial enhanced version of VMEX
* Decompiling Maps
* Map Obfuscator
== External links ==
* VMEX - the official website.
* http://www.bagthorpe.org/bob/cofrdrbob/files/vmex098g.zip - direct download for the latest version
* VMEX 0.98g - download mirror
* VMEX 0.98e for The Ship - download mirror
Category:Third Party Tools
Category:Level Design
VMF Updater

a program that fixes map sources files. Useful for porting and maps.
= Features =
* Automatically replaces specific missing textures, models and skyboxes with ones from the beta
* Fixes "black" brushes and models
* Updates HL1 entities to HL2 ones and sets Inputs/Outputs automatically.
* Automatically adds Inputs/Outputs
* Moves keyvalues from entitie's axis into MoveDir keyvalue for func_button, func_door and some other entities
* Replaces env_sound for working env_soundscape with proper keyvalues
* Adds correct SOLID keyvalue for prop_static entity
* Adds correct MoveSound keyvalues for func_tractrain
* Moves values from "mass" keyvalue into "massScale" keyvalue, supported by the engine
* Replaces npcweapon_mp5k with weapon_smg1 for npc_metropolice
* Fixes sound names that were ranamed since 2001 for func_door_rotating and ambient_generic
* This script was written on LUA, so you can easily edit it at your discretion.
= INSTRUCTIONS =
# Unzip the VMF Updater folder from this archive
# Run VMFUpdater.exe, press Load File and select the .vmf file you want to fix
# Press Update and wait for a few seconds
# Save the fixed file, don't forget to append ".vmf"
= Media =
= External links =
* HL2Beta Forum
* Archive.org Mirror
* ModDB Mirror
* GameBanana Mirror
VMT

A VMT ("Valve Material") file defines the material used by a two-dimensional surface. It contains all of the information needed for to simulate the surface visually, aurally, and physically.If a material is missing, it will produce the infamous Source pink and black checkered pattern. A white wireframe is not a missing material, but instead a missing shader.
__TOC__
The contents of a material will fall into some or all of these categories:
# Texture names
# Physical surface types
# Shader parameters
# Special compile properties
# Fallbacks
# Proxies
== A simple example ==
This is a very basic shingle beach material.
#The LightmappedGeneric shader is used, which means that the material is for use on surfaces with lightmaps (i.e. brushes).
#The character opens a set of parameters
#The $basetexture parameter is given with coast\shingle_01, which is the location of a texture. This is what will be drawn on the screen.
#$surfaceprop gives the material the physical properties of gravel.
#The character closes a set of parameters
It's important to remember that this material can only be used on brushes. If it needed to be used on models, for instance, another version would need to be created using the shader.
Most of the time switching materials from one shader to another is as simple as changing their first line, since a great number of parameters are shared between them. Some params only work with certain shaders, like Phong effects, which are only available with , but unfortunately you won't encounter any critical errors if a param isn't understood by the shader. It just won't have any effect.
== Finding materials ==
=== SteamPipe ===
When Valve updated all games to SteamPipe, all materials were moved from GCF into VPK files. Third-party games (running on - ) that previously used GCF files are also having it's materials moved to depot VPK files. VPK Files work with and .
More info on SteamPipe here
=== Non-SteamPipe Games ===
In non SteamPipe games, Materials are stored in the folder of your game or mod. The best way to browse them is from 's texture selection screen.
If you want to edit or view the code of Valve's material files you will first need to extract them from their GCF package with . They tend to be stored in GCFs with 'materials' in their name.
== See also ==
* Creating a Material
* Notepad++ syntax highlighting for materials
* Valve Texture Format
* Shader
* List of Shader Parameters
* Source VMT Editor
* VMTGen
* German Tutorial by TheRaZZeRApp 
Category:Material System
Category:Source
Category:File formats
VMTEDIT/Basic operations

The VMT Editor uses the same basic operations you find in most Windows applications.
Command 	Shortcut
Undo 	Press +
Redo 	Press ++
Save 	Press +
Open 	Press +
New 	Press +
Cut 	Press +
Copy 	Press +
Paste 	Press +
Delete 	Press
Keyboard 	Press + + +
Access area-specific context menu	Click
Category:VMT Editor
VMTEDIT/Setting Color Values

go to one of the fallowing parameters and click 
*$cloakcolortint
*$color
*$color2
*$detailtint
*$emissiveblendtint
*$envmaptint
*$fleshbordertint
*$fleshsubsurfacetint
*$outlinecolor
*$selfillumtint
*$srgbtint
the Select Color window will appear
adjust the color swatch, or type in the values to get the desired color
the color box will change to the selected color
Category:VMT Editor
VMTEDIT/Setting Shader Parameters

go to "shader" from the properties list and click 
the Select Shader window will appear
select from the list or type in the name of the shader in the filter box
see Shaders
Ideally, you should pick one of these three.
*LightmappedGeneric -> for world texturing
*VertexLitGeneric -> for model texturing
*UnlitGeneric -> for UI texturing
After your shader type is selected, the list of avalable parameters in the properties window will update according to what the shader supports.
Category:VMT Editor
VMTEDIT/Setting Texture Parameters

go to one of the fallowing parameters and click .
*$albedo
*$basetexture Primary Texture
*$bumpcompress used on chairacter models to give wrinkle details for facial expressions (Overlaps the bumpmap texture)
*$bumpmap use normal textures only (self shadowing bumpmaps If the $ssbump bool is set to 1)
*$bumpstretch 
*$compress used on chairacter models to give wrinkle details for facial expressions (Overlaps the base texture)
*$detail
*$emissiveblendbasetexture
*$emissiveblendtexture
*$emissiveblendflowtexture
*$envmap "env_cubemap" should be set for this if used
*$envmapmask
*$fleshbordertexture1d
*$fleshcubetexture
*$fleshinteriortexture
*$fleshinteriornoisetexture
*$fleshnormaltexture
*$fleshsubsurfacetexture
*$lightwarptexture
*$phongexponenttexture
*$phongwarptexture
*$selfillummask
*$stretch
the select VTF window will appear
select the desired texture to be used in the material
Type Indications
*_normal = bumpmap
*_ssbump = self shadowing bumpmap
*_ao = ambient occlusion map
regular texture if none
Category:VMT Editor
VMTEDIT/UI overview

The UI contains three major areas:
# The properties
# The viewport
# The Preview window
The top edge of the screen is the main menu. From here you can load and save VMT files, undo and redo actions, and configure your workspace.
# The Properties window is where the material properties are edited. Any user could set the properties to get the desired look or the material to be worked on.
# The engine viewport shows whatever environment the game has currently loaded. You can flip control to and from the game with , and maximise your view with .
# The preview window shows the current material as it may render. You can manipulate your view by holding to rotate, to zoom, and to move on the mouse.
== See also ==
Category:VMT Editor
VPK

VPK ("Valve PacK") is a package format used by post-GCF Source engine games to store content, as well as in Source 2. It was first introduced in . also use similar file extension, but the package format is not the same as Valve's VPK. 
VPK refers to:
*VPK (file format) - file format (, )
*VPK (file format)/Vampire: The Masquerade - Bloodlines - file format on 
** 
*vpk.exe - Executable that creates package files.
VPKEdit

is an open source MIT-licensed tool that can create, extract from, preview the contents of and write to archives, BSP paklumps, and many other pack file formats.
It currently supports previewing text files, various image formats, WAV files, VTF files, MDL files, DMX files, and PPL files without having to extract the file from the archive. Incremental file operations like adding or removing files are supported for all formats. Packed text files can be edited directly within the tool, packed VICE-encrypted files can be decrypted, and packed files can be encrypted with VICE, all without creating a single file on disk. As of version 4.4.0 its feature set is a superset of 's (excepting BSP30 support), and migration from that tool is strongly encouraged.
Since previewing files proved to be such a popular feature, loose files and folders can also be opened directly in the tool to preview their contents without needing to put them in a pack file.
The tool is powered by an open-source collection of libraries called sourcepp, written in C++20 and also under the MIT license.
A CLI version called vpkeditcli replicates the behavior of the Valve vpk CLI tool, with extra features like incremental modification of pack files and support for working with other formats besides VPKs.
== Requires ==
At minimum, it requires Windows 7 64-bit, or a modern version of Linux. Windows 7, 8, and 8.1 users must use the compatibility build, which uses a custom version of Qt that still works on those operating systems.
== Installation ==
Simply download the tool from the latest release link below, and either run the installer or save the standalone version to a convenient location.
The installer will automatically register supported extensions with the application, and deregister the extensions when it is uninstalled.
== Gallery ==
Vpkedit-screenshot-gallery-1.png|VPKEdit with a VPK and an MDL preview open in wireframe mode
Vpkedit-screenshot-gallery-2.png|VPKEdit with a VPK and an MDL preview open in shaded textured mode
Vpkedit-screenshot-gallery-3.png|VPKEdit with a BSP and a VTF preview open
Vpkedit-screenshot-gallery-4.png|The command-line version of VPKEdit
== External links ==
*GitHub Repository
*Downloads
== See also ==
*Bonus Maps
*BSP (Source)
*GCF
*PAK
*VPK (file format)
*WAD
*ZIP
Category: Third Party Tools
Category: Third Party Source Tools
Category: Third Party Source 2 Tools
VPK (file format)/Vampire: The Masquerade - Bloodlines

VPK ("Vampire PacK") is a package format used by . It is a completely separate format from Valve's file format, added in (), now used in all modern and games.
Vampire PacK files can be opened with and PackFile Explorer (shipped with the Unofficial Patch's Bloodlines SDK).
From this point on they will be referred to as VPKs for ease of communication.
== Features ==
=== Self-contained ===
VPKs do not use any external archives like chunked Valve pack files. Instead, multiple standalone VPKs can be created, and the game will load them all as long as their filenames are formatted correctly. Their filenames must match packXYY.vpk where X and Y are both integers starting at 0.
=== Simple ===
VPKs are exceedingly easy to parse and modify compared to other pack file formats like Valve PacK files.
== File Format ==
=== Footer ===
VPK files have no header, but they do have a footer which acts in the same capacity as a header would, vaguely resembling a ZIP file in this regard. All VPKs should be at minimum 9 bytes long to contain the footer, and empty VPKs will be 9 null bytes. There are multiple empty VPKs shipped with for unknown reasons.
struct VPKFooter
{
	unsigned int FileCount;
	unsigned int DirectoryOffset;	// Absolute from the start of the VPK
	unsigned char Version;			// Always 0
};
Since the version field is at the end of this struct, we can assume that the game is in fact reading each field sequentially in reverse. This would mean the version is being read before the other fields, which is sensible and follows the pattern of many other pack file formats. Your implementation may read the footer in any order however, because the version should always be zero.
=== File Entries ===
At the directory offset specified in the header, FileCount entries exist in a tightly packed array. The directory tree is usually written directly before the footer, but it can appear at any location in the VPK. Contrary to the footer's flow, the directory offset (and all offsets in the file entries) point to the beginning of the given data, and all reads from this point forward should add to the offset, not subtract from it.
struct VPKFileEntry
{
	unsigned int PathLength;
	char Path[PathLength];	// Is NOT null-terminated!
	unsigned int Offset;	// Absolute from the start of the VPK
	unsigned int Length;
};
=== File Contents ===
Seeking to the given Offset in the VPK and reading Length bytes will return the file data at the given Path. Each file entry maps to one file.
File contents are usually stored from the very start of the VPK to the file entry list, but just like the entry list, there is no rule requiring this to be the case.
==See also==
* - Can browse, edit, and create Vampire PacK files
* Bloodlines SDK - Can browse and create Vampire PacK files
* VPK (file format) - Valve PacK file format, entirely separate from Vampire PacK file format
vpk
VPK File Format/vpk2 reader.py

Put next to pak01_dir.vpk and run.
import os,struct,binascii
def get_int4():
	return int( struct.unpack("I",index.read(4))[0] )
def get_int2():
	return int( struct.unpack("H",index.read(2))[0] )
	
def get_sz():
	out = ""
	while True:
		cur = index.read(1)
		if cur == b'\x00': break
		out += struct.unpack("c",cur)[0].decode("ASCII")
	return out
	
index = open("pak01_dir.vpk",'rb')
print( "Signature:",binascii.b2a_hex(index.read(4)) )
print( "Version:",get_int4() )
print( "Directory length:", get_int4() )
print( "Unknown1:", get_int4() )
unknown2 = get_int4() # footer length?
print( "Unknown2:", unknown2 )
unknown3 = get_int4()
print( "Unknown3:", unknown3 )
print( "Unknown4:", get_int4() )
class VpkFile():
	path = ""
	CRC = -1
	archive_index = -1
	offset = -1
	length = -1
	preload = bytes()
	
vpk_files = []
while True:
	extension = get_sz()
	if not extension: break		
	
	while True:
		folder = get_sz()
		if not folder: break
		
		while True:
			filename = get_sz()
			if not filename: break
			
			cur_file = VpkFile()
			vpk_files.append(cur_file)
			cur_file.path = "{}/{}.{}".format(folder,filename,extension)
			
			cur_file.CRC = get_int4()
			preload_bytes = get_int2()
			cur_file.archive_index = get_int2()
			if cur_file.archive_index == b'\x7fff':
				print("EMBED")
			cur_file.offset = get_int4()
			cur_file.length = get_int4()
			get_int2() # terminator
			
			if preload_bytes:
				cur_file.preload = index.read(preload_bytes)
index.close()
print("Extracting...")
for vf in vpk_files:
	print(vf.path,"({} bytes)".format(len(vf.preload)+vf.length))
	full_path = os.path.join(os.getcwd(),"vpk_extracted",vf.path.replace("/","\\"))
	dir = os.path.dirname(full_path)
	if not os.path.isdir(dir):
		os.makedirs(dir)
	out_data = open(full_path,'wb')
	out_data.write(vf.preload)
	if vf.length:
		vpk = open("pak01_{}.vpk".format(str(vf.archive_index).zfill(3)),'rb')
		vpk.seek(vf.offset)
		out_data.write(vpk.read(vf.length))
		vpk.close()
	out_data.close()
VPlane

VPlane is a C++ class that represents an infinite 2D surface.
Each VPlane contains a normalised Vector that defines its facing (m_Normal) and a vec_t that defines its distance from the current origin (m_Dist).
== Member functions ==
; vec_t DistTo(Vector point)
: The distance between the given point and its nearest point on the plane. Positive if in front, negative if behind.
; SideType GetPointSide(Vector point, vec_t epsilon = 0.01f)
: Performs DistTo() then processes the result. The optional epsilon value specifies an unsigned threshold within which the return value will be considered SIDE_ON.
: SideType is a redefined int which has #defined values of SIDE_FRONT, SIDE_BACK and SIDE_ON.
; SideType GetPointSideExact(Vector point)
: As above, but without an epsilon and assuming 0 to be behind the plane.
; VPlane Flip()
: Returns a new VPlane with both m_Dist and m_Normal inverted. Does not change the VPlane's own values (but this = Flip() would).
; Vector GetPointOnPlane()
: Returns the point on the plane nearest to the current origin.
; Vector SnapPointToPlane(const Vector &point)
: Returns a new Vector representing the nearest point on the plane to the given Vector.
Category:Classes
VRAD

is the command-line tool for that takes a compiled BSP map and embeds lighting data into it. VRAD's static and pre-compiled light is bounced around the world with a algorithm.
VRAD will:
* Generate lightmaps
* Generate ambient samples
* Generate per-vertex prop_static lighting
* Generate per-object detail prop lighting
VRAD is generally the slowest of the three compilers due to the many, many calculations it must perform. Lighting optimization can help, as can ensuring your map is free of leaks.
== Syntax ==
For example, a regular compile would look like thus:
This will generate and embed both Standard and High Dynamic Range lighting data, at per-vertex detail for prop_static entities. It also generates shadows based on transparency for prop_static entities that have been flagged as casting texture shadows.
==Options==
Use these in combination with expert compile mode, a batch file, or a frontend such as .
=== Effects ===
=== Performance ===
=== Debugging ===
==Lights files==
==Console Output ==
== Bugs and Caveats ==
==See also ==
* QRAD and HLRAD - counterparts.
* VRAD2 & VRAD3 - counterparts.
* Map Compiling Theory
* HDR Lighting Basics
* VRAD HDR Crash Fix
* Static Props show up black
Category:Official Source Tools
Category:Source 1 BSP compilers
VRADFix

is a GUI tool used to manually edit lightmaps.
== Usage ==
*Open your compiled map in-game and use the console command mat_surfaceid 2. (Command requires sv_cheats)
*Find the surfaceid of the lightmap you want to edit and put it in the faceid field.
*Click on the luxels and change requisite values to the desired ones.
*Click write changes to bsp to save the changes to the bsp.
== External links ==
*VRADFix on GitHub - Download latest version
== See also ==
*lightmap
Category:Third Party Tools
Category:Lighting
VRAD (Source 2)

VRAD3 is the command-line tool that calculates and embeds lighting data into compiled maps, using graphics card (GPU) with ray tracing support. It is the counterpart of 's VRAD.
Earlier Source 2 games use VRAD2 to preview baked lighting in Hammer, using CPU.
In , VRAD3 requires a GPU with ray tracing support to both preview and bake lighting. VRAD2 and the old CPU lighting compiler have been removed as of the Armory Update.
VRAD3 is also available in and in later updates.
VRAD3 requires NVIDIA RTX, AMD RX 6000 series (or later/other RDNA2) cards or Intel Arc (since Jan 2025) graphics card.
== Games with VRAD2 ==
* All games except , and newer versions of (since 2023/2024).
== Games with VRAD3 ==
=== Valve ===
* 
* (later version)
* (later version)
* (later version)
=== Third-party ===
* 
== Command line options ==
=== VRAD2 ===
=== VRAD3 ===
Argument	Description
-script 	Specify VRAD3 script file.
== See also ==
*VRAD - counterpart.
*QRAD - counterpart.
Category:Level Design
VRAD HDR Crash Fix

This fix applies to instances where VRAD crashes as it begins the HDR lighting pass while using the switch -both. The LDR part of the compile typically completes without error, but once the HDR part starts, VRAD crashes without an error message. 
== Solution ==
Splitting the LDR and HDR passes in vrad.exe execution seems to prevent this crash from occurring. This is as simple as defining 2 VRAD commands—one using the -ldr switch and the other using the -hdr switch—instead of just one using the -both switch in Hammer's compile configuration. The following will detail what you can do in Hammer to achieve this.
Credit to Xanthi of the Steam User's forum for bringing this fix to light.
== Setting up Hammer ==
# Open up the Run Map dialog (File > Run… or ) in Hammer.
# If not already in "Expert Mode", click the "Expert" button in the bottom left of the dialog.
# Select "HDR Full Compile" from the Configuration pull-down.
# Select the 3rd item down, which should say $light_exe -both -game $gamedir….
# In the text box labeled "Parameters", along the right of the dialog, change the switch -both to -ldr. It should now read -ldr -game $gamedir $path\$file.
# Click the "New" button to create a new command in the configuration and select the new blank command at the bottom of the list.
# Press the "Move up" button twice to move the new command to right under the command you just edited.
# Enter $light_exe into the text box labeled "Command," or use the "Cmd" button to the right and select the "LIGHT Program" option for the drop-down menu.
# Into the "Parameters" text box, enter: -hdr -game $gamedir $path\$file.
You now have a fixed HDR compile configuration in Hammer. You must use this configuration in "Expert" mode. "Normal" mode will still use the -both flag for HDR compiles.
Category:Hammer
Category:Tutorials
VSI

VSI (short for Valve Stripping Information) is a model-related file format that appears to take VTX and VVD files and remove the LOD data, for Xbox 360 versions of games. This is probably done to save disk and memory space. Hypothetically, it could be used on PC versions of Source (not recommended).
== Games ==
== File format ==
== Files ==
==Links==
An Xbox-oriented variation of the standard MakeModels.cpp
Category:Source
Category:File formats
Category:Modeling