Call of Duty 5: Zombie Mapping 101

From COD Modding & Mapping Wiki
Share/Save/Bookmark
Jump to: navigation, search
<addhtml><iframe src="http://rcm.amazon.com/e/cm?t=rw0b-20&o=1&p=48&l=ur1&category=videogames&banner=03XX10Q1NZN7VPMSY702&f=ifr" width="728" height="90" scrolling="no" border="0" marginwidth="0" style="border:none;" frameborder="0"></iframe> </addhtml>

Nutshell.png This tutorial will explain step-by-step how to add Zombie Game-Mode to your Map


Naming your map

So im guessing you have made your Geo/Map and are ready to implement Zombies to your map! The first thing we need to do to make sure there are no errors when compiling or when ever later.. We all hate errors !!

Save your map name with the prefix nazi_zombie_ then your map name so obviously it will be

nazi_zombie_yourmapname

Making spawn points

  • Next we need to add your Spawn points for you and your buddys!
  • Right click in the 2D Grid and go to Info>>>Player>>>Start You will only need one of these due to the fact that the other spawn points will be Script_structs


Zombies101 3.png


  • Right, now add (4) script_structs, you add these by right clicking in the 2D Grid and go down to Script>>>Struct
  • Then give all 4 of the Script_structs the key and values as shown here... *Press N to bring up the entity window*
Key: "targetname"
Value: "initial_spawn_points"


Zombies101 4.png

Placing zombies in your map

Now we will have to place the zombie spawn points, So right click in the 2D Grid view and go to Actor>>Axis>> and Select zombie_ger_ber_sshonor now give him

  • Some Keys & Values. *Press N to bring up the entity window*
"script_noteworthy" "zombie_spawner"
"count" "9999"
"script_forcespawn" "1"
"targetname" "zombie_spawner_init"
"spawnflags" "3"


Zombies101 5.png


Once you have given the zombie the Keys and Values,

Place about 2 or 3 at each spawn location!

Placing nodes/Walkways for your zombies

  • Now once you have placed your zombies in the map, We are going to have to make a walkway for the zombie to walk along or they will be just stood there
  • So Right click in the 2D View and goto Node then click on pathnode, now you should see a pink box, Great! now you have to set a trail from where your zombie
  • Spawns to a window or door so the zombie can attack etc. Place pathnodes at regular intervals (128 units) throughout the map and ensure they do not overlap
  • With any other nodes. (I advise you to make 2 or 3 different paths for the zombie to walk on, because they will all be following 1 path!


Placing boards on your windows

  • To simply add boards to your windows Right click in the 2D View and goto Misc>>>Prefab and then go into the folder ZombieMode and select Window_Med.map


Zombies101 1.png


  • Place it over your window.. You will see arrows pointing out from the 2 red boxes.. This means the direction the arrows are pointing, thats the way the Zombies come through the windows!
  • Now that is done we need to add the animation for when the zombie reaches the window and then he climbs through! This is done with traversals, Dont worry there is a prefab already done for you!
  • Just right click in the 2D Grid View and goto Misc>>>Prefab select Traverse, Find and select the prefab Wall_Hop.map,


Zombies101 2.png


  • Now place it on your windows, (You will see a brush with the texture traverse on it) this allows us to correctly line up our window for a perfect wall_hop animation.

Placing Blockers & buy triggers

So you want to block a place off and use it later on if you get into trouble with zombies? Ok its simple..

I assume you have your place made that you want blocked off? ok good!

Now make a script_model and assign any model you want to block off the path to your other room! Now lets give it some keys & Values

  • Press N to bring up the entity window*
"script_linkTo" "1" (this needs to be 1 to make it unique, Read below)
"spawnflags" "1"
"targetname" "couch1" << Im using couch1 because its easier for me and you to understand (you can use anyname you want)
"script_firefx" "poltergeist"
"script_fxid" "large_ceiling_dust"
"script_noteworthy" "jiggle"
  • Now thats done we need to make a script_struct so when you buy the blocker it has a place to move to..

so right click in the 2D grid view and goto script_struct and place it where you want the blocker to move to, once you placed it we need to give it some keys

and values so *Press N to bring up the entity window*

"script_linkName" "1" 
  • As you notice here its "1" the same as script_linkto why these are both "1" that means they are linked to each other, but if you want more than one blocker
  • You need to change this to "2" and so on and so forth *obviously*
  • Right once you done both of them you should see a Red Line connected to the Script_struct and the Blocker you made if you see this then GREAT!! if not, re-read carefully, i know its abit confusing! Now we need create the trigger so you can actually buy the blocker..
  • So create a brush where you want to buy the blocker, then right click on the brush you made in the 2D View and go to Trigger>>>Use now lets give it some Keys and Values.. *Press N to bring up entity window*
"targetname" "zombie_debris"
"zombie_cost" ""
"target" "couch1" << This is the same as the targetname we gave our couch earlier

Zombie cost is left blank because you have to set the price yourself, Below are the prices available to use.

Zombie Costs

100 200 250 500 750 1000 1250 1500 1750 2000


Right, I think maybe some of you are wondering when your playing zombies and you go upstairs or open the room with the magic box in it, why zombies start to

go to them rooms, Well its simple You make another zombie spawn location and you have to target the couch TO the zombies, But if you want to do this then

when you make the NEW zombie you have to give him a DIFFERENT targetname than the rest of the zombies because when you select the couch then the zombie and

press W you will see all of the zombies connect, but we only want the NEW ZOMBIE to connect so you have to give the new zombie a different targetname than

the others it can be anything! So when you give him a new targetname, Select the couch, then the NEW zombie and press W, he should be connected, so when you buy the blocker, he will start to spawn! Easy to follow? Yay!

Ohh almost forgot, When you make the new zombies target the blocker, you have to make the zombie target a script_strict to tell it to goto this window, so you make a script_struct and place it near the window you want the zombie to goto, then select the script_struct THEN select the zombie and press W!

Buyable Guns

Buyable guns are unique like blockers

Right so you have your zombies setup and your blockers now you want to add guns? Ok cool, So right click in the 2D View and make a Script_model. and assign the model of the gun you want and place it on the wall. Right now we need to make the Buy Trigger..

so make a brush where you want to buy the gun from, and then right click in the 2D View and go to Trigger>>Use Now Select the Trigger THEN the Gun model and

Press W, You should see a red line connect to it now Ok good, Now we need to give the TRIGGER some keys and values, So select the trigger enter these..

"targetname" "weapon_upgrade"
"zombie_weapon_upgrade" ""

The Zombie_weapon_upgrade needs the value of the WEAPON FILE, Below are the Weapon file names

Pistols

colt
colt_dirty_harry
walther
sw_357

Semi Auto

m1carbine
m1garand
gewehr43

Full Auto

stg44
thompson
mp40

Bolt Action

kar98k
springfield

Scoped

ptrs41_zombie
kar98k_scoped_zombie

Grenade

molotov
fraggrenade
stielhandgranate

Grenade Launcher

m1garand_gl
m7_launcher

Flamethrower

m2_flamethrower_zombie

Shotgun

doublebarrel
doublebarrel_sawed_grip
shotgun

Bipod

fg42_bipod
mg42_bipod
30cal_bipod

Heavy MG

bar

Rocket Launcher

panzerschrek

Special

ray_gun


Playable area

Playable area is used to make sure power ups don't spawn outside the contained areas of map where players aren't able to reach the power up.

To make a playable area, make a trigger_multiple in your map and give it the keys and values

"targetname" "playable_area"

You can only have ONE playable area trigger in your map! You can split it up however, but you can only have one:

  • Make two brushes using the Trigger Tool Texture, select them both then right-click in the 2D view and do trigger > multiple.

This will count as one trigger split into different brushes.

Treasure Chest and weapon cabinet

Treasure Chest

The treasure chest is a prefab that you can easily through into your map, it is:

_prefabs\zombiemode\treasure_chest.map 


Zombies101 6.png


Weapon Cabinet

The weapon cabinet is a prefab that you can easily through into your map, it is:

_prefabs\zombiemode\weapon_cabinet.map


Zombies101 7.png

Scripts Files

You'll only really need two GSC script for Zombie mode to work. The following GSC scripts should go in your in raw/maps.

Information.png YOURMAPNAME should be changed to your map name, the nazi_zombie_ prefix is already added.


Levelname.gsc

#include common_scripts\utility; 
#include maps\_utility;

main()
{
	level thread maps\_callbacksetup::SetupCallbacks();

	include_weapons();
	include_powerups();
	
	maps\nazi_zombie_YOURMAPNAME_fx::main();
	maps\_zombiemode::main();
	
	init_sounds();

	// If you want to modify/add to the weapons table, 
           please copy over the _zombiemode_weapons init_weapons() and paste it here.
	// I recommend putting it in it's own function...
	// If not a MOD, you may need to provide new localized strings to reflect the proper cost.
}

init_sounds()
{
	maps\_zombiemode_utility::add_sound( "break_stone", "break_stone" );
}

// Include the weapons that are only inr your level so that the cost/hints are accurate
// Also adds these weapons to the random treasure chest.
include_weapons()
{
	// Pistols
	//include_weapon( "colt" );
	//include_weapon( "colt_dirty_harry" );
	//include_weapon( "walther" );
	include_weapon( "sw_357" );
	
	// Semi Auto
	include_weapon( "m1carbine" );
	include_weapon( "m1garand" );
	include_weapon( "gewehr43" );

	// Full Auto
	include_weapon( "stg44" );
	include_weapon( "thompson" );
	include_weapon( "mp40" );
	
	// Bolt Action

	include_weapon( "kar98k" );
	include_weapon( "springfield" );

	// Scoped
	include_weapon( "ptrs41_zombie" );
	include_weapon( "kar98k_scoped_zombie" );
		
	// Grenade
	include_weapon( "molotov" );
	// JESSE: lets go all german grenades for consistency and to reduce annoyance factor
	//	include_weapon( "fraggrenade" );
	include_weapon( "stielhandgranate" );

	// Grenade Launcher
	include_weapon( "m1garand_gl" );
	include_weapon( "m7_launcher" );
	
	// Flamethrower
	include_weapon( "m2_flamethrower_zombie" );
	
	// Shotgun
	include_weapon( "doublebarrel" );
	include_weapon( "doublebarrel_sawed_grip" );
	include_weapon( "shotgun" );
	
	// Bipod
	include_weapon( "fg42_bipod" );
	include_weapon( "mg42_bipod" );
	include_weapon( "30cal_bipod" );

	// Heavy MG
	include_weapon( "bar" );

	// Rocket Launcher
	include_weapon( "panzerschrek" );

	// Special
	include_weapon( "ray_gun" );
}

include_powerups()
{
	include_powerup( "nuke" );
	include_powerup( "insta_kill" );
	include_powerup( "double_points" );
	include_powerup( "full_ammo" );
}

include_weapon( weapon_name )
{
	maps\_zombiemode_weapons::include_zombie_weapon( weapon_name );
}

include_powerup( powerup_name )
{
	maps\_zombiemode_powerups::include_zombie_powerup( powerup_name );
}

Levelname_fx.gsc

#include maps\_utility; 
#include common_scripts\utility;

main()
{
	scriptedFX();
	footsteps(); 

}

footsteps()
{
	animscripts\utility::setFootstepEffect( "asphalt",    LoadFx( "bio/player/fx_footstep_dust" ) );
	animscripts\utility::setFootstepEffect( "brick",      LoadFx( "bio/player/fx_footstep_dust" ) );
	animscripts\utility::setFootstepEffect( "carpet",     LoadFx( "bio/player/fx_footstep_dust" ) );
	animscripts\utility::setFootstepEffect( "cloth",      LoadFx( "bio/player/fx_footstep_dust" ) );
	animscripts\utility::setFootstepEffect( "concrete",   LoadFx( "bio/player/fx_footstep_dust" ) );
	animscripts\utility::setFootstepEffect( "dirt",       LoadFx( "bio/player/fx_footstep_sand" ) );
	animscripts\utility::setFootstepEffect( "foliage",    LoadFx( "bio/player/fx_footstep_dust" ) );
	animscripts\utility::setFootstepEffect( "gravel",     LoadFx( "bio/player/fx_footstep_sand" ) );
	animscripts\utility::setFootstepEffect( "grass",      LoadFx( "bio/player/fx_footstep_sand" ) );
	animscripts\utility::setFootstepEffect( "ice",        LoadFx( "bio/player/fx_footstep_snow" ) );
	animscripts\utility::setFootstepEffect( "metal",      LoadFx( "bio/player/fx_footstep_dust" ) );
	animscripts\utility::setFootstepEffect( "mud",        LoadFx( "bio/player/fx_footstep_mud" ) );
	animscripts\utility::setFootstepEffect( "paper",      LoadFx( "bio/player/fx_footstep_dust" ) );
	animscripts\utility::setFootstepEffect( "plaster",    LoadFx( "bio/player/fx_footstep_dust" ) );
	animscripts\utility::setFootstepEffect( "rock",       LoadFx( "bio/player/fx_footstep_sand" ) );
	animscripts\utility::setFootstepEffect( "sand",       LoadFx( "bio/player/fx_footstep_sand" ) );
	animscripts\utility::setFootstepEffect( "snow",       LoadFx( "bio/player/fx_footstep_snow" ) );
	animscripts\utility::setFootstepEffect( "water",      LoadFx( "bio/player/fx_footstep_water" ) );
	animscripts\utility::setFootstepEffect( "wood",       LoadFx( "bio/player/fx_footstep_dust" ) );
}

scriptedFX()
{
	level._effect["large_ceiling_dust"]		= LoadFx( "env/dirt/fx_dust_ceiling_impact_lg_mdbrown" );
	level._effect["poltergeist"]			= LoadFx( "misc/fx_zombie_couch_effect" );
}

Zone Source

There are two important zone sources here: yourmapname.csv and zombiemode.csv, both go in [root]\zone_source

Warning.png DONT FORGET TO CHANGE IN THIS SCRIPT YOURMAPNAME has to be your map name obviously!!

yourmapname.csv

Should contains:

ignore,code_post_gfx
ignore,common

col_map_sp,maps/nazi_zombie_YOURMAPNAME.d3dbsp
rawfile,maps/nazi_zombie_YOURMAPNAME.gsc
rawfile,maps/nazi_zombie_YOURMAPNAME_anim.gsc
rawfile,maps/nazi_zombie_YOURMAPNAME_amb.gsc
rawfile,maps/nazi_zombie_YOURMAPNAME_fx.gsc

// New
rawfile,clientscripts/nazi_zombie_YOURMAPNAME.csc
rawfile,clientscripts/nazi_zombie_YOURMAPNAME_fx.csc
rawfile,clientscripts/createfx/nazi_zombie_YOURMAPNAME_fx.csc
rawfile,maps/createfx/nazi_zombie_YOURMAPNAME_fx.gsc

sound,common,nazi_zombie_YOURMAPNAME,all_sp
sound,generic,nazi_zombie_YOURMAPNAME,all_sp
sound,voiceovers,nazi_zombie_YOURMAPNAME,all_sp
sound,requests,nazi_zombie_YOURMAPNAME,all_sp
sound,weapons,nazi_zombie_YOURMAPNAME,all_sp
sound,projectiles,nazi_zombie_YOURMAPNAME,all_sp
sound,nazi_zombie_YOURMAPNAME,nazi_zombie_YOURMAPNAME,all_sp
sound,weapons,,all_mp
sound,weapons,,all_sp

sound,common,mp_testmap,!all_mp
sound,generic,mp_testmap,!all_mp
sound,voiceovers,mp_testmap,!all_mp
sound,multiplayer,mp_testmap,!all_mp

// for zombie specific assets
include,zombiemode

// for coop players
include,common_player_us

// for all weapon sounds
sound,weapons,audio_test_tuey,all_sp
xmodel,viewmodel_usa_marine_arms
xmodel,viewmodel_usa_marine_player
xanim,ch_dazed_d_death
xanim,ch_dazed_c_death
xanim,ch_dazed_b_death
xanim,ch_dazed_a_death
xanim,ch_dazed_d
xanim,ch_dazed_c
xanim,ch_dazed_b
xanim,ch_dazed_a
fx,env/dirt/fx_dust_ceiling_impact_lg_mdbrown
fx,misc/fx_zombie_couch_effect
xmodel,skybox_zombie
// WEAPONS
// regular weapons
weapon,sp/zombie_colt
weapon,sp/zombie_melee
weapon,sp/bar
weapon,sp/bar_bipod
weapon,sp/bar_bipod_crouch
weapon,sp/bipod_prone
weapon,sp/bipod_stand
weapon,sp/colt
weapon,sp/colt_dirty_harry
weapon,sp/colt_wet
weapon,sp/m1garand
weapon,sp/kar98k_scoped_zombie
weapon,sp/kar98k
weapon,sp/kar98k_scoped
weapon,sp/kar98k_scoped_bayonet
weapon,sp/kar98k_scoped_bayonet_zombie
weapon,sp/fraggrenade
weapon,sp/m2_flamethrower_zombie
weapon,sp/molotov
weapon,sp/napalmblob
weapon,sp/napalmbloblight
weapon,sp/doublebarrel
weapon,sp/m1carbine
weapon,sp/fg42_bipod
weapon,sp/doublebarrel_sawed_grip
weapon,sp/gewehr43
weapon,sp/ptrs41_zombie
weapon,sp/shotgun
weapon,sp/stg44
weapon,sp/thompson
weapon,sp/mp40
weapon,sp/mg42_bipod
weapon,sp/springfield
weapon,sp/m1garand_gl
weapon,sp/panzerschrek
weapon,sp/mk2_frag
weapon,sp/m7_launcher
weapon,sp/walther
weapon,sp/sw_357
weapon,sp/30cal_bipod
weapon,sp/stielhandgranate
weapon,sp/ray_gun
weapon,sp/type99_lmg

weapon,sp/fg42_bipod_crouch
weapon,sp/fg42_bipod_stand
weapon,sp/fg42_bipod_prone
weapon,sp/mg42_bipod_crouch
weapon,sp/mg42_bipod_stand
weapon,sp/mg42_bipod_prone
weapon,sp/type99_lmg_bipod_crouch
weapon,sp/type99_lmg_bipod_stand
weapon,sp/type99_lmg_bipod_prone

fx,bio/player/fx_footstep_dust
fx,bio/player/fx_footstep_water
fx,bio/player/fx_footstep_sand
fx,bio/player/fx_footstep_mud
weapon,sp/30cal_bipod_crouch
weapon,sp/30cal_bipod_stand
weapon,sp/30cal_bipod_prone

fx,env/smoke/fx_fog_zombie_amb
fx,env/light/fx_ray_sun_sm_short
fx,env/smoke/fx_fog_rolling_thick_600x600

Okay, Were all done, Compile and have fun slaying zombies!!


Data.png HERE is the .map and the scripts for this zombie test map so if you get confused take a look in there.


Sources: ModsOnline Tutorial by Hercules