-
Notifications
You must be signed in to change notification settings - Fork 29
Mapping for Super Zombie Fortress
This document explains how to create SZF maps by using entities and logic plugin uses, this assumes you know how to use Hammer Editor at a basic level. This is last updated for 4.4.0.476
Weapon pickups in SZF come in 5 rarities:
- Common: Weapons that can be found anywhere, both inside and outside spawn rooms
- Uncommon: Weapons that can be found outside of spawn rooms
- Rare: Weapons that are rare to find
- Static: Weapons that can't be found randomly, but maps could force set it
- Pickup: Non-weapon pickups, e.g. health kit, ammo packs, temporary buff
In order to make a weapon grabbable for the mode, you have to place a prop_dynamic
entity and set any model, but models/weapons/c_models/c_shotgun/c_shotgun.mdl
is commonly used. Then, you need to give it an specific name to make them work. These are:
-
szf_weapon
: These weapons can be anything. -
szf_weapon_common
: These weapons will always be common. -
szf_weapon_uncommon
: These weapons will always be uncommon. -
szf_weapon_rare
: These weapons will always be rare as long as the rare weapon cap per round (as of writing this, 15) has not been reached. -
szf_weapon_nopickup
: Acts likeszf_weapon
, but pickups will never spawn. -
szf_weapon_spawn
: These weapons won't go away after being picked up or being replaced. Will always be common. -
szf_weapon_uncommon_spawn
Acts likeszf_weapon_spawn
andszf_weapon_uncommon
combined, non-expiring uncommon weapon. -
szf_weapon_rare_spawn
: Acts likeszf_weapon_spawn
andszf_weapon_rare
combined, non-expiring rare weapon. Unlikeszf_weapon_rare
, it does not affect rare weapon cap, so it will always be a rare weapon no matter what. -
szf_weapon_static
: Can force set almost any TF2 weapon spawn as long as you assign it the appropriate model. -
szf_weapon_static_spawn
: Acts likeszf_weapon_spawn
andszf_weapon_static
combined, non-expiring of almost any weapons you want.
Weapon pickups can also be forced to roll for a specific class, by having it's name anywhere in pickup entity name. For example szf_weapon_rare_demoman
would be the same as szf_weapon_rare
, but it will only roll for Demoman's rare weapons.
List of possible weapons with model path for szf_weapon_static
and szf_weapon_static_spawn
can be found in this config. Note that skin may need to be set aswell if config listed it.
It doesn't matter that the same name is used for multiple prop_dynamic entities. The mode will assign them different weapons to pick up for survivors, and their orientation in the world will also be mimicked.
If you want to control multiple weapons while having different names, you can use szf_weapon_spawn_example
and it will still act like a szf_weapon_spawn
.
Another neat thing with the weapons, whenever a survivor picks up a weapon it will trigger OnUser1
output (only once per entity), and OnUser2
if the weapon entity is about to be removed/killed, along with survivor as a activator of the output.
It's recommended to make all CPs cannot be blocked by zombies, but not required. Plugin is not required to make this work, but still useful to know how.
How to make the CP unblockable by Zombies:
-
Make a filter
filter_activator_tfteam
for the RED team. The filter mode should beAllow entities that match criteria
, and you should give it a descriptive name, for exampleredfilter
. You can also make it the other way around: make a filter for the BLU team, and make its filter modeDisallow entities that match criteria
. -
Open the properties of the
trigger_capture_area
of your CP, disable SmartEdit (click on it), then click Add. Thekey
will befiltername
and the value will be the name of our filter (in this case,redfilter
) Don't forget to apply these changes and save your map. -
The CP will filter out BLUs from this point onward in all cases.
Another neat addition in SZF is the ability to pickup certain items similar to HL2/L4D. This means you can grab certain items that may aid you during gameplay, or necessary items for a scavenge map.
These entities need to be either prop_physics
or prop_physics_override
, and should have a name szf_carry
, szf_pick
or gascan
. Names like szf_carry1
will still work.
Similar to weapons, OnUser1
will be triggered whenever someone picks up a carry item, and OnUser2
if dropped.
One obvious use for these items are scavenge maps: basically, survivors look for key items and place an specific number of them in a certain spot in order to win. There's multiple uses for these items, make a keyblade to slice zombies, etcetera. It's up to you on what kind of item you want to make with this system.
There can be some cases where plugin can annoy or screw over something you don't want for your map. With this, there several options you can enable/disable by placing down info_target
anywhere in map with specific names. This includes:
-
szf_survivalmode
: Enables survival mode, this changes slightly on balances to be more accurate for survival maps, changes include:- Only one health regen per second.
- Higher zombie damage scale based on amount of survivors and zombies.
- No Frenzy and Tank from director.
-
szf_nomusic
: Disable all SZF musics, use this if you want to use your own musics for map. -
szf_director_notank
: Disables tank from plugin's decision. -
szf_director_norage
: Disables frenzy from plugin's decision. -
szf_director_spawnteleport
: Force all zombies to use frenzy's teleport to nearby players on spawn, This does not include instant respawn. Director may not always be able to find a spot to teleport, which you would still need to place some spawnpoints as normal. -
szf_rarecap
Sets max rare weapon to appear in map, for exampleszf_rarecap_20
would set to 20.
There also relays with specific name you can use to trigger events, this include:
-
szf_zombietank
: Force a tank, this also bypassesinfo_target
namedszf_director_notank
. -
szf_zombierage
: Force a frenzy, this also bypassesinfo_target
namedszf_director_norage
.szf_zombierage_15
can be used to set frenzy duration to 15 seconds. -
szf_laststand
: Plays "laststand" music.
Relays with specific name and output can also be used to listen events triggered from plugin, this include:
-
szf_zombierage
:FireUser1
fires when frenzy starts,FireUser2
fires when frenzy ends. -
szf_zombietank
:FireUser1
fires when tank spawns,FireUser2
fires when tank dies, both with activator as tank spawned/died. -
szf_laststand
:FireUser1
fires when there a last survivor with activator as last survivor,FireUser2
fires when last control point is being captured.
One relay name can be used for both firing events and listening to events.
Plugin use CP capture progress to calculate and scale how many zombies and survivor there should be. However there may be some maps where CP captures may not be a good solution for it.
If that happens, you can use entity math_counter
named szf_cp_scale
to tell plugin what value to use while ignoring current CP progress, scaling between 0.0
to 1.0
.
For example if you set value 0.0
, plugin expects the round has started. 0.5
when round is half-way there, 1.0
when at last area, etc.
There is a lot of things you can do with it, but you don't have to use all of it. Ideally you only need to place some szf_weapon and prevent zombies from capturing, which that should be enough to make your SZF map playable.