Lua API reference
148 classes and 203 functions, dumped from the running game's Lua registry for Evospace 0.21.1. The same dump ships as type definitions for editor completion — see Evospace/lua-api.
Globals
- game Game Global game instance
- db DB Global prototype database
- engine Engine Global engine data
- music Music Global music manager
- quests QuestSubsystem Global quest manager
Functions and values available without a class
--- @type boolean|nil
LuaLogFlag = false
--- Prints info to log
--- @param message string
function print_info(message) end
--- Prints error to log but do not breaks execution
--- @param message string
function print_err(message) end
--- Prints warning to log
--- @param message string
function print_warn(message) end
--- Dimension of the running session
--- @type Dimension
dim = {}
Prototypes
- Biome Terrain biome definition
- BiomeFamily Biome that picks one of its sub-biomes per position
- BiomeWorldGenerator World generator driven by a global biome family
- GhostStaticBlock Static block placed as a build ghost
- GlobalBiomeFamily Planet wide biome family that also drives the global height map
- HeightGenerator Terrain height built from a stack of noises
- LogicExportOption One exportable signal option shown in the logic GUI
- LogicImportOption One importable signal option shown in the logic GUI
- LuaWorldGenerator World generator assembled from Lua defined biomes and heights
- NoiseGenerator Configurable FastNoise generator
- Prototype Database record
- Recipe Crafting-recipe prototype used by machines and crafting UIs
- RecipeDictionary Named group of recipes shared by machines of one family
- Setting Configurable game setting
- StaticAchievement Achievement progress record
- StaticBlock Placeable block prototype
- StaticChapter Group of quests unlocked together
- StaticCover Instanced mesh design used to skin blocks
- StaticCoverSet List of covers allowed by the design tool and designable blocks
- StaticItem Item prototype
- StaticItemPanel Block the recipe screen shows above the recipes of an item
- StaticObject Base prototype for anything placeable in the world
- StaticPlanet Celestial body with its own day cycle in world ticks
- StaticProp Decoration prototype scattered by the world generator
- StaticPropList Prototype asset that owns several PropListData records
- StaticQuest Quest definition and its runtime progress
- StaticResearch Research base class
- StaticResearchBonusInventory Research granting extra player inventory slots
- StaticResearchDecorationUnlock Research unlocking a decoration item
- StaticResearchEfficiency Research adding a productivity bonus to a recipe
- StaticResearchModifier Research raising a global player modifier
- StaticResearchRecipe Research unlocking a set of recipes
- StaticResearchToolUnlock Research unlocking a player tool
- StaticStructure Map generation script object with a footprint
- StaticTip Encyclopedia entry shown to the player
- StaticWeather Weather preset a biome shows for one severity band
- Tesselator Sector mesh builder prototype
- WorldGenerator Terrain generator bound to a dimension
Block logic
- AbstractCrafter Base class for recipe processing machines
- AdminElectricGeneratorBlockLogic Creative generator producing unlimited power
- AutoCrafter Crafter that picks its recipe from the input inventory
- BedBlockLogic Bed used as a respawn point
- BlockLogic Runtime state of a placed block
- BoosterBlockLogic Block speeding up the machine its far side faces
- ChestBlockLogic Chest storage block
- ComputerBlockLogic Block that speeds up nearby machines
- ConductorBlockLogic Wire block carrying a resource network
- DesignableCoverBlockLogic Block whose center cover can be redesigned in game
- DesignableFenceBlockLogic Fence block connecting to its neighbors
- DoorBlockLogic Door the player can open and close
- DrillingMachineBase Base class of resource extracting machines
- DrillingRig Drilling machine that extracts ore from the ground
- ElectricityContainerBlockLogic Electricity storage node of a conductor network
- EnvironmentCrafter Crafter powered by solar or wind environment
- FenceBlockLogic Fence that connects to its neighbours
- FluidContainerBlockLogic Fluid storage node of a conductor network
- GhostBlockLogic Placeholder waiting to be materialized into a real block
- HeatContainerBlockLogic Heat storage node of a conductor network
- LandingPadBlockLogic Landing pad deliveries arrive on
- LedBlockLogic Screen lit by logic signals
- Pumpjack Drilling machine that extracts oil from deposits
- SelectCrafter Crafter with a player selected recipe
- SpotlightBlockLogic Aimable colored spotlight
- StorageBlockLogic Base class for blocks that expose a storage inventory
Inventories
- AutosizeInventory Inventory that grows and shrinks with its contents
- BaseInventory Inventory storage base with slots, filter and capacity
- Inventory Multi slot inventory
- RecipeInventory Inventory that mirrors the slots of a recipe
- ResourceInventory Single slot inventory holding one resource item
- SingleSlotInventory Inventory with exactly one slot
Accessors
- Accessor Block side attachment point
- BaseInventoryAccessor Accessor that moves items in and out of a block
- ResourceAccessor Accessor that transfers a resource through a block side
Widgets
- ui.Border Single-slot border with uniform padding
- ui.Button
- ui.Grid Grid of equal cells, filled row by row
- ui.HBox Horizontal container
- ui.Scroll Vertical list that scrolls instead of overflowing
- ui.Text Text label
- ui.TextBox Single line the player types into
- ui.VBox Vertical container
- ui.Widget
- ui.Window Top level window with a title bar the player can drag it by
World actors
- Actor World actor
- AnimatedBlockActor Block actor driven by the animation manager
- BlockActor World actor representing a placed block
- Dimension Playable surface holding the block world
- Player Local player controller
Instances
- Console Engine console
- DB Prototype database filled by mods
- EquipmentSlotFilter Filter that accepts items declaring the matching equipment slot
- GameSessionData Settings and counters of the current save
- GraphicsSettings Engine graphics quality settings
- Instance Instancable object
- InventoryAccess Inventory interface with add and remove operations
- InventoryBlackFilter Filter that rejects listed items
- InventoryContainer Composite inventory joining several inventories into one
- InventoryFilter Base class for inventory slot filters
- InventoryInventoryFilter Filter driven by the contents of another inventory
- InventoryReader Read only inventory interface
- InventoryWhiteFilter Filter that accepts only listed items
- LogicDecider Condition paired with the signals it emits
- LogicSettings Per-block choice of exported and imported logic signals
- QuestObjective Single trackable goal of a quest
- Region Square of the world map holding sources and structures
- RegionMap Grid of regions covering the surface
- SourceData Resource deposit placed on the map
- SurfaceDefinition Generation setup of one planetary surface
- TrainScheduleStop One entry of a train schedule
Namespaces
- cs Block, sector and world coordinate conversions
- defines.events Identifiers of the gameplay events the event bus can emit
- defines.quest_state Values StaticQuest.state takes
- hud The player's own heads-up display
- shot Scripted screenshot capture
- sim Simulation tick scheduler
- weather Runtime weather control
Values and engine objects
- ActorComponent Engine actor component
- AnimSequence Engine skeletal animation sequence
- Class Engine class object
- Color 8 bit per channel RGBA color
- Engine Player facing engine and video settings
- EventSystem Gameplay event bus
- ExtractionData Item yielded by a resource deposit and its extraction speed
- FQuat Rotation quaternion
- Game Global game instance
- ItemData Item prototype paired with a count
- Kto Localization key table object
- Loc Localization data entry
- LocData Non localized data entry
- MapStructure Structure placed on the world map at an offset
- Material Engine material
- Music Background music playback control
- Object Engine object
- PlayerController Player input and view owner
- PropListData Structure that stores several StaticProp records (prop variations) with shared spawn chance
- QuestSubsystem Quest and chapter progression manager
- Rotator Euler rotation in degrees
- SoundClass Engine sound class
- StaticMesh Engine static mesh
- StaticModifier
- TallSectorData Column of generated block cells
- TesselatorCube
- TesselatorMarching
- Texture Engine 2D texture
- Transform Location, rotation and scale of an object
- Vec2i Integer vector 2
- Vec3 Float vector 3
- Vec3i Integer vector 3