XEngine
From OpenSimulator
The XEngine Script Engine
This is a fully functional, full featured script engine which supports persistent script states and script state serialization.
This engine is not enaled by default. To enable it, add the following line to your OpenSim.ini [Startup] section:
script_engine = "OpenSim.Region.ScriptEngine.XEngine.dll"
You may have a similar line, but referencing the "DotNetEngine" there. If so, please comment it, since two script engines can not be run in parallel.
At this time, you can delete the compiled scripts from your ScriptEngines directory, because the XEngine uses a different binary format.
The XEngine will create up to 4 files for each script, these are:
.dll, the actual executable file .mdb, the debug info, if requested .state, the saved state .cs, the converted source file, if requested
The XEngine has a number of configuration options in OpenSim.ini, which are listed below, with an explanation and the default values:
WARNING! Do NOT copy the section below to your OpenSim.ini!
Use the template provided in OpenSim.ini.example. The section below contains syntactically incorrect documentation text, which is not meant to be placed in the OpenSim.ini file!
[XEngine] ; Use the newer LSL to CS compiler (experimental) UseNewCompiler = false Uses the new, lexical LSL parser. This will generally improve script parsing, but is not yet proven to run all existing content ; How many threads to keep alive even if nothing is happening MinThreads = 2 XEngine will keep at least this many threads waiting ; How many threads to start at maximum load MaxThreads = 100 XEngine will not start more than this many scripts, even if that means blocking script execution ; Time a thread must be idle (in seconds) before it dies IdleTimeout = 60 Threads will die when they are not used for a while. This is the amount of time they must be' idle for that to happen ; Thread priority ("Lowest", "BelowNormal", "Normal", "AboveNormal", "Highest") Priority = "BelowNormal" Script threads will run at this priority ; Maximum number of events to queue for a script (excluding timers) MaxScriptEventQueue = 300 Each script has a queue for events. This is the length of the queue, determining the number of events that will be queued up before events are dropped ; Stack size per thread created ThreadStackSize = 262144 The stack size each script thread runs with. The default also represents the minimum ; Rate to poll for asynchronous command replies (ms) AsyncLLCommandLoopms = 50 Interval between polls for asynchronous command results. Smaller values mean better response, but also more burned CPU cycles ; Save the source of all compiled scripts WriteScriptSourceToDebugFile = false Create a source file (.cs) on ScriptEngines, containing the preprocessed script ; Default language for scripts DefaultCompileLanguage = lsl The default language to compile ; List of allowed languages (lsl,vb,js,cs) AllowedCompilers = lsl,vb,js,cs The languages to allow for compiling ; Compile debug info (line numbers) into the script assemblies CompileWithDebugInformation = true Create the .mdb debug file, which allows reporting of line numbers in runtime errors ; Allow the use of os* functions (some are dangerous) AllowOSFunctions = false Allow the use if functions in the os* namespace ; Interval (s) between background save of script states SaveInterval = 120 Interval for script state persistence save. ; Interval (s) between maintenance runs (0 = disable) MaintenanceInterval = 10 Interval in seconds between maintenance runs. The maintenance run checks for long running script events and terminates the scripts ; Time a script can spend in an event handler before it is interrupted EventLimit = 30 If a script spends more time in a single event handler, it will be interrupted. This includes delays produced by llSleep() calls ; If a script overruns it's event limit, kill the script? KillTimedOutScripts = false If a script gets terminated by the above timeout, suspend it pending a recompile? ; Allow OS console command functionality (VERY DANGEROUS!!) AllowosConsoleCommand = false Allow the use of the os console command function, which allows running any opensim command from within a script
The LSL implementations of the XEngine differ from those of the standard engine. the XEngine is more LSL compliant in it's event handling.