Game/
โโโ assets/
โโโ lua/
โ โโโ main.lua
โ โโโ modloader.lua
โโโ mods/
โโโ mod0.lua
โโโ mod1.lua
Loads mod0.lua, mod1.lua, etc. from the mods/ folder at the end of main.lua.
local ModLoader = require "modloader"
ModLoader.load_mods()
print("[mod0] Tree Mod Loaded")
AddCommand("tree", "Spawns a tree", 0, ServerCommand.SecurityLevel0)
function tree(connector)
for i = 1, 5 do
ServerInstance:ImportTestLXFML()
end
connector:Print("Spawned a tree!")
end
AddCommand(name, description, numParams, securityLevel)connector:Print("text")ServerInstance:ImportTestLXFML()ServerInstance:UndoImportLXFML(connector)This is an unused item script in the games code.
class 'JetPack' (Item)
function JetPack:__init()
Item.__init(self)
end
function JetPack:Update(dt, player)
local vec = Vector3(0, dt * 10, 0)
player:PushPlayer(vec)
end
tItem = JetPack()
AddCommand("addjetpack", "Give jetpacks", 0, ServerCommand.SecurityLevel0)
function addjetpack(connector)
for player in EntityManager.Players do
player:SetItem(tItem)
end
connector:Print("Jetpacks equipped!")
end
Use the Mod Loader Manager app to install or uninstall the loader.
Its not very clear what these effect, but they do exist.
| Level | Constant |
|---|---|
| All Players | ServerCommand.SecurityLevel0 |
| Admins | ServerCommand.SecurityLevel1 |
| Super Admins | ServerCommand.SecurityLevel2 |
connector:Print to debug| Command | Description |
|---|---|
| /listcommands | Lists all commands |
| /msg | Sends message to all |
| /spawnentity | Spawns physics object |
| /importlxfml | Imports base64 LXFML |
| /undoimport | Undo last import |