Author Topic: Altering Area of Effect Spells  (Read 376 times)

Legacy__Guile

  • Hero Member
  • *****
  • Posts: 1308
  • Karma: +0/-0
Altering Area of Effect Spells
« on: May 25, 2011, 03:59:53 pm »


               I'm working on a Huge Custom Spell System project, the initial release is on the nwvault.ign.com

The 1.69 Custom Spell System  (Available for Download Now)


I really need suggestions at this point before I finish the entire system, as I don't really want to go back and modify all the spells, if I get the suggestiosn now, the release will be sooner!
               
               

               


                     Modifié par _Guile, 26 mai 2011 - 03:45 .
                     
                  


            

Legacy_Alex Warren

  • Sr. Member
  • ****
  • Posts: 326
  • Karma: +0/-0
Altering Area of Effect Spells
« Reply #1 on: May 25, 2011, 07:12:00 pm »


               I think that's because you're assuming that OBJECT_SELF is the caster. It's not always true. For example in AoE spells it's only true for the main spell script (the one that sets AoE), while for OnEnter, OnExit and OnHeartBeat OBJECT_SELF will point to AoE object. You should use GetAreaOfEffectCreator() to get the caster.

So instead of (nw_s0_evardsa.nss):
   int nCasterLevel = GetCombinedCasterLevel(OBJECT_SELF);
use:
    int nCasterLevel = GetCombinedCasterLevel(GetAreaOfEffectCreator());

Some comments '<img'>
IMHO you should calculate caster level separately for arcane and divine classes.

And adding levels of all base classes is not a good idea - ie I could make Cleric 20/Druid 20 with tons of spells and caster level 40! (+Dragon Shape or 1 lvl of Monk for cheese '<img'> ).

You defined oPC as an argument in GetCombinedCasterLevel() function, but you call OBJECT_SELF in functions body - that's not right, oPC is not always OBJECT_SELF.

You should remove line 129 from epic_dc_inc.nss (if statement before it has no effect).

"// I added this because clerics are extremely weak and usually have low hit points." - roflmao...
               
               

               


                     Modifié par Alex Warren, 25 mai 2011 - 06:35 .
                     
                  


            

Legacy__Guile

  • Hero Member
  • *****
  • Posts: 1308
  • Karma: +0/-0
Altering Area of Effect Spells
« Reply #2 on: May 26, 2011, 04:13:24 am »


               Thank you very much Alex, I have tried your suggestion, and it appears you are correct, thanks again...

I'm working hard to getting this entire system finished, so if you have any suggestions please speak up, I'd love to hear your imput Alex.   =D
               
               

               


                     Modifié par _Guile, 26 mai 2011 - 03:25 .
                     
                  


            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Altering Area of Effect Spells
« Reply #3 on: May 26, 2011, 07:01:11 am »


               

nwnlexicon...

There are sometimes glitches with the usual spell functions when used inside the AOE's script - such as GetSpellId(), GetSpellSaveDC(), GetCasterLevel(), and so on, because of the fact the values can change after the AOE has been in place, and the other fact that sub-dial spells will not work correctly with GetSpellSaveDC() in the first place.




               
               

               
            

Legacy__Guile

  • Hero Member
  • *****
  • Posts: 1308
  • Karma: +0/-0
Altering Area of Effect Spells
« Reply #4 on: May 26, 2011, 04:43:31 pm »


               Thanks lightfoot8, I have actually created a custom workaround for this in the new spell system.

I'm on  level 7 Mage Spells now, the system will probably be completed this week...

(I have finished Level 0-4 Cerlic / Druids spells as well)

What I really need is suggestions on more Controls to implement, as going back to revise all spells for new controls is going to be very time consuming, I just wish I could have had the suggestions soon, but better late than never!

If anyone else has suggestions, please, now is the time to speak up!
               
               

               


                     Modifié par _Guile, 26 mai 2011 - 03:44 .