mge⚓︎
The mge library accesses MGE XE functionality, including control over shaders. Many older functions have been deprecated.
Properties⚓︎
mge.camera
⚓︎
Allows control of MGE camera features.
Returns:
result
(mgeCameraConfig)
mge.distantLandRenderConfig
⚓︎
Allows control of the camera.
Returns:
result
(mgeDistantLandRenderConfig)
mge.render
⚓︎
Allows control of render features.
Returns:
result
(mgeRenderFeatures)
mge.shaders
⚓︎
Allows control of shaders.
Returns:
result
(mgeShadersConfig)
mge.weather
⚓︎
Allows control of MGE weather features.
Returns:
result
(mgeWeatherConfig)
Functions⚓︎
mge.enabled
⚓︎
Determines if the MGE XE interface is enabled.
local enabled = mge.enabled()
Returns:
enabled
(boolean)
mge.getLightingMode
⚓︎
Returns the lighting mode used by MGE XE. These values map to mge.lightingMode
constants.
local mode = mge.getLightingMode()
Returns:
mode
(mge.lightingMode)
mge.getUIScale
⚓︎
Returns the GUI scaling used by MGE XE.
local scale = mge.getUIScale()
Returns:
scale
(number)
mge.getVersion
⚓︎
Gets the MGE version. Returns a table with keys major
, minor
, and patch
.
local result = mge.getVersion()
Returns:
result
(mgeVersionTable)
mge.loadConfig
⚓︎
Reloads the MGE config file. This is primarily an internal function and shouldn't be called casually.
mge.loadConfig()
mge.reloadDistantLand
⚓︎
Reloads the MGE distant land. This is a blocking call that can take some seconds.
mge.reloadDistantLand()
mge.saveConfig
⚓︎
Saves the MGE config file. This is primarily an internal function and shouldn't be called casually.
mge.saveConfig()
mge.saveScreenshot
⚓︎
Saves a screenshot.
mge.saveScreenshot({ path = ..., captureWithUI = ... })
Parameters:
params
(table)path
(string)captureWithUI
(boolean): Default:false
. If set totrue
, the screenshot will include the user interface.
mge.setLightingMode
⚓︎
Sets the lighting mode used by MGE XE. The values passed can be used from the mge.lightingMode
constants.
mge.setLightingMode(mode)
Parameters:
mode
(mge.lightingMode)
mge.setUIScale
⚓︎
Sets the GUI scaling used by MGE XE.
mge.setUIScale(scale)
Parameters:
scale
(number)