fly me to the moon

SAKURASCRIPT

SakuraScript is a shared language between Ghosts that tells your baseware (such as SSP or CROW) various functions. You need to know it to write dialogue past an extremely basic level. What will be most important for beginners is its formatting functionality.

SakuraScript works with a series of 'tags'. SakuraScript tags act much like the Kawari syntax previously discussed, with a few key differences:

* SakuraScript tags can be parsed inside string literals.
* SakuraScript will rarely cause syntax errors that break your Ghost.
* SakuraScript is handled on the side of the baseware, not the Ghost's SHIORI.
That last one is a bit more technical, so if you don't understand why that may be important, feel free to ignore it.

SakuraScript, for writers, is primarily used to format dialogue. But first, we'll touch on the foundational tags used in SakuraScript writing. You'll most definitely need to know how to switch which character is talking, what surface they're using, how to create a line break, and how to create pauses.

Foundational Tags

Ghosts handle which character is 'in focus' by using the tags \0 and \1. \0 is your main character, while \1 is your side character. This actually doesn't only handle who is talking, but also the character other SakuraScript tags are directed at. If you use a tag to change a character's surface, it will change it for the character in focus. But not necessarily the character the surface is designed for. Keep that in mind.
The tags \h and \u can also be used to shift focus to the main and side character respectively. \p[*], where * is a number, can also be used to shift focus to characters, including numbers higher than 1.

To change a character's surface, the tag \s[*] is used, where * is a number. This one is fairly simple to use. If you're not sure which numbers corrospond to each surface, there's a helpful 'Surface Test' in the Developer's Palette in SSP. Simply turn on Developer Options in SSP's preferences, then press CTRL-Shift-D to bring the palette up.
The tag \i[*] is very similar to \s[*], except it activates a surface's animation instead of changing a whole surface. These animations can vary greatly, from changing arm positions to making a character jump, and more. These animations are part of the shell, and are numbered just as uniquely as surfaces are.

Sometimes, you may want to add a pause in your characters' speech. It can be used for dramatic effect, to establish a certain cadence, or many other things. the \w* and \_w[*] tags, where * is a number, are used for this. \w* can only go as high as 9, and it will pause for the number specified multiplied by 50 miliseconds. \_w[*] gives more control over the waiting period, and is in miliseconds. e.g. \_w[1000] is one second.

So, to summarize:
\0 - Changes focus to your main character.
\1 - Changes focus to your side character.
\p[*] - Changes focus to the given character.
\s[*] - Changes the surface of the focused character.
\w* - Waits for * x 50miliseconds.
\_w[*] - Waits for *miliseconds.

Let's write a little to put it into practice.
sentence : (
“\0\s[8]What's your favorite band?\w4”
“\1\s[12]Oh, that's a hard one...\_w[2000] I don't think I can pick just one..-”
“\p[22]\s[5]Oh, that's easy for me. Obviously Green Needle is the best!”
)
Here, three characters will end up talking, each changing to a non-default surface when they speak. The first waits a moment to let the second answer, the second pauses to think, and the third doesn't wait for a pause at all.

Just looking at the tags like this might seem a bit abstract, but it should become easy to imagine a scene and where you need to place expression changes and pauses. You can control the flow and cadence of your conversations neatly with this system.

Offhandedly, the tag \e is a tag you may see much more commonly in older Ghosts, as in the past it was necessary to end every dialogue with. \e stops the current event and script, and any script written after it won't be run. While it's here to support old specification, it also still sees occasional use, as stopping script is useful in certain programming situations.

Basic Formatting Tags

It can become quite difficult to decipher in what order which sentences are read without proper formatting. That's the whole reason dialogue is split with newlines in a back and forth in a book for example.

We can do a very similar thing with SakuraScript. This is very handy as the characters' dialogue is the most common thing the User will be seeing, understandably.

The tag \n will create a new line. It's sibling, \n[half], will create a half-height line break. You'll commonly see these two together, such as \n\n[half], as they create a good width when paired. Two linebreaks is also fine, as in \n\n\, but it's less common in English Ghosts due to early Ghosts using it.

Let's do another example.
sentence : (
“\0\s[0]I'd like to say more than one thing.\w4\n\n[half]”
“\1\s[10]What are you thinking of saying?\w2\n\n[half]”
“\0\s[0].\w2.\w2.\w2I forgot.”
“\1\s[10]Well, that's informative.”
)
This'll create text in the balloon similar to:
(Balloon 1)
I'd like to say more than one thing.

...I forgot.
(Balloon 2)
What are you thinking of saying?

Well, that's informative.
You can easily deduce the flow of the conversation, now.

Extra Formatting Tags

\f is a tag that lets you apply more rigorous formatting. It has a lot of variants, so I'll will only cover a few. The complete list can be found here. Italics, bolding, strike-throughs, sub/superscript, and underlining are all options that can be turned on with \f[(style),(parameter)]. The parameter indicates if it should turn it on, off, or be set to the balloon's default.

To turn on italics, for example, it would be \f[italic,true]. To return to the balloon's default, \f[italic,default] would be used. 'false' is the parameter to turn an effect completely off. However, some balloons use these effects for style purposes. So, 'default' should be used unless you want to turn off an effect on all balloons.
sentence : (
"\0\s[0]Hey, say something spooky.\w4"
"\1\s[10]\f[italic,true]Something spooOOooky!\f[italic,default]"
"\0\s[10]\That is \f[bold,true]not\f[bold,default] what I meant."
)
Remember to add the tag to end formatting, as it will format all characters in a definition until dictated otherwise. That includes across the Sakura and Kero!

jump

Index
Introduction
Glossary
Writing
Writing in Kawari
Writing with SakuraScript
Shells
Shell Overview
Coding
SHIORI Event Overview Basic Coding
Advanced Coding

credit

walkthrough by Okuajub
design by almost sweet - resources