Forge Project

Total Miner Files are here and free

View on GitHub

Total Miner Lua API Reference

Complete function reference for Total Miner's Lua scripting API, organized by category.

Lua · Command Scripting · XML Modding


Table of contents


Start Here

Lua functions are grouped by the kind of game system they control. Start with one small task, test it, and then combine functions into a larger mod. The Lua Mod Example demonstrates blocks, inventory, NPCs, particles, sounds, and event scripts together.

Important: This reference documents function purposes, but some function signatures depend on the calling context. Confirm argument order and callback values in the original reference or in the game environment before publishing a mod.

How the API Is Organized

Function names use lowercase snake case. Keep coordinates, IDs, and repeated values in named variables so scripts are easier to read and adjust.

Learning Workflow

  1. Read the category that matches the feature you want to change.
  2. Try one function in a small test area.
  3. Use getters such as get_block, get_point, or get_health to verify the result.
  4. Add a callback, event script, or zone script only after the basic action works.
  5. Keep a copy of the original map and test destructive functions such as region replacement carefully.

Blocks

Functions to manipulate blocks.


Blueprints

Functions to manipulate blueprints.


CCTV


Effects

Functions to manipulate effects.


Entities

Functions to manipulate entities.


GUI

Functions to manipulate GUI.


History

Functions to manipulate history.


HUD

Functions to manipulate HUD.


Inventory

Functions to manipulate inventory.


Intersect

Functions to manipulate intersect.


Items

Functions to manipulate items.


Miscellaneous


NPCs

Functions to manipulate NPCs.


Particles

Functions to manipulate particles.


Permissions

Functions to manipulate permissions.


Pickups

Functions to manipulate pickups.


Power

Functions to manipulate power.


Scripts

Functions to manipulate scripts.


Skills

Functions to manipulate skills.


Sound

Functions to manipulate sound.


Timer

Functions to manipulate timer.


Tints

Functions to manipulate tints.


Topdown Map

Functions to manipulate the topdown map.


Weather

Functions to manipulate weather.


Zones

Functions to manipulate zones. Use zones to control the properties of cubic regions of the world.


Getters

General getter functions.


Sources


← Back to Home