Lying Down npc

Post » Fri Jan 22, 2010 7:01 pm

So in my mod I would prefer it if i could make the npc lie down on a bed and still speak to the player. Does anyone know of any mods/ animations that make this possible?
Even if it's just having a fatigue of 0, which i'm not sure would work, would be good too, but i still need to be able to talk to them.

EDIT: It doesn't really need to be like on a bed, just where the npc is laying down in any position on the floor
User avatar
Mel E
 
Posts: 3354
Joined: Mon Apr 09, 2007 11:23 pm

Post » Fri Jan 22, 2010 5:15 pm

You can try setting them to 0 fatigue (and then applying a slight damage to force the engine to knock them down), then use `ForceGreeting` to start dialogue. I believe I've seen that used before.

If you need to do it with animations (the game has special-purpose fall down animations already), check RX31's packs or others. There should be some laying-down animations in those.
User avatar
Emzy Baby!
 
Posts: 3416
Joined: Wed Oct 18, 2006 5:02 pm

Post » Fri Jan 22, 2010 4:13 pm

You can try setting them to 0 fatigue (and then applying a slight damage to force the engine to knock them down), then use `ForceGreeting` to start dialogue. I believe I've seen that used before.

If you need to do it with animations (the game has special-purpose fall down animations already), check RX31's packs or others. There should be some laying-down animations in those.

I've tried doing this, and i set the fatigue to 0 and gave it this script:
begin 01mc_torturedSplatterscriptshort doonceif ( DoOnce == 1 )   returnendif01mc_torturedsoul->forcegreetingset DoOnce to 1end 01mc_torturedsplatterscript

But I don't know how to apply damage to knock him down. Can someone tell me how?
User avatar
Tracey Duncan
 
Posts: 3299
Joined: Wed Apr 18, 2007 9:32 am

Post » Fri Jan 22, 2010 7:35 pm

Create a 1-point fatigue damage spell (I believe fatigue works, though it might have to be health) and apply that after you SetFatigue to 0.

Don't use a stock game spell (if there's a stock 1-damage one), since mods can change that and such.

Also, do not use IDs that begin with anything but a letter and never use an ID without quotes. Depending on your script compiler and the alignment of the galaxies, both can cause crashes.
"STC_torturedsoul"->ForceGreeting

User avatar
His Bella
 
Posts: 3428
Joined: Wed Apr 25, 2007 5:57 am

Post » Fri Jan 22, 2010 10:41 pm

Thats a very ambitious task.

If your torturing someone, maybe just have them collapse in a jail cell or something. Trying to get them to fall on a bed (or whatever) is guna take a lot of effort i would imagine.
User avatar
Emma Pennington
 
Posts: 3346
Joined: Tue Oct 17, 2006 8:41 am

Post » Fri Jan 22, 2010 12:26 pm

Since you want to be able to *talk* to an NPC lying down, doing it through fatigue won't work. You'll need to use animations from RX31's pack. You have to include three files in your distribution pack (below is an example for a female character; use files with '_m_' instead of '_f_' if your character is male):
Meshes\Anim\anim_f_sleeping.nif
Meshes\Anim\xanim_f_sleeping.nif
Meshes\Anim\xanim_f_sleeping.kf

Edit the NPC, click on "Add Animation File" and select Meshes\Anim\anim_f_sleeping.nif

Now, let's say the NPC should be lying down when you see her for the first time. Then her script has to contain following code:
short liestatusif ( liestatus == 0 )	set liestatus to 1	AIWander 0 0 0 0 0 0 0 0 0 0 100 0 ; this is lying down animationendif


If you'll want her to stand up eventually, you'll need more code:
float timerif ( MenuMode == 1 ) ; to prevent counter to work while you check inventory mid-action	returnendifif ( liestatus == 2 ) ; see comment below	set liestatus to 3	set timer to 0	AIWander 0 0 0 0 0 0 0 0 0 100 1 ; this is standing up and having a stretch animation. Note that '100' comes one zero sooner.endifif ( liestatus == 3 )	set timer to timer + GetSecondsPassed	if ( timer >= 7.5 ) ; this is how long standing up animation takes		AIWander 0 0 0 40 20 10 0 0 ; normal standing with idles		set liestatus to 4	endifendif

You have to set liestatus from 1 to 2 when you want her to stand up, which I don't know how do you want it to arrange. In my mod she stands after I talk to her, so I place the command into the dialogue action box, but you may want to do it differently.

UPD: just rereaded your post again and figured that you need the character *tortured* - then standing up with stretch won't look quite fitting. So only the first part of my post matters.
User avatar
Louise Lowe
 
Posts: 3262
Joined: Fri Jul 28, 2006 9:08 am

Post » Fri Jan 22, 2010 5:32 pm

Thats a very ambitious task.

If your torturing someone, maybe just have them collapse in a jail cell or something. Trying to get them to fall on a bed (or whatever) is guna take a lot of effort i would imagine.



Since you want to be able to *talk* to an NPC lying down, doing it through fatigue won't work. You'll need to use animations from RX31's pack. You have to include three files in your distribution pack (below is an example for a female character; use files with '_m_' instead of '_f_' if your character is male):
Meshes\Anim\anim_f_sleeping.nif
Meshes\Anim\xanim_f_sleeping.nif
Meshes\Anim\xanim_f_sleeping.kf

Edit the NPC, click on "Add Animation File" and select Meshes\Anim\anim_f_sleeping.nif

Now, let's say the NPC should be lying down when you see her for the first time. Then her script has to contain following code:
short liestatusif ( liestatus == 0 )	set liestatus to 1	AIWander 0 0 0 0 0 0 0 0 0 0 100 0 ; this is lying down animationendif


If you'll want her to stand up eventually, you'll need more code:
float timerif ( MenuMode == 1 ) ; to prevent counter to work while you check inventory mid-action	returnendifif ( liestatus == 2 ) ; see comment below	set liestatus to 3	set timer to 0	AIWander 0 0 0 0 0 0 0 0 0 100 1 ; this is standing up and having a stretch animation. Note that '100' comes one zero sooner.endifif ( liestatus == 3 )	set timer to timer + GetSecondsPassed	if ( timer >= 7.5 ) ; this is how long standing up animation takes		AIWander 0 0 0 40 20 10 0 0 ; normal standing with idles		set liestatus to 4	endifendif

You have to set liestatus from 1 to 2 when you want her to stand up, which I don't know how do you want it to arrange. In my mod she stands after I talk to her, so I place the command into the dialogue action box, but you may want to do it differently.

UPD: just rereaded your post again and figured that you need the character *tortured* - then standing up with stretch won't look quite fitting. So only the first part of my post matters.

Psycholex- I need them to be tortured and alive when they player enter's the cell, making it seem like they are seriously injured. So I couldn't kill them..

Kir- I think I'll go with that method you used, it seems to be what I want. Thanks!

EDIT: Kir, I've downloaded his animation pack, but there is no sleeping animation. Only gestures, bodybuilding and karate animations. :/
User avatar
Stay-C
 
Posts: 3514
Joined: Sun Jul 16, 2006 2:04 am

Post » Fri Jan 22, 2010 8:16 am

Well, there are several packs with his animations - PlanetElderScrolls alone counts Miscellaneous Moves And Poses and three parts of Groovy Moves. I don't know which pack do you have and can't exactly remember where I got these particular animations from. On the other hand, if you don't find them elsewhere, anim_f_sleeping can be found in Mr.Cellophane's Lovers&Legends mod; male animations are also in anim_johnny4 file (it also uses idles #4-6, so be careful with things he does while "standing still") that is used in Emma's White Wolf of Lokken or Julan Ashlander Companion. You can check these mods for necessary files.
User avatar
Dan Stevens
 
Posts: 3429
Joined: Thu Jun 14, 2007 5:00 pm

Post » Fri Jan 22, 2010 1:19 pm

Well, there are several packs with his animations - PlanetElderScrolls alone counts Miscellaneous Moves And Poses and three parts of Groovy Moves. I don't know which pack do you have and can't exactly remember where I got these particular animations from. On the other hand, if you don't find them elsewhere, anim_f_sleeping can be found in Mr.Cellophane's Lovers&Legends mod; male animations are also in anim_johnny4 file (it also uses idles #4-6, so be careful with things he does while "standing still") that is used in Emma's White Wolf of Lokken or Julan Ashlander Companion. You can check these mods for necessary files.

Sorry I found it, the download containing the animation as released by Qarl, but made by RX31. But I found it eventually and it works great. Thanks! :celebration:
User avatar
Carlos Vazquez
 
Posts: 3407
Joined: Sat Aug 25, 2007 10:19 am

Post » Fri Jan 22, 2010 7:36 pm

Can't you get the fatigue below zero, cause them to fall down, then "stopanimation"? would that allow the player to still talk to the NPC, then?

ST
User avatar
Mari martnez Martinez
 
Posts: 3500
Joined: Sat Aug 11, 2007 9:39 am

Post » Fri Jan 22, 2010 10:29 pm

I would like to add that if you need exacting custom animations it is not too hard to make them yourself by editing RX31's animations in Nifskope. Its not easy to explain but if there is interest I will post up my technique, and be warned, it is time consuming. But seeing NPCs move/position themselves just the way you want in game makes it worth it (for me). For NPCs that you apply a custom animation to, you only need to edit the regular .nif file, you don't need to touch the x--.nif or x--.kf files. You can also chain animation files together by using Disable + SetDelete on a series of models over time, each with a different animation nif.

Turns out you can also edit the base animations file(s) and change walking, fighting, sneaking, etc which will change movements for the player and all NPCs without a custom animation file, but according to my knowledge/testing you do have to edit the .kf file for it to work. If there was a way to switch files between directories from within the game, you could have unlimited types of animations for the player, its too bad - the possibilities would be endless.
User avatar
Sabrina Schwarz
 
Posts: 3538
Joined: Fri Jul 14, 2006 10:02 am

Post » Fri Jan 22, 2010 8:57 am

I would like to add that if you need exacting custom animations it is not too hard to make them yourself by editing RX31's animations in Nifskope. Its not easy to explain but if there is interest I will post up my technique, and be warned, it is time consuming.


I would be interested!!! Anything I can learn about NIFSkope I want to know. It does not scare me if it is time consuming and/or tedious.

ST
User avatar
Ricky Rayner
 
Posts: 3339
Joined: Fri Jul 13, 2007 2:13 am


Return to III - Morrowind