DavidW Posted March 9, 2011 Share Posted March 9, 2011 This is a rather belated attempt to provide proper documentation for "Stratagems Scripting Language" (SSL), which is a metalanguage for writing BAF scripts. Roughly speaking, SSL is to BAF as D is to DLG. It allows very complex scripts to be easily assembled and modifed. So far, its main application has been in combat AI (specifically, in my Sword Coast Stratagems I and II) though it also finds a home in Wisp's Item Randomizer. SSL isn't downloadable separately, but can be found in SCS or SCSII (look in scs(ii)/ssl). I'm providing this documentation mostly for TheBigg, who's investigating offering SSL support in WEIDU. It's not especially user-friendly, and it assumes at least passing familiarity with SSL code as well as a thorough understanding of BAF code. Anyone interested in coding in SSL might want to look at this (incomplete) tutorial first. (Anyone not needing fairly sophisticated scripting probably should just stick to BAF - SSL is very powerful but has a pretty vertical learning curve.) Anyway, there are three documents (all in PDF form). The first gives a (roughly) context-free-grammar explanation of the syntax of SSL (more accurately, of the syntax of "unlooped, substituted SSL", the file you get when variable substitutions, file inclusions and loop evaluations have been performed on the original SSL). SSL_grammar.pdf The second explains how the SSL parser turns an SSL block into a sequence of BAF blocks. How_to_evaluate_an_SSL_block.pdf The third explains how SSL evaluates variable substitutions and file inclusions. SSL_loops_and_variables.pdf EDIT 13-9-12 - very belatedly, I forgot about the DEFAULT_TRIGGER command. Add this to SSL_grammar.pdf: A block can also be DEFAULT_TRIGGER(SSL-BAF trigger) or DEFAULT_TRIGGER() The most recent DEFAULT_TRIGGER trigger is prepended to all trigger blocks. (This is useful in, e.g., marking a large block of actions as only to be done if some variable is set.) Link to comment
the bigg Posted March 9, 2011 Share Posted March 9, 2011 Thank you very much for the precise documentation. I'll delay implementing this for 230 though (there's enough bugs in the current version to warrant releasing 229, and my graduation paper is due on the 29th so I can't get started on stuff that I can't do in one hour). Link to comment
DavidW Posted March 9, 2011 Author Share Posted March 9, 2011 Thank you very much for the precise documentation. I'll delay implementing this for 230 though (there's enough bugs in the current version to warrant releasing 229, and my graduation paper is due on the 29th so I can't get started on stuff that I can't do in one hour). More than fair. Link to comment
DavidW Posted March 9, 2011 Author Share Posted March 9, 2011 I forgot to note that SSL accepts the \\ format for comments. (I couldn't be bothered to code it to accept the \* *\ format, but you wouldn't break backwards compatibility by doing so.) Link to comment
the bigg Posted March 9, 2011 Share Posted March 9, 2011 Is it really \\, or did you mean // ? Link to comment
DavidW Posted March 9, 2011 Author Share Posted March 9, 2011 Is it really \\, or did you mean // ? It's //, sorry. (An inability to remember which way around the comment markers go accounts for a respectable fraction of my compile failures.) Link to comment
DavidW Posted March 9, 2011 Author Share Posted March 9, 2011 I also forgot to mention that library files are cumulative: if the Charm trigger list turns up in more than one place, the resultant lists are combined (and duplicate entries are purged). Link to comment
the bigg Posted March 9, 2011 Share Posted March 9, 2011 Yes, I recall that from the tutorial thread. And hey, fair enough about messing up \ and / - I always mess up << and >> when operating on iostream in c++, and in both cases the compiler is a safety net Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.