Skip to content
Serra Royale edited this page Sep 24, 2025 · 20 revisions

Scripting Documentation

Welcome to The Unofficial NGC Tranquillity LSL Wiki!

What is Tranquillity?

Tranquillity is an Enhanced fork of OpenSimulator (or OpenSim) by the Next Generation Core (NGC) project.

What is OpenSimulator?

OpenSim is a BSD Licensed Open Source project to develop a functioning virtual worlds server platform capable of supporting multiple clients and servers in a heterogeneous grid structure. OpenSim is written in C#, and runs under the Microsoft .NET 8 runtime.

About OpenSimulator scripting

An important ingredient in virtual worlds simulation is scripting. Scripts allow the addition of actions to 'entities' in world, like making a door react to a touch and open.

Script engines do script compilation and control script execution. OpenSimulator script language supports a subset of the Linden Labs Second Life script language (LSL) plus its own extensions OSSL & Yoptions.

LSL in a nutshell

LSL (Linden Scripting Language) is a event-driven language. A script is a collection of functions called event handlers.

Events are generated by the environment (mouse clicks, collisions and many more). Many of those events happen at time critical moments, so those event handlers should be small and fast to reduce impact on the rest of simulation. YEngine may allow long processing to happen with less impact on the simulation, but that will happen at lower priority.

(Hopefully), a script does nothing when there is no event to process. Is sits waiting for an event. Only events matching a event handler present in the script will be generated. If the script has no handler for mouse clicks, mouse clicks won't be reported.

LSL functions may also generate events. For example, llRezObject will trigger a object_rez event. llMessageLinked, a link_message event. This makes your script asynchronous (request action in a handler, get result in another handler). Understanding the flow of events in your script is essential.

An event cannot interrupt another event. Processing of the previous event must be finished before accepting a new one. Events are queued up to the number of 300 (OpenSim.ini, MaxScriptEventQueue). Finally, LSL has states that implement the concept of state machine. A script can respond differently to a same event in different states, or to another set of events.

OSSL in a nutshell

String type in OpenSimulator

Configuring scripting

How to use scripts in OpenSimulator

If you have never written a script in LSL before, then please have a look here to learn the scripting basics. If you do have (some) experience with writing or editing LSL scripts, then the procedure is identical to the procedure on SL. Known problems:

  • Error messages about scripting errors are often cryptic, and tend to be long.
  • Script syntax and execution may depend on the engine used, such as YEngine, Phlox, DotNetEngine, & XEngine.
  • On teleports or crossings from a region using YEngine to a region using XEngine, script state (like changed values on global variables) is lost. Should be okay on the inverse direction.

Scripting System Status

Status Tables / Charts related to LSL and OSSL functions, constants and related material.

LSL/OSSL Status Overview

LSL

OSSL

Additional Resources for Scripting (LSL)

Clone this wiki locally