#About the LumaScript reference
LumaScript is the language for Nebula mods. LumaLink compiles it to C and then to machine code. For an introduction, see About LumaScript.
#Pages
LumaScript overviewWhat LumaScript is for and the rules it keeps.Files and modulesHow LumaScript source files, modules and use declarations work.Lexical structureComments, identifiers, keywords and literals in LumaScript.TypesThe types of LumaScript values.Statements and expressionsDeclarations, control flow and operators in LumaScript.Functions, structs and enumsDeclaring functions, structs and enums in LumaScript.ClosuresFunctions as values in LumaScript.Classes derived from the game'sDeclaring classes that derive from the game's classes in LumaScript.Values, views and memoryHow LumaScript holds game objects, handles, values, scratch memory and module state.The game by nameHow LumaScript names the game's functions, fields, classes and enums, and checks them.HooksRunning code before, after, around or instead of a game function.ErrorsErrors LumaLink reports when it builds a mod, and script errors while the game runs.Lifecycle, options, frames and contentThe on handlers, options and content names of a LumaScript mod.TasksCode that waits across frames.State machinesStates and nerves in LumaScript.Services, events and LumaKitUse services and LumaKit modules from LumaScript.C and C++ in the same modMixing LumaScript with C and C++ code.Tests in the modWrite tests for your mod's own functions in LumaScript.What the compiler emitsA summary of the C code LumaLink writes from LumaScript.Standard modulesThe modules every LumaScript mod can use.Not in LumaScriptFeatures LumaScript does not have.Detailed rulesThe detailed rules of LumaScript that complete the other reference pages.Defining classesHow a mod defines classes the game can place and run.References to game objectsHow a mod keeps references to game objects safely.Text and service valuesHow a script reads a service's structs, enums and constants, shows them in text, and uses the mod's own text rows.Message tagsThe tags for waits, pages, pictures, sizes, colors and the player's name in game text.The compiled formWhat LumaLink builds from a mod's LumaScript, in detail.Example programsComplete LumaScript mods you can build and test.