Zombie Panic! Source is a standalone cooperative, survival-horror, first-person-shooter! Set in the middle of a zombie apocalypse, players start as a small group of survivors attempting to stay alive. Each map will have its own objectives to complete and win the round or survive by a period of time.

RSS Zombie Panic! Source Mapping Guide

Basics of ZPS mapping. A must-read for every ZPS level designer. Custom entities and random item placement system explained.

Posted by on - Basic Mapping/Technical

Mapping for ZPS is much like mapping for HL2 Deathmatch - brushwork, prop placement, everything looks the same. There are 2 main differences that you need to know and get familiar with. First of them is lobby system, the second one is random item placement. Without further ado, let's start:

Lobby system:

At the beginning of round everyone spawns in the lobby. Lobby is a place where players can join teams by walking into triggers. You can design the place as you wish, it can be anything. Lobby has to be built outside the normal map, otherwise it may cause errors and players getting killed in the lobby. Now let me explain custom entities related to lobbys:

# info_player_commons - This is the entity that determines where players spawn in the lobby. You should have atleast 32 of those in your map so players will not spawn on each other on crowded servers. Do NOT place this entity outside the lobby.
# info_player_human - This is the entity that determines where players spawn after joining the humans team. You should have atleast 32 of those in your map so players will not spawn on each other on crowded servers. Do NOT place this entity inside the lobby.
# info_player_zombie - This is the entity that determines where players spawn after joining the zombies team. You should have atleast 4 (but this is the real MINIMUM!) of those in your map. Amount of zombies spawned at the beginning is dynamically adjusted to the amount of players. Below is a list explaining how many zombies are spawned:
From 2 to 8 players - 1 zombie
From 9 to 16 players - 2 zombies
From 17 to 24 players - 3 zombies
From 25 to 32 players - 4 zombies
Do NOT place this entity inside the lobby.
# info_player_observer - This is the entity that determines where players spawn after joining spectators team.

When you are done with setting up player spawns, you need to set up proper team triggers in the lobby. Let me explain the triggers first:
# trigger_joinhumanteam - Player joins the humans team after touching the brush tied to this entity.
# trigger_joinzombieteam - Player joins the zombies team after touching the brush tied to this entity.
# trigger_joinspectatorteam - Player joins the spectators team after touching the brush tied to this entity.

Here is how a proper lobby should look like (you can download source of this map at the bottom of this tutorial):

NOTE: You will get error that there is no player start (Map > Check for problems) - It is because the engine does not recognize info_player_commons as player spawn entity. Just ignore that error.

Random item placement:

Okay, things get a bit more complicated here. You can place weapons in the old way, just by placing weapon_ak47, weapon_glock etc. on your map or use our random item placement system. First, you need to get familiar with list of ZPS items:

1. weapon_plank

2. weapon_broom

3. weapon_golf

4. weapon_keyboard

5. weapon_hammer

6. weapon_racket

7. weapon_spanner

8. weapon_pot

9. weapon_fryingpan

10. weapon_sledgehammer

11. weapon_axe

12. weapon_shovel

13. weapon_crowbar

14. weapon_pipe

15. weapon_machete

16. weapon_tireiron

17. weapon_torque

18. weapon_glock

19. weapon_glock18c

20. weapon_usp

21. weapon_ppk

22. weapon_ak47

23. weapon_mp5

24. weapon_870

25. weapon_supershorty

26. weapon_revolver

27. weapon_frag

28. item_ammo_pistol

29. item_ammo_357

30. item_box_buckshot

31. item_ammo_smg1

32. item_battery

33. item_healthkit

34. item_healthvial

Blue - Melee weapon
Red - Firearm
Green - Item

The items above are all self-expleanatory. Now let me explain random placement entities. They can be placed in the map just like all other item entities(weapon_glock, item_battery etc.), the difference is that those entities will randomly spawn one of the items every round. They can be limited and defined but I will tell you about those entities later.

# random_any - Spawns random item from 1 to 34.
# random_weapon - Spawns random item from 1 to 27.
# random_firearm - Spawns random item from 18 to 27.
# random_rifle - Spawns random item from 22 to 23.
# random_shotrev - Spawns random item from 24 to 26.
# random_pistol - Spawns random item from 18 to 21.
# random_melee - Spawns random item from 1 to 17.
# random_ammo - Spawns random item from 28 to 31.
# random_misc - Spawns random item from 32 to 34.
Okay, so you have your random items, but what if you dont want to spawn more than 2 ak's and 1 glock? This is where random_def comes in. Place that entity anywhere in your map, turn of smart edit and start defining! If you don't define a weapon in random_def then it can spawn unlimited number of times, if you define a weapon and set the value to 0 then the weapon will not spawn. Any other number will set the maximum amount of each weapons spawned. You need to add new values, for example:


Now lets talk about random placement. You can do that in two different ways. The first one is by using random_def. Here's simple example. Place 3 random_rifle entities on your map. Without defining anything, each weapon has no limit to the number of spawns it can have in the map and 3 random rifles would spawn. Now place random_def and define the following in the entity:
weapon_ak47 - 1
weapon_mp5 - 1
This creates counters for the ak47 and the mp5. As you can see, we defined all rifles avaible and set the values to 1 but we have 3 random_rifle entites! In this case only two weapons can spawn, one (randomly choosen) random_rifle entity will not spawn anything, because amount of avaible rifles reached 0.

The other way to have random placement is using random_limit. Using this entity you can limit how many random spawn entites will be activated. For example limit 2 random_rifle, 1 random_pistol and place more of those entities in your map. Only 2 random_rifle and 1 random_pistol entities will spawn a weapon, the rest will be empty. Here's how to limit them properly:


Note: Do not use random_limit to limit weapons, you do that with random_def entity.

In short:
random_def = limiting weapons and ammo (item_ammo_pistol, weapon_ak47 etc.)
random_limit = limiting spawn places (random_rifle, random_firearm etc.)

Combine both random_limit and random_def entities to get the best effect and feel of randomness on your map. Below you can download example map, with a lobby and random item placement system. Enjoy!

Tutorial Map download


good idea putting this up here, hopefully it will get more people to make maps for this awesome mod

Reply Good karma Bad karma+5 votes

Its a funny mod but it lacks good maps...
Thats what makes it so wonderful you created this!
Looking forward to start mapping.

Reply Good karma Bad karma+1 vote

i agree with both of you and will try to create a map. awesome stuff

Reply Good karma Bad karma+1 vote

This is very useful and I wish to use it but could you tell me how to start actually making a ZP:S map? To clarify, how do I use textures, weapons, models, etc from ZP in Hammer?

Reply Good karma Bad karma+3 votes

If you want to know how to set up the configuration for hammer:
hope this helps

Reply Good karma Bad karma+1 vote

I have seen this before and have been working on a map its called zpo_Dispatch its where you start in a dark forest at night and run to the finish and survive the hordes of zombie comming at you. But I have big problems, one of them is how the f*$# do you place props? I have tryed just about all of my knoledge to see how and even more. Second of all I am having trouble finding the triggers for letting the zombies spawn into my map instead of people staying in the lobby forever (same goes for humans) and yes I have fixed my hammer for source sdk and got downloads for the stuff.

Reply Good karma Bad karma+1 vote

I tried to make a map, but my Half life 2 deathmatch does not show up in the SDK games list :/ Someone help me!!!(And i have got HL2 Deathmatch)
Anyone know how to fix??? Plz answer or PM me!!!!

Reply Good karma Bad karma+1 vote

just hit reset game configurations

Reply Good karma Bad karma+1 vote

Do you have to have Hl2 episode 2 to map for this mod? because when i set it all up in Sdk and go to "New" the grid doesnt show up on my "Top", "Front" or "Side" windows Please help =C btw add me on steam if ur willing to-Hammerof_woe

Reply Good karma Bad karma+2 votes

This comment is currently awaiting admin approval, join now to view.


Hi, wanted to tell you that I have a problem with the hammer zps. I think a map, get their weapons and randoms, when I start the map in the zps weapons disappear and randoms. What should I do? Help me, please. I tried other maps that are not mine and if they work with weapons and all, but not made ​​by me.

PD: I have everything set up properly
PD2: Sorry my English.

Reply Good karma Bad karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Follow Profile
Half-Life 2
Monochrome, Inc.
Send Message
Release date
Mod watch
Related Games
Half-Life 2
Half-Life 2 First Person Shooter
Related Groups
Monochrome, Inc.
Monochrome, Inc. Developer & Publisher