TombEngine/Documentation/doc/index.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

379 lines
16 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><here>Index</here></li>
</ul>
<h2>1 Modules</h2>
<ul class="nowrap">
<li> <a href="1 modules/Effects.html">Effects</a></li>
<li> <a href="1 modules/Flow.html">Flow</a></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">
<h2>TombEngine 1.6 scripting interface</h2>
<p>Welcome to the TombEngine scripting API. This is a work in progress and some information might be wrong or outdated. Please also note that this is primarily a reference document, not a tutorial, so expect descriptions to be fairly sparse.</p>
<p>At the time of writing, there is a tutorial describing the basics of Lua, as well as a number of example scripts, on <a href="https://www.tombengine.com">the TombEngine website</a>.</p>
<h4>Module Hierarchy (boring but important)</h4>
<p>Other than the "special tables" (GameVars, LevelVars and LevelFuncs), every module described herein is held in a master table called TEN.
For convenience, these modules and classes are automatically put in the global table. For example, you can call GetMoveableByName either of these two ways:</p>
<pre><code>local door = TEN.Objects.GetMoveableByName("door_type4_14")
local door = GetMoveableByName("door_type4_14")
</code></pre>
<h4>Always check logs/TENLog.txt</h4>
<p>If you are scripting levels, TombEngine will often kick you back to the title screen, even if <code>errorMode</code> (see Flow.Settings) is set to <code>ErrorMode.WARN</code> or <code>ErrorMode.SILENT</code>.</p>
<p>This might get annoying, but it's on purpose. If your Lua script contains a syntax error (e.g. you're missing <code>end</code> at the end of a function), the Lua interpreter will not be able to continue running the script. If it tried to keep running, you'd probably see some pretty strange behaviour, and would possibly get a crash regardless.</p>
<p>If this happens, check <strong>logs/TENLog.txt</strong> and look for an error message with the word "unrecoverable".</p>
<p>Enjoy.</p>
<p>- <em>squidshire and the TombEngine development team.</em></p>
<h2>1 Modules</h2>
<table class="module_list">
<tr>
<td class="name" ><a href="1 modules/Effects.html">Effects</a></td>
<td class="summary">Functions to generate effects.</td>
</tr>
<tr>
<td class="name" ><a href="1 modules/Flow.html">Flow</a></td>
<td class="summary">Functions that (mostly) don't directly impact in-game mechanics.</td>
</tr>
<tr>
<td class="name" ><a href="1 modules/Input.html">Input</a></td>
<td class="summary">Functions for input management.</td>
</tr>
<tr>
<td class="name" ><a href="1 modules/Inventory.html">Inventory</a></td>
<td class="summary">Inventory manipulation</td>
</tr>
<tr>
<td class="name" ><a href="1 modules/Logic.html">Logic</a></td>
<td class="summary">Saving data, triggering functions, and callbacks for level-specific scripts.</td>
</tr>
<tr>
<td class="name" ><a href="1 modules/Objects.html">Objects</a></td>
<td class="summary">Moveables, statics, cameras, and so on.</td>
</tr>
<tr>
<td class="name" ><a href="1 modules/Sound.html">Sound</a></td>
<td class="summary">Functions for sound management.</td>
</tr>
<tr>
<td class="name" ><a href="1 modules/Strings.html">Strings</a></td>
<td class="summary">Display strings.</td>
</tr>
<tr>
<td class="name" ><a href="1 modules/Util.html">Util</a></td>
<td class="summary">Utility functions for various calculations.</td>
</tr>
<tr>
<td class="name" ><a href="1 modules/View.html">View</a></td>
<td class="summary">Functions to manage camera and game view.</td>
</tr>
</table>
<h2>2 Classes</h2>
<table class="module_list">
<tr>
<td class="name" ><a href="2 classes/Flow.Level.html">Flow.Level</a></td>
<td class="summary">Stores level metadata.</td>
</tr>
<tr>
<td class="name" ><a href="2 classes/Flow.Settings.html">Flow.Settings</a></td>
<td class="summary">Global engine settings which don't fall into particular category or can't be assigned to a specific object.</td>
</tr>
<tr>
<td class="name" ><a href="2 classes/Objects.AIObject.html">Objects.AIObject</a></td>
<td class="summary">AI object</td>
</tr>
<tr>
<td class="name" ><a href="2 classes/Objects.Camera.html">Objects.Camera</a></td>
<td class="summary">Basic cameras that can point at Lara or at a CAMERA_TARGET.</td>
</tr>
<tr>
<td class="name" ><a href="2 classes/Objects.LaraObject.html">Objects.LaraObject</a></td>
<td class="summary">Class for extra Lara-only functions.</td>
</tr>
<tr>
<td class="name" ><a href="2 classes/Objects.Moveable.html">Objects.Moveable</a></td>
<td class="summary">Represents any object inside the game world.</td>
</tr>
<tr>
<td class="name" ><a href="2 classes/Objects.Room.html">Objects.Room</a></td>
<td class="summary">Room object.</td>
</tr>
<tr>
<td class="name" ><a href="2 classes/Objects.Sink.html">Objects.Sink</a></td>
<td class="summary">Sink</td>
</tr>
<tr>
<td class="name" ><a href="2 classes/Objects.SoundSource.html">Objects.SoundSource</a></td>
<td class="summary">Sound source</td>
</tr>
<tr>
<td class="name" ><a href="2 classes/Objects.Static.html">Objects.Static</a></td>
<td class="summary">Statics</td>
</tr>
<tr>
<td class="name" ><a href="2 classes/Objects.Volume.html">Objects.Volume</a></td>
<td class="summary">Activator volume.</td>
</tr>
<tr>
<td class="name" ><a href="2 classes/Strings.DisplayString.html">Strings.DisplayString</a></td>
<td class="summary">A string appearing on the screen.</td>
</tr>
<tr>
<td class="name" ><a href="2 classes/View.DisplaySprite.html">View.DisplaySprite</a></td>
<td class="summary">Represents a display sprite.</td>
</tr>
</table>
<h2>3 Primitive Classes</h2>
<table class="module_list">
<tr>
<td class="name" ><a href="3 primitive classes/Flow.Fog.html">Flow.Fog</a></td>
<td class="summary">Fog</td>
</tr>
<tr>
<td class="name" ><a href="3 primitive classes/Flow.InventoryItem.html">Flow.InventoryItem</a></td>
<td class="summary">Represents the properties of an object as it appears in the inventory.</td>
</tr>
<tr>
<td class="name" ><a href="3 primitive classes/Flow.LensFlare.html">Flow.LensFlare</a></td>
<td class="summary">Represents a global lens flare (not to be confused with lensflare object).</td>
</tr>
<tr>
<td class="name" ><a href="3 primitive classes/Flow.Mirror.html">Flow.Mirror</a></td>
<td class="summary">A mirror effect.</td>
</tr>
<tr>
<td class="name" ><a href="3 primitive classes/Flow.SkyLayer.html">Flow.SkyLayer</a></td>
<td class="summary">Describes a layer of moving clouds.</td>
</tr>
<tr>
<td class="name" ><a href="3 primitive classes/Flow.Starfield.html">Flow.Starfield</a></td>
<td class="summary">Represents a starfield.</td>
</tr>
<tr>
<td class="name" ><a href="3 primitive classes/Flow.Statistics.html">Flow.Statistics</a></td>
<td class="summary">A set of gameplay statistics.</td>
</tr>
<tr>
<td class="name" ><a href="3 primitive classes/Color.html">Color</a></td>
<td class="summary">Represents an RGBA or RGB color.</td>
</tr>
<tr>
<td class="name" ><a href="3 primitive classes/Rotation.html">Rotation</a></td>
<td class="summary">Represents a degree-based 3D rotation.</td>
</tr>
<tr>
<td class="name" ><a href="3 primitive classes/Time.html">Time</a></td>
<td class="summary">Represents a time value with support for formatting to hours, minutes, seconds, and centiseconds (1/100th of a second).</td>
</tr>
<tr>
<td class="name" ><a href="3 primitive classes/Vec2.html">Vec2</a></td>
<td class="summary">Represents a float-based 2D vector.</td>
</tr>
<tr>
<td class="name" ><a href="3 primitive classes/Vec3.html">Vec3</a></td>
<td class="summary">Represents a float-based 3D vector.</td>
</tr>
</table>
<h2>4 Enums</h2>
<table class="module_list">
<tr>
<td class="name" ><a href="4 enums/Effects.BlendID.html">Effects.BlendID</a></td>
<td class="summary">Constants for blend mode IDs.</td>
</tr>
<tr>
<td class="name" ><a href="4 enums/Effects.EffectID.html">Effects.EffectID</a></td>
<td class="summary">Constants for effect IDs.</td>
</tr>
<tr>
<td class="name" ><a href="4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></td>
<td class="summary">Constants for error modes.</td>
</tr>
<tr>
<td class="name" ><a href="4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></td>
<td class="summary">Constants for freeze modes.</td>
</tr>
<tr>
<td class="name" ><a href="4 enums/Flow.GameStatus.html">Flow.GameStatus</a></td>
<td class="summary">Constants for game statuses.</td>
</tr>
<tr>
<td class="name" ><a href="4 enums/Flow.WeaponType.html">Flow.WeaponType</a></td>
<td class="summary">Constants for weapon types.</td>
</tr>
<tr>
<td class="name" ><a href="4 enums/Input.ActionID.html">Input.ActionID</a></td>
<td class="summary">Constants for action key IDs.</td>
</tr>
<tr>
<td class="name" ><a href="4 enums/Objects.AmmoType.html">Objects.AmmoType</a></td>
<td class="summary">Constants for player weapon ammo types.</td>
</tr>
<tr>
<td class="name" ><a href="4 enums/Objects.MoveableStatus.html">Objects.MoveableStatus</a></td>
<td class="summary">Constants for moveable statuses.</td>
</tr>
<tr>
<td class="name" ><a href="4 enums/Objects.ObjID.html">Objects.ObjID</a></td>
<td class="summary">Constants for object IDs.</td>
</tr>
<tr>
<td class="name" ><a href="4 enums/Objects.RoomFlagID.html">Objects.RoomFlagID</a></td>
<td class="summary">Constants for room flag IDs.</td>
</tr>
<tr>
<td class="name" ><a href="4 enums/Objects.RoomReverb.html">Objects.RoomReverb</a></td>
<td class="summary">Constants for room reverb types.</td>
</tr>
<tr>
<td class="name" ><a href="4 enums/Sound.SoundTrackType.html">Sound.SoundTrackType</a></td>
<td class="summary">Constants for the type of the audio tracks.</td>
</tr>
<tr>
<td class="name" ><a href="4 enums/Strings.DisplayStringOption.html">Strings.DisplayStringOption</a></td>
<td class="summary">Constants for Display String Options.</td>
</tr>
<tr>
<td class="name" ><a href="4 enums/Util.LogLevel.html">Util.LogLevel</a></td>
<td class="summary">Constants for LogLevel IDs.</td>
</tr>
<tr>
<td class="name" ><a href="4 enums/View.AlignMode.html">View.AlignMode</a></td>
<td class="summary">Constants for sprite align modes.</td>
</tr>
<tr>
<td class="name" ><a href="4 enums/View.CameraType.html">View.CameraType</a></td>
<td class="summary">Constants for the type of the Camera.</td>
</tr>
<tr>
<td class="name" ><a href="4 enums/View.PostProcessMode.html">View.PostProcessMode</a></td>
<td class="summary">Constants for the post-process effects to apply.</td>
</tr>
<tr>
<td class="name" ><a href="4 enums/View.ScaleMode.html">View.ScaleMode</a></td>
<td class="summary">Constants for scale modes.</td>
</tr>
</table>
<h2>5 Lua utility modules</h2>
<table class="module_list">
<tr>
<td class="name" ><a href="5 lua utility modules/EventSequence.html">EventSequence</a></td>
<td class="summary">Event sequence - a chain of functions to call at specified times, modeled after TRNG's organizers.</td>
</tr>
<tr>
<td class="name" ><a href="5 lua utility modules/Timer.html">Timer</a></td>
<td class="summary">Basic timer - after a specified number of seconds, the specified thing happens.</td>
</tr>
</table>
</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>