Making an NPC look ghostly?

Hi! I’m working on my second module and I’m trying to do something I’ve seen done in countless modules: make an NPC appear transparent and ghostly, like with the “ghostly visage” spell or when someone is invisible but you’ve detected them. I can’t figure out how to do this.

Some very important context: I have absolutely no experience with coding of any kind and I’ve never learned to use the NWN script editor. I have literally no understanding of it. I made a module I’m very happy with, relying entirely on Lilac Soul’s (utterly brilliant) script generator. Lilac Soul’s has a function to apply a “cutscene ghost” effect on a target but it doesn’t seem to work (or not the way I was expecting it to).

The only help I’ve been able to find for my current issue by searching through twenty years of forum posts etc was aimed at people with more knowledge than me and I couldn’t make it work. I know this makes it harder to offer me any help - but can anyone point me at a prefab script or simple instructions I could use?

You’d want EffectVisualEffect in place of EffectCutsceneGhost, such as this script does for a ghosty version (not blue) for OBJECT_SELF.

Copying this to the spawn script should apply it fine. I made it supernatural so it won’t dispel too.

void main()
    // This is the Object to apply the effect to.
    object oTarget = OBJECT_SELF;
    // Create the visual portion of the effect
    effect eDur = SupernaturalEffect(EffectVisualEffect(VFX_DUR_GHOST_TRANSPARENT));

    // Apply the visual effect to the target.
    // - We apply VFX_DUR_ constants for a duration, here
    //    it is permanent (could be temporary), to a target.
    ApplyEffectToObject(DURATION_TYPE_PERMANENT, eDur, oTarget);

Amazing. Thank you so much!

You may also want to take a look at this project, though it is pre-1.69 (compatibility specific to NWN-1.32, SoU/Xp1). I found it some time ago looking for an example of the same thing.