Class Level
Stores level metadata.
These are things things which aren't present in the compiled level file itself.
Members
nameKey | (string) string key for the level's (localised) name. |
scriptFile | (string) Level-specific Lua script file. |
levelFile | (string) Compiled file path. |
loadScreenFile | (string) Load screen image. |
ambientTrack | (string) initial ambient sound track to play. |
layer1 | (SkyLayer) Primary sky layer |
layer2 | (SkyLayer) Secondary sky layer (not yet implemented) |
fog | (Color) distance fog RGB color. |
horizon | (bool) Draw sky layer? |
colAddHorizon | (bool) Enable smooth transition from horizon graphic to sky layer. |
storm | (bool) Enable flickering lightning in the sky. |
weather | (WeatherType) Choose weather effect. |
laraType | (LaraType) Must be one of the LaraType values. |
rumble | (bool) Enable occasional screen shake effect. |
mirror | (Mirror) Location and size of the level's mirror, if present. |
UVRotate | (byte) Default speed of "UVRotate" animated textures. |
farView | (byte) The maximum draw distance for level. |
unlimitedAir | (bool) Enable unlimited oxygen supply when in water. |
objects | (table of InventoryObjects) table of inventory object overrides |
Functions
Level.new() | Make a new Level object. |
Members
- nameKey
- (string) string key for the level's (localised) name. Corresponds to an entry in strings.lua.
- scriptFile
- (string) Level-specific Lua script file. Path of the Lua file holding the level's logic script, relative to the location of the tombengine executable
- levelFile
- (string) Compiled file path. This path is relative to the location of the TombEngine executable.
- loadScreenFile
- (string) Load screen image. Path of the level's load screen file (.png or .jpg), relative to the location of the tombengine executable
- ambientTrack
- (string) initial ambient sound track to play. This is the filename of the track without the .wav extension.
- layer1
- (SkyLayer) Primary sky layer
- layer2
- (SkyLayer) Secondary sky layer (not yet implemented)
- fog
-
(Color) distance fog RGB color.
As seen in TR4's Desert Railroad.
If not provided, distance fog will be black.
(not yet implemented)
- horizon
- (bool) Draw sky layer? (default: false)
- colAddHorizon
-
(bool) Enable smooth transition from horizon graphic to sky layer.
If set to false, there will be a black band between the two.
(not yet implemented)
- storm
-
(bool) Enable flickering lightning in the sky.
Equivalent to classic TRLE's LIGHTNING setting. As in the TRC Ireland levels.
(thunder sounds not yet implemented)
- weather
-
(WeatherType) Choose weather effect.
Must be one of the values
WeatherType.NORMAL
,WeatherType.RAIN
, orWeatherType.SNOW
.(not yet implemented)
- laraType
-
(LaraType) Must be one of the LaraType values.
These are:
NORMAL YOUNG BUNHEAD CATSUIT DIVESUIT INVISIBLE
e.g.
myLevel.laraType = LaraType.DIVESUIT
(not yet fully implemented)
- rumble
- (bool) Enable occasional screen shake effect. As seen in TRC's Sinking Submarine.
- mirror
-
(Mirror) Location and size of the level's mirror, if present.
(not yet implemented)
- UVRotate
-
(byte) Default speed of "UVRotate" animated textures.
Must be in the range [-64, 64].
A level texture can be set in Tomb Editor to use "UVRotate" animation. This gives the effect of the texture looping downwards or upwards in place. Positive values will cause the texture to loop downwards, and negative values will cause an upwards loop. The higher a positive number or the lower a negative number, the faster the scroll will be.
(not yet implemented)
- farView
-
(byte) The maximum draw distance for level.
Given in sectors (blocks).
Must be in the range [1, 127], and equal to or less than the value passed to SetGameFarView.
This is equivalent to TRNG's LevelFarView variable.
(not yet implemented)
- unlimitedAir
-
(bool) Enable unlimited oxygen supply when in water.
(not yet implemented)
- objects
- (table of InventoryObjects) table of inventory object overrides