Delve Functions
Overview
The core.delves module provides functions for managing delve instances, including entering, completing, and leaving delves.
core.delves.is_in_delve
Syntax
core.delves.is_in_delve() -> boolean
boolean: Whether the player is currently inside a delve instance.
Returns whether the player is currently inside a delve. Use this to gate delve-specific logic.
core.delves.is_delve_complete
Syntax
core.delves.is_delve_complete() -> boolean
boolean: Whether the current delve has been completed.
Returns whether the current delve instance has been completed. A delve is considered complete when all objectives have been fulfilled and rewards are available.
core.delves.enter_delve
Syntax
core.delves.enter_delve() -> nil
nil
Enters a delve instance. The player must be at a valid delve entrance for this to work.
core.delves.teleport_out
Syntax
core.delves.teleport_out() -> nil
nil
Teleports the player out of the current delve instance. This returns the player to the delve entrance in the open world.
core.delves.leave_delve
Syntax
core.delves.leave_delve() -> nil
nil
Leaves the current delve instance entirely. Unlike teleport_out, this fully exits the delve group and instance.
Complete Example
Delve Completion Handler
local function handle_delve()
if not core.delves.is_in_delve() then
return
end
if core.delves.is_delve_complete() then
core.log("Delve complete! Teleporting out...")
core.delves.teleport_out()
end
end