Stencyl 3 Dialog Extension Command Reference
Stencyl 3 Dialog Extension Command Reference
Dialog Options
<choice [[OPTION_TEXT:STRING
DIALOG_CHUNK_ID:STRING CONDITION:BOOL] ...]>
Display a list of options for the player to choose from.
Ex: Where would you like to go today?
<choice[
["ThePool""PoolPart1"]
["Mars""SpaceCenter"<getattr[game"Space
Unlocked"]>]
["BackHome"Home]
]>
("The Pool", "Mars", and "Back Home" options are listed out for
the player, and they lead to dialog chunks name "Pool Part 1",
"Space Center", and "Home" respectively. However, the "Mars"
option is only shown if the associated game attribute, "Space
Unlocked", is true.)
Extra Glyphs
<glyph IMAGE:STRING>
Includes an image in your dialog, inline with the text.
Ex: I love you!! <glyphheart>
(Displays the image "heart.png" from the extras folder after the
text)
Character Scripts
<showname NAME:STRING>
Displays a character name + namebox
Ex: <shownameLenny>
(Display the name Lenny in a namebox)
<hidename>
Removes the namebox.
<face IMAGE:STRING>
Display a character face/portrait.
Ex: <faceLenny>
(This actually depends on the preference you have set for this
extension. Assuming faceImagePrefix="Face", this would
show image "Face Lenny.png" from your extras folder)
Ex 2: <facenone>
(Removes the face graphic)
Flow Scripts
<waitattr [ATTR VALUE:ANY]>
Dialog will wait for some attribute to reach a value before
proceeding.
Ex: <waitattr["game""CutsceneOngoing"false]>
(Will wait until the game attribute, "Cutscene Ongoing", becomes
false before continuing with the dialog.)
(You can refer to the bottom of this document for info on potential
values for ATTR.)
<wait TIME:FLOAT>
Inserts a pause into the dialog.
Ex: <wait.5>
(Dialog will be paused for half a second before continuing.)
<but>
Shows a pointed and waits for user input.
Ex: Oh, hello!<but> My name is Chuck.<but> And what's
yours??<but>
(The player has to press the continue button, set in this
extensions prefs, in order to continue the dialog at the three
<but> points. Careful, this example is probably overkill as far as
causing stops in the dialog.)
<bc>
Like <but> but when dialog continues, the dialog box is
automatically cleared.
Logic
<if CONDITION:BOOL>
<elseif CONDITION:BOOL>
<else>
<endif>
Control what's seen and what isn't. Personalize messages, or
give the player valuable info based on his current status in the
game.
Ex: <if<getattr[game"Dragon1Defeated
Again"]>>We'll be forever in your debt, hero! Allow me to give
Messaging Scripts
<setattr [ATTR VALUE:ANY]>
Sets an attribute.
Ex: <setattr[actorPlayer"HealthBehavior"
_health100]>
<getattr [ATTR]>
This tag is primarily intended for use WITHIN other tags, if you
want to refer to some value that can't be expressed normally in
this dialog editor.
Ex: <setattr[actorPlayer"TargetBehavior"
_currentTarget<getattr[game"Boss2"]>]>
(Yeah, I really don't know where I'm going with these examples.
But let's break that one down a little, shall we?)
(<setattr[actorPlayer"TargetBehavior"
_currentTarget...]>)
(There we have a setattr tag. Pretty basic, okay. But what if we
were trying to set, for example an Actor Attribute?)
(So, we have an Actor Attribute stored in the game attribute
"Boss 2", so let's use that to fill in the ... area we left blank)
(<setattr[actorPlayer"TargetBehavior"
_currentTarget...<getattr[game"Boss
2"]>...]>)
<showattr [ATTR]>
This takes the text representation of some attribute and inserts it
into this position in the dialog.
Ex: WOW! YOU'VE SAVED UP <showattr[game
Rupees]> RUPEES!! AWESOME!
(...I guess that's supposed to be a Majora's Mask banker
reference?)
<messagescene BEHAVIOR_NAME:STRING
MESSAGE:STRING [ARG:ANY ...]>
Sends a message to a scene behavior attached to the current
scene.
<messageactor ACTOR_NAME:STRING
BEHAVIOR_NAME:STRING MESSAGE:STRING
[ARG:ANY ...]>
Sends a message to an actor.
Skip Scripts
<skip>
This enables the ability to skip text by holding the text skipping
buttons if it was previously disabled.
<noskip>
Disables ability to skip through text. Maybe use it for a cutscene
when timing of the dialog is crucial.
Sound Scripts
<playsound SOUND:STRING>
Plays a sound.
Ex: <playsound"Howl"><wait.1>! ? ! <wait .5> Did you
hear that??<but>
<loopsound SOUND:STRING>
Loops a sound. Like above, but can be used for ambient BG
sounds or music.
<stopsound>
Stops currently playing sounds.
<stopchan CHANNEL:INT>
Stops sounds on a specific channel.
Dialog Base
<clear>
Clears the content of the dialog box. Typing begins again at the
top left corner.
<close>
Closes the dialog box, but doesn't remove it completely, so you
can use it again without adding the dialog box back into the
Dialog system.
<end>
Closes Dialog Box and removes it from Dialog System.
<dg DIALOG_CHUNK_ID:STRING>
Opens up another Dialog Chunk.
Ex: <dgShop>
(Opens up a dialog chunk named #Shop in dialog.txt)
Text Effects
<shake>
</shake>
Begin and end the text vibration effect.
<sine>
</sine>
Begin and end the text sinewave effect.
<rotate>
</rotate>
Begin and end the text revolve effect.
<grow>
</grow>
Begin and end the text grow effect.
Typing Scripts
<font FONT:STRING>
Change the Font used to type dialog. These Fonts are NOT the
Fonts in your Stencyl Dashboard. They are the ones defined in
extras/fonts.txt.
<color COLOR>
Change the color of the font. -1 for default font color, or
<typespeed SPEED:FLOAT>
Change the type speed of the dialog. 0.1 would case a character
to be typed ever 10th of a second.
<typesound SOUND:STRING>
or
<typesound [SOUND:STRING ...]>
Change the sound that plays when a character is typed, or set it
to "none" for no sound.
Using the second tag, you can provide a list of sounds, one of
which will be played at random when a character is typed.