An example GitHub project for a Hammer map.
After cloning this, fill in all of the TODO
parts.
- assets
- Custom assets used by the map into this folder
- materials, models, scripts, sound
- Copy-paste them into the equivalent garry's mod folders, or use symbolic links
- E.g. garrysmod/materials/mapname -> this_project/assets/materials/mapname
- Custom assets used by the map into this folder
- release
- This folder is what you will publish to the workshop
- mapname.vmf
- This is your hammer project
- Download GitHub desktop to manage projects using Git on your machine
- Sign up to GitHub to host your projects
- Alternative- GitLab
- Follow the guides on how to use GitHub desktop
- Make your changes to the files
- Add & commit all changed files in GitHub Desktop
- Push the changes up to GitHub
- View the History in GitHub Desktop
- Right click on the point (commit) that you want to go back to
- Select "Create branch from commit" to create a temporary branch
- Give it a name E.g.
temp
- Give it a name E.g.
- Important: If you make any changes at this point, it will be difficult to add them to the later version of the project
- Look around the files
- Once you want to go back, select
Current branch
in GitHub Desktop, and selectmaster
- You can right click on your temporary branch to delete it
- A bullet point list of useful inspiration images/sources
TODO
- Link to required assets for your map
TODO
- Use this section to record the names of people who have helped test/develop your map, so you can thank them later
TODO
- Rename the map source file
- Give it the final map name
- e.g. mapname_v1
TODO
- You must do this BEFORE compiling, or things like cubemaps will be scoped to the wrong map name and may not work fully
- Give it the final map name
- Open the map in the Garry's Mod Hammer editor
- Compile the map
- Set BSP to normal
- Set VIS to normal (optimise what is visible)
- Set RAD to normal (lighting)
- Open up VIDE - https://developer.valvesoftware.com/wiki/VIDE
- Open the "Pakfile lump editor" tool (🗺 ✏)
- Open the map
- Click Scan
- Click browse
- Find the Garry's mod directory (
C:\Program Files (x86)\Steam\steamapps\common\GarrysMod\garrysmod
) - Click scan (this may take a while)
- Click Auto
- Ensure that custom files are added
- Click Apply
- ENSURE THAT THE DECALS ARE ADDED
- MANUALLY ADD THE DECAL FILES
- https://www.tophattwaffle.com/packing-custom-content-using-vide-in-steampipe/
- "Manually Packing Content in VIDE"
- Add the files
- Click cancel on the window that pops up
- Type in the folder path (e.g. materials\badger\ttt)
- Files
TODO
: list your decals here
- https://www.tophattwaffle.com/packing-custom-content-using-vide-in-steampipe/
- MANUALLY ADD THE DECAL FILES
- ENSURE THAT THE SOUNDSCAPE IS ADDED
- Make sure the soundscape has the same name as the map
- assets/scripts/soundscapes_mapname.txt
- Add the soundscape
- MANUALLY ADD THE SOUNDSCAPE SOUND FILES
- https://www.tophattwaffle.com/packing-custom-content-using-vide-in-steampipe/
- "Manually Packing Content in VIDE"
- Make sure to not try to add any GMod/HL2 sounds- https://www.badgercode.co.uk/source-sounds/
- Files
TODO
: List your custom sounds (used in the soundscape) here
- https://www.tophattwaffle.com/packing-custom-content-using-vide-in-steampipe/
- Make sure the soundscape has the same name as the map
- Click Save
- Copy the packed map into the garry's mod maps folder
- Open the map in-game and build the cubemaps
sv_cheats 1
building_cubemaps 1
buildcubemaps
mat_hdr_level 0
(to go to LDR)restart
(to reload map)buildcubemaps
mat_hdr_level 2
(to go back to HDR)restart
- Copy the bsp out of the Garry's Mod Maps folder back into the project folder
- This version will contain both cubemaps and the packed content
- Change your game settings to disable custom content
- In the garry's mod folder, rename-
download
,materials
,models
andsound
- Add
old
to the end of the name
- Add
- Set GMod launch options to
-noworkshop -noaddons
- In the garry's mod folder, rename-
- Launch the game and play on your map
- Verify there are no missing textures/models/sounds
- Once happy, put your game settings back to normal
- Rename your folders back to their original names-
download
,materials
,models
andsound
- A new materials folder may have appeared; merge/delete it
- Remove the launch settings
-noworkshop -noaddons
- Rename your folders back to their original names-
- Move the workshop version of the map into release/maps
- Add the thumbnail to release/maps/thumb/map_name.png
- Add a nodegraph to support NPCs
- Add AI nodes to your map
- Play the map in-game to re-generate the nodegraph
- You will find it in your garry's mod folder- garrysmod/maps/graphs/mapname.ain
- Copy this file to release/maps/graphs/map_name.ain
- Copy this from the maps folder in your GMod folder
- Add a navmesh to support bots
- Setting up maps for bots (navmesh)
- Used by nextbots- https://developer.valvesoftware.com/wiki/NextBot
- You might need to do this first
- Open the map
- Point your crosshair at a walkable surface
- Type nav_mark_walkable
- Then run nav_generate (this may take some time and freeze your game until it's done)
- Package & release the workshop addon
- Using the VSCode extension GMod SDK- https://www.youtube.com/watch?v=DtX3Lu9trwE
- You will need to open the "release" folder in another VSCode window
- Using the VSCode extension GMod SDK- https://www.youtube.com/watch?v=DtX3Lu9trwE
- Change the thumbnail, title and description
- There is an example thumbnail in this project-
example-workshop-thumbnail.jpg
- Thumbnails need to be 512x512 pixels, JPGs with "progressive" unchecked/disabled
- You can use the GMod SDK to update your thumbnail- https://www.youtube.com/watch?v=DtX3Lu9trwE
- There is an example thumbnail in this project-