Zombie Panic! Source Mapping Guide

Please wait...

This article was written on an older version of FileFront / GameFront

Formatting may be lacking as a result. If this article is un-readable please report it so that we may fix it.

Published by Azzkiker 14 years ago , last updated 5 years ago
With yesterday's release of [url="http://halflife2.filefront.com/file/Zombie_Panic_Source_v101b_Full_Install;85732"]Zombie Panic: Source v1.01b Full Install[/url], the team have a released a guide covering the basics of ZPS mapping. A must-read for every ZPS level designer. Custom entities and random item placement system are explained. [b]Zombie Panic! Source mapping guide[/b] 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): Click to enlarge. 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 Legend: 1- 17 = Melee weapon 18 - 27 = Firearm 28 - 34 = 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: [img]http://screenshots.filesnetwork.com/32/others/zpsguide2.png[/img] 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: [img]http://screenshots.filesnetwork.com/32/others/zpsguide3.png[/img] 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! [url="http://zombiepanic.org/tutorial/tutmap.rar"]Tutorial Map Download[/url]
Comments on this Article

There are no comments yet. Be the first!