ItsMods

Full Version: Some perks setup
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
YAMATO DA BEST MODDER
(08-29-2011, 14:16)G-Man Wrote: [ -> ]FFFFUUUUUUUU YAMATO

why? Huh
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.
(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.
(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?
(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?
(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.
(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 );*/
}
(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.