Skip to content
  • 0 Unread 0
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. No Drop Cap???

No Drop Cap???

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
9 Posts 4 Posters 1.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • PlzReviveMeundefined Offline
    PlzReviveMeundefined Offline
    PlzReviveMe
    Contributor
    wrote on last edited by PlzReviveMe
    #1
    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.

    luigistyleundefined JezuzLizardundefined 2 Replies Last reply
    0
    • PlzReviveMeundefined PlzReviveMe
      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.

      luigistyleundefined Offline
      luigistyleundefined Offline
      luigistyle
      Plutonium Staff
      wrote on last edited by
      #2

      PlzReviveMe said in No Drop Cap???:

      I don't want to put a really high number, either.

      Why not?

      PlzReviveMeundefined 1 Reply Last reply
      0
      • luigistyleundefined luigistyle

        PlzReviveMe said in No Drop Cap???:

        I don't want to put a really high number, either.

        Why not?

        PlzReviveMeundefined Offline
        PlzReviveMeundefined Offline
        PlzReviveMe
        Contributor
        wrote on last edited by
        #3

        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//
        
        luigistyleundefined 1 Reply Last reply
        0
        • PlzReviveMeundefined PlzReviveMe

          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//
          
          luigistyleundefined Offline
          luigistyleundefined Offline
          luigistyle
          Plutonium Staff
          wrote on last edited by
          #4

          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 🙂

          PlzReviveMeundefined 1 Reply Last reply
          0
          • luigistyleundefined luigistyle

            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 🙂

            PlzReviveMeundefined Offline
            PlzReviveMeundefined Offline
            PlzReviveMe
            Contributor
            wrote on last edited by PlzReviveMe
            #5

            luigistyle

            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.

            luigistyleundefined 1 Reply Last reply
            0
            • PlzReviveMeundefined Offline
              PlzReviveMeundefined Offline
              PlzReviveMe
              Contributor
              wrote on last edited by
              #6

              Speaking of, is there a waittill for picking up powerups?

              1 Reply Last reply
              0
              • PlzReviveMeundefined PlzReviveMe

                luigistyle

                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.

                luigistyleundefined Offline
                luigistyleundefined Offline
                luigistyle
                Plutonium Staff
                wrote on last edited by
                #7

                PlzReviveMe Realistically, who would ever get to 2,147,xxx drops (or am I misunderstanding what you're saying)?

                1 Reply Last reply
                0
                • PlzReviveMeundefined PlzReviveMe
                  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.

                  JezuzLizardundefined Offline
                  JezuzLizardundefined Offline
                  JezuzLizard
                  Plutonium Staff
                  wrote on last edited by JezuzLizard
                  #8

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

                  In order to change rng drops and remove the powerup drop cap we have to modify this function: powerup_drop( drop_point ) in _zm_powerups.gsc

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

                  1 Reply Last reply
                  2
                  • C_Kyleundefined Offline
                    C_Kyleundefined Offline
                    C_Kyle
                    wrote on last edited by
                    #9

                    Most detailed answer but no thanks or anything by op despite his bs question...gg

                    1 Reply Last reply
                    0

                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                    With your input, this post could be even better 💗

                    Register Login
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Unread 0
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups