Author Topic: Can anything be done a the uselessness of Dirty Fighting feat?  (Read 2190 times)

Legacy_Squatting Monk

  • Hero Member
  • *****
  • Posts: 776
  • Karma: +0/-0
Can anything be done a the uselessness of Dirty Fighting feat?
« Reply #30 on: February 01, 2014, 08:46:44 pm »


               I like that idea. You could also make things sorta random so, depending on a die roll, it could blind, stun, slow, or knockdown. You could also set it to ramp up effectiveness based on how many attacks the PC is giving up to use that mode. That way it's not overpowered at low levels but still useful at high levels.
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Can anything be done a the uselessness of Dirty Fighting feat?
« Reply #31 on: February 01, 2014, 08:50:20 pm »


               

Grani wrote...

Interesting. But what if the improvement to Dirty Fighting was not extra damage, but, for example, a chance to inflict blindness upon the target? Issues concerning damage reduction would not be a problem, then, right?
After all increasing damage is not the only way a feat can be made more useful.

Indeed. 'B)'

Squatting Monk wrote...

I like that idea. You could also
make things sorta random so, depending on a die roll, it could blind,
stun, slow, or knockdown. You could also set it to ramp up effectiveness
based on how many attacks the PC is giving up to use that mode. That
way it's not overpowered at low levels but still useful at high
levels.

Agree, and it actually make a sense, being a dirty hehe, you gonna have to do it the hard way, but I can actually just add the onhit blindness property since I do use nwnx which has OnToggleMode event.
               
               

               


                     Modifié par ShaDoOoW, 01 février 2014 - 08:53 .
                     
                  


            

Legacy_Grani

  • Hero Member
  • *****
  • Posts: 1040
  • Karma: +0/-0
Can anything be done a the uselessness of Dirty Fighting feat?
« Reply #32 on: February 01, 2014, 09:26:06 pm »


               

Squatting Monk wrote...

I like that idea. You could also make things sorta random so, depending on a die roll, it could blind, stun, slow, or knockdown. You could also set it to ramp up effectiveness based on how many attacks the PC is giving up to use that mode. That way it's not overpowered at low levels but still useful at high levels.


Sounds good, but such a scaling would be probably too much for me to be able to do. '<img'>
               
               

               
            

Legacy_Squatting Monk

  • Hero Member
  • *****
  • Posts: 776
  • Karma: +0/-0
Can anything be done a the uselessness of Dirty Fighting feat?
« Reply #33 on: February 01, 2014, 10:25:07 pm »


               

ShaDoOoW wrote...

Agree, and it actually make a sense, being a dirty hehe, you gonna have to do it the hard way, but I can actually just add the onhit blindness property since I do use nwnx which has OnToggleMode event.

Yeah, I think that's the easiest way and probably the route I'd go if I were to do something like this. You could also use OnHitCastSpell with a custom spell and pack any effects you wanted in there.
               
               

               
            

Legacy_Squatting Monk

  • Hero Member
  • *****
  • Posts: 776
  • Karma: +0/-0
Can anything be done a the uselessness of Dirty Fighting feat?
« Reply #34 on: February 01, 2014, 11:16:56 pm »


               

Grani wrote...

Sounds good, but such a scaling would be probably too much for me to be able to do. '<img'>

Figuring out how many attacks per round the creature normally gets is fairly involved, but if you don't want characters getting credit for additional attacks caused by offhand weapons or monk fists, it's easier. If you're interested in this route, I'll see what I can whip up.

(Alternatively, you could make the bonus level-dependent rather than tying it to missed attacks.)

After knowing the number of attacks a creature is giving up, the big question would be how you want that to affect things. I would suggest letting the target make a save versus the effect, and converting those additional attacks into an increase in DC for the save. You could also increase the duration of the applied effects.
               
               

               
            

Legacy_Grani

  • Hero Member
  • *****
  • Posts: 1040
  • Karma: +0/-0
Can anything be done a the uselessness of Dirty Fighting feat?
« Reply #35 on: February 01, 2014, 11:45:49 pm »


               

Squatting Monk wrote...

Grani wrote...

Sounds good, but such a scaling would be probably too much for me to be able to do. '<img'>

Figuring out how many attacks per round the creature normally gets is fairly involved, but if you don't want characters getting credit for additional attacks caused by offhand weapons or monk fists, it's easier. If you're interested in this route, I'll see what I can whip up.

(Alternatively, you could make the bonus level-dependent rather than tying it to missed attacks.)

After knowing the number of attacks a creature is giving up, the big question would be how you want that to affect things. I would suggest letting the target make a save versus the effect, and converting those additional attacks into an increase in DC for the save. You could also increase the duration of the applied effects.


That would be excellent. '<img'> I'll be grateful if you manage to come up with something for that, thank you.
I think it would be optimal if it was dependent on missed attacks and not level.
And increasing the DC for saves is a great idea, I don't know about the duration, though. I think DC would be enough.
               
               

               


                     Modifié par Grani, 01 février 2014 - 11:49 .
                     
                  


            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Can anything be done a the uselessness of Dirty Fighting feat?
« Reply #36 on: February 02, 2014, 02:06:21 am »


               

ShaDoOoW wrote...

Grani wrote...

Thanks, I'll give it a try. '<img'>
By the way, does your 1.70 patch fix anything with the Circle Kick?

no but now when you brought it I think I could do something about it via nwnx, got finally whole weekend for nwn so maybe I will be able to do something about it.

Update: With a help of Mavrixio, admin of the world of Sinfar, I've been able to port their circle kick fix to the windows. Its still a server (nwnx) plugin so it will take me many hours to make a client version, but even now its a great new for a many persistant worlds.

With this adjustment, circle kick does a single attack on a close target and then restores focus on he original target.
               
               

               


                     Modifié par ShaDoOoW, 02 février 2014 - 02:06 .
                     
                  


            

Legacy_Squatting Monk

  • Hero Member
  • *****
  • Posts: 776
  • Karma: +0/-0
Can anything be done a the uselessness of Dirty Fighting feat?
« Reply #37 on: February 02, 2014, 05:42:34 am »


               That ended up being easier than I thought, though I'm sure it can be improved. This is just the OnHit spell script itself. I'll leave you to apply the item property to the weapon.

A word of caution: unless you're using nwnx_combat, only one OnHit Cast Spell property fires on a given weapon per hit. That means this will conflict with spells like Darkfire that add OnHit Cast Spell item properties. If this is too big a compromise, I suggest trying ShadoOow's method above.

// The base DC to resist any effect from dirty fighting.
const int DIRTY_FIGHTING_DC_BASE = 10;

// A number to add to the DC for each attack the PC loses to use dirty fighting.
const int DIRTY_FIGHTING_DC_MOD  = 5;

// A number to add to the DC for the various types of effects. Use to make some
// abilities harder or easier to resist to avoid over/underpowered effects.
const int DIRTY_FIGHTING_DC_MOD_BLINDNESS = 0;
const int DIRTY_FIGHTING_DC_MOD_KNOCKDOWN = 0;
const int DIRTY_FIGHTING_DC_MOD_STUNNED   = 0;
const int DIRTY_FIGHTING_DC_MOD_DAZED     = 0;
const int DIRTY_FIGHTING_DC_MOD_SLOW      = 0;

void main()
{
    object oPC     = OBJECT_SELF;
    object oTarget = GetSpellTargetObject();

    // Sanity check
    if (GetObjectType(oTarget) != OBJECT_TYPE_CREATURE) return;

    // Figure out how many attacks oPC is giving up to perform this move.
    int nHD  = GetHitDice(oPC);
    int nBAB = GetBaseAttackBonus(oPC);
    int nAttacks;

    // BAB increases after 21st level don't increase the number of attacks. If
    // he's epic level, we need to figure attacks based on his pre-epic BAB.
    if (nHD > 20)
        nAttacks = (nBAB - (nHD - 17) / 2) / 5;
    else
        nAttacks = (nBAB - 1) / 5;

    // This basic DC can be modified later depending on the effect.
    int nDC = DIRTY_FIGHTING_DC_BASE + (DIRTY_FIGHTING_DC_MOD * nAttacks);

    // Randomly determine the effects of the hit. Could change the die size and
    // cases to prefer some effects over others.
    effect eDirty;

    switch (d6())
    {
        case 1:
            nDC +=  DIRTY_FIGHTING_DC_MOD_BLINDNESS;
            eDirty = EffectBlindness();
            break;
        case 2:
            nDC +=  DIRTY_FIGHTING_DC_MOD_KNOCKDOWN;
            eDirty = EffectKnockdown();
            break;
        case 3:
            nDC +=  DIRTY_FIGHTING_DC_MOD_STUNNED;
            eDirty = EffectStunned();
            break;
        case 4:
            nDC +=  DIRTY_FIGHTING_DC_MOD_DAZED;
            eDirty = EffectDazed();
            break;
        case 5:
            nDC +=  DIRTY_FIGHTING_DC_MOD_SLOW;
            eDirty = EffectSlow();
            break;
        case 6:
            return; // Nothing!
    }

    // If we fail our save, apply the effect!
    if (!ReflexSave(oTarget, nDC))
        ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDirty, oTarget, 6.0);
}

               
               

               


                     Modifié par Squatting Monk, 02 février 2014 - 05:59 .
                     
                  


            

Legacy_Grani

  • Hero Member
  • *****
  • Posts: 1040
  • Karma: +0/-0
Can anything be done a the uselessness of Dirty Fighting feat?
« Reply #38 on: February 02, 2014, 10:42:03 am »


               Shadooow, great news!

Squatting Monk, thanks a lot, this should do the job.
               
               

               
            

Legacy_Grani

  • Hero Member
  • *****
  • Posts: 1040
  • Karma: +0/-0
Can anything be done a the uselessness of Dirty Fighting feat?
« Reply #39 on: February 03, 2014, 12:44:40 am »


               I seem to be having trouble with properly applying the OnHit property to the weapon.
What's the best way to do this? I thought about OnEquip, but that would add the property whether the player wanted it or not. Given that I see no way of determining when Dirty Fighting mode is turned on, the property would need to be added to the weapon beforehand, but that, in turn, would be bad for a player who was not planning on using Dirty Fighting.

Am I missing something?
               
               

               
            

Legacy_Squatting Monk

  • Hero Member
  • *****
  • Posts: 776
  • Karma: +0/-0
Can anything be done a the uselessness of Dirty Fighting feat?
« Reply #40 on: February 03, 2014, 12:49:37 am »


               You'd need to use nwnx_event's OnToggleMode to catch Dirty Fighting being turned on. You can then apply or remove the property on the currently-equipped weapon. I'd also set a local int noting that Dirty Fighting is on so that you can add or remove the property OnEquip and OnUnEquip.

EDIT: alternatively, if you use Windows, you can use the ToggleMode event in nwnx_cool. That gives some additional nifty features, like the ability to get some info about the latest attack from the OnHit event.
               
               

               


                     Modifié par Squatting Monk, 03 février 2014 - 01:05 .
                     
                  


            

Legacy_Grani

  • Hero Member
  • *****
  • Posts: 1040
  • Karma: +0/-0
Can anything be done a the uselessness of Dirty Fighting feat?
« Reply #41 on: February 03, 2014, 01:08:00 am »


               

Squatting Monk wrote...

You'd need to use nwnx_event's OnToggleMode to catch Dirty Fighting being turned on. You can then apply or remove the property on the currently-equipped weapon. I'd also set a local int noting that Dirty Fighting is on so that you can add or remove the property OnEquip and OnUnEquip.


Right. Still, I'm thinking on whether it could be done with pseudo-heartbeat, though in a more clumsy way.
If I made a GetLastAttackMode check in a pseudo-heartbeat function firing, for example, every second, then it should work pretty well in theory.

But how much would such a solution burden the game? I imagine it might not be very smooth...

I'll probably go with the NWNX solution if no other good option is found, but I'd rather try first. '<img'>
               
               

               


                     Modifié par Grani, 03 février 2014 - 01:09 .
                     
                  


            

Legacy_Squatting Monk

  • Hero Member
  • *****
  • Posts: 776
  • Karma: +0/-0
Can anything be done a the uselessness of Dirty Fighting feat?
« Reply #42 on: February 03, 2014, 01:20:47 am »


               Not sure if GetLastAttackMode() works anywhere other than OnPhysicalAttacked. If it does, that's certain to be useful. That said, unless you can't or don't want to use NWNX, I'd avoid using a pseudo. It's going to result in a lot of unnecessary script calls for very little gain.

If you really want a non-NWNX solution, you should probably replace dirty fighting with a custom feat. It could be an instant use feat to simulate toggling a mode (in which case the item property solution still works) or a targeted feat that can be used at will.
               
               

               
            

Legacy_Grani

  • Hero Member
  • *****
  • Posts: 1040
  • Karma: +0/-0
Can anything be done a the uselessness of Dirty Fighting feat?
« Reply #43 on: February 03, 2014, 01:22:59 am »


               I see. Thanks a lot for help, I'll see what I can do. '<img'>
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Can anything be done a the uselessness of Dirty Fighting feat?
« Reply #44 on: February 03, 2014, 01:31:45 am »


               Well to make a non-NWNX solution you need to find out whether GetLastAttackMode does work in creature OnDamaged script. Plus, if not then if it works on the onhit (dont worry about the way it looks I know how to workaround it so its not even visible).

And I dont know this, could test tomorrow but not now, better test yourself. If it works in OnDamaged then its super easy and the only problematic part is PvP where you have to use OnHitCastSpell on armor (which is imo better than on weapon). Something Ive already done and can share.