UI (functions)/Speakers

From PMDOWiki
More functions: Script Reference

This page documents the ScriptUI class for Lua scripting.

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

ExportSpeakerSettings

UI:ExportSpeakerSettings()

Exports the speaker settings as a lua table.


Returns

Type Description
NLua.LuaTable


ImportSpeakerSettings

UI:ImportSpeakerSettings(tbl)

Imports speaker settings from a lua table.

Parameters

Name Type Description
NLua.LuaTable NLua.LuaTable


ResetSpeaker

UI:ResetSpeaker(keysound)

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.

Parameters

Name Type Description
System.Boolean System.Boolean If turned on, the text from the dialogue boxes make sounds. Default is on.


SetSpeaker

UI:SetSpeaker(name, keysound, specie, form, skin, gender)

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

Parameters

Name Type Description
System.String System.String Speaker name.
System.Boolean System.Boolean If set to true, plays sounds when text appears.
System.String System.String Species of the speaker
System.Int32 System.Int32 Form of the speaker
System.String System.String Skin of the speaker
RogueEssence.Data.Gender RogueEssence.Data.Gender Gender of the speaker


SetSpeaker

UI:SetSpeaker(chara, keysound)

Sets the speaker to be displayed during the following calls to the TextDialogue functions.
It takes an existing GroundChar as a parameter.
It resets speaker emotion.

Parameters

Name Type Description
RogueEssence.Ground.GroundChar RogueEssence.Ground.GroundChar Character to set as speaker. This is a character in a ground map.
System.Boolean System.Boolean If set to true, plays sounds when text appears.


SetSpeaker

UI:SetSpeaker(chara, keysound)

Sets the speaker to be displayed during the following calls to the TextDialogue functions.
It takes an existing Character as a parameter.
It resets speaker emotion.

Parameters

Name Type Description
RogueEssence.Dungeon.Character RogueEssence.Dungeon.Character Character to set as speaker. This is a character in a dungeon map.
System.Boolean System.Boolean If set to true, plays sounds when text appears.


SetSpeakerReverse

UI:SetSpeakerReverse(reverse)

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

Parameters

Name Type Description
System.Boolean System.Boolean Faces right if false, left if true.


SetChoiceLoc

UI:SetChoiceLoc(x, y)

Sets the position of the choices for a question dialog.

Parameters

Name Type Description
System.Int32 System.Int32 The X position
System.Int32 System.Int32 The Y position


ResetChoiceLoc

UI:ResetChoiceLoc()

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



SetBounds

UI:SetBounds(x, y, width, height)

Sets the position and size of the dialogue box.

Parameters

Name Type Description
System.Int32 System.Int32 The X position of the box
System.Int32 System.Int32 The Y position of the box
System.Int32 System.Int32 Width of the box
System.Int32 System.Int32 Height of the box


ResetBounds

UI:ResetBounds()

Resets the position and size of the dialogue box.



SetCenter

UI:SetCenter(centerH, centerV)

Sets the centering of the text in the textbox.

Parameters

Name Type Description
System.Boolean System.Boolean Horizontal centering
System.Boolean System.Boolean Vertical centering


SetSpeakerLoc

UI:SetSpeakerLoc(x, y)

Sets the position of the speaker in a dialogue box.

Parameters

Name Type Description
System.Int32 System.Int32 The X position
System.Int32 System.Int32 The Y position


ResetSpeakerLoc

UI:ResetSpeakerLoc()

Resets the position of the speaker in a dialogue box.



SetSpeakerEmotion

UI:SetSpeakerEmotion(emo, reverse)

Sets the emotion of the speaker in the dialogue box.

Parameters

Name Type Description
System.String System.String Emotion to display
System.Boolean System.Boolean Faces right if false, left if true.


SetAutoFinish

UI:SetAutoFinish(autoFinish)

Makes the text automatically finish when it shows up.

Parameters

Name Type Description
System.Boolean System.Boolean Auto-finishes text if true.


SetSe

UI:SetSe(newSe, speakTime)

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

Parameters

Name Type Description
System.String System.String The sound effect of the box
System.Int32 System.Int32 The amount of frames to wait between each sound effect


SetSe

UI:SetSe(newSe)

Sets the speaker sound effect played in the TextDialogue functions.

Parameters

Name Type Description
System.String System.String The sound effect of the box


SetSpeakTime

UI:SetSpeakTime(speakTime)

Sets the speak frames played in the TextDialogue functions.

Parameters

Name Type Description
System.Int32 System.Int32 The amount of frames to wait between each sound effect


ResetSe

UI:ResetSe()

Resets to the default speaker sound effect and speaker frames.



WaitDialog

UI:WaitDialog()

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


Returns

Type Description
NLua.LuaFunction


References

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