Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. Weapon damage

Weapon damage

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
6 Posts 3 Posters 932 Views 1 Watching
  • 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.
  • chasef7undefined Offline
    chasef7undefined Offline
    chasef7
    Banned
    wrote on last edited by
    #1

    Can anyone tell me which file/files store weapon damage?

    1 Reply Last reply
    0
    • Resxtundefined Offline
      Resxtundefined Offline
      Resxt
      Plutonium Staff
      wrote on last edited by
      #2

      Why? What are you trying to do?
      You could simply override damages dealt with GSC, you don't need to modify game files or whatever.

      An example to disable knife damage
      You can very easily print the available variables in the function arguments to debug it and write your desired logic

      init()
      {
          level.callbackplayerdamagestub = level.callbackplayerdamage;
          level.callbackplayerdamage = ::cancelKnifeDamage;
      }
      
      cancelKnifeDamage( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, timeOffset )
      {    
          if (sWeapon == "knife_mp")
          { 
              iDamage = 0;
          }
      
          self [[level.callbackplayerdamagestub]]( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, timeOffset );
      } 
      
      chasef7undefined 2 Replies Last reply
      0
      • Resxtundefined Resxt

        Why? What are you trying to do?
        You could simply override damages dealt with GSC, you don't need to modify game files or whatever.

        An example to disable knife damage
        You can very easily print the available variables in the function arguments to debug it and write your desired logic

        init()
        {
            level.callbackplayerdamagestub = level.callbackplayerdamage;
            level.callbackplayerdamage = ::cancelKnifeDamage;
        }
        
        cancelKnifeDamage( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, timeOffset )
        {    
            if (sWeapon == "knife_mp")
            { 
                iDamage = 0;
            }
        
            self [[level.callbackplayerdamagestub]]( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, timeOffset );
        } 
        
        chasef7undefined Offline
        chasef7undefined Offline
        chasef7
        Banned
        wrote on last edited by
        #3

        Resxt I just wanted to buff the DSR and galvaknuckles, and maybe whatever else i come up with. This script will work, thanks

        1 Reply Last reply
        1
        • Resxtundefined Resxt

          Why? What are you trying to do?
          You could simply override damages dealt with GSC, you don't need to modify game files or whatever.

          An example to disable knife damage
          You can very easily print the available variables in the function arguments to debug it and write your desired logic

          init()
          {
              level.callbackplayerdamagestub = level.callbackplayerdamage;
              level.callbackplayerdamage = ::cancelKnifeDamage;
          }
          
          cancelKnifeDamage( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, timeOffset )
          {    
              if (sWeapon == "knife_mp")
              { 
                  iDamage = 0;
              }
          
              self [[level.callbackplayerdamagestub]]( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, timeOffset );
          } 
          
          chasef7undefined Offline
          chasef7undefined Offline
          chasef7
          Banned
          wrote on last edited by chasef7
          #4

          Resxt Hey i dont mean to bug you but im having a bit of a difficult time with this for some reason. Did searching on the forum but still cant figure it out. Would you mind telling me what I need to change here for it to work? I tried with callbackplayerdamage as well.

          onplayerdamage( einflictor, eattacker, idamage, idflags, smeansofdeath, sweapon, vpoint, vdir, shitloc, psoffsettime )
          {
          	 if (sWeapon == "dsr50_upgraded_zm") //&& isDefined(self.hasSniper)
              { 
                  iDamage = 5555;
              }
          	 if (sWeapon == "tazer_knuckles_zm") //&& isDefined(self.hasKnife)
              { 
                  iDamage = 7777;
              }
          	return iDamage;
          }
          
          Resxtundefined willyasundefined 2 Replies Last reply
          0
          • chasef7undefined chasef7

            Resxt Hey i dont mean to bug you but im having a bit of a difficult time with this for some reason. Did searching on the forum but still cant figure it out. Would you mind telling me what I need to change here for it to work? I tried with callbackplayerdamage as well.

            onplayerdamage( einflictor, eattacker, idamage, idflags, smeansofdeath, sweapon, vpoint, vdir, shitloc, psoffsettime )
            {
            	 if (sWeapon == "dsr50_upgraded_zm") //&& isDefined(self.hasSniper)
                { 
                    iDamage = 5555;
                }
            	 if (sWeapon == "tazer_knuckles_zm") //&& isDefined(self.hasKnife)
                { 
                    iDamage = 7777;
                }
            	return iDamage;
            }
            
            Resxtundefined Offline
            Resxtundefined Offline
            Resxt
            Plutonium Staff
            wrote on last edited by
            #5

            chasef7 do you have the init funtion too with matching function names?
            Would be useful if you could print the values you get especially to make sure the funtion is actually called.

            I'm not sure if modifying damage works like that for zombies. I gave you a way to do it for multiplayer since you didn't ask for anything specific but maybe it doesn't work the same in zombies, I really don't know. I'll try to check tonight

            1 Reply Last reply
            0
            • chasef7undefined chasef7

              Resxt Hey i dont mean to bug you but im having a bit of a difficult time with this for some reason. Did searching on the forum but still cant figure it out. Would you mind telling me what I need to change here for it to work? I tried with callbackplayerdamage as well.

              onplayerdamage( einflictor, eattacker, idamage, idflags, smeansofdeath, sweapon, vpoint, vdir, shitloc, psoffsettime )
              {
              	 if (sWeapon == "dsr50_upgraded_zm") //&& isDefined(self.hasSniper)
                  { 
                      iDamage = 5555;
                  }
              	 if (sWeapon == "tazer_knuckles_zm") //&& isDefined(self.hasKnife)
                  { 
                      iDamage = 7777;
                  }
              	return iDamage;
              }
              
              willyasundefined Offline
              willyasundefined Offline
              willyas
              wrote on last edited by
              #6

              chasef7 que hay que hacer con eso para que funcione?

              1 Reply Last reply
              0
              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
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Donate