Author Topic: Any notable limitations on EffectLinkEffects?  (Read 336 times)

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
Any notable limitations on EffectLinkEffects?
« on: April 16, 2014, 05:30:18 pm »


               

From my limited understanding, EffectLinkEffects allows for linking two effects and producing  a third which is the addition of those two.  And, according to the Lexicon that third effect, which is a product of adding/linking two effects, can also be fed back into EffectLinkEffects and, in so doing, one can stack effects.  So you only have to pull the trigger on applying the effect once but get the benefit of many individual effects.  I am interested in this for purely cosmetic reasons, such as creating the letters/words on the page of a book/in-game "menu" or with visually customizing a character a la the Community VFX project.


 


My question is, is anyone aware of limitations on how many effects can be stacked into one effect this way?  Could you combine 20, 50, 100 visual effects into one effect like this?  I have concerns (which I'm not so sure are well-founded) that at a certain point the system breaks down after stacking however many effects.  My concerns were based on the suspicion that the netcode might not really be set up for a large number of effects being applied at once like this.  In the past, I've researched this an even asked a few people in the #nwn2cr channel about it and nobody seemed to have any problems with stacking the effects pretty high. 


 


Does this sort of agree with the experience of people in this forum?



               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
Any notable limitations on EffectLinkEffects?
« Reply #1 on: April 16, 2014, 11:42:45 pm »


               

Never seen a limit on stacking, and in practical terms it's very handy when you need effects to expire simultaneously, as with some spells with multiple bonuses. One limit that I'm aware of is that you can't just have vfx effects linked - you need something to hang them on. In cases where we just need a vfx (often because we set a unique spell id on it with nwnx_structs, and then check for that spell id effect), we link to a dummy spell immunity, like so:


 


http://pastebin.com/uiwhdwam


 


 


[Edit] Probably the most extensive use of linking we do is in our polymorph code. We wrap basically all item props, as well as any polymorph attributes, into effects (probably a few hundred, by the end). Here's the include:


 


http://pastebin.com/5GUYSvF9


 


Funky



               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
Any notable limitations on EffectLinkEffects?
« Reply #2 on: April 17, 2014, 01:17:09 am »


               

Wow, thank you!



               
               

               
            

Legacy_WhiZard

  • Hero Member
  • *****
  • Posts: 2149
  • Karma: +0/-0
Any notable limitations on EffectLinkEffects?
« Reply #3 on: April 17, 2014, 03:25:10 am »


               

I am pretty sure that pure vfx linking was disabled  because vfx effects were assumed to be in game feedback of whether an effect was applied.  For example, if insert a value outside of the parameter scope of an effect (Such as a negative value in EffectMovementSpeedDecrease()) the effect would be ignored if I were to apply it by itself.  If I were to link that invalid effect with another valid one, the valid effect would still be applied, and the other ignored.  With vfxs included in an effect link, the vfx will only show if there is at least one valid effect (that is not a vfx effect), and will not show if no valid effects (other than vfx effects) are present.  Thus a vfx would give me confirmation that an effect was properly applied.