UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

How to change the max amount of zombies that spawn per round?

broken avatar :(
Created 7 years ago
by nugget850
0 Members and 2 Guests are viewing this topic.
8,619 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 18 September 2016
Last active: 3 years ago
Posts
15
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
nugget850's Groups
nugget850's Contact & Social Links
Is there a way I can change the amount of zombies that spawn per round? My map is pretty small and I would like the classic amount of zombies per round from World at War.
broken avatar :(
×
broken avatar :(
Location: br
Date Registered: 20 April 2016
Last active: 2 years ago
Posts
145
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
Personal Quote
if I surprised you, you had underestimated me
Signature
if I surprised you, it was because you underestimated me
×
Doodles_Inc's Groups
Doodles_Inc's Contact & Social LinksdoodlescriminoserDoodles_IncDoodlesInc
Yes, you can change the amount of zombies alive per round

Add <below> to your Usermap GSC Script in Function Main.

Code Snippet
Plaintext
level.zombie_ai_limit = 31;

The default number is 24 and the maximum is 31.

Hope it helps  ;)
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 18 September 2016
Last active: 3 years ago
Posts
15
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
nugget850's Groups
nugget850's Contact & Social Links
Doesn't that just change the maximum amount of zombies that can be alive at one time? I'm looking for something that will only spawn 24 zombies per round.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 12 September 2016
Last active: 3 years ago
Posts
306
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
×
reckfullies's Groups
reckfullies's Contact & Social LinksReckfulliesReckfullies
Doesn't that just change the maximum amount of zombies that can be alive at one time? I'm looking for something that will only spawn 24 zombies per round.

The amount of zombies are calculated differently per round.

These are all the level vars I could find so you can just edit them in your mapname.gsc(NOTE: Don't edit the actual _zm.gsc file since it won't work)
Spoiler: click to open...
Code Snippet
Plaintext
// Variables
// used to a check in last stand for players to become zombies
level.is_zombie_level = true;
level.default_laststandpistol = GetWeapon( "pistol_standard" );
level.default_solo_laststandpistol = GetWeapon( "pistol_standard_upgraded" );
level.laststandpistol = level.default_laststandpistol; // so we dont get the uber colt when we're knocked out
level.start_weapon = level.default_laststandpistol;
level.first_round = true;
level.start_round = GetGametypeSetting( "startRound" );
level.round_number = level.start_round;
level.enable_magic = GetGametypeSetting( "magic" );
level.headshots_only = GetGametypeSetting( "headshotsonly" );
level.player_starting_points = level.round_number * 500;
level.round_start_time = 0;
level.pro_tips_start_time = 0;
level.intermission = false;
level.dog_intermission = false;
level.zombie_total = 0; // Total number of zombies left to spawn
level.zombie_respawns = 0; // Total number of zombies that need to be respawned due to cleanup
level.total_zombies_killed = 0;
level.hudelem_count = 0;
level.zm_loc_types = [];
level.zm_loc_types[ "zombie_location" ] = []; // List of normal zombie spawners (other types will be added in the zone manager)

level.zm_variant_type_max = [];
level.zm_variant_type_max[ "walk" ] = [];
level.zm_variant_type_max[ "run" ] = [];
level.zm_variant_type_max[ "sprint" ] = [];
level.zm_variant_type_max[ "super_sprint" ] = [];
level.zm_variant_type_max[ "walk" ][ "down" ] = 14;
level.zm_variant_type_max[ "walk" ][ "up" ] = 16;
level.zm_variant_type_max[ "run" ][ "down" ] = 13;
level.zm_variant_type_max[ "run" ][ "up" ] = 12;
level.zm_variant_type_max[ "sprint" ][ "down" ] = 9;
level.zm_variant_type_max[ "sprint" ][ "up" ] = 8;
level.zm_variant_type_max[ "super_sprint" ][ "down" ] = 1;
level.zm_variant_type_max[ "super_sprint" ][ "up" ] = 1;

level.current_zombie_array = [];
level.current_zombie_count = 0;
level.zombie_total_subtract = 0;
level.destructible_callbacks = [];

difficulty = 1;
column = int(difficulty) + 1;

//#######################################################################
// zombie_utility::set_zombie_var( identifier, value, float, column );

// AI
zombie_utility::set_zombie_var( "zombie_health_increase", 100, false, column ); // cumulatively add this to the zombies' starting health each round (up to round 10)
zombie_utility::set_zombie_var( "zombie_health_increase_multiplier",0.1, true, column ); // after round 10 multiply the zombies' starting health by this amount
zombie_utility::set_zombie_var( "zombie_health_start", 150, false, column ); // starting health of a zombie at round 1
zombie_utility::set_zombie_var( "zombie_spawn_delay", 2.0, true, column ); // Time to wait between spawning zombies.  This is modified based on the round number.
zombie_utility::set_zombie_var( "zombie_new_runner_interval", 10, false, column ); // Interval between changing walkers who are too far away into runners
zombie_utility::set_zombie_var( "zombie_move_speed_multiplier",   4, false, column ); // Multiply by the round number to give the base speed value.  0-40 = walk, 41-70 = run, 71+ = sprint
zombie_utility::set_zombie_var( "zombie_move_speed_multiplier_easy",  2, false, column ); // Multiply by the round number to give the base speed value.  0-40 = walk, 41-70 = run, 71+ = sprint

zombie_utility::set_zombie_var( "zombie_max_ai", 24, false, column ); // Base number of zombies per player (modified by round #)
zombie_utility::set_zombie_var( "zombie_ai_per_player", 6, false, column ); // additional zombie modifier for each player in the game
zombie_utility::set_zombie_var( "below_world_check", -1000 ); // Check height to see if a zombie has fallen through the world.

// Round
zombie_utility::set_zombie_var( "spectators_respawn", true ); // Respawn in the spectators in between rounds
zombie_utility::set_zombie_var( "zombie_use_failsafe", true ); // Will slowly kill zombies who are stuck
zombie_utility::set_zombie_var( "zombie_between_round_time", 10 ); // How long to pause after the round ends
zombie_utility::set_zombie_var( "zombie_intermission_time", 15 ); // Length of time to show the end of game stats
zombie_utility::set_zombie_var( "game_start_delay", 0, false, column ); // How much time to give people a break before starting spawning

// Life and death
zombie_utility::set_zombie_var( "player_base_health", 100 ); // Base health of a player

zombie_utility::set_zombie_var( "penalty_no_revive", 0.10, true, column ); // Percentage of money you lose if you let a teammate die
zombie_utility::set_zombie_var( "penalty_died", 0.0, true, column ); // Percentage of money lost if you die
zombie_utility::set_zombie_var( "penalty_downed", 0.05, true, column ); // Percentage of money lost if you go down // ww: told to remove downed point loss

zombie_utility::set_zombie_var( "zombie_score_kill_4player", 50 ); // Individual Points for a zombie kill in a 4 player game
zombie_utility::set_zombie_var( "zombie_score_kill_3player", 50 ); // Individual Points for a zombie kill in a 3 player game
zombie_utility::set_zombie_var( "zombie_score_kill_2player", 50 ); // Individual Points for a zombie kill in a 2 player game
zombie_utility::set_zombie_var( "zombie_score_kill_1player", 50 ); // Individual Points for a zombie kill in a 1 player game

zombie_utility::set_zombie_var( "zombie_score_damage_normal", 10 ); // points gained for a hit with a non-automatic weapon
zombie_utility::set_zombie_var( "zombie_score_damage_light", 10 ); // points gained for a hit with an automatic weapon

zombie_utility::set_zombie_var( "zombie_score_bonus_melee", 80 ); // Bonus points for a melee kill
zombie_utility::set_zombie_var( "zombie_score_bonus_head", 50 ); // Bonus points for a head shot kill
zombie_utility::set_zombie_var( "zombie_score_bonus_neck", 20 ); // Bonus points for a neck shot kill
zombie_utility::set_zombie_var( "zombie_score_bonus_torso", 10 ); // Bonus points for a torso shot kill
zombie_utility::set_zombie_var( "zombie_score_bonus_burn", 10 ); // Bonus points for a burn kill

zombie_utility::set_zombie_var( "zombie_flame_dmg_point_delay", 500 );

zombie_utility::set_zombie_var( "zombify_player", false ); // Default to not zombify the player till further support
Last Edit: November 12, 2016, 09:13:49 pm by reckfullies
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 18 September 2016
Last active: 3 years ago
Posts
15
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
nugget850's Groups
nugget850's Contact & Social Links
I found this in the _zm.gsc

Code Snippet
Plaintext
function get_zombie_count_for_round( n_round, n_player_count )
{
max = level.zombie_vars["zombie_max_ai"];

multiplier = n_round / 5;
if( multiplier < 1 )
{
multiplier = 1;
}

// After round 10, exponentially have more AI attack the player
if( n_round >= 10 )
{
multiplier *= n_round * 0.15;
}

if( n_player_count == 1 )
{
max += int( ( 0.5 * level.zombie_vars["zombie_ai_per_player"] ) * multiplier );
}
else
{
max += int( ( ( n_player_count - 1 ) * level.zombie_vars["zombie_ai_per_player"] ) * multiplier );
}

if( !isDefined( level.max_zombie_func ) )
{
level.max_zombie_func = &zombie_utility::default_max_zombie_func;
}

n_zombie_count = [[ level.max_zombie_func ]]( max, n_round );

return n_zombie_count;
}

Could this possibly be modified to cap the amount of zombies there are per round?
broken avatar :(
×
broken avatar :(
Location: gb
Date Registered: 4 October 2016
Last active: 7 years ago
Posts
10
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
Xylozi's Groups
Xylozi's Contact & Social Links
If you assign a function to level.max_zombie_func you can override the result from that function.

To do that, you'd add something like this to your mod/map:

Code Snippet
Plaintext
function main()
{
    level.max_zombie_func = &myCustomFunction;
}

function myCustomFunction()
{
    zombie_count = 10;

    return zombie_count;
}

You'd change myCustionFunction to the algorithm you want to use for the zombie count per round.

 
Loading ...