Looking for info on PRF/CP file info for animated models . . .

#1
I'm trying to get the MDL importer tools to work and I've gotten an animated x file to convert to MDL and retain its animation, but SoM can't seem to access the animation in-game. I'm trying to figure out why.

I know Madison has done a lot of work on MDL CP/PRF files and I wonder if he or anyone has a breakdown on what locations in the files control. Anything like '$0e-0f control speed' would save me a lot of time. :)


Moved here
Reply

#2
ML and I were getting into that a while back but I dont know if he followed into it much.

I figured the easiest way to start picking apart the cp file is to compare the cp file of two similar, and very simple animated files, such as a treasure chest and a door...each would have a very minimum number of animations.

John if you would like me to, i would be willing to try to pick apart the parts of the cp file on a couple different npcs and figuring out which are definitely controlling things like speed etc.
- Todd DuFore (DMPDesign)
Site Founder
Reply

#3
I can tell you one thing the prf has nothing really to do with the animations at all, all it will do is tell the cp file when to fire certain animations.

Toward the end of the npc/enemy prf are the situational commands for when the character should be 'idle', 'walk', 'attack', 'get hurt', 'death' etc.

It basically just says if in SOM something happens play the corresponding animation...so there must be some sort of labelled triggers that SOM uses across all its mdls...meaning that it doesnt just say play animation 1,2,3 or so on, they are destinctly labeled with a name, like idle, walk, death and so on.

the .cp file itself interprets this and says 'idle' animation is equivalent to animation sequence 1, and we will play that animation at x speed for x seconds.

I need to get you more info i know, but i thought id at least start by saying you wont need to understand that prf file to get the animation working, just the cp file.
- Todd DuFore (DMPDesign)
Site Founder
Reply

#4
I've mostly worked with non-MDL PRFs so far and I have quite a bit of info so you don't need to bother with them. but a PRF analysis for animated MDL type parts would be the most useful if you want to tackle it.

PRFs seem pretty straight forward, but we'll have to get their format nailed down if we ever hope to import MDLs.

Here's what I have in my old notes about Enemy PRFs. I'll add any info you can figure out.

Enemies:
$61 = toggle 'Trigger' setting - 00= disable, 01= allow
$6e-6f = collision data (00 40 is decent size)
Reply

#5
All of the sounds that correspond to animations of the enemy are also located at the end of the .prf files...so in the last few sections you will have the animation label (such as idle) and a sound effect associated with it. ‎  Modifying the sound is how I was able to make the different ambient sounds in Dark Destiny, such as the ocean waves crashing, the sound of rushing water at the waterfall etc. ‎  I took the termite enemy, which repeats its idle sound effect ALOT (I needed something noisy and consistent) and replaced the scratchy bug noise with ocean wave noise and it worked perfectly once i gave it a blank texture, reduced its size to .1 and made it non reactive and unkillable (and under the ground).

Unlike King's Field which seemed to have the idle sound effects completely random as to how often they play, the sounds for the animations in SOM are directly tied to the animation repeat timer. ‎  In other words, if the termite idle animation is set to repeat once every 3 seconds, the sound effect plays once every 3 seconds with the reset of the idle animation...so somewhere in the prf it sets the repeat factor of animation sets for the idle (so likely if we look at the section of animations at the end of the prf, you will find one of them with extra information as I am fairly certain only the idle animation would have a 'repeat' factor where as the others, such as attack, death, turn etc would be a one time trigger per use).

Im gonna ping Madison and try to work on parsing the information for a simple enemy mdl, I will find one with very few actions, an enemy without magic animations etc and that should be the easiest start point.
- Todd DuFore (DMPDesign)
Site Founder
Reply

#6
Sounds like a good place to start. You might also try comparing Enemies who share similar traits and look for identical spots in their PRFs.

One 'heads up', some of the original PRFs had had the Enemy's name etc. shortened (by From) and they just left the extra text there. For Example say From named an enemy 'minotaur' then changed its name to 'Bull', you'll see "Bull[$00]aur" in the PRF - the text is Japanese of course. ‎  It makes it look like there's significant data in a location when it's really just an unused scrap of old data.
Reply

#7
Added a little info to top post.
Reply

#8
Just like to ask, what hex editor are you using?
Reply





Users browsing this thread:
1 Guest(s)