Creating a mod
Setting up the directory
If you haven't done this already, create the folder source2mods
inside your steamapps
directory:
Steam\steamapps\source2mods
Inside the source2mods
, create a folder, without special characters, representing your mod content. For example:
Steam\steamapps\source2mods\mysource2mod
Copying the required files
In order to get the barebones of your mod working, copy the cfg
and the webui
folder from Half-Life Alyx\game\hlvr
, and the files gameinfo.gi
and gameinfo_branchspecific.gi
to your mod folder.
webui
folder.Editing the gameinfo.gi
Title
Open the gameinfo.gi
file. Change the title keyvalue to the name of your mod.
Screen mode
Below the first keyvalues, add a screenmode key with one of the following values:
vr_only
: It will only run in VR.flat_only
: It will only run in flat mode.both
: It can be run both in VR and flat modes.
File system
In the filesystem group, insert in the first line a new Game key and set its value exactly like your mod folder name. Modify the Mod and Write values to also match your mod folder name.
Finishing up
Your mod now can run with source2mod. Start source2mod.exe and select your mod, or run source2mod.exe with the -game parameter and the name of your mod folder.