Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Dark Dreams of Furiae - a new module for NWN:EE! Buy now
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

NPC to Statue

Excuse me Please:
I am not sure if this question ought go here or in the Builders section, but,
I am having a subtle issue with onspawn/onconv make petrified.

while using the examples provided by
Custom NPC/Monster Statues
does indeed make the NPC encased in stone,... it also causes them to look ... weird, unnatural.

especially if scene expects the discovered petrified creatures walked upon a Medusa unawares or were engaged with the Medusa in combat; or consider Library scene in XP2_Chapter2, how cool would it be to have an NPC petrified while "reading."

Currently, the NPCs look like they were dipped in freezing cold water first, then turned to stone.
What can be done to adjust the a fore mentioned scripting (or something else) to make them look more natural?

on a related, but not super critical note, how can said "statue" then be made untargetable/unattackable?

Thank you for the assistance in trying to understand this,...


  • ProlericProleric Member Posts: 735
    Assuming you're using EffectPetrify, that's about as good as it gets for colour / texture.

    If you want the statues to be frozen in action poses, check out the technique here:

    I don't think you can make a creature untargetable. I thought Beamdog had changed this, but I can't find it in the patch notes...

    You have to ensure that all factions regard it as neutral (either adjust reputation, or put it in a special faction) to prevent it being attacked. Set the plot flag after petrifaction to make it immune and indifferent to any kind of attack. The OnConversation script needs to suppress turning. Hopefully, the example you quoted does all that?

    Owing to a bug, when a save is loaded, check that all statues are still petrified - reapply the effect if not.

  • CeyarrecksCeyarrecks Member Posts: 44
    Thank You Proleric, I will look into link suggested,...

  • CeyarrecksCeyarrecks Member Posts: 44
    On further consideration, those Frozen Emots would make for good fauna for not-alive-to-being-with Statues. Not so much for a petrified action scene,... i.e. "The Group Attacks.. only to be caught in the Medusa's gaze,..." he4subvzkumh.jpg is what they look like in Editor. However,...
    rmted0w3bqh9.jpg is what the above scripted petrification results in. not even the default "just standing there" posture.
    [another oddity I just noticed, their weapons, nor shield, are turned to stone]

    (I have a sneaking suspicion what I am asking for is WAAY over my head)
    But, is there other means to have a more natural stance; Preferably in mid-stroke of attack as makes sense in Shaori's Fell: Library, or at least something more natural, as though they were "living" prior to petrification?

  • ProlericProleric Member Posts: 735
    edited October 17
    The stiff pose happens when you freeze too soon. You have to DelayCommand even to freeze in the default pose. Normally, a spawning creature adopts the default pose so fast you don't see the movement, but the time taken isn't zero.

    In theory, you could use the frozen animation method to freeze combat. For example, have an NPC attack an invisible object, then freeze them in a pose you like. A script that freezes the NPC for a while every 0.1 seconds or whatever can be used to select the final pose. Requires a lot of time and patience, though.

    You don't want players to see the animation, of course. If the creature spawns long before players see it, setting their AI level to Normal before animating achieves that. Otherwise, black screen or invisibility can be used to cover up.

  • CeyarrecksCeyarrecks Member Posts: 44
    whoa! yeah,... WAAY over my head. heh.
    I kinda understand what you are saying, but am completely clueless on how to actually implement said process. :(

    so far my understanding is to accomplish one action, copy/paste x script there, y script here, done.
    (as in the case of my above mentioned petrification)

    considering, at least in the case of the Library, that the PC enters but is delayed in hallway by dialog, so seeing said invisible action should not occur.

    my programming experience stopped a very long time ago with Q-Basic; so I fear the learning curve to become as wise as yourself with said scripting leads me to think years of continuous guided training would be required.

    which still leaves me with said, albeit cosmetic, process wanting.

    would I be out of place to ask for a detailed, step-by-step process of what would need to be accomplished for said NPC to attack invis object, freeze in that position, then be petrified?
    (that sounds sooo simple stated that way, huh?)

  • ProlericProleric Member Posts: 735
    In my experience, if you want to do this sort of thing, it's better to have a go at scripting yourself. The learning curve with NWScript isn't that steep. The community is generally pretty helpful at pointing you in the right direction, and will certainly help you find errors if you post your script here (or at Neverwintervault).

    Start with one of the frozen animation scripts - say ew_ani_armsup, for example - as a template.

    The line
    AssignCommand(oTarget, PlayAnimation(ANIMATION_LOOPING_CONJURE2, 1.0, 3.0));

    needs to read something like
    AssignCommand(oTarget, ActionAttack(GetObjectByTag("#####")));

    where ##### is the tag of the invisible object.

    The next line reads
    DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eFreeze, oTarget));

    The 0.5 is the delay that you need to play around with until you get a pose you like.

    When that's OK, after that line, add the lines you already have to create the petrify effect, using a slightly longer delay to ensure that petrifaction occurs after freezing.

    Does that help?

  • CeyarrecksCeyarrecks Member Posts: 44
    Thank you kindly for the continued replies.
    I am assured for those whom are better versed or not as hampered as I, your suggestions would be most illuminary; alas, I do not even know where to grasp hold of the above to even frame a question.

  • AncarionAncarion Member Posts: 150
    The most straightforward way I can suggest to make a creature petrified in an attack stance would require three things: the creature, an invisible object, and a trigger.

    1. Put the creature where you want it to be, and give it a unique tag.
    2. Put an invisible object in front of it, and give a unique tag. Make sure to uncheck the "Static" field.
    3. Paint a generic trigger somewhere away from them, where it will take a couple of seconds for the player to go from it to the creature's location, and give it a unique tag as well.
    4. Go to the trigger's event scripts, and create a new OnEnter script. For this script, put:

    void main()
    object oPC=GetEnteringObject();
    object oTarget=GetObjectByTag("MY_TARGET_TAG");
    object oCreature=GetObjectByTag("MY_CREATURE_TAG");

    if (GetIsPC(oPC)&&GetLocalInt(OBJECT_SELF,"DO_ONCE")!=TRUE)

    5. Replace MY_TARGET_TAG and MY_CREATURE_TAG with the tags you assigned to your objects.
    6. Save everything and test it out.

    This is a no-frills implementation, that just accomplishes the basic task. The creature will remain targetable, and can be attacked and killed, and the effect can be dispelled. Weapons will not display the effect. If you want any other features, this can all be modified and extended without too much trouble.

Sign In or Register to comment.