animdata.d2 and in-game animation speed doesn't match
Moderator: Nizari
animdata.d2 and in-game animation speed doesn't match
Hello!
I'm trying to calculate actual frame rates of cof animations.
Animation speed of objects (FrameDel from objects.txt), monsters NU are ok and looks similar to diablo 2.
BUT some animations, mostly it's run or walk are definitely too fast, almost twice as faster then in diablo 2.
Some of the most evident examples are: BARN1SS.cof, GCWLHTH.cof.
Also I've tried Dr.Tester (version 0.20l) and get the same results.
What game logic I'm missing? May be it's somehow affected by current character speed (however barbarian town animations speed is fine)?
I'm trying to calculate actual frame rates of cof animations.
Animation speed of objects (FrameDel from objects.txt), monsters NU are ok and looks similar to diablo 2.
BUT some animations, mostly it's run or walk are definitely too fast, almost twice as faster then in diablo 2.
Some of the most evident examples are: BARN1SS.cof, GCWLHTH.cof.
Also I've tried Dr.Tester (version 0.20l) and get the same results.
What game logic I'm missing? May be it's somehow affected by current character speed (however barbarian town animations speed is fine)?
Diablo 2 reimplementation on Unity https://github.com/mofr/Diablerie
Re: animdata.d2 and in-game animation speed doesn't match
Did you tried to lower them in Animdata.d2?
That should work.
That should work.
Re: animdata.d2 and in-game animation speed doesn't match
Eimernase, I'm didn't mention that I'm using fully original diablo 2 resources without any modifications. And trying to find out how the game actually calculates animation speed.
Currently what I see that some of the animdata.d2 values are used as it is, but others are definitely modified/multiplied by the game.
I need it for my diablo 2 clone game implementation.
Currently what I see that some of the animdata.d2 values are used as it is, but others are definitely modified/multiplied by the game.
I need it for my diablo 2 clone game implementation.
Diablo 2 reimplementation on Unity https://github.com/mofr/Diablerie
Re: animdata.d2 and in-game animation speed doesn't match
Mabey look in Monstats.txt for Velocitiy.
That controls also the walk speed (run too, but only if there is a RN-Animation)
That controls also the walk speed (run too, but only if there is a RN-Animation)
Re: animdata.d2 and in-game animation speed doesn't match
Monstats.txt contains creature speed in tiles per second. In my particular case, Kashya moving with 3 cells per second speed around the world, and i'm pretty happy with this value. However her legs are jiggling so fast
According to the animdata.d2, Kashya in WL-mode should be animated at 25 fps (speed value is 256 for RCWLHTH.cof).
But visually it's not correct, my personal feeling is that in diablo 2 real animation speed is around 128. Same story for barbarian and others.
According to the animdata.d2, Kashya in WL-mode should be animated at 25 fps (speed value is 256 for RCWLHTH.cof).
But visually it's not correct, my personal feeling is that in diablo 2 real animation speed is around 128. Same story for barbarian and others.
Diablo 2 reimplementation on Unity https://github.com/mofr/Diablerie
Re: animdata.d2 and in-game animation speed doesn't match
In order to show what I'm talking about:
Look at the paladin run animation speed. All creatures here animated at animdata.d2 speed.
Sorry for such a short video, I can record a longer one later.
Look at the paladin run animation speed. All creatures here animated at animdata.d2 speed.
Sorry for such a short video, I can record a longer one later.
Diablo 2 reimplementation on Unity https://github.com/mofr/Diablerie
- devurandom
- Angel
- Posts: 897
- Joined: Sat Mar 07, 2015 9:07 pm
Re: animdata.d2 and in-game animation speed doesn't match
seems like its supposed to be 25 FPS in singleplayer mode, and variable framerate in multiplayer mode > ~2000 FPS
diablo II ingame command
/fps
diablo II ingame command
/fps
Assembly Reference | 1.13d Code Edits | UVLoD | BaseMod Plugin
Fiat paper money is the most elaborate and well devised form of slavery the world has ever seen..
Fiat paper money is the most elaborate and well devised form of slavery the world has ever seen..
Re: animdata.d2 and in-game animation speed doesn't match
Sorry, I didn't understand. I'm talking about character animation speed. Not the whole game frame rate.
My goal is to find exact animation frame duration calculation formula.
Let's assume BANU1SS.cof file, looking into the animdata.d2 hashmap tells that animation speed is 96 (in 25 / 256th of fps). The barbarian neutral mode animation speed is 96 * 25 / 256 = 9.375 frames per second. And it looks really nice, not too fast, not too slow.
Ok, let's take BARN1SS.cof, animdata.d2 speed is 216, which results in 21 FPS, and it looks way TOO fast. Note that both animations are 8-frames-length.
So, I think that original game have a bit more complex animation speed calculation based on animdata.d2 values. Mostly it is ok, however some RN (and may be some other modes) animations are definitely too fast if use them as it is.
Sorry for not being able to disassemble the game by myself, I hope that someone already knows the answer.
My goal is to find exact animation frame duration calculation formula.
Let's assume BANU1SS.cof file, looking into the animdata.d2 hashmap tells that animation speed is 96 (in 25 / 256th of fps). The barbarian neutral mode animation speed is 96 * 25 / 256 = 9.375 frames per second. And it looks really nice, not too fast, not too slow.
Ok, let's take BARN1SS.cof, animdata.d2 speed is 216, which results in 21 FPS, and it looks way TOO fast. Note that both animations are 8-frames-length.
So, I think that original game have a bit more complex animation speed calculation based on animdata.d2 values. Mostly it is ok, however some RN (and may be some other modes) animations are definitely too fast if use them as it is.
Sorry for not being able to disassemble the game by myself, I hope that someone already knows the answer.
Diablo 2 reimplementation on Unity https://github.com/mofr/Diablerie
Re: animdata.d2 and in-game animation speed doesn't match
I'm sure there isnt any other place for formula that handle unit-animationspeed outside of animdata or velocity in monstats.