Skip to content

Instantly share code, notes, and snippets.

@LeftoverAtoms
Last active October 21, 2025 07:15
Show Gist options
  • Save LeftoverAtoms/4224227766c9eed2112cbde0f66cc4d3 to your computer and use it in GitHub Desktop.
Save LeftoverAtoms/4224227766c9eed2112cbde0f66cc4d3 to your computer and use it in GitHub Desktop.
T9 Zombie Wave Limit for T5/T6 Zombies
/*
┌─────────────────────────────────────────────────────────┐
│ Cold War Zombie Wave Limit for Black Ops 1/2 Zombies │
└─────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────┐
│ INSTALLATION INSTRUCTIONS │
├─────────────────────────────────────────────────────────┤
│ https://plutonium.pw/docs/modding/loading-mods/ │
└─────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────┐
│ WHAT DOES THIS SCRIPT DO? │
├─────────────────────────────────────────────────────────┤
│ Copied zombie count calculation from Cold War. │
│ Requires additional testing to guarantee feature parity │
│ beyond round 5. │
└─────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────┐
│ CHANGE NOTES │
├─────────────────────────────────────────────────────────┤
│ [v1.0.1] │
│ - Arrays are not part of the engine API in BO1. │
│ [v1.0.0] │
│ - Initial release. │
└─────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────┐
│ CREDITS │
├─────────────────────────────────────────────────────────┤
│ - [LeftoverAtoms] creator. │
│ - [All0utWar] motivation / just a chill guy. │
│ - [ate47] atian-cod-tools were used to extract scripts. │
└─────────────────────────────────────────────────────────┘
*/
main()
{
level.max_zombie_func = ::get_zombie_count_for_round;
}
get_zombie_count_for_round( ignore_this )
{
n_round = level.round_number;
n_player_count = getplayers().size;
max = level.zombie_vars["zombie_max_ai"];
if ( n_player_count == 1 )
{
var_8ca3a339 = 29; // (hash_4127e6c9e8fdd112)
zom_count_scalar = 0.84; // (hash_115c28dc9ed1e60e)
zom_count_solo_mult = 0.5; // (hash_67b3cbf79292e047)
}
else
{
var_8ca3a339 = 20; // (hash_40be0852fb086eb0)
zom_count_scalar = 0.6; // (hash_3a53015873fb9c74)
zom_count_solo_mult = 0.5 + n_player_count / 2;
}
// (var_8ca3a339) is a round threshold, there is no unhashed name for it.
if( n_round < var_8ca3a339 )
{
zom_count_scalar = 0.15; // (hash_607bc50072c2a386)
multiplier = n_round / 5;
if( multiplier < 1 )
{
multiplier = 1;
}
multiplier *= n_round * zom_count_scalar;
}
else
{
multiplier = n_round * zom_count_scalar;
}
max += int( zom_count_solo_mult * level.zombie_vars["zombie_ai_per_player"] * multiplier );
n_zombie_count = default_max_zombie_func( max );
/# IPrintLn( "[RR] Set Zombie Count to ", n_zombie_count ); #/
return n_zombie_count;
}
default_max_zombie_func( max_num )
{
n_players = getplayers().size;
max = max_num;
// Rounds 1-5 have specific zombie counts.
if (level.round_number < 2)
{
total[1] = 6;
total[2] = 8;
total[3] = 11;
total[4] = 14;
total[5] = 17;
max = total[ n_players ];
}
else if (level.round_number < 3)
{
total[1] = 9;
total[2] = 11;
total[3] = 14;
total[4] = 18;
total[5] = 21;
max = total[ n_players ];
}
else if (level.round_number < 4)
{
total[1] = 13;
total[2] = 15;
total[3] = 20;
total[4] = 25;
total[5] = 31;
max = total[ n_players ];
}
else if (level.round_number < 5)
{
total[1] = 18;
total[2] = 20;
total[3] = 25;
total[4] = 33;
total[5] = 40;
max = total[ n_players ];
}
else if (level.round_number < 6)
{
total[1] = 24;
total[2] = 25;
total[3] = 32;
total[4] = 42;
total[5] = 48;
max = total[ n_players ];
}
return max;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment