This article relates to the game "Half-Life: Alyx". Click here for more information.
This article relates to the workshop tools for "Half-Life: Alyx". Click here for more information.
This article's documentation is for Source 2. Click here for more information.

Map Extensions

From Valve Developer Community
Jump to: navigation, search

A Map Extension lets you add map content to an existing compiled map. For example, add new geometry to a map that ships with the game.

Creating a Map Extension-128485245.png


Map Extensions have the following limitations:

  • It cannot modify anything in the parent map (Particularly: they cannot remove entities or affect baked lighting.)
  • Static objects in the extension map won't cast shadows from static lights in the parent map.
  • It can reference entities in the parent map via I/O, but must use the "final" fixed-up name rather than the Hammer name of the entity (use ent_text to find it).


First, create a new map in Hammer with File → New.

To have a good frame of reference, add a prefab that references an existing shipping map (find them in content/hlvr/maps/release/*)

Creating a Map Extension-128485222.png Creating a Map Extension-128485225.png

IMPORTANT STEP: Select the prefab, expand the "Transform" group and check "Editor Only" - this lets you see the target map in Hammer but not include its content when you compile your map. (If compiling your map takes a long time, you may have forgotten this!)

Creating a Map Extension-128485227.png Creating a Map Extension-128485235.png

Save and compile your map.

Creating a Map Extension-128485234.png

Creating a Map Extension-128485237.png

Creating a Map Extension-128485239.png

Re-run the game, and load the parent map using the 'addon_tools_map' command in the console:

addon_tools_map a2_pistol

You should see your extension map loaded and overlaid on top of the original map:

Creating a Map Extension-128485245.png