{ "StateFlags": { "description": "Miscellaneous state flags.", "fields": [ { "type": "u8" }, { "type": "u8" }, { "type": "u8" }, { "type": "u8" }, { "type": "u8" } ] }, "Velocities": { "description": "Self-induced and knockback velocities.", "fields": [ { "name": "self_x_air", "type": "f32", "description": "Self-induced x-velocity (airborne)" }, { "name": "self_y", "type": "f32", "description": "Self-induced y-velocity" }, { "name": "knockback_x", "type": "f32", "description": "Knockback-induced x-velocity" }, { "name": "knockback_y", "type": "f32", "description": "Knockback-induced y-velocity" }, { "name": "self_x_ground", "type": "f32", "description": "Self-induced x-velocity (grounded)" } ] }, "Position": { "description": "2D position.", "fields": [ { "name": "x", "type": "f32" }, { "name": "y", "type": "f32" } ] }, "Velocity": { "description": "2D velocity.", "fields": [ { "name": "x", "type": "f32" }, { "name": "y", "type": "f32" } ] }, "TriggersPhysical": { "description": "Trigger state.", "fields": [ { "name": "l", "type": "f32" }, { "name": "r", "type": "f32" } ] }, "Pre": { "description": "Pre-frame update data, required to reconstruct a replay.\n\nInformation is collected right before controller inputs are used to figure out the character’s next action.", "fields": [ { "name": "random_seed", "type": "u32", "description": "Random seed" }, { "name": "state", "type": "u16", "description": "Character’s action state" }, { "name": "position", "type": "Position", "description": "Character’s position" }, { "name": "direction", "type": "f32", "description": "Direction the character is facing" }, { "name": "joystick", "type": "Position", "description": "Processed analog joystick position" }, { "name": "cstick", "type": "Position", "description": "Processed analog c-stick position" }, { "name": "triggers", "type": "f32", "description": "Processed analog trigger position" }, { "name": "buttons", "type": "u32", "description": "Processed button-state bitmask" }, { "name": "buttons_physical", "type": "u16", "description": "Physical button-state bitmask" }, { "name": "triggers_physical", "type": "TriggersPhysical", "description": "Physical analog trigger positions (useful for IPM)" }, { "name": "raw_analog_x", "type": "i8", "version": "1.2", "description": "Raw joystick x-position" }, { "name": "percent", "type": "f32", "version": "1.4", "description": "Damage taken (percent)" }, { "name": "raw_analog_y", "type": "i8", "version": "3.15", "description": "Raw joystick y-position" } ] }, "Post": { "description": "Post-frame update data, for making decisions about game states (such as computing stats).\n\nInformation is collected at the end of collision detection, which is the last consideration of the game engine.", "fields": [ { "name": "character", "type": "u8", "description": "In-game character (can only change for Zelda/Sheik)" }, { "name": "state", "type": "u16", "description": "Character’s action state" }, { "name": "position", "type": "Position", "description": "Character’s position" }, { "name": "direction", "type": "f32", "description": "Direction the character is facing" }, { "name": "percent", "type": "f32", "description": "Damage taken (percent)" }, { "name": "shield", "type": "f32", "description": "Size/health of shield" }, { "name": "last_attack_landed", "type": "u8", "description": "Last attack ID that this character landed" }, { "name": "combo_count", "type": "u8", "description": "Combo count (as defined by the game)" }, { "name": "last_hit_by", "type": "u8", "description": "Port that last hit this player. Bugged in Melee: will be set to `6` in certain situations" }, { "name": "stocks", "type": "u8", "description": "Number of stocks remaining" }, { "name": "state_age", "type": "f32", "version": "0.2", "description": "Number of frames action state has been active. Can have a fractional component" }, { "name": "state_flags", "type": "StateFlags", "version": "2.0", "description": "State flags" }, { "name": "misc_as", "type": "f32", "version": "2.0", "description": "Used for different things. While in hitstun, contains hitstun frames remaining" }, { "name": "airborne", "type": "u8", "version": "2.0", "description": "Is the character airborne?" }, { "name": "ground", "type": "u16", "version": "2.0", "description": "Ground ID the character last touched" }, { "name": "jumps", "type": "u8", "version": "2.0", "description": "Number of jumps remaining" }, { "name": "l_cancel", "type": "u8", "version": "2.0", "description": "L-cancel status (0 = none, 1 = successful, 2 = unsuccessful)" }, { "name": "hurtbox_state", "type": "u8", "version": "2.1", "description": "Hurtbox state (0 = vulnerable, 1 = invulnerable, 2 = intangible)" }, { "name": "velocities", "type": "Velocities", "version": "3.5", "description": "Self-induced and knockback velocities" }, { "name": "hitlag", "type": "f32", "version": "3.8", "description": "Hitlag frames remaining" }, { "name": "animation_index", "type": "u32", "version": "3.11", "description": "Animation the character is in" }, { "name": "last_hit_by_instance", "type": "u16", "version": "3.16", "description": "Instance ID of the player/item that last hit this player" }, { "name": "instance_id", "type": "u16", "version": "3.16", "description": "Unique, serial ID for each new action state across all characters. Resets to 0 on death" } ] }, "Start": { "description": "Initialization data such as game mode, settings, characters & stage.", "fields": [ { "name": "random_seed", "type": "u32", "description": "Random seed" }, { "name": "scene_frame_counter", "type": "u32", "version": "3.10", "description": "Scene frame counter. Starts at 0, and increments every frame (even when paused)" } ] }, "End": { "description": "Information about the end of the game.", "fields": [ { "name": "latest_finalized_frame", "type": "i32", "version": "3.7", "description": "Index of the latest frame which is guaranteed not to happen again (rollback)" } ] }, "ItemMisc": { "description": "Miscellaneous item state.", "fields": [ { "type": "u8" }, { "type": "u8" }, { "type": "u8" }, { "type": "u8" } ] }, "Item": { "description": "An active item (includes projectiles).", "fields": [ { "name": "type", "type": "u16", "description": "Item type" }, { "name": "state", "type": "u8", "description": "Item’s action state" }, { "name": "direction", "type": "f32", "description": "Direction item is facing" }, { "name": "velocity", "type": "Velocity", "description": "Item’s velocity" }, { "name": "position", "type": "Position", "description": "Item’s position" }, { "name": "damage", "type": "u16", "description": "Amount of damage item has taken" }, { "name": "timer", "type": "f32", "description": "Frames remaining until item expires" }, { "name": "id", "type": "u32", "description": "Unique, serial ID per item spawned" }, { "name": "misc", "type": "ItemMisc", "version": "3.2", "description": "Miscellaneous item state" }, { "name": "owner", "type": "i8", "version": "3.6", "description": "Port that owns the item (-1 when unowned)" }, { "name": "instance_id", "type": "u16", "version": "3.16", "description": "Inherited instance ID of the owner (0 when unowned)" } ] } }