Skip to content

Bin file structure

Ihar Hubchyk edited this page Feb 4, 2020 · 27 revisions

AGG file is an archive which contains multiple files. Bin files contain information related to displaying images (sprites) on screen.

Monster/creature animation bin file starts from short name of the creature ending by frm. For example, goblnfrm.bin. The file name length is 12 characters. The size of this file is always 821 bytes.

Creature animation frames are divided by sections. Each section could have up to 16 frames.

  • Byte 0 : always 0x01 (magic value?)
  • Bytes 1 - 3 : some creature related info ?
  • Byte 4 : always 0xFF
  • Bytes 7 - 116 : X-axis offset of frame for first 7 animation sections (16 values/bytes per section)
  • Bytes 117 - 136 : ???
  • Bytes 137 - 152 : 4 bytes (unsigned int) values of frame frequency in ms (???). Eg. 350, 1000, 750.
  • Bytes 153 - 243 : ???
  • Bytes 244 - 276 : amount of frames per each animation frame section (34 values in total)
  • Bytes 277 - 820 : sequence of frame IDs for each animation section (34 sections). Only values which not equal to 0xFF are used in animation

Animation frame sections:

  1. start flying
  2. static/selection frame (?)
  3. continuous movement or fly when a creature moves for long distance (?)
  4. stop movement
  5. some movement ???
  6. one cell full movement
  7. NOT IN USE (always empty)
  8. always frame ID 1
  9. idle animation 1
  10. idle animation 2
  11. idle animation 3
  12. idle animation 4
  13. idle animation 5
  14. death animation
  15. got hit start
  16. got hit end
  17. single cell attack from bottom
  18. ending single cell attack from bottom
  19. double cell attack from bottom
  20. ending double cell attack from bottom
  21. single cell attack in front
  22. ending single cell attack in front
  23. double cell attack in front
  24. ending double cell attack in front
  25. single cell attack from top
  26. ending single cell attack from top
  27. double cell attack from top
  28. ending double cell attack from top
  29. shoot from bottom
  30. ending shoot from bottom
  31. shoot in front
  32. ending shoot in front
  33. shoot from top
  34. ending shoot from top