A slickproductions.org /forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=printpage;topic=1991.0 e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index385c.html slickproductions.org /forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=1991.0 e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index385c.html.z x 5g^ Ћ h OK text/html ISO-8859-1 gzip @ h Tue, 10 Mar 2020 06:54:03 GMT 0 0 P 5g^ . h
byte 0: xxxxxxxx - low 8 bits of subtile index
byte 1: VHxxxxxx - V = vertical flip, H = horizontal flip,
The other bits are the top 6 bits of subtile index
(page 0): Spr 0 TL, Spr 0 TR, Spr 1 TL, Spr 1 TR, ... Spr 7 TL, Spr 7 TR
Spr 0 BL, Spr 0 BR, Spr 1 BL, Spr 1 BR, ... Spr 7 BL, Spr 7 BR
(page 1): Spr 8 TL, Spr 8 TR ... Spr F TL, Spr F TR
Spr 8 BL, Spr 8 BR ... Spr F BL, Spr F BR
...
byte 0: xxxxyyyy
xxxx = size code, sometimes overrides position too. See "Size Codes" below.
yyyy = additional loop count (0 = one time through, 1 = two times through)
byte 1: Mvvssiii
M = If set, tells it to never mirror the animation.
Normally the animation is mirrored if on the right side of the screen
like targetting the party in a normal battle, or monsters when back attacked.
vv = vertical alignment code.
00: centered on target (e.g. Ice-2, many others)
01: bottom of anim aligned to bottom of target (e.g. Fire1, Ice-3)
10: center of anim at top of target? (only used by Charm?)
11: bottom of anim at top of target? (only used by Float?)
ss = Speed code.
Technically looked up in a table at 0D:FFD9, but corresponds to:
00: Slowest. 8 screen frames per animation frame (7.5 fps)
01: 4 screen frames per animation frame (15 fps)
10: 2 screen frames per animation frame (30 fps)
11: 1 screen frame per animation frame (60 fps)
iii= High bits used later to index frame data (See below).
byte 2 and beyond are byte code for the animation, terminating with an FF.
Bit pattern meanings:
0xxxxxxx Frame number iiixxxxxxx, where iii is from the header byte above.
A frame of sprites will be presented (details below), and
then a pause will occur according to the speed code.
All other bytes from here below are executed without pausing
until a frame is encountered.
10001000 (88 hex) Special command. The NEXT byte is a parameter. See below.
1xxx0yyy Shift entire animation xxx direction by (yyy + 1) pixels.
Several are often used in a row to move amounts greater than 8 pixels.
xxx = direction:
000 down, left
001 down
010 down, right
011 left
100 right
101 up, left
110 up
111 up, right
This may be visually more understandable:
5 6 7
3 4
0 1 2
Example: F7 moves up and right 8 pixels. Eight F7's in a
row move up and right 64 pixels (see Ice-1)
1xxx1?yy Enable palette effects on target monster or character.
xxx = Palette. Add 28 (hex) to get final palette index to use.
? = Game checks this, but I believe there is a bug which
means it would never occur...
yy = Speed/Type of palette effect.
00: change palette and hold constant (e.g. stone anims)
01: fast toggle between new palette and normal
10: slow toggle between new palette and normal
11: cycle/rotate the specified palette (e.g. Ice-1, many)
Example: CB used by Ice-1 enables a rapid palette rotation
of a bluish palette.
bgr?0mmm Enable background and monster color effects.
Enables a complex effect that can also be controlled by
the master routine. The background and all monsters are
affected by this. I believe the specified color is
effectively "added" to the BG and monsters with an alpha
which is modulated over time depending on the mode parameter.
bgr = Sets which color channels to use at full intensity.
Example: 100 is blue, 011 is yellow, 000 I think is valid for black.
? = unused
mmm = Mode. The amount of the effect changes over time according to this.
000: Off. Disables a previous effect.
001: Toggle every other screen frame. (e.g. rapid red flashes)
010: Triangle wave. Starts at 100% and reduces to 0%, then
back up to 100%, down to 0%, and so on.
011: Flash for exactly 1 frame, then disables itself.
100: Increase from 0% to 100% and hold.
101: Decrease from 100% to 0% and hold (may actually disable, same thing)
110: Same as 010 I think, but there may be a
difference I haven't discovered.
111: (unknown)
pppp1sss Enable / Disable palette toggling for the sprite animation itself.
Used by, for example, Cure1 to toggle between a bluish and greenish palette.
pppp = Index of palette pairs.
Looked up at ROM B81C6. 2 bytes per entry: the two palette indices to toggle.
Interestingly, the second one is applied first.
sss = Speed code.
Technically looked up in a table at 03:F678 (ROM 1F878), but corresponds to:
000: slowest. toggle every 128 frames
001: toggle every 64 frames
010: toggle every 32 frames
011: toggle every 16 frames
100: toggle every 8 frames
101: toggle every 4 frames
110: toggle every 2 frames
111: toggle every frame
The table values are actually: {7F, 3F, 1F, 0F, 07, 03, 01, 00}
code position (left side) position (right side) Example
---- --------- --------- -------------
3: (60, 44) (D8, 44) Quake
4: (60, 44) same as left, or N/A Blitz, Wave, FireBomb
5: (80, 44) same as left, or N/A Indra
D: (60, 44) (D8, 44) Blaze, Fire
E: (60, 44) (D8, 44) ?
* all numbers above in hex
RVHxxxxx
R - If set, this is repeated. The following byte indicates how many times to repeat.
V - vertical flip
H - horizontal flip
x - the sprite index, relative to the sprite page as described above.
When this value is 1F (all 5 bits on), then it is an empty slot
instead of a sprite. Empty slots can repeat too.
$F2A0: modifies how the animation sprites are positioned.
00: None
Used by most.
01: Unknown
02: Random
At start of each loop, each sprite slot gets a random offset in the range -6..+9
Used by Venom, Sleep, Digest, Nuke, White, Crystal...
Specifically used by master routines: 02, 21, 25 (all hex)
03: Totally custom tables of offsets and random additions,
Used only by Fire3 (master routine 23 hex)
04: The inward circles of Cure4 (master routine 29 hex)
$F2D0: some global effects? I only know these:
01: Used by Quake (and friends) to shake monsters
02: ??
03: ??
04: used by Comet, Meteo to ??
05: used by Stone, Beak, Petrify to ??
06: Used by Bomb to override the global position.
07: Used by Big Bang to ??
This is pretty fantastic information, yet can you give an example or two of how these correspond to the Sprite/Sequence/Effects portion of a Spells data? Maybe it's plainly there, but when it comes to graphics I'm not that bright.
67600: 20 00 21 00 22 00 23 00 24 00 25 00 26 00 27 00
67610: 28 00 29 00 2A 00 2B 00 2C 00 2D 00 2E 00 2F 00
....
For all the details in the bit meanings, look at the original posts. I'll just show the ultra basics here. The first entry (20 00) has neither H nor V flip bits, and has subtile index 20. If you look at that same attachment, and count each 8x8 subtile left-to-right, you will see that 20 (hex) is the top-left corner of the smaller heart in the second row. Somewhere in that second row, the left and right sides of that image start to diverge, and it's actually where Ice-1's frosty sprite in the middle of that second row start to use previous graphics and H and/or V flip them.62 30 CB F7 F7 F7 F7 F7 F7 F7 F7 4F 87 87 87 87 50 87 87 87 87 51 4F 50 FF
The first two are headers as described above, broken down as:62 - header byte 0
broken down by nibbles:
6: size code 6. Look that up in the table specified before, this is a 4x4 animation with no special position.
2: total loops are 2+1, or 3.
30 - header byte 1
broken down in more complex bit groups:
M vv ss iii
0 01 10 000 (30)
M (0): normal mirroring, so it is mirrored when cast against players
vv(01): bottom alignment. hard to see for this example spell, but it is bottom-aligned on the target.
ss(10): animation speed (looked up in table) this runs at half the 60hz screen frame rate
iii(000): high 3 bits for frame, used below.
CB = 11001011, matches the pattern:
1xxx1?yy which enables palette effects on the target monster/player.
The palette is x + 28, so 2C which is shades of blue.
The type of effect (y) is 11 (binary) which is a rapid rotation.
Watch Ice-1 being cast on a monster, and their palette goes nuts
with blues and whites. This is why.
F7
F7
F7
F7
F7
F7
F7
F7
Each F7 is:
11110111, which matches the pattern:
1xxx0yyy which moves the animation.
The direction is specified by x, which is up-right in this case.
The amount to move is y + 1 pixels, so 8 pixels.
Because there are 8 of these, it results in 8 x 8 or 64 pixels up and right.
Because we haven't even displayed any sprites yet, the FIRST frame
will be up and to the right of the target... which Ice-1 does if you watch it.
4F
Hey this is a frame, because the top bit isn't on.
It will look up frame 4F and put sprites on the screen.
87
87
87
87
Like F7, 87 moves the animation
10000111, pattern:
1xxx0yyy
Each 87 moves it down and to the left 7+1=8 pixels,
so the four of them move it a total of 32 pixels down and left.
50
Another frame, becaue the top bit is not on.
Then we display frame 50.
87
87
87
87
Move down and left 32 pixels again.
51 Frame 51
4F Frame 4F
50 Frame 50
9F 02 10 03 1F 10 23 24 1F 03 30 1F 03 1F 10 1F
(row 1)
9F 02 - 2 blank slots
10 - sprite 10
03 - sprite 3
(row 2)
1F - blank slot
10 - sprite 10
23 - sprite 3, horizontally flipped
24 - sprite 4, horizontally flipped
and so on..
Refer to the original post that describes the RLE compression and bit meanings.--XX
-XXX
-XX-
X-X-
See the attached image where I hastily scribbled a grid over the first frame of Ice-1's animation, and you can see the pattern of X's above in it, not to mention the palette effect that is setup by that CB byte in the animation byte code sequence, AND the fact that it is 64 pixels up and to the right of the target.Question for ya, avalanche... Is there any empty space in any of those data banks to create new spell animations without overwriting the existing ones?