Author Topic: Greater Two-Weapon Fighting  (Read 505 times)

Legacy_NorthWolf

  • Full Member
  • ***
  • Posts: 143
  • Karma: +0/-0
Greater Two-Weapon Fighting
« on: October 26, 2010, 08:20:46 pm »


               I've done some prowling of NWNX plugins and some testing of scripts, but as far as I can tell there's no way to add attacks to the off-hand. It's my understanding that the PRC emulates this by hooking AI events on NPCs, but I'd like it to work for PvP as well. The nwnx_events plugin doesn't seem to have anything that would support this emulation, so I'm sort of stuck on that front. Nothing in nwnx_funcs seems to be geared towards this either, unless I'm blind (I might very well be).

I know there's some methods of modifying attacks per round (EffectModifyAttacks and SetBaseAttackBonus) but neither of them can be applied to the offhand, whereas EffectAttackIncrease and EffectAttackDecrease can both be specified to work for the on-hand, off-hand, or both. This sort of gives me hope, but then again I presume someone would've done it by now if there was a way to do this neatly and I wouldn't be sitting here asking a silly questions like this.

So, is there something I am utterly missing or is there no solution beyond emulation at this point in time?

Edit: I poked around a bit more and figured out exactly how the PRC does its magic. Sorry for wasting anyone's time!
               
               

               


                     Modifié par NorthWolf, 30 octobre 2010 - 10:21 .
                     
                  


            

Legacy_SunnyVercett

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Greater Two-Weapon Fighting
« Reply #1 on: January 22, 2014, 07:23:16 am »


               So how does the PRC do this magic? Please do tell cuz I'm kind of stuck here too.

I've found this spell constant called SPELL_T_TWO_WEAPON_FIGHTING in prc_spell_const.nss, with the value of 2705, but that's all I could make out by now. The 2705th line in prc's spell.2da is null, and I am likely to scratch my hair off.

Btw my PRC is v3.5. Should I use a earlier release to get this invisible spell? Or it's just that this spell is abandoned because they've invented a new way to achieve its goal?
               
               

               


                     Modifié par SunnyVercett, 22 janvier 2014 - 07:33 .
                     
                  


            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Greater Two-Weapon Fighting
« Reply #2 on: January 22, 2014, 09:05:30 am »


               

SunnyVercett wrote...

So how does the PRC do this magic? Please do tell cuz I'm kind of stuck here too.

I've found this spell constant called SPELL_T_TWO_WEAPON_FIGHTING in prc_spell_const.nss, with the value of 2705, but that's all I could make out by now. The 2705th line in prc's spell.2da is null, and I am likely to scratch my hair off.

Btw my PRC is v3.5. Should I use a earlier release to get this invisible spell? Or it's just that this spell is abandoned because they've invented a new way to achieve its goal?

IIRC it faked it via EffectDamage and fake attack roll message
it calculated your damage (extremely complex to do) and applied with delay later in round, not exactly sure how they calculated when to do it, but they used this workaround also for many smite-like feats and few others on top of my head they used this for multishot, ghostly strike, and one of the alaghars feats, probably also for smite evil/good which by default doesnt consider custom classess into damage calculation

but now  there IS a nwnx plugin that can add offhand attacks so...
               
               

               
            

Legacy_SunnyVercett

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Greater Two-Weapon Fighting
« Reply #3 on: January 22, 2014, 09:26:57 am »


               

ShaDoOoW wrote...

but now  there IS a nwnx plugin that can add offhand attacks so...


It that so? This is great news. Time for me to get involved into new techs. Thanks very much for the information!'<img'>

----------------Edit on 1/28/2014----------------

So i've been doing some research these days and i found this nwnx plugin named nwnx_cool.dll, created by Terra_777 and modified by ShadoOow. I installed nwnx successfully and used the function SetOffHandAttackNumber() provided by nwnx_cool in my script. The essential line is 

SetLocalInt(oWeapon, "offhdnatt", nAttack);

And i run it in my module. Very dramatically, nothing happened. According to my test there IS a local string "offhdnatt" with the value i want, which is expected, but how can this value actually works in-game?

I do bind the OnModuleLoad event with the script "aps_onload", and the nwnx.ini is modified with my module's name. Maybe it's not as easy as just writing some lines in a script. I figured that the local string should begin with "NWNX!COOL!" but inc_cool.nss doesn't go that way. Why is this?

I have nwnx_obdc.dll and several other common used plugins. MySQL installed. Is there something else I need to do to get this function work properly? Any advice is welcome! Thanks!
               
               

               


                     Modifié par SunnyVercett, 28 janvier 2014 - 07:35 .