Jump to content
DavidW

SSL documentation

Recommended Posts

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.)

Edited by DavidW

Share this post


Link to post

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).

Share this post


Link to post
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.

Share this post


Link to post

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.)

Share this post


Link to post
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.)

Share this post


Link to post

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).

Share this post


Link to post

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 :)

Share this post


Link to post
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...