Call of Duty 5: Zombie Mapping Advanced

From COD Modding & Mapping Wiki
Jump to navigation Jump to search

This is about how to create custom "Nazi Zombie" maps.

This tutorial is slightly advanced, a more in-depth Zombie Mapping tutorial is availiable HERE for more begineers mappers!

Overview

First and foremost, for your custom Nazi Zombies maps to work properly with the utility scripts, you will have to name your map with the prefix nazi_zombie_, For example, nazi_zombie_paris or nazi_zombie_chicago. Otherwise you will run into script errors and need to edit + include utilities into your Fastfile like _loadout.gsc


Nazi Zombie Mode is a SinglePlayer/Co-op only mode.


With that said, the following walk-through assumes you have already made the geometry for your level and are looking to implement Nazi Zombie Mode.


Implementation

Players

Add in an info_player_start found in the right click menu under the info sub menu. You'll need just one, but you'll have to add in four (4) script_structs to support four players. Place these anywhere you wish in your map and give them the KVP:

"targetname" "initial_spawn_points"

Normally you would then have to script a function to move the players around to each but the zombie mode utility already takes care of that for you if you use the above targetname.


Nodes

Your map will need nodes placed based on where you want the Zombies to walk. For an explanation of nodes and how to place them, please see the Navigation Overview page.

For Zombie Mode you will more than likely only need path nodes since Zombies won't be using action/cover nodes.


Boards

The boards Zombies rip through can easily be placed in your map use the prefab: _prefabs\zombiemode\window_med.map

The direction of the angle on the prefab is the direction the Zombie will approach it and break through.


Traversals

Ideally, if you have Zombies breaking through windows, they will need to make their way through the window. This requires placing in negotiation nodes with a traverse animation, but these are already done for you in the form of prefabs. The one you will need is: _prefabs/traverse/wall_hop.map

For better positioning of the prefab, use the traverse brush in the prefab as a guide. The brush represents the lower end of the wall so you can match it up to the geometry in your map so the AI plays the wall hop animation nicely onto your geo.

As with the window barriers, the direction of the angle on the prefab is the direction the Zombies will wall hop through.


Zombies

For placing zombies, right cick in the ortographic view and use Actors> Axis> Zombie_ger_ber_sshonor. While you have the spawner selected, press N (by default) to open the entity window to give the zombie some KVPs

"script_noteworthy" "zombie_spawner"
"count" "9999"
"script_forcespawn" "1"
"targetname" "zombie_spawner_init"
"spawnflags" "3"


Cameras

This isn't required but if you want a camera view pan at the end of the match add in two script_structs to your map. Make the first struct target the second one, the start and end points for the camera view respectively.

For the start point struct, you will need to give it two KVPs

"targetname" "intermission"
"speed" "20"

20 is a good number and the one used for the stock zombie map, feel free to tweak it.

You can repeat the process for a separate camera path so the game will cycle randomly through various camera paths during the end of the game.


Blockers

Blockers are the buyable furniture/door/etc.. in the map. These aren't prefabbed because they aren't always the same for how you set them up.


Model

Start off by making a script_model, and assigning any model you want to block the path. Then you'll need to give it some KVPs.
Required:

"script_linkTo" ""
"spawnflags" "1"
"targetname" ""

Optional:

"script_firefx" "poltergeist"
"script_fxid" "large_ceiling_dust"
"script_noteworthy" "jiggle"

script_linkTo and targetname are left blank up above because it will be different for each furniture piece (hence a reason why there are no prefabs). They will be referenced on the next few lines on how to properly set them up.


Move Location

You'll need to make a script_struct on where you want the blocker to move when triggered. You'll have to give a KVP:

"script_linkName" ""

The script_linkName should match up to the number as the script_linkTo on the blocker. You'll see a red line connected from the blocker to the struct when both are entered.


Buy Triggers

You'll then need to make triggers for players to buy the blocker, depending on how your map is laid out, you typically need to make two trigger_uses on both sides (in case the players unlock a different part of the map and come from the other side, depends on your map). Any triggers you want to use for that particular blocker will need a few KVPs:

"targetname" "zombie_debris"
"zombie_cost" ""
"target" ""

zombie_debris is being used for this tut because it is generic and easier to set up, there is also doors which require abit more KVPs, you can check out _zombiemode_blockers.gsc for more info.

The target should match up to the targetname on the blocker. Once the triggers are set, you should see red lines connecting to the blocker.

zombie_cost you can define on your own for how much money is required. These are the defined values (if you want a different price, you'll have to edit a string into the the zombie.str in raw\english\localizedstrings):

100 200 250 500 750 1000 1250 1500 1750 2000


Trigger Zombies

You can add more zombie spawn locations when the player buys something by simply having the blocker target the spawner(s) in Radiant. It is not necessary/required.

Those spawners should not get the targetname zombie_spawner_init otherwise that blocker will target everyone. You can give the new zombie spawners different targetnames of your choice, just don't name them zombie_spawner_init.


Buyable Weapons

Buyable weapons are like blockers in that they are unique, so they are no set prefabs for them.


Decal

You'll want to add the weapon chalk decals to your map, these can be found in Radiant under Locale>Decals.


Model

Add in a script_model.

Assign it a model of the weapon you want players to buy and place it by the decal.


Buy Trigger

Make a trigger_use.

Select the script_model you just made while the trigger is still selected and press W (by default) to make the trigger target the script_model weapon.

The trigger will need some KVPs:

"targetname" "weapon_upgrade"
"zombie_weapon_upgrade" ""

The zombie_weapon_upgrade value should be the weapon name.


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 KVP:

"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.


Treasure Chest

The treasure chest is a prefab that you can easily through into your map, it is: _prefabs\zombiemode\treasure_chest.map


Weapon Cabinet

The weapon cabinet is a prefab that you can easily through into your map, it is: _prefabs\zombiemode\weapon_cabinet.map


Script

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

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: [levelname].csv and zombiemode.csv, both go in [root]\zone_source

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


Levelname.csv

This one you do touch unlike Zombiemode.csv, and add in anything specific to your map, some common entries you'll probably want to throw in or use as a template are:

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

Zombiemode.csv

Zombiemode.csv has all the entries for Zombie mode to work, you shouldn't have to touch this though. If you do touch it and need the correct entries again, copy/paste these:

include,flamethrower

// strings
localize,zombie

// viewmodel arms
xmodel,viewmodel_usa_marine_arms
xmodel,viewmodel_usa_marine_player

// player zombie melee arms - the "weapon"
weapon,sp/zombie_melee

// Needed for laststand
weapon,sp/fraggrenade
weapon,sp/colt

// zombie anims
xanim,ai_zombie_attack_forward_v1
xanim,ai_zombie_attack_forward_v2
xanim,ai_zombie_attack_v1
xanim,ai_zombie_attack_v2
xanim,ai_zombie_crawl_death_v1
xanim,ai_zombie_crawl_death_v2
xanim,ai_zombie_crawl_v1
xanim,ai_zombie_death_v1
xanim,ai_zombie_death_v2
xanim,ai_zombie_door_pound_v1
xanim,ai_zombie_door_pound_v2
xanim,ai_zombie_door_tear_v1
xanim,ai_zombie_idle_v1
xanim,ai_zombie_idle_v1_delta
xanim,ai_zombie_shot_arm_left
xanim,ai_zombie_shot_arm_right
xanim,ai_zombie_shot_leg_left_2_crawl
xanim,ai_zombie_shot_leg_right_2_crawl
xanim,ai_zombie_sprint_v1
xanim,ai_zombie_sprint_v2
xanim,ai_zombie_walk_fast_v1
xanim,ai_zombie_walk_fast_v2
xanim,ai_zombie_walk_fast_v3
xanim,ai_zombie_walk_v1
xanim,ai_zombie_walk_v2
xanim,ai_zombie_walk_v3
xanim,ai_zombie_walk_v4
xanim,ai_zombie_door_tear_v2
xanim,ai_zombie_walk_fast_v1
xanim,ai_zombie_walk_fast_v2
xanim,ai_zombie_walk_fast_v3
xanim,ai_zombie_sprint_v1
xanim,ai_zombie_sprint_v2
xanim,ai_zombie_crawl
xanim,ai_zombie_crawl_v1
xanim,ai_zombie_crawl_death_v1
xanim,ai_zombie_crawl_death_v2	
xanim,ai_zombie_crawl_sprint
xanim,ai_zombie_idle_crawl
xanim,ai_zombie_idle_crawl_base
xanim,ai_zombie_idle_crawl_delta
xanim,ai_zombie_attack_crawl
xanim,ai_zombie_attack_crawl_lunge

// tear anims
xanim,ai_zombie_door_tear_v1
xanim,ai_zombie_door_tear_v2
xanim,ai_zombie_door_tear_high
xanim,ai_zombie_door_tear_left
xanim,ai_zombie_door_tear_right
xanim,ai_zombie_door_tear_low

// pound door animations
xanim,ai_zombie_door_pound_v1
xanim,ai_zombie_door_pound_v2

// after gib shot anims
xanim,ai_zombie_shot_arm_left
xanim,ai_zombie_shot_arm_right
xanim,ai_zombie_shot_leg_left_2_crawl
xanim,ai_zombie_shot_leg_right_2_crawl

// melee anims
xanim,ai_zombie_attack_forward_v1
xanim,ai_zombie_attack_forward_v2
xanim,ai_zombie_attack_v1
xanim,ai_zombie_attack_v2

// idle
xanim,ai_zombie_idle_v1
xanim,ai_zombie_idle_base

// traverse
xanim,ai_zombie_traverse_v1
xanim,ai_zombie_traverse_v2
xanim,ai_zombie_traverse_crawl_v1
		
rawfile,maps/_zombiemode.gsc
rawfile,maps/_zombiemode_score.gsc
rawfile,maps/_zombiemode_blockers.gsc
rawfile,maps/_zombiemode_utility.gsc
rawfile,maps/_zombiemode_spawner.gsc
rawfile,maps/_zombiemode_weapons.gsc
rawfile,maps/_zombiemode_powerups.gsc
rawfile,maps/_zombiemode_radio.gsc

rawfile,vision/zombie.vision

// materials 
material,zombie_intro
material,nazi_intro
material,hud_chalk_1
material,hud_chalk_2
material,hud_chalk_3
material,hud_chalk_4
material,hud_chalk_5

// leaderboard materials
material,scorebar_zom_1
material,scorebar_zom_2
material,scorebar_zom_3
material,scorebar_zom_4
material,scorebar_zom_long_1
material,scorebar_zom_long_2
material,scorebar_zom_long_3
material,scorebar_zom_long_4

// fog at edge of level
fx,env/smoke/fx_fog_zombie_amb
fx,env/light/fx_ray_sun_sm_short

// neckstump
xmodel,char_ger_honorgd_zomb_behead

// head gib stuff
fx,misc/fx_zombie_bloodsplat
fx,misc/fx_zombie_bloodspurt

// eye piece
xmodel,char_ger_zombieeye

// SRS 9/2/2008: for playing fx that we need to stop
xmodel,tag_origin

// FX for the eyes
fx,misc/fx_zombie_eye_single

// FX for player being a zombie
fx,misc/fx_zombie_grain_cloud

//zombie powerups
fx,misc/fx_zombie_powerup_on
fx,misc/fx_zombie_powerup_grab
fx,misc/fx_zombie_powerup_wave
fx,misc/fx_zombie_mini_nuke
fx,misc/fx_zombie_mini_nuke_hotness
xmodel,zombie_bomb
xmodel,zombie_skull
xmodel,zombie_x2_icon
xmodel,zombie_ammocan

// radio fx
fx,env/electrical/fx_elec_short_oneshot
xmodel,static_berlin_ger_radio


Compiling

Once you have everything done, go into Launcher and select your map in the map list. Check off:

Compile BSP
Compile Lights
Connect Paths
Compile Reflections (If you added reflection nodes)
Build Fast Files
Run Map After Compile (If you want to play it right away)

You may want to make your map a Mod Specific Map. Make a folder in your [root]\mods folder with the same name as your map for organization, then in Launcher check the Mod Specific Map box and select your mod on the drop down list.


FAQ

Zombies don't move or attack people.

A: You might have a bad path network, check Navigation Overview page again.
A: Or you might not have any barriers in your map, you'll need them.

Power ups spawn outside the barriers, play's can't get them.

A: You'll need to make one (1) trigger_multiple and give it a KVP targetname of playable_area and place it in your map.

Power ups don't spawn at all and I made playable area triggers.

A: You must only use one playable area trigger.


Sources: Treyarch's Wiki