Skip to content

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:


mge.distantLandRenderConfig⚓︎

Allows control of the camera.

Returns:


mge.render⚓︎

Allows control of render features.

Returns:


mge.shaders⚓︎

Allows control of shaders.

Returns:


mge.weather⚓︎

Allows control of MGE weather features.

Returns:


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:


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:


mge.loadConfig⚓︎

Reloads the MGE config file. This is primarily an internal function and shouldn't be called casually.

mge.loadConfig()

mge.macros.decreaseFOV⚓︎

Triggers the MGE "Decrease FOV" macro.

mge.macros.decreaseFOV()

mge.macros.decreaseViewRange⚓︎

Triggers the MGE "Decrease View Range" macro.

mge.macros.decreaseViewRange()

mge.macros.decreaseZoom⚓︎

Triggers the MGE "Decrease Zoom" macro.

mge.macros.decreaseZoom()

mge.macros.disableMusic⚓︎

Triggers the MGE "Disable Music" macro.

mge.macros.disableMusic()

mge.macros.haggleLess1⚓︎

Triggers the MGE "Haggle Less 1" macro.

mge.macros.haggleLess1()

mge.macros.haggleLess10⚓︎

Triggers the MGE "Haggle Less 10" macro.

mge.macros.haggleLess10()

mge.macros.haggleLess100⚓︎

Triggers the MGE "Haggle Less 100" macro.

mge.macros.haggleLess100()

mge.macros.haggleLess1000⚓︎

Triggers the MGE "Haggle Less 1,000" macro.

mge.macros.haggleLess1000()

mge.macros.haggleLess10000⚓︎

Triggers the MGE "Haggle Less 10,000" macro.

mge.macros.haggleLess10000()

mge.macros.haggleMore1⚓︎

Triggers the MGE "Haggle More 1" macro.

mge.macros.haggleMore1()

mge.macros.haggleMore10⚓︎

Triggers the MGE "Haggle More 10" macro.

mge.macros.haggleMore10()

mge.macros.haggleMore100⚓︎

Triggers the MGE "Haggle More 100" macro.

mge.macros.haggleMore100()

mge.macros.haggleMore1000⚓︎

Triggers the MGE "Haggle More 1,000" macro.

mge.macros.haggleMore1000()

mge.macros.haggleMore10000⚓︎

Triggers the MGE "Haggle More 10,000" macro.

mge.macros.haggleMore10000()

mge.macros.increaseFOV⚓︎

Triggers the MGE "Increase FOV" macro.

mge.macros.increaseFOV()

mge.macros.increaseViewRange⚓︎

Triggers the MGE "Increase View Range" macro.

mge.macros.increaseViewRange()

mge.macros.increaseZoom⚓︎

Triggers the MGE "Increase Zoom" macro.

mge.macros.increaseZoom()

mge.macros.moveBack3PCam⚓︎

Triggers the MGE "Move Back 3rd Person Camera" macro.

mge.macros.moveBack3PCam()

mge.macros.moveDown3PCam⚓︎

Triggers the MGE "Move Down 3rd Person Camera" macro.

mge.macros.moveDown3PCam()

mge.macros.moveForward3PCam⚓︎

Triggers the MGE "Move Forward 3rd Person Camera" macro.

mge.macros.moveForward3PCam()

mge.macros.moveLeft3PCam⚓︎

Triggers the MGE "Move Left 3rd Person Camera" macro.

mge.macros.moveLeft3PCam()

mge.macros.moveRight3PCam⚓︎

Triggers the MGE "Move Right 3rd Person Camera" macro.

mge.macros.moveRight3PCam()

mge.macros.moveUp3PCam⚓︎

Triggers the MGE "Move Up 3rd Person Camera" macro.

mge.macros.moveUp3PCam()

mge.macros.nextTrack⚓︎

Triggers the MGE "Next Track" macro.

mge.macros.nextTrack()

mge.macros.resetEnableZoom⚓︎

Triggers the MGE "Reset Enable Zoom" macro.

mge.macros.resetEnableZoom()

mge.macros.showLastMessage⚓︎

Triggers the MGE "Show Last Message" macro.

mge.macros.showLastMessage()

mge.macros.takeScreenshot⚓︎

Triggers the MGE "Take Screenshot" macro.

mge.macros.takeScreenshot()

mge.macros.toggleBlending⚓︎

Triggers the MGE "Toggle Blending" macro.

mge.macros.toggleBlending()

mge.macros.toggleCrosshair⚓︎

Triggers the MGE "Toggle Crosshair" macro.

mge.macros.toggleCrosshair()

mge.macros.toggleDistantLand⚓︎

Triggers the MGE "Toggle Distant Land" macro.

mge.macros.toggleDistantLand()

mge.macros.toggleFpsCounter⚓︎

Triggers the MGE "Toggle FPS Counter" macro.

mge.macros.toggleFpsCounter()

mge.macros.toggleGrass⚓︎

Triggers the MGE "Toggle Grass" macro.

mge.macros.toggleGrass()

mge.macros.toggleLightingMode⚓︎

Triggers the MGE "Toggle Lighting Mode" macro.

mge.macros.toggleLightingMode()

mge.macros.toggleShaders⚓︎

Triggers the MGE "Toggle Shaders" macro.

mge.macros.toggleShaders()

mge.macros.toggleShadows⚓︎

Triggers the MGE "Toggle Shadows" macro.

mge.macros.toggleShadows()

mge.macros.toggleStatusText⚓︎

Triggers the MGE "Toggle Status Text" macro.

mge.macros.toggleStatusText()

mge.macros.toggleTransparencyAA⚓︎

Triggers the MGE "Toggle Transparency AA" macro.

mge.macros.toggleTransparencyAA()

mge.macros.toggleZoom⚓︎

Triggers the MGE "Toggle Zoom" macro.

mge.macros.toggleZoom()

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 to true, 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:


mge.setUIScale⚓︎

Sets the GUI scaling used by MGE XE.

mge.setUIScale(scale)

Parameters:

  • scale (number)