Script Reference

From PMDOWiki

This page shows all script functions that can be called from Lua

AI:SetCharacterAI(RogueEssence.Ground.GroundChar,System.String,System.Object[])

Assign the given scripted AI class to the specified GroundChar.


Arguments

  • ch: None
  • classpath: None

AI:DisableCharacterAI(RogueEssence.Ground.GroundChar)

Disable a given groundchar's AI processing until its enabled again.


Arguments

  • ch: None

AI:EnableCharacterAI(RogueEssence.Ground.GroundChar)

Enable a given groundchar's AI processing if its currently disabled


Arguments

  • ch: None

AI:SetAIState(RogueEssence.Ground.GroundChar,System.String)

Enable a given groundchar's AI processing if its currently disabled


Arguments

  • ch: None

DUNGEON:CharTurnToChar(RogueEssence.Dungeon.Character,RogueEssence.Dungeon.Character)

Makes a character turn to face another


Arguments

  • curch: None
  • turnto: None

DUNGEON:LastDungeonResult

Gets the result of the last dungeon adventure.


DUNGEON:DungeonCurrentFloor

Returns the floor number of the current dungeon.


DUNGEON:DungeonAssetName

Returns the internal name for the current dungeon.


DUNGEON:DungeonDisplayName

Returns the localized name of the current dungeon.


DUNGEON:CharSetEmote(RogueEssence.Dungeon.Character,System.String,System.Int32)

Set a character's emote in a dungeon map.


Arguments

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

DUNGEON:CharStartAnim

Set a character's animation.


Arguments

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

Example


DUNGEON:CharStartAnim(player, anim, false)

DUNGEON:CharEndAnim

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


Arguments

  • chara: Character to stop animating

Example


DUNGEON:CharEndAnim(player)

DUNGEON:CharWaitAnim

Set a character's animation, and waits until it completed before continue.


Arguments

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

Example


DUNGEON:CharStartAnim(player, anim)

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

Plays a VFX in the dungeon map


Arguments

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

DUNGEON: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 in pixels
  • y: Start Y Position in pixels
  • dir: Direction to orient the VFX, defaults to Down.
  • xTo: End X position in pixels
  • yTo: End Y position in pixels

DUNGEON: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

DUNGEON:MoveScreen(RogueEssence.Content.ScreenMover)

Plays a screen-moving effect.


Arguments

  • mover: The screen mover.

GAME:GroundSave

Saves the game while in ground mode.


Example


GAME:GroundSave()

GAME:GetModDiff(System.String)

TODO


Arguments

  • uuidStr: None

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

  • id: The index of the ground map in the zone
  • idxentrypoint: The index of the entry point in the ground map
  • preserveMusic: If set to true, does not change the music when moving to the new ground map.

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

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


Arguments

  • name: The name of the ground map. It must exist within in the zone.
  • entrypoint: The name of the entry point in the ground map
  • preserveMusic: 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.


Arguments

  • zone: The name of the destination zone.
  • name: The name of the ground map. It must exist within in the zone.
  • entrypoint: The name of the entry point in the ground map
  • preserveMusic: If set to true, does not change the music when moving to the new ground map.

GAME:EnterDungeon

Enters a zone and begins a new adventure.


Arguments

  • dungeonid: The id of the dungeon to travel to.
  • structureid: The segment within the dungeon to start in. -1 represents ground maps.
  • mapid: The id of the ground map or dungeon map within the dungeon segment.
  • entry: The entry point on the resulting map
  • stakes: Decides what happens when the adventure fails/succeeds.
  • recorded: Record the adventure in a replay
  • silentRestrict: Make the dungeon restrictions silently

Example


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

GAME:ContinueDungeon

Enters a zone and continues the current adventure.


Arguments

  • dungeonid: The id of the dungeon to travel to.
  • structureid: The segment within the dungeon to start in. -1 represents ground maps.
  • mapid: The id of the ground map or dungeon map within the dungeon segment.
  • entry: The entry point on the resulting map

Example


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

GAME:EndDungeonRun

Ends the current adventure, sending the player to a specified destination.


Arguments

  • result: The result of the adventure.
  • destzoneid: The id of the dungeon to travel to.
  • structureid: The segment within the dungeon to start in. -1 represents ground maps.
  • mapid: The id of the ground map or dungeon map within the dungeon segment.
  • entryid: The entry point on the resulting map
  • display: Display an epitaph marking the end of the adventure.
  • fanfare: Play a fanfare.
  • completedZone: Zone to mark as completed. Defaults to current zone.

Example


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

GAME:EnterRescue

Enters a zone and begins a rescue adventure.


Arguments

  • sosPath: The path of the sos mail.

Example


GAME:EnterRescue("RESCUE/INBOX/SOS/example.sosmail")

GAME:AddAOKRemark(System.Int32)

TODO: WIP


Arguments

  • remarkIndex: None

GAME:RestartToTitle

Leave current map and load up the title screen.


GAME:RestartRogue(RogueEssence.Data.RogueConfig)

Restarts a Roguelocke run based on the configuration


Arguments

  • config: The configuration of the roguelocke run

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

Enters a zone and begins a new adventure.


Arguments

  • dungeonid: The id of the dungeon to travel to.
  • structureid: The segment within the dungeon to start in. -1 represents ground maps.
  • mapid: The id of the ground map or dungeon map within the dungeon segment.
  • entry: The entry point on the resulting map

GAME:FadeOut

Fade out the screen. Waits to complete before continuing.


Arguments

  • white: Fade to white if set to true. Fades to black otherwise.
  • duration: The amount of time to fade in frames.

Example


GAME:FadeOut(false, 60)

GAME:FadeIn

Fade into the screen. Waits to complete before continuing.


Arguments

  • duration: The amount of time to fade in frames.

Example


GAME:FadeIn(false, 60)

GAME:MoveCamera

Centers the camera on a position.


Arguments

  • x: X coordinate of the camera center
  • y: Y coordinate of the camera center
  • duration: The amount of time it takes ot move to the destination
  • toPlayer: Destination is in absolute coordinates if false, and relative to the player character if set to true.

Example


GAME:MoveCamera(200, 240, 60, false)

GAME:MoveCameraToChara

Centers the camera on a character.

As we are simply moving the camera to a character, this will simply set ViewCenter and not ViewOffset.


Arguments

  • x: X coordinate of the camera center, as an offset for the chara
  • y: Y coordinate of the camera center, as an offset for the chara
  • duration: The amount of time it takes ot move to the destination
  • chara: The character to center on.

Example


GAME:MoveCameraToChara(200, 240, 60, false)

GAME:GetCameraCenter

Gets the current center of the camera.


Returns

A Loc object representing the center of the camera.

GAME:IsCameraOnChar

Determines whether the camera is centered relative to the player.


Returns

Returns true if the camera is relative to the player, false otherwise.

GAME:HasSOSMail

TODO


GAME:HasAOKMail

TODO


GAME:GetTeamLeaderIndex

Returns the index of the currently player controlled entity in the party.


Returns

Index of the currently player controlled entity in the party.

GAME:SetTeamLeaderIndex(System.Int32)

Sets the leader to the chosen index within the party.


Arguments

  • idx: The index of the team member within the team.

GAME:SetCanSwitch(System.Boolean)

Prevents or allows the switching of leaders for the save file.


Arguments

  • canSwitch: Set to true to allow switching, set to false to prevent it.

GAME:SetCanRecruit(System.Boolean)

Prevents or allows the joining of recruits for the save file.


Arguments

  • canRecruit: Set to true to allow recruit joins, set to false to prevent it.

GAME:GetPlayerPartyCount

Returns the player party count. Does not include guests.


Returns

The count of players

GAME:GetPlayerPartyTable

Return the party as a LuaTable. Does not include guests.


Returns

A Lua Table of Characters

GAME:GetPlayerPartyMember(System.Int32)

Gets the character at the specified index within the player's team.


Arguments

  • index: The specified index

Returns

The team member retrieved.

GAME:GetPlayerGuestCount

Gets the number of guests currently in the player's party.


Returns

The number of guests

GAME:GetPlayerGuestTable

Return the guests as a LuaTable


Returns

A Lua Table of Characters

GAME:GetPlayerGuestMember(System.Int32)

Gets the character at the specified index within the player's guests.


Arguments

  • index: The specified index

Returns

The team member retrieved.

GAME:GetPlayerAssemblyCount

Gets the number of characters currently in the player's assembly.


Returns

The number of characters

GAME:GetPlayerAssemblyTable

Return the assembly as a LuaTable


Returns

A Lua Table of Characters

GAME:GetPlayerAssemblyMember(System.Int32)

Gets the character at the specified index within the player's assembly.


Arguments

  • index: The specified index

Returns

The assembly member retrieved.

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


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


CharTurnToCharAnimated(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)

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 ot be wrapped with this.


Arguments

  • obj: The task to wait on.

Example


TASK:WaitTask(_DUNGEON:AddMapStatus("rain"))

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