Thanks for posting this!
You were pretty much spot on about round 20 and 29 being turning points! However, only solo has the 29 round cap.
If you want to learn more about Cold War's code, here's pseudo code for this exact function. I have replaced all hashes with their real values and changed variable names to make them more helpful to understand, unless they were unknown (only because the scriptbundle required does not exist). Then I put comments for hypothetical values. Round 1-5 are hardcoded values so I have included the max_zombie_func to show that. I hope this helps you understand the code behind it more! Feel free to ask questions. This is Pseudo Code. It will not compile!! Also the default_max_zombie_func will error if you don't handle more than 4 players!:
get_zombie_count_for_round(n_round, n_player_count) {
n_player_count = GetPlayers().size;
max = zombie_utility::get_zombie_var(#"zombie_max_ai"); //We don't know - hardcoded in Cold War (assume 24)
if (n_player_count == 1) {
highestRound = 29;
playerMult = 0.84;
additionalMult = zombie_utility::get_zombie_var(#"hash_67b3cbf79292e047"); //We don't know - hardcoded in Cold War (0.5 in bo4)
} else {
highestRound = 20;
playerMult = 0.6;
additionalMult = 0.5 + n_player_count / 2;
}
if (n_round < var_8ca3a339) /*if the round is < 29 on solo OR < 20 on co-op do this*/ {
playerMult = zombie_utility::get_zombie_var(#"hash_607bc50072c2a386"); //We don't know - hardcoded in Cold War (0.15 in bo4)
multiplier = n_round / 5;
if (multiplier < 1) {
multiplier = 1;
}
multiplier *= n_round * playerMult;
} else {
multiplier = n_round * playerMult;
}
max += int(additionalMult * zombie_utility::get_zombie_var(#"zombie_ai_per_player") * multiplier); //zombie_ai_per_player is hardcoded in Cold War (we can assume 6)
if (!isdefined(level.max_zombie_func)) {
level.max_zombie_func = &default_max_zombie_func;
}
n_zombie_count = [[ level.max_zombie_func ]](max, n_round);
return function_c112af8e(n_zombie_count);
}
default_max_zombie_func(max_num, n_round) {
/#
count = getdvarint(#"zombie_default_max", -1);
if (count > -1) {
return count;
}
#/
n_players = getplayers().size;
round1Counts = array(6, 8, 11, 14, 17);
round2Counts = array(9, 11, 14, 18, 21);
round3Counts = array(13, 15, 20, 25, 31);
round4Counts = array(18, 20, 25, 33, 40);
round5Counts = array(24, 25, 32, 42, 48);
switch (n_round) {
case 1:
max = round1Counts[n_players - 1];
break;
case 2:
max = round2Counts[n_players - 1];
break;
case 3:
max = round3Counts[n_players - 1];
break;
case 4:
max = round4Counts[n_players - 1];
break;
case 5:
max = round5Counts[n_players - 1];
break;
default:
max = max_num;
break;
}
return max;
}
Here's the result of said function.
This gets us to about