Skip to content
Notay edited this page Feb 16, 2016 · 3 revisions

Goals

Easy to read and write. Fast loading, need to load and validate 500+ scripts in less than 30s.

Required functionality

The base functionality, specific functions are lower in this document.

  • Call functions.
  • Wait inside a function.
  • Stop execution of the current line, script, and the whole tease.
  • Call other scripts, with the option of returning to the caller after the called script finishes.
  • Color, Bold and Italic Text. Would be nice to have in-line images like Emoji.
  • Phrases \ Vocabulary
  • Response system, responses can interrupt the current script.
  • Variables (Numbers, Boolean aka flags, Text) Persistent and temporary. And operators. + - * / < = >
  • Glitter, Twitter where the computer can talk to it self, and share information(aka variables). Could the user be able to write on Glitter?

List of functions

This is a preliminary list of functions, please add to it, suggested renames are welcome.

  • Image, Audio, Video Queue media to be used after line finishes.
  • If, ElseIf check if variable or expression is true.
  • Ask Wait for user to answer, then reply with a response. And optional time-out.
  • Wait Wait for N seconds then continue.
    • WaitAudio, WaitVideo Wait for all running audio\video to finish.
  • Exit, ExitTease Exit current script

Virtual Tease Script .vtscript

VTScript is text first with required indentation.
Indentation is used to define blocks or sub blocks of text\code, indentation can be any number of spaces or tabs, but must be consistent throughout the file.

Notes:

  • A Script can be used for Modules, Links, Responses, and Interrupts.
  • A List can be used for Phrases\Vocabulary, Responses, and Taunts.
  • Names (script names, functions, variables, list names, etc)
  • Are case insensitive. (MyVar is the same as myvar)
  • Can not just contain numbers, or it will be treated as a number.
  • Can not contain any white-space.
  • Variables can not start with special characters.
  • Numbers
  • There is no thousands separator. (The comma is used as a argument separator with parentheses.)
  • . (period dot) is the decimal separator.
  • Variables are strongly typed. If variable 'var22' is a number, you can not set text to it. (This greatly helps with script validation.)

Special characters:

  • # Calls a function.
  • @ Prints variable or function results to the chat.
  • ** Escape character, so if you want to say '#2', you write '\#2'.
  • Can also use it to print new lines with \n
  • // Comment, remaining text on line is ignored.
  • ()

Parentheses ( ) can be used to send stuff to functions, or just used to mess with variables.

	//We can use # to mess with variables.
	#(MyVar = 22)
	
	//Wait for the number of seconds defined in MyVar, 22 seconds.
	#Wait(MyVar)
	
	//We can use @ to print the value of the variable.
	MyVar is @MyVar
	//Or even.
	@(MyVar + 10)
	//Note: MyVar is still 22, we have to use = to assign to variables.

The output of that would simply be "MyVar is 22" then "32".

Special characters in parentheses:

  • " " Is used to define text. For example (var = Hello) would think Hello was a variable, so you do (var = "Hello") to set the text Hello to var.

ToDo:

  • Examples
  • Basic ones
  • Glitter
  • Glitter crosstalk
  • Others
  • Response system
  • Put some code up
  • Explain script stack
  • End, should end clear the stack, would that be expected or something else?
  • Design media tagging system.

Note: this page will need to be split up and reordered to make it easier for new script writers.

More tomorrow?

Clone this wiki locally