Show raw api
{
"functions": [
{
"name": "purge",
"desc": "Purge a region from the global world state\n\n### Options\n| Name | Type | Default | Description |\n|-----------------|-------------|---------|--------------------------------|\n| locals | bool | true | purge locals from region |\n| seed | bool | true | purge seeds from region |\n| doors | bool | true | purge doors from region |",
"params": [
{
"name": "options",
"desc": "settings",
"lua_type": "table"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 50,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "stage_advance",
"desc": "Advances progression by one stage\n\nIncreases the stage level by one without adjusting the offset",
"params": [],
"returns": [],
"function_type": "static",
"source": {
"line": 112,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "warp",
"desc": "Sets the current room\n\n### Options\n| Name | Type | Default | Description |\n|-----------------|-------------|---------|--------------------------------|\n| purge | bool | false | reset and regenerate region |\n| x | number | - | target world x coordinate |\n| y | number | - | target world y coordinate |\n| z | number | - | target world z coordinate |\n| player_x | number | 79 | player horizontal coordinate |\n| player_y | number | 29 | player vertical coordinate |",
"params": [
{
"name": "id",
"desc": "region identifier",
"lua_type": "string"
},
{
"name": "options",
"desc": "settings",
"lua_type": "table"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 160,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "teleport",
"desc": "The same as warp but with the destination id implicitly being the current region",
"params": [
{
"name": "options",
"desc": "settings (see warp)",
"lua_type": "table"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 168,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "ascend",
"desc": "Increase the current Z coordinate by one, keeping the player position",
"params": [],
"returns": [],
"function_type": "static",
"source": {
"line": 175,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "descend",
"desc": "Decrease the current Z coordinate by one, keeping the player position",
"params": [],
"returns": [],
"function_type": "static",
"source": {
"line": 181,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "origin",
"desc": "Teleport to the origin of the current room",
"params": [],
"returns": [],
"function_type": "static",
"source": {
"line": 187,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "mirror_push",
"desc": "Push a room mirror onto the stack",
"params": [
{
"name": "value",
"desc": "mirror value",
"lua_type": "string"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 269,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "mirror_pop",
"desc": "Pop a room mirror from the stack",
"params": [],
"returns": [],
"function_type": "static",
"source": {
"line": 276,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "template_get",
"desc": "Get the template at the specified position.",
"params": [
{
"name": "pos",
"desc": "regional world coordinates (x, y, z)",
"lua_type": "table"
}
],
"returns": [
{
"desc": "",
"lua_type": "TemplateRef"
}
],
"function_type": "static",
"source": {
"line": 291,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "template_find",
"desc": "Search for a position of the given template group",
"params": [
{
"name": "group",
"desc": "template group id",
"lua_type": "string"
}
],
"returns": [
{
"desc": "position",
"lua_type": "table"
}
],
"function_type": "static",
"source": {
"line": 301,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "var_global",
"desc": "Retrieve a reference to a global variable",
"params": [
{
"name": "key",
"desc": "variable path",
"lua_type": "string"
},
{
"name": "options",
"desc": "settings",
"lua_type": "table|nil"
}
],
"returns": [
{
"desc": "",
"lua_type": "GlobalRef"
}
],
"function_type": "static",
"source": {
"line": 312,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "var_regional",
"desc": "Retrieve a reference to a regional variable\n\n### Options\n| Name | Type | Default | Description |\n|-----------------|-------------|---------|--------------------------------|\n| id | string | Current | Region of variable |",
"params": [
{
"name": "key",
"desc": "variable path",
"lua_type": "string"
},
{
"name": "options",
"desc": "settings",
"lua_type": "table|nil"
}
],
"returns": [
{
"desc": "",
"lua_type": "GlobalRef"
}
],
"function_type": "static",
"source": {
"line": 328,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "var_local",
"desc": "Retrieve a reference to a local variable\n\n### Options\n| Name | Type | Default | Description |\n|-----------------|-------------|---------|--------------------------------|\n| id | string | Current | Region of variable |\n| x | number | Current | World horizontal coordinate |\n| y | number | Current | World vertical coordinate |\n| z | number | Current | World depth coordinate |",
"params": [
{
"name": "key",
"desc": "variable path",
"lua_type": "string"
},
{
"name": "options",
"desc": "settings",
"lua_type": "table|nil"
}
],
"returns": [
{
"desc": "",
"lua_type": "GlobalRef"
}
],
"function_type": "static",
"source": {
"line": 347,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "var_local_filter",
"desc": "Filter all local variables\n\n### Options\n| Name | Type | Default | Description |\n|-----------------|-------------|---------|--------------------------------|\n| start | string | - | Name start with string filter |\n| region | string | Current | Region to filter |",
"params": [
{
"name": "options",
"desc": "settings",
"lua_type": "table"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 362,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "permanent_get",
"desc": "Retrieve a permanent variable as string",
"params": [
{
"name": "key",
"desc": "variable path",
"lua_type": "string"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 370,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "permanent_set",
"desc": "Set a permanent variable to a value",
"params": [
{
"name": "key",
"desc": "variable path",
"lua_type": "string"
},
{
"name": "value",
"desc": "new value",
"lua_type": "string"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 379,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "connector_check",
"desc": "Check if a given connector is set in the current room",
"params": [
{
"name": "connector_id",
"desc": "connector identifier",
"lua_type": "string"
}
],
"returns": [
{
"desc": "true if connector is set",
"lua_type": "boolean"
}
],
"function_type": "static",
"source": {
"line": 409,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "entry_check",
"desc": "Check if a given connector is an entry in the current room",
"params": [
{
"name": "connector_id",
"desc": "connector identifier",
"lua_type": "string"
}
],
"returns": [
{
"desc": "true if entry is set",
"lua_type": "boolean"
}
],
"function_type": "static",
"source": {
"line": 419,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "collision_set",
"desc": "Set the collision value at the specified coordinates",
"params": [
{
"name": "x",
"desc": "horizontal coordinate",
"lua_type": "number"
},
{
"name": "y",
"desc": "vertical coordinate",
"lua_type": "number"
},
{
"name": "value",
"desc": "value to set",
"lua_type": "boolean"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 430,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "collision_fill",
"desc": "Fill the collision value in the specified area",
"params": [
{
"name": "area",
"desc": "area data",
"lua_type": "table"
},
{
"name": "value",
"desc": "collision flag to set",
"lua_type": "number"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 439,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "collision_get",
"desc": "Get the collision value at the specified coordinates",
"params": [
{
"name": "x",
"desc": "horizontal coordinate",
"lua_type": "number"
},
{
"name": "y",
"desc": "vertical coordinate",
"lua_type": "number"
}
],
"returns": [
{
"desc": "collision flag",
"lua_type": "boolean"
}
],
"function_type": "static",
"source": {
"line": 449,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "collision_floor_set",
"desc": "Set the floor collision value at the specified coordinates",
"params": [
{
"name": "x",
"desc": "horizontal coordinate",
"lua_type": "number"
},
{
"name": "y",
"desc": "vertical coordinate",
"lua_type": "number"
},
{
"name": "value",
"desc": "value to set",
"lua_type": "boolean"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 460,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "collision_floor_fill",
"desc": "Fill the collision value in the specified area",
"params": [
{
"name": "area",
"desc": "area data",
"lua_type": "table"
},
{
"name": "value",
"desc": "collision flag to set",
"lua_type": "number"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 469,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "collision_floor_get",
"desc": "Get the floor collision value at the specified coordinates",
"params": [
{
"name": "x",
"desc": "horizontal coordinate",
"lua_type": "number"
},
{
"name": "y",
"desc": "vertical coordinate",
"lua_type": "number"
}
],
"returns": [
{
"desc": "collision flag",
"lua_type": "boolean"
}
],
"function_type": "static",
"source": {
"line": 479,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "cell_set",
"desc": "Set a cell in the current room\n\n### Cell Data\n| Name | Type | Default | Description |\n|-----------------|-------------|---------|--------------------------------|\n| collision | bool | false | Cell collision flag |\n| char | string | - | Cell character |\n| fg | table | white | Cell foreground color |\n| bg | table | black | Cell background color |",
"params": [
{
"name": "x",
"desc": "horizontal coordinate",
"lua_type": "number"
},
{
"name": "y",
"desc": "vertical coordinate",
"lua_type": "number"
},
{
"name": "value",
"desc": "cell data",
"lua_type": "table"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 498,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "cell_fill",
"desc": "Fill an area with cell data in the current room\n\n### Area Data\n| Name | Type | Default | Description |\n|-----------------|-------------|---------|--------------------------------|\n| x1 | number | 0 | Start x coordinate |\n| y1 | number | 0 | Start y coordinate |\n| x2 | number | 0 | End x coordinate |\n| y2 | number | 0 | End y coordinate |\n| fill | bool | true | Fill the area |\n\n### Cell Data\n| Name | Type | Default | Description |\n|-----------------|-------------|---------|--------------------------------|\n| collision | bool | false | Cell collision flag |\n| char | string | - | Cell character |\n| fg | table | white | Cell foreground color |\n| bg | table | black | Cell background color |",
"params": [
{
"name": "area",
"desc": "area data",
"lua_type": "table"
},
{
"name": "value",
"desc": "cell data",
"lua_type": "table"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 524,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "cell_get",
"desc": "Get the cell data of the current room at the specified coordinates",
"params": [
{
"name": "x",
"desc": "horizontal coordinate",
"lua_type": "number"
},
{
"name": "y",
"desc": "vertical coordinate",
"lua_type": "number"
}
],
"returns": [
{
"desc": "cell data",
"lua_type": "table"
}
],
"function_type": "static",
"source": {
"line": 534,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "cell_overlay_set",
"desc": "Set an overlay cell in the current room\n\n### Cell Data\n| Name | Type | Default | Description |\n|-----------------|-------------|---------|--------------------------------|\n| char | string | - | Cell character |\n| fg | table | white | Cell foreground color |\n| bg | table | black | Cell background color |",
"params": [
{
"name": "x",
"desc": "horizontal coordinate",
"lua_type": "number"
},
{
"name": "y",
"desc": "vertical coordinate",
"lua_type": "number"
},
{
"name": "value",
"desc": "cell data",
"lua_type": "table"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 552,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "cell_overlay_fill",
"desc": "Fill an area with overlay cell data in the current room\n\n### Area Data\n| Name | Type | Default | Description |\n|-----------------|-------------|---------|--------------------------------|\n| x1 | number | 0 | Start x coordinate |\n| y1 | number | 0 | Start y coordinate |\n| x2 | number | 0 | End x coordinate |\n| y2 | number | 0 | End y coordinate |\n| fill | bool | true | Fill the area |\n\n### Cell Data\n| Name | Type | Default | Description |\n|-----------------|-------------|---------|--------------------------------|\n| char | string | - | Cell character |\n| fg | table | white | Cell foreground color |\n| bg | table | black | Cell background color |",
"params": [
{
"name": "area",
"desc": "area data",
"lua_type": "table"
},
{
"name": "value",
"desc": "cell data",
"lua_type": "table"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 577,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "cell_overlay_get",
"desc": "Get the overlay cell data of the current room at the specified coordinates",
"params": [
{
"name": "x",
"desc": "horizontal coordinate",
"lua_type": "number"
},
{
"name": "y",
"desc": "vertical coordinate",
"lua_type": "number"
}
],
"returns": [
{
"desc": "cell data",
"lua_type": "table"
}
],
"function_type": "static",
"source": {
"line": 587,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "entity_filter",
"desc": "Remove entities based on the specified criteria\n\n### Options\n| Name | Type | Default | Description |\n|-----------------|-------------|---------|--------------------------------|\n| purge | bool | false | Purge instead of kill |\n| bullets | bool | false | Select all bullets |\n| enemies | bool | false | Select all enemies |\n| value | string | - | Select value store id |",
"params": [
{
"name": "options",
"desc": "settings",
"lua_type": "table"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 604,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "Global",
"desc": "Shortcut for `World.var_global`",
"params": [
{
"name": "key",
"desc": "variable path",
"lua_type": "string"
},
{
"name": "options",
"desc": "settings",
"lua_type": "table"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 24,
"path": "../../res/data/script/lib/init.lua"
}
},
{
"name": "Regional",
"desc": "Shortcut for `World.var_regional`",
"params": [
{
"name": "key",
"desc": "variable path",
"lua_type": "string"
},
{
"name": "options",
"desc": "settings",
"lua_type": "table"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 34,
"path": "../../res/data/script/lib/init.lua"
}
},
{
"name": "Local",
"desc": "Shortcut for `World.var_local`",
"params": [
{
"name": "key",
"desc": "variable path",
"lua_type": "string"
},
{
"name": "options",
"desc": "settings",
"lua_type": "table"
}
],
"returns": [],
"function_type": "static",
"source": {
"line": 44,
"path": "../../res/data/script/lib/init.lua"
}
}
],
"properties": [
{
"name": "id",
"desc": "Get/Set the world identifier (e.g. \"forest\")",
"lua_type": "string",
"source": {
"line": 16,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "id_change",
"desc": "Get the flag marking a world id change since the last room change",
"lua_type": "boolean",
"source": {
"line": 23,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "shift_applied",
"desc": "Get the flag marking last room change was a shift",
"lua_type": "boolean",
"source": {
"line": 30,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "shift_disable",
"desc": "Get/Set the flag disabling the player shifting between rooms",
"lua_type": "boolean",
"source": {
"line": 37,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "pos",
"desc": "Get/Set the world position (x/y/z)",
"lua_type": "table",
"source": {
"line": 59,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "x",
"desc": "Get/Set the world x coordinate",
"lua_type": "number",
"source": {
"line": 66,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "y",
"desc": "Get/Set the world y coordinate",
"lua_type": "number",
"source": {
"line": 73,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "z",
"desc": "Get/Set the world z coordinate",
"lua_type": "number",
"source": {
"line": 80,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "seed",
"desc": "Get the global world seed",
"lua_type": "number",
"source": {
"line": 87,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "seed_room",
"desc": "Get the room seed (current x, y, z)\n\nThe room seed is based on the world and regional seed",
"lua_type": "number",
"source": {
"line": 96,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "seed_region",
"desc": "Get the region seed (current id)\n\nThe regional seed may change on a regional reset",
"lua_type": "number",
"source": {
"line": 105,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "stage_level",
"desc": "Get/Set the global stage level.",
"lua_type": "number",
"source": {
"line": 120,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "dungeon_level",
"desc": "Get/Set the global dungeon level.",
"lua_type": "number",
"source": {
"line": 127,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "music_level",
"desc": "Get/Set the global music level.",
"lua_type": "number",
"source": {
"line": 134,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "fog_intensity",
"desc": "You can use a shader instead.",
"lua_type": "number",
"tags": [
"deprecated"
],
"source": {
"line": 143,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "gravity",
"desc": "Get/Set the current gravity",
"lua_type": "table",
"source": {
"line": 195,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "gravity_x",
"desc": "Get/Set the current horizontal gravity",
"lua_type": "number",
"source": {
"line": 202,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "gravity_y",
"desc": "Get/Set the current vertical gravity",
"lua_type": "number",
"source": {
"line": 209,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "difficulty",
"desc": "Get the current difficulty",
"lua_type": "DifficultyRef",
"source": {
"line": 216,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "mode",
"desc": "Get/Set the current mode",
"lua_type": "string",
"source": {
"line": 222,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "mode_play",
"desc": "Get/Set the current play mode\n\n### Play Modes\n| Value |\n|-----------------|\n| Rogue |\n| Adventure |",
"lua_type": "string",
"source": {
"line": 235,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "mode_life",
"desc": "Get/Set the current life mode\n\n### Life Modes\n| Value | Description |\n|-----------------|-------------------------|\n| Reset | Reset in room on death |\n| Health | Death when health is 0 |",
"lua_type": "string",
"source": {
"line": 248,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "mirror",
"desc": "Get the current room mirror\n\n### Mirrors\n| Value | Description |\n|-----------------|-------------------------|\n| empty | no mirror |\n| I | horizontal mirror |\n| - | vertical mirror |\n| X | point mirror |",
"lua_type": "string",
"source": {
"line": 263,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "template",
"desc": "Get the template at the current position.",
"lua_type": "TemplateRef",
"source": {
"line": 284,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "elapsed",
"desc": "Get the elapsed seconds of the world simulation",
"lua_type": "number",
"source": {
"line": 388,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "elapsed_room",
"desc": "Get the elapsed seconds of the world simulation since entering the room",
"lua_type": "number",
"source": {
"line": 395,
"path": "../../res/data/script/lib/system/world.lua"
}
},
{
"name": "elapsed_visual",
"desc": "Get the elapsed seconds of the visual world simulation",
"lua_type": "number",
"source": {
"line": 402,
"path": "../../res/data/script/lib/system/world.lua"
}
}
],
"types": [],
"name": "World",
"desc": "The world interface\n\n```lua\n```",
"source": {
"line": 8,
"path": "../../res/data/script/lib/system/world.lua"
}
}