Lua Function Reference: Difference between revisions

From PMDOWiki
Imbion (talk | contribs)
Imbion (talk | contribs)
Line 49: Line 49:


== Game ==
== Game ==
{{subpage|Script Reference/Game}}
=== Game Control ===
=== Game Control ===
{{subpage|Script Reference/Game}}
{| class="wikitable"
{| class="wikitable"
|-
|-
Line 63: Line 63:
|}
|}
=== Map and Adventure Control ===
=== Map and Adventure Control ===
{{subpage|Script Reference/Game}}
{| class="wikitable"
{| class="wikitable"
|-
|-

Revision as of 15:56, 26 November 2025

This article is in need of cleanup to increase its quality. You can help PMDO Wiki by improving it.

This is a reference page of all the functions that can be called in Lua and their namespaces.

AI

Function Arguments Description Example
AI:SetCharacterAI GroundCharacter - RogueEssence.Ground.GroundChar,System.String
AIClass - System.Object[]
Gives the ground character the assigned AI. x
AI:DisableCharacterAI GroundCharacter - RogueEssence.Ground.GroundChar,System.String Disables the AI processing of the ground character. x
AI:EnableCharacterAI GroundCharacter - RogueEssence.Ground.GroundChar,System.String Enables the AI processing of the ground character, if it has been disabled by DisableCharacterAI. x
AI:SetAIState GroundCharacter - RogueEssence.Ground.GroundChar,System.String
string - System.String
??? x

Dungeon

Function Arguments Description Example
DUNGEON:CharTurnToChar turningCharacter - RogueEssence.Dungeon.Character
turnedToCharacter - RogueEssence.Dungeon.Character
Makes a character turn to face another. x
DUNGEON:LastDungeonResult None Gets the result of the last dungeon adventure. x
DUNGEON:DungeonCurrentFloor None Returns the floor number of the current dungeon. x
DUNGEON:DungeonAssetName None Returns the internal name for the current dungeon. x
DUNGEON:DungeonDisplayName None Returns the localized name of the current dungeon. x
DUNGEON:CharSetEmote Chara - RogueEssence.Dungeon.Character,System.String,System.Int32
emoteid - System.String
cycles - System.Int32
Set a character's emote in a dungeon map. x
DUNGEON:CharStartAnim Chara, anim, loop Set a character's animation. DUNGEON:CharStartAnim(player, anim, false)
DUNGEON:CharEndAnim Chara Stops a character's current animation, reverting them to default idle. DUNGEON:CharEndAnim(player)
DUNGEON:PlayVFX emitter - RogueEssence.Content.FiniteEmitter, x - System.Int32, y - System.Int32, dir - RogueElements.Dir8 Plays a VFX in the dungeon map x
DUNGEON:PlayVFX emitter - RogueEssence.Content.FiniteEmitter, x - System.Int32, y - System.Int32, dir - RogueElements.Dir8, xTo - System.Int32, yTo - System.Int32 Plays a VFX that has a start position and an end position. It uses a finite emitter that generates BaseAnims. x
DUNGEON:MoveScreen mover - RogueEssence.Content.ScreenMover Plays a screen-moving effect. x

Game

Game Control

Function Arguments Description Example
GAME:GetModDiff ? ? x
GAME:RestartToTitle None Leave the current map and load the title screen. x
GAME:RestartRogue Config Restarts a roguelocke run based on the configuration. x

Map and Adventure Control

Function Arguments Description Example
GAME:GetCurrentGround None Returns the current ground map. x
GAME:GetCurrentFloor None Returns the current dungeon map. x
GAME:GetCurrentDungeon None Returns the current zone (aka dungeon). x
GAME:EnterGroundMap varies (see subpage) Enter the specified ground map. x
GAME:EnterDungeon dungeonid
structureid
mapid
entry
stakes
recorded
silentRestrict
Enter the specified dungeon. x
GAME:ContinueDungeon dungeonid
structureid
mapid
entry
Enter the zone and continue the current ongoing adventure. x
GAME:EndDungeonRun result
destzoneid
structureid
mapid
entryid<br?display
fanfae
completedZone
Enter the zone and continue the current ongoing adventure. x
GAME:EnterZone dungeonid
structureid
mapid
entry
Enter the zone and begin an adventure. x

Rescue Management

Function Arguments Description Example
GAME:EnterRescue sosPath Enter a zone and begin a rescue. x
GAME:AddAOKRemark ? x
GAME:HasSOSMail ? x
GAME:HasAOKMail ? x

Camera & Scene Control

Function Arguments Description Example
GAME:FadeOut white
duration
Fades screen out, waits to finish. x
GAME:FadeIn duration Fades screen in, waits to finish. x
GAME:MoveCamera x
y
duration
toPlayer
Moves the camera. x
GAME:MoveCameraToChara x
y
duration
chara
x
GAME:GetCameraCenter None x
GAME:IsCameraOnChar None x

Team Management

Function Arguments Description Example
GAME:GetTeamLeaderIndex None Returns the index of the currently player controlled entity in the party. x
GAME:SetTeamLeaderIndex idx Sets the leader to the chosen index in the party. x
GAME:SetCanSwitch canSwitch Configure the ability to switch leaders in the save file. x
GAME:SetCanRecruit canRecruit Configure the ability to recruit in the save file. x

Party Management

Function Arguments Description Example
GAME:GetPlayerPartyCount None Returns the player's party count. x
GAME:GetPlayerPartyTable None Returns the player's party as a lua table, excluding guests. x
GAME:GetPlayerPartyMember index Returns the party member at the specified team index. x
GAME:AddPlayerTeam character Adds the given character to the player's team. x
GAME:RemovePlayerTeam slot Removes the character from the given slot from the team. x

Assembly Management

Function Arguments Description Example
GAME:GetPlayerAssemblyCount None Returns the amount of characters currently in the player's assembly. x
GAME:GetPlayerAssemblyTable None Returns the player's assembly as a lua table. x
GAME:GetPlayerAssemblyMember Index Gets the character at the specified index from the assembly. x
GAME:AddPlayerAssembly character Adds the given character to the player's assembly. x
GAME:RemovePlayerAssembly slot Removes the character from the given slot from the assembly. x

Guest Management

Function Arguments Description Example
GAME:GetPlayerGuestCount None Returns the amount of guests currently in the player's party. x
GAME:GetPlayerGuestTable None Returns the player's party guests as a lua table. x
GAME:GetPlayerGuestMember Index Gets the character at the specified index from the guests. x
GAME:AddPlayerGuest character Adds the given character to the player's guest list. x
GAME:RemovePlayerGuest slot Removes the character from the given slot from the guest list. x

Character Control

Bag, Equips, & Storage

Money

Inputs

Dungeons

Direction

Ground

Sound

Strings

Task

UI

GAME:AddPlayerTeam(RogueEssence.Dungeon.Character)

Adds a character to the player's team.


Arguments

  • character: The character to add.

GAME:RemovePlayerTeam(System.Int32)

Removes the character from the team, placing its item back in the inventory.


Arguments

  • slot: The slot of the player to remove.

GAME:AddPlayerGuest(RogueEssence.Dungeon.Character)

Adds a character to the player's guests.


Arguments

  • character: The character to add.

GAME:RemovePlayerGuest(System.Int32)

Removes the character from the team's guests, placing its item back in the inventory.


Arguments

  • slot: The slot of the player to remove.

GAME:AddPlayerAssembly(RogueEssence.Dungeon.Character)

Adds a character to the player's assembly.


Arguments

  • character: The character to add.

GAME:RemovePlayerAssembly(System.Int32)

Removes the character from the assembly, placing its item back in the inventory.


Arguments

  • slot: The slot of the player to remove.

GAME:SetCharacterNickname(RogueEssence.Dungeon.Character,System.String)

Sets a character's nickname


Arguments

  • character: The character to rename
  • nickname: The new name

GAME:GetCharacterNickname(RogueEssence.Dungeon.Character)

Gets the character nickname


Arguments

  • character: The character to get the nickname from

Returns

The character's nickname

GAME:SetTeamName(System.String)

Sets the name of the player's team


Arguments

  • teamname: The new team name

GAME:GetTeamName

Gets the name of the player's team


Returns

The team's name

GAME:CanRelearn(RogueEssence.Dungeon.Character)

Checks if the character can relearn any skills.


Arguments

  • character: The character to check

GAME:CanForget(RogueEssence.Dungeon.Character)

Checks if the character can forget any skills.


Arguments

  • character: The character to check

GAME:CanLearn(RogueEssence.Dungeon.Character)

Checks if the character can learn any skills.


Arguments

  • character: The character to check

GAME:CheckLevelSkills

Checks the levels gained by a character and prompts to learn all skills along the levels. Waits until all skills have been accepted or declined before continuing.


Arguments

  • chara: The character to prompt for learning.
  • oldLevel: The level that the character leveled up from.

Example


GAME:CheckLevelSkills(player, 5)

GAME:TryLearnSkill

Attempts to give a new skill to the specified character, prompting to replace an old one if they are full. Waits until all the skill has been accepted or declined before continuing.


Arguments

  • chara: The character to learn the skill
  • skill: The skill to learn

Example


GAME:TryLearnSkill(player, "thunder")

GAME:LearnSkill(RogueEssence.Dungeon.Character,System.String)

Gives a new skill to a specified character. Fails if the character's skills are full.


Arguments

  • chara: The character to learn the skill
  • skill: The skill to learn

GAME:ForgetSkill(RogueEssence.Dungeon.Character,System.Int32)

Removed a skill from the specified character.


Arguments

  • chara: The character to forget the skill
  • slot: The slot of the skill to forget

GAME:LockSkill(RogueEssence.Dungeon.Character,System.Int32)

Makes a skill impossible to forget or replace for the specified character. Note that this only affects normal gameplay. Scripts can still freely get rid of the skill.


Arguments

  • chara: The character to lock the skill
  • slot: The slot of the skill to lock

GAME:UnlockSkill(RogueEssence.Dungeon.Character,System.Int32)

Unlocks a previously locked skill for the specified character, making it possible to be forgotten or replaced during normal gameplay.


Arguments

  • chara: The character to unlock the skill
  • slot: The slot of the skill to unlock

GAME:SetCharacterSkill(RogueEssence.Dungeon.Character,System.String,System.Int32,System.Boolean)

Gives a new skill to a specified character, replacing a specifically chosen slot.


Arguments

  • character: The character to learn the skill
  • skillId: The skill to learn
  • slot: The slot to replace

GAME:GetCharacterSkill(RogueEssence.Dungeon.Character,System.Int32)

Gets the skill from a specified character and specified slot.


Arguments

  • chara: The character to get the skill from.
  • slot: The slot to get the skill from.

Returns

The ID of the skill in the slot

GAME:CanPromote(RogueEssence.Dungeon.Character)

Checks if the character can be promoted to a new class.


Arguments

  • character: The character to check

Returns

True if the character can be promoted, false otherwise.

GAME:GetAvailablePromotions(RogueEssence.Dungeon.Character,System.String)

Gets a list of possible classes that the character can prmote to.


Arguments

  • character: The character to check
  • bypassItem: An exception item that can bypass checks for promotion

Returns

A lua table of PromoteBranch objects

GAME:PromoteCharacter(RogueEssence.Dungeon.Character,RogueEssence.Data.PromoteBranch,System.String)

Promotes a character ot a new class.


Arguments

  • character: The character to promote
  • branch: The PromoteBranch to promote with
  • bypassItem: An exception item that can bypass checks for promotion

GAME:FindPlayerItem(System.String,System.Boolean,System.Boolean)

Finds an item in the player's team and returns its slot within the inventory or among its team's equips.


Arguments

  • id: The item ID to search for.
  • held: Check equipped items.
  • inv: Check inventory items.

Returns

The InvSlot of the item. Invalid if the item could not be found.

GAME:GetPlayerEquippedCount

Get the number of items equipped by players. Does not include guests.


Returns

The number of items.

GAME:GetPlayerBagCount

Get the number of items in the bag.


Returns

The number of items.

GAME:GetPlayerBagLimit

Gets the maximum amount of item the player's team can carry.


Returns

The number of items.

GAME:GetPlayerEquippedItem(System.Int32)

Gets the equipped item for the character in the specified slot.


Arguments

  • slot: The team slot of the character to check

Returns

The character's equipped item

GAME:GetGuestEquippedItem(System.Int32)

Gets the equipped item for the character in the specified guest slot.


Arguments

  • slot: The guest slot of the character to check

Returns

The character's equipped item

GAME:GivePlayerItem(RogueEssence.Dungeon.InvItem)

Gives an item and adds it to the player team's bag.


Arguments

  • item: The item to give

GAME:GivePlayerItem(System.String,System.Int32,System.Boolean,System.String)

Gives an item and adds it to the player team's bag.


Arguments

  • id: The ID of the item
  • count: The amount to give. Default 1
  • cursed: Whether the item is cursed. Default false.
  • hiddenval: The hidden value of the item. Default empty string.

GAME:GetPlayerBagItem(System.Int32)

Gets the item found at the specified slot of the player's bag.


Arguments

  • slot: The slot to check

Returns

The item found in the slot

GAME:TakePlayerBagItem(System.Int32,System.Boolean)

Remove an item from player inventory


Arguments

  • slot: The slot from which to remove the item
  • takeAll: None

GAME:TakePlayerEquippedItem(System.Int32,System.Boolean)

Remove the equipped item from a chosen member of the team


Arguments

  • slot: The slot of the character on the team from which to remove the item
  • takeAll: None

GAME:TakeGuestEquippedItem(System.Int32,System.Boolean)

Remove the equipped item from a chosen guest of the team


Arguments

  • slot: The slot of the character on the team's guest list from which to remove the item
  • takeAll: None

GAME:GetPlayerStorageCount

Get the amount of items in the player's storage


GAME:GetPlayerStorageItemCount(System.String)

Get the amount of a specific item in the player's storage


Arguments

  • id: ID of the item ot check

Returns

The amount of copies currently in storage

GAME:GivePlayerStorageItem(RogueEssence.Dungeon.InvItem)

Gives an item and adds it to the player team's storage.


Arguments

  • item: The item to give

GAME:GivePlayerStorageItem(System.String,System.Int32,System.Boolean,System.String)

Gives an item and adds it to the player team's storage.


Arguments

  • id: The ID of the item
  • count: The amount to give. Default 1
  • cursed: Whether the item is cursed. Default false.
  • hiddenval: The hidden value of the item. Default empty string.

GAME:TakePlayerStorageItem(System.String)

Takes an item from the storage


Arguments

  • id: The ID of the item to take

GAME:DepositAll

Takes all items in the player team's bag and equipped items, and deposits them in storage.


GAME:GetPlayerMoney

Gets the amount of money the player currently has on hand.


Returns

The amount of money.

GAME:AddToPlayerMoney(System.Int32)

Adds money to the player's wallet.


Arguments

  • toadd: The amount of money to add.

GAME:RemoveFromPlayerMoney(System.Int32)

Removes money from the player's wallet.


Arguments

  • toremove: The amount of money to remove.

GAME:GetPlayerMoneyBank

Gets the amount of money in the player's bank


Returns

The amount of money.

GAME:AddToPlayerMoneyBank(System.Int32)

Adds money to the player's bank.


Arguments

  • toadd: The amount of money to add.

GAME:RemoveFromPlayerMoneyBank(System.Int32)

Removes money from the player's bank.


Arguments

  • toremove: The amount of money to remove.

GAME:IsKeyDown(System.Int32)

Checks if a player is making a certain physical keyboard input.


Arguments

  • keyid: The ID of the input

Returns

True if the button is currently pressed. False otherwise.

GAME:IsInputDown(System.Int32)

Checks if a player is making a certain game input.


Arguments

  • inputid: None

Returns

True if the input is currently pressed. False otherwise.

GAME:CutsceneMode(System.Boolean)

Sets the game in cutscene mode. This prevents characters from taking idle action and hides certain UI.


Arguments

  • bon: If set to true, turns cutscene mode on. If set to false, turns it off.

GAME:GetDailySeed

Gets the random seed for the current adventure.


Returns

The current adventure's seed.

GAME:UnlockDungeon(System.String)

Unlocks a specified dungeon.


Arguments

  • dungeonid: ID of the dungeon to unlock.

GAME:DungeonUnlocked(System.String)

Checks if a dungeon is unlocked.


Arguments

  • dungeonid: ID of the dungeon to check

Returns

True if unlocked, false otherwise.

GAME:InRogueMode

Checks if the current game is in rogue mode.


Returns

True if in rogue mode, false otherwise.

GAME:HasServerSet

TODO: WIP


GAME:GetRescueAllowed

Checks to see if rescue is allowed.


Returns

True if rescues are allowed, false otherwise.

GAME:SetRescueAllowed(System.Boolean)

Sets the value in the player's save file to determine if they can be rescued or not. If rescue is possible on the Save File level, it can still be prevented by the map.


Arguments

  • allowed: Set to true to allow the player to be rescued. False otherwise.

GAME:QueueLeaderEvent(System.Object)

Prepares an event to execute on the next frame.


Arguments

  • obj: None

GAME:WaitFrames

Waits for a specified number of frames before continuing.


Arguments

  • frames: The number of frames ot wait. Each frame is 1/60th of a second.

Example


GAME:WaitFrames(60)

GAME:VectorToDirection(RogueElements.Loc)

Turns a vector (preferably a unit vector) into a cardinal or diagonal direction.


Arguments

  • v: The vector.

Returns

The direction as one of 8 values.

GAME:VectorToDirection(System.Double,System.Double)

Convenience function to get a vector's components from lua numbers(doubles)


Arguments

  • X: The X value of the vector
  • Y: The Y value of the vector

Returns

The direction the vector points to as one of 8 values.

GAME:RandomDirection

Generates a random direction.


Returns

An 8-directional direction.

GAME:SetupLuaFunctions(RogueEssence.Script.LuaEngine)

Setups any extra functionalities for this object written on the lua side.


GROUND:Hide(System.String)

Hides an entity.


Arguments

  • entityname: The name of the entity to hide.

GROUND:Unhide(System.String)

Unhides an entity.


Arguments

  • entityname: The name of the entity to unhide.

GROUND:CreateObject(System.String,System.String,System.Int32,System.Int32,System.Int32,System.Int32)

TODO: WIP


Arguments

  • objtype: None
  • instancename: None
  • x: None
  • y: None
  • w: None
  • h: None

GROUND:CreateCharacter(System.String,System.String,System.Int32,System.Int32,System.String,System.String)

TODO: WIP


Arguments

  • chartype: None
  • instancename: None
  • x: None
  • y: None
  • actionfun: None
  • thinkfun: None

GROUND:RemoveObject(System.String)

Deletes an object from the ground map, identified by its instance name.


Arguments

  • instancename: The instance name of the object.

Returns

Returns true if succeeded, false otherwise.

GROUND:RemoveCharacter(System.String)

Deletes a character from the ground map, identified by its instance name.


Arguments

  • instancename: The instance name of the object.

Returns

Returns true if succeeded, false otherwise.

GROUND:CreateCharacterFromCharData(System.String,RogueEssence.Dungeon.Character,System.Int32,System.Int32,RogueElements.Dir8)

Creates a ground character, given a dungeon character.


Arguments

  • instancename: The instance name to give the character
  • data: Character data to create from
  • x: X coordinate of the character
  • y: Y coordinate of the character
  • direction: Direction the character will face, defaults to Dir8.Down

GROUND:RefreshPlayer

Reloads the controllable player's character data to be the current team's leader.


GROUND:SetPlayer(RogueEssence.Dungeon.CharData)

Sets the controllable player to use new character data


Arguments

  • charData: The new character data

GROUND:SpawnerDoSpawn(System.String)

Make the specified spawner run its spawn method.


Arguments

  • spawnername: None

Returns

The ground character spawned.

GROUND:SpawnerSetSpawn(System.String,RogueEssence.Dungeon.CharData)

Sets the character to the specified spawner


Arguments

  • spawnername: The spawner to set the character to, by name
  • spawnChar: The character to spawn.

GROUND:CharTurnToChar(RogueEssence.Ground.GroundChar,RogueEssence.Ground.GroundChar)

Makes a character turn to face another character instantly.


Arguments

  • turnchar: The character that is turning.
  • turnto: The character to turn to.

GROUND:CharTurnToCharAnimated

Makes a character do an animated turn to face another character over the specified time. Clockwise or counter-clockwise are chosen based on the closest direction. Waits until the operation is completed.


Arguments

  • curch: Character that is turning
  • turnto: Character to turn to
  • framedur: Time spent on each direction, in frames

Example


CharTurnToCharAnimated(charFrom, charTo, 3)

GROUND:EntTurn(RogueEssence.Ground.GroundEntity,RogueElements.Dir8)

Makes a ground entity turn to face a direction.


Arguments

  • ent: The ground entity. Can be a character or object.
  • direction: The direction to face.

GROUND:CharAnimateTurn

Makes a character do an animated turn to face a chosen direction over the specified time. Must specify clockwise or counter-clockwise. Waits until the operation is completed.


Arguments

  • ch: The character to turn
  • direction: The direction to turn to
  • framedur: The time spent in each intermediate direction, in frames
  • ccw: false if clockwise, true if counter-clockwise

Example


GROUND:CharTurnToCharAnimated(charFrom, Dir8.Left, 3, true)

GROUND:CharAnimateTurnTo

Makes a character do an animated turn to face a chosen direction over the specified time. Waits until the operation is completed.


Arguments

  • ch: The character to turn
  • direction: The direction to turn to
  • framedur: The time spent in each intermediate direction, in frames

Example


CharAnimateTurnTo(charFrom, Dir8.Left, 3)

GROUND:TeleportTo(RogueEssence.Ground.GroundEntity,System.Int32,System.Int32,RogueElements.Dir8,System.Int32)

Repositions the ground entity in a specified location.


Arguments

  • ent: The ground entity to reposition
  • x: The X coordinate of the destination
  • y: The Y coordinate of the destination
  • direction: The direction to point the entity. Defaults to Dir8.None, which leaves it untouched.
  • height: None

GROUND:MoveInDirection

Make ground character move in a direction.


Arguments

  • chara: Character to move
  • direction: Direction to move in
  • duration: Duration of movement, in frames
  • run: True if using a running animation, false otherwise
  • speed: Speed in pixels per frame

Example


GROUND:MoveInDirection(player, Dir8.Down, 24, false, 2)

GROUND:MoveToPosition

Make ground character move to a position.


Arguments

  • chara: Character to move
  • x: X coordinate of destination
  • y: Y coordinate of destination
  • run: True if using a running animation, false otherwise
  • speed: Speed in pixels per frame

Example


GROUND:MoveInDirection(player, 200, 240, false, 2)

GROUND:MoveToMarker

Make ground character move to a ground marker.


Arguments

  • chara: Character to move
  • mark: GroundMarker object ot move to
  • run: True if using a running animation, false otherwise
  • speed: Speed in pixels per frame

Example


GROUND:MoveInDirection(player, marker, false, 2)

GROUND:MoveObjectToPosition

Make ground object move to a position.


Arguments

  • ent: Ground Entity to move
  • x: X coordinate of destination
  • y: Y coordinate of destination
  • speed: Speed in pixels per frame

Example


GROUND:MoveInDirection(player, 200, 240, 2)

GROUND:AnimateInDirection

Make a ground character move in a direction with custom animation


Arguments

  • chara: Character to move
  • anim: Name of the animation
  • animDir: Direction of animation
  • direction: Direction to move in
  • duration: Duration of movement, in frames
  • animSpeed: Speed of animation, where 1.0 represents normal speed
  • speed: Speed movement, in pixels per frame

Example


GROUND:AnimateInDirection(player, "Hurt", Dir8.Down, 24, 0.5, 2)

GROUND:AnimateToPosition

Make a ground entity move to a position with custom animation


Arguments

  • ent: Entity to move
  • anim: Name of the animation
  • animDir: Direction of animation
  • x: X coordinate of the destination
  • y: Y coordinate of the destination
  • animSpeed: Speed of animation, where 1.0 represents normal speed
  • speed: Speed movement, in pixels per frame
  • height: Height of the destination

Example


GROUND:AnimateToPosition(player, "Hurt", Dir8.Down, 200, 240, 0.5, 2, 0)

GROUND:CharSetEmote(RogueEssence.Ground.GroundChar,System.String,System.Int32)

Make a character emote on the ground map.


Arguments

  • chara: Character to emote
  • emoteid: ID of the emote
  • cycles: The number of times to play the emote.

GROUND:CharSetDrawEffect(RogueEssence.Ground.GroundChar,RogueEssence.Dungeon.DrawEffect)

Sets the ground character's draw effect to become invisible, shaking, still, etc.


Arguments

  • chara: Target ground character.
  • effect: The draw effect.

GROUND:CharEndDrawEffect(RogueEssence.Ground.GroundChar,RogueEssence.Dungeon.DrawEffect)

Sets the ground character's draw effect to become invisible, shaking, still, etc.


Arguments

  • chara: Target ground character.
  • effect: The draw effect.

GROUND:CharGetAnimFallback(RogueEssence.Ground.GroundChar,System.String)

Gets the fallback animation for the character.


Arguments

  • chara: None
  • anim: The anim to get the fallback anim of.

Returns

The fallback animation, as a string. Blank if there is none. Will return anim if anim already exists.

GROUND:CharGetAnim(RogueEssence.Ground.GroundChar)

Gets a character's current animation as a string.


Arguments

  • chara: None

GROUND:CharGetAnimPoint(RogueEssence.Ground.GroundChar,RogueEssence.Content.ActionPointType)

Gets the chosen action point of the character at this specific frame.


Arguments

  • chara: None
  • actionPoint: The ype of action point to retrieve the coordinates for.

Returns

The location of the action point in absolute coordinates on the map.

GROUND:CharSetAnim(RogueEssence.Ground.GroundChar,System.String,System.Boolean)

Set a character's animation.


Arguments

  • chara: Character to animate
  • anim: Name of the animation
  • loop: Whether to loop the animation

GROUND:CharEndAnim(RogueEssence.Ground.GroundChar)

Stops a character's current animation, reverting them to default idle.


Arguments

  • chara: Character to stop animating

GROUND:CharWaitAnim

Makes the character perform an animation and waits until it's over.


Arguments

  • ent: Character to animate
  • anim: Animation to play

Example


GROUND:CharWaitAnim(player, "Hurt")

GROUND:CharSetAction(RogueEssence.Ground.GroundChar,RogueEssence.Ground.GroundAction)

Set a character's action.


Arguments

  • chara: Character to perfom the action
  • action: The action to perform

GROUND:CharWaitAction

Makes the character perform an action and waits until it's over.


Arguments

  • ent: Character to animate
  • action: Action to perform

Example


GROUND:CharWaitAction(player, action)

GROUND:ObjectSetAnim(RogueEssence.Ground.GroundObject,System.Int32,System.Int32,System.Int32,RogueElements.Dir8,System.Int32)

Sets a ground object's animation. After it finishes, it will return to the default animation.


Arguments

  • obj: The object to animate
  • frameTime: The duration of each frame of animation
  • startFrame: The start frame of animation
  • endFrame: The end frame of animation
  • dir: The direction of the animation
  • cycles: The number of times to repeat the animation

GROUND:ObjectSetDefaultAnim(RogueEssence.Ground.GroundObject,System.String,System.Int32,System.Int32,System.Int32,RogueElements.Dir8)

Sets a ground object's default animation.


Arguments

  • obj: The object to animate
  • animName: The name of the animation
  • frameTime: The duration of each frame of animation
  • startFrame: The start frame of animation
  • endFrame: The end frame of animation
  • dir: The direction of the animation

GROUND:ObjectWaitAnimFrame

Waits for the object to reach a specific frame before continuing.


Arguments

  • obj: The object ot wait on
  • frame: The frame of animation to wait on.

Example


GROUND:WaitObjectAnim(fountain, 3)

GROUND:PlayVFX(RogueEssence.Content.FiniteEmitter,System.Int32,System.Int32,RogueElements.Dir8)

Plays a VFX using a finite emitter that generates BaseAnims.


Arguments

  • emitter: The VFX emitter
  • x: X position
  • y: Y Position
  • dir: Direction to orient the VFX, defaults to Down

GROUND:PlayVFX(RogueEssence.Content.FiniteEmitter,System.Int32,System.Int32,RogueElements.Dir8,System.Int32,System.Int32)

Plays a VFX that has a start position and an end position. It uses a finite emitter that generates BaseAnims.


Arguments

  • emitter: The VFX emitter
  • x: Start X position
  • y: Start Y Position
  • dir: Direction to orient the VFX, defaults to Down.
  • xTo: End X position
  • yTo: End Y position

GROUND:PlayVFXAnim(RogueEssence.Content.BaseAnim,RogueEssence.Content.DrawLayer)

Plays a VFX using just a BaseAnim


Arguments

  • anim: The animation to play
  • layer: The layer to put it on

GROUND:MoveScreen(RogueEssence.Content.ScreenMover)

Plays a screen-moving effect.


Arguments

  • mover: The screen mover.

GROUND:HandoutEXP

Gives a character a set amount of EXP. Also handles leveling up and learning new moves.


Arguments

  • character: The characters to level up.
  • experience: The amount of EXP to gain.

GROUND:LevelUpChar

Levels up a character a certain amount of times all at once. Also handles learning new moves.


Arguments

  • character: The characters to level up.
  • numLevelUps: The number of level ups.

GROUND:AddMapStatus(System.String)

Adds a mapstatus to the ground map. Map statuses only have an aesthetic effect in ground maps.


Arguments

  • statusIdx: The ID of the Map Status

GROUND:RemoveMapStatus(System.String)

Removes a map status from the ground map.


Arguments

  • statusIdx: The ID of the Map Status to remove.

SOUND:PlaySE(System.String)

Plays a sound effect


Arguments

  • name: Sound file name, relative to the Content/SE folder

SOUND:PlayBattleSE(System.String)

Plays a sound effect specifically from the Battle/ subdirectory


Arguments

  • name: Sound file name, relative to the Content/SE/Battle folder

SOUND:WaitSE

Plays a sound effect, and waits for it to complete before continuing.


Example


SOUND:WaitSE("Battle/Hit")

SOUND:LoopSE(System.String)

Plays a continuous sound effect


Arguments

  • name: Sound file name, relative to the Content/SE folder

SOUND:LoopBattleSE(System.String)

Plays a continuous sound effect


Arguments

  • name: Sound file name, relative to the Content/SE/Battle folder

SOUND:StopSE(System.String)

Stops a continuous sound effect


Arguments

  • name: Sound file name, relative to the Content/SE folder

SOUND:StopBattleSE(System.String)

Stops a continuous sound effect


Arguments

  • name: Sound file name, relative to the Content/SE/Battle folder

SOUND:FadeInSE(System.String,System.Int32)

Plays a continuous sound effect, fading in over a specified amount of time


Arguments

  • name: Sound file name, relative to the Content/SE folder
  • fadeTime: Time in frames for the sound to fade in

SOUND:FadeInBattleSE(System.String,System.Int32)

Plays a continuous sound effect, fading in over a specified amount of time


Arguments

  • name: Sound file name, relative to the Content/SE/Battle folder
  • fadeTime: Time in frames for the sound to fade in

SOUND:FadeOutSE(System.String,System.Int32)

Stops a continuous sound effect, fading out over a specified amount of time


Arguments

  • name: Sound file name, relative to the Content/SE folder
  • fadeTime: Time in frames for the sound to fade out

SOUND:FadeOutBattleSE(System.String,System.Int32)

Stops a continuous sound effect, fading out over a specified amount of time


Arguments

  • name: Sound file name, relative to the Content/SE/Battle folder
  • fadeTime: Time in frames for the sound to fade out

SOUND:PlayFanfare(System.String)

Plays a sound effect that temporarily mutes the music for its duration


Arguments

  • name: Sound file name, relative to the Content/SE folder

SOUND:WaitFanfare

Plays a sound effect that temporarily mutes the music for its duration. This function waits for the sound to complete before continuing.


Example


SOUND:WaitFanfare("Battle/LevelUp")

SOUND:PlayBGM(System.String,System.Boolean,System.Int32)

Plays a song, replacing the current one.


Arguments

  • name: The file name of the song, relative to the Content/Music folder.
  • fade: Whether to fade the old song out, or start a new one.
  • fadeTime: The amount of time, in frames, to fade out the old song.

SOUND:StopBGM

Stops playing the current song.


SOUND:FadeOutBGM(System.Int32)

Fades out the current song.


Arguments

  • fadeTime: The amount of time, in frames, to fade out the song.

SOUND:SetBGMVolume(System.Single)

Sets the current volume of the song.


Arguments

  • val: A float value between 0 and 1

SOUND:GetCurrentSong

Gets the currently playing song. If the current song is fading out, gets the next song to be played.


Returns

The filename of the song, relative to the Content/Music folder

STRINGS:LocaleCode

Gets the current language setting of the game.


Returns

The current language, represented by a locale code.

STRINGS:Format(System.String,System.Object[])

Formats a string. Will unescape escaped characters and process grammar tags.


Arguments

  • fmt: String to format.
  • para: Arguments

Returns

The formatted string.

STRINGS:FormatKey(System.String,System.Object[])

Formats a string given a string key. Will unescape escaped characters.


Arguments

  • fmt: The string key to format
  • para: string arguments

STRINGS:LocalKeyString(System.Int32)

Gets the string representing a button or key.


Arguments

  • index: The input type of the input.

Returns

The string representing the button o key the input maps to.

STRINGS:CreateList(NLua.LuaTable)

Builds a single string of comma separated elements.


Arguments

  • listStrings: LuaTable of strings containing the elements to build the list from.

Returns

The combined string containing all elements.

TASK:StartEntityTask(RogueEssence.Ground.GroundEntity,NLua.LuaFunction)

Helper function to make an entity run the specified task. Will not replace a running task! Tasks are run interlocked with the script processing and game processing, and characters cannot run multiple tasks at the same time.


Arguments

  • ent: Entity which will run the task.
  • fn: Task coroutine.

TASK:StopEntityTask(RogueEssence.Ground.GroundEntity)

Helper function to force stop an entity's current task.


Arguments

  • ent: Entity running the task to stop.

TASK:WaitStartEntityTask

Makes an entity run a specified task, and waits for it to complete.


Arguments

  • ent: Entity which will run the task.
  • fn: Task coroutine.

Example


TODO

TASK:WaitEntityTask

Waits for the specified entity to finish its task.


Arguments

  • ent: Entity which task we'll wait on.

Example


TASK:WaitEntityTask(player)

TASK:WaitTask

Runs a task and waits for it to complete. Most methods that do not expose themselves to script need to be wrapped with this.


Arguments

  • obj: The task to wait on.

Example


TASK:WaitTask(_DUNGEON:DropMoney(100, RogueElements.Loc(10, 10), RogueElements.Loc(10, 10)))

TASK:StartScriptLocalCoroutine(NLua.LuaFunction,System.Object[])

A wrapper around the StartCoroutine method of the GameManager, so lua coroutines can be executed locally to the script context. AKA, it will block the script execution while its executed.


Arguments

  • fn: None
  • args: None

TASK:BranchCoroutine(System.Object)

Starts a new coroutine to run parallel to the current execution. Useful for performing multiple actions at once.


Arguments

  • obj: The task to run in parallel

Example


local coro1 = TASK:BranchCoroutine(GAME:_FadeIn(60))

TASK:JoinCoroutines

Waits for all specified coroutines to finish before continuing execution. Often used for coroutines created using TASK:BranchCoroutine()


Arguments

  • coroTable: A table of coroutines to wait on.

Example


TASK:JoinCoroutines({coro1})

UI:WaitInput

Waits for the player to press a button before continuing.


UI:WaitShowDialogue

Displays a dialogue box with text, waiting until the player completes it. Takes a string as an argument.


Arguments

  • text: The text to display.
  • callbacks: The Lua table of callbacks for the textbox to call.

Example


UI:WaitShowDialogue("Hello World!")

UI:WaitShowTimedDialogue

Displays a dialogue box with text, waiting until the specified time has expired.


Arguments

  • text: The text to display.
  • waitTime: The time for the textbox to remain on screen. Pass -1 to wait for layer input.
  • callbacks: The Lua table of callbacks for the textbox to call.

Example


UI:WaitShowTimedDialogue("Hello World!", 120)

UI:TextDialogue(System.String,System.Int32,NLua.LuaTable)

Sets the current dialogue text to be shown. Requires WaitDialog to actually display.


Arguments

  • text: The text to display.
  • waitTime: The time for the textbox to remain on screen. Pass -1 to wait for layer input.
  • callbacks: The Lua table of callbacks for the textbox to call.

UI:WaitShowVoiceOver

Displays a voice over, waiting until the player completes it.


Arguments

  • text: The text to display.
  • expireTime: The time for the textbox to remain on screen. Pass -1 to wait for layer input.
  • x: The X position of the box
  • y: The Y position of the box
  • width: Width of the box
  • height: Height of the box
  • callbacks: The Lua table of callbacks for the textbox to call.

Example


UI:WaitShowVoiceOver("Hello World!", 120)

UI:TextVoiceOver(System.String,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,NLua.LuaTable)

Sets the current voice-over text to be shown. Requires WaitDialog to actually display.


Arguments

  • text: The text to display.
  • expireTime: The time for the textbox to remain on screen. Pass -1 to wait for layer input.
  • x: The X position of the box
  • y: The Y position of the box
  • width: Width of the box
  • height: Height of the box
  • callbacks: The Lua table of callbacks for the textbox to call.

UI:TextPopUp(System.String,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Boolean,System.Boolean)

Makes text pop up in the bottom-left corner by default. Displays concurrently with any other process.


Arguments

  • text: The text to display.
  • expireTime: The time for the textbox to remain on screen.
  • x: The X position of the box
  • y: The Y position of the box
  • width: Width of the box
  • height: Height of the box
  • centerH: Horizontal centering
  • centerV: Vertical centering

UI:WaitShowTitle

Fades in a title text, waiting until the fade-in is complete.


Arguments

  • text: The text to display.
  • time: The time for the text to fade in.

Example


UI:WaitShowTitle("Hello World!", 60)

UI:TextShowTitle(System.String,System.Int32)

Shows text in the format of a title drop. Requires WaitDialog to actually display.


Arguments

  • text: The text to display.
  • time: The time for the text to fade in.

UI:WaitHideTitle

Fades out the currently displayed title, waiting until the fade-out is complete.


Arguments

  • time: The time for the text to fade in.

Example


UI:WaitHideTitle(60)

UI:TextFadeTitle(System.Int32)

Fades out the text set in a title drop. Requires WaitDialog to actually fade.


Arguments

  • time: The time for the text to fade in.

UI:WaitShowBG

Fades in a chosen background image, with a chosen framerate, at a certain fade time, waiting until the fade-in is complete.


Arguments

  • bg: The background to show, from the list of BG textures.
  • frameTime: Framerate of the image animation.
  • fadeInTime: Time taken to fade in the image.

Example


UI:WaitShowBG("TestBG", 3, 60)

UI:ShowBG(System.String,System.Int32,System.Int32)

Sets an image to display. Requires WaitDialog to actually display.


Arguments

  • bg: The background to show, from the list of BG textures.
  • frameTime: Framerate of the image animation.
  • fadeInTime: Time taken to fade in the image.

UI:WaitHideBG

Fades out the current background image, waiting until the fade-out is complete.


Arguments

  • time: Time taken to fade out the image.

Example


UI:WaitHideBG(60)

UI:FadeBG(System.Int32)

Prepares a fade-out of the current image. Requires WaitDialog to actually display.


Arguments

  • time: Time taken to fade out the image.

UI:ResetSpeaker(System.Boolean)

Clears the current speaker, so none is displayed the next time TextDialogue is called. This also resets any custom dialogue box positions, portrait positions, and choice positions.


Arguments

  • keysound: If turned on, the text from the dialogue boxes make sounds. Default is on.

UI:SetSpeaker(System.String,System.Boolean,System.String,System.Int32,System.String,RogueEssence.Data.Gender)

Sets the speaker to be displayed during the following calls to the TextDialogue functions. It resets speaker emotion.


Arguments

  • name: Speaker name.
  • keysound: Plays sounds when text appears.
  • specie: Species of the speaker
  • form: Form of the speaker
  • skin: Skin of the speaker
  • gender: Gender of the speaker

UI:SetSpeaker(RogueEssence.Ground.GroundChar,System.Boolean)

Sets the speaker to be displayed during the following calls to the TextDialogue functions. It resets speaker emotion.


Arguments

  • chara: Character to set as speaker. This is a character in a ground map.
  • keysound: Plays sounds when text appears.

UI:SetSpeaker(RogueEssence.Dungeon.Character,System.Boolean)

Sets the speaker to be displayed during the following calls to the TextDialogue functions. It resets speaker emotion.


Arguments

  • chara: Character to set as speaker. This is a character in a dungeon map.
  • keysound: Plays sounds when text appears.

UI:SetSpeakerReverse(System.Boolean)

Reverses the speaker orientation to face left instead of right. This depends on the boolean passed in.


Arguments

  • reverse: Faces right if false, left if true.

UI:SetChoiceLoc(System.Int32,System.Int32)

Sets the position of the choices for a question dialog.


Arguments

  • x: The X position
  • y: The Y position

UI:ResetChoiceLoc

Sets the position of the choices for a question dialog back to default.


UI:SetBounds(System.Int32,System.Int32,System.Int32,System.Int32)

Sets the position and size of the dialogue box.


Arguments

  • x: The X position of the box
  • y: The Y position of the box
  • width: Width of the box
  • height: Height of the box

UI:SetSe(System.String,System.Int32)

Sets the speaker sound effect and speak frames played in the TextDialogue functions.


Arguments

  • newSe: The sound effect of the box
  • speakTime: The amount of frames to wait between each sound effect

Example


UI:SetSe("Battle/_UNK_DUN_Water_Drop", 3)

UI:SetSe(System.String)

Sets the speaker sound effect played in the TextDialogue functions.


Arguments

  • newSe: The sound effect of the box

Example


UI:SetSe("Menu/Unknown-3")

UI:SetSpeakTime(System.Int32)

Sets the speak frames played in the TextDialogue functions.


Arguments

  • speakTime: The amount of frames to wait between each sound effect

Example


UI:SetSpeakTime(10)

UI:ResetSe

Resets to the default speaker sound effect and speaker frames.


UI:ResetBounds

Resets the position and size of the dialogue box.


UI:SetSpeakerLoc(System.Int32,System.Int32)

Sets the position of the speaker in a dialogue box.


Arguments

  • x: The X position
  • y: The Y position

UI:ResetSpeakerLoc

Resets the position of the speaker in a dialogue box.


UI:SetSpeakerEmotion(System.String,System.Boolean)

Sets the emotion of the speaker in the dialogue box.


Arguments

  • emo: Emotion to display
  • reverse: Faces right if false, left if true.

UI:SetCenter(System.Boolean,System.Boolean)

Sets the centering of the text in the textbox.


Arguments

  • centerH: Horizontal centering
  • centerV: Vertical centering

UI:SetAutoFinish(System.Boolean)

Makes the text automatically finish when it shows up.


Arguments

  • autoFinish: Auto-finishes text if true.

UI:WaitDialog

Displays the currently set dialogue box and waits for the player to complete it.


Example


UI:WaitDialog()

UI:_DummyWait

Instantly break. Used as default/invalid value when returning a yieldable value.


UI:ChoiceMenuYesNo(System.String,System.Boolean,NLua.LuaTable)

Ask a question answered by yes or no via character dialogue to the player. UI:WaitForChoice() must be called afterwards for the menu to be actually displayed, and for execution to suspend until the choice is returned. Then to recover the integer value indicating the result of the menu, UI:ChoiceResult() must be called.

The Yes/No menu returns 1 for yes, and 0 for no.


Arguments

  • message: Question to be asked to the user.
  • bdefaultstono: Whether the cursor starts on no by default
  • callbacks: The Lua table of callbacks for the textbox to call.

UI:NameMenu(System.String,System.String,System.Int32,System.String)

Displays the name input box.

UI:WaitForChoice() must be called afterwards for the menu to be actually displayed, and for execution to suspend until the choice is returned. Then to recover the string value indicating the result of the menu, UI:ChoiceResult() must be called.


Arguments

  • title: The text to show above the input line.
  • desc: The text to show below the input line.
  • maxLength: The length of the text in pixels.
  • defaultName: Name to start the textbox with.

UI:AssemblyMenu

Displays a menu for replacing party members with the assembly.

UI:WaitForChoice() must be called afterwards for the menu to be actually displayed, and for execution to suspend until the choice is returned. Then to recover the boolean value indicating whether the team composition was changed or not, UI:ChoiceResult() must be called.


UI:ShopMenu(NLua.LuaTable)

Displays the Shop menu.

UI:WaitForChoice() must be called afterwards for the menu to be actually displayed, and for execution to suspend until the choice is returned. Then to recover the table indicating the indices of items chosen, UI:ChoiceResult() must be called.


Arguments

  • goods: A table of items to be sold. The format is { Item=InvItem, Price=int } for each item.

UI:SellMenu

Displays the Sell menu.

UI:WaitForChoice() must be called afterwards for the menu to be actually displayed, and for execution to suspend until the choice is returned. Then to recover the table indicating the indices of items to sell, UI:ChoiceResult() must be called.


UI:StorageMenu

Displays the Storage menu for which to exchange items in the inventory with.

UI:WaitForChoice() must be called afterwards for the menu to be actually displayed, and for execution to suspend until the menu is exited.


UI:WithdrawMenu

Displays the Storage menu for which to withdraw from.

UI:WaitForChoice() must be called afterwards for the menu to be actually displayed, and for execution to suspend until the menu is exited.


UI:BankMenu

Displays the Bank menu.

UI:WaitForChoice() must be called afterwards for the menu to be actually displayed, and for execution to suspend until the menu is exited.


UI:SpoilsMenu(NLua.LuaTable)

Displays the Spoils menu.

UI:WaitForChoice() must be called afterwards for the menu to be actually displayed, and for execution to suspend until the menu is exited.


Arguments

  • appraisalMap: A table of mappings from containers to items, in the format of { Box=InvItem , Item=InvItem }

UI:AppraiseMenu

Displays the Appraisal menu.

UI:WaitForChoice() must be called afterwards for the menu to be actually displayed, and for execution to suspend until the choice is returned. Then to recover the table indicating the indices of items chosen, UI:ChoiceResult() must be called.


UI:TutorTeamMenu(NLua.LuaFunction)

Displays the Tutor Team menu.

UI:WaitForChoice() must be called afterwards for the menu to be actually displayed, and for execution to suspend until the choice is returned. Then to recover the integer representing the chosen team member, UI:ChoiceResult() must be called.


UI:RelearnMenu(RogueEssence.Dungeon.Character)

Displays the Relearn menu for a character.

UI:WaitForChoice() must be called afterwards for the menu to be actually displayed, and for execution to suspend until the choice is returned. Then to recover the integer representing the chosen skill, UI:ChoiceResult() must be called.


Arguments

  • chara: The character to relearn skills

UI:LearnMenu(RogueEssence.Dungeon.Character,System.String)

Displays the Learn menu for a character to replace an existing skill with a new one.

UI:WaitForChoice() must be called afterwards for the menu to be actually displayed, and for execution to suspend until the choice is returned. Then to recover the integer representing the chosen skill, UI:ChoiceResult() must be called.


Arguments

  • chara: The character to relearn skills
  • skillNum: The new skill

UI:ForgetMenu(RogueEssence.Dungeon.Character)

Displays the Forget menu for a character to forget a skill.

UI:WaitForChoice() must be called afterwards for the menu to be actually displayed, and for execution to suspend until the choice is returned. Then to recover the integer representing the chosen skill, UI:ChoiceResult() must be called.


Arguments

  • chara: The character to relearn skills

UI:ShowPromoteMenu

Displays the Promote menu to choose a team member to promote.

UI:WaitForChoice() must be called afterwards for the menu to be actually displayed, and for execution to suspend until the choice is returned. Then to recover the integer representing the chosen team slot, UI:ChoiceResult() must be called.


UI:CanSwapMenu(NLua.LuaTable)

TODO


UI:SwapMenu(NLua.LuaTable,NLua.LuaTable)

TODO


UI:TributeMenu(System.Int32)

TODO


UI:ShowMusicMenu(NLua.LuaTable)

Displays the Music menu to browse music for the game.

UI:WaitForChoice() must be called afterwards for the menu to be actually displayed, and for execution to suspend until the choice is returned. Then to recover the string representing the chosen song, UI:ChoiceResult() must be called.


Arguments

  • spoilerUnlocks: A lua table of strings representing progression flags that have been completed.
           Any ogg file that uses this tag as a spoiler tag will display in the menu only if the flag has been passed.

UI:DungeonChoice(System.String,RogueEssence.Dungeon.ZoneLoc)

Ask to enter a destintion via character dialogue to the player. UI:WaitForChoice() must be called afterwards for the menu to be actually displayed, and for execution to suspend until the choice is returned. Then to recover the integer value indicating the result of the menu, UI:ChoiceResult() must be called.

The Yes/No menu returns 1 for yes, and 0 for no.


Arguments

  • name: Name of the destination
  • dest: The ZoneLoc location of the destination.

UI:DestinationMenu(NLua.LuaTable,System.Object)

Marks the start of a choice menu for choosing destinations, showing a preview of restrictions and requirements for dungeons. UI:WaitForChoice() must be called afterwards for the menu to be actually displayed, and for execution to suspend until the choice is returned. Then to recover the ZoneLoc indicating the chosen destination, UI:ChoiceResult() must be called.


Arguments

  • destinations: A lua table representing the list of destinations with each element in the format of { Name=string, Dest=ZoneLoc }

UI:ServersMenu

TODO


UI:ContactsMenu

TODO


UI:SOSMenu

TODO


UI:AOKMenu

TODO


UI:PeersMenu

TODO


UI:ShowConnectMenu

TODO


UI:CurrentActivityMenu

TODO


UI:ChooseMonsterMenu(System.String,NLua.LuaTable,System.Boolean,System.Boolean,System.Int32)

Marks the start of a choice menu for choosing monsters, showing a preview of their appearances via portrait. UI:WaitForChoice() must be called afterwards for the menu to be actually displayed, and for execution to suspend until the choice is returned. Then to recover the string indicating the chosen species, UI:ChoiceResult() must be called.


Arguments

  • title: The title of the menu
  • choices: A lua table of choices with each element being a MonsterID.
  • canMenu: If set to true, the Menu Button exits the menu if pressed.
  • canCancel: If set to true, the Cancel Button exits the menu if pressed.
  • slotsPerPage: Slots to display per page

UI:SetCustomMenu(RogueEssence.Menu.InteractableMenu)

Displays a custom menu of the caller's choice.

UI:WaitForChoice() must be called afterwards for the menu to be actually displayed, and for execution to suspend until the menu is exited.


UI:BeginChoiceMenu(System.String,NLua.LuaTable,System.Object,System.Object,NLua.LuaTable)

Marks the start of a multi-choice menu. UI:WaitForChoice() must be called afterwards for the menu to be actually displayed, and for execution to suspend until the choice is returned. Then to recover the integer value indicating the result of the menu, UI:ChoiceResult() must be called.


Arguments

  • message: The question to ask the user.
  • choicesPairs: A table of choices. Each choice can be either a string, or { string, bool } representing the text and enabled status.
  • defaultChoice: The cursor starts on this choice.
  • cancelChoice: This choice is chosen if the player presses the cancel button.
  • callbacks: The Lua table of callbacks for the textbox to call.

UI:BeginMultiPageMenu(System.Int32,System.Int32,System.Int32,System.String,NLua.LuaTable,System.Int32,System.Object,System.Object)

Marks the start of a multi-paged choice menu. UI:WaitForChoice() must be called afterwards for the menu to be actually displayed, and for execution to suspend until the choice is returned. Then to recover the integer value indicating the result of the menu, UI:ChoiceResult() must be called.


Arguments

  • x: X position of the menu
  • y: Y position of the menu
  • width: Width of the menu
  • title: Height of the menu
  • choicesPairs: A table of choices. Each choice can be either a string, or { string, bool } representing the text and enabled status.
  • linesPerPage: Number of choices per page
  • defaultChoice: The cursor starts on this choice.
  • cancelChoice: This choice is chosen if the player presses the cancel button.

UI:ChoiceResult

Get the result of the last choice menu


Returns

The result of the choice

UI:GetChoiceAction(System.Object)

It's complicated.


Arguments

  • obj: None

UI:WaitForChoice

Displays the currently set choice menu and waits for the player's selection to complete.


Example


UI:WaitForChoice()

UI:__WaitForChoice

Wait for choice and then CLEAN UP m_curchoice