LT-Maker Event Commands

This page aims to clarify how to use certain event commands in Lex Talionis/LT-Maker.

Table of Contents

change_tilemap

change_tilemap is used to change the map layout with another layout defined in the Tileset editor. It has the folowing arguments:

  • Tilemap
  • PositionOffset
  • LoadTilemap

change_tilemap also has the following optional flags:

  • reload

NOTE: During gameplay, using turnwheel will prevent the player from turning back time to a point prior to the execution of this event command.

WARNING! A common mistake when using this command is not adding the reload flag when this command is used for an introduction cutscene. Without this flag, regions that were defined in the level's Regions tab will NOT be loaded at the start of the level. To ensure they are loaded properly, make sure the reload flag is added each time this command is used before the gameplay portion of the map begins. An alternate solution is to use the add_region command at the end of the cutscene to add the intended regions to their proper positions.

Tilemap

The NID of the tilemap (as defined in the Tilemap editor) to change into.

PositionOffset

Accepts a valid (x, y) tuple (x and y must be integers). If the reload flag is added, the currently loaded units and regions will have their positions moved to the left (if x is negative), right (if x is positive), up (if y is negative), or down (if y is positive).

LoadTilemap

Accepts the NID of a tilemap used in a previous level. If the reload flag is added, unit deployment positions from LoadTilemap will be used.

Example: You are currently on Chapter 2. change_tilemap executes with the Tilemap and LoadTilemap arguments as Chapter 1. When the layout of the tilemap changes from Chapter 2's tilemap to Chapter 1's tilemap, uhhhh

choice (WIP)

choice creates a menu that allows the player to choose between different options. Often used in tandem with the if and else commands. It has the following arguments:

  • Nid
  • Title
  • Choices
  • RowWidth
  • Orientation
  • Alignment
  • BG
  • EventNid
  • EntryType
  • Dimensions
  • TextAlign

Nid

The choice the player makes is stored in a game variable with the name defined in this argument.

Title

The prompt that will show up on the first line of the choice menu.

Example: Which side will you choose?

Choices

A list of the selectable options. Each option is separated by a comma.

Example: Hoshido,Nohr,Neither side,Smash!

RowWidth

How wide the menu will be when drawn on the game window measured in pixels. The default width of the game window is 240.

Orientation

How each choice is laid out on the screen. Choices will be listed from left to right if horizontal, horiz, or h is used. Choices will be listed from top to bottom if vertical, vert, or v is used.

Alignment

Where the choice menu will appear on the game window. Must be one of top_left, top, top_right, left, center, right, bottom_left, bottom, bottom_right

BG

Accepts the file name of any sprite resource in the project folder or engine folder. The default sprite used is lt-maker/sprites/menu_bg_base_opaque.png

spawn_group

spawn_group is intended to be used as a functionally similar combination of the event commands add_group and move_group. It has the following arguments:

  • Group
  • CardinalDirection
  • StartingGroup
  • MovementType
  • Placement

spawn_group also has the following optional flags:

  • create
  • no_block
  • no_follow

Group

The group's NID. Defined in the level's Group tag.

CardinalDirection

The side of the map from which the group will initially appear. Must be one of north, south, east, west

StartingGroup

Defines the ending position of each unit in the group. Set it as the Group NID to match the positions defined in the level's Group tab. Set it as starting to match the positions defined in the level's Unit tab.

MovementType

Sets the animation the group will use to move to their ending positions. Must be one of normal, fade, immediate, warp, swoosh

normal

Units will walk from CardinalDirection position to StartingGroup positions. Movement cost and terrain are taken into account when determining the units' pathfinding. The unit will walk on any tile as long as its movement cost is defined as less than 99 in the Movement Cost editor.

fade

Units will fade out from CardinalDirection position and fade into StartingGroup positions.

immediate

Units will appear instantaneously in their StartingGroup positions.

warp

Units will fade out from CardinalDirection position and fade into StartingGroup positions with the Warp map animation (its default name in the Map Animation editor) for each fade.

swoosh

Units will fade out from CardinalDirection position and fade into StartingGroup positions with the Swoosh map animation (its default name in the Map Animation editor) for each fade.

Placement

Sets how units will be placed on the positions defined in StartingGroup. Must be one of giveup, stack, closest, push

giveup

If one of the unit's positions is occupied, the unit will stay on the edge of the map defined in CardinalDirection.

stack

The unit will be placed on its defined StartingGroup position even if it is currently occupied. The unit will share the position with the unit currently occupying the tile and may cause issues during actual gameplay. This is best used for cutscene purposes.

closest

If one of the unit's positions is occupied, the unit will be placed on the nearest tile to its StartingGroup position. Otherwise, it will move to its defined StartingGroup position.

push

If one of the unit's positions is occupied, the unit will be push the current unit away from their end position. Otherwise, it will move to its defined StartingGroup position.

Optional Flags

create

A copy of the group with new NIDs for each copy will be created. Good for creating multiple, repeating waves of reinforcements.

no_block

Allows this event command to not interrupt proceeding event commands.

no_follow

The cameral will not focus on the group as it moves to its StartingGroup position.