Table Flow

Functions that (mostly) don't directly impact in-game mechanics.

Used for setup in gameflow.lua, settings.lua and strings.lua; some can be used in level scripts too.

gameflow.lua

AddLevel(level) Add a level to the Flow.
SetIntroImagePath(path) Image to show when loading the game.
SetTitleScreenImagePath(path) Image to show in the background of the title screen.
EnableLaraInTitle(enabled) Enable or disable Lara drawing in title flyby.
EnableLevelSelect(enabled) Enable or disable level selection in title flyby.

gameflow.lua or level scripts

EnableFlyCheat(enabled) Enable or disable DOZY mode (fly cheat).
EnableMassPickup(enabled) Enable or disable mass pickup.
GetLevel(index) Returns the level by index.
GetCurrentLevel() Returns the level that the game control is running in that moment.
EndLevel([index]) Finishes the current level, with optional level index provided.
GetSecretCount() Returns the player's current per-game secret count.
SetSecretCount(count) Sets the player's current per-game secret count.
AddSecret(index) Adds one secret to current level secret count and also plays secret music track.
SetTotalSecretCount(total) Total number of secrets in game.

settings.lua

SetSettings(settings)
SetAnimations(animations)

strings.lua

SetStrings(table) Set string variable keys and their translations.
GetString(string) Get translated string
SetLanguageNames(table) Set language names for translations.


gameflow.lua

These functions are called in gameflow.lua, a file loosely equivalent to winroomedit's SCRIPT.DAT. They handle a game's 'metadata'; i.e., things such as level titles, loading screen paths, and default ambient tracks.
AddLevel(level)
Add a level to the Flow.

Parameters:

  • level Level a level object
SetIntroImagePath(path)
Image to show when loading the game. Must be a .jpg or .png image.

Parameters:

  • path string the path to the image, relative to the TombEngine exe
SetTitleScreenImagePath(path)
Image to show in the background of the title screen. Must be a .jpg or .png image. (not yet implemented)

Parameters:

  • path string the path to the image, relative to the TombEngine exe
EnableLaraInTitle(enabled)
Enable or disable Lara drawing in title flyby. Must be true or false

Parameters:

  • enabled bool true or false
EnableLevelSelect(enabled)
Enable or disable level selection in title flyby. Must be true or false

Parameters:

  • enabled bool true or false

gameflow.lua or level scripts

EnableFlyCheat(enabled)
Enable or disable DOZY mode (fly cheat). Must be true or false

Parameters:

  • enabled bool true or false
EnableMassPickup(enabled)
Enable or disable mass pickup. Must be true or false

Parameters:

  • enabled bool true or false
GetLevel(index)
Returns the level by index. Indices depend on the order in which AddLevel was called; the first added will have an ID of 0, the second an ID of 1, and so on.

Parameters:

  • index int of the level

Returns:

    Level the level indicated by the id
GetCurrentLevel()
Returns the level that the game control is running in that moment.

Returns:

    Level the current level
EndLevel([index])
Finishes the current level, with optional level index provided. If level index is not provided or is zero, jumps to next level. If level index is more than level count, jumps to title.

Parameters:

  • index int level index (default 0) (optional)
GetSecretCount()
Returns the player's current per-game secret count.

Returns:

    int Current game secret count.
SetSecretCount(count)
Sets the player's current per-game secret count.

Parameters:

  • count int new secret count.
AddSecret(index)
Adds one secret to current level secret count and also plays secret music track. The index argument corresponds to the secret's unique ID, the same that would go in a secret trigger's Param.

Parameters:

  • index int an index of current level's secret (must be from 0 to 31).
SetTotalSecretCount(total)
Total number of secrets in game. Must be an integer value (0 means no secrets).

Parameters:

  • total int number of secrets

settings.lua

These functions are called in settings.lua, a file which holds your local settings. settings.lua shouldn't be bundled with any finished levels/games.
SetSettings(settings)

Parameters:

SetAnimations(animations)

Parameters:

strings.lua

These functions used in strings.lua, which is generated by TombIDE. You will not need to call them manually.
SetStrings(table)
Set string variable keys and their translations.

Parameters:

  • table tab array-style table with strings
GetString(string)
Get translated string

Parameters:

  • string key key for translated string
SetLanguageNames(table)
Set language names for translations. Specify which translations in the strings table correspond to which languages.

Parameters:

  • table tab array-style table with language names
generated by TEN-LDoc (a fork of LDoc 1.4.6) Last updated 2023-06-03 11:42:57