ThereScript

ThereWiki | RecentChanges | Preferences

ThereScript is a language used by ThereInc to add scripting to objects. The most visible places where ThereScript appears are in TsFiles and AconfFiles downloaded to the ThereClient to set parameters for specific objects. For example, each designer add-on kit object is associated with a TsFile that sets such attributes as one-sided or two-sided for each material in the object.

Speculation: ThereScript is [Lua], described as "a powerful light-weight programming language designed for extending applications". The current version of Lua is 5.0; you can read the [reference manual] on-line. Lua is free software. I have done some comparisons between the Lua reference manual and some example files, and it seems to correspond very closely. What this means is that if you want to process ThereScript files, you can download Lua and bind it into your own (C) applications. -- IanYoung

My intention is to try and waffle about the grammar of ThereScript here, inasmuch as I can guess what it might be. I think it makes sense to separate this from the pages for TsFiles and AconfFiles, where we can instead restrict discussion to the particular uses of ThereScript. -- IanYoung

Here is an example TsFile for a designer object, specifically Resources\gamekit\epobs\fu\92552851.ts (my own free-standing picture add-on):

PIECE
{
  name = "Winter Trees, Livingston",
  id = "dev92552851",
  model = "fl/92552851.model",
  modelSettings = {
  [ "pic" ] = {
    colormap = "fl/92552851_1.jpg",
    lit = 0,
    twosided = 0,
  },
  [ "frame" ] = {
    colormap = "fl/92552851_2.jpg",
    lit = 0,
    twosided = 0,
  },
  [ "tape" ] = {
    colormap = "fl/92552851_3.jpg",
    lit = 1,
    twosided = 0,
  },
  [ "back" ] = {
    colormap = "fl/92552851_4.jpg",
    lit = 1,
    twosided = 0,
  },
},
  layoutClass = "Structures",
  sinkToGround = dropOnTop,
}

CONTENTS
{
  { "dev92552851", 1 },
}

What I read into this is as follows:

This seems to explain everything in the above TsFile. My next step will to formalise that as an Antlr grammar and try verifying that all TsFiles in my client installation match such a grammar.

20040423: The capitalised words PIECE and CONTENTS look to me like they are actually in-line function calls to functions defined in the file gamekit\gamekitsystem.ts. There also seems to be some relevant code in gamekit\gamekitframework.rs which includes the former. Speculation: these files are the context in which the add-on kit TsFiles are executed.

Some other observation from the gamekit framework files:


ThereWiki | RecentChanges | Preferences
This page is read-only | View other revisions
Last edited October 8, 2004 6:17 am by IanYoung (diff)
Search: