IdaJS
    Preparing search index...

    Interface LifeOpcodes

    LBA2 Life script opcodes, available in IdaJS.

    Life opcodes are available in javascript through ida.Life enum object. Life opcodes can be called using ida.life function.

    Life opcodes documentation has special types notation for numeric arguments and return values:

    • u8 - unsigned 8-bit integer (from 0 to 255)
    • i8 - signed 8-bit integer (from -128 to 127)
    • u16 - unsigned 16-bit integer (from 0 to 65535)
    • i16 - signed 16-bit integer (from -32768 to 32767)
    • pc16 - 16-bit signed offset (little-endian) used as a jump destination, absolute
    • u32 - unsigned 32-bit integer (from 0 to 4294967295)

    ida.Life

    interface LifeOpcodes {
        $: EnumHandler;
        LM_ACTION: 82;
        LM_ADD_CHOICE: 68;
        LM_ADD_GOLD_PIECES: 136;
        LM_ADD_LIFE_POINT_OBJ: 110;
        LM_ANIM: 19;
        LM_ANIM_OBJ: 20;
        LM_ANIM_SET: 95;
        LM_ANIM_TEXTURE: 103;
        LM_ASK_CHOICE: 69;
        LM_ASK_CHOICE_OBJ: 91;
        LM_BACKGROUND: 127;
        LM_BETA: 80;
        LM_BODY: 17;
        LM_BODY_OBJ: 18;
        LM_BRICK_COL: 54;
        LM_BRUTAL_EXIT: 105;
        LM_BULLE: 89;
        LM_CAM_FOLLOW: 29;
        LM_CAMERA_CENTER: 22;
        LM_CHANGE_CUBE: 52;
        LM_CINEMA_MODE: 92;
        LM_CLR_HOLO_POS: 73;
        LM_COMPORTEMENT_HERO: 30;
        LM_ECHELLE: 107;
        LM_ECLAIR: 65;
        LM_END_LIFE: 41;
        LM_ESCALATOR: 99;
        LM_FADE_TO_PAL: 81;
        LM_FALLABLE: 26;
        LM_FLOW_OBJ: 146;
        LM_FLOW_POINT: 145;
        LM_FOUND_OBJECT: 46;
        LM_FULL_POINT: 79;
        LM_GAME_OVER: 97;
        LM_GIVE_BONUS: 51;
        LM_GIVE_GOLD_PIECES: 40;
        LM_HIT_OBJ: 63;
        LM_IMPACT_OBJ: 86;
        LM_IMPACT_POINT: 87;
        LM_INC_CLOVER_BOX: 66;
        LM_INIT_BUGGY: 70;
        LM_INVERSE_BETA: 134;
        LM_INVISIBLE: 56;
        LM_KILL_OBJ: 37;
        LM_MEMO_ARDOISE: 71;
        LM_MESSAGE: 25;
        LM_MESSAGE_OBJ: 44;
        LM_MESSAGE_ZOE: 78;
        LM_NEW_SAMPLE: 152;
        LM_NO_BODY: 135;
        LM_NO_CHOC: 90;
        LM_OBJ_COL: 53;
        LM_PALETTE: 10;
        LM_PARM_SAMPLE: 151;
        LM_PCX: 148;
        LM_PCX_MESS_OBJ: 154;
        LM_PLAY_ACF: 64;
        LM_PLAY_MUSIC: 100;
        LM_PLUIE: 96;
        LM_POS_OBJ_AROUND: 153;
        LM_POS_POINT: 58;
        LM_REPEAT_SAMPLE: 126;
        LM_RESTORE_COMPORTEMENT: 121;
        LM_RESTORE_COMPORTEMENT_OBJ: 140;
        LM_RESTORE_HERO: 94;
        LM_RESTORE_L_TRACK: 43;
        LM_RESTORE_L_TRACK_OBJ: 138;
        LM_SAMPLE: 122;
        LM_SAMPLE_ALWAYS: 124;
        LM_SAMPLE_RND: 123;
        LM_SAMPLE_STOP: 125;
        LM_SAVE_COMPORTEMENT: 120;
        LM_SAVE_COMPORTEMENT_OBJ: 139;
        LM_SAVE_HERO: 93;
        LM_SET_ANIM_DIAL: 147;
        LM_SET_ARMURE: 108;
        LM_SET_ARMURE_OBJ: 109;
        LM_SET_CAMERA: 21;
        LM_SET_CHANGE_CUBE: 77;
        LM_SET_COMPORTEMENT: 33;
        LM_SET_COMPORTEMENT_OBJ: 34;
        LM_SET_CONTROL: 27;
        LM_SET_CONTROL_OBJ: 28;
        LM_SET_DOOR_EAST: 48;
        LM_SET_DOOR_NORTH: 49;
        LM_SET_DOOR_SOUTH: 50;
        LM_SET_DOOR_WEST: 47;
        LM_SET_FRAME: 83;
        LM_SET_FRAME_3DS: 85;
        LM_SET_GRM: 76;
        LM_SET_HIT_ZONE: 119;
        LM_SET_HOLO_POS: 72;
        LM_SET_LIFE_POINT_OBJ: 61;
        LM_SET_MAGIC_LEVEL: 59;
        LM_SET_RAIL: 133;
        LM_SET_SPRITE: 84;
        LM_SET_TRACK: 23;
        LM_SET_TRACK_OBJ: 24;
        LM_SET_USED_INVENTORY: 67;
        LM_SHADOW_OBJ: 57;
        LM_STATE_INVENTORY: 111;
        LM_STOP_L_TRACK: 42;
        LM_STOP_L_TRACK_OBJ: 137;
        LM_SUB_LIFE_POINT_OBJ: 62;
        LM_SUB_MAGIC_POINT: 60;
        LM_SUICIDE: 38;
        LM_THE_END: 98;
        LM_TRACK_TO_VAR_GAME: 101;
        LM_USE_ONE_LITTLE_KEY: 39;
        LM_VAR_GAME_TO_TRACK: 102;
    }
    Index

    Properties

    $ LM_ACTION LM_ADD_CHOICE LM_ADD_GOLD_PIECES LM_ADD_LIFE_POINT_OBJ LM_ANIM LM_ANIM_OBJ LM_ANIM_SET LM_ANIM_TEXTURE LM_ASK_CHOICE LM_ASK_CHOICE_OBJ LM_BACKGROUND LM_BETA LM_BODY LM_BODY_OBJ LM_BRICK_COL LM_BRUTAL_EXIT LM_BULLE LM_CAM_FOLLOW LM_CAMERA_CENTER LM_CHANGE_CUBE LM_CINEMA_MODE LM_CLR_HOLO_POS LM_COMPORTEMENT_HERO LM_ECHELLE LM_ECLAIR LM_END_LIFE LM_ESCALATOR LM_FADE_TO_PAL LM_FALLABLE LM_FLOW_OBJ LM_FLOW_POINT LM_FOUND_OBJECT LM_FULL_POINT LM_GAME_OVER LM_GIVE_BONUS LM_GIVE_GOLD_PIECES LM_HIT_OBJ LM_IMPACT_OBJ LM_IMPACT_POINT LM_INC_CLOVER_BOX LM_INIT_BUGGY LM_INVERSE_BETA LM_INVISIBLE LM_KILL_OBJ LM_MEMO_ARDOISE LM_MESSAGE LM_MESSAGE_OBJ LM_MESSAGE_ZOE LM_NEW_SAMPLE LM_NO_BODY LM_NO_CHOC LM_OBJ_COL LM_PALETTE LM_PARM_SAMPLE LM_PCX LM_PCX_MESS_OBJ LM_PLAY_ACF LM_PLAY_MUSIC LM_PLUIE LM_POS_OBJ_AROUND LM_POS_POINT LM_REPEAT_SAMPLE LM_RESTORE_COMPORTEMENT LM_RESTORE_COMPORTEMENT_OBJ LM_RESTORE_HERO LM_RESTORE_L_TRACK LM_RESTORE_L_TRACK_OBJ LM_SAMPLE LM_SAMPLE_ALWAYS LM_SAMPLE_RND LM_SAMPLE_STOP LM_SAVE_COMPORTEMENT LM_SAVE_COMPORTEMENT_OBJ LM_SAVE_HERO LM_SET_ANIM_DIAL LM_SET_ARMURE LM_SET_ARMURE_OBJ LM_SET_CAMERA LM_SET_CHANGE_CUBE LM_SET_COMPORTEMENT LM_SET_COMPORTEMENT_OBJ LM_SET_CONTROL LM_SET_CONTROL_OBJ LM_SET_DOOR_EAST LM_SET_DOOR_NORTH LM_SET_DOOR_SOUTH LM_SET_DOOR_WEST LM_SET_FRAME LM_SET_FRAME_3DS LM_SET_GRM LM_SET_HIT_ZONE LM_SET_HOLO_POS LM_SET_LIFE_POINT_OBJ LM_SET_MAGIC_LEVEL LM_SET_RAIL LM_SET_SPRITE LM_SET_TRACK LM_SET_TRACK_OBJ LM_SET_USED_INVENTORY LM_SHADOW_OBJ LM_STATE_INVENTORY LM_STOP_L_TRACK LM_STOP_L_TRACK_OBJ LM_SUB_LIFE_POINT_OBJ LM_SUB_MAGIC_POINT LM_SUICIDE LM_THE_END LM_TRACK_TO_VAR_GAME LM_USE_ONE_LITTLE_KEY LM_VAR_GAME_TO_TRACK

    Properties

    Contains enum operations for this enum object

    LM_ACTION: 82

    Triggers Twinsen's action (like pressing the Z key).

    LM_ADD_CHOICE: 68

    Adds choice to the next ask.

    The first choice added will become default one (in the case the dialog is closed by Esc key or similar).

    i16

    LM_ADD_GOLD_PIECES: 136

    Gives money to Twinsen.

    i16

    LM_ADD_LIFE_POINT_OBJ: 110

    Adds health to another actor.

    u8

    u8

    LM_ANIM: 19

    Changes the animation of the actor.

    u16

    LM_ANIM_OBJ: 20

    Changes the animation of another actor.

    u8

    u16

    LM_ANIM_SET: 95

    Sets this actor's animation.

    u16

    LM_ANIM_TEXTURE: 103

    Enable or disable texture animation.

    u8

    LM_ASK_CHOICE: 69

    Says a line of dialogue and offers choices.

    i16

    LM_ASK_CHOICE_OBJ: 91

    Another actor says a line of dialogue and offers choices.

    u8

    i16

    LM_BACKGROUND: 127

    Sets or clears the "background" (don't redraw) flag for this actor.

    u8

    LM_BETA: 80

    Rotates actor.

    i16

    LM_BODY: 17

    Changes the model of the actor.

    u8

    LM_BODY_OBJ: 18

    Changes the model of another actor.

    u8

    u8

    LM_BRICK_COL: 54

    Enables or disables terrain collisions for this actor.

    u8

    LM_BRUTAL_EXIT: 105

    Ends the game without displaying the credits.

    LM_BULLE: 89

    Enables or disables use of speech balloons.

    u8

    LM_CAM_FOLLOW: 29

    Make camera follow an actor.

    u8

    LM_CAMERA_CENTER: 22

    Recentres camera.

    u8

    LM_CHANGE_CUBE: 52

    Move to a different scene.

    u8

    LM_CINEMA_MODE: 92

    Enables or disables cutscene mode.

    u8

    LM_CLR_HOLO_POS: 73

    Removes a marker from the holomap.

    u8

    LM_COMPORTEMENT_HERO: 30

    Set Twinsen's stance.

    u8 - TwinsenStances

    LM_ECHELLE: 107

    Enables or disables a ladder zone.

    u8

    u8

    LM_ECLAIR: 65

    Display a lightning flash for some amount of deciseconds. Usefull, for example, to create weather changing effects. This is also used by game scripts on Citadel island to display lightning during the stormy weather.

    u8 - duration in deciseconds

    LM_END_LIFE: 41

    Ends the LBA life script execution for this actor. Note, that the Ida life script execution will continue if it's setup

    LM_ESCALATOR: 99

    Enables or disables a conveyor zone.

    u8

    u8

    LM_FADE_TO_PAL: 81

    Fades to the given palette.

    u8

    LM_FALLABLE: 26

    Sets whether actor can fall.

    u8

    LM_FLOW_OBJ: 146

    Displays a particle animation on an actor.

    u8

    u8

    LM_FLOW_POINT: 145

    Displays a particle animation at a point.

    u8

    u8

    LM_FOUND_OBJECT: 46

    Display the "found object" overlay.

    u8

    LM_FULL_POINT: 79

    Restores Twinsen's health, mana and healing horn.

    LM_GAME_OVER: 97

    Kills Twinsen and ends the game.

    LM_GIVE_BONUS: 51

    Gives this actor's bonus items.

    u8

    LM_GIVE_GOLD_PIECES: 40

    Takes money from Twinsen.

    i16

    LM_HIT_OBJ: 63

    Deals damage to another actor, caused by this actor.

    u8

    u8

    LM_IMPACT_OBJ: 86

    Plays an impact animation above an actor.

    u8

    i16

    i16

    LM_IMPACT_POINT: 87

    Plays an impact animation at a point.

    u8

    i16

    LM_INC_CLOVER_BOX: 66

    Gives Twinsen another clover box.

    LM_INIT_BUGGY: 70

    Sets up Twinsen's car.

    u8

    LM_INVERSE_BETA: 134

    Rotates the actor to face the opposite direction.

    LM_INVISIBLE: 56

    Makes the actor invisible or visible again.

    u8

    LM_KILL_OBJ: 37

    Kills the given actor.

    u8

    LM_MEMO_ARDOISE: 71

    Adds a picture to the memo slate.

    u8

    LM_MESSAGE: 25

    Says a line of dialogue.

    i16

    LM_MESSAGE_OBJ: 44

    Another actor says a line of dialogue.

    u8

    i16

    LM_MESSAGE_ZOE: 78

    Says a line using Zoe's parameters (like dialog color).

    i16

    LM_NEW_SAMPLE: 152

    Plays an audio sample on this actor with custom parameters.

    i16

    i16

    u8

    i16

    LM_NO_BODY: 135

    Hides the model for this actor.

    LM_NO_CHOC: 90

    Enables or disables ignoring hits/damage to this actor.

    u8

    LM_OBJ_COL: 53

    Enables or disables object/actor collisions for this actor.

    u8

    LM_PALETTE: 10

    Switches the game's palette.

    u8

    LM_PARM_SAMPLE: 151

    Configures audio sample parameters.

    i16

    u8

    i16

    LM_PCX: 148

    Displays a full-screen image.

    u8 - id of the image to display (from SCREEN.HQR, vanilla images have numbers 0..38)

    u8 (0 or 1) - effect to apply (0 - fade, 1 - venetian blinds, but 1 doesn't really work good, so use 0)

    LM_PCX_MESS_OBJ: 154

    Show a dialog message on a still image background.

    • NOTE1: Only images that use LBA2 palette will work good with the dialogs. Some images from SCREEN.HQR are not supposed to work with dialogs, so the colors will be displayed broken. If you use a custom image, please import it using LBA palette.

    • NOTE2: use the Big dialog flags for the messages in this mode. The small messages might work not good, showing scene actors on top of image. If you want to try a small message, try hiding all the actors in the view by LifeOpcodes.LM_INVISIBLE command. This doesn't, however, always work.

    u8 - id of image to display (from SCREEN.HQR, vanilla images have numbers 0..38)

    u8 - effect (0 - fade or 1 - venetian blinds, but 1 doesn't really work good, so use 0)

    u8 - actor id for the dialog message

    i16 - dialog message id, custom dialog is allowed

    LM_PLAY_ACF: 64

    Plays the named cutscene video.

    GameVideos to use the vanilla game videos.

    char[] - the name of the video file to play.

    LM_PLAY_MUSIC: 100

    Plays a music track.

    u8

    LM_PLUIE: 96

    Makes it rain for some amount of deciseconds. Use, for example, to create weather changing effects.

    u8 - duration in deciseconds

    LM_POS_OBJ_AROUND: 153

    Positions an actor on or near another actor.

    u8

    u8

    LM_POS_POINT: 58

    Moves this actor to a point.

    u8

    LM_REPEAT_SAMPLE: 126

    Like SAMPLE but plays the given number of repeats.

    i16

    u8

    LM_RESTORE_COMPORTEMENT: 121

    Restores this actor's behaviour from the hidden variable.

    LM_RESTORE_COMPORTEMENT_OBJ: 140

    Restores the life script behaviour of another actor from a hidden variable.

    u8

    LM_RESTORE_HERO: 94

    Restores Twinsen's stance from a hidden variable.

    LM_RESTORE_L_TRACK: 43

    Restores the move script track from the hidden variable.

    LM_RESTORE_L_TRACK_OBJ: 138

    Restores the move script track of another actor from the hidden variable.

    u8

    LM_SAMPLE: 122

    Plays a sound sample coming from this actor.

    i16

    LM_SAMPLE_ALWAYS: 124

    Like SAMPLE but plays the sample continuously.

    i16

    LM_SAMPLE_RND: 123

    Like SAMPLE but randomly alters the sample's frequency.

    i16

    LM_SAMPLE_STOP: 125

    Stops the given sample if it is playing from this actor.

    i16

    LM_SAVE_COMPORTEMENT: 120

    Saves this actor's behaviour index to a hidden variable.

    LM_SAVE_COMPORTEMENT_OBJ: 139

    Saves the life script behaviour of another actor to a hidden variable.

    u8

    LM_SAVE_HERO: 93

    Saves Twinsen's stance to a hidden variable.

    LM_SET_ANIM_DIAL: 147

    Sets the animation to use when talking.

    u16

    LM_SET_ARMURE: 108

    Sets this actor's armour value.

    u8

    LM_SET_ARMURE_OBJ: 109

    Sets the armour value of another actor.

    u8

    u8

    LM_SET_CAMERA: 21

    Enables or disables a camera zone.

    u8

    u8

    LM_SET_CHANGE_CUBE: 77

    Enables or disables a teleport zone.

    u8

    u8

    LM_SET_COMPORTEMENT: 33

    Jumps to a new behaviour block.

    pc16

    LM_SET_COMPORTEMENT_OBJ: 34

    Changes the active behaviour of another actor.

    u8

    pc16

    LM_SET_CONTROL: 27

    Sets this actor's movement mode (Original: LM_SET_DIR). An optional target parameter is needed if mode is one of the following:

    u8 - ControlModes

    u8

    LM_SET_CONTROL_OBJ: 28

    Sets another actor's movement mode (Original: LM_SET_DIR_OBJ). An optional target parameter is needed if mode is one of the following:

    u8

    u8 - ControlModes

    u8

    LM_SET_DOOR_EAST: 48

    Immediately shifts this door to the East (cpp name: LM_SET_DOOR_RIGHT)

    i16

    LM_SET_DOOR_NORTH: 49

    Immediately shifts this door to the North (cpp name: LM_SET_DOOR_UP)

    i16

    LM_SET_DOOR_SOUTH: 50

    Immediately shifts this door to the South (cpp name: LM_SET_DOOR_DOWN)

    i16

    LM_SET_DOOR_WEST: 47

    Immediately shifts this door to the West (cpp name: LM_SET_DOOR_LEFT)

    i16

    LM_SET_FRAME: 83

    Changes the frame number of this actor's animation.

    u8

    LM_SET_FRAME_3DS: 85

    Changes the frame number of this actor's animated sprite.

    u8

    LM_SET_GRM: 76

    Enables or disables a terrain chunk.

    u8

    u8

    LM_SET_HIT_ZONE: 119

    Enables or disables a spike/trap zone.

    u8

    u8

    LM_SET_HOLO_POS: 72

    Adds a marker to the holomap.

    u8

    LM_SET_LIFE_POINT_OBJ: 61

    Sets the health of an actor.

    u8

    u8

    LM_SET_MAGIC_LEVEL: 59

    Sets Twinsen's magic level.

    u8

    LM_SET_RAIL: 133

    Enables or disables a rail zone.

    u8

    u8

    LM_SET_SPRITE: 84

    Changes the sprite used for this actor.

    u8

    LM_SET_TRACK: 23

    Changes this actor's move script track.

    i16

    LM_SET_TRACK_OBJ: 24

    Changes another actor's move script track.

    u8

    i16

    LM_SET_USED_INVENTORY: 67

    Use inventory item.

    u8

    LM_SHADOW_OBJ: 57

    Enables or disables the shadow for another actor.

    u8

    u8

    LM_STATE_INVENTORY: 111

    Changes the state/variant of an inventory object.

    u8

    u8

    LM_STOP_L_TRACK: 42

    Saves the move script track to a hidden variable.

    LM_STOP_L_TRACK_OBJ: 137

    Saves the move script track of another actor to a hidden variable.

    u8

    LM_SUB_LIFE_POINT_OBJ: 62

    Subtracts health from another actor.

    u8

    u8

    LM_SUB_MAGIC_POINT: 60

    Drains some of Twinsen's mana.

    u8

    LM_SUICIDE: 38

    Disables this actor from the scene completely. No visuals, collisions, scripts or any other interactions will appear to this actor until the scene restarts.

    LM_THE_END: 98

    Ends the game and shows the credits.

    LM_TRACK_TO_VAR_GAME: 101

    Saves this actor's move script track to a game variable.

    u8

    LM_USE_ONE_LITTLE_KEY: 39

    Subtracts one key from the inventory.

    LM_VAR_GAME_TO_TRACK: 102

    Sets this actor's move script track from a game variable.

    u8