Our original plans were to use a multimedia development system, mTropolis, and augment it with C++. I’m not sure if scripting was in the original plan, but if not it didn’t take long to add. Scripting languages tend to be much higher-level, are often domain-specific, and intended for use by people who aren’t programmers.
You can see a sample of scene coding on our site (it’s too large to include here).
The main features were:
We needed to support multiple responses and advice. There are no functions, but there’s simple branching.
A core concept of the game is that most results are not certain. They require an individual to perform a deed. In game terms, this is a test. For example, one of your leaders will test their Combat ability against a dueler. Or the lawspeaker will test his Custom when arguing a case. Or a ring member will test their Poetry (a composite ability) against the surliness of the clan when trying to calm them.
Tests have two outcomes: win or lose. So OSL has those keywords. Sometimes, the degree of success matters, in which case the variable q is set to the amount the victorious side won by.
All variables are global. However, single-letter variables are reset to 0 at the beginning of a scene. Variables are easily accessible to the C++ code, and are actually one of the principal ways that the multimedia code can talk to the other portions.
Variables can contain a floating point value, a string, or refer to a person, clan, or tribe. In the latter case, specific attributes could be used (e.g. otherClan.chief or c.leadership). Variables could also hold lists of values.
We started out with special-purpose functions, often used so that script could handle interaction (such as ChooseSacrifice). But our C++ programmer, Shawn Steele, realized that we could come up with generalized list functions
c = StrongestMilitary(ClansWithPositiveAttitude(NeighboringClans))
All text allowed for placeholders, which would be replaced by a value
response 2: “The <survivorClan.plural> are our neighbors.”
Some of these were context-sensitive, to allow for English grammar (<him/her>). And we had a special placeholder used to vary text (to provide more repeatability).
Bargaining with bandits is <d3:giving chickens to the fox/a sign of how weak we think we are/doomed to fail>
OSL is definitely a “little language” — it’s not Turing-complete. But it serves its purpose pretty well. Robin Laws was able to describe scenes which needed very little cleanup to compile, our QA team was able to read the logic, and it helped glue the mTropolis and C++ code together.