Author Topic: Visual freeze vs appearance change help  (Read 491 times)

Legacy_meaglyn

  • Hero Member
  • *****
  • Posts: 1451
  • Karma: +0/-0
Visual freeze vs appearance change help
« on: February 27, 2014, 01:48:13 pm »


               

Hi folks,   I hope enough people have made it over here...


 


I've got a question about visual effects and appearances. For a clothing model I apply effectCutSceneParalyze and VFX_DUR_FREEZE_ANIMATION on spawn. This works really nicely. NPC stands at attention and does not move. Converstaion works, ends, restarts... no change, no movement, all good.


 


...At least as long as I don't change the appearance type. I had planned to have the start of the converstation change the mode's appearance to match the PC's racial type.  This, independent of the freezing, also works nicely.  (On change the model stands at attention until conversation ends. I 'd like to have that position the whole time.)


 


What happens is the paralyze and freeze effects go away when the appearance changes. I tried adding


them again right after changing the appearance, but this has no effect. I also delayed it a bit to see if that helped.


 


Do I need to remove the old effect first?   I didn't have time to try that last night.


 


Any other thoughts about how to make this work?


 


Thanks,


 


meaglyn



               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
Visual freeze vs appearance change help
« Reply #1 on: February 27, 2014, 04:47:35 pm »


               I'm not sure about the appearance change angle, but I'd try removing the effects first, as you suggest.

The following script addresses some other nuances which may be of interest:


#include "NW_I0_GENERIC"
#include "nw_i0_spells"

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

void main()
{
    SetPlotFlag(OBJECT_SELF, FALSE);
    SetStandardFactionReputation(STANDARD_FACTION_HOSTILE, 50);
    SetCommandable(FALSE, OBJECT_SELF);
    ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectCutsceneParalyze(), OBJECT_SELF);
    ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_FREEZE_ANIMATION), OBJECT_SELF);
    SetPlotFlag(OBJECT_SELF, TRUE);
}
When a saved game is loaded, the effect is usually broken, so in the module load event script, "if (!GetHasEffect(EFFECT_TYPE_PARALYZE..." you'll need to run your script again.
               
               

               
            

Legacy_meaglyn

  • Hero Member
  • *****
  • Posts: 1451
  • Karma: +0/-0
Visual freeze vs appearance change help
« Reply #2 on: February 27, 2014, 08:12:31 pm »


               

Thanks Proleric. I'll see what effect removing the effects first has.   The SetStandardRep is a good idea. I'd missed that. I can't make it uncommandable since I need to drive it with a conversation (and have it equip/unequip clothing etc).


 


Good to know about the breaking when loading from save. This is for a PW mostly so that should not be an issue. It'll get spawned when a PC enters anyway. But if/when I use this in my single player mod that'll be handy.


               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Visual freeze vs appearance change help
« Reply #3 on: February 27, 2014, 09:24:29 pm »


               

I'm interested to hear how this turns out.


 


I assume this is for a body or clothing "tailor", and I was wondering why doubles are used for this. For modification of the PCs body parts or of clothing I have always applied them directly to the PC.



               
               

               
            

Legacy_meaglyn

  • Hero Member
  • *****
  • Posts: 1451
  • Karma: +0/-0
Visual freeze vs appearance change help
« Reply #4 on: February 28, 2014, 04:04:51 pm »


               

I figured out part of my problem. I was confusing two different results. When I spawn the creature (painted down so no PC around) and do the freeze on spawn it stays in the heels together animation.

 


When the animation changes during conversation the new appearance starts in the same heels together pose and does not drop to the legs apart stance because of being in conversation. (You can see that on the PC if you start a conversation in a trigger around the start point as well). Once the conversation ends the model drops to the legs apart stance (unless frozen).


 


I'd like to keep this heels together stance all the time if possible. That must be an animation in the model I think. Does anyone know if there's a way to play that animation?

 


@Henesua:  I'm not starting from scratch so went with where I started in terms of using the tailor model. But now that you asked I thought about it a bit more. I do use the PC directly for the body tailor part, makes sense and there no gold invovled. I like the model for clothing because I don't want the PC to have the item until it's paid for.   This seems like a simpler way to ensure that. Also you need something anyway to start the converstation ( ise the mirror for the body tailor...).


               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Visual freeze vs appearance change help
« Reply #5 on: February 28, 2014, 05:57:18 pm »


               


I like the model for clothing because I don't want the PC to have the item until it's paid for.   This seems like a simpler way to ensure that. Also you need something anyway to start the converstation ( ise the mirror for the body tailor...).




 


Yes, that makes sense. I think I should implement that as well. So far however I only have this customization in the player starting area, and I use the same placeable (yes, it is in fact a mirror) and conversation/script for both body customization as well as clothing.


 


For crafting of custom appearances of clothing and weapons during play however I will think more about using a "dummy". Thats not a bad idea.


 


Thanks for answering though. I often wondered if I had overlooked something that everyone else saw.


               
               

               
            

Legacy_meaglyn

  • Hero Member
  • *****
  • Posts: 1451
  • Karma: +0/-0
Visual freeze vs appearance change help
« Reply #6 on: March 06, 2014, 01:17:15 pm »


               

I finally got to where this pretty much just worked ... until I hit issues with smaller races. (I suppose I could start with a halfling and only change appearance to larger models).   The issue was that smaller appearances ended up floating in the air, and to make it worse, robes models appeare at ground level still so you have this nice effect of a neck and hands floating a meter above the robe. Not really the effect I was trying to achieve.   At that point I decided to just freeze in the normal animated stance. To make that work I have to end the conversation when it changes the model and then restart it. I've got a bit more testing to do still, but I think this is what I will go with.


 


If you wanted to have a dummy for each race already available you can make the freeze work nicely by using the VFX_DUR right after spawn, as long as the dummy spawns when no PC is around (e.g. just painted down in the area).


 


Thanks for al the help.