No Drop Cap???
-
power_vacuum() { for(;;) { i = 0; level.zombie_vars["zombie_powerup_drop_increment"] = 2000; level.zombie_vars["zombie_powerup_drop_max_per_round"] = 4; while ( i > 2 ) { level waittill("end_of_round"); i++; } level.zombie_vars["zombie_powerup_drop_increment"] = 500; level.zombie_vars["zombie_powerup_drop_max_per_round"] = ???; level waittill("end_of_round"); } }
Trying to make a truly limitless drop cap but don't know how to approach that goal. This is for my Power Vacuum script every 3 rounds. I don't want to put a really high number, either. Secondly, I want others to check if I got the logic correct to achieve a power vacuum effect.
-
-
luigistyle said in No Drop Cap???:
Why not?
How about this? I set the the cap to the zombie's health at round 162. (max health cap for zombies)
level.zombie_vars["zombie_powerup_drop_max_per_round"] = ai_zombie_health(162); //The number is around 2 billion//
-
PlzReviveMe I don't really know GSC that well, I'm just curious as to why you didn't want to simply set it to some high number
-
Although that cap will not be reached anytime soon, there will be a time where the number will be too high and the computer won't be able to process that number if you were to hypothetically keep going forever. Black Ops 2 is a 32-bit game and the highest number that can be processed across the entire game is 2^31 - 1, which is around 2.1 billion. I'm trying to find a way close that loophole and make the drop cap truly infinite, while also not creating a script that will inevitably reach that number if it were to keep running.
-
Speaking of, is there a waittill for picking up powerups?
-
PlzReviveMe Realistically, who would ever get to 2,147,xxx drops (or am I misunderstanding what you're saying)?
-
PlzReviveMe There are two ways in which the game decides to make a zombie drop a powerup. The first way is by rng, more specifically every zombie has a 2% chance on death to drop a powerup. The second way is by points earned by players, which is
level.zombie_vars["zombie_powerup_drop_increment"] = 2000;
with 2000 points total being the default value. The rng drops remain constant throughout the game, however the drop increment increases by 1.14 multiplicatively every time a powerup drops if the powerup dropped due to the drop increment points being met. This means the only way to maintain a consistent amount of drops per round is to change the rng drop rate directly. Additionally, if you wanted a truly infinite maximum amount of drops per round the only way to do that is remove the limit completely.The way you would do both is by modifying _zm_powerups.gsc from here:
https://github.com/JezuzLizard/Recompilable-gscs-for-BO2-zombies-and-multiplayer/blob/master/patch_zm/maps/mp/zombies/_zm_powerups.gscIn order to change rng drops and remove the powerup drop cap we have to modify this function:
powerup_drop( drop_point )
in _zm_powerups.gscIn this function look for the following if statement: ```
if ( level.powerup_drop_count >= level.zombie_vars[ "zombie_powerup_drop_max_per_round" ] ) { return; }
and remove it.
Next in order to change the powerup rng drop rate you'll need to look for this if/else statement
if ( rand_drop > 2 ) { if ( !level.zombie_vars[ "zombie_drop_item" ] ) { return; } debug = "score"; } else { debug = "random"; }
Now in order to change the random drop rate you'll need to change the 2 to another number. Higher numbers increase the likelihood a powerup will drop and lower, the opposite. If you remove the if/else statement entirely you can make every zombie that dies always drop a powerup.
Finally you need to compile _zm_powerups.gsc as _zm_powerups.gsc and place it maps/mp/zombies
If you have any more questions feel free to ask.