The scripts are encoded as JSON arrays of objects to import into the scripting engine. Each object in the JSON array must have a "command" value, followed by any applicable parameters.
Commands
"dialog" Pop up text to display
- "text" (string or blank to hide)
"exit" Always required to end
- "link" (optional string)
"face" Set a sprite's compass direction
- "direction" (up, down, left, right)
- "sprite" (positive integer)
"fight" Initiate a battle
- "background" (positive integer)
- "enemy" (positive integer)
"fillstats" Max out HP and MP
"gesture" Display extended sprite gestures
- "gesture" (positive integer)
- "sprite" (positive integer)
"getitem" Acquire an item
- "item" (positive integer)
"move" Shift a sprite or cell
- "x" (integer)
- "y" (integer)
- "absolute" (boolean)
- "cel"/"sprite" (positive integer)
"overlay" Display an image over the action
- "image" (string or blank to hide)
"repeat" Repeat the last command
- times (positive integer)
"start" Always required to begin
- no parameters
"useitem" Use an item
- "item" (positive integer)
Example
[
{'command':'start'},
{'command':'move', 'x':120, 'y':936, 'absolute':true},
{'command':'face', 'direction':'up'},
{'command':'dialog', 'text':'Welcome to the third teaser for The Mystical Journey'},
{'command':'repeat', 'times':60},
{'command':'dialog', 'text':'We are starting in the village of Bryn, which is where the final game will begin.'},
{'command':'repeat', 'times':80},
{'command':'dialog', 'text':'It looks like Jasper is already here for us. Let's try to get his attention.'},
{'command':'repeat', 'times':120},
{'command':'dialog', 'text':''},
{'command':'repeat', 'times':20},
{'command':'dialog', 'text':'Hey, Jasper.'},
{'command':'repeat', 'times':30},
{'command':'dialog', 'text':''},
{'command':'repeat', 'times':30},
{'command':'dialog', 'text':'JASPER!!'},
{'command':'repeat', 'times':5},
{'command':'gesture', 'gesture':3},
{'command':'repeat', 'times':10},
{'command':'gesture', 'gesture':0},
{'command':'repeat', 'times':10},
{'command':'gesture', 'gesture':1},
{'command':'repeat', 'times':10},
{'command':'gesture', 'gesture':2},
{'command':'repeat', 'times':10},
{'command':'face', 'direction':'down'},
{'command':'repeat', 'times':10},
{'command':'dialog', 'text':'Thank you, Jasper. Now let's continue...'},
{'command':'repeat', 'times':40},
{'command':'gesture', 'gesture':0},
{'command':'repeat', 'times':3},
{'command':'face', 'direction':'down'},
{'command':'repeat', 'times':17},
{'command':'dialog', 'text':'Jasper is the grandson of the mining foreman and becomes the first playable character. We will get to the circumstances of this in a moment.'},
{'command':'repeat', 'times':120},
{'command':'dialog', 'text':'For now, though, he will give us a tour of Bryn. Heroism will have to wait.'},
{'command':'repeat', 'times':80},
{'command':'dialog', 'text':''},
{'command':'repeat', 'times':20},
{'command':'face', 'direction':'up'},
{'command':'move', 'x':0, 'y':-2},
{'command':'repeat', 'times':113},
{'command':'move', 'x':120, 'y':530, 'absolute':true},
{'command':'dialog', 'text':'Rather than staring at Jasper's backside, we've skipped to the entrance to the mine, which is north of Bryn.'},
{'command':'face', 'direction':'down'},
{'command':'repeat', 'times':119},
{'command':'dialog', 'text':'Bryn's economy depends on export of valuable ores that are derived from the mine.'},
{'command':'repeat', 'times':100},
{'command':'dialog', 'text':'These ores can be used in alloys to create anything from weapons to machinery.'},
{'command':'repeat', 'times':100},
{'command':'face', 'direction':'up'},
{'command':'dialog', 'text':''},
{'command':'move', 'x':0, 'y':-2},
{'command':'repeat', 'times':53},
{'command':'move', 'x':0, 'y':0},
{'command':'dialog', 'text':'Here we are now at the mine entrance.'},
{'command':'repeat', 'times':80},
{'command':'dialog', 'text':''},
{'command':'face', 'direction':'left'},
{'command':'repeat', 'times':20},
{'command':'dialog', 'text':'Jasper, could you stop hitting on that girl? She looks busy.'},
{'command':'repeat', 'times':40},
{'command':'face', 'direction':'down'},
{'command':'gesture', 'gesture':2},
{'command':'repeat', 'times':10},
{'command':'face', 'direction':'down'},
{'command':'repeat', 'times':10},
{'command':'dialog', 'text':''},
{'command':'repeat', 'times':20},
{'command':'dialog', 'text':'On that note, let's skip ahead to the mine itself.'},
{'command':'repeat', 'times':30},
{'command':'face', 'direction':'up'},
{'command':'repeat', 'times':30},
{'command':'move', 'x':120, 'y':230, 'absolute':true},
{'command':'dialog', 'text':''},
{'command':'repeat', 'times':30},
{'command':'face', 'direction':'down'},
{'command':'dialog', 'text':'Well, here we are in the mine where it all begins.'},
{'command':'repeat', 'times':60},
{'command':'dialog', 'text':'Late one night, Jasper's grandfather is working with the mining team, when a flash of light shoots by them.'},
{'command':'repeat', 'times':100},
{'command':'dialog', 'text':'A blast of energy erupts inside the mine, burning several workers to death. Jasper's grandfather barely survives.'},
{'command':'repeat', 'times':100},
{'command':'dialog', 'text':'What caused this? How does Jasper seek answers? It's best to not give away too much.'},
{'command':'repeat', 'times':100},
{'command':'dialog', 'text':'Let's see one more thing before concluding this teaser.'},
{'command':'repeat', 'times':60},
{'command':'face', 'direction':'left'},
{'command':'move', 'x':120, 'y':88, 'absolute':true},
{'command':'repeat', 'times':20},
{'command':'gesture', 'gesture':3},
{'command':'repeat', 'times':10},
{'command':'dialog', 'text':'I guess Jasper isn't ready for this yet. He needs some friends to help.'},
{'command':'repeat', 'times':60},
{'command':'dialog', 'text':'Well, Jasper, I guess we have to save something for Teaser 4.'},
{'command':'repeat', 'times':20},
{'command':'face', 'direction':'down'},
{'command':'repeat', 'times':40},
{'command':'dialog', 'text':'What should we let the viewers do, then, Jasper?'},
{'command':'repeat', 'times':80},
{'command':'gesture', 'gesture':0},
{'command':'repeat', 'times':3},
{'command':'face', 'direction':'down'},
{'command':'repeat', 'times':3},
{'command':'gesture', 'gesture':0},
{'command':'repeat', 'times':3},
{'command':'face', 'direction':'down'},
{'command':'repeat', 'times':3},
{'command':'gesture', 'gesture':0},
{'command':'repeat', 'times':3},
{'command':'face', 'direction':'down'},
{'command':'repeat', 'times':3},
{'command':'gesture', 'gesture':0},
{'command':'repeat', 'times':3},
{'command':'face', 'direction':'down'},
{'command':'repeat', 'times':3},
{'command':'dialog', 'text':'Sure, that's a great idea! Go ahead and test the controls.'},
{'command':'repeat', 'times':80},
{'command':'move', 'x':120, 'y':936, 'absolute':true},
{'command':'dialog', 'text':''},
{'command':'exit'}
]