Class Level
A container for level metadata - things which aren't present in the compiled level file itself.
Members
Level.nameKey | (string) string key for the level's (localised) name. |
Level.scriptFile | (string) path of the Lua file holding the level's logic script, relative to the location of the tombengine executable |
Level.levelFile | (string) path of the compiled level file, relative to the location of the tombengine executable |
Level.loadScreenFile | (string) path of the level's load screen file (.png or .jpg), relative to the location of the tombengine executable |
Level.ambientTrack | (string) initial ambient sound track to play - this is the filename of the track without the .wav extension |
Level.layer1 | (SkyLayer) Primary sky layer |
Level.layer2 | (SkyLayer) Secondary sky layer (not yet implemented) |
Level.fog | (Color) distance fog RGB color (as seen in TR4's Desert Railroad). |
Level.horizon | (bool) if set to true, the horizon and sky layer will be drawn; if set to false; they won't. |
Level.colAddHorizon | (bool) if true, the horizon graphic will transition smoothly to the sky layer. |
Level.storm | (bool) equivalent to classic TRLE's LIGHTNING setting. |
Level.weather | (WeatherType) Must be one of the values WeatherType.NORMAL, WeatherType.RAIN, or WeatherType.SNOW. |
Level.laraType | (LaraType) Must be one of the LaraType values. |
Level.rumble | (bool) If true, an occasional screen shake effect (as seen in TRC's Sinking Submarine) will happen throughout the level. |
Level.mirror | (Mirror) object holding the location and size of the room's mirror, if present. |
Level.UVRotate | (byte) Default speed of "UVRotate" animated textures. |
Level.farView | (byte) The maximum draw distance, in sectors (blocks), of this particular level. |
Level.unlimitedAir | (bool) If true, the player will have an unlimited oxygen supply when in water. |
Level.objects | (table of InventoryObjects) table of inventory object overrides |
Functions
Level.new () | Make a new Level object. |
Members
- Level.nameKey
- (string) string key for the level's (localised) name. Corresponds to an entry in strings.lua.
- Level.scriptFile
- (string) path of the Lua file holding the level's logic script, relative to the location of the tombengine executable
- Level.levelFile
- (string) path of the compiled level file, relative to the location of the tombengine executable
- Level.loadScreenFile
- (string) path of the level's load screen file (.png or .jpg), relative to the location of the tombengine executable
- Level.ambientTrack
- (string) initial ambient sound track to play - this is the filename of the track without the .wav extension
- Level.layer1
- (SkyLayer) Primary sky layer
- Level.layer2
- (SkyLayer) Secondary sky layer (not yet implemented)
- Level.fog
-
(Color) distance fog RGB color (as seen in TR4's Desert Railroad).
If not provided, distance fog will be black.
(not yet implemented)
- Level.horizon
- (bool) if set to true, the horizon and sky layer will be drawn; if set to false; they won't.
- Level.colAddHorizon
-
(bool) if true, the horizon graphic will transition smoothly to the sky layer.
If set to false, there will be a black band between the two.
(not yet implemented)
- Level.storm
-
(bool) equivalent to classic TRLE's LIGHTNING setting.
If true, there will be a flickering lightning in the skylayer, as in the TRC Ireland levels.
(thunder sounds not yet implemented)
- Level.weather
-
(WeatherType) Must be one of the values WeatherType.NORMAL, WeatherType.RAIN, or WeatherType.SNOW.
(not yet implemented)
- Level.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)
- Level.rumble
- (bool) If true, an occasional screen shake effect (as seen in TRC's Sinking Submarine) will happen throughout the level.
- Level.mirror
-
(Mirror) object holding the location and size of the room's mirror, if present.
(not yet implemented)
- Level.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)
- Level.farView
-
(byte) The maximum draw distance, in sectors (blocks), of this particular level.
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)
- Level.unlimitedAir
-
(bool) If true, the player will have an unlimited oxygen supply when in water.
(not yet implemented)
- Level.objects
- (table of InventoryObjects) table of inventory object overrides