-
-
Notifications
You must be signed in to change notification settings - Fork 377
Bin file structure
Ihar Hubchyk edited this page May 7, 2020
·
27 revisions
This page contains incomplete information. Please inform us if you find something incorrect.
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) [uint8_t]
- Bytes 1 - 4 : x and y position of creature's eyes [int16_t]
- Bytes 5 - 116 : X-axis offset of frame for first 7 animation sections (16 values/bytes per section) [uint8_t]
- Byte 117 : number of idle animations (used for verification) [uint8_t]
- Bytes 118 - 137 : probabilities of choosing specific idle animation [float]
- Bytes 138 - 157 : intended delay (?) for each idle animation [uint32_t]
- Bytes 158 - 161 : delay between idle animations (?) [uint32_t]
- Bytes 162 - 165 : walking animation speed to move 1 hex, in ms [uint32_t]
- Bytes 166 - 169 : shooting animation speed, ms [uint32_t]
- Bytes 170 - 173 : flying animation speed, pixels per sec (?) [uint32_t]
- Bytes 174 - 185 : projectile start offset [x, y] for 3 directions [int16_t]
- Byte 186 : number of projectile animation sprites [uint8_t]
- Bytes 187 - 234 : 12 angles at which projectile sprite should be used [float]
- Bytes 235 - 242 : x and y position of creature's count box [int32_t]
- Bytes 243 - 276 : amount of frames per each animation frame section (34 values in total) [uint8_t]
- Bytes 277 - 820 : sequence of frame IDs for each animation section (34 sections). Only values which not equal to 0xFF are used in animation [uint8_t]
Animation frame sections:
- start flying
- static/selection frame (?)
- continuous movement or fly when a creature moves for long distance (?)
- stop movement
- some movement ???
- one cell full movement
- NOT IN USE (always empty)
- always frame ID 1
- idle animation 1
- idle animation 2
- idle animation 3
- idle animation 4
- idle animation 5
- death animation
- wince (got hit) start
- wince (got hit) end
- single cell attack from bottom
- ending single cell attack from bottom
- double cell attack from bottom
- ending double cell attack from bottom
- single cell attack in front
- ending single cell attack in front
- double cell attack in front
- ending double cell attack in front
- single cell attack from top
- ending single cell attack from top
- double cell attack from top
- ending double cell attack from top
- shoot from bottom
- ending shoot from bottom
- shoot in front
- ending shoot in front
- shoot from top
- ending shoot from top
X-axis offset for animations (all zeros for flying monsters):
- start movement
- static/selection frame (?)
- continuous movement or fly when a creature moves for long distance (?)
- stop movement
- some movement ???
- one cell full movement
Special thanks to idshibanov for providing missing info regarding file structure.