replace an item used in an animation?

Post » Mon Nov 19, 2012 3:47 am

how can I do to replace an item used into a furniture animation?

in the specific replace a pickaxe with another one ... for the mining furniture animation?
User avatar
sally R
 
Posts: 3503
Joined: Mon Sep 25, 2006 10:34 pm

Post » Mon Nov 19, 2012 10:36 am

There is no way to replace this?
User avatar
Sara Johanna Scenariste
 
Posts: 3381
Joined: Tue Mar 13, 2007 8:24 pm

Post » Mon Nov 19, 2012 5:09 am

Anyone?
User avatar
Emily Martell
 
Posts: 3469
Joined: Sun Dec 03, 2006 7:41 am

Post » Mon Nov 19, 2012 8:23 am

This is the script for the Mining animation .. I can0't find anywhere the idlepickaxe animations in the folders of bsa ...


Scriptname MineOreFurnitureScript extends ObjectReference  Conditional{script for furniture which the player can use to get resources}; Weapon Property RequiredWeapon Auto  ; {required for player to use - optional}; Message Property FailureMessage Auto  ; {Message to say why you can't use this without RequiredWeapon}; MiscObject Property Resource Auto  ; {what you get from using this furniture}; int Property ResourceCount = 1 Auto; {how many resources you get per use}objectReference property lastActivateRef auto Hidden{tracks the last triggeringRef}objectReference property objSelf auto hidden{pointer to this reference, set in script}bool property isRegisteredForEvents = false auto hidden{bool to track if this is registered for events}bool property canBeActivated = true auto hiddenidle property PickaxeExit autobool property playerIsLeavingFurniture = false auto hiddenbool property playerIsInFurniture = false auto hiddenfaction property CurrentFollowerFaction auto{Used to handle player followers using the furniture object}globalvariable property MiningSkillIncrement auto;===================================================================;;EVENT BLOCK;===================================================================Event OnLoad()	BlockActivation(true)	objSelf = self as objectReference	if isFurnitureInUse()		goToState("busy")	endifendEventEvent OnUnload()	; safety measure	UnregisterForEvents()endEventEvent OnAnimationEvent(ObjectReference akSource, string asEventName);	 debug.trace(self + ": animation event received=" + asEventName)		;if the animation event we've recieved is addToInventory activate our mineOreVein with	;the furniture as the activator to tell it to pay out ore	if asEventName == "AddToInventory"		;Game.GetPlayer().AddItem(Resource, ResourceCount)		lastActivateRef.activate(objSelf)	endif			if asEventName == "IdleFurnitureExit" || asEventName == "IdlePickaxeExit" || asEventName == "IdlePickaxeFloorExit" || asEventName == "IdlePickaxeTableExit"		UnregisterForEvents()	endifendEvent;===================================================================;;STATE BLOCK;===================================================================auto STATE normal	event onBeginState()		canBeActivated = true;		 debug.Trace(self + " is in state normal")	endEvent		Event OnActivate(ObjectReference akActionRef)		if canBeActivated			canBeActivated = False			gotoState("busy");			 debug.trace(self + ": OnActivate in state normal by " + akActionRef)			if akActionRef == Game.GetPlayer() && !isFurnitureInUse();				 debug.trace(self + ": was activated by the player in state normal, furniture not in use")				RegisterForEvents()				Activate(akActionRef, true)					elseif akActionRef == Game.GetPlayer();				 debug.Trace(self + ": has been activated by the player while in use")				;just activate it				;goToState("busy")				Activate(akActionRef, true);				 ;debug.trace(self + "NPC activation END")			else				;goToState("busy")				Activate(akActionRef, true)			endif		endif		canBeActivated = true	endEventendStateSTATE busy	; do nothing	event onBeginState()		canBeActivated = True	endEvent		event onActivate(objectReference akActionRef)		if canBeActivated && isFurnitureInUse()			canBeActivated = False;			 debug.Trace(self + ": has recieved activation in busy state from " + akActionRef)			if isRegisteredForEvents				if akActionRef == lastActivateRef;					 debug.Trace(self + ": is trying to kick player out of furniture")					; Game.GetPlayer().PlayIdle(PickaxeExit)					; Activate(game.getPlayer(), true)					playerIsLeavingFurniture = True					goToState("reseting")				elseif akActionRef == game.GetPlayer();					 debug.Trace(self + ": player is trying to leave furniture")					; Game.GetPlayer().PlayIdle(PickaxeExit)					; Activate(game.getPlayer(), true)					playerIsLeavingFurniture = True					goToState("reseting")				endif			elseif akActionRef == game.GetPlayer()				Activate(game.getPlayer(), true)			else				;Activate(akActivator, true)			endif		elseif !isFurnitureInUse() && akActionRef == game.GetPlayer();			 debug.trace(self + ": was activated by the player")			RegisterForEvents()			Activate(akActionRef, true)		endif		canBeActivated = true	endEventendStatestate reseting	event onBeginState();		 debug.Trace(self + " is in state reseting")		if playerIsLeavingFurniture			playerIsLeavingFurniture = false			Game.GetPlayer().PlayIdle(PickaxeExit)		else			UnregisterForEvents()		endif		;Activate(game.getPlayer(), true)				;UnregisterForEvents()	endEvent		; event onActivate(objectReference akActionRef)		; UnregisterForEvents()	; endEventendStatestate Depleted	event onBeginState()		isRegisteredForEvents = True		UnregisterForEvents()	endEvent		event onActivate(objectReference akActionRef);		 debug.Trace(self + ": has recieved activation in state Depleted from " + akActionRef)	endEventendState;===================================================================;;FUNCTION BLOCK;===================================================================function goToDepletedState()	goToState("Depleted")endFunctionfunction RegisterForEvents()	; centralize this	if !isRegisteredForEvents		isRegisteredForEvents = True		RegisterForAnimationEvent(Game.GetPlayer(), "AddToInventory")		RegisterForAnimationEvent(Game.GetPlayer(), "IdlePickaxeExit")		RegisterForAnimationEvent(Game.GetPlayer(), "IdlePickaxeFloorExit")		RegisterForAnimationEvent(Game.GetPlayer(), "IdlePickaxeTableExit")		RegisterForAnimationEvent(Game.GetPlayer(), "IdleFurnitureExit")	endifendFunctionfunction UnregisterForEvents()	; centralize this		; It is perfectly safe to unregister for events you never registered for, however	; this function is called as part of OnUnload, and if this object isn't persistent	; then it may be deleted by the time OnUnload runs, and these function calls will	; fail. Since RegisterForAnimationEvent persists us, we know it will be safe to	; call Unregister if we've previously Registered, even if called as a part of	; OnUnload;	 debug.Trace(self + " is attempting to unregister for anim events")	if isRegisteredForEvents		isRegisteredForEvents = false		UnRegisterForAnimationEvent(Game.GetPlayer(), "AddToInventory")		UnRegisterForAnimationEvent(Game.GetPlayer(), "IdlePickaxeExit")		UnRegisterForAnimationEvent(Game.GetPlayer(), "IdlePickaxeFloorExit")		UnRegisterForAnimationEvent(Game.GetPlayer(), "IdlePickaxeTableExit")		UnRegisterForAnimationEvent(Game.GetPlayer(), "IdleFurnitureExit");		 debug.Trace(self + " should be unregistered for anim events")	endif	gotoState("normal")	canBeActivated = TrueendFunction

Found this ...

AnimObjects\AnimObjectPickAxe.nif
User avatar
Bird
 
Posts: 3492
Joined: Fri Nov 30, 2007 12:45 am

Post » Mon Nov 19, 2012 3:46 am

the idlepickupexit seems to be an animation but Ican't find anywhere in CK as reference and I can't find in animations lists in bsa ... I found this object anim objectpickaxe.nif , but I don't know how to associate to the animation ?
User avatar
Ebou Suso
 
Posts: 3604
Joined: Thu May 03, 2007 5:28 am

Post » Mon Nov 19, 2012 5:20 am

No one tried to replace an animation item befoure???
User avatar
Neil
 
Posts: 3357
Joined: Sat Jul 14, 2007 5:08 am

Post » Mon Nov 19, 2012 5:41 am

Up!
User avatar
SiLa
 
Posts: 3447
Joined: Tue Jun 13, 2006 7:52 am

Post » Sun Nov 18, 2012 10:58 pm

AnimObjects are Behaviored -> meaning you can not just add or remove these without a VERY sensitive knowledge of how to edit these files and how to attach loadout events to anim events and you have to make sure you use the proper transition out event or you WILL cause all kinds of havok in game when using this new set of behavior files.
User avatar
Ilona Neumann
 
Posts: 3308
Joined: Sat Aug 19, 2006 3:30 am

Post » Sun Nov 18, 2012 8:14 pm

I've been interested in this too. Would it be more work than worth it to change the bard animation to use a guitar model instead of a lute?
User avatar
Monika Krzyzak
 
Posts: 3471
Joined: Fri Oct 13, 2006 11:29 pm

Post » Sun Nov 18, 2012 7:35 pm

I've been interested in this too. Would it be more work than worth it to change the bard animation to use a guitar model instead of a lute?

The Behavior Files reference the "Miscellaneous -> AnimObject -> ID" as a way to attach AnimObjects to Animations which means you would have to create your objects in the CK then hand edit not only a new Animation Event but also properly attach the hkbStringEventPayload to that animation -> Structurally these animations are nearly identical to every other Special Idle with exception of needing the enterNotifyEvents and exitNotifyEvents set -> you then have to renumber everything in that HUGE mt_behavior file although a superior way would be to separate out all of your changes into their own Behavior file and just make the only change of referencing that in the Master_0 or mt_behavior.
User avatar
Anthony Rand
 
Posts: 3439
Joined: Wed May 09, 2007 5:02 am

Post » Mon Nov 19, 2012 1:07 am

so it's a huge load of work that is not even providing a certain achievement that could just naufragate in an non working editing as I understand ... ?
User avatar
Chantelle Walker
 
Posts: 3385
Joined: Mon Oct 16, 2006 5:56 am

Post » Mon Nov 19, 2012 10:04 am

so it's a huge load of work that is not even providing a certain achievement that could just naufragate in an non working editing as I understand ... ?

Always possible to completely fubar the files but they can always be reverted -> the real problem is editing something that is a moving target and will require that exact same edit again for Hearthfire then for DLC03 then again for DLC04, DLC05, etc... until Bethesda moves on to Fallout 4 and even then there are going to be conflicts with every other mod doing this...
User avatar
Fluffer
 
Posts: 3489
Joined: Thu Jul 05, 2007 6:29 am

Post » Sun Nov 18, 2012 11:42 pm

I actually didn't want to replace that anim but create a new one with the extra different tool ... I made a pickaxe and its a bit annoying to see the player mining with the vanilla one instead than the special one created...
User avatar
Chrissie Pillinger
 
Posts: 3464
Joined: Fri Jun 16, 2006 3:26 am

Post » Sun Nov 18, 2012 10:31 pm

No one tried to replace an animation item befoure???
I did it. However only in idles. With FNIS you can define new idles with and without AnimObjects, with and without headtracking, cyclic/acyclic, ...

However you want to make it a furniture animation. And here is the problem.

Again, I don't think it's the problem to define a behavior for the new furniture animation. In fact I had almost made one (I think). But I stopped working on that when I found out that there are certain elements which you cannot define in a mod:
  • Furniture objects: you cannot make a new furniture object. You can define a copy of an existing one. But when you use it in a package, the character will simply refuse to execute the package and use the furniture
  • Idle definitons: in the Gameplay > Animations > 0_master.hkx the system defines it#s furniture animations under "ActionActivate". Again, making a copy of any definition here will not work. You can rename existing definitions, add conditions, and it still works. But as soon as you add a new definition (even with a vanilla AnimEvent) it will simply be ignored ingame.
Edit: Sorry, there was an error in my test
User avatar
Frank Firefly
 
Posts: 3429
Joined: Sun Aug 19, 2007 9:34 am

Post » Mon Nov 19, 2012 8:43 am

so short answer is not possible ?
User avatar
Lyndsey Bird
 
Posts: 3539
Joined: Sun Oct 22, 2006 2:57 am

Post » Mon Nov 19, 2012 4:21 am

so short answer is not possible ?
He's saying not possible because mining-ore is a piece of furniture.

He's saying you can make custom idle-markers, but not custom furniture. Not because the animation won't work; but because making custom-furniture is not possible (npcs won't use it).

:(
User avatar
Danny Warner
 
Posts: 3400
Joined: Fri Jun 01, 2007 3:26 am

Post » Mon Nov 19, 2012 4:29 am



Actually it is possible its just tedious as has already been mentioned and would be easier to fake it using Markers, Generic Special Idles and having the Ore be a Scripted Furniture or Activator, in the end there are actually quite a few ways to get this done but they all require a lot of work.

Note: I have already done this by creating a new Spell Crafting Table and UI elements for my own personal uses, the scripts did not work quite right and has been abandoned with the last Behavior File updates -> the animations and furniture object worked just fine all I did in the CK was duplicated the CraftingEnchantingRoot and changed the KeyWord required to my own and gave that keyword to my furniture.

Although I believe his original question was dealing with replicating the default Pick Axe with a Special one if the player had it on his/her person and all that requires is to duplicate the original PickAxe SI's (I believe there are 9 of these :/) and do the rest of the inclusion edits needed for Behavior to accept this as valid anim event/s then in the Idle Manager you conditionalize the new anim to only playing if the player has this special axe you have to make sure these are above the originals or the originals will just work instead.

Either way its still a ton of work for very little end effect and a 100% chance for all of the work to be invalidated with future DLC's :/.
User avatar
Rob Smith
 
Posts: 3424
Joined: Wed Oct 03, 2007 5:30 pm

Post » Mon Nov 19, 2012 7:47 am

Actually it is possible its just tedious as has already been mentioned and would be easier to fake it using Markers, Generic Special Idles and having the Ore be a Scripted Furniture or Activator, in the end there are actually quite a few ways to get this done but they all require a lot of work.
Damned. I had a mistake in my idle definition. It actually IS possible to use new furniture objects :whistling: So I think I can try again.

Either way its still a ton of work for very little end effect and a 100% chance for all of the work to be invalidated with future DLC's :/.
Now, invalidation is not the problem. FNIS generates seperate mod-specific behavior files. There is only one simple ReferenceGenerator in 0_master, and the list of new animations files in default(fe)male. So this means little work with new Skyrim updates. Proven with the 1.6 update (which was the last update with new behavior files).
User avatar
LuBiE LoU
 
Posts: 3391
Joined: Sun Jun 18, 2006 4:43 pm


Return to V - Skyrim