NPC animation strategy

#6
(2013-06-09, 09:55 PM)HwitVlf link Wrote:You would have to set up a panel of triggers too of course- but that was my point: player location+damage detection= quite a few interesting new possible triggers. If you're worried about hard coded animation IDs, PCs almost always use a comparison check when evaluating any number- as in:

If Animation ID# = "5",
then jump to (play animation)
else
do something else.

It is probably as simple as modifying a single byte (5 in above example) in the game.exe to change which animation # is played for any given trigger. ‎  Hence why I say it should be easy to hot-swap animations with a memory hook.

First of all, I made some edits that I thought I'd already made, and one word "backed" well I don't know where that came from.

Anyway, changes like this are never easy. Not for me anyway. There's no telling how the logic works programming wise, even though the basic model is pretty straightforward (upon hit: stop idle animation and do one of X)

Quote:For instance, I'm assuming Ex's memory hooking could remove the player's ability to directly trigger an "examined" animation and instead, initiate the "examined" animation whenever Ex decides certain criteria are met (player location, damage,equipment etc). When Ex detects that a trigger criteria-set is matched, ‎  it would hot-swap the number checked for in the PC's animation # "evaluation" and initiate a "false examined" event. Thus allowing Ex to play any animation when it detects the appropriate triggers. You could theoretically swap an endless number of animations in a loop through a single SoM trigger.

What is currently possible in this regard is very little. Things like this aren't hooks as you say. They boil down to literal reprogramming. It's only even very recently that I've become comfortable enough to stare at some binary code for what usually amounts to an afternoon in order to arrive at a solution for something that would've otherwise taken 1 minute to add to an open source piece of software. I get a headache just thinking about it.

I am generally reticent to take responsibility away from SOM. But if I was going to figure out new triggers, I'd start by just taking control completely away from SOM. So every time you do that a little piece of SOM goes away. And I consider the AI to be kind of the core. If it goes there is nothing that remains. Even though animations aren't strictly AI they are pretty closely related.

Quote:Actually, unlike NPCs, enemies can be set to face the player even before they are "examined". ‎  They don't have a "turn left/right" when examined trigger, but an attack animation can be designed to make them turn toward the player when the player gents near BEFORE they are examined. That seems more real to me than if they don't react UNTIL the player examines them.

Well I think the recognition animation is more poignant. But yeah, something is better than nothing, so if there is no other way to do what you want to do you do whatever you have to. I use monsters as NPCs too. Though I'd prefer the MDL was converted into a proper NPC at least. The one place where you could reasonably filter IDs as you describe would be if you had a MDL file that could be an NPC or an enemy. Then you could reassign the IDs in the file as SOM reads it into memory to make it "choose a side" at the last second (and you could develop a stand alone tool to convert the MDL file to one or the other)

Otherwise, there are cosmetic changes that I think would be worthwhile. Like having a "hit in the back" and "hit in the sides" animations. Then you could blend them so that the stun animation is omnidirectional. I intend to implement that. I think Verdite is eager to setup these animations for his models. But I think it will only work with a do_3d extension that basically tells SomEx.dll to use the Somplayer.dll emulation code to render all of the 3D elements of the game. At that point cosmetic fixes are pretty trivial to implement.

Beyond that, other than injuries, I can't think of any new combat animation IDs that would be useful off the top of my head (injuries would mean that there are two different versions of every ID so that each part of the monster is blended individually between the two animations according to its per part HP)
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:
7 Guest(s)