Skip to content

Getting started

Radik edited this page Aug 13, 2024 · 11 revisions

Preparing Godot

To be able to test your map directly from Hammer++ you should be able to launch Godot Engine via CMD. How? There're two ways:

  1. Add the engine into the environment variable PATH
  2. Install Godot Engine via Scoop package manager in case you use Windows or Homebrew for MacOS

Installation Godot via package manager

Windows

Open PowerShell and run these commands

scoop bucket add extras
scoop install extras/godot

MacOS

brew install godot

Project Preparation

Clone this repo and open the project in Godot to precache all imports. You also can open the project via terminal:

cd <your-project-path>
godot -e # launch godot in editor mode

Setting Hammer++ up

The project template provides ready-to-use a source engine project in hammer_project folder that you'll use for map creation. It is already has measure textures by Kenney.

Open Hammer++ and open Game Configuration (Tools -> Options):

  1. Click Edit near the Configuration field and create a new project.


  1. Set Game Executable Directory - <your-project-path>
  2. Set Game Directory - <your-project-path>\hammer_project
  3. Set Hammer VMF Directory - \<your-project-path>\hammer_project\mapsrc
  4. Set Prefab Directory - \<your-project-path>\hammer_project\mapsrc\prefabs
  5. Add required FGD - base.fgd and halflife2.fgd (and your custom fgd as well)

Restart Hammer++

Test a map

During map creation you'll be able to test it as you would test it on Source Engine by click Run map button. But first you need to add a configuration. Open Run map window in Expert mode and do following steps:

  1. Create a new build configuration by click Edit and give it a name ("GodotVMF" for example)

image
image

  1. Add a command by click New
  2. In Command field type godot
  3. In Parameters field type scenes/map.tscn --path $exedir --vmf $file -v
    4.1. In case you want to build the map into a Scene add --build flag. It will create a ready scene in scenes folder.

image

  1. That's it! Now you can run your map by pressing F9 and selecting the created build configuration.

Build a map

In case you finished your map you'll need to finalize it by baking lightmaps and so on. Since LightmapGI doesn't have exposed method for baking lightsmaps in runtime you should do it manually:

  1. Build a map with --build parameter. It'll create a scene with imported map and LightmapGI node in the tree.
  2. Open the built scene, click on LightmapGI and click Bake Lightmap.
  3. That's it!

Building settings

There's a folder called build_presets that contains presets for LightmapGI and WorldEnvironment.