Portal 2/Creating a mod: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
Line 1: Line 1:
The old tutorial was obsoleted by DLC2. This is the new method, as described by Lpfreaky90 and Felix Griffin.
The old tutorial was obsoleted by DLC2. This is the new method, as described by Lpfreaky90 and Felix Griffin.


===Step 1===
=== Step 1 ===
Create a folder for your mod in Steam/steamapps/sourcemods and rename it to the name of your mod. Open that folder and create two subfolders: "cfg" and "maps".
Create a folder for your mod in {{Code|Steam/steamapps/sourcemods}} and rename it to the name of your mod. Open that folder and create two subfolders: "cfg" and "maps".


===Step 2===
=== Step 2 ===
Open the "maps" folder and create a folder called "soundcache" inside it. Copy the file called "_master.cache" from Steam/steamapps/common/portal 2/portal2_dlc2/maps/soundcache to this new soundcache folder.
Open the "maps" folder and create a folder called "soundcache" inside it. Copy the file called "_master.cache" from {{Code|Steam/steamapps/common/portal 2/portal2_dlc2/maps/soundcache}} to this new soundcache folder.


===Step 3===
=== Step 3 ===
Create a gameinfo.txt file in your mod's root directory. Use this template:
Create a gameinfo.txt file in your mod's root directory. Use this template:
<pre>
<pre>
Line 28: Line 28:
</pre>
</pre>


===Step 4===
=== Step 4 ===
Use a program like {{gcfscape|4}} to open Steam/steamapps/common/portal 2/portal2_dlc2/pak01_dir.vpk and copy the file called resource/ui/basemodui/mainmenu_new.res to (your mod)/resource/ui/basemodui. Edit it, then pack it into a new VPK using portal 2/bin/vpk.exe or {{gcfscape|4}}.
Use a program like {{gcfscape|4}} to open {{Code|Steam/steamapps/common/portal 2/portal2_dlc2/pak01_dir.vpk}} and copy the file called {{Code|resource/ui/basemodui/mainmenu_new.res}} to {{Code|(your mod)/resource/ui/basemodui}}. Edit it, then pack it into a new VPK using {{Code|portal 2/bin/vpk.exe}} or {{gcfscape|4}}.


===Step 5===
=== Step 5 ===
Restart Steam. If it all worked, your mod should be listed. Congratulations!
Restart Steam. If it all worked, your mod should be listed. Congratulations!
[[Category:Portal 2 Level Design]]
[[Category:Modding]]

Revision as of 07:06, 29 April 2023

The old tutorial was obsoleted by DLC2. This is the new method, as described by Lpfreaky90 and Felix Griffin.

Step 1

Create a folder for your mod in Steam/steamapps/sourcemods and rename it to the name of your mod. Open that folder and create two subfolders: "cfg" and "maps".

Step 2

Open the "maps" folder and create a folder called "soundcache" inside it. Copy the file called "_master.cache" from Steam/steamapps/common/portal 2/portal2_dlc2/maps/soundcache to this new soundcache folder.

Step 3

Create a gameinfo.txt file in your mod's root directory. Use this template:

"GameInfo"
{
    game            "Your Mod's Name"
    GameData        "portal2.fgd"
    FileSystem
    {
        SteamAppId  620 // Portal 2 has ID 620
        SearchPaths
        {
            Game    |gameinfo_path|.
            Game    portal2_dlc2
            Game    portal2_dlc1
            Game    portal2
        }
    }
}

Step 4

Use a program like GCFScape GCFScape to open Steam/steamapps/common/portal 2/portal2_dlc2/pak01_dir.vpk and copy the file called resource/ui/basemodui/mainmenu_new.res to (your mod)/resource/ui/basemodui. Edit it, then pack it into a new VPK using portal 2/bin/vpk.exe or GCFScape GCFScape.

Step 5

Restart Steam. If it all worked, your mod should be listed. Congratulations!