Dungeon (functions)

From PMDOWiki
More functions: Script Reference

This page documents the ScriptDungeon class for Lua scripting.

As a singleton class, it can be accessed from Lua with DUNGEON.

CharTurnToChar

DUNGEON:CharTurnToChar(curch, turnto)

Makes a character turn to face another

Parameters

Name Type Description
RogueEssence.Dungeon.Character RogueEssence.Dungeon.Character The character that will turn.
RogueEssence.Dungeon.Character RogueEssence.Dungeon.Character The character being turned to.


LastDungeonResult

DUNGEON:LastDungeonResult()

Gets the result of the last dungeon adventure.


Returns

Type Description
RogueEssence.Data.GameProgress.ResultType


DungeonCurrentFloor

DUNGEON:DungeonCurrentFloor()

Returns the floor number of the current dungeon.


Returns

Type Description
System.Int32


DungeonAssetName

DUNGEON:DungeonAssetName()

Returns the internal name for the current dungeon.


Returns

Type Description
System.String


DungeonDisplayName

DUNGEON:DungeonDisplayName()

Returns the localized name of the current dungeon.


Returns

Type Description
System.String


SetMinimapVisible

DUNGEON:SetMinimapVisible(visible)

Used to force-disable the minimap.

Parameters

Name Type Description
System.Boolean System.Boolean If false, will force-disable the minimap.


CharSetEmote

DUNGEON:CharSetEmote(chara, emoteid, cycles)

Set a character's emote in a dungeon map.

Parameters

Name Type Description
RogueEssence.Dungeon.Character RogueEssence.Dungeon.Character Character to emote
System.String System.String ID of the emote. Use a blank string to clear the current emote.
System.Int32 System.Int32 The number of times to play the emote.


CharStartAnim

DUNGEON:CharStartAnim(chara, anim, loop)

Set a character's animation.

Parameters

Name Type Description
RogueEssence.Dungeon.Character RogueEssence.Dungeon.Character Character to animate.
System.String System.String Name of the animation
System.Boolean System.Boolean Whether to loop the animation

Returns

Type Description
NLua.LuaFunction


CharEndAnim

DUNGEON:CharEndAnim(chara)

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

Parameters

Name Type Description
RogueEssence.Dungeon.Character RogueEssence.Dungeon.Character Character to stop animating

Returns

Type Description
NLua.LuaFunction


CharWaitAnim

DUNGEON:CharWaitAnim(chara, anim)

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

Parameters

Name Type Description
RogueEssence.Dungeon.Character RogueEssence.Dungeon.Character Character to animate
System.String System.String Name of the animation

Returns

Type Description
NLua.LuaFunction


CharSetAction

DUNGEON:CharSetAction(chara, anim)

Sets a character's character-animation, taking a CharAnimation object instead of an animation name.

Parameters

Name Type Description
RogueEssence.Dungeon.Character RogueEssence.Dungeon.Character The character to animate
RogueEssence.Dungeon.CharAnimation RogueEssence.Dungeon.CharAnimation The animation for the character

Returns

Type Description
NLua.LuaFunction


PlayVFX

DUNGEON:PlayVFX(emitter, x, y, dir)

Plays a VFX in the dungeon map

Parameters

Name Type Description
RogueEssence.Content.FiniteEmitter RogueEssence.Content.FiniteEmitter The VFX emitter
System.Int32 System.Int32 X position in pixels
System.Int32 System.Int32 Y Position in pixels
RogueElements.Dir8 RogueElements.Dir8 Direction to orient the VFX, defaults to Down


PlayVFX

DUNGEON:PlayVFX(emitter, x, y, dir, xTo, yTo)

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

Parameters

Name Type Description
RogueEssence.Content.FiniteEmitter RogueEssence.Content.FiniteEmitter The VFX emitter
System.Int32 System.Int32 Start X position in pixels
System.Int32 System.Int32 Start Y Position in pixels
RogueElements.Dir8 RogueElements.Dir8 Direction to orient the VFX, defaults to Down.
System.Int32 System.Int32 End X position in pixels
System.Int32 System.Int32 End Y position in pixels


PlayVFXAnim

DUNGEON:PlayVFXAnim(anim, layer)

Plays a VFX using just a BaseAnim

Parameters

Name Type Description
RogueEssence.Content.BaseAnim RogueEssence.Content.BaseAnim The animation to play
RogueEssence.Content.DrawLayer RogueEssence.Content.DrawLayer The layer to put it on


MoveScreen

DUNGEON:MoveScreen(mover)

Plays a screen-moving effect.

Parameters

Name Type Description
RogueEssence.Content.ScreenMover RogueEssence.Content.ScreenMover The screen mover.


AddMapStatus

DUNGEON:AddMapStatus(statusId)

Adds a Map Status to the current map.

Parameters

Name Type Description
System.String System.String The ID of the map status to add to the map.

Returns

Type Description
NLua.LuaFunction


RemoveMapStatus

DUNGEON:RemoveMapStatus(statusId)

Removes a Map Status from the current map.

Parameters

Name Type Description
System.String System.String The ID of the map status to remove from the map.

Returns

Type Description
NLua.LuaFunction


SetupLuaFunctions

DUNGEON:SetupLuaFunctions(state)

Initializes any LuaFunctions found in the class.
Automatically on lua initialization.

Parameters

Name Type Description
RogueEssence.Script.LuaEngine RogueEssence.Script.LuaEngine The lua engine to initialize with.


References

https://github.com/RogueCollab/RogueEssence/blob/master/RogueEssence/Lua/ScriptDungeon.cs