Author Topic: EffectEthereal()  (Read 632 times)

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
EffectEthereal()
« on: February 20, 2012, 08:33:38 pm »


               I don't think I understand this effect.

I am applying it to a Scry Sensor creature on spawn. And yet the creature is still visible.


        effect eEther   = EffectEthereal();
        effect eGhost   = EffectCutsceneGhost();
        effect eLink    = EffectLinkEffects(eEther, eGhost);
        effect eExtraord= ExtraordinaryEffect(eLink);
        ApplyEffectToObject(DURATION_TYPE_PERMANENT, eExtraord, oSelf); 

I added the invisibility effect when Ethereal didn't appear to be doing anything. And so the creature will behave as invisible, but I would prefer actual etherealness... invisible and untargetable to all but those with true seeing. What gives?
               
               

               


                     Modifié par henesua, 20 février 2012 - 08:56 .
                     
                  


            

Legacy_HipMaestro

  • Hero Member
  • *****
  • Posts: 2849
  • Karma: +0/-0
EffectEthereal()
« Reply #1 on: February 20, 2012, 09:05:58 pm »


               Did you try EffectSanctuary()?

(There is a bug  with Etherealness when used after Imp Invis but you didn't indicate this was an issue.)
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
EffectEthereal()
« Reply #2 on: February 20, 2012, 10:25:31 pm »


               Forget the other junk. All you need is Etherealness. Your problem may be that some things are checking for the etherealness spell id, however. This is how we do it outside of a spell:

        //give pcs a brief lull before they are attacked
        effect eEnter = SupernaturalEffect(EffectEthereal());
        SetEffectSpellId(eEnter, SPELL_ETHEREALNESS);
        ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEnter, oPC, 6.0);

I'm unsure the extent to which spell id is checked in vanilla code, but we use it extensively. The supernatural effect is just so that it cannot be restored or dispelled away.

Funky
               
               

               


                     Modifié par FunkySwerve, 20 février 2012 - 10:26 .
                     
                  


            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
EffectEthereal()
« Reply #3 on: February 20, 2012, 10:41:59 pm »


               is SetEffectSpellId -- higher ground code? Or is it in one of the NWN libraries?

By the way... I believe you want an extraordinary effect so that it can not be dispelled. Supernatural persists through resting but can be dispelled.
               
               

               


                     Modifié par henesua, 20 février 2012 - 10:44 .
                     
                  


            

Legacy_Khuzadrepa

  • Sr. Member
  • ****
  • Posts: 347
  • Karma: +0/-0
EffectEthereal()
« Reply #4 on: February 21, 2012, 12:27:16 am »


               

henesua wrote...
By the way... I believe you want an extraordinary effect so that it can not be dispelled. Supernatural persists through resting but can be dispelled.

I think you have that wrong. Extraordinary means it can not be dispelled, but resting removes it. Supernatural means neither resting nor dispelling removes it.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
EffectEthereal()
« Reply #5 on: February 21, 2012, 02:01:42 am »


               Hmm... interesting, I must have got my signals crossed  there. I thought all magical effects could be dispelled.
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
EffectEthereal()
« Reply #6 on: February 21, 2012, 02:33:16 am »


               

henesua wrote...

is SetEffectSpellId -- higher ground code? Or is it in one of the NWN libraries?

It's
from NWNX structs for linux. If your problem is that the checks in
question are checking for the spell id, you can either acheive the spell
id via ActionCast with cheat cast or whatever is required, or you can
alter the checks to check for effect type, or you can alter them to check for EffectCreator, and make a custom effect creator to define the effect (and, often, to apply it as well, though that's not necessary to tag it as the effect's creator).

As I said, however, I'm not sure how much spell id is checked in vanilla nwn - most of our code with etherialness has been completely customized. It's entirely possible that you're suffering from one ot the myriad bugs related to sanc effects - including its frequent failure when applied with any kind of concealment, as another poster mentioned. If you elaborate on the problem you're having, we could probably pinpoint it somewhat.

Funky
               
               

               
            

Legacy_HipMaestro

  • Hero Member
  • *****
  • Posts: 2849
  • Karma: +0/-0
EffectEthereal()
« Reply #7 on: February 21, 2012, 02:59:44 am »


               Not to cloud this issue... but a related question... if the effect is set up as Supernatural, meaning only death will remove it, does that mean that a creature owning the Supernatural Etherealness version can commit a hostile act without breaking the effect?
               
               

               


                     Modifié par HipMaestro, 21 février 2012 - 03:00 .
                     
                  


            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
EffectEthereal()
« Reply #8 on: February 21, 2012, 04:48:26 am »


               No. It's not that ONLY death will remove Su effects, its that resting, restoration, and dispelling will not.

Funky
               
               

               
            

Legacy_Alex Warren

  • Sr. Member
  • ****
  • Posts: 326
  • Karma: +0/-0
EffectEthereal()
« Reply #9 on: February 21, 2012, 07:12:00 am »


               henesua
if you add EffectVisualEffect(VFX_DUR_CUTSCENE_INVISIBILITY) to your code, the creature will be invisible to all PCs.
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
EffectEthereal()
« Reply #10 on: February 21, 2012, 03:05:51 pm »


               Oh, jeez. I completely skimmed over the fact that you were applying it to a creature. I was thinking in terms of making the ai disregard pcs - my bad. Cutscene Invis is definitely the way to go, along with CutScene Ghost so it can be walked through.

Funky
               
               

               
            

Legacy__Guile

  • Hero Member
  • *****
  • Posts: 1308
  • Karma: +0/-0
EffectEthereal()
« Reply #11 on: February 21, 2012, 03:47:25 pm »


               I love applying effects to stuff. '<img'>
               
               

               


                     Modifié par _Guile, 21 février 2012 - 03:48 .
                     
                  


            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
EffectEthereal()
« Reply #12 on: February 21, 2012, 04:43:20 pm »


               <fading in...>

The tricky part (other than the ones mentioned above) is that he *doesn't* want the Scry Sensor invis to all PCs. He wants it detectable with True Seeing.

invisible and untargetable to all but those with true seeing.

I'm also very interested in this as I'd like to make (assuming I figure out *how*) my "Possessed" effect behave similarly.
Edit: But I think I'm going to end up just attaching/detaching a tail for the effect. Still interested.:-)

<...and out>
               
               

               


                     Modifié par Rolo Kipp, 21 février 2012 - 04:45 .
                     
                  


            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
EffectEthereal()
« Reply #13 on: February 21, 2012, 05:17:20 pm »


               I did go with Cutscene Invis and Cutscene ghost.

The way I handle detection is with an area of effect on the scry sensor which has an enter and exit script. Detection of the scry sensor is handled via my custom skill "Scry". If the sensor is detected I remove the cutscene invisibility. When the last creature leaves the area of effect I restore the cutscene invisibility.

Now... for the $25000 question. Can the sensor be targeted by area of effect spells when it has the ghost effect and cutscene invis active on it?
               
               

               
            

Legacy_Alex Warren

  • Sr. Member
  • ****
  • Posts: 326
  • Karma: +0/-0
EffectEthereal()
« Reply #14 on: February 21, 2012, 06:28:42 pm »


               

henesua wrote...

Now... for the $25000 question. Can the sensor be targeted by area of effect spells when it has the ghost effect and cutscene invis active on it?

Yes, it seems that those effects were created only for better visual experience. Ie monsters will still attack creature with cutscene invisibility (though players can't see it).