Difference between revisions of "Create a Mod"

From Valve Developer Community
Jump to: navigation, search
(Engine branch: Removed line about alternative mod launcher for Source SDK 2013 as the link is dead)
 
(51 intermediate revisions by 34 users not shown)
Line 1: Line 1:
== Overview of 'Create a Mod' ==
+
{{otherlang2
The 'Create a Mod' button is accessible through the [[Source SDK]] software available through STEAM to all owners of Half-Life 2 or another primary Source engine product.  This button does exactly as the name implies, it allows you to create a modiifcation of the Half-Life 2 game or of the Source engine itself.  This is only a stepping stone application really and the hard work that generally goes into a successful modification is still left up to you.  This button will generate the basic framework for you to work with, allowing you to dable in the code, the models and the worlds of Half-Life 2 to create your own interesting world.
+
| fr = Create_a_Mod:fr
 +
| ru = Create_a_Mod:ru
 +
| hu = Create_a_Mod:hu
 +
| es = Create_a_Mod:es
 +
| pl = Create_a_Mod:pl
 +
| zh-cn= Create_a_Mod:zh-cn
 +
}}
  
== The Setup Sequence ==
+
{{toc-right}}
===Step 1. The Choice===
 
[[Image:sourcesdk1.JPG|thumb|250px|The SourceSDK Window]]
 
  
After double clicking ''Create a Mod'' from within the SourceSDK application, you will be presented with four options.  You can either modify [http://developer.valvesoftware.com/wiki/Half-Life_2 Half-Life 2 Single Player], [http://developer.valvesoftware.com/wiki/Half-Life_2_Deathmatch Half-Life 2 Multiplayer], Start a mod from scratch or utilize the [http://developer.valvesoftware.com/wiki/Installing_and_Debugging_the_Source_Code Source Code] only.  The screen that these options are presented are is as follows. 
+
The '''Create a Mod''' wizard automates the process of creating a Source mod. It:
  
 +
* Creates a new mod under <code>steamapps\SourceMods\</code>
 +
* Installs a copy of the source code, with associated Visual Studio Project File
 +
* Creates a Game Configuration for your mod in the [[Source_SDK| Source SDK]]
  
[[Image:createamod1.JPG]]
 
  
 +
{{Note|You will need to restart Steam for a new mod to appear in your library.}}
  
The following steps will depend on which option you select.  If you selected '''Modify Half-Life 2 Single Player''', '''Modify Half-Life 2 Multiplayer''' or '''Start a mod from scratch (advanced users only)''', go to step 2.  If you selected '''Source code only (advanced users only)''', go to step 4.
+
== Engine branch ==
  
 +
Before starting a mod you need to choose which version of Source you will use. Change the SDK's engine version to the one you want.
  
===Step 2. Directories & Mod Name===
+
; [[Source 2006]]
At this screen you will be prompted to enter the directory you would like to install the mod as well as the mods name. The first box will contain all of the source files that you will use to construct your mod project.  This name can be anything you like, but lets start it simple and enter the title "C:\mymod-source". Into the mod name line enter "My Mod". Click next when you are ready.
+
: '''Outdated''' - Original [[Half-Life 2: Episode One]] mod. Only included for backwards compatibility reasons.
 +
; [[Source 2007]]
 +
: '''Outdated''' - Original [[Orange_Box|Orange Box]] mod.  
 +
; [[Source 2009]]
 +
: '''Outdated''' - Updated [[Orange_Box|Orange Box]] mod. You '''cannot make a mod for Source 2009'''; you ''can'' make a content-only mod of a 2009 game by following [[#Creating a mod manually|Creating a Mod manually]].
 +
; [[Alien Swarm (engine branch)|Alien Swarm]] (via [[Alien Swarm SDK]])
 +
: The oddball of the bunch. Alien Swarm is totally free to play and its SDK includes source code, but it's source code is for a top-down shooter. It also lacks many of the HL2-compatible code's peripheral tools and cannot access HL2's content.
 +
; [[Source SDK 2013|Source 2013]]
 +
: In 2013, Valve phased out the Source SDK with the release of [[SteamPipe]]. With this change, they updated the source code to the latest version of the Source-1-Engine for the HL2-based engine branch. This time around, the source code is not made available via an SDK launcher, but is instead hosted on Github. See [[Source SDK 2013]] for more information.
  
 +
{{note|At this time, CS:GO is the only Valve-made Source Engine title with 64-bit support, and is only 64-bit on MacOS and Linux. (By extension, this means that only mods based on CS:GO will be able to work on MacOS Catalina and later.)}}
  
[[Image:createamod2-2.JPG]]
+
{{Warning|Your ''Engine Version'' in the [[Source_SDK|Source SDK]] must match the Engine branch of your mod! Failing to do this will result in Source SDK tools being unable to load required resources.}}
  
 +
== The SDK wizard ==
  
The SourceSDK will now copy the needed Half-Life 2 code, maps, models, and other materials into your own development folder.  This may take several minutes to complete so please be patient.   
+
=== Project type ===
  
 +
: {{HL2}} '''This section only applies to Half-Life 2 Mods!'''
  
[[Image:createamod3.JPG]]
+
When you start the wizard, you will have to choose which project to work with.
  
 +
[[File:Create mod step1.png]]
  
[[Image:createamod3-3.JPG]]
+
; Half-Life 2 Single Player
 +
: Projects for [[Episode One]] (2006) or [[Episode Two|Two]] (2007). If you do not own Ep1/2 this option will be greyed out.
 +
; Half-Life 2 Multiplayer
 +
: Projects for ''[[Half-Life 2: Deathmatch]]''. This option is only available if you own ''[[Half-Life 2: Deathmatch]]''; otherwise it will be greyed out.
 +
; Multiplayer mod from template
 +
: A specially-created SDK project that allows you to configure settings such as if your mod is team based, or if you have abilities such as sprinting and prone. This option does '''not''' require ''[[Half-Life 2: Deathmatch]]''.
 +
; Source code only
 +
: Dumps the code without creating an actual mod. This option is handy if you are just creating a [[server plugin]].
  
 +
Whichever option you choose, you get the same actual source code files (even if you didn't own one or another game). You also get an "everything" solution which includes a collection of development tools.
  
Once complete, you will be informed of it and be prompted to click 'Next'. Do so now.
+
=== Mod Information ===
  
 +
[[File:Create mod step2.png]]
  
===Step 3.  Completion ===
+
The first option on this page is where you want the source code extracted to. The second is the name you want to use, which also defines the output folder for your compiled content (does not appear if you chose source code only).
Complete the setup by selecting to '''Open readme file''' and click finish. Your files are now ready to be used for your next great modification: so get modding!
 
  
 +
== Creating a mod manually ==
  
[[Image:createamod4.JPG]]
+
It's surprisingly simple:
  
 +
# Create a folder under <code>steamapps\SourceMods\</code> ''(A mod can actually reside anywhere, but placing it here allows Steam to detect and launch it.)''
 +
# Create a [[gameinfo.txt]] in the folder. You now have a mod!
 +
# Open the SDK launcher and switch to the relevant engine branch.
 +
# Choose "Edit Game Configurations" and click "Add". Enter your mod's name and folder.
  
===Step 4. "Source Code Only"===
+
To get the source code (or indeed any other files of Valve's that you want to modify) you will need to use [[GCFScape]] and access <code>depot_211_dir.vpk</code> in the <code>Steam\SteamApps\common\SourceSDK\vpks</code> folder. Remember to change the custom build steps to point to your mod's folder.
This installation is different from the previous three only in the fact that there is a difference between editing the Source code for an end result of a modification and editing the Source code simply for self-experience and exploration purposes.  '''Source code only (advanced users only)''' will not give you the tools needed to compile the code into modification format and this is useful for people making server-modifications for Counter-Strike who wish to have it run alongside another mod, rather than a new mod all together. 
 
 
 
 
 
At the first screen you will be prompted to enter the directory you would like to install the source code. The location will contain all of the source code files for whatever use you intend for them.  This name can be anything you like, but lets keep it simple and enter the title "C:\myproject-source".  Notice that you are not prompted for a 'SourceMods' modification directory.  This is the key difference between this installation and the other three choices. 
 
 
 
 
 
[[Image:createamod3.JPG]]
 
 
 
 
 
The SourceSDK will now copy the needed source code into your own development folder. This may take several minutes to complete so please be patient. 
 
 
 
 
 
[[Image:createamod3-3.JPG]]
 
 
 
 
 
Once complete, you will be informed of it and be prompted to click 'Next'. Do so now.  Return to '''Step 3''' to continue.
 
 
 
 
 
== Additional Resources ==
 
To continue on and use the newly installed files, you will find the following resources and pages very useful:
 
 
 
* [[Books | Books about modding and mapping]]
 
  
 
[[Category:Modding]]
 
[[Category:Modding]]

Latest revision as of 13:07, 2 May 2021

Español Français Magyar Polski Русский 简体中文

The Create a Mod wizard automates the process of creating a Source mod. It:

  • Creates a new mod under steamapps\SourceMods\
  • Installs a copy of the source code, with associated Visual Studio Project File
  • Creates a Game Configuration for your mod in the Source SDK


Note.png Note: You will need to restart Steam for a new mod to appear in your library.

Engine branch

Before starting a mod you need to choose which version of Source you will use. Change the SDK's engine version to the one you want.

Source 2006
Outdated - Original Half-Life 2: Episode One mod. Only included for backwards compatibility reasons.
Source 2007
Outdated - Original Orange Box mod.
Source 2009
Outdated - Updated Orange Box mod. You cannot make a mod for Source 2009; you can make a content-only mod of a 2009 game by following Creating a Mod manually.
Alien Swarm (via Alien Swarm SDK)
The oddball of the bunch. Alien Swarm is totally free to play and its SDK includes source code, but it's source code is for a top-down shooter. It also lacks many of the HL2-compatible code's peripheral tools and cannot access HL2's content.
Source 2013
In 2013, Valve phased out the Source SDK with the release of SteamPipe. With this change, they updated the source code to the latest version of the Source-1-Engine for the HL2-based engine branch. This time around, the source code is not made available via an SDK launcher, but is instead hosted on Github. See Source SDK 2013 for more information.
Note.png Note: At this time, CS:GO is the only Valve-made Source Engine title with 64-bit support, and is only 64-bit on MacOS and Linux. (By extension, this means that only mods based on CS:GO will be able to work on MacOS Catalina and later.)
Warning.png Warning: Your Engine Version in the Source SDK must match the Engine branch of your mod! Failing to do this will result in Source SDK tools being unable to load required resources.

The SDK wizard

Project type

<Half-Life 2> This section only applies to Half-Life 2 Mods!

When you start the wizard, you will have to choose which project to work with.

Create mod step1.png

Half-Life 2 Single Player
Projects for Episode One (2006) or Two (2007). If you do not own Ep1/2 this option will be greyed out.
Half-Life 2 Multiplayer
Projects for Half-Life 2: Deathmatch. This option is only available if you own Half-Life 2: Deathmatch; otherwise it will be greyed out.
Multiplayer mod from template
A specially-created SDK project that allows you to configure settings such as if your mod is team based, or if you have abilities such as sprinting and prone. This option does not require Half-Life 2: Deathmatch.
Source code only
Dumps the code without creating an actual mod. This option is handy if you are just creating a server plugin.

Whichever option you choose, you get the same actual source code files (even if you didn't own one or another game). You also get an "everything" solution which includes a collection of development tools.

Mod Information

Create mod step2.png

The first option on this page is where you want the source code extracted to. The second is the name you want to use, which also defines the output folder for your compiled content (does not appear if you chose source code only).

Creating a mod manually

It's surprisingly simple:

  1. Create a folder under steamapps\SourceMods\ (A mod can actually reside anywhere, but placing it here allows Steam to detect and launch it.)
  2. Create a gameinfo.txt in the folder. You now have a mod!
  3. Open the SDK launcher and switch to the relevant engine branch.
  4. Choose "Edit Game Configurations" and click "Add". Enter your mod's name and folder.

To get the source code (or indeed any other files of Valve's that you want to modify) you will need to use GCFScape and access depot_211_dir.vpk in the Steam\SteamApps\common\SourceSDK\vpks folder. Remember to change the custom build steps to point to your mod's folder.