NPC animation strategy

#17
That's a dusty memory, but I'll try! If you go to "view > byte group size > 4" in HxD, it should look more like my picture and it will make understanding the PRFs much easier.

The sound effect and FX charts have "fixed" locations (aka always the same) in the PRF file starting at 0x134. I think the top chart (see picture) is for sounds, the bottom one is for FX. Each slot in a chart is 4 bytes long, but the values written in them will differ depending on how many sounds/FXs the model uses.

The empty "slots" are the 4-byte-long areas in the above picture that are not labeled. ‎  The reason they have data in them (0x00003402 etc) is because Fromsoft's PRF making tool just continues writing the last-used value in each slot until it reaches another active slot. ‎  You'll notice that the chart's slots correspond to the SoM animation number for each action (Slot0=animation 0 (Idle), Slot1= animation 1 (Walk), Slot2=Empty, Slot3=Empty, Slot4= animation 4 (Dying) etc.

A slot's format is as follows:
First 2 bytes = number of sounds/FX used for current animation.
Last 2 bytes = start location of animation's sounds/FX definiton (written backwards: 34 02= 0234 in PRF)
Note that many PRFs have odd junk data written in unused areas like the "FF003402" in the third slot in the picture. The 00FF would normally signify 256 sounds used for this animation, but the model doesn't have an "animation #2" (aka 3rd slot) so this value is never ever read by the game.

These slots just hold the info for the sounds/FX, not the animation itself. But their existence may mean that non-standard animation numbers (ie 2, 3, 5, 8, 13, 14, 18, 19, 21-30) might be triggered in game if they exist in the model. It's fairly common for SoM to have built in features that aren't used by the default model set.

If you want to see, just make a model with animations numbered for the unused slots and see if you can do anything to trigger them in game. That's assuming x2mdl actually processes those non-standard animations correctly.

Does that make sense...bet you're sorry you asked! ‎  Drool
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:
5 Guest(s)