[FEEDBACK NEEDED] New text line syntax
You may have noticed flux of new features recently. They're all driven by the feedback we got via the form. I'm very grateful to everyone who shared thoughts, especially when you pointed lacking features or subpar solutions of the current systems.
Most of the improvements we've implemented so far were pretty straightforward and few are still on the way, but there is one potential change, which I'd love to hear opinions on, before deciding whether to proceed.
Basically, the idea is to reverse markup of command lines with text lines; ie you'd have to mark beginning of text lines with a backtick (`), while commands won't require control symbol at the start of the line:
Code: Select all
; Currently
@command
Printed text.
; Proposed
command
`Printed text.
The main point of the change is to improve redability and reduce amount of typing when authoring scripts. In general, there are significantly more command lines in average script than text lines (especially in more dynamic/branching projects), so it'd make sense to promote command to the "default" construct, which doesn't require a control symbol.
Another significant point is, with the recent introduction of nesting, it may be unclear whether you indenting a text line or want to print a text with white space at the start, eg:
Code: Select all
; Is the text line nested under @await or just starting with 4 spaces?
@await
@back x
Text line.
; Here it's clear that the line is nested.
; Command ids can't start with space, so they're not affected by the same issue.
await
back x
`Text line.
There are all sorts of other pros, should we proceed we the new syntax. For example, we may as well change how authors are specified to reduce chance of conflicts with normal prose, as the current author:
construct is quite common in "natural" text:
Code: Select all
; Currently, it's not clear wether you want to print "John: Hello World!"
; or print "Hello World!" authored by actor with ID "John".
John: Hello World!
; Proposed.
`John`Hello World!
This, in turn, allows additional parameters to be specified for the text lines:
Code: Select all
; Print the text authored by "John" actor with 50% speed while displaying the author as "Someone".
`John as:"Someone" speed:0.5`Hello World!
— content inside the backticks would be treated identical to a command with AuthorId.Appearance
nameless parameter and other optional parameters, such as speed
, as
, waitInput
, etc. Moreover, you'd be able to provide a custom command to be used for text lines, which could have its own parameters and/or behavior.
And, in case you'd like to enter "full text" mode, we could have something like this:
Code: Select all
``
All the lines here are considered text lines.
They don't require ` at the start,
# may start with other (and will preserve)
; control symbols,
as well as line breaks
and leading/trailing white space.
``
``John speed:0.5
The text blocks can as well be parametrized as normal text lines.
The parameters will apply to all the lines in the block.
``
This is of course a breaking and substantial change. Should we proceed, I'll make sure to prepare an automatic migration script, so that you'd be able to convert existing scripts in batch.
Please share your thoughts (here or on Discord), especially if you feel there would be significant drawbacks with the new syntax or have alternative solutions in mind.
Comparing current and proposed syntax
Comparison with pseudo script below (click here to view in full size). Notice line #21, where new syntax allows applying parameters to all the parts of the generic line, whilst currently we have to duplicate them.
Keep in mind there will be an option to change backtick to any other symbol
I'm aware some keyboard layouts don't have the dedicated backtick key, so there will be an option to change it and all the other control symbols, as well as command identifiers via something like developer localization pack. This feature will land before the proposed change.