Ultimate Portal 2 Modding Guide: Difference between revisions
(initial commit) |
(Added basic sourcemod creation) |
||
Line 1: | Line 1: | ||
This guide will cover all the essential parts of Portal 2 modding. Some methods described may or may not work for other source engine games. | This guide will cover all the essential parts of Portal 2 modding. Some methods described may or may not work for other source engine games. | ||
== Preparation == | |||
In this guide, we will create a simple Portal 2 sourcemod, which is going to be called "Portal 2 Modding Guide". | |||
The first thing we need to do is download the Portal 2 Authoring Tools. You can find this toolset under "Tools" on Steam if you own Portal 2. (Make sure Portal 2 is installed). Run the tool and you'll see a box like this. We will only really need the Hammer World Editor. The model viewer can be handy when debugging models and the Face Poser is needed to build scene image files. | |||
<gallery> | |||
sdk.png|portal 2 authoring tools | |||
</gallery> | |||
== Creating the mod == | == Creating the mod == | ||
To create the sourcemod, navigate to your steamapps directory. (Usually located at C:\Program Files(x86)\Steam\steamapps). In there, should be a folder called "sourcemods". If it doesn't exist, create it. | |||
In the sourcemods directory, create a new folder with the name of your mod. Put a file in there and call it "gameinfo.txt". Copy and paste this template into the gameinfo.txt: | |||
<pre> | |||
"GameInfo" | |||
{ | |||
game "Portal 2 Modding Guide" // The name of your mod (will be displayed in steam) | |||
gamedata "portal2.fgd" | |||
icon "resource/icon" // Path to the icon (displayed in steam and, window and task bar) | |||
gamelogo 1 | |||
SupportsDX8 0 | |||
SupportsXbox360 0 | |||
FileSystem | |||
{ | |||
SteamAppId 620 // The steamappid of Portal 2 | |||
ToolsAppId 211 // The toolsappid of the Source Sdk | |||
SearchPaths | |||
{ | |||
Game |gameinfo_path|. // Your own assets | |||
Game portal2_dlc2 // DLC 2 assets | |||
Game portal2_dlc1 // DLC 1 assets | |||
Game portal2 // Base Portal 2 assets | |||
platform platform // Core engine files | |||
} | |||
} | |||
} | |||
</pre> | |||
After that, restart Steam and you'll find your mod listed in your library. | |||
The next step is to create your asset directory and other necessary files. Luckyly, source does this automatically when starting the mod, so all we need to do is start it through steam. |
Revision as of 09:59, 21 July 2019
This guide will cover all the essential parts of Portal 2 modding. Some methods described may or may not work for other source engine games.
Preparation
In this guide, we will create a simple Portal 2 sourcemod, which is going to be called "Portal 2 Modding Guide". The first thing we need to do is download the Portal 2 Authoring Tools. You can find this toolset under "Tools" on Steam if you own Portal 2. (Make sure Portal 2 is installed). Run the tool and you'll see a box like this. We will only really need the Hammer World Editor. The model viewer can be handy when debugging models and the Face Poser is needed to build scene image files.
- Sdk.png
portal 2 authoring tools
Creating the mod
To create the sourcemod, navigate to your steamapps directory. (Usually located at C:\Program Files(x86)\Steam\steamapps). In there, should be a folder called "sourcemods". If it doesn't exist, create it. In the sourcemods directory, create a new folder with the name of your mod. Put a file in there and call it "gameinfo.txt". Copy and paste this template into the gameinfo.txt:
"GameInfo" { game "Portal 2 Modding Guide" // The name of your mod (will be displayed in steam) gamedata "portal2.fgd" icon "resource/icon" // Path to the icon (displayed in steam and, window and task bar) gamelogo 1 SupportsDX8 0 SupportsXbox360 0 FileSystem { SteamAppId 620 // The steamappid of Portal 2 ToolsAppId 211 // The toolsappid of the Source Sdk SearchPaths { Game |gameinfo_path|. // Your own assets Game portal2_dlc2 // DLC 2 assets Game portal2_dlc1 // DLC 1 assets Game portal2 // Base Portal 2 assets platform platform // Core engine files } } }
After that, restart Steam and you'll find your mod listed in your library.
The next step is to create your asset directory and other necessary files. Luckyly, source does this automatically when starting the mod, so all we need to do is start it through steam.