User Tools

Site Tools


openomf:animation_string

Animation string

Basic format

Animation strings are of the form:

<frame descriptor 1>-<frame descriptor 2>-...-<frame descriptor n>

Frame descriptors are a sequence of lowercase tags followed by an uppercase frame letter and an integer frame duration:

zzA1

For instance:

x-5A3-x-3B2-x-2C1-x-1D1

divides up as:

Tags Frame Duration
x-5 A 3
x-3 B 2
x-2 C 1
x-1 D 1

Tags

There are a lot of available tags. Not all of them are understood. Some of them take numeric parameters, which are indicated in angle brackets below. Such parameters must match the regular expression:

-?+\?[0-9]*

An omitted parameter is treated as 0.

Here's a complete list of all tags. Descriptions in italics may be unreliable.

A-

Tag Notes
aa
ab
ac Turn HAR towards the center of the arena
ad
ae Never used?
af Freeze opponent HAR for some time
ag
ai
am with the enemy modifier, 'ame' is related to the bm tag and tells OMF when to stop walking
ao Nova death related, something to do with loose robot parts ?
as Makes the fire orb 'wander' in the fire pit
at Set the object's position be be 'behind' the HAR only used by chronos' teleport
aw Can pass through walls during this frame?
ax
ar Reverse player direction?
al Never used?

B-

Tag Notes
b<…> The b codes control the rendering method used for the sprite. A variable b is set to a visibility level, and is linearly interpolated throughout the frame from the bs value to the bf value, if the bs value has been specified and is not zero. Otherwise the b value is set to the bf value.
b = bs ? (bs + (bf - bs) * tick / ticksThisFrame) : bf
The bf value is set by the tags bb, bf, bj, bl, bm. These tags all also set some bflags which control the rendering effect.
b1
b2
bb<n> Vertical screen shake with magnitude n
be Block the end of the round, used in scrap/destruct
bf<n> Blend finish with opacity n < 256
bh
bl<n> Horizontal screen shake with magnitude n
bm<n> Animation to play while doing something (walking to har for scrap is bm10)
bj<n> Jump to animation <n>
bs<n> Blend start with opacity n < 256 (the sprite is drawn at this opacity at the start of the frame and gradually transitioned to whatever is set as the blend finish value)
bu Jump to the middle of arena, used by Jaguar
bw
bx
bp<…> The bp codes control scene and entity lighting and colouring. A variable bp is set to a colour level, and is linearly interpolated throughout the frame from the bpb value to the bpp value. The bpd tag specifies a reference colour (r,g,b) by palette index.
 bp = bpb + (bpp - bpb) * tick / ticksThisFrame 
 for i = bps to bps + bpn:
 if bz:
   m = max(r_i, g_i, b_i)
   r_i' = r_i + m/64 * bp/64 * (r - r_i*)
   g_i' = g_i + m/64 * bp/64 * (g - g_i*)
   b_i' = b_i + m/64 * bp/64 * (b - b_i*)
 else:
   r_i' = r * bp/64
   g_i' = g_i * (1 - bp/64) + g * bp/64
   b_i' = b_i * (1 - bp/64) + b * bp/64

 r_i = max(0, min(63, r_i'))
 g_i = max(0, min(63, g_i'))
 b_i = max(0, min(63, b_i'))
 
In the above, r_i* is the original (unmodified) value.
bpd<n> bpd := n Specifies a colour (reference palette index)
bps<n> bps := n Starting palette index
bpn<n> bpn := n Palette entry count
bpf Blend Palette Fighter: If this is the HAR for player 2 then bps48 bpn48 (second robot's colours) else bps1 bpn47 (first robot's colours)
bpp<n> bpb := n, bpp := n Set both initial and final colour level.
bpb<n> bpb := n Initial colour level for blending. Specify bpp first.
bpo bpo := 1 Disables palette effects. Only used in CREDITS.BK.
bz If specified, a colour tint effect will be used, otherwise a green-blue lightning effect will be used.
ba<n> Only used by CREDITS.BK
bc<n> Only used by CREDITS.BK
bd Only used by CREDITS.BK
bg Only used by CREDITS.BK
bi<n> Only used by CREDITS.BK
bk<n> crashes if not in arena?
bn Unblockable. Used in Flail's Spinning Throw, Shadow's Shadow Grab, and Nova's Earthquake Smash
bo<n>
br Draw additively
bt Dark tint effect for eg. Shadow HAR
by

C-

Tag Notes
cf Used by Shadow's scrap (AF1:61) Makes shadow walk to the far corner of arena - used with bm tag
cg Used by Katana's rising blade (normal and extended) (AF5:22,23)
cl Used by Pyros' scrap (both parts) (AF3:35,38)
cp resources/tags.csv:“cp”,0,“If hit collision succeeds, perform hit pause” Basic testing: enables hit pause on hit, doesn't stack.
cw Used by Flail's charging moves (charge punch, strong punch, scrap 2) (AF7:33,35,36)
cx<n> The player has horizontal control by holding left/right. Larger numbers mean faster movement. Used by:
 Jaguar's Concussion Cannon (AF0:38)
 Thorn's off-wall attack (AF2:39)
 Electra's Ball Lightning (AF4:33)
 Katana's razor spins (AF5:25,26,27,28)
 Flail's chain spins (AF7:31,39)
 Gargoyle standing pose and diving claw grab (AF8:1,35)
 Chronos' Stasis Activator (AF9:38,39)
cy<n> The player has vertical control by holding up/down. Larger numbers mean faster movement.

D-I

Tag Notes
d<n> Jump back into the animation as if N 'ticks' have already occured, for example, d1 will jump back to the start of the animation, but d200 will jump into the animation at whatever point the animation would be 200 ticks after it had started.
e Set X and Y coordinates to same as enemy coords. Applied every tick.
f Toggle flag Flip sprite vertically
g Set object Y coordinate to ground and zero out vertical velocity. Applied every tick.
h Zeroes out velocity for the frame. Applied every tick.
i

J-

Tag Notes
j<…> J tags define which moves can 'chain' to which other moves. jf moves appear to chain to your scrap move (f=finisher here). It is unknown whether jn<n> is part of this block of tags or a separate tag.
jf2 Frame can chain to destruction
jf Frame can chain to scrap
jg Every HAR uses this in the 'getup' animation, purpose unknown, might be 'grab' (like standing throw)
jh Frame can chain to a 'high' move, eg. roundhouse kick
jj Frame can chain into an 'airborne' move (only used by katana's razor spin)
jl Frame can chain to a 'low' move eg. crouching kick
jm Frame can chain to a 'medium' move eg. crouching punch
jp
jz Combination of all other j flags except jn. Only used by (AF5:35).
jn<n> Frame can chain to animation <n>

K-L

Tag Notes
k<n> Related to knockback on hit, at least in footer strings
l<n> The volume of the sound. The range of n is 0 to 100 (0 effectively mutes the sound, no differences above 100)

M-O

Tag Notes
ma<n> Sets angle of new object in degrees. Velocity is then x=cos(ma), y=sin(ma). if n == 1000 then n := random(360)
mc
md<n> Destroy animation n
mg<n> Gravity for the spawned animation, default is apparently 0.
mi<n>
mm<n> Selects an animation ID for use with mo, mu tags. Animation must exist, otherwise undefined behaviour. MM must be set before using mo, mu. It is possible to chain these, eg. mm15momm22mu5 etc.
mo Enables some flag on animation selected with MM. Possibly used on other HAR ?
mu<n> Sets animation MM unavailable for use for the next <n> ticks. N < 1024.
mn<n>
mp<n> Bitmask (1 byte). Affects at least how mn tag is handled.
0x1  Unknown
0x2  Unknown
0x4  Somehow refers to HAR 1
0x8  Unknown
0x10 Somehow refers to HAR 2
0x20 Flip X axis operations
0x40 Unknown
0x80 Unknown
mrx<n> mx := random(320 - 2*mm) + n – Randomizes X coordinate of the new animation.
mry<n> my := random(200 - 2*mm) + n – Randomizes Y coordinate of the new animation.
ms my := -4 * (y - 188), Used to fix bullet hit animation coordinates for desert arena.
mx<n> Set X coordinate of new animation
my<n> Set Y coordinate of new animation
m<n> Create instance of animation n
n Disabled hit coordinates for the current frame. This is used in recovery frames of attacks.
ox<n> X coordinate correction; is only applied while ox tag is enabled.
oy<n> Y coordinate correction; is only applied while ox tag is enabled.

P-T

Tag Notes
pa Enable color effect for HAR palette effects
pb<n> n < 512
pc<n> n < 512
pd<n> n < 256. Reference color index.
pe Switch HAR palette effect handling to the other HAR.
ph Disable HAR palette effects if HAR is not in damage animation (9)
pp<n> Duration of HAR palette effect in ticks.
ps Update the color palette
ptd<n> n < 128 Effect intensity.
ptp<n> n < 128
ptr<n> n < 128
q<n> Enable nth hit. A move can only hit once without this tag. In order to add additional hits, q tags must be present in ascending order. Duplicate q tags or descending q tags have no effect.
r toggle a global Flip sprite horizontally
s<n> Play sound n. Also resets the sf and sb values to default.
sa
sb<n> Sound panning. The range of n is -100 (far left) to 100 (Far right). Value above 126 causes overflow to -128, value lower than -128 is capped to -128.
sc<n> sc0 is different from other sc tags
sd
se<n> similar to sl<n+1>, overrides sl if both sl and se are present in this frame.
sf<n> Sound frequency n. n has a range of -16 to 239, anything above 239 seems to overflow the frequency.
sl<n> Pan the sound from sb<n> to sl<n>.
smf<n>
smo <n> Play music track <n>. The track to play is one of the following:
  * 0 - No music 
  * 1 - End.psm 
  * 2 - Menu.psm 
  * 3 - Arena0.psm 
  * 4 - Arena1.psm 
  * 5 - Arena2.psm 
  * 6 - Arena3.psm 
  * 7 - Arena4.psm
sp<n> Doesn't seem to have any effects on the intro lightnings.
sw<n> sw<n> sets an internal counter to max(current value, n). This counter is decreased at a rate of either 2 or 4 units per game tick, down to 0. If the counter gets to 100 or above, the game pauses for a little while.

T-Z

Tag Notes
t Prevent sound from playing, if other HAR is blocking.
ua Sets enemy HAR to damage animation, if not already set.
ub Motion blur effect for the current object
uc
ud
ue Damage opponent if on the ground. Used in earthquake smash.
uf
ug
uh
uj
ul
un
ur
us
uz
v 'velocity' modifier for x/y tags
vsx also does v. Never used?
vsy actually vsK where K is anything other than x. also does v. Never used?
w Seems to handle sprite caching in engine.
x<…> /x-?\+?=?-?\+?[0-9]*/ is accepted. Code will always be one of the following:
x-<n> Set -x coordinate by n each tick in this frame
x+<n> Set +x coordinate by n each tick in this frame
x=<n> Set x position relative to start position and interpolate to the next x= position
x<n> If unspecified, a value of 100 is assumed. Scales image horizontally between 0 and 100%. (exception: Does not do anything eg. in You win! etc. sprites on arenas).
y<…> /y-?\+?=?-?\+?[0-9]*/ is accepted. Code will always be one of the following:
y-<n> Set -y coordinate by n each tick in this frame
y+<n> Set +y coordinate by n each tick in this frame
y=<n> Set y position relative to start position and interpolate to the next y= position
y<n> If unspecified, a value of 100 is assumed. Scales image vertically between 0 and 100%.
z<…> The z tags specify which attacks the player is invulnerable to, for the duration of the frame.
The Z Tags
zz: total invincibility?
all frames of Rising Blade
frames 1-2 of Jag Leaps
zp: on early frames of Shadow Headbutt, f1-3 of Flip Kick - inv. projectiles?
zj: invincible to jumps?
all frames of Rising Talon
frames 1-2 of Flip Kick
zg 0x0004 Never used?
zh 0x0040 Never used? Player is invincible to 'high' attacks
zj 0x0080 Player is invincible to jumping attacks
zl 0x0010 Never used? Player is invincible to 'low' attacks
zm 0x0020 Never used? Player is invincible to 'medium' attacks
zp 0x0100 Player is invincible to projectiles
zz 0xFFFF Combination of all other z flags. Player is invincible for this frame

ChaosBM Hidden Comments

//chaos -- notes 25/11/09 -- flags' effects on various anim data fields//

f4:
ar 0001
at 0002
af 0004
aa 0008
ai 0010
ac 0020
aw 0040
ad 0080
ab 0400
ao 0800
as 1000
ae 2000
am 4000
ax 8000

al f4 = f4E | 0002 // bug? should this be f4 |= 0x0002?

f4E:
us 0001
bn 0004
ag 0008
ur 0010
ue 0020
ud 0040
uh 0080
uz 0100
uf 0200
uc 0400
ua 0800
ug 1000
ul 2000
by 4000
bo0 4000 // plus some other stuff
bk 8000 // plus some other stuff

f1A:
zg 0004
zl 0010
zm 0020
zh 0040
zj 0080
zp 0100
zz FFFF

f14:
bg 0200
br 0100
bt 0400
f ^ 0004
v = 0001
vsK = 0001 // plus f52

f52:
cf 08
cg 20
cl 40
cp 10
cw 04
uj 80
vsx 01 // plus f14
vsy 02 // plus f14

f22:
jg 0004
fl 0010
jm 0020
jh 0040
jj 0080
jp 0100
jf 1000
jf2 2000
jz FFFF


From [[http://www.omf2097.com/~forum/viewthread.php?tid=193&page=8|:fixme]] : [More incorporated below]

cp: doesn't strictly mean "hits here"
look at Nova's basic punch: it starts hitting on frame 2-3 but doesn't have CP till 4
ub: this frame causes trails
n: during recovery; or during entirety of Concussion Cannon

Error handling

A handful of animation strings used by the AF and BK files provided with OMF2097 are ill-formed. The behaviour in the case of ill-formed strings in the OMF engine is inconsistent, but at least the following non-tags must be accepted and ignored by any correct parser:

Tag Used by Notes
zc Pyros' Shadow Super Thrust
x+4zcubs21l50zp
Probably a typo for zp. It looks like someone added 'zp's at the end of all the tags later when it was found to be not working properly (probably because of this zc). The tags for the frames before and after both contain zp.
openomf/animation_string.txt · Last modified: 2023/04/21 19:49 by joneirik