# FreeWorld Mod API > Reference site for authors of mods for FreeWorld, a Unity space sandbox game (ground colony + galaxy travel). Mods are folders with an XML manifest; they can add definition rows (XML), replace art, run Lua, ship story scripts and maps, or load C# DLLs on PC. Start with the agent guide. It is a single self-contained Markdown file (written in Chinese) with rules, templates, an API cheat sheet and a pre-delivery checklist. All paths below are relative to this file. ## Guide - [agent-guide.md](agent-guide.md): Complete modding guide for AI coding agents. Read this first. ## Machine-readable data Each file is a script of the form `window.X = ;`. Take everything after the first `= `, drop the trailing semicolon, and parse it as JSON. - [data/api-data.js](data/api-data.js): Every definition table and its fields, signatures of mod-related C# types, XML schemas, Lua binding configuration. - [data/def-samples.js](data/def-samples.js): Per table: category, row count, sample built-in IDs, first-row field values. - [data/script-api.js](data/script-api.js): Every method of the story-script `mission` object, with usage counts from official scripts. - [data/meta.js](data/meta.js): Game version and commit the data was exported from. ## Pages (bilingual, zh-CN and en) - [index.html](index.html): Overview and kinds of mods. - [getting-started.html](getting-started.html): First XML-only data mod, step by step. - [manifest.html](manifest.html): Manifest fields, version folders, load order. - [data-mods.html](data-mods.html): def.xml rules, text and localisation, icons, save compatibility. - [resource-mods.html](resource-mods.html): Icons, floors, warship textures, character skins. - [lua-mods.html](lua-mods.html): Lua program mods. - [scenario-mods.html](scenario-mods.html): Story scripts and maps referenced from data rows. - [dll-mods.html](dll-mods.html): C# DLL mods and Harmony (PC only). - [game-api.html](game-api.html): Commonly used game APIs with signatures. - [lifecycle.html](lifecycle.html): Load pipeline and hook timing. - [troubleshooting.html](troubleshooting.html): Log locations, messages, known limits. - [reference.html](reference.html): Searchable reference (needs JavaScript; agents should read the data files instead). ## Examples - [examples/ExampleDataMod/Manifest/manifest.xml](examples/ExampleDataMod/Manifest/manifest.xml), [def.xml](examples/ExampleDataMod/v_common/Resources/Def/def.xml): Data mod verified in game. - [examples/ExampleLuaMod/Manifest/manifest.xml](examples/ExampleLuaMod/Manifest/manifest.xml), [main.lua](examples/ExampleLuaMod/v_common/Lua/main.lua): Lua mod verified in game.