for player objects, 0xE5 marks the begin of the variables/play_data section
the byte following it tells where the actions section starts
the execution goes in the following way:
if (play_data+0x1 < 0x81) and (play_data+0x1 > 0x2):
if play_data+0x1 == 0x5:
actions_section = play_data+0x300
else:
actions_section = play_data+0x100
if play_data+0x50 AND 0x1:
actions_section = play_data+0x180
if play_data+0x50 AND 0x2:
actions_section += 0x80
if play_data+0x50 AND 0x4:
actions_section += 0x80
if play_data+0x50 AND 0x8:
actions_section += 0x80
else:
actions_section = 0x80
any other object have the actions starting at 0x0
each action starts with an eight bytes long header
[flag lvflag damage flag2]
[00000000 0000 00 00 ]
followed by the instructions back-to-back
ending with a 0xFF instruction (which also has its arguments)
every action also must have a size multiple of 4
after all actions there is an "action" starting with 0xFD00, followed by a 0xFFFF
(the game might not read past here)
===============================================================
Cell Begin (CellBegin) - ID 0
Type: Normal
Size: 4 bytes
Arg1 (byte) = Animation Rate
Arg2 (ushort) = CellNo
- Draws the specified cell for arg1 frames
===============================================================
0x01 = unused but has size 4
===============================================================
Attack State Flag Control (ASTFLAGCONTROL) - ID 2
Type: Normal
Size: 4 bytes
Arg1 (byte) = flag
Arg2 (ushort) = mode
flags:
0: 0x100000 - ??
1: 0x1000000 - ??
2: 0x4000000 - ??
modes:
0: AND NOT - unsets the flag?
_: OR - sets the flag?
- actst = actst mode flag
===============================================================
0x03 - BACK_MOTION - size 4 (puts the action in recovery, args to be
decoded) <- thanks to Athenya
===============================================================
Renewal Collision (RENEWAL_COLLISION) - ID 4
Type: Normal
Size: 4 bytes
Args - unused
- If the current action hit count is less than the current action max hit count,
renewal the collision (effectively
enabling multi-hits)
===============================================================
0x05 = SETCOLLISIONDATA - size 4
===============================================================
Blending (SEMITRANS) - ID 6 <- needs some further testing
Type: Normal
Size: 4 bytes
Arg1 (byte) = Alpha
Arg2 (ushort) = Blend
Blend:
0: Normal
1: Additive?
Execution:
if (Blend AND 0x8000) == 0:
transparency = Alpha
blending = Blend
trans2 = Alpha
transmode2 = Blend
return
===============================================================
Scale (SCALE) - ID 7
Type: Normal
Size: 4 bytes
Arg1 (byte) = mode
Arg2 (ushort) = value
Execution:
if mode == 1:
scale = value
if mode == 0:
scaleY = value
if mode == 3:
scale = scale + value
if mode == 2:
scaleY = scaleY + value
if mode == 5:
scale = scale + (rng AND value)
if mode == 4:
scaleY = scaleY + (rng AND value)
if mode == 7:
scale = (scale * (value / 100.0)) -> (converted from double to int)
if mode == 6:
scaleY = (scaleY * (value / 100.0)) -> (converted from double to int)
return
===============================================================
Rotate (ROT) - ID 8
Type: Normal
Size: 4 bytes
Arg1 (byte) = mode
Arg2 (ushort) = value
Execution:
if mode == 0:
angle = value
if mode == 1:
if value == 0:
angle = ((value AND 0xFF) << 8)
- wraps the value if it overflows a byte then shift 8 bits to the left
(???)
else:
angle = (rng AND value)
if mode == 2:
angle = angle + value
if mode == 3:
angle = localid * 256 (????????)
if mode == 4:
angle = angle + (rng AND value)
if mode == 5:
angle = angle + (rng MOD value)
return
===============================================================
0x09 = FIXEDEFFECT - size 4
0x0A = COMMUNICATE - size 4 (responsible to decrease eddie's time it
seems, needs testing, uses TACT3B
instead of TACTNORMAL)
0x0B = unused - size 4
0x0C = unused
0x0D = DO_NOT_CHECK_ATTACK - size 4
0x0E = DO_NOT_CHECK_DAMAGE - size 4
===============================================================
Reverse (REVERSE) - ID 15 (0F)
Type: Normal
Size: 4 bytes
Args - unused
- Inverts the direction flag
===============================================================
Draw Normal (DRAW_NORMAL) - ID 16 (10)
Type: Normal
Size: 4 bytes
Args - unused
- Sets the direction flag to the correct direction
===============================================================
Draw Reverse (DRAW_REVERSE) - ID 17 (11)
Type: Normal
Size: 4 bytes
Args - unused
- Sets the direction flag to the opposite direction
===============================================================
0x12 = CHAIN_CANCEL - size 4
0x13 = unused - size 4
0x14 = unused
0x15 = unused
0x16 = unused
0x17 = PARENT_OFFSET_POS_X - size 4
0x18 = PARENT_OFFSET_POS_Y - size 4
0x19 = InitInstance - size 16
0x1A = DELETECHARACTER - size 4
0x1B = RQ_SOUND - size 4
0x1C = ENEMY_HIT_SE_MODE - size 4
0x1D = ENEMY_GUARD_SE_MODE - size 4
===============================================================
Guard Voice (GUARD_VOICE) - ID 30 (1E)
Type: 3-Bytes
Size: 4 bytes
Arg1 (byte) = GuardNo (which guard voiceline to use)
Arg2 (byte) - unused
Arg3 (byte) = GuardProb (probability for the voiceline to play)
Execution:
if HitParam != 0: (if there are hit parameters provided by the action)
gno = GuardNo
gprob = GuardProb
return
===============================================================
Damage Voice (DAMAGE_VOICE) - ID 31 (1F)
Type: 3-Bytes
Size: 4 bytes
Arg1 (byte) = DamageNo (which damage voiceline to use)
Arg2 (byte) - unused
Arg3 (byte) = DamageProb (probability for the voiceline to play)
Execution:
if HitParam != 0: (if there are hit parameters provided by the action)
dno = DamageNo
dprob = DamageProb
return
===============================================================
0x20 = unused
0x21 = ENEMYDAMAGE - size 4
0x22 = DOWN_GRAV - size 4
0x23 = DOWN_X - size 4
0x24 = DOWN_Y - size 4
0x25 = unused
0x26 = DELETE_ITTAI - size 4
0x27 = SkipInstructions - size 4
0x28 = FADE - size 4
0x29 = unused
0x2A = unused
0x2B = unused
0x2C = unused
0x2D = SET_PRIORITY - size 4
0x2E = unused
0x2F = SET_DAMAGE - size 4
===============================================================
Set Level (SET_LEVEL) - ID 48 (30)
Type: Normal
Size: 4 bytes
Arg1 - unused
Arg2 (ushort) = level
- Sets the action level flag to arg2
===============================================================
0x31 = SET_ACTTYPE - size 8
0x32 = SET_DOWNTIME - size 4
0x33 = unused
0x34 = TENSION - size 4
0x35 = POSBYENEMY - size 8
0x36 = SETMARK - size 4
0x37 = SETMASK - size 4
0x38 = unused
===============================================================
Set Max Hit (SETMAXHIT) - ID 57 (39)
Type: Normal
Size: 4 bytes
Arg1 (byte) = HitCount
Arg2 - unused
- Set the max hit count of an action to the first arg
===============================================================
0x3A = INDEPENDENCE - size 4
0x3B = VEBALL - size 4
===============================================================
Palette (PALETTE) - ID 60 (3C)
Type: Normal
Size: 4 bytes
Arg1 (byte) = Player
Arg2 (ushort) = Section
Player:
_: p1
1: p2
- Use the palette from the specified section from the specified player current
loaded palette (only lasts while in
the action, only works with embedded palette sprites?) <- thanks to sALT
===============================================================
0x3D = REVIVEDAMAGE - size 4
0x3E = FREEIMAGE - size 4
0x3F = JUMPCANCEL - size 4
0x40 = KAKUSEI - size 4
0x41 = SETXSPEED - size 4
0x42 = SETYSPEED - size 4
0x43 = SETGRAVITY - size 4
0x44 = SETDOWNFLAG - size 4
0x45 = VISUAL - size 4
0x46 = FLASH - size 4
0x47 = RENDACHANSEL - size 8
0x48 = GROUNDSHAKE - size 4
0x49 = KEZURI - size 4
0x4A = FAINT - size 4
0x4B = RANDPOS - size 4
===============================================================
Sit (SIT) - ID 76 (4C)
Type: Normal
Size: 4 bytes
Arg1 - unused
Arg2 (ushort) = operation
Execution:
if operation != 0:
- sets the crouching state
return
- removes the crouching state
return
===============================================================
0x4D = JUMPCONTROL - size 4
0x4E = DAMAGEHOSEI - size 4
0x4F = MUTEKI - size 4
0x50 = NOTHROW - size 4
0x51 = SETLOCALID - size 4
0x52 = AFTERIMAGE - size 4
0x53 = GUARD - size 4
0x54 = ?? - size 4 (related to burst/FD/SB)
0x55 = ?? - size 4
0x56 = ?? - size 8
0x57 = ?? - size 4 -> sets the action header to the same as the
parent action header
0x58 = ?? - size 8
0x59 = ?? - size 4
0x5A = ?? - size 8
0x5B = ?? - size 8
0x5C = ?? - size 4
0x5D = ?? - size 4
0x5E = unused/broken - size 8
0x5F = ?? - size 12
0x60 = (figuring out) - size 8
0x61 = CellBegin (complex) - size 12
0x62 = ?? - size 4
0x63 = ?? - size 4
0x64 = ?? - size 8
0x65 = ?? - size 8
0x66 = ?? - size 8
0x67 = ?? - size 8
0x68 = unused/broken - size 16
0xFF - end action - size 4
>>03 - loop
>>04 - relative jump to arg 2 (skip to the action arg2 actions of distance from the
current one)
>>05
>>06
>>07
>>08
action state flags
1 (00000000000000000000000000000001): unk -> checked to see if time should be
stopped
2 (00000000000000000000000000000010): unk -> checked by visual instruction
3 (00000000000000000000000000000100): unk -> used by visual instruction
4 (00000000000000000000000000001000): unk -> toggled on visual instruction
5 (00000000000000000000000000010000): Recovery? -> unset when getting up and
during faint
6 (00000000000000000000000000100000): Vulnerable? -> set when being hit
7 (00000000000000000000000001000000): Hit Collision
(when not set, hitbox collisions can proceed to a hit, otherwise they have no
effect)
8 (00000000000000000000000010000000): Damage
(when not set, damage will be dealt, otherwise damage will be ignored)
9 (00000000000000000000000100000000): unk -> unset when getting up
10 (00000000000000000000001000000000): unk -> gattling flag? checked for guard
timer
11 (00000000000000000000010000000000): Crouch
(set when the character is crouching/sitting)
13 (00000000000000000001000000000000): Guard? -> set when entering/leaving crouch
state and when landing, unset when guarding or playing idle/directional respect
animation
15 (00000000000000000100000000000000): unk -> set when getting up
16 (00000000000000001000000000000000): unk -> unset when backstepping if not a CPU
or being hit in the air
18 (00000000000000100000000000000000): Muteki (idk what it is)
19 (00000000000001000000000000000000): unk -> set during idle and win animation and
when forcing a time stop
20 (00000000000010000000000000000000): unk -> read when setting guard flag every
player main loop
21 (00000000000100000000000000000000): unk -> affected by ASTFLAGCONTROL
24 (00000000100000000000000000000000): unk -> related to throws
25 (00000001000000000000000000000000): unk -> affected by ASTFLAGCONTROL
27 (00000100000000000000000000000000): unk -> affected by ASTFLAGCONTROL
32 (10000000000000000000000000000000): unk -> set when calling effects