Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tutorial Some perks setup
#1
Hello

Another thing I have never seen in a mod and is easy and quick, open _perks.gsc and find this:

Code:
initPerkDvars()
{    
    level.bulletDamageMod = getIntProperty( "perk_bulletDamage", 40 )/100;            // increased bullet damage by this %
    level.hollowPointDamageMod = getIntProperty( "perk_hollowPointDamage", 65 )/100;    // increased bullet damage by this %
    level.armorVestMod = getIntProperty( "perk_armorVest", 75 )/100;                    // percentage of damage you take
    level.explosiveDamageMod = getIntProperty( "perk_explosiveDamage", 40 )/100;        // increased explosive damage by this %
    level.blastShieldMod = getIntProperty( "perk_blastShield", 45 )/100;                    // percentage of damage you take
    level.riotShieldMod = getIntProperty( "perk_riotShield", 100 )/100;
    level.dangerCloseMod = getIntProperty( "perk_dangerClose", 100 )/100;
    level.armorPiercingMod = getIntProperty( "perk_armorPiercingDamage", 40 )/100;            // increased bullet damage by this %
}

Here you can change the damages and multipliers that different perks make, example: stopping power or danger close.

Example:

Code:
    level.blastShieldMod = getIntProperty( "perk_blastShield", 2 )/100;                    // percentage of damage you take

Thats all, Big Grin, is a good way to reduce tubes power or stopping power.
Reply

#2
YAMATO DA BEST MODDER
[Image: r212360a129ce9b84444093b6cd2699013a1fbn155.png]
Reply

#3
(08-29-2011, 14:16)G-Man Wrote: FFFFUUUUUUUU YAMATO

why? Huh
Reply

#4
So this will disable the damage totally?

Code:
initPerkDvars()
{    
    level.bulletDamageMod = getIntProperty( "perk_bulletDamage", 0 )/100;            // increased bullet damage by this %
    level.hollowPointDamageMod = getIntProperty( "perk_hollowPointDamage", 0 )/100;    // increased bullet damage by this %
    level.armorVestMod = getIntProperty( "perk_armorVest", 0 )/100;                    // percentage of damage you take
    level.explosiveDamageMod = getIntProperty( "perk_explosiveDamage", 0 )/100;        // increased explosive damage by this %
    level.blastShieldMod = getIntProperty( "perk_blastShield", 0 )/100;                    // percentage of damage you take
    level.riotShieldMod = getIntProperty( "perk_riotShield", 100 )/100;
    level.dangerCloseMod = getIntProperty( "perk_dangerClose", 100 )/100;
    level.armorPiercingMod = getIntProperty( "perk_armorPiercingDamage", 0 )/100;            // increased bullet damage by this %
}

Because " self setClientDvar( "perk_bulletDamage", "0" ); " don't working for me.
Reply

#5
(07-07-2012, 18:37)TheRaZ Wrote: So this will disable the damage totally?

Because " self setClientDvar( "perk_bulletDamage", "0" ); " don't working for me.

The player needs to have this perk and it needs to be a server dvar:

Code:
self setPerk("perk name here...");
setDvar( "perk_bulletDamage", "0" );

There are also other, better ways of disabling damage.
Reply

#6
(07-07-2012, 18:40)Nukem Wrote: The player needs to have this perk and it needs to be a server dvar:

Code:
self setPerk("perk name here...");
setDvar( "perk_bulletDamage", "0" );

There are also other, better ways of disabling damage.

Which one is the best?
Reply

#7
(07-07-2012, 18:37)TheRaZ Wrote: So this will disable the damage totally?

It will just set the damage which is added to the normal damage, if you have the specific perk, to 0.

E.g. Player with Stopping power and ak47: stock damage + damageadd through stopping power = 40 + 16 = 56

If you set it like you did: 40 + 0 = 40.

Anyway, what kind of damage do you want to disable?
All the damage?
[Image: lxkf2.jpg]
Reply

#8
(07-08-2012, 17:13)banz Wrote:
(07-07-2012, 18:37)TheRaZ Wrote: So this will disable the damage totally?

It will just set the damage which is added to the normal damage, if you have the specific perk, to 0.

E.g. Player with Stopping power and ak47: stock damage + damageadd through stopping power = 40 + 16 = 56

If you set it like you did: 40 + 0 = 40.

Anyway, what kind of damage do you want to disable?
All the damage?

All the damage yes.
Reply

#9
(07-08-2012, 17:40)TheRaZ Wrote: All the damage yes.

Well, you could just go to _damage.gsc and search for Callback_PlayerDamage
and add a return and comment out the Callback_PlayerDamage_internal line.

So it looks like this:
Code:
Callback_PlayerDamage( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime )
{
    return;
    /*Callback_PlayerDamage_internal( eInflictor, eAttacker, self, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime );*/
}
[Image: lxkf2.jpg]
Reply

#10
(07-08-2012, 23:37)banz Wrote: Well, you could just go to _damage.gsc and search for Callback_PlayerDamage
and add a return and comment out the Callback_PlayerDamage_internal line.

So it looks like this:
Code:
Callback_PlayerDamage( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime )
{
    return;
    /*Callback_PlayerDamage_internal( eInflictor, eAttacker, self, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime );*/
}

Thanks it worked.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tutorial] How to setup a MW3 Dedicated Server Linux alexrasen 6 16,081 08-13-2013, 20:12
Last Post: alexrasen
  Help Perks do not work (( x1412 6 4,425 04-06-2013, 18:09
Last Post: x1412
  All Level and Perks Pro Unlocker browneggs 1 2,731 09-24-2012, 09:38
Last Post: d0h!
  [Release] Obtain weapons and perks ddaavvee 10 8,156 09-02-2012, 21:04
Last Post: wise
  Perks Killer_xD 6 4,012 08-13-2012, 15:26
Last Post: Killer_xD
  Perks snippet Arteq 2 2,806 05-25-2012, 19:16
Last Post: Puffiamo
Smile [News] Black ops 2 *unconfimed* weapons and perks, attachments, equipment etc Sapphire Shores 1 2,933 04-23-2012, 15:09
Last Post: Yamato
  Promod Plugin + !Perks/Killstreaks/Killcam On-Off slash2909 2 3,241 03-20-2012, 22:18
Last Post: kris
  Edit Perks Lemon 6 3,762 03-19-2012, 20:12
Last Post: Rendflex
  Disabled some weapons, attachments and perks in mod vlukac 0 1,663 01-26-2012, 20:28
Last Post: vlukac

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.