Game (functions)/Map and Adventure Control: Difference between revisions

From PMDOWiki
Imbion (talk | contribs)
Created page with " == GAME:GetCurrentGround == Gets the current ground map. == GAME:GetCurrentFloor == Gets the current dungeon map. == GAME:GetCurrentDungeon == Gets the current zone, also known as dungeon. == GAME:EnterGroundMap(System.Int32,System.Int32,System.Boolean) == Leave current map, and enter specified ground map within the current zone === Arguments === * <code>id</code>: The index of the ground map in the zone * <code>idxentrypoint</code>: The index of the en..."
 
Imbion (talk | contribs)
No edit summary
 
Line 1: Line 1:


== GAME:GetCurrentGround ==
== GetCurrentGround ==
 


Gets the current ground map.
Gets the current ground map.


 
== GetCurrentFloor ==
== GAME:GetCurrentFloor ==
 


Gets the current dungeon map.
Gets the current dungeon map.


 
== GetCurrentDungeon ==
== GAME:GetCurrentDungeon ==
 


Gets the current zone, also known as dungeon.
Gets the current zone, also known as dungeon.


== EnterGroundMap ==


== GAME:EnterGroundMap(System.Int32,System.Int32,System.Boolean) ==
Leave current map, and enter specified ground map within the current zone.
 
 
Leave current map, and enter specified ground map within the current zone
 
 
=== Arguments ===
 
* <code>id</code>: The index of the ground map in the zone
* <code>idxentrypoint</code>: The index of the entry point in the ground map
* <code>preserveMusic</code>: If set to true, does not change the music when moving to the new ground map.


== GAME:EnterGroundMap(System.String,System.String,System.Boolean) ==
=== Context 1 ===
 
If the ground map is not within the current zone, the zone must be specified in order to travel to it. {{FuncUsage|nmspace=GAME|nm=EnterGroundMap|args=zone,id, entryPoint, preserveMusic}}
 
Leave current map, and enter specified ground map within the current zone


=== Context 2 ===
If the ground map is within the current zone, there is no need to specify the zone to travel to it. {{FuncUsage|nmspace=GAME|nm=EnterGroundMap|args=id, entryPoint, preserveMusic}}


=== Arguments ===
=== Arguments ===
Enter
{| class="wikitable"
{{ArgHeader}}
{{ArgRow
|name=zone
|type=String
|techt=System.String
|purp=The name of the zone the ground map is located in. Not required if traveling from a ground map to another ground map in the same zone.
}}
{{ArgRow
|name=id
|type=Integer
|techt=System.Int32
|purp=
}}
{{ArgRow
|name=entryPoint
|type=Integer OR String
|techt=System.Int32 or System.String
|purp=The name of the entry point in the ground map. May either use the entry point IDs or their names.
}}
{{ArgRow
|name=preserveMusic
|type=Boolean
|techt=System.Boolean
|purp=If set to true, does not change the music when moving to the new ground map.
}}
|}


* <code>name</code>: The name of the ground map.  It must exist within in the zone.
== EnterDungeon ==
* <code>entrypoint</code>: The name of the entry point in the ground map
* <code>preserveMusic</code>: If set to true, does not change the music when moving to the new ground map.
 
== GAME:EnterGroundMap(System.String,System.String,System.String,System.Boolean) ==
 
 
Leave current map, and enter specified ground map within a new zone.


Enters a zone and begins a new adventure. {{FuncUsage|nmspace=GAME|nm=EnterDungeon|args=dunID, structID, mapID, entry, stakes, recorded, silentRestrict}}


=== Arguments ===
=== Arguments ===
 
{| class="wikitable"
* <code>zone</code>: The name of the destination zone.
{{ArgHeader}}
* <code>name</code>: The name of the ground map.  It must exist within in the zone.
{{ArgRow
* <code>entrypoint</code>: The name of the entry point in the ground map
|name=dunID
* <code>preserveMusic</code>: If set to true, does not change the music when moving to the new ground map.
|type=Integer
 
|techt=System.Integer
== GAME:EnterDungeon ==
|purp=The id of the dungeon to travel to.
 
}}
 
{{ArgRow
Enters a zone and begins a new adventure.
|name=structID
 
|type=Integer
 
|techt=System.Integer
=== Arguments ===
|purp= The segment (or structure ID) within the zone to start in. -1 represents ground maps.
 
}}
* <code>dungeonid</code>: The id of the dungeon to travel to.
{{ArgRow
* <code>structureid</code>: The segment within the dungeon to start in. -1 represents ground maps.
|name=mapID
* <code>mapid</code>: The id of the ground map or dungeon map within the dungeon segment.
|type=Integer
* <code>entry</code>: The entry point on the resulting map
|techt=System.Integer
* <code>stakes</code>: Decides what happens when the adventure fails/succeeds.
|purp=The id of the ground map or dungeon map within the dungeon segment.
* <code>recorded</code>: Record the adventure in a replay
}}
* <code>silentRestrict</code>: Make the dungeon restrictions silently
{{ArgRow
|name=entry
|type=String
|techt=System.String
|purp=The entry point on the resulting map.
}}
{{ArgRow
|name=stakes
|type=Stake
|techt=?
|purp=Declares the [[stake|stakes]] of the exploration.
}}
{{ArgRow
|name=recorded
|type=Boolean
|techt=System.Boolean
|purp=True if the dungeon should be recorded in a replay, false if not.
}}
{{ArgRow
|name=silentRestrict
|type=Boolean
|techt=System.Boolean
|purp=True if the dungeon restrictions should be silent, false if not.
}}
|}


=== Example ===
=== Example ===
Line 81: Line 113:
== GAME:ContinueDungeon ==
== GAME:ContinueDungeon ==


Enters a zone and continues the current adventure. Used in rescue team like midpoint contexts (where PP and belly is not restored). {{FuncUsage|nmspace=GAME|nm=ContinueDungeon|args=dunID, structID, mapID, entry}}


Enters a zone and continues the current adventure.
{| class="wikitable"
 
{{ArgHeader}}
 
{{ArgRow
=== Arguments ===
|name=dunID
 
|type=Integer
* <code>dungeonid</code>: The id of the dungeon to travel to.
|techt=System.Integer
* <code>structureid</code>: The segment within the dungeon to start in. -1 represents ground maps.
|purp=The id of the dungeon to travel to.
* <code>mapid</code>: The id of the ground map or dungeon map within the dungeon segment.
}}
* <code>entry</code>: The entry point on the resulting map
{{ArgRow
|name=structID
|type=Integer
|techt=System.Integer
|purp= The segment (or structure ID) within the zone to start in. -1 represents ground maps.
}}
{{ArgRow
|name=mapID
|type=Integer
|techt=System.Integer
|purp=The id of the ground map or dungeon map within the dungeon segment.
}}
{{ArgRow
|name=entry
|type=String
|techt=System.String
|purp=The entry point on the resulting map.
}}
|}


=== Example ===
=== Example ===
Line 100: Line 151:
</pre>
</pre>


== GAME:EndDungeonRun ==
== EndDungeonRun ==
 
 
Ends the current adventure, sending the player to a specified destination.


Ends the current adventure, sending the player to a specified destination. {{FuncUsage|nmspace=GAME|nm=EndDungeonRun|args=result, zoneID, structID, mapID, entryID, display, fanfare, completedZone}}


=== Arguments ===
=== Arguments ===
 
{| class="wikitable"
* <code>result</code>: The result of the adventure.
{{ArgHeader}}
* <code>destzoneid</code>: The id of the dungeon to travel to.
{{ArgRow
* <code>structureid</code>: The segment within the dungeon to start in.  -1 represents ground maps.
|name=result
* <code>mapid</code>: The id of the ground map or dungeon map within the dungeon segment.
|type=(undocumented)
* <code>entryid</code>: The entry point on the resulting map
|techt=(undocumented)
* <code>display</code>: Display an epitaph marking the end of the adventure.
|purp=The result of the adventure.
* <code>fanfare</code>: Play a fanfare.
}}
* <code>completedZone</code>: Zone to mark as completed. Defaults to current zone.
{{ArgRow
|name=zoneID
|type=String
|techt=System.String
|purp=The id of the dungeon to travel to.
}}
{{ArgRow
|name=structID
|type=String
|techt=System.String
|purp=The segment within the dungeon to start in.  -1 represents ground maps.
}}
{{ArgRow
|name=mapID
|type=String
|techt=System.String
|purp=The id of the ground map or dungeon map within the dungeon segment.
}}
{{ArgRow
|name=entryID
|type=String
|techt=System.String
|purp=The entry point on the resulting map
}}
{{ArgRow
|name=display
|type=(undocumented)
|techt=(undocumented)
|purp=Display an epitaph marking the end of the adventure.
}}
{{ArgRow
|name=fanfare
|type=Boolean
|techt=System.Boolean
|purp=Play a fanfare.
}}
{{ArgRow
|name=completedZone
|type=Boolean
|techt=System.Boolean
|purp=Zone to mark as completed. Defaults to current zone.
}}
|}


=== Example ===
=== Example ===
Line 125: Line 216:
</pre>
</pre>


== GAME:EnterZone(System.String,System.Int32,System.Int32,System.Int32) ==
== EnterZone ==
 


Enters a zone and begins a new adventure.
Enters a zone and begins a new adventure.


=== Arguments ===
=== Arguments ===
 
{| class="wikitable"
* <code>dungeonid</code>: The id of the dungeon to travel to.
{{ArgHeader}}
* <code>structureid</code>: The segment within the dungeon to start in. -1 represents ground maps.
{{ArgRow
* <code>mapid</code>: The id of the ground map or dungeon map within the dungeon segment.
|name=dunID
* <code>entry</code>: The entry point on the resulting map
|type=Integer
|techt=System.Integer
|purp=The id of the dungeon to travel to.
}}
{{ArgRow
|name=structID
|type=Integer
|techt=System.Integer
|purp= The segment (or structure ID) within the zone to start in. -1 represents ground maps.
}}
{{ArgRow
|name=mapID
|type=Integer
|techt=System.Integer
|purp=The id of the ground map or dungeon map within the dungeon segment.
}}
{{ArgRow
|name=entry
|type=String
|techt=System.String
|purp=The entry point on the resulting map.
}}
|}

Latest revision as of 21:45, 17 January 2026

GetCurrentGround

Gets the current ground map.

GetCurrentFloor

Gets the current dungeon map.

GetCurrentDungeon

Gets the current zone, also known as dungeon.

EnterGroundMap

Leave current map, and enter specified ground map within the current zone.

Context 1

If the ground map is not within the current zone, the zone must be specified in order to travel to it. Argument order is GAME:EnterGroundMap(zone,id, entryPoint, preserveMusic).

Context 2

If the ground map is within the current zone, there is no need to specify the zone to travel to it. Argument order is GAME:EnterGroundMap(id, entryPoint, preserveMusic).

Arguments

Enter

Name Type Technical Type Purpose
zone String System.String The name of the zone the ground map is located in. Not required if traveling from a ground map to another ground map in the same zone.
id Integer System.Int32
entryPoint Integer OR String System.Int32 or System.String The name of the entry point in the ground map. May either use the entry point IDs or their names.
preserveMusic Boolean System.Boolean If set to true, does not change the music when moving to the new ground map.

EnterDungeon

Enters a zone and begins a new adventure. Argument order is GAME:EnterDungeon(dunID, structID, mapID, entry, stakes, recorded, silentRestrict).

Arguments

Name Type Technical Type Purpose
dunID Integer System.Integer The id of the dungeon to travel to.
structID Integer System.Integer The segment (or structure ID) within the zone to start in. -1 represents ground maps.
mapID Integer System.Integer The id of the ground map or dungeon map within the dungeon segment.
entry String System.String The entry point on the resulting map.
stakes Stake ? Declares the stakes of the exploration.
recorded Boolean System.Boolean True if the dungeon should be recorded in a replay, false if not.
silentRestrict Boolean System.Boolean True if the dungeon restrictions should be silent, false if not.

Example


GAME:EnterDungeon(1, 0, 0, 0, RogueEssence.Data.GameProgress.DungeonStakes.Risk, true, false)

GAME:ContinueDungeon

Enters a zone and continues the current adventure. Used in rescue team like midpoint contexts (where PP and belly is not restored). Argument order is GAME:ContinueDungeon(dunID, structID, mapID, entry).

Name Type Technical Type Purpose
dunID Integer System.Integer The id of the dungeon to travel to.
structID Integer System.Integer The segment (or structure ID) within the zone to start in. -1 represents ground maps.
mapID Integer System.Integer The id of the ground map or dungeon map within the dungeon segment.
entry String System.String The entry point on the resulting map.

Example


GAME:ContinueDungeon(1, 1, 0, 0)

EndDungeonRun

Ends the current adventure, sending the player to a specified destination. Argument order is GAME:EndDungeonRun(result, zoneID, structID, mapID, entryID, display, fanfare, completedZone).

Arguments

Name Type Technical Type Purpose
result (undocumented) (undocumented) The result of the adventure.
zoneID String System.String The id of the dungeon to travel to.
structID String System.String The segment within the dungeon to start in. -1 represents ground maps.
mapID String System.String The id of the ground map or dungeon map within the dungeon segment.
entryID String System.String The entry point on the resulting map
display (undocumented) (undocumented) Display an epitaph marking the end of the adventure.
fanfare Boolean System.Boolean Play a fanfare.
completedZone Boolean System.Boolean Zone to mark as completed. Defaults to current zone.

Example


GAME:EndDungeonRun(GameProgress.ResultType.Cleared, 0, -1, 1, 0, true, true)

EnterZone

Enters a zone and begins a new adventure.

Arguments

Name Type Technical Type Purpose
dunID Integer System.Integer The id of the dungeon to travel to.
structID Integer System.Integer The segment (or structure ID) within the zone to start in. -1 represents ground maps.
mapID Integer System.Integer The id of the ground map or dungeon map within the dungeon segment.
entry String System.String The entry point on the resulting map.