TombEngine/Documentation/doc/1 modules/Flow.html
Lwmte f4763bd4a2
Customize global hardcoded parameters (#1495)
* Initial commit

* Update CHANGELOG.md

* Tint flare smoke

* Expose GetCustomizations

* Added lensflare and flicker customization options for flare

* Update LensFlare.cpp

* Remove unnecessary code

* Update lara_flare.cpp

* Massive refactor to merge animations, settings and customizations

* Add HUD customization options

* Customize weapons

* Fixed flare, renamed recoil to interval, fixed lensflare default

* Occlude flare lensflares

* Update Settings.cpp

* Use alternate damage for lasersight mode

* Added hair cust

* Fix comment

* Fix another comment

* Fix link

* Fix placeholder table names

* Reorganize types

* Add missing initializers for hair settings

* Added physics cust

* Clarify description

* Update settings.lua

* Update CHANGELOG.md

* Add gun smoke, gun shells and ammo pickup counts

* Fix naming ambiguity

* Remove missing features from documentation

* Fix comment

* Fix parameter name, change default settings file

* Fixed pitch black

* Rollback DoDistanceFogForVertex

* Add camera cust

* Change binocular/lasersight toggle to color

* Update lara_basic.cpp

* Add time and statistics classes and script API for it

* Fix comment

* Use DoDamage on Lara helpers to register with statistics

* Update Time.cpp

* Fix documentation

* Fix default flare timeout

* Update Settings.lua

* Add flare muzzle offset customization

* Remove young Lara limitations

* Fix lasersight color

* Push full settings.lua

* Update RendererCompatibility.cpp

* Allow to customize root meshes, decopypaste hair and joint init code

* Added sol Time operator overloads

* Some changes to docs, add meaningful error for unknown fields

* Use existing new index template, add gunflash color settings, add shotgun muzzle

* Remove excessive usage of GetSettings()

* Cleanups

* Update Settings.lua

* Clarify parameter name

* Fix InitializeWeaponInfo

* PR review code tidying

* Fix bad merge

* Update FlowHandler.cpp

* Remove tabs for LDoc comments

* Use different comment style to preserve formatting

* Update lara_fire.cpp

* Some cleanups

* Fixed GetTimeUnits

* Fix typo

* Update Time.cpp

---------

Co-authored-by: Sezz <sezzary@outlook.com>
2024-12-15 18:24:49 +02:00

1127 lines
28 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.6 Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>&nbsp;TombEngine</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>1 Modules</h2>
<ul class="nowrap">
<li> <a href="../1 modules/Effects.html">Effects</a></li>
<li> <here>Flow</here></li>
<li> <a href="../1 modules/Input.html">Input</a></li>
<li> <a href="../1 modules/Inventory.html">Inventory</a></li>
<li> <a href="../1 modules/Logic.html">Logic</a></li>
<li> <a href="../1 modules/Objects.html">Objects</a></li>
<li> <a href="../1 modules/Sound.html">Sound</a></li>
<li> <a href="../1 modules/Strings.html">Strings</a></li>
<li> <a href="../1 modules/Util.html">Util</a></li>
<li> <a href="../1 modules/View.html">View</a></li>
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Objects.AIObject.html">Objects.AIObject</a></li>
<li> <a href="../2 classes/Objects.Camera.html">Objects.Camera</a></li>
<li> <a href="../2 classes/Objects.LaraObject.html">Objects.LaraObject</a></li>
<li> <a href="../2 classes/Objects.Moveable.html">Objects.Moveable</a></li>
<li> <a href="../2 classes/Objects.Room.html">Objects.Room</a></li>
<li> <a href="../2 classes/Objects.Sink.html">Objects.Sink</a></li>
<li> <a href="../2 classes/Objects.SoundSource.html">Objects.SoundSource</a></li>
<li> <a href="../2 classes/Objects.Static.html">Objects.Static</a></li>
<li> <a href="../2 classes/Objects.Volume.html">Objects.Volume</a></li>
<li> <a href="../2 classes/Strings.DisplayString.html">Strings.DisplayString</a></li>
<li> <a href="../2 classes/View.DisplaySprite.html">View.DisplaySprite</a></li>
</ul>
<h2>3 Primitive Classes</h2>
<ul class="nowrap">
<li> <a href="../3 primitive classes/Flow.Fog.html">Flow.Fog</a></li>
<li> <a href="../3 primitive classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
<li> <a href="../3 primitive classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
<li> <a href="../3 primitive classes/Flow.Mirror.html">Flow.Mirror</a></li>
<li> <a href="../3 primitive classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
<li> <a href="../3 primitive classes/Flow.Starfield.html">Flow.Starfield</a></li>
<li> <a href="../3 primitive classes/Flow.Statistics.html">Flow.Statistics</a></li>
<li> <a href="../3 primitive classes/Color.html">Color</a></li>
<li> <a href="../3 primitive classes/Rotation.html">Rotation</a></li>
<li> <a href="../3 primitive classes/Time.html">Time</a></li>
<li> <a href="../3 primitive classes/Vec2.html">Vec2</a></li>
<li> <a href="../3 primitive classes/Vec3.html">Vec3</a></li>
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Flow.WeaponType.html">Flow.WeaponType</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>
<li> <a href="../4 enums/Objects.MoveableStatus.html">Objects.MoveableStatus</a></li>
<li> <a href="../4 enums/Objects.ObjID.html">Objects.ObjID</a></li>
<li> <a href="../4 enums/Objects.RoomFlagID.html">Objects.RoomFlagID</a></li>
<li> <a href="../4 enums/Objects.RoomReverb.html">Objects.RoomReverb</a></li>
<li> <a href="../4 enums/Sound.SoundTrackType.html">Sound.SoundTrackType</a></li>
<li> <a href="../4 enums/Strings.DisplayStringOption.html">Strings.DisplayStringOption</a></li>
<li> <a href="../4 enums/Util.LogLevel.html">Util.LogLevel</a></li>
<li> <a href="../4 enums/View.AlignMode.html">View.AlignMode</a></li>
<li> <a href="../4 enums/View.CameraType.html">View.CameraType</a></li>
<li> <a href="../4 enums/View.PostProcessMode.html">View.PostProcessMode</a></li>
<li> <a href="../4 enums/View.ScaleMode.html">View.ScaleMode</a></li>
</ul>
<h2>5 Lua utility modules</h2>
<ul class="nowrap">
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
</ul>
</div>
<div id="content">
<h1>Table <code>Flow</code></h1>
<p>Functions that (mostly) don't directly impact in-game mechanics.</p>
<p> Used for setup
in gameflow.lua, settings.lua and strings.lua; some can be used in level
scripts too.</p>
<h2><a href="#gameflow_lua">gameflow.lua </a></h2>
<table class="function_list">
<tr>
<td class="name" ><a href="#AddLevel">AddLevel(level)</a></td>
<td class="summary">Add a level to the Flow.</td>
</tr>
<tr>
<td class="name" ><a href="#SetIntroImagePath">SetIntroImagePath(path)</a></td>
<td class="summary">Image to show when loading the game.</td>
</tr>
<tr>
<td class="name" ><a href="#SetTitleScreenImagePath">SetTitleScreenImagePath(path)</a></td>
<td class="summary">Image to show in the background of the title screen.</td>
</tr>
<tr>
<td class="name" ><a href="#EnableLaraInTitle">EnableLaraInTitle(enabled)</a></td>
<td class="summary">Enable or disable Lara drawing in title flyby.</td>
</tr>
<tr>
<td class="name" ><a href="#EnableLevelSelect">EnableLevelSelect(enabled)</a></td>
<td class="summary">Enable or disable level selection in title flyby.</td>
</tr>
<tr>
<td class="name" ><a href="#EnableHomeLevel">EnableHomeLevel(enabled)</a></td>
<td class="summary">Enable or disable Home Level entry in the main menu.</td>
</tr>
<tr>
<td class="name" ><a href="#EnableLoadSave">EnableLoadSave(enabled)</a></td>
<td class="summary">Enable or disable saving and loading of savegames.</td>
</tr>
</table>
<h2><a href="#gameflow_lua_or_level_scripts">gameflow.lua or level scripts </a></h2>
<table class="function_list">
<tr>
<td class="name" ><a href="#EnableFlyCheat">EnableFlyCheat(enabled)</a></td>
<td class="summary">Enable or disable the fly cheat.</td>
</tr>
<tr>
<td class="name" ><a href="#EnablePointFilter">EnablePointFilter(enabled)</a></td>
<td class="summary">Enable or disable point texture filter.</td>
</tr>
<tr>
<td class="name" ><a href="#EnableMassPickup">EnableMassPickup(enabled)</a></td>
<td class="summary">Enable or disable mass pickup.</td>
</tr>
<tr>
<td class="name" ><a href="#GetLevel">GetLevel(index)</a></td>
<td class="summary">Returns the level by index.</td>
</tr>
<tr>
<td class="name" ><a href="#GetCurrentLevel">GetCurrentLevel()</a></td>
<td class="summary">Returns the level that the game control is running in that moment.</td>
</tr>
<tr>
<td class="name" ><a href="#GetNextLevel">GetNextLevel()</a></td>
<td class="summary">Returns the level that is about to load.</td>
</tr>
<tr>
<td class="name" ><a href="#EndLevel">EndLevel([index][, startPos])</a></td>
<td class="summary">Finishes the current level, with optional level index and start position index provided.</td>
</tr>
<tr>
<td class="name" ><a href="#GetStatistics">GetStatistics(game)</a></td>
<td class="summary">Get game or level statistics.</td>
</tr>
<tr>
<td class="name" ><a href="#SetStatistics">SetStatistics(statistics, game)</a></td>
<td class="summary">Set game or level statistics.</td>
</tr>
<tr>
<td class="name" ><a href="#GetGameStatus">GetGameStatus()</a></td>
<td class="summary">Get current game status, such as normal game loop, exiting to title, etc.</td>
</tr>
<tr>
<td class="name" ><a href="#GetFreezeMode">GetFreezeMode()</a></td>
<td class="summary">Get current freeze mode, such as none, full, spectator or player.</td>
</tr>
<tr>
<td class="name" ><a href="#SetFreezeMode">SetFreezeMode(freezeMode)</a></td>
<td class="summary">Set current freeze mode, such as none, full, spectator or player.</td>
</tr>
<tr>
<td class="name" ><a href="#SaveGame">SaveGame(slotID)</a></td>
<td class="summary">Save the game to a savegame slot.</td>
</tr>
<tr>
<td class="name" ><a href="#LoadGame">LoadGame(slotID)</a></td>
<td class="summary">Load the game from a savegame slot.</td>
</tr>
<tr>
<td class="name" ><a href="#DeleteSaveGame">DeleteSaveGame(slotID)</a></td>
<td class="summary">Delete a savegame.</td>
</tr>
<tr>
<td class="name" ><a href="#DoesSaveGameExist">DoesSaveGameExist(slotID)</a></td>
<td class="summary">Check if a savegame exists.</td>
</tr>
<tr>
<td class="name" ><a href="#GetSecretCount">GetSecretCount()</a></td>
<td class="summary">Returns the player's current per-game secret count.</td>
</tr>
<tr>
<td class="name" ><a href="#SetSecretCount">SetSecretCount(count)</a></td>
<td class="summary">Sets the player's current per-game secret count.</td>
</tr>
<tr>
<td class="name" ><a href="#AddSecret">AddSecret(index)</a></td>
<td class="summary">Adds one secret to current level secret count and also plays secret music track.</td>
</tr>
<tr>
<td class="name" ><a href="#SetTotalSecretCount">SetTotalSecretCount(total)</a></td>
<td class="summary">Total number of secrets in game.</td>
</tr>
<tr>
<td class="name" ><a href="#FlipMap">FlipMap(flipmap)</a></td>
<td class="summary">Do FlipMap with specific group ID.</td>
</tr>
<tr>
<td class="name" ><a href="#GetFlipMapStatus">GetFlipMapStatus([index])</a></td>
<td class="summary">Get current FlipMap status for specific group ID.</td>
</tr>
</table>
<h2><a href="#settings_lua">settings.lua </a></h2>
<table class="function_list">
<tr>
<td class="name" ><a href="#SetSettings">SetSettings(settings)</a></td>
<td class="summary">Set provided settings table to an engine.</td>
</tr>
<tr>
<td class="name" ><a href="#GetSettings">GetSettings()</a></td>
<td class="summary">Get settings table from an engine.</td>
</tr>
</table>
<h2><a href="#strings_lua">strings.lua </a></h2>
<table class="function_list">
<tr>
<td class="name" ><a href="#SetStrings">SetStrings(table)</a></td>
<td class="summary">Set string variable keys and their translations.</td>
</tr>
<tr>
<td class="name" ><a href="#GetString">GetString(string)</a></td>
<td class="summary">Get translated string.</td>
</tr>
<tr>
<td class="name" ><a href="#IsStringPresent">IsStringPresent(string)</a></td>
<td class="summary">Check if translated string is present.</td>
</tr>
<tr>
<td class="name" ><a href="#SetLanguageNames">SetLanguageNames(table)</a></td>
<td class="summary">Set language names for translations.</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header has-description"><a name="gameflow_lua"></a>gameflow.lua </h2>
<div class="section-description">
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.
</div>
<dl class="function">
<dt>
<a name = "AddLevel"></a>
<strong>AddLevel(level)</strong>
</dt>
<dd>
Add a level to the Flow.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">level</span>
<span class="types"><a class="type" href="../2 classes/Flow.Level.html#">Level</a></span>
a level object
</li>
</ul>
</dd>
<dt>
<a name = "SetIntroImagePath"></a>
<strong>SetIntroImagePath(path)</strong>
</dt>
<dd>
Image to show when loading the game.
Must be a .jpg or .png image.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">path</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
the path to the image, relative to the TombEngine exe
</li>
</ul>
</dd>
<dt>
<a name = "SetTitleScreenImagePath"></a>
<strong>SetTitleScreenImagePath(path)</strong>
</dt>
<dd>
Image to show in the background of the title screen.
Must be a .jpg or .png image.
<strong>(not yet implemented)</strong>
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">path</span>
<span class="types"><a class="type" href="https://www.lua.org/manual/5.4/manual.html#6.4">string</a></span>
the path to the image, relative to the TombEngine exe
</li>
</ul>
</dd>
<dt>
<a name = "EnableLaraInTitle"></a>
<strong>EnableLaraInTitle(enabled)</strong>
</dt>
<dd>
Enable or disable Lara drawing in title flyby.
Must be true or false
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">enabled</span>
<span class="types"><span class="type">bool</span></span>
true or false
</li>
</ul>
</dd>
<dt>
<a name = "EnableLevelSelect"></a>
<strong>EnableLevelSelect(enabled)</strong>
</dt>
<dd>
Enable or disable level selection in title flyby.
Must be true or false
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">enabled</span>
<span class="types"><span class="type">bool</span></span>
true or false
</li>
</ul>
</dd>
<dt>
<a name = "EnableHomeLevel"></a>
<strong>EnableHomeLevel(enabled)</strong>
</dt>
<dd>
Enable or disable Home Level entry in the main menu. ()
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">enabled</span>
<span class="types"><span class="type">bool</span></span>
True or false.
</li>
</ul>
</dd>
<dt>
<a name = "EnableLoadSave"></a>
<strong>EnableLoadSave(enabled)</strong>
</dt>
<dd>
Enable or disable saving and loading of savegames. ()
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">enabled</span>
<span class="types"><span class="type">bool</span></span>
True or false.
</li>
</ul>
</dd>
</dl>
<h2 class="section-header "><a name="gameflow_lua_or_level_scripts"></a>gameflow.lua or level scripts </h2>
<dl class="function">
<dt>
<a name = "EnableFlyCheat"></a>
<strong>EnableFlyCheat(enabled)</strong>
</dt>
<dd>
Enable or disable the fly cheat. ()
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">enabled</span>
<span class="types"><span class="type">bool</span></span>
True or false.
</li>
</ul>
</dd>
<dt>
<a name = "EnablePointFilter"></a>
<strong>EnablePointFilter(enabled)</strong>
</dt>
<dd>
Enable or disable point texture filter.
Must be true or false
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">enabled</span>
<span class="types"><span class="type">bool</span></span>
true or false
</li>
</ul>
</dd>
<dt>
<a name = "EnableMassPickup"></a>
<strong>EnableMassPickup(enabled)</strong>
</dt>
<dd>
Enable or disable mass pickup.
Must be true or false
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">enabled</span>
<span class="types"><span class="type">bool</span></span>
true or false
</li>
</ul>
</dd>
<dt>
<a name = "GetLevel"></a>
<strong>GetLevel(index)</strong>
</dt>
<dd>
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.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">index</span>
<span class="types"><span class="type">int</span></span>
of the level
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../2 classes/Flow.Level.html#">Level</a></span>
the level indicated by the id
</ol>
</dd>
<dt>
<a name = "GetCurrentLevel"></a>
<strong>GetCurrentLevel()</strong>
</dt>
<dd>
Returns the level that the game control is running in that moment.
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../2 classes/Flow.Level.html#">Level</a></span>
the current level
</ol>
</dd>
<dt>
<a name = "GetNextLevel"></a>
<strong>GetNextLevel()</strong>
</dt>
<dd>
Returns the level that is about to load. If no new level is about to load, returns current level.
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../2 classes/Flow.Level.html#">Level</a></span>
incoming new level or current level, if no new level is loading
</ol>
</dd>
<dt>
<a name = "EndLevel"></a>
<strong>EndLevel([index][, startPos])</strong>
</dt>
<dd>
Finishes the current level, with optional level index and start position 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. If LARA_START_POS objects are present in level, player will be
teleported to such object with OCB similar to provided second argument.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">index</span>
<span class="types"><span class="type">int</span></span>
level index (default 0)
(<em>optional</em>)
</li>
<li><span class="parameter">startPos</span>
<span class="types"><span class="type">int</span></span>
player start position (default 0)
(<em>optional</em>)
</li>
</ul>
</dd>
<dt>
<a name = "GetStatistics"></a>
<strong>GetStatistics(game)</strong>
</dt>
<dd>
Get game or level statistics. For reference about statistics class, see <a href="../3 primitive classes/Flow.Statistics.html#">Flow.Statistics</a>.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">game</span>
<span class="types"><span class="type">bool</span></span>
if true, returns overall game statistics, otherwise returns current level statistics (default: false)
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../3 primitive classes/Flow.Statistics.html#">Statistics</a></span>
statistics structure representing game or level statistics
</ol>
</dd>
<dt>
<a name = "SetStatistics"></a>
<strong>SetStatistics(statistics, game)</strong>
</dt>
<dd>
Set game or level statistics. For reference about statistics class, see <a href="../3 primitive classes/Flow.Statistics.html#">Flow.Statistics</a>.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">statistics</span>
<span class="types"><a class="type" href="../3 primitive classes/Flow.Statistics.html#">Statistics</a></span>
statistic object to set
</li>
<li><span class="parameter">game</span>
<span class="types"><span class="type">bool</span></span>
if true, sets overall game statistics, otherwise sets current level statistics (default: false)
</li>
</ul>
</dd>
<dt>
<a name = "GetGameStatus"></a>
<strong>GetGameStatus()</strong>
</dt>
<dd>
Get current game status, such as normal game loop, exiting to title, etc.
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../4 enums/Flow.GameStatus.html#">GameStatus</a></span>
the current game status
</ol>
</dd>
<dt>
<a name = "GetFreezeMode"></a>
<strong>GetFreezeMode()</strong>
</dt>
<dd>
Get current freeze mode, such as none, full, spectator or player.
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../4 enums/Flow.FreezeMode.html#">FreezeMode</a></span>
the current freeze mode
</ol>
</dd>
<dt>
<a name = "SetFreezeMode"></a>
<strong>SetFreezeMode(freezeMode)</strong>
</dt>
<dd>
Set current freeze mode, such as none, full, spectator or player. <br/>
Freeze mode specifies whether game is in normal mode or paused in a particular way to allow
custom menu creation, photo mode or time freeze.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">freezeMode</span>
<span class="types"><a class="type" href="../4 enums/Flow.FreezeMode.html#">FreezeMode</a></span>
new freeze mode to set.
</li>
</ul>
</dd>
<dt>
<a name = "SaveGame"></a>
<strong>SaveGame(slotID)</strong>
</dt>
<dd>
Save the game to a savegame slot.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">slotID</span>
<span class="types"><span class="type">int</span></span>
ID of the savegame slot to save to.
</li>
</ul>
</dd>
<dt>
<a name = "LoadGame"></a>
<strong>LoadGame(slotID)</strong>
</dt>
<dd>
Load the game from a savegame slot.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">slotID</span>
<span class="types"><span class="type">int</span></span>
ID of the savegame slot to load from.
</li>
</ul>
</dd>
<dt>
<a name = "DeleteSaveGame"></a>
<strong>DeleteSaveGame(slotID)</strong>
</dt>
<dd>
Delete a savegame.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">slotID</span>
<span class="types"><span class="type">int</span></span>
ID of the savegame slot to clear.
</li>
</ul>
</dd>
<dt>
<a name = "DoesSaveGameExist"></a>
<strong>DoesSaveGameExist(slotID)</strong>
</dt>
<dd>
Check if a savegame exists.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">slotID</span>
<span class="types"><span class="type">int</span></span>
ID of the savegame slot to check.
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
true if the savegame exists, false if not.
</ol>
</dd>
<dt>
<a name = "GetSecretCount"></a>
<strong>GetSecretCount()</strong>
</dt>
<dd>
Returns the player's current per-game secret count.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">int</span></span>
Current game secret count.
</ol>
</dd>
<dt>
<a name = "SetSecretCount"></a>
<strong>SetSecretCount(count)</strong>
</dt>
<dd>
Sets the player's current per-game secret count.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">count</span>
<span class="types"><span class="type">int</span></span>
new secret count.
</li>
</ul>
</dd>
<dt>
<a name = "AddSecret"></a>
<strong>AddSecret(index)</strong>
</dt>
<dd>
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.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">index</span>
<span class="types"><span class="type">int</span></span>
an index of current level's secret (must be from 0 to 31).
</li>
</ul>
</dd>
<dt>
<a name = "SetTotalSecretCount"></a>
<strong>SetTotalSecretCount(total)</strong>
</dt>
<dd>
Total number of secrets in game.
Must be an integer value (0 means no secrets).
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">total</span>
<span class="types"><span class="type">int</span></span>
number of secrets
</li>
</ul>
</dd>
<dt>
<a name = "FlipMap"></a>
<strong>FlipMap(flipmap)</strong>
</dt>
<dd>
Do FlipMap with specific group ID.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">flipmap</span>
<span class="types"><span class="type">int</span></span>
(ID of flipmap group to actuvate / deactivate)
</li>
</ul>
</dd>
<dt>
<a name = "GetFlipMapStatus"></a>
<strong>GetFlipMapStatus([index])</strong>
</dt>
<dd>
Get current FlipMap status for specific group ID.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">index</span>
<span class="types"><span class="type">int</span></span>
Flipmap group ID to check. If no group specified or group is -1, function returns overall flipmap status (on or off).
(<em>optional</em>)
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">int</span></span>
Status of the flipmap group (true means on, false means off).
</ol>
</dd>
</dl>
<h2 class="section-header has-description"><a name="settings_lua"></a>settings.lua </h2>
<div class="section-description">
These functions are called in settings.lua, a file which holds global settings, such as system settings, flare color or animation movesets.
</div>
<dl class="function">
<dt>
<a name = "SetSettings"></a>
<strong>SetSettings(settings)</strong>
</dt>
<dd>
Set provided settings table to an engine.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">settings</span>
<span class="types"><a class="type" href="../2 classes/Flow.Settings.html#">Settings</a></span>
a settings table
</li>
</ul>
</dd>
<dt>
<a name = "GetSettings"></a>
<strong>GetSettings()</strong>
</dt>
<dd>
Get settings table from an engine.
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../2 classes/Flow.Settings.html#">Settings</a></span>
current settings table
</ol>
</dd>
</dl>
<h2 class="section-header has-description"><a name="strings_lua"></a>strings.lua </h2>
<div class="section-description">
These functions used in strings.lua, which is generated by TombIDE.
You will not need to call them manually.
</div>
<dl class="function">
<dt>
<a name = "SetStrings"></a>
<strong>SetStrings(table)</strong>
</dt>
<dd>
Set string variable keys and their translations.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">table</span>
<span class="types"><span class="type">tab</span></span>
array-style table with strings
</li>
</ul>
</dd>
<dt>
<a name = "GetString"></a>
<strong>GetString(string)</strong>
</dt>
<dd>
Get translated string.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">string</span>
<span class="types"><span class="type">key</span></span>
key for translated string
</li>
</ul>
</dd>
<dt>
<a name = "IsStringPresent"></a>
<strong>IsStringPresent(string)</strong>
</dt>
<dd>
Check if translated string is present.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">string</span>
<span class="types"><span class="type">key</span></span>
key for translated string
</li>
</ul>
</dd>
<dt>
<a name = "SetLanguageNames"></a>
<strong>SetLanguageNames(table)</strong>
</dt>
<dd>
Set language names for translations.
Specify which translations in the strings table correspond to which languages.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">table</span>
<span class="types"><span class="type">tab</span></span>
array-style table with language names
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="https://github.com/hispidence/TEN-LDoc">TEN-LDoc</a> (a fork of <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a>)</i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>