The Stanley Parable mod creation

Category:Modding
Category:Tutorials
== Base Information ==
If you want to start creating mods for The Stanley Parable, there are a few things you need to know:
* Not all entities are available in .
* Not all restrictions from apply to .
* has the "SMG2" weapon from . If you want to add weapons to your mod, then make it based on SMG2.
: 
=== Requirements ===
You need to install , and [steam://rungameid/629 Portal 2 Authoring Tools].
== Ways to create a mod ==
We have three ways to create a mod:
# We just want to create just one map without adding new content (textures, sounds, scripts and models) to the game folder.
# We want to create a sourcemod that will be added to the Steam library and will include all the features of the mod from the sourcemod folder.
# We want to create a mod, to install which all its content will need to be put into the folder with the original game.
=== Creating just a map for The Stanley Parable ===
# Go to the Portal 2 root and go to bin folder (default location is C:\Program Files (x86)\Steam\steamapps\common\Portal 2\bin) and copy base.fgd, portal.fgd and halflife2.fgd from there to the folder where stanley.fgd is located, that is, to The Stanley Parable root.
# Go to The Stanley Parable\thestanleyparable\maps and create mapsrc folder (Optional: you can also create a Prefabs folder in mapsrc for prefabs).
==== Setting up Hammer editor ====
# Open Portal 2 Authoring Tools and open Hammer Editor
# Go to tools->options and edit the Portal 2 configuration: change Game Directory from $SteamUserDir\Portal 2\portal2 to $SteamUserDir\Portal 2\portal2_dlc2 so that if Hammer World Editor finds a configuration with the original portal2 folder, then it will automatically select it.
# Create a new configuration and name it after your mod.
# Add stanley.fgd to the Game Data files field.
# Optional: Select Default PointEntity class as info_player_start and Default SolidEntity class as func_detail, set Cordon texture to tools\toolsskybox, set Prefab Directory to $SteamUserDir\The Stanley Parable\thestanleyparable\maps\mapsrc\Prefabs.
# Set Game Executable Directory to $SteamUserDir\The Stanley Parable, Game Directory to $SteamUserDir\The Stanley Parable\thestanleyparable and Hammer VMF directory to $SteamUserDir\The Stanley Parable\thestanleyparable\maps\mapsrc.
# Go to the Build Programs
# Set Game Executable to $SteamUserDir\The Stanley Parable\stanley.exe, BSP executable to $SteamUserDir\Portal 2\bin\vbsp.exe, VIS executable to $SteamUserDir\Portal 2\bin\vvis.exe, RAD executable to $SteamUserDir\Portal 2\bin\vrad.exe and Place compiled maps to $SteamUserDir\The Stanley Parable\thestanleyparable\maps.
=== Creating a sourcemod for The Stanley Parable ===
#Go to the Portal 2 root and go to bin folder (default location is C:\Program Files (x86)\Steam\steamapps\common\Portal 2\bin) and copy base.fgd, portal.fgd and halflife2.fgd from there to the folder where stanley.fgd is located, that is, to The Stanley Parable root.
#Create a folder in the sourcemods (default location is C:\Program Files (x86)\Steam\steamapps\sourcemods) folder and name it after your mod.
#In your newly created folder, create a gameinfo.txt file and put this in it (read more here: gameinfo.txt):
:: 
"GameInfo"
{
	game 		"TSP Mod"
	GameData	"stanley.fgd"
	FileSystem
	{
		SteamAppId				221910
		ToolsAppId				211
		SearchPaths
		{
			Game				|gameinfo_path|.
			Game				|All_Source_Engine_Paths|thestanleyparable
		}
	}
}
# In the same place create a folder called maps, and in it create a mapsrc folder (Optional: you can create a Prefabs folder for prefabs in the mapsrc folder).
# Go to the The Stanley Parable root. In order for Hammer Editor for Portal 2 to work correctly, you need to create a folder, named the same as your mod in The Stanley Parable root and place gameinfo.txt there with the following content:
:: 
"GameInfo"
{
	game 		"TSP Mod"
	title 	 	"TSP Mod"
	GameData	"stanley.fgd"
	FileSystem
	{
		SteamAppId				221910
		ToolsAppId				211
		
		SearchPaths
		{
			Game				|gameinfo_path|.
			Game				"YOUR\REAL\WAY\TO\SOURCEMODS\sourcemods\TSP Mod"
			Game				"YOUR\REAL\WAY\TO\THE STANLEY PARABLE\The Stanley Parable\thestanleyparable"
		}
	}
}
}
==== Setting up Hammer editor ====
# Open Portal 2 Authoring Tools and open Hammer Editor
# Go to tools->options and edit the Portal 2 configuration: change Game Directory from $SteamUserDir\Portal 2\portal2 to $SteamUserDir\Portal 2\portal2_dlc2 so that if Hammer World Editor finds a configuration with the original portal2 folder, then it will automatically select it.
# Create a new configuration and name it after your mod.
#Add stanley.fgd to the Game Data files field.
# Optional: Select Default PointEntity class as info_player_start and Default SolidEntity class as func_detail, set Cordon texture to tools\toolsskybox, set Prefab Directory to SteamDir\steamapps\sourcemods\TSP Mod\maps\mapsrc\Prefabs.
# Set Game Executable Directory to $SteamUserDir\The Stanley Parable, Game Directory to $SteamUserDir\The Stanley Parable\TSP Mod and Hammer VMF directory to $SteamDir\steamapps\sourcemods\TSP Mod\maps\mapsrc.
# Go to the Build Programs
# Set Game Executable to $SteamUserDir\The Stanley Parable\stanley.exe, BSP executable to $SteamUserDir\Portal 2\bin\vbsp.exe, VIS executable to $SteamUserDir\Portal 2\bin\vvis.exe, RAD executable to $SteamUserDir\Portal 2\bin\vrad.exe and Place compiled maps to $SteamDir\steamapps\sourcemods\TSP Mod\maps.
=== Creating a mod that all content files will be in original game folder ===
You just need to complete all the steps that were shown in the "Creating just a map for The Stanley Parable" chapter, only all the new content will need to be put into the folders with the original game.
= External links =
Compiler for IVF video format
== See also ==