229
edits
Line 101: | Line 101: | ||
<foo type="string">to fly. </foo> | <foo type="string">to fly. </foo> | ||
. . . . </syntaxhighlight> | . . . . </syntaxhighlight> | ||
which will be read as a single sentence (''"Hello world. It is a good day to fly. "''). | which will be read as a single sentence (''"Hello world. It is a good day to fly. "'').</br> | ||
==== Literals ==== | |||
Those in the example above are literal sentences that you can change by the strings you want. | |||
{{note | | |||
* You should not include either " or ' . | |||
* Punctuation is meaningfull. }} | |||
==== Substitutions ==== | |||
Strings starting by '''%''' will call some '''property value'''. | |||
In the example above replace "'''day'''" by "'''% /sim/startup/time-offset-type'''". </br> | |||
Now the sentence will be read as ''"Hello world. It is a good morning to fly. "'' or ''"Hello world. It is a good evening to fly. "'' depending on the time.</br> | |||
{{note | | |||
* The called property must be a string.}} | |||
==== Concatenation ==== | |||
Strings starting by '''~''' will append the sentence with another one.</br> | |||
Try this: | |||
<syntaxhighlight lang="xml"> | |||
. . . . | |||
<short type="string">% /satc/callsign-fmt</short> | |||
<short type="string">, </short> | |||
<foo type="string">Have a nice fly, </foo> | |||
<foo type="string">~short</foo> | |||
. . . . </syntaxhighlight>you must hear ''"Have a nice fly, <your-callsign> , "'' </br> | |||
Besides that, you can call the ''spoken_atc.say()'' function at runtime to check your customization.<br /> | Besides that, you can call the ''spoken_atc.say()'' function at runtime to check your customization.<br /> | ||
=== | ==== spoken_atc.say() function ==== | ||
You can ... [TODO] | You can ... [TODO] | ||
edits