Author Topic: New Item Property granting AC Bonus vs Melee opponents  (Read 536 times)

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
New Item Property granting AC Bonus vs Melee opponents
« on: March 03, 2011, 05:17:48 am »


                I want to better simulate the benefits of a reach weapon in melee combat. Is it possible to create new item properties that increase AC in certain situations? Or would this be better handled in scripting somehow?

I would like to create a property for a weapon that gives AC bonuses against melee attacks, but not ranged attacks.

Possible?

If not as a property is there a way to do this via scripting? I have yet to try to tweak the combat system with scripts as I understand it is hard coded, but maybe there is a way around this.
               
               

               
            

Legacy_redmokah

  • Newbie
  • *
  • Posts: 37
  • Karma: +0/-0
New Item Property granting AC Bonus vs Melee opponents
« Reply #1 on: March 03, 2011, 09:54:10 pm »


               Doesn't AC vs. Damage Type already do this?

Edit: Nevermind, realized quickly how it can be bypassed haha.
               
               

               


                     Modifié par redmokah, 03 mars 2011 - 10:00 .
                     
                  


            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
New Item Property granting AC Bonus vs Melee opponents
« Reply #2 on: March 03, 2011, 10:33:10 pm »


               You can create new itemproperty but it does except cost adjustion nothing by default. You then can script the effect via On(Un)Equip event.

I have done ew such new itemproperties: regen per round, speed increase, caster level bonus, extra attack

but I don't see a way how to do what you need, the only property that distinvish between melee and ranged is concealment bonus...
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
New Item Property granting AC Bonus vs Melee opponents
« Reply #3 on: March 04, 2011, 04:02:42 am »


               Thanks for the replay, Shadow. That is indeed the trick. I have no idea how to distinguish between a melee attack and a ranged attack.

I will most likely have to come up with another quality that is special to reach weapons. Perhaps they increase initiative while equipped, but then that is clunky as it would improve initiative for actions that do not involve the weapon. I wonder if there is a way to enable a reach weapon to actually hit someone at a greater distance.

Is there a way to increase the distance required for engaging in melee?

Or perhaps a property that allows "use" to activate a script that simulates setting a spear in anticipation of attack. Dunno how I'd simulate that, or what looping animation would work.... but its a thought. Spears and polearms get short shrift in NWN, and I'm just looking for ways to better simulate their use in combat.
               
               

               


                     Modifié par henesua, 04 mars 2011 - 04:06 .
                     
                  


            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
New Item Property granting AC Bonus vs Melee opponents
« Reply #4 on: March 04, 2011, 04:29:48 am »


               

henesua wrote...

Is there a way to increase the distance
required for engaging in melee?

nothing at least in
baseitems.2da

there is ranges.2da but not sure if that will work
see these three lines

5          WeaponRngShrt      10             ****             ****     
6          WeaponRngMed       30             ****             ****     
7         WeaponRngLng       50             ****             ****   


               
               

               


                     Modifié par ShaDoOoW, 04 mars 2011 - 04:31 .