-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
379 lines (358 loc) · 16.2 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
<!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.7.1 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> 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/Flow.Statistics.html">Flow.Statistics</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.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/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/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.WeaponType.html">Objects.WeaponType</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>
<li> <a href="5 lua utility modules/Type.html">Type</a></li>
</ul>
</div>
<div id="content">
<h2>TombEngine 1.7.1 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/Flow.Statistics.html">Flow.Statistics</a></td>
<td class="summary">A set of gameplay statistics.</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">Distance 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.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/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 in game frames, 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/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.WeaponType.html">Objects.WeaponType</a></td>
<td class="summary">Constants for weapon 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 display sprite 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>
<tr>
<td class="name" ><a href="5 lua utility modules/Type.html">Type</a></td>
<td class="summary">Type - This molule contains functions that allow to check the data type of a variable.</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>