Aller au contenu

Photo

Can anything be done a the uselessness of Dirty Fighting feat?


  • Veuillez vous connecter pour répondre
50 réponses à ce sujet

#26
MagicalMaster

MagicalMaster
  • Members
  • 2 000 messages

henesua wrote...

MM, this sounds like you misunderstand the question in the first post, unless I missed something. The OP stated that Dirty Fighting is useless except at starting levels, not that it was useless in epic levels.

I was responding to the question directed at Pstemarie here.

Nothing to do with the first post.

Modifié par MagicalMaster, 01 février 2014 - 02:01 .


#27
Sumthing

Sumthing
  • Members
  • 230 messages
Just as a general question, does anyone know how much can you add to the games feats, skills and classes?

#28
Grani

Grani
  • Members
  • 554 messages
And I have another question. I was thinking about the solution Squatting Monk suggested and had this thought...
Are PC behavior events hardcoded? I imagine this is the most probable answer, but it's worth asking nevertheless.
Because if they weren't hardcoded and, for example, shared something like OnPhysicalAttacked event with the default script of the creatures, then modifying it would also work for PCs, too.

I guess that's more of a wishful thinking, though...

#29
Shadooow

Shadooow
  • Members
  • 4 465 messages

Grani wrote...

And I have another question. I was thinking about the solution Squatting Monk suggested and had this thought...
Are PC behavior events hardcoded? I imagine this is the most probable answer, but it's worth asking nevertheless.
Because if they weren't hardcoded and, for example, shared something like OnPhysicalAttacked event with the default script of the creatures, then modifying it would also work for PCs, too.

I guess that's more of a wishful thinking, though...

You can fake OnDamaged via OnHit on PC armor and the GetActionMode should work there, but all you can do is to apply the damage as a effect which as you might know has another issues like not piercing damage reduction. (Possible to workaround - Ive posted a code snippet somewhere there few days ago, but bad solution nevertheless)

#30
Grani

Grani
  • Members
  • 554 messages
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.

#31
Squatting Monk

Squatting Monk
  • Members
  • 444 messages
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.

#32
Shadooow

Shadooow
  • Members
  • 4 465 messages

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 .


#33
Grani

Grani
  • Members
  • 554 messages

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. :(

#34
Squatting Monk

Squatting Monk
  • Members
  • 444 messages

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.

#35
Squatting Monk

Squatting Monk
  • Members
  • 444 messages

Grani wrote...

Sounds good, but such a scaling would be probably too much for me to be able to do. :(

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.

#36
Grani

Grani
  • Members
  • 554 messages

Squatting Monk wrote...

Grani wrote...

Sounds good, but such a scaling would be probably too much for me to be able to do. :(

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. :) 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 .


#37
Shadooow

Shadooow
  • Members
  • 4 465 messages

ShaDoOoW wrote...

Grani wrote...

Thanks, I'll give it a try. :)
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 .


#38
Squatting Monk

Squatting Monk
  • Members
  • 444 messages
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 .


#39
Grani

Grani
  • Members
  • 554 messages
Shadooow, great news!

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

#40
Grani

Grani
  • Members
  • 554 messages
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?

#41
Squatting Monk

Squatting Monk
  • Members
  • 444 messages
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 .


#42
Grani

Grani
  • Members
  • 554 messages

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. :)

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


#43
Squatting Monk

Squatting Monk
  • Members
  • 444 messages
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.

#44
Grani

Grani
  • Members
  • 554 messages
I see. Thanks a lot for help, I'll see what I can do. :)

#45
Shadooow

Shadooow
  • Members
  • 4 465 messages
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.

#46
Grani

Grani
  • Members
  • 554 messages
As of yet I have found out that GetLastAttackMode does not work with neither OnDamaged event nor OnHeartbeat module event (I tried an OnHeartbeat check to see if PC's last attack was in Dirty Fighting mode but it doesn't work anyway).
That's problematic.

#47
Shadooow

Shadooow
  • Members
  • 4 465 messages

Grani wrote...

As of yet I have found out that GetLastAttackMode does not work with neither OnDamaged event nor OnHeartbeat module event (I tried an OnHeartbeat check to see if PC's last attack was in Dirty Fighting mode but it doesn't work anyway).
That's problematic.

I knew there is something fishy, Squatting Monk! I never used this function before, the GetActionMode returns a realtime combat mode. I was confused by this because I never actually used this in this event and because in a engine the action mode and combat mode are two completely different things which are accessed separatery. But in a NWScript both concepts are adressed by a single function.

this works Grani

int bDirty = GetActionMode(oDamager,ACTION_MODE_DIRTY_FIGHTING);

+ comfirming the GetLastAttackMode doesnt work outside of OnPhysical if you want to write about it into lexicon...

Modifié par ShaDoOoW, 03 février 2014 - 07:51 .


#48
Pstemarie

Pstemarie
  • Members
  • 2 745 messages
Now that you gents have figured out how to capture the combat modes, why not add the Improved Dirty Fighting Feat rather than modifying the original?

#49
Grani

Grani
  • Members
  • 554 messages
You guys are life savers. :D
I finally got it to work and it looks like everything is perfect!

I did it with OnHeartbeat, though. I scrapped the idea of using pseudo-heartbeat, as Squatting Monk advised, because it could burden the module quite significantly. A check added to a regular OnHeartbeat, however, should not be very taxing.
While this solution means there is a delay of up to 6 seconds between activating Dirty Fighting and applying the OnHit properties, it's not frankly that bad.

This also means there are no issues with PVP, as opposed to the situation in which the check was added to the OnDamage script, I guess.

Pstemarie, I personally think that modifying the existing feat rather than making a whole new one to make the old one useful is a better idea. It means players won't have to invest in two feats to find use in them, but only one. Besides, modifications can be done without altering 2da, which is another reason I, for one, find it more attractive.

Modifié par Grani, 03 février 2014 - 08:41 .


#50
Squatting Monk

Squatting Monk
  • Members
  • 444 messages

ShaDoOoW wrote...

I knew there is something fishy, Squatting Monk! I never used this function before, the GetActionMode returns a realtime combat mode. I was confused by this because I never actually used this in this event and because in a engine the action mode and combat mode are two completely different things which are accessed separatery. But in a NWScript both concepts are adressed by a single function.

Awesome! I thought I'd seen a function like that, but I only every searched the Lexicon for "combat mode". Lots of potential in this function.