SourceForts Mapping
Welcome to 1.9.4, soldier. A lot has changed in the last few versions, the biggest change to mapping however is our utilisation of the new episode 1 code base; this changed some of the workings of the SDK and so the configuration has changed somewhat since 1.9.2.
External Resources
There are several extensive reference points for the VALVe Hammer Editor, here is a list of some of the best. These sites provide tutorials, FAQs and technical information for users from beginners to experts; it's always good to check these first before asking questions.
Level Design, Valve Developer Wiki
Level Design, Valve Forums
EditLife, Tutorials
EditLife, Forums
Interlopers.net, Mapping Tutorials
Interlopers.net, Texturing Tutorials
Configuring Hammer
To begin mapping for SourceForts you'll need to download the Source SDK. The SDK can be found on the Tools tab of Steam, simply right click on Source SDK and click "Install game...", once you've downloaded the SDK, right click on it again and choose "Properties", click the "Set Launch Options..." button, now type "-engine ep1" into the box and click OK.
You'll now want to load up Source SDK and open the Hammer Editor.
Go to Tools > Options and on the Game Configuration tab set the following options:
Game Data Files: $SteamDir\SteamApps\SourceMods\sourceforts\sourcef orts.fgd
Game Executable Directory: $SteamUserDir\half-life 2 deathmatch
Game Directory: $SteamDir\SteamApps\SourceMods\sourceforts
Hammer VMF Directory: $SteamDir\SteamApps\SourceMods\sourceforts\maps
And on the Build Programs tab:
Game Executable: $SteamUserDir\half-life 2 deathmatch\hl2.exe
BSP Executable: $SteamUserDir\sourcesdk\bin\ep1\bin\vbsp.exe
VIS Executable: $SteamUserDir\sourcesdk\bin\ep1\bin\vvis.exe
RAD Executable: $SteamUserDir\sourcesdk\bin\ep1\bin\vrad.exe
Compiled Maps: $SteamDir\SteamApps\SourceMods\sourceforts\maps
You're now ready to start mapping for SourceForts
SourceForts Specific Entities
SourceForts uses several entities to control gameplay and add the logic to the maps to make the game work. The following techniques all explain how to create and use common SourceForts entities, a VMF is also available in the 1.9.4 /maps folder with all of these set up in a basic map. Prefabs for all of these will be available for download here on 1.9.4's launch.
Flags:
First place a prop_flag entity where you wish the physical flag to be located, press Alt + Enter to bring up the properties menu and select the team the flag belongs to. Now create a world brush around the flag and cover it with the trigger texture. Click toEntity in the sidebar and select the func_flagzone entity, then simply change the team in the properties of the func_flagzone entity.
Buildwalls and round control:
Create a game_phase_control entity anywhere in the map. The output of this entity is information about the current phase. The most obvious use of this is for buildwalls. Create your wall between the two forts, convert it using toEntity to a func_brush and give it a unique name, in this example I will use buildWall. Now enter the properties menu for the game_phase_control and go to the Outputs tab. Name the first output OnBuildPhase with a target of buildWall and set Via this Input to Enable.In Now make a second output called OnCombatPhase with a target of buildWall and set Via this Input to Disable. Your build wall will now exist only in build phase and be disabled in combat phase. This can be used to make covers for the block spawners, or simply to disable the buttons in combat.
Spawning:
Spawning is simply handled by info_player_team_spawn entities. You need to set the team in the properties of the entity, and you're done.
There needs to be 128 units free in all directions that neither spawn entities or enemy players can be present in. For example if players can get onto the spawn room roof, there needs to be 128 units between the head of the spawn entity and the roof. There also would need to be 128 units between each spawn entity and spawn entities would need to be 128 units away from walls.
Block Spawning:
Blocks in SourceForts are created using a block spawner and destroyed using a disposer. Add an
env_block_spawner's. Once placed, change the
Team and
Type options. Also, add a name to the spawner for use by the func_button that triggers it. In order for players to use the new spawners you must trigger them by using
func_buttons.
Add a
func_button entity. Under its
Outputs tab press
Add. Select
OnPressed for the
My Output Named category. For the
Target Entities Named option, input the name of the appropriate
env_block_spawner. Use
Spawn for the
Via This Input section. Finally, hit
Apply and then close the properties box. Now repeat this for each of the other block spawners.

Now it's time to add in a disposer. A
func_disposer will remove any blocks that are thrown into it. To create a
func_disposer, create a new brush and give it the
trigger texture. Hit the
toEntity button and choose the
func_disposer entity. Anything that touches the brush will be removed. All blocks will be removed, the flag will be returned, and players will be killed. Along with the entity I suggest adding some type of visual key that there is indeed a func_disposer there along with a noclip texture in front to stop players being killed by it.
Health, Armour and Ammo:
Health, armour and ammo are handled by theitem_suitcharger,
item_healthcharger, and
item_ammo_crate entities. Again, set the team in the properties menu, or set them to a neutral alignment (
both).
Spawn Protection:
Spawns should be protected by creating a room with a door protected with a filter_activator_team.
To begin with add two
filter_activator_team entities. Name each one, and have each entity have a different
Filter Team Number I will go through this tutorial intending that you are creating the spawn door for your red spawn room.
Place a new brush, with a door type texture on it. Or if you wish your 'door' to be more of an energy feeling thing use the
effects/com_shield texture. Now with the brush selected hit the
toEntity button and choose the
func_wall_toggle entity. Give the entity a name, and then hit
Apply and close the box.
Next create a brush which, when touched will open the door. Place this on both ends of the door, that way red team members will be able re-enter the spawn room. Give the brush the
trigger texture, and then hit
toEntity and make it a
trigger_multiple. Give it a name, and then under the
Filter Name property, select the filter that has the
Filter Team Number option set to
Red.
Go to the
Outputs tab of the
trigger_multiple, hit
Add, and enter the following values. In the
My Output Named section select
OnTrigger. In the
Targets Entity Named box enter the name of the
func_wall_toggle that will be activated. For the
Via This Input field select
Toggle. Add a new output, and enter the same values, except add a
Delay of
.75. Hit
Apply and then close the box.
The final part of your spawn protection is to add a
trigger_hurt to kill players of the opposite team who manage to make it past the spawn door. Create a new brush, and place it somewhere inside of the spawn room behind the spawn door. Give it the
trigger texture, and then make it a
trigger_hurt entity. Set it's
Damage to
999. Under the
Filter Name section choose the the filter that is set to
Blue. Your spawn doors are now complete.
Map Errors
Interlopers.net provides a fantastic resource for finding and diagnosing compile time errors. Simply copy your entire log into the box provided and follow the instructions on the page.
Interlopers.net, Error Checker