L3DT users' community
Large 3D terrain generator

Scripting improvements

Important stuff.

Scripting improvements

Postby Aaron » Mon Jun 09, 2008 10:19 pm

Hi Everyone,

In the latest developmental build* I have extended the support for scripting in L3DT. The headline addition is the new scripting user interface (see below), but there has also been several updates to the scripting syntax to make it more powerful and easier to use. Whist scripting does not offer the same level of customisation that is possible via plugins, it is now at the stage where it can do useful stuff. I have included several example scripts in the installation package to demonstrate these capabilities (as discussed further down).

Scripting user interface

The most obvious aspect of these changes is the new scripts menu, as shown below:


From this menu you can access the script manager to load, edit and otherwise manage your scripts. You can also open the included script editor, or select another program to be your preferred script editor. Finally, the lower section of the script menu is the 'quick run' list; to run a script, simply select it from this list.

Script examples

Example scripts are included with the installation package, including:
  • Export fractal - for generating and exporting a fractal heightmap.
  • Import tile - for importing a sub-region of the heightmap from a file.
  • Re-calculate texture area - for re-calculating a sub-region of the texture map (e.g. after changes to the attributes map).
Some of the other scripts are included for educational purposes, such as 'Hello World' and 'Greeting'.

Supported languages

By default, this scripting interface only supports L3DT's native script language, ZeoScript. This is a rudimentary home-baked language that is good for calling plugin API extension functions (e.g. calculations, file export, etc.), but not much else. It doesn't do loops, for instance.

For users who want more power from their scripting language, I recommend they download and install Carl Douglas' cdPython plugin, which implements the Python scripting language. L3DT's script interface will run python scripts (.py) after the plugin is installed, and I have included a python script example in the installation package.

Other languages can be added in the future via plugins.

Changes to plugins

This release includes a major revision of the parser in the ZeoScript plugin, which made a few (necessary, and beneficial) breaking changes to the syntax of the language. As a consequence of this change, several plugins that ran scripts had to be modified. The change list so far includes:
  • Sapphire (3D editor)
  • L3DTio_Atlas2 (TGEA Atlas export plugin)
  • L3DTio_Spring (Spring RTS export plugin)
  • L3DTio_SMT (Spring RTS export helper plugin)
  • L3DTio_SMF (Spring RTS export helper plugin)
  • L3DTio_Backup (backup/restore/undo plugin)
  • 7zWrap (7-Zip compression/decompression plugin)
  • atMergeMap (heightfield-combining plugin)
If you find any other plugins behaving strangely, please let me know and I'll update them forthwith.

In other news...


Please reply to this forum thread if you'd like to post comments or questions. Feedback is always welcome.


* For the record, the latest build version is build, dated 9th of June '08.
User avatar
Site Admin
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Return to Announcements

Who is online

Users browsing this forum: No registered users and 1 guest