Author Topic: Permanent effects – Permanently?  (Read 474 times)

Legacy_Buddywarrior

  • Hero Member
  • *****
  • Posts: 512
  • Karma: +0/-0
Permanent effects – Permanently?
« on: July 02, 2012, 03:02:29 pm »


               In a quest, the reward is +1 AC permanently to a player. This quest is repeatable to a point...  I'm concerned if I need to 'refresh' these Permanent effects?

This is a persistant world and without nwnx.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Permanent effects – Permanently?
« Reply #1 on: July 02, 2012, 03:54:32 pm »


               I flag a PC permanently for every such effect they are given. I make the effect supernatural and permanent. I think the best place to store this kind of data is on the player skin.

If I remove all effects, I then run a function called "RefreshPemanentEffects" which goes through all the flags and applies any effects that need to be reset.
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Permanent effects – Permanently?
« Reply #2 on: July 02, 2012, 03:58:24 pm »


               Without nwnx, you can grant permanent ac basically only using permanent effect, such effect is lost everytime player dies and each server-reset. So you need to set into database or on item that this player has bonus AC and how many and reapply it everytimes you expect it could be lost.

Ive scripted similar effect - cold vulnerability after levelling RDD and applied the code for reapply inside: spellscript resurrect, spellscript raise dead, OnEnter (using local integer on PC - "EnteredAlready" you can determine that hes entering first time after reset, OnRespawn and OnLevelUp (since my effect is tied with lvl 10RDD) and OnLevelDown (custom scripted event created by hooking all SetXP calls in module (if you want to know how to do it, I ll explain).

Also is a good idea to use the effect creator. Thats placeable in system area with effect like EC_AC which will allow you to determine where does effect on PC comes from if you ever wanted to remove it (which is needed for effects like RDD cold vulnerability). - if you are not familiar with effect creators try search this forum, Ive already described how it works, how to use it etc.

And lastly, without NWNX, you can basically only use dodge. That however might be useless for several characters that using bard song/divine shield/epic mage armor and thus reached +20ac cap. Only way around this is to pick different AC bonus like shield (bwest choice cos there are no default spells granting this ac bonus), and recalculate and reapply this bonus everytime player (un)equip shield.
               
               

               


                     Modifié par ShaDoOoW, 02 juillet 2012 - 02:59 .
                     
                  


            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
Permanent effects – Permanently?
« Reply #3 on: July 02, 2012, 04:01:13 pm »


               With AC it could also be stored as an item property AC bonus on the skin.  I believe by default the PC skin uses deflection AC though, so with it not stacking with so many of the AC items and spells, that might not be the best option.
A dodge bonus using the system henesua suggested is likely the better alternative, but I figured I'd mention this method in case you preferred it.
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Permanent effects – Permanently?
« Reply #4 on: July 02, 2012, 04:38:27 pm »


               

Failed.Bard wrote...

With AC it could also be stored as an item property AC bonus on the skin.  I believe by default the PC skin uses deflection AC though, so with it not stacking with so many of the AC items and spells, that might not be the best option.
A dodge bonus using the system henesua suggested is likely the better alternative, but I figured I'd mention this method in case you preferred it.

oh yea, good point, ac type on skin can be changed, though it important to keep in mind it could alter shifters in regards to touch attacks - touch attacks dont count shield ac for example.
               
               

               
            

Legacy_WhiZard

  • Hero Member
  • *****
  • Posts: 2149
  • Karma: +0/-0
Permanent effects – Permanently?
« Reply #5 on: July 02, 2012, 06:12:49 pm »


               

ShaDoOoW wrote...
oh yea, good point, ac type on skin can be changed, though it important to keep in mind it could alter shifters in regards to touch attacks - touch attacks dont count shield ac for example.


Shifters get their bonus AC as a dodge effect. This bonus was likely intended to be natural (due to the way the polymorph.2da column was labeled) but became dodge for stackability.  Thus, converting merged AC to a natural type shouldn't be problematic, as much of their AC was already supposed to be natural anyway.
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Permanent effects – Permanently?
« Reply #6 on: July 02, 2012, 07:08:06 pm »


               

WhiZard wrote...

ShaDoOoW wrote...
oh yea, good point, ac type on skin can be changed, though it important to keep in mind it could alter shifters in regards to touch attacks - touch attacks dont count shield ac for example.


Shifters get their bonus AC as a dodge effect. This bonus was likely intended to be natural (due to the way the polymorph.2da column was labeled) but became dodge for stackability.  Thus, converting merged AC to a natural type shouldn't be problematic, as much of their AC was already supposed to be natural anyway.

Yet any AC on items are merged on skin which gets converted to deflection, changing the ac type to shield could make shifter characters more vulnerable to touch attacks.
               
               

               
            

Legacy_Buddywarrior

  • Hero Member
  • *****
  • Posts: 512
  • Karma: +0/-0
Permanent effects – Permanently?
« Reply #7 on: July 02, 2012, 08:51:08 pm »


               So in a PW, the only two ways to lose the effects would be during death and server restart? ((BTW, as always thank you all for the assistance and advice)).
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Permanent effects – Permanently?
« Reply #8 on: July 02, 2012, 09:11:02 pm »


               

Buddywarrior wrote...

So in a PW, the only two ways to lose the effects would be during death and server restart? ((BTW, as always thank you all for the assistance and advice)).

Mostly, if the effect was supernatural and permanent. You could have something as dispell everything triggers though.