2021-08-12 20:16:28 +01:00
< !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 >
2021-08-23 20:16:01 +01:00
< title > TombEngine Lua API< / title >
2021-08-12 20:16:28 +01:00
< 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 > TombEngine< / h1 >
2022-04-10 00:38:39 +01:00
< h2 > 1 Modules< / h2 >
2021-08-12 20:16:28 +01:00
< ul class = "nowrap" >
2022-04-10 00:38:39 +01:00
< li > < a href = "1 modules/Flow.html" > Flow< / 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/Misc.html" > Misc< / a > < / li >
< li > < a href = "1 modules/Objects.html" > Objects< / a > < / li >
< li > < a href = "1 modules/Strings.html" > Strings< / a > < / li >
2021-08-12 20:16:28 +01:00
< / ul >
2022-04-10 00:38:39 +01:00
< h2 > 2 Classes< / h2 >
2021-08-12 20:16:28 +01:00
< ul class = "nowrap" >
2022-04-10 00:38:39 +01:00
< li > < a href = "2 classes/Flow.Animations.html" > Flow.Animations< / a > < / li >
< li > < a href = "2 classes/Flow.Fog.html" > Flow.Fog< / a > < / li >
< li > < a href = "2 classes/Flow.InventoryItem.html" > Flow.InventoryItem< / a > < / li >
< li > < a href = "2 classes/Flow.Level.html" > Flow.Level< / a > < / li >
< li > < a href = "2 classes/Flow.Mirror.html" > Flow.Mirror< / a > < / li >
< li > < a href = "2 classes/Flow.Settings.html" > Flow.Settings< / a > < / li >
< li > < a href = "2 classes/Flow.SkyLayer.html" > Flow.SkyLayer< / 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.Moveable.html" > Objects.Moveable< / 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/Strings.DisplayString.html" > Strings.DisplayString< / a > < / li >
2021-08-23 19:19:36 +01:00
< / ul >
2022-04-10 00:38:39 +01:00
< h2 > 3 Primitive Classes< / h2 >
2021-08-23 19:19:36 +01:00
< ul class = "nowrap" >
2022-04-10 00:38:39 +01:00
< li > < a href = "3 primitive classes/Color.html" > Color< / a > < / li >
< li > < a href = "3 primitive classes/Rotation.html" > Rotation< / a > < / li >
2022-04-18 17:53:06 +01:00
< li > < a href = "3 primitive classes/Vec3.html" > Vec3< / a > < / li >
2021-08-23 19:19:36 +01:00
< / ul >
2022-04-10 00:38:39 +01:00
< h2 > 4 Enums< / h2 >
2021-08-23 19:19:36 +01:00
< ul class = "nowrap" >
2022-04-10 00:38:39 +01:00
< li > < a href = "4 enums/Flow.InvID.html" > Flow.InvID< / a > < / li >
< li > < a href = "4 enums/Objects.ObjID.html" > Objects.ObjID< / a > < / li >
2021-08-12 20:16:28 +01:00
< / ul >
< / div >
< div id = "content" >
2021-08-23 20:16:01 +01:00
< h2 > TombEngine scripting interface< / h2 >
2022-05-13 14:31:04 +01:00
< 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. For some examples of gameplay setups using these functions, check the example scripts.< / 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 example, to call GetMoveableByName, you would have to do:< / p >
< pre > < code > local door = TEN.Objects.GetMoveableByName("door_type4_14")
< / code > < / pre >
< p > To save on typing, you can put the following at the start of a Lua file:< / p >
< pre > < code > local Util = require("Util")
Util.ShortenTENCalls()
< / code > < / pre >
< p > This will put the modules and classes in the global table. In other words, it means you can do the following:< / p >
< pre > < code > local door = GetMoveableByName("door_type4_14")
< / code > < / pre >
< p > Enjoy.< / p >
< p > - < em > squidshire< / em > < / p >
2021-08-12 20:16:28 +01:00
2022-04-10 00:38:39 +01:00
< h2 > 1 Modules< / h2 >
2021-08-12 20:16:28 +01:00
< table class = "module_list" >
< tr >
2022-04-10 00:38:39 +01:00
< td class = "name" > < a href = "1 modules/Flow.html" > Flow< / a > < / td >
< td class = "summary" > Functions for use in Flow.lua, settings.lua and strings.lua< / td >
2021-08-12 20:16:28 +01:00
< / tr >
< tr >
2022-04-10 00:38:39 +01:00
< 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 >
2022-05-13 14:31:04 +01:00
< td class = "summary" > Saving data, triggering functions, and callbacks for level-specific scripts.< / td >
2021-08-12 20:16:28 +01:00
< / tr >
< tr >
2022-04-10 00:38:39 +01:00
< td class = "name" > < a href = "1 modules/Misc.html" > Misc< / a > < / td >
< td class = "summary" > Scripts that will be run on game startup.< / td >
2021-08-12 20:16:28 +01:00
< / tr >
2021-08-15 23:08:05 +01:00
< tr >
2022-04-10 00:38:39 +01:00
< td class = "name" > < a href = "1 modules/Objects.html" > Objects< / a > < / td >
< td class = "summary" > Scripts that will be run on game startup.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "1 modules/Strings.html" > Strings< / a > < / td >
2022-05-13 14:34:57 +01:00
< td class = "summary" > On-screen strings.< / td >
2021-08-15 23:08:05 +01:00
< / tr >
2021-08-23 19:19:36 +01:00
< / table >
2022-04-10 00:38:39 +01:00
< h2 > 2 Classes< / h2 >
2021-08-23 19:19:36 +01:00
< table class = "module_list" >
2021-08-12 20:16:28 +01:00
< tr >
2022-04-10 00:38:39 +01:00
< td class = "name" > < a href = "2 classes/Flow.Animations.html" > Flow.Animations< / a > < / td >
< td class = "summary" > New custom animations which Lara can perform.< / td >
2021-08-12 20:16:28 +01:00
< / tr >
< tr >
2022-04-10 00:38:39 +01:00
< td class = "name" > < a href = "2 classes/Flow.Fog.html" > Flow.Fog< / a > < / td >
< td class = "summary" > Fog< / td >
2021-08-12 20:16:28 +01:00
< / tr >
< tr >
2022-04-10 00:38:39 +01:00
< td class = "name" > < a href = "2 classes/Flow.InventoryItem.html" > Flow.InventoryItem< / a > < / td >
< td class = "summary" > Represents the properties of an object as it appears in the inventory.< / td >
2021-08-12 20:16:28 +01:00
< / tr >
< tr >
2022-04-10 00:38:39 +01:00
< td class = "name" > < a href = "2 classes/Flow.Level.html" > Flow.Level< / a > < / td >
< td class = "summary" > Stores level metadata.< / td >
2021-08-12 20:16:28 +01:00
< / tr >
< tr >
2022-04-10 00:38:39 +01:00
< td class = "name" > < a href = "2 classes/Flow.Mirror.html" > Flow.Mirror< / a > < / td >
< td class = "summary" > A mirror effect.< / td >
2021-08-12 20:16:28 +01:00
< / tr >
< tr >
2022-04-10 00:38:39 +01:00
< td class = "name" > < a href = "2 classes/Flow.Settings.html" > Flow.Settings< / a > < / td >
< td class = "summary" > Settings that will be run on game startup.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "2 classes/Flow.SkyLayer.html" > Flow.SkyLayer< / a > < / td >
< td class = "summary" > Describes a layer of moving clouds.< / td >
2021-08-12 20:16:28 +01:00
< / tr >
< tr >
2022-04-10 00:38:39 +01:00
< td class = "name" > < a href = "2 classes/Objects.AIObject.html" > Objects.AIObject< / a > < / td >
< td class = "summary" > AI object< / td >
2021-08-12 20:16:28 +01:00
< / tr >
< tr >
2022-04-10 00:38:39 +01:00
< 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 >
2021-08-12 20:16:28 +01:00
< / tr >
< tr >
2022-04-10 00:38:39 +01:00
< 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 >
2021-08-12 20:16:28 +01:00
< / tr >
2021-08-16 12:55:22 +01:00
< tr >
2022-04-10 00:38:39 +01:00
< td class = "name" > < a href = "2 classes/Objects.Sink.html" > Objects.Sink< / a > < / td >
< td class = "summary" > Sink< / td >
2021-08-16 12:55:22 +01:00
< / tr >
2021-08-12 20:16:28 +01:00
< tr >
2022-04-10 00:38:39 +01:00
< td class = "name" > < a href = "2 classes/Objects.SoundSource.html" > Objects.SoundSource< / a > < / td >
< td class = "summary" > Sound source< / td >
2021-08-12 20:16:28 +01:00
< / tr >
< tr >
2022-04-10 00:38:39 +01:00
< td class = "name" > < a href = "2 classes/Objects.Static.html" > Objects.Static< / a > < / td >
2022-05-13 14:31:04 +01:00
< td class = "summary" > Statics< / td >
2022-04-10 00:38:39 +01:00
< / 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 >
2021-08-12 20:16:28 +01:00
< / tr >
2021-08-23 19:19:36 +01:00
< / table >
2022-04-10 00:38:39 +01:00
< h2 > 3 Primitive Classes< / h2 >
2021-08-23 19:19:36 +01:00
< table class = "module_list" >
2021-08-12 20:16:28 +01:00
< tr >
2022-04-10 00:38:39 +01:00
< td class = "name" > < a href = "3 primitive classes/Color.html" > Color< / a > < / td >
2021-08-23 19:19:36 +01:00
< td class = "summary" > An RGBA or RGB color.< / td >
2021-08-12 20:16:28 +01:00
< / tr >
< tr >
2022-04-10 00:38:39 +01:00
< td class = "name" > < a href = "3 primitive classes/Rotation.html" > Rotation< / a > < / td >
2021-08-23 19:19:36 +01:00
< td class = "summary" > Represents a rotation.< / td >
2021-08-12 20:16:28 +01:00
< / tr >
2022-04-18 17:53:06 +01:00
< tr >
< td class = "name" > < a href = "3 primitive classes/Vec3.html" > Vec3< / a > < / td >
< td class = "summary" > Represents a 3-dimensional vector.< / td >
< / tr >
2021-08-12 20:16:28 +01:00
< / table >
2022-04-10 00:38:39 +01:00
< h2 > 4 Enums< / h2 >
< table class = "module_list" >
< tr >
< td class = "name" > < a href = "4 enums/Flow.InvID.html" > Flow.InvID< / a > < / td >
< td class = "summary" > Constants for items that can be used with GetItem and SetItem.< / 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 >
< / table >
2021-08-12 20:16:28 +01:00
< / div > <!-- id="content" -->
< / div > <!-- id="main" -->
< div id = "about" >
< i > generated by < a href = "http://github.com/stevedonovan/LDoc" > LDoc 1.4.6< / a > < / i >
2022-05-13 14:34:57 +01:00
< i style = "float:right;" > Last updated 2022-05-13 14:32:56 < / i >
2021-08-12 20:16:28 +01:00
< / div > <!-- id="about" -->
< / div > <!-- id="container" -->
< / body >
< / html >