SONS OF THE FRONT 1944
Field manual / Define GameModes

Map Interactions

Add objects players can use and routes they can travel. Each guide lists the entities to place, the properties to set, and how to test them in game.

Download the TrenchBroom profile and starter textures

Connect a field mortar to a map effect

Build a station from three entities. A sotf_prop supplies the artwork, a func_button receives Use, and a func_mortar_field defines where the game plays the impact.

  1. Place a sotf_prop point on the floor. Set prop to field_mortar and rotate its angle to face the way you want. Sons supplies this model when the map loads.
  2. Draw a small brush where a player can see and reach it beside the prop. Tie it to func_button. Set target to yard_impact, spawnflags to 1 for a stationary button, health to 0, and wait to 5 seconds between uses.
  3. Draw a separate box over a patch of solid ground. Its top face should be above the ground where the effect belongs. Tie the box to func_mortar_field, set targetname to yard_impact, and set m_iCount to 1. For an effects-only test, add the key m_iDamage with value 0.
  4. Download the effect pack and copy its content/sprites/ and content/sound/ folders beside your server’s maps/ folder. Select worldspawn and enter the three paths below. Every mortar field in this map shares these settings.
"sotf_field_flash" "sprites/alder/impact.spr"
"sotf_field_smoke" "sprites/alder/dust.spr"
"sotf_field_sound" "sound/alder/impact.wav"

Compile and host the map. Look at the button and press E on desktop or click the main-hand thumbstick in VR. The first flash, dust and positional sound should appear together on the ground after about 2.5 seconds. Press again after the button resets to see another sampled location. If Use opens the shop here, move the button outside the purchase zone. If only the sound plays, check both sprite paths and their folders.

Download field effects (.zip)

The pack contains the original workshop flash, dust and impact sound, plus a plaster burst and masonry sound for an alternate effect. To use the alternate pair, change the smoke path to sprites/valcour/plaster.spr and the sound path to sound/valcour/masonry.wav.

Open source/field-station.map in TrenchBroom to copy the three connected entities into your own level. The Alder Rise example includes a complete playable map with two working stations.

Build touch, Use and split doors

A door you can push open

  1. Draw the door in its closed position and leave space beside or above it for the whole leaf to move. Tie the moving brush to func_door.
  2. Leave targetname empty and set spawnflags=0 and health=0. Set angle=0 for travel along the map’s positive X axis, speed=100 map units per second, and lip=0 to clear the opening completely.
  3. Set wait=3 for three seconds fully open before closing. In game, walk into the leaf, step clear of its path and watch it return.

A door that requires Use

Give the door a targetname such as stores_door. Beside it, draw a small switch brush tied to func_button. Give the switch target=stores_door, spawnflags=1, health=0 and wait=1. Keep the door’s flags at zero. Aim at the switch and press Use. The switch resets after one second and the door follows its own wait before closing.

Two leaves that part on approach

  1. Make two separate func_door brushes that meet in the middle. Give both the same targetname, for example entry_pair. Use speed=100, lip=0, wait=3 and ordinary zero flags on both.
  2. For a horizontal opening along X, set one leaf’s angle to 180 and the other to 0. Along Y, use 90 and 270. For a vertical opening, use -1 on the upper leaf (up) and -2 on the lower leaf (down). Leave room on each side for its leaf to retract.
  3. Surround the doorway and both approaches with one trigger_multiple brush. Set target=entry_pair, wait=0.5 and team_no=0. Both leaves receive the signal. The trigger refreshes the open timer while an eligible player occupies it. Walk completely outside the trigger to test closing.

Restrict an entrance to a team

For a push-open door, set team_no on the door itself. For paired doors opened by a trigger_multiple, set team_no on the trigger, since the trigger sends the opening signal. Use 1 for map side 1, 2 for map side 2, or 0 for a shared door. Once a door opens, another player can follow through.

Keep a spawn entrance restricted even while its door is open

  1. Draw a separate stationary brush across the entire opening. Cover the full width and height of the doorway and give its faces the starter kit’s aaatrigger texture. You can place it behind a moving door or use it on its own.
  2. Tie this brush to func_team_barrier. Set team_no=1 to let map side 1 through and block map side 2, or team_no=2 for the reverse. A missing or zero side blocks both teams. The barrier reads the actor’s current map side, including after a round’s side switch.
  3. Enable collision generation when loading the BSP for your test. Cross from both teams. The allowed player should walk straight through the opening. The opposing player should stop there even while the door is open. Keep the painted sign or doorway trim as separate visible scenery.

Add a ladder or rope ladder

  1. Build the visible rungs or place your rope artwork. Leave standing room at the foot and a clear landing at the top.
  2. Draw one continuous, thin brush immediately in front of the artwork. Extend it from the reachable lower end to the upper landing and tie it to func_ladder. For a sloping rope ladder, align the brush with the slope. Both types use the same classname.
  3. In the game, face into the climb volume and hold forward while looking level or up. At the top, check that you step onto the landing. Turn back, look down the ladder and press forward to descend. If the top catches, check for an overhanging lip or solid brush across the exit.
  4. For bots with an authored waypoint file, connect the approach at the foot to the exit at the top. Add the return link if bots should descend. Test the route in both directions.

Water and swimming

  1. Build the pool floor and banks with ordinary solid brushes. Fill the space between them with a separate closed brush. Its top face is the waterline. Use the starter kit’s !workshop_water texture on the water brush.
  2. For a pool that requires air, tie the brush to func_water. For an underwater passage where players can breathe, choose func_water_no_breathing. Both use the same swimming movement. A breathable brush takes priority where the two volumes overlap.
  3. Leave air above the ordinary pool and give it a low exit ledge. Compile the map and enter the pool in Play Mode. Move forward while looking down to dive, then look up and move toward the ledge to climb out.

Test the waterline

In ordinary water, the Air countdown shows how much of the player’s 12 seconds of breath remains. At 12 seconds they take 25 damage, then another 25 for each further second underwater. Bringing the camera above the surface restores full breath. In a breathable volume, keep the camera submerged past 12 seconds and check that health stays steady. Stepping back into ordinary water starts a fresh breath timer.

Add a purchase zone

  1. Draw a brush covering the walkable area of a shop, from floor level to above the player’s head. Tie it to func_buyzone. Make a second brush at the other spawn if both teams should have separate shops.
  2. Set the shop’s team key. Use 0 for a shared zone. In a site round use 1 for the carrier side and 2 for the opposing side. In a hostage rescue layout use 2 for the rescuers and 1 for the guards. This entity reads team separately from the team_no used by spawn points.
  3. For a priced shop, give the map a round-based objective and set round_limit to a positive number in its sibling maps/<map-name>.cfg. Set buy_time_seconds to the purchase window you want at the beginning of each round. This example runs six rounds with 45 seconds to shop each round.
round_limit = 6
buy_time_seconds = 45

Stand inside the shop during the window and press E or click the main-hand thumbstick. Use the mouse and left-click on desktop. In VR, point the stick at a category or item and press the trigger. Step outside and check that the shop is unavailable.

For continuous team deathmatch, set round_limit=0. The same brush opens a free loadout menu throughout play and players receive their chosen equipment on respawn. A map without purchase zones offers the faction’s fixed class choices near spawn.

Inspect your map

Upload your compiled BSP to check its entities and download the list of files your server needs. The downloadable example maps include working interactions you can compare with yours.