Jump to content

TG03MeadBarrel and adding a Tankard


Recommended Posts

Perhaps when you finish up with this, you'd be willing to release it as a modder's resource. I'd use it, and I know there are other modders who've been trying to get this to work as well.

 

I wonder why it requires a goblet and not the tankard, and if that could be changed?

Link to comment
Share on other sites

Would definitely do that if I could wrap it all up in one item. As in, just the meadbarrel furniture item. I am fairly green when it comes to idles and animations but will have a look into the specific idle to see how a goblet is used and see if it can be easily swapped out for other animobjects ... like a tankard.

 

Knowing what the idle now is has made everything a whole lot more work-out-able :)

Link to comment
Share on other sites

I guess that the goblet is tied into the animation. To change it would probably involve editing hkx files and that's a nightmare.

 

The Captain certainly doesn't have a goblet in his inventory and he has no alias inventory items. No package adds a goblet and it is not scripted.

 

That only leaves the havok animation files.

 

I'd use it, too.

Link to comment
Share on other sites

Yeah. I figured it would be in the hkx files. Which quite honestly fills me with dread! I will have a go at getting the script right so that the npc pulls out the goblet straight away before the pouring and drinking starts (all tied in to the one meadbarrel furniture object) and then I will have a look into the hkx files.
Link to comment
Share on other sites

hkx files are an absolute nightmare. They're encrypted for starters. You need a tool to even read bits of them. I did read a guide on them once, but it was so complex that I just vowed never to go near them. A few modders have managed to do stuff with them but not many. I don't even know if I could find that guide again.

 

I don't know for certain that the goblet is tied up to them. It's just that there is no means of giving the captain that goblet that I can find.

 

It makes sense since it's a 'carry' animation that is being used. NPCs carrying buckets, rocks, baskets etc, don't have these things in their inventory. The animation supplies them. Same with the food when they eat, or even drinking from a tankard at the bar. No NPC carries these things in their inventory.

Link to comment
Share on other sites

Update:

 

Having looked at this all afternoon I am unfortunately no closer to getting the animation to work in a perfect sequence, but I will keep going on it.

 

I have tried everything I could think of: I have created magic effects and spells, new idle animations (using the existing animation for the goblet) with keywords, every Papyrus event I know of that would be plausible ... but nothing I have done so far will bypass the starting animation(s) that the keyword ismeadbarrel uses.

 

I have struggled to get the playidle to fire if it is not first called by an OnActivate event. But this event fires AFTER the animations linked to ismeadbarrel. Of course, I could set something up to play the goblet idle before my npc uses the furniture marker, but would very much prefer it to all be tied together. Maybe it just is not possible with papyrus. Or am I missing something?

 

With regards to the animation being a goblet and being able to change that ... I had a look into .hkx files. As you say cumbrianlad ... Nightmare! Not for me. Even creating, what was basically a dummy version of the goblet animation and adding a keyword to it (which did not work - shame because that would have been a very clean way of doing it) has somehow left me a dirty edit in Quest MQ101 when I deleted the dummy Idle Animation! Do not ask me how as I created it from scratch using a unique name - all I did was add the goblet animation to it and a newly created keyword! Why it has linked to that particular quest I have no idea. I should not be messing around in the Idle Animations window! Haha. But we live and learn. Hopefully no damage done ... hopefully will be able to tidy it all up in SSEEDIT.

 

Will keep looking for ways to get OffSetCarryMQ201DrinkR idle to play BEFORE the NPC runs the animations linked to ismeadbarrel ... to link the two together with the one furniture object for elegance... but I may need some help with this sooner than later ...

Link to comment
Share on other sites

Well, there is probably a good reason why the developers went with the goblet rather than tankard--whatever that reason is. Tankard obviously makes more immersive sense for mead.

Yeah. I agree.

 

Personally, I'd drink mead from a tankard... in fact I've done so. Beth thought differently, hence the animation.

 

TyburnKetch, you're brave attempting the hkx files! I applaud you for that.

 

If I can think of anything more I'll tell you. At the moment, I'm drawing a blank.

Link to comment
Share on other sites

Just have to mention this here but ... PHEW! After some very sweaty moments of panic I remembered I have a set of esp back ups that sorted out the unintentional mess I managed to make of the Idle Animation window.

 

I might have another go at hkxâs and messing around with animation files at some point but right now I am just relieved to have escaped unharmed. They... are... brutal!

 

Now, on with trying to get this script more elegant ...

Link to comment
Share on other sites

Further Update:

 

I have now got this to work for my needs and think it may be of use to others. Unfortunately it is not as elegant as I would have liked (keeping it all tied into the one object - the meadbarrel furniture) but this way works well.

 

It involves two simple scripts. One to go on the meadbarrel furniture and one to go on a triggerbox volume somewhere close to it (but not too close - give your npc some room to turn away from the barrel when they are finished with it.)

 

Script to go on the furniture:

 

Scriptname YOURScript extends ObjectReference

 

Actor Property YOURACTOR Auto

Idle Property OffSetCarryMQ201DrinkR Auto

 

Function MoveAway()

RegisterForAnimationEvent(YOURACTOR,"IdleFurnitureExit")

EndFunction

 

Event OnActivate(ObjectReference akActivator)

 

If akActivator == YOURACTOR

YOURACTOR.PlayIdle(OffSetCarryMQ201DrinkR)

 

EndIf

EndEvent

 

Event OnAnimationEventUnregistered(ObjectReference akSource, String asEventName)

 

If (akSource == YOURACTOR) && (asEventName == "IdleFurnitureExit")

YOURACTOR.PlayIdle(OffSetCarryMQ201DrinkR)

debug.SendAnimationEvent(YOURACTOR,"IdleForceDefaultState")

EndIf

EndEvent

 

 

Script to go on the triggerbox volume:

 

Scriptname YOURScript extends ObjectReference

 

Idle property OffSetCarryMQ201DrinkR Auto

Actor Property YOURACTOR Auto

 

Auto State In

Event OnTrigger(ObjectReference akActionRef)

If akActionRef == YOURACTOR

utility.wait(0.1)

Debug.SendAnimationEvent(YOURACTOR, "OffSetCarryMQ201DrinkR")

Utility.Wait(2.0)

GoToState("Out")

EndIf

EndEvent

EndState

 

State Out

Event OnTrigger(ObjectReference akActionRef)

If akActionRef == YOURACTOR

Utility.Wait(2.0)

GoToState("In")

EndIf

EndEvent

EndState

 

 

I used a thin triggerbox volume so that my npc has plenty of time to clear the box before the states change. This script is basically a switch. Npc moves towards the barrel. Npc is coming back away from the barrel.

 

This way, although I am positive there are other ways, and probably a lot more simple, requires two scripts because of how the animations play out. To get the npc to start with a cup (goblet) they need to have it before entering the furniture (maybe someone knows otherwise but I just could not work this out) otherwise the first pour from the tap will be into an empty hand. Likewise, unless there is a script on the barrel itself calling the idle again any subsequent pours from the tap will be into an empty hand too. The animations knock each other out. But with both scripts you get a perfect fluid animation.

 

I probably do not need to call both the playidle again AND idleforcedefaultstate in the OnAnimationEventUnregistered Event on the furniture script- but it works and have not got around to testing that yet.

 

Thank you again cumbrianlad. You made this possible :smile:

 

If anyone can offer a more elegant way of doing this, without the need for a triggerbox volume, all tied into just the furniture I would love to know.

 

Also if anyone is brave enough to mess with the .hkx files to change the goblet to a tankard ;)

 

But for now, this way works for me.

Edited by TyburnKetch
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...