Game (functions)/Adventure
This page documents the ScriptGame class for Lua scripting.
As a singleton class, it can be accessed from Lua with GAME.
EnterGroundMap
GAME:EnterGroundMap(id, idxentrypoint, preserveMusic)
Leave current map, and enter specified ground map within the current zone
Parameters
| Name | Type | Description |
|---|---|---|
| System.Int32 | System.Int32 | The index of the ground map in the zone |
| System.Int32 | System.Int32 | The index of the entry point in the ground map |
| System.Boolean | System.Boolean | If set to true, does not change the music when moving to the new ground map. |
EnterGroundMap
GAME:EnterGroundMap(name, entrypoint, preserveMusic)
Leave current map, and enter specified ground map within the current zone
Parameters
| Name | Type | Description |
|---|---|---|
| System.String | System.String | The name of the ground map. It must exist within in the zone. |
| System.String | System.String | The name of the entry point in the ground map |
| System.Boolean | System.Boolean | If set to true, does not change the music when moving to the new ground map. |
EnterGroundMap
GAME:EnterGroundMap(zone, name, entrypoint, preserveMusic)
Leave current map, and enter specified ground map within a new zone.
Parameters
| Name | Type | Description |
|---|---|---|
| System.String | System.String | The name of the destination zone. |
| System.String | System.String | The name of the ground map. It must exist within in the zone. |
| System.String | System.String | The name of the entry point in the ground map |
| System.Boolean | System.Boolean | If set to true, does not change the music when moving to the new ground map. |
EnterDungeon
GAME:EnterDungeon(dungeonid, structureid, mapid, entry, stakes, recorded, silentRestrict)
Enters a zone and begins a new adventure.
Parameters
| Name | Type | Description |
|---|---|---|
| System.String | System.String | The id of the dungeon to travel to. |
| System.Int32 | System.Int32 | The segment within the dungeon to start in. -1 represents ground maps. |
| System.Int32 | System.Int32 | The id of the ground map or dungeon map within the dungeon segment. |
| System.Int32 | System.Int32 | The entry point on the resulting map |
| RogueEssence.Data.GameProgress.DungeonStakes | RogueEssence.Data.GameProgress.DungeonStakes | Decides what happens when the adventure fails/succeeds. |
| System.Boolean | System.Boolean | Record the adventure in a replay |
| System.Boolean | System.Boolean | Make the dungeon restrictions silently |
Returns
| Type | Description |
|---|---|
| NLua.LuaFunction |
ContinueDungeon
GAME:ContinueDungeon(dungeonid, structureid, mapid, entry)
Enters a zone and continues the current adventure. Often used in midpoint rest areas.
Parameters
| Name | Type | Description |
|---|---|---|
| System.String | System.String | The id of the dungeon to travel to. |
| System.Int32 | System.Int32 | The segment within the dungeon to start in. -1 represents ground maps. |
| System.Int32 | System.Int32 | The id of the ground map or dungeon map within the dungeon segment. |
| System.Int32 | System.Int32 | The entry point on the resulting map |
Returns
| Type | Description |
|---|---|
| NLua.LuaFunction |
EndDungeonRun
GAME:EndDungeonRun(result, destzoneid, structureid, mapid, entryid, display, fanfare, completedZone)
Ends the current adventure, sending the player to a specified destination.
Parameters
| Name | Type | Description |
|---|---|---|
| RogueEssence.Data.GameProgress.ResultType | RogueEssence.Data.GameProgress.ResultType | The result of the adventure. |
| System.String | System.String | The id of the dungeon to travel to. |
| System.Int32 | System.Int32 | The segment within the dungeon to start in. -1 represents ground maps. |
| System.Int32 | System.Int32 | The id of the ground map or dungeon map within the dungeon segment. |
| System.Int32 | System.Int32 | The entry point on the resulting map |
| System.Boolean | System.Boolean | Display an epitaph marking the end of the adventure. |
| System.Boolean | System.Boolean | Play a fanfare. |
| System.String | System.String | Zone to mark as completed. Defaults to current zone. |
Returns
| Type | Description |
|---|---|
| NLua.LuaFunction |
EnterZone
GAME:EnterZone(dungeonid, structureid, mapid, entry)
Enters a zone and begins a new adventure.
Parameters
| Name | Type | Description |
|---|---|---|
| System.String | System.String | The id of the dungeon to travel to. |
| System.Int32 | System.Int32 | The segment within the dungeon to start in. -1 represents ground maps. |
| System.Int32 | System.Int32 | The id of the ground map or dungeon map within the dungeon segment. |
| System.Int32 | System.Int32 | The entry point on the resulting map |
InRogueMode
GAME:InRogueMode()
Checks if the current game is in rogue mode.
Returns
| Type | Description |
|---|---|
| System.Boolean | True if in rogue mode, false otherwise. |
GetDailySeed
GAME:GetDailySeed()
Gets the random seed for the current adventure.
Returns
| Type | Description |
|---|---|
| System.UInt64 | The current adventure's seed. |
References
https://github.com/RogueCollab/RogueEssence/blob/master/RogueEssence/Lua/ScriptGameAdventure.cs
