Effective use of PlayIdle

Post » Fri Feb 18, 2011 6:55 pm

Is it at all possible to have Point Lookout's shoveling animation play on command in the script by the using the playidle function? If not, where can I find people that might be willing to make me an animation of the player shoveling that would work with PlayIdle?
User avatar
FLYBOYLEAK
 
Posts: 3440
Joined: Tue Oct 30, 2007 6:41 am

Post » Sat Feb 19, 2011 4:55 am

As I don't have Point Lookout, I'm not sure what the shoveling animation is, but it is fully possible to use http://geck.gamesas.com/index.php/PlayIdle to make the player perform an animation. In my http://www.fallout3nexus.com/downloads/file.php?id=10787 mod, the smoking idle is activated when the lighter is equipped, if you are looking for an example. It is even possible for the player to stop the animation if something happens (such as an enemy approaching).
User avatar
Natalie Taylor
 
Posts: 3301
Joined: Mon Sep 11, 2006 7:54 pm

Post » Fri Feb 18, 2011 8:24 pm

Is there a way to exactly know which animation is needed to reproduce the actions? I can probably assume one of the following:

+ Characters\_Male\IdleAnims\FurnitureIdles\Sitting\NonSitFurniture\DLC04NonSitFurniture\DLC04Shoveling

+ Characters\_Male\IdleAnims\LOOSE\LooseDLC04Shoveling

... but what if I didn't know what the animation was called? When I inspect the object data on the furniture marker for shoveling, under Active Markers it says Special 22. Does that relate to the animation or is the info contained within the NIF file?
User avatar
latrina
 
Posts: 3440
Joined: Mon Aug 20, 2007 4:31 pm

Post » Fri Feb 18, 2011 10:01 pm

There are a number of gotchas when trying to use PlayIdle on the player. Some of the most important are:

  • The location of the animation (*.kf file) must be outside of the meshes\characters folder. This is a problem as all the idles are placed in that exact folder. The solution is to extract the *.kf file from the bsa and place it in another folder. Also note that the .kf file must be renamed. Furthermore, GECK does not support setting the path to something outside of the characters folder, so you have to use FO3Edit for that. A walkthrough can be found http://www.project-valhalla.org/Adding_custom_animations#Adding_the_Idle_animations (note that there is an error in the walkthrough: The path should assume that you are in the meshes folder, not the Fallout 3 folder).
  • Calling PlayIdle from a quest script fails to have any effect. Placing it in an object or spell script works. The spell can be applied by using http://geck.gamesas.com/index.php/CastImmediateOnSelf.


To use a static item (like a showel) you also need to make an Animation Object. This animation object must be linked with the animation you made in step 1. This is done when you make the animation object. Note that when the animation starts, the animation object is equipped. If the player holds a showel in his or her hands, this must be unequipped, unless you want the player to have two showels :P

I'm not sure if furniture markers work on the player, as I have not worked that avenue.
User avatar
Anna Watts
 
Posts: 3476
Joined: Sat Jun 17, 2006 8:31 pm

Post » Fri Feb 18, 2011 8:43 pm

Thanks for the guidance. I should have enough info now to try again.

I'm not sure if furniture markers work on the player, as I have not worked that avenue.



So... + Characters\_Male\IdleAnims\LOOSE\LooseDLC04Shoveling ? "Loose" stand for anything?
User avatar
Cedric Pearson
 
Posts: 3487
Joined: Fri Sep 28, 2007 9:39 pm

Post » Sat Feb 19, 2011 4:31 am

So... + Characters\_Male\IdleAnims\LOOSE\LooseDLC04Shoveling ? "Loose" stand for anything?

I'm not sure, but I *think* that Bethesda used LOOSE to specify that the animation did not have any conditions associated with it. Might be wrong, though.
User avatar
lolli
 
Posts: 3485
Joined: Mon Jan 01, 2007 10:42 am

Post » Sat Feb 19, 2011 8:22 am

I'm not sure, but I *think* that Bethesda used LOOSE to specify that the animation did not have any conditions associated with it. Might be wrong, though.


Ok, it should be the Loose version then, as the other has a condition attached to it.

Well that settles it. In my first attempt, I was doing just about everything the wrong way. :bonk:
User avatar
Chica Cheve
 
Posts: 3411
Joined: Sun Aug 27, 2006 10:42 pm

Post » Sat Feb 19, 2011 3:36 am

Heh, I know that feeling. It took me a while to figure out how to make PlayIdle work on the player. If I had not come across that Valhalla SMG mod, I¨m not sure I could have cracked it.
User avatar
Laura Simmonds
 
Posts: 3435
Joined: Wed Aug 16, 2006 10:27 pm

Post » Fri Feb 18, 2011 5:51 pm

Heh, I know that feeling. It took me a while to figure out how to make PlayIdle work on the player. If I had not come across that Valhalla SMG mod, I¨m not sure I could have cracked it.



Success!!!


Placing it in an object or spell script works. The spell can be applied by using CastImmediateOnSelf.


Figures it would take magic to get this working. It may take a little more set up, but definitely worth it to make something easy to call.


Note that when the animation starts, the animation object is equipped. If the player holds a showel in his or her hands, this must be unequipped, unless you want the player to have two shovels.


Also for this particular animation, the player must be in a non-combative stance. Otherwise, the player holds the shovel all wrong throughout the animation. I can find the shovel check and subsequent unequipitem commands in the original Point Lookout script, but not sure what was done about stance. Unless when unequipitem is called on players equipped weapon, the player automatically goes into a non combat stance?

And since I only have a 3rd person animation, is it possible to force the perspective through script? Guess I could also run a check and not alow digging in first person. As a note, in first person there IS an animation sequence, but no shovel. Equipping the shovel as a weapon though almost works.
User avatar
ImmaTakeYour
 
Posts: 3383
Joined: Mon Sep 03, 2007 12:45 pm

Post » Sat Feb 19, 2011 7:46 am

Glad you got it figured!

Also for this particular animation, the player must be in a non-combative stance. Otherwise, the player holds the shovel all wrong throughout the animation. I can find the shovel check and subsequent unequipitem commands in the original Point Lookout script, but not sure what was done about stance. Unless when unequipitem is called on players equipped weapon, the player automatically goes into a non combat stance?

Is the shovel in PL actually equipable? I primarily used armor (which does not chance stance) for 3rd person animations, so I guess you just have to tinker with it to see what works best.

And since I only have a 3rd person animation, is it possible to force the perspective through script? Guess I could also run a check and not alow digging in first person. As a note, in first person there IS an animation sequence, but no shovel. Equipping the shovel as a weapon though almost works.

If you use FOSE, you can use the http://fose.silverlock.org/fose_command_doc.html#TapControl command like this

short jumpedTo3rdPersonif IsPC1stPerson   TapControl 13 ; switch to 3rd person, as the 1st person animation does not work   set jumpedTo3rdPerson to 1 ; only jump back to 1st person if player uses 1st personendif

TapControl can also be used to jump back to 1st person when the animation is done.
User avatar
Pants
 
Posts: 3440
Joined: Tue Jun 27, 2006 4:34 am

Post » Fri Feb 18, 2011 10:59 pm

Glad you got it figured!


Your instructions were quite helpful!


Is the shovel in PL actually equipable? I primarily used armor (which does not chance stance) for 3rd person animations, so I guess you just have to tinker with it to see what works best.


The shovel is mostly used as a melee weapon. Shoveling is only done at a few select locations.

But my problem is not whether the shovel is equipped (I'll run a check), but the fact that the player could have their fists drawn. The player must be at ease, not in the ready position. I've found that I can use http://geck.gamesas.com/index.php/IsWeaponOut to check for this, but I'm not sure if there is a way to set the "not" ready position.


If you use FOSE, you can use the http://fose.silverlock.org/fose_command_doc.html#TapControl command like this

short jumpedTo3rdPersonif IsPC1stPerson   TapControl 13 ; switch to 3rd person, as the 1st person animation does not work   set jumpedTo3rdPerson to 1 ; only jump back to 1st person if player uses 1st personendif

TapControl can also be used to jump back to 1st person when the animation is done.


That solves my perspective problem. Thank you. Perhaps I'll be able to use TapcContol 7 to get the player at ease...
User avatar
priscillaaa
 
Posts: 3309
Joined: Sat Dec 30, 2006 8:22 pm

Post » Fri Feb 18, 2011 8:10 pm

There are a number of gotchas when trying to use PlayIdle on the player. Some of the most important are:

  • The location of the animation (*.kf file) must be outside of the meshes\characters folder. This is a problem as all the idles are placed in that exact folder. The solution is to extract the *.kf file from the bsa and place it in another folder. Also note that the .kf file must be renamed. Furthermore, GECK does not support setting the path to something outside of the characters folder, so you have to use FO3Edit for that. A walkthrough can be found http://www.project-valhalla.org/Adding_custom_animations#Adding_the_Idle_animations (note that there is an error in the walkthrough: The path should assume that you are in the meshes folder, not the Fallout 3 folder).
  • Calling PlayIdle from a quest script fails to have any effect. Placing it in an object or spell script works. The spell can be applied by using http://geck.gamesas.com/index.php/CastImmediateOnSelf.


To use a static item (like a showel) you also need to make an Animation Object. This animation object must be linked with the animation you made in step 1. This is done when you make the animation object. Note that when the animation starts, the animation object is equipped. If the player holds a showel in his or her hands, this must be unequipped, unless you want the player to have two showels :P

I'm not sure if furniture markers work on the player, as I have not worked that avenue.


The game does not care where the animations are located you can PlayIdle an animation from any creature on the player and vise-versa if you wish (My ECM and CC mods do exactly this).

Also there is Zero need to rename SI's if you moved them to another Folder as Long as the Idle Manager Name is different the Animations name does not matter in the least, generally a good idea to rename them to something close to your use anyway though.

Calling PlayIdle or PickIdle can be done from ANY kind of script and it will work on the Player, any Creature or NPC (Again something My ECM and CC mods do, I have Quests, Objects, AI and Magic Effects(Abilities and Spells) all that function Calling PlayIdle without any issues).
User avatar
Music Show
 
Posts: 3512
Joined: Sun Sep 09, 2007 10:53 am

Post » Sat Feb 19, 2011 2:58 am

That's funny ... when I call PlayIdle on the player in a quest script, nothing happens. If I cast a spell on the player that calls PlayIdle on the player, the idle is performed. Similarly, if I use a vanilla idle, nothing happens. If I copy the idle (*.kf file) to a folder outside the characters folder and rename it, the idle is performed. Also, to the best of my knowledge, PickIdle does not work in Fallout 3.

I guess I will have to take a look at your mods and see how you got it working.

By the way, what is a SI?
User avatar
Nick Jase Mason
 
Posts: 3432
Joined: Sun Jul 29, 2007 1:23 am

Post » Fri Feb 18, 2011 10:00 pm

This is cool information to know. An old companion mod that FWE's current followers enhanced was based on is "followers use regular gear". Part of the stimpak healing script made the NPC's run a 'self-injection' animation (pretty sweet). I havn't been able to get it to work with the new scripts though . . . and I'd also like to run it on the player through the Triage scripts . .. maybe i can figure it out with the above discussion.

Cheers
User avatar
Naazhe Perezz
 
Posts: 3393
Joined: Sat Aug 19, 2006 6:14 am

Post » Sat Feb 19, 2011 1:35 am

You may want to take a look at the wearable smokes mod I linked above, as it also has functionality that allows the player to interupt the animation. This could also come in handy when using cigarettes in FWE.
User avatar
pinar
 
Posts: 3453
Joined: Thu Apr 19, 2007 1:35 pm

Post » Sat Feb 19, 2011 9:03 am

That's funny ... when I call PlayIdle on the player in a quest script, nothing happens. If I cast a spell on the player that calls PlayIdle on the player, the idle is performed. Similarly, if I use a vanilla idle, nothing happens. If I copy the idle (*.kf file) to a folder outside the characters folder and rename it, the idle is performed. Also, to the best of my knowledge, PickIdle does not work in Fallout 3.

I guess I will have to take a look at your mods and see how you got it working.

By the way, what is a SI?


PickIdle works just fine -> the game engine itself calls PickIdle for every actor in scene about every 30 seconds (depending on a game setting).

SI = Special Idle.

I only Use Player.PlayIdle in one Quest any longer and its my Testing Quest I set it up so that it calls my testing anims to play constantly so I can visually look them over in-game, Ive never had any issues with PickIdle or PlayIdle, except calling PlayIdle from in-game Console does require that I first use TFC thats about the only limitation I have run into using it.

This is cool information to know. An old companion mod that FWE's current followers enhanced was based on is "followers use regular gear". Part of the stimpak healing script made the NPC's run a 'self-injection' animation (pretty sweet). I havn't been able to get it to work with the new scripts though . . . and I'd also like to run it on the player through the Triage scripts . .. maybe i can figure it out with the above discussion.

Cheers


Easies way to do this is to open the Idle manager find the Anim entry for using the Stims its under Activate Idles and just PlayIdle it from a Magic Effect attached to the Stim itself -> only problem is there is not a 1st person one so using one of th HitReaction Idles should do just hunch them over a second -> Anim Objects do not work in 1st person so trying to attach the stim to that view would do nothing.
User avatar
Everardo Montano
 
Posts: 3373
Joined: Mon Dec 03, 2007 4:23 am

Post » Sat Feb 19, 2011 7:23 am

Calling PlayIdle or PickIdle can be done from ANY kind of script and it will work on the Player, any Creature or NPC (Again something My ECM and CC mods do, I have Quests, Objects, AI and Magic Effects(Abilities and Spells) all that function Calling PlayIdle without any issues).

I tested the usage of PlayIdle on the player intensively to figure out exactly under which conditions it worked and under which it did not. As I wrote earlier, I was unable to get it to work from a quest script. I found one of my old POC test esps and added two options:

  • By pressing 'j', the quest script calls PlayIdle through a scripted spell effect using CastImmediateOnSelf
  • By pressing 'u', PlayIdle is called directly from the quest script.

In game pressing 'j' activated the animation, pressing 'u' did not. I uploaded the esp with a sample .kf file http://dl.dropbox.com/u/8130287/ZumbsAnimTest.7z. Would you mind taking a look at it and tell me what I'm doing wrong?

I use Fallout 3 v 1.7, GECK 1.5 and FOSE 1.2b2. The animation is a simple 1st person thrusting movement.
User avatar
kevin ball
 
Posts: 3399
Joined: Fri Jun 08, 2007 10:02 pm

Post » Sat Feb 19, 2011 8:32 am

a simple 1st person thrusting movement.


Ahh, the innuendo
User avatar
N3T4
 
Posts: 3428
Joined: Wed Aug 08, 2007 8:36 pm

Post » Fri Feb 18, 2011 11:30 pm

:rofl:

Alas, only the hands and arms are rendered in 1st person :whistling:
User avatar
JESSE
 
Posts: 3404
Joined: Mon Jul 16, 2007 4:55 am

Post » Sat Feb 19, 2011 8:55 am

If you TFC your script for using PlayIdle within a quest works -> My scripts pretty much locks down the players entire controls and allows me to freely rotate the camera around the player which is most likely why my use does not require this step because I am mostly faking it by removing the players ability to control their character by normal means -> its easier to just stick with Magic Effects for 90% of anything people may want to do, I use Magic Effects for most of my forced animation needs its just easier to keep track of 50 spells vs trying to monitor 50 scripts worth of code in one Quest Script.
User avatar
CArla HOlbert
 
Posts: 3342
Joined: Wed Feb 21, 2007 11:35 pm

Post » Sat Feb 19, 2011 7:07 am


If you use FOSE, you can use the http://fose.silverlock.org/fose_command_doc.html#TapControl command...


Once in 3rd person POV and the animation is running, is there a way to disable the player's ability to switch to 1st person? The POV flag in the DisablePlayerControls does the opposite of what I need, and locks the player in 1st person POV.

Edit:

Never mind.

Upon reflection, this would be a good way to give the player a method of breaking the animation.
User avatar
Siidney
 
Posts: 3378
Joined: Fri Mar 23, 2007 11:54 pm

Post » Sat Feb 19, 2011 6:03 am

If you TFC your script for using PlayIdle within a quest works

So, there were a gotcha :) Thanks for taking the time to look it over. It is appreciated.

Once in 3rd person POV and the animation is running, is there a way to disable the player's ability to switch to 1st person? The POV flag in the DisablePlayerControls does the opposite of what I need, and locks the player in 1st person POV.

Edit:

Never mind.

Upon reflection, this would be a good way to give the player a method of breaking the animation.

I would tend to agree. For future reference, FOSE adds some extra functionality to disable particular controls with http://fose.silverlock.org/fose_command_doc.html#DisableControl and keys with http://fose.silverlock.org/fose_command_doc.html#DisableControl.
User avatar
Justin
 
Posts: 3409
Joined: Sun Sep 23, 2007 12:32 am

Post » Sat Feb 19, 2011 9:23 am

FOSE adds some extra functionality to disable particular controls with http://fose.silverlock.org/fose_command_doc.html#DisableControl and keys with http://fose.silverlock.org/fose_command_doc.html#DisableControl.


Haha, perhaps not a good idea to use the POV key to break animation, because by using TapControl 13 I was tripping the break in the script. Anyhow, I set the breakout key to to FORWARD, and in terms of aborting the task (script wise) it works ok. But is there something like a StopIdle function? The animation still plays while the player is running away.
User avatar
Oscar Vazquez
 
Posts: 3418
Joined: Sun Sep 30, 2007 12:08 pm

Post » Fri Feb 18, 2011 7:46 pm

There is no StopIdle function. However, the functionality can be mimiced by the following code:

player.PlayGroup Forward 1player.PlayGroup Idle 1

User avatar
lucile
 
Posts: 3371
Joined: Thu Mar 22, 2007 4:37 pm

Post » Sat Feb 19, 2011 2:09 am

There is no StopIdle function. However, the functionality can be mimiced by the following code:

player.PlayGroup Forward 1player.PlayGroup Idle 1



Very nice. You are the F3 animation wizard!
User avatar
Kelsey Hall
 
Posts: 3355
Joined: Sat Dec 16, 2006 8:10 pm


Return to Fallout 3