S&box Wiki

Getting Started With Hammer

Getting Started

Setting Up

Before you can start mapping, you'll need to have a Project setup, if you don't have one you can make one by opening s&box in Editor Mode and clicking "New Project", The Minimal template will be fine for the purpose of creating and loading a map.


Creating a new map

Once you have a project created, you can navigate to it using the Asset Browser and then create your first map file.

Select your project from the project list in the Asset Browser, right click on any empty space in the Asset List and select New Asset... then Map:


A popup will show up asking for a name, and save location. You will want to create a new folder called maps/, open it, give the map a name, and save it.

The game will create a sample map file for you with some basic mesh and some info_players to get you started!

You can now open and edit your new map.


Compiling your map

On your quest to running your map in-game, you'll want to compile it, this can be done by pressing the Hotkey f9, alternatively you can find the button to compile the map here:


For the purpose of getting your map up and running, we'll be using Fast Compile.

Once compiled, you should be given a horribly contrasted green banner of Sweet Success!


Running your map In-Game

If you're a Entity System Veteran checking out s&box today, running a map in-game is not as simple as it used to be, read carefully!

Below are two methods you can use to check out your map In-Game, choose which works best for you, don't worry, neither require programming knowledge!

Method 1 : Running the map through a Map Instance Component

This method is valuable if you're planning on using your map in a game. To start, let's leave hammer for a minute and head back over to our Editor.


First, you'll want to create a new GameObject, this can be done by simply right clicking in the hierachy and clicking "Create Empty".


Now, click on your newly created GameObject, let's give it a name by pressing f2 and call it Map Instance. Next, head to your Inspector, by default this is underneath your hierarchy. Click New Component, and in the Search Bar type Map Instance


Now, all you need to do is type your map's directory in the Map Name field, in our case, it should be maps/my_map.vmap, if you named your map something else, shrimply replace the "my_map" with your map's name.

In some cases, you may need to close and reopen your editor, remember to save!

Congrats! Your map is now loaded!

Method 2 : Running the map through Walker/Scenebox

This Method requires your map to be Released on Asset.Party, aswell as it being re-uploaded to Asset.Party anytime you make a change.

This method is valuable if you're just wanting to test your map using a basic FPS controller.

To start, let's leave hammer and return to our Editor. We'll want to publish our project to Asset.Party first by following this guide

Your map won't need to be set to released for it to appear, as long as you're part of the Org the map is in.

Then, open s&box in normal Game Mode, and open either "Walker" (For a barebones First Person Controller.) or "Scenebox" (For a more Sandbox like experience.)


You should be able to find your map by typing in it's name, and you'll be good to go!

What's next?

Once your map feels complete to you. Let's do a Final Compile before uploading to Asset.Party (Or re-uploading if you've followed Method 2)

Back in the Compile Window, you'll have the option of a Final or Full Compile. Final Compile offers the best visual quality, however the compile time will be longer than a Full Compile. If you aren't completely certain about your map, it's best to do a Full Compile first to see how things will generally look, and do one last pass for any mistakes.

Advanced Users may find Custom Settings useful for increasing the Lightmap quality all the way up to 8k, aswell as using the Use all available CPU threads setting for a faster compile time.

Assuming everything looks good to you, Upload (or re-upload) your map using this guide! You can then upload your map to asset.party by following this guide.