NPC animation strategy

#4
(2013-06-09, 08:32 PM)HwitVlf link Wrote:Mick, I mentioned (when I fixed the reversed NPC greeting animations) that simple changing the single byte animation number in the file will change which animation SoM plays for sitting standing etc. Since Ex already has memory hooks setup, why don't you just make a hot-swap setup that swaps in/out animations when needed. You could make an almost limitless number of animation sets in a single model. Since you already have hooks into player location, damage etc, it shouldn't be hard to design a panel of new triggers, then simply swap in the desired animation when the trigger was met.

My impression is you changed the ID assignment in the MDL file. Since the IDs were simply assigned incorrectly then that in and of itself doesn't really amount to anything new.

My working assumption is the function of the IDs are hardwired into the game program. When an ID is matched the program probably records the address of that animation somewhere in an prescribed ID table.

Even if you rewrote the addresses in that hypothetical table to playback normally inaccessible animations, you'd still be stuck with the same trigger regime.

I expect the game program just ignores IDs it doesn't recognize. The animations are probably still loaded into memory with everything else. But I'd be surprised if you set the currently playing animation ID to a custom ID if the game would be able to play it.

I actually did notice the "currently playing ID" memory when looking at doors a little while back. Oddly enough the playtime wasn't anywhere nearby. Probably there is a shortlist of currently playing animations somewhere else with time kept nearby. There was a timer for the delay between the opening and closing animation nearby.


PS: Unfortunately using an enemy as an NPC is not all its cracked up for. They don't have all the little touches like turning to face you. So they feel like second class company. I think the right approach would be to just live with the division for back compatibility. Maybe it having different MDL files for different moods makes sense, then just having one "mood" being "enemy" would be the best way to think about that.

EDITED: BTW, I've never really given any thought to how to trigger new kinds of animations for NPCs. The only thing that makes sense to me is controlling them directly with events. But that is only useful for cut scene like sequences. I would be open to ideas (of course if you can just rewire the IDs in a way that makes sense, replace "sitting" with "working" or whatever, then that would work just fine)
Reply



Messages In This Thread
NPC animation strategy - by Verdite - 2013-06-09, 02:47 PM
Re: NPC animation strategy - by HolyDiver - 2013-06-09, 05:16 PM
Re: NPC animation strategy - by HwitVlf - 2013-06-09, 08:32 PM
Re: NPC animation strategy - by HolyDiver - 2013-06-09, 09:02 PM
Re: NPC animation strategy - by HwitVlf - 2013-06-09, 09:55 PM
Re: NPC animation strategy - by HolyDiver - 2013-06-10, 01:47 PM
Re: NPC animation strategy - by Verdite - 2013-06-10, 03:48 PM
Re: NPC animation strategy - by HolyDiver - 2013-06-10, 04:41 PM
Re: NPC animation strategy - by Verdite - 2013-06-10, 05:06 PM
Re: NPC animation strategy - by Verdite - 2013-06-12, 01:33 PM
Re: NPC animation strategy - by HolyDiver - 2013-06-12, 05:03 PM
Re: NPC animation strategy - by Verdite - 2013-06-12, 10:18 PM
Re: NPC animation strategy - by HwitVlf - 2013-06-13, 08:20 PM
Re: NPC animation strategy - by Verdite - 2014-06-10, 02:27 PM
Re: NPC animation strategy - by HwitVlf - 2014-06-12, 06:43 PM
Re: NPC animation strategy - by Verdite - 2015-01-24, 06:46 AM
Re: NPC animation strategy - by HwitVlf - 2015-01-24, 09:21 AM



Users browsing this thread:
3 Guest(s)