You are here

Mortality of Statue?

8 posts / 0 new
Last post
archanix
Mortality of Statue?

So another NWN1 script thing. I know how to turn character into statue so it could play as actual thing with new poses but... How can I make sure player won't try to turn it back to flesh?

How about destroying statue (killing it) or different special effect? Does anybody have any idea?

 

edit. I checked immunity to that spell does not do poop.

  • up
    50%
  • down
    50%
TheBarbarian
TheBarbarian's picture

This is probably the dumbest workaround ever conceived of, but:

You could just reapply the petrification effect in the OnSpellCastAt event, if it is no longer present.

if (!GetHasEffect(EFFECT_TYPE_PETRIFY)) ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectPetrify(), OBJECT_SELF);

 

What seems to be the problem with destroying/killing the petrified creature?

  • up
    50%
  • down
    50%
archanix

I was just asking about opinion :D

  • up
    50%
  • down
    50%
ffbj
ffbj's picture

I think it is doable. You just have to put a persistent variable on an item on the player, say statue 1. Then on enter just fire a script that turned them into a statue in the first place. From your description I assume you want a moving character that simply looks like a statue.

I have a stone curse in my world that slowly petrifies you, and logging/re-logging does not save you as the variable persists. It takes about 10 minutes to take full effect. 

I did a bunch of statue work. Some could move, or move partially, you can always just apply the effect.

Stone Kobolds: They could change positions and fight, but not move from their set spot.

https://neverwintervault.org/tags/stone-kobold

  • up
    100%
  • down
    0%
Proleric
Proleric's picture

AFAIK the following statue script prevents player interference because they can't remove an effect from a plot character (I think):

// Petrify creature as a "statue" which hostiles will not attack

void main()
{
    SetPlotFlag(OBJECT_SELF, FALSE);
    SetStandardFactionReputation(STANDARD_FACTION_HOSTILE, 50);
    SetCommandable(FALSE, OBJECT_SELF);
    ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectPetrify(), OBJECT_SELF);
    SetPlotFlag(OBJECT_SELF, TRUE);
}

Sometimes the petrification is lost when the game is saved. The workaround is to put the following snippet in the module load script:

// Fix a bug where statues load unpetrified

int    i       = 0;
object oStatue = GetObjectByTag("Statue", i);

  while (GetIsObjectValid(oStatue))
    {
      if (!GetHasEffect(EFFECT_TYPE_PETRIFY, oStatue)) ExecuteScript("bh_statue", oStatue);
      oStatue = GetObjectByTag("Statue", ++i);
    }

}

I guess there are lots of neat ways to destroy the statue, such as

      object   oStatue  = GetNearestObjectByTag("Statue");
      location lStatue  = GetLocation(oStatue);
      effect eEffect1   = EffectVisualEffect(VFX_FNF_IMPLOSION);
      effect eEffect2   = EffectVisualEffect(VFX_FNF_STRIKE_HOLY);
      float  fdelay     = 0.0;

      AssignCommand(oPC, ActionCastSpellAtLocation(SPELL_EARTHQUAKE, GetLocation(OBJECT_SELF), METAMAGIC_NONE,
                                                   TRUE, PROJECTILE_PATH_TYPE_DEFAULT, TRUE));

      SetPlotFlag(oStatue, FALSE);
      DelayCommand((fdelay+=2.0), ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eEffect2, lStatue));
      DelayCommand((fdelay+=2.0), ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eEffect2, lStatue));
      DelayCommand((fdelay+=2.0), ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eEffect2, lStatue));
      DelayCommand((fdelay+=2.0), ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eEffect1, lStatue));
      DelayCommand((fdelay+=1.0), DestroyObject(oStatue));

The method is clunky, of course. If only there was a simple way of turning a creature model with a specific pose into a placeable!

NWN and DAO adventures at http://proleric.com/

  • up
    100%
  • down
    0%
ffbj
ffbj's picture

Well you can get a statue to change positions, and then freeze in the new position. I think that could be done.

  • up
    50%
  • down
    50%
Proleric
Proleric's picture

Yes, the technique used in Frozen Animations can be adapted to statues.

Using creatures as statues still sucks, though, because you can't make them static, and players occasionally see the freezing process, no matter what you do.

Having said that, I do use this technique, in the absence of a better option.

  • up
    50%
  • down
    50%
ffbj
ffbj's picture

I made one which would change into various postures if you attacked it. Did a lot of stuff with statues. Sometimes you could see the texture change to the stone-skin effect, but other than that I was fairly satified with the way stautes work, though I am not sure it's worth it to over do it.

I did one of stone minotaur which would roar if you did a lot of hits in one blow, and spin around to face you. Eventually I changed it back because something got goofed up once in a while and the statue could not be attacked, probably due to something in the creation and destroy cycle TMI, though I never got an error message.

So yeah they are problematic but worth it.. 

  • up
    50%
  • down
    50%