v2.0.0 Beta4
Pre-releaseThis is the beta release of the compiler for Yarn Spinner. If you want to check out the v2.0 beta for Yarn Spinner for Unity, you should head to the beta release!
Yarn Spinner is made possible by your generous patronage. Please consider supporting Yarn Spinner's development by becoming a patron!
Added
- Characters can now be escaped in lines and options.
- The
\
character can be used to write characters that the parser would otherwise use. - The following characters can be escaped:
{
}
<
>
#
/
\
- The
/
and<
characters don't usually need to be escaped if they're appearing on their own (they're only meaningful when they appear in pairs), but this allows you to escape things like commands and comments.
- The
- The
- Identifiers now support a wider range of characters, including most multilingual letters and numbers, as well as symbols and emoji.
Changed
- Made line conditions control the
IsAvailable
flag on options that are sent to the game. - This change was made in order to allow games to conditionally present, but disallow, options that the player can't choose. For example, consider the following script:
TD-110: Let me see your identification.
-> Of course... um totally not General Kenobi and the son of Darth Vader.
Luke: Wait, what?!
TD-110: Promotion Time!
-> You don't need to see his identification. <<if $learnt_mind_trick is true>>
TD-110: We don't need to see his identification.
-
If the variable
$learnt_mind_trick
is false, a game may want to show the option but not allow the player to select it (i.e., show that this option could have been chosen if they'd learned how to do a mind trick.) -
In previous versions of Yarn Spinner, if a line condition failed, the entire option was not delivered to the game. With this change, all options are delivered, and the
OptionSet.Option.IsAvailable
variable containsfalse
if the condition was not met, andtrue
if it was (or was not present.) -
It's entirely up to the game to decide what to do with this information. To re-create the behaviour from previous Yarn Spinner versions, simply don't show any options whose
IsAvailable
value isfalse
. -
Fixed a crash in
LineParser
if a null input was provided to it. -
Fixed a crash in
FormatFunctionUpgrader
(which upgrades v1 Yarn scripts to v2) if an invalid format format function was encountered.