Dlcsupport Worldgen
Based on game build 714014 | Last updated: 2026-03-10
Overview
This module implements a lightweight DLC support system used during world generation to determine which DLC content (e.g., Reign of Giants) should be considered active. It defines DLC identifiers, maintains an internal enablement table, and exposes utility functions (IsDLCEnabled, SetDLCEnabled) to query and configure DLC state. It is typically invoked early in the worldgen pipeline, parsing GEN_PARAMETERS to initialize the active DLC set.
Usage example
require "dlcsupport_worldgen"
if IsDLCEnabled(REIGN_OF_GIANTS) then
-- Apply RoG-specific worldgen logic
worldgen_params.seasons_enabled = true
end
Dependencies & tags
Components used: None
Tags: None identified
Properties
No public properties
Main functions
IsDLCEnabled(index)
- Description: Returns whether the DLC identified by
indexis currently enabled. - Parameters:
index(number) — A numeric identifier such asMAIN_GAME(0) orREIGN_OF_GIANTS(1). - Returns:
trueif the DLC is enabled; otherwisefalse.
SetDLCEnabled(tbl)
- Description: Updates the global DLC enablement state using a provided table. Any DLC not present in the table defaults to disabled.
- Parameters:
tbl(table ornil) — A key-value table where keys are DLC index numbers and values are booleans indicating enablement. Ifnil, clears all enablement state. - Returns: Nothing.
Events & listeners
None identified