Advertisement
sewer56lol

Shadow MTP Struct | May Update Soon

Apr 7th, 2017
366
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. ## Shadow The Hedgehog
  2. ## .MTP, "MotionPackage"?
  3. ## Struct detail by Sewer56lol
  4.  
  5. >> HEADER <<
  6. Unknown #1 (Activator?) | 2 bytes
  7. Animation Count | 2 bytes
  8. Unknown #2 (Activator?) | 2 bytes
  9. Padding | 0xA bytes
  10.  
  11. >> DATA INFO/OFFSET TABLE (Starting at 0x10), This repeats for Animation Count Entries <<
  12.  
  13. Unknown #3 (Potentially Important) | 4 Bytes(edited)
  14. Animation Name Offset | 4 Bytes
  15. Animation Size Offset | 4 Bytes
  16.  
  17. >> ANIMATION ENTRY (FROM OFFSET) <<
  18. Animation Start | 0x0
  19. Animation Size | 0x8, 4 Bytes (necessary for extraction, length of .anm)
  20.  
  21. >> ANIMATION NAME ENTRY (FROM OFFSET) <<
  22. Object Name (no extension) | String, Variable Length, Delimited/Finished by \x00
  23.  
  24. ----------------
  25. Note:
  26.  
  27. Unknown #3 is an offset leads to a set of values.
  28. It appears to be some sort of set of properties, which are always almost the same.
  29. The entries are two 4 Byte values.
  30. Separated by 0x8 Bytes.
  31. Not all animations have an entry for this.
  32.  
  33. First Value always seems to lead to the first animation name offset.
  34. This is 0x20;
  35.  
  36. Second Value seems to lead to an unknown section, which may contain data.
  37. This is immediately after the last file;
  38. This section always ends with "FF";
  39. This is typically 276 Bytes long from Normal, sometimes shorter and sometimes nonexistant;
  40. I believe to do with control/following of the 2P (or "2nd controller") character.
  41.  
  42. ///---
  43. But Maria has 84 Bytes... And 41 40 where Sonic 40 40
  44. And Charmy Doesn't even have this section...
  45. ///---
  46.  
  47. Second value has typical diffs between chars:
  48. Base Difference: 0x38 + Every 0x60 | Short
  49. Example:
  50. Sonic | 40 00
  51. Amy | 3F 80
  52. Knux | 40 80
  53. Maria | N/A Short section.
  54. Bee | Doesn't even have this.
  55.  
  56. Third Values (99% Time): 00 01 00 04 00 00 FF FF
  57. ----------------
  58.  
  59. This should be enough to write an unpacker/repacker, which is what I'm doing this very moment.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement