Boons
Based on game build 714014 | Last updated: 2026-02-27
Overview
The boons.lua module defines collections of predefined static layouts representing "boons" — curated spawns of items and resources placed in the world during generation. These layouts are used to populate bonus areas (such as those generated by the AbyssPillar or other worldgen triggers) with thematic, difficulty-appropriate rewards. Boons are organized into two tiers (Any and Rare) and further subdivided into specific types (e.g., WoodBoon, FishingBoon, Level4Boon). Each boon is constructed using StaticLayout.Get, referencing the "map/static_layouts/small_boon" template and defining item_area and resource_area content via closures.
The module exposes two top-level tables:
Sandbox: Contains boon definitions grouped by rarity (Any,Rare).Layouts: A flattened dictionary mapping boon names directly to theirStaticLayoutinstances.
This component does not attach to entities or implement logic at runtime; it serves as a data definition layer for map generation workflows.
Usage example
local Boons = require("map/boons")
-- Access a specific boon layout
local wood_boon_layout = Boons.Layouts["WoodBoon"]
-- Access boons by rarity category
local rare_boons = Boons.Sandbox["Rare"]
-- Iterate and use layouts in worldgen logic
for name, layout in pairs(Boons.Layouts) do
-- e.g., `layout:Place(inst)` or equivalent generation hooks
end
Dependencies & tags
Components used: None identified.
Tags: None identified.
Properties
No public instance properties are defined in this file. The file is a pure data definition module returning static configuration tables.
Main functions
No callable functions are exported. The module only returns a table with two keys: Sandbox and Layouts, containing pre-built StaticLayout instances.
Events & listeners
None.