[][src]Enum brawllib_rs::script_ast::EventAst

pub enum EventAst {
    SyncWait(f32),
    Nop,
    AsyncWait(f32),
    ForLoop(ForLoop),
    Subroutine(Offset),
    Return,
    Goto(Offset),
    IfStatement(IfStatement),
    IfStatementAnd(Expression),
    IfStatementOr(Expression),
    Switch(i32i32),
    Case(i32),
    DefaultCase,
    EndSwitch,
    LoopRest,
    CallEveryFrame {
        thread_id: i32,
        offset: Offset,
    },
    RemoveCallEveryFrame {
        thread_id: i32,
    },
    EnableInterrupt(i32),
    DisableInterrupt(i32),
    ToggleInterrupt {
        interrupt_type: InterruptType,
        interrupt_id: i32,
    },
    EnableInterruptGroup(InterruptType),
    DisableInterruptGroup(InterruptType),
    ClearInterruptGroup(InterruptType),
    CreateInterrupt(Interrupt),
    PreviousInterruptAddRequirement {
        test: Expression,
    },
    InterruptAddRequirement {
        interrupt_type: InterruptType,
        interrupt_id: i32,
        test: Expression,
    },
    AllowInterrupts,
    ChangeSubaction(i32),
    ChangeSubactionRestartFrame(i32),
    SetFrame(f32),
    FrameSpeedModifier {
        multiplier: f32,
        unk: i32,
    },
    TimeManipulation(i32i32),
    SetAirGround(i32),
    SetEdgeSlide(EdgeSlide),
    ReverseDirection,
    CreateHitBox(HitBoxArguments),
    ThrownHitBox(HitBoxArguments),
    DeleteAllHitBoxes,
    CreateSpecialHitBox(SpecialHitBoxArguments),
    MoveHitBox(MoveHitBox),
    ChangeHitBoxDamage {
        hitbox_id: i32,
        new_damage: i32,
    },
    ChangeHitBoxSize {
        hitbox_id: i32,
        new_size: i32,
    },
    DeleteHitBox(i32),
    CreateGrabBox(GrabBoxArguments),
    DeleteGrabBox(i32),
    DeleteAllGrabBoxes,
    SpecifyThrow(SpecifyThrow),
    ApplyThrow(ApplyThrow),
    ChangeHurtBoxStateAll {
        state: HurtBoxState,
    },
    ChangeHurtBoxStateSpecific {
        bone: i32,
        state: HurtBoxState,
    },
    UnchangeHurtBoxStateSpecific,
    ControllerClearBuffer,
    ControllerUnk01,
    ControllerUnk02,
    ControllerUnk06(bool),
    ControllerUnk0C,
    Rumble {
        unk1: i32,
        unk2: i32,
    },
    RumbleLoop {
        unk1: i32,
        unk2: i32,
    },
    SlopeContourStand {
        leg_bone_parent: i32,
    },
    SlopeContourFull {
        hip_n_or_top_n: i32,
        trans_bone: i32,
    },
    GenerateArticle {
        article_id: i32,
        subaction_only: bool,
    },
    ArticleEvent(i32),
    ArticleAnimation(i32),
    ArticleRemove(i32),
    ArticleVisibility {
        article_id: i32,
        visibility: bool,
    },
    FinalSmashEnter,
    FinalSmashExit,
    TerminateSelf,
    LedgeGrabEnable(LedgeGrabEnable),
    TagDisplay(bool),
    Armor {
        armor_type: ArmorType,
        tolerance: f32,
    },
    AddDamage(f32),
    Posture(i32),
    SetOrAddVelocity(SetOrAddVelocity),
    SetVelocity {
        x_vel: f32,
        y_vel: f32,
    },
    AddVelocity {
        x_vel: f32,
        y_vel: f32,
    },
    DisableMovement(DisableMovement),
    DisableMovement2(DisableMovement),
    ResetVerticalVelocityAndAcceleration(bool),
    SoundEffect1(i32),
    SoundEffect2(i32),
    SoundEffectTransient(i32),
    SoundEffectStop(i32),
    SoundEffectVictory(i32),
    SoundEffectUnk(i32),
    SoundEffectOther1(i32),
    SoundEffectOther2(i32),
    SoundVoiceLow,
    SoundVoiceDamage,
    SoundVoiceOttotto,
    SoundVoiceEating,
    IntVariableSet {
        value: i32,
        variable: VariableAst,
    },
    IntVariableAdd {
        value: i32,
        variable: VariableAst,
    },
    IntVariableSubtract {
        value: i32,
        variable: VariableAst,
    },
    IntVariableIncrement {
        variable: VariableAst,
    },
    IntVariableDecrement {
        variable: VariableAst,
    },
    FloatVariableSet {
        value: f32,
        variable: VariableAst,
    },
    FloatVariableAdd {
        value: f32,
        variable: VariableAst,
    },
    FloatVariableSubtract {
        value: f32,
        variable: VariableAst,
    },
    FloatVariableMultiply {
        value: f32,
        variable: VariableAst,
    },
    FloatVariableDivide {
        value: f32,
        variable: VariableAst,
    },
    BoolVariableSetTrue {
        variable: VariableAst,
    },
    BoolVariableSetFalse {
        variable: VariableAst,
    },
    ModelChanger {
        reference: u8,
        switch_index: i32,
        bone_group_index: i32,
    },
    GraphicEffect(GraphicEffect),
    ExternalGraphicEffect(ExternalGraphicEffect),
    LimitedScreenTint(LimitedScreenTint),
    UnlimitedScreenTint(UnlimitedScreenTint),
    EndUnlimitedScreenTint {
        tint_id: i32,
        transition_out_time: i32,
    },
    SwordGlow(SwordGlow),
    DeleteSwordGlow {
        fade_time: i32,
    },
    AestheticWindEffect(AestheticWindEffect),
    EndAestheticWindEffect {
        unk: i32,
    },
    ScreenShake {
        magnitude: i32,
    },
    CameraCloseup(CameraCloseup),
    CameraNormal,
    ItemPickup {
        unk1: i32,
        unk2: Option<i32>,
        unk3: Option<i32>,
        unk4: Option<i32>,
    },
    ItemThrow {
        unk1: VariableAst,
        unk2: VariableAst,
        unk3: VariableAst,
        unk4: Option<VariableAst>,
        unk5: Option<VariableAst>,
    },
    ItemThrow2 {
        unk1: f32,
        unk2: f32,
        unk3: VariableAst,
    },
    ItemDrop,
    ItemConsume {
        unk: i32,
    },
    ItemSetProperty {
        unk1: i32,
        unk2: f32,
    },
    FireWeapon,
    FireProjectile,
    Item1F {
        unk: i32,
    },
    ItemCreate {
        unk: i32,
    },
    ItemVisibility(bool),
    BeamSwordTrail {
        unk: i32,
    },
    Unknown(Event),
}

Variants

SyncWait(f32)

Pause the current flow of events until the set time is reached. Synchronous timers count down when they are reached in the code.

Nop

Does nothing.

AsyncWait(f32)

Pause the current flow of events until the set time is reached. Asynchronous Timers start counting from the beginning of the animation.

ForLoop(ForLoop)

Execute the block of code N times.

Subroutine(Offset)

Enter the event routine specified and return after ending.

Return

Return from a Subroutine.

Goto(Offset)

Goto the event location specified and execute.

IfStatement(IfStatement)

An expression decides which block of code to execute.

IfStatementAnd(Expression)

An And to an If statement. If the expression is false then execution of all events other than IfStatementOr are skipped. Execution can be resumed by an IfStatementOr

Has no effect outside of an IfStatement Havent tested if it would affect execution when called within a subroutine, but I would assume it is.

IfStatementOr(Expression)

An Or to an If statement. If the expression is true then execution of all events is re-enabled Execution can be stopped by an IfStatementAnd

Has no effect outside of an IfStatement Havent tested if it would affect execution when called within a subroutine, but I would assume it is.

Switch(i32i32)

Begin a multiple case Switch block.

Case(i32)

Handler for if the variable in the switch statement equals the specified value.

DefaultCase

The case chosen if none of the others are executed.

EndSwitch

End a Switch block.

LoopRest

Briefly return execution back to the system to prevent crashes during infinite loops.

CallEveryFrame

Runs a subroutine once per frame for the current action.

Fields of CallEveryFrame

thread_id: i32offset: Offset
RemoveCallEveryFrame

Stops the execution of a loop created with CallEveryFrame

Fields of RemoveCallEveryFrame

thread_id: i32
EnableInterrupt(i32)

Enables the given interrupt ID on any interrupt type.

DisableInterrupt(i32)

Disables the given interrupt ID on any interrupt type.

ToggleInterrupt

Invert the given interrupt ID assosciated with the given interrupt type.

Fields of ToggleInterrupt

interrupt_type: InterruptTypeinterrupt_id: i32
EnableInterruptGroup(InterruptType)

Enables all interrupts associated with the given interrupt type.

DisableInterruptGroup(InterruptType)

Disables all interrupts associated with the given interrupt type.

ClearInterruptGroup(InterruptType)

Remove all actions currently assosciated with an interrupt type.

CreateInterrupt(Interrupt)

An interrupt with the given interrupt ID is assosciated with the interrupt type of that action. The interrupt type used, seems to be hardcoded to the action somehow. The current action will change upon test being true. (the requirement does not have to be met at the time this ID is executed - it can be used anytime after execution.)

PreviousInterruptAddRequirement

Add an additional requirement to the preceeding CreateInterrupt statement. All requirements on the interrupt must be true for the interrupt to occur.

Fields of PreviousInterruptAddRequirement

test: Expression
InterruptAddRequirement

Add an additonal requirement to the specified interrupt type and interrupt id. All requirements on the interrupt must be true for the interrupt to occur.

Fields of InterruptAddRequirement

interrupt_type: InterruptTypeinterrupt_id: i32test: Expression
AllowInterrupts

Allow the current action to be interrupted by another action.

ChangeSubaction(i32)

Change the current subaction.

ChangeSubactionRestartFrame(i32)

Change the current subaction, restarting the frame count.

SetFrame(f32)

Changes the current frame of the animation. Does not change the frame of the subaction (i.e. timers and such are unaffected).

FrameSpeedModifier

Dictates the frame speed of the subaction. Example: setting to 2 makes the animation and timers occur twice as fast.

Fields of FrameSpeedModifier

multiplier: f32unk: i32
TimeManipulation(i32i32)

Change the speed of time for various parts of the environment.

SetAirGround(i32)

Specify whether the character is on or off the ground.

SetEdgeSlide(EdgeSlide)

Determines whether or not the character will slide off the edge.

ReverseDirection

Reverse the direction the character is facing after the animation ends.

CreateHitBox(HitBoxArguments)

Create a hitbox with the specified parameters.

ThrownHitBox(HitBoxArguments)

Create a hitbox with the specified parameters on the character to be thrown. The hitbox can not hit the throwing character or the thrown character. TODO: I actually dont understand this at all, it seems characters without this still have hitboxes regardless of who throws who.

DeleteAllHitBoxes

Remove all currently present hitboxes.

CreateSpecialHitBox(SpecialHitBoxArguments)

Create a hitbox with the even more parameters.

MoveHitBox(MoveHitBox)

Repositions an already-existing hitbox.

ChangeHitBoxDamage

Changes a specific hitbox's damage to the new amount. Only guaranteed to work on a HitBox

Fields of ChangeHitBoxDamage

hitbox_id: i32new_damage: i32
ChangeHitBoxSize

Changes a specific hitbox's size to the new amount. Only guaranteed to work on a HitBox

Fields of ChangeHitBoxSize

hitbox_id: i32new_size: i32
DeleteHitBox(i32)

Deletes a hitbox of the specified ID. Only guaranteed to work on a HitBox

CreateGrabBox(GrabBoxArguments)

Generate a grabbox with the specified parameters.

DeleteGrabBox(i32)

Deletes the grabbox with the specified ID.

DeleteAllGrabBoxes

Remove all currently present grabboxes

SpecifyThrow(SpecifyThrow)

Specify the throw

ApplyThrow(ApplyThrow)

Apply the previously specified throw

ChangeHurtBoxStateAll

Set the state of all of the characters hurtboxes.

Fields of ChangeHurtBoxStateAll

state: HurtBoxState
ChangeHurtBoxStateSpecific

Sets the state of a characters specific hurtbox.

Fields of ChangeHurtBoxStateSpecific

bone: i32state: HurtBoxState
UnchangeHurtBoxStateSpecific

Sets the state of a characters specific hurtbox to the global value.

ControllerClearBuffer

Possibly clears the controller buffer.

ControllerUnk01

Unknown controller event

ControllerUnk02

Unknown controller event

ControllerUnk06(bool)

Unknown controller event

ControllerUnk0C

Unknown controller event

Rumble

Undefined. Affects the rumble feature of the controller.

Fields of Rumble

unk1: i32unk2: i32
RumbleLoop

Creates a rumble loop on the controller.

Fields of RumbleLoop

unk1: i32unk2: i32
SlopeContourStand

Moves the character's feet if on sloped ground.

Fields of SlopeContourStand

leg_bone_parent: i32
SlopeContourFull

Moves entire character to match sloped ground.

Fields of SlopeContourFull

hip_n_or_top_n: i32trans_bone: i32
GenerateArticle

Generate a pre-made prop effect from the prop library.

Fields of GenerateArticle

article_id: i32subaction_only: bool
ArticleEvent(i32)

Makes the article preform an animation when set to 1.

ArticleAnimation(i32)

Article Animation.

ArticleRemove(i32)

Removes an article.

ArticleVisibility

Makes an article visible or invisible.

Fields of ArticleVisibility

article_id: i32visibility: bool
FinalSmashEnter

Allows use of Final Smash locked articles, variables, etc. Highly unstable.

FinalSmashExit

Exit Final Smash state

TerminateSelf

Used by certain article instances to remove themselves.

LedgeGrabEnable(LedgeGrabEnable)

Allow or disallow grabbing ledges during the current subaction.

TagDisplay(bool)

Disables or enables tag display for the current subaction.

Armor

Begins super armor or heavy armor. Set parameters to None and 0 to end the armor.

Fields of Armor

armor_type: ArmorTypetolerance: f32
AddDamage(f32)

Adds the specified amount of damage to the character's current percentage.

Posture(i32)

???

SetOrAddVelocity(SetOrAddVelocity)

Will either set or add the velocity amounts depending on the set_ flags.

SetVelocity

Sets the character's current velocity.

Fields of SetVelocity

x_vel: f32y_vel: f32
AddVelocity

Adds to the character's current velocity.

Fields of AddVelocity

x_vel: f32y_vel: f32
DisableMovement(DisableMovement)

Does not allow the specified type of movement.

DisableMovement2(DisableMovement)

This must be set to the same value as DisableMovement to work.

ResetVerticalVelocityAndAcceleration(bool)

When set to 1, vertical speed and acceleration are reset back to 0.

SoundEffect1(i32)

Play a specified sound effect.

SoundEffect2(i32)

Play a specified sound effect.

SoundEffectTransient(i32)

Play a specified sound effect. The sound effect ends with the animation.

SoundEffectStop(i32)

Stops the specified sound effect immediately.

SoundEffectVictory(i32)

Play a specified sound effect. Is used during victory poses.

SoundEffectUnk(i32)

Unknown.

SoundEffectOther1(i32)

Play a specified sound effect.

SoundEffectOther2(i32)

Play a specified sound effect.

SoundVoiceLow

Play a random low voice clip.

SoundVoiceDamage

Play a random damage voice clip.

SoundVoiceOttotto

Play the Ottotto voice clip.

SoundVoiceEating

Play a random eating voice clip.

IntVariableSet

Set a specified value to an int variable.

Fields of IntVariableSet

value: i32variable: VariableAst
IntVariableAdd

Add a specified value to an int variable.

Fields of IntVariableAdd

value: i32variable: VariableAst
IntVariableSubtract

Subtract a specified value from an int variable.

Fields of IntVariableSubtract

value: i32variable: VariableAst
IntVariableIncrement

Increment an int variable.

Fields of IntVariableIncrement

variable: VariableAst
IntVariableDecrement

Decrement an int variable.

Fields of IntVariableDecrement

variable: VariableAst
FloatVariableSet

Set a specified value to a float variable.

Fields of FloatVariableSet

value: f32variable: VariableAst
FloatVariableAdd

Add a specified value to a float variable.

Fields of FloatVariableAdd

value: f32variable: VariableAst
FloatVariableSubtract

Subtract a specified value from a float variable.

Fields of FloatVariableSubtract

value: f32variable: VariableAst
FloatVariableMultiply

Multiply a specified value on a float variable.

Fields of FloatVariableMultiply

value: f32variable: VariableAst
FloatVariableDivide

Divide a specified value on a float variable.

Fields of FloatVariableDivide

value: f32variable: VariableAst
BoolVariableSetTrue

Set a bool variable to true.

Fields of BoolVariableSetTrue

variable: VariableAst
BoolVariableSetFalse

Set a bool variable to false.

Fields of BoolVariableSetFalse

variable: VariableAst
ModelChanger

Changes the visibility of certain bones attached to objects. Uses bone groups and switches set in the specified Reference of the Model Visibility section.

Fields of ModelChanger

reference: u8switch_index: i32bone_group_index: i32
GraphicEffect(GraphicEffect)

Generate a generic graphical effect with the specified parameters.

ExternalGraphicEffect(ExternalGraphicEffect)

Generate a graphical effect from an external file. (usually the Ef_ file)

LimitedScreenTint(LimitedScreenTint)

Tint the screen to the specified color.

UnlimitedScreenTint(UnlimitedScreenTint)

Tint the screen to the specified color until terminated by EndUnlimitedScreenTint.

EndUnlimitedScreenTint

Ends an unlimited screen tint with the specified ID.

Fields of EndUnlimitedScreenTint

tint_id: i32transition_out_time: i32
SwordGlow(SwordGlow)

Creates glow of sword. Only usable when the proper effects are loaded by their respective characters.

DeleteSwordGlow

Remove the sword flow in the specified time

Fields of DeleteSwordGlow

fade_time: i32
AestheticWindEffect(AestheticWindEffect)

Moves nearby movable model parts (capes, hair, etc) with a wind specified by the parameters.

EndAestheticWindEffect

Ends the wind effect spawned by the "Aesthetic Wind Effect" event

Fields of EndAestheticWindEffect

unk: i32
ScreenShake

Shakes the screen.

Fields of ScreenShake

magnitude: i32
CameraCloseup(CameraCloseup)

Zoom the camera on the character.

CameraNormal

Return the camera to its normal settings.

ItemPickup

Cause the character to receive the closest item in range.

Fields of ItemPickup

unk1: i32unk2: Option<i32>unk3: Option<i32>unk4: Option<i32>
ItemThrow

Cause the character to throw the currently held item.

Fields of ItemThrow

unk1: VariableAstunk2: VariableAstunk3: VariableAstunk4: Option<VariableAst>unk5: Option<VariableAst>
ItemThrow2

Cause the character to throw the currently held item.

Fields of ItemThrow2

unk1: f32unk2: f32unk3: VariableAst
ItemDrop

Cause the character to drop any currently held item.

ItemConsume

Cause the character to consume the currently held item.

Fields of ItemConsume

unk: i32
ItemSetProperty

Set a property of the currently held item.

Fields of ItemSetProperty

unk1: i32unk2: f32
FireWeapon

Fires a shot from the currently held item.

FireProjectile

Fires a projectile.

Item1F

Used when firing a cracker launcher.

Fields of Item1F

unk: i32
ItemCreate

Create an item in the characters hand.

Fields of ItemCreate

unk: i32
ItemVisibility(bool)

Determines the visibility of the currently held item.

BeamSwordTrail

Creates a beam sword trail. Probably has more uses among battering weapons.

Fields of BeamSwordTrail

unk: i32
Unknown(Event)

Unknown event.

Trait Implementations

impl Clone for EventAst[src]

default fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for EventAst[src]

impl Serialize for EventAst[src]

Auto Trait Implementations

impl Send for EventAst

impl Sync for EventAst

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]