lua
The require function loads Eclipse’s API and your own script files.
require
Section titled “require”Load the Eclipse API, or another Lua file from your mod.
Signature: require(module_name)
Returns: Whatever the module returns, remembered so loading it again returns the same value.
When: Top of a script
local sf2 = require("sf2")local helpers = require("helpers") -- scripts/helpers.lua in this modUse require("combat.helpers") for scripts/combat/helpers.lua. A mod can only load its own files; circular imports, missing files, absolute paths and .. fail. Mod Lua has no file or network access.