User Tools

Site Tools


Using Public Scripts


The first step to using a custom script module is to copy the appropriate files to a place where the game can find it. The Public Scripts package uses three files: script.osm, version.osm, and dh2.osl. But the first file, script.osm must match the game it is being installed for. A script module from Thief Gold can’t be used in System Shock 2. (Although there are exceptions, such as version.osm.)

The simplest way to copy the right files is to run the included Setup.exe program. This is an automated installer that will copy the right files to the right places. If you already have a copy of Public Scripts installed, the older files will be backed-up to a zip archive with a name like If there is a problem, you can restore the old files from the backup archive.

Upgrading from Older Scripts

The main Public Scripts script module is named script.osm. This is the same name as an older script module distributed as “Gaylesaver’s Custom Scripts”. The reason the names are the same is because Public Scripts includes scripts that do the same thing as the “Gaylesaver” scripts. These are not merely copies, but completely new scripts made to be compatible, but with less problems than the originals. The “Gaylesaver” scripts are no longer being updated, so I am providing Public Scripts as an improved alternative.

You cannot have both Public Scripts and the “Gaylesaver” scripts installed at the same time. When you install Public Scripts the old script.osm will be overwritten. The old file darkhooks.dlx is not removed, however. This is harmless, but if you have no intention of ever using the “Gaylesaver” scripts again, then you probably want to delete it.

Using the Scripts

Before using any scripts, you must load the appropriate modules into each mission. You’re probably already familiar with doing this for gen.osm, convict.osm, or allobjs.osm. A custom script is just one more module that needs to be loaded. Dromed lets you load as many script modules as you want.

Type the Dromed command: script_load and the name of the script module you want to load. The .osm extension isn’t necessary. When Dromed needs a script, it will search each module beginning with the most recently loaded. You can print the list of loaded modules to the monolog with the command script_dump_files.


Scripts are attached to an object with the S→Scripts property. You can put the names of four scripts in each property, but Dromed will combine all the Scripts properties from all the archetypes of the object. This is different than other propertes where each object will override the properties that come before it. When you need to override an inherited script property, you set the Don’t Inherit flag on the `Scripts`` property.

Scripts also have their own inheritance. There are base scripts that can provide common features. The scripts that inherit from the base script will have similar behavior. This inheritance is built-in to the scripts and doesn’t require you to do anything in Dromed. You only need to enter the name of the derived script, and in fact most base scripts are not meant to be used directly at all. The inheritance described in this manual refers to this, not the object hierarchy.

public_scripts/install.txt · Last modified: 2010/11/22 19:06 (external edit)