xm / fluorescence

Automatically exported from code.google.com/p/fluorescence
GNU General Public License v3.0
0 stars 0 forks source link

Animation reading #17

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Again in defaultConfig.xml description of anim3.mul are wrong. The simplest way 
is to use default 200 High-detail and then 200 Low-detail animations, but it's 
also uncorrect (but it will really work for 97% numbers of animation). I can't 
understand how OSI read it, the only way to correct read it is:
1) reading 100 Low-detail animation with Number from 0 to 99 begining from 
animation with index 9000, so the turkey low detail ainamation will have number 
95.
2) reading 100 High-detail animations with Numbers from 300 to 399 begining 
from animation with index 19500, so monsters animation will have numbers 300-319
3) reading up to the end of file Equipment animations with numbers from 400 to 
941 begining from animation with index 35000.

Yes it's sounds like nonsense, but it will really work. Also I suspect that 
anim5.mul has some Equipment animation befor index 35000. With all this 
problems I sugesting for adding table desciption for animation (it will be more 
easy to change format to anything), smth like this:

<anim>
  <animation type="High" offset="0" id="0" length="200" />
  <animation type="Low" offset="22000" id="200" length="200" />
  <animation type="Equip" offset="35000" id="400" length="649" />
</anim>
<anim2>
  <animation type="High" offset="0" id="0" length="200" />
  <animation type="Low" offset="22000" id="200" length="6" />
</anim2>
<anim3>
  <animation type="Low" offset="9000" id="0" length="100" />
  <animation type="High" offset="19500" id="300" length="100" />
  <animation type="Equip" offset="35000" id="400" length="541" />
</anim3>
<anim4>
  <animation type="High" offset="0" id="0" length="200" />
  <animation type="Low" offset="22000" id="200" length="200" />
  <animation type="Equip" offset="35000" id="400" length="283" />
</anim4>
<anim5>
  <animation type="High" offset="0" id="0" length="199" />
  <animation type="Low" offset="22000" id="200" length="399" />
  <animation type="Equip" offset="35000" id="400" length="252" />
</anim5>

PS Low animation have 13 actions, High - 22, Equipment - 35. offset is 
Animation offset, for byte offset in anim#.idx file it will be = offset*12;

Original issue reported on code.google.com by staticz@uoquint.ru on 24 Jul 2012 at 8:43

GoogleCodeExporter commented 9 years ago
Also it's good idea to describe special body such as 400,401,402,403, 
605,606,607,608, 666,667,694,695. It will be helpful for shards wich wanted to 
use new races and bodyies for plyers or want to move them (for example we are 
planed to move all them to 1000-1010 for 5 races and delete all ghosted anim)

Original comment by staticz@uoquint.ru on 24 Jul 2012 at 1:43

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
oops I'm wrong offыet for high animation in anim3 is 33000 not 19500, and 
length 20, soo 
<anim3>
  <animation type="Low" offset="9000" id="0" length="200" />
  <animation type="High" offset="22000" id="200" length="200" />
  <animation type="Equip" offset="35000" id="400" length="541" />
</anim3>
Yea it's strange... However, it's look more plausibly than your or fiddler  
version.

Original comment by staticz@uoquint.ru on 24 Jul 2012 at 2:41

GoogleCodeExporter commented 9 years ago
I just used the numbers from another project, but never really tested them :) 
Did you check the code used by Ultima XNA? 
http://code.google.com/p/ultimaxna/source/browse/trunk/UltimaXNA/UltimaXNA/Data/
Animations.cs line 559 and following. They use slightly different numbers. 

Also, I'm not sure what you mean with the special body ids. There is the 
data/paperdoll.def file, that is currently used to translate a body ID to a 
gump ID. Do you need something else configurable?

Original comment by spin@fluorescence-client.org on 29 Jul 2012 at 4:45

GoogleCodeExporter commented 9 years ago
The XNA is not good project to look answer. It's fully based on code from RunUO 
and Fiddler that is based on UltimaSDK project. As I say they used numbers 
which works fine with 97% of animations, but it cause problems if you wil try 
to load for example turkey anumation (Your variant is incorrect and it willnot 
work at all). I wrote numbers that will work with animations wich was added by 
OSI but I don't know how do they read them... And i think nobody can answer, 
soo it's good idea to make such universal format description of file format.

Special body ID are special bodies )) for example if you set body of yoursef to 
402 (human male ghost body) client will draw scene in gray scale. Also it 
change paperdrols with common bodies (this is ok).

Original comment by staticz@uoquint.ru on 29 Jul 2012 at 5:00