Scriptable Layers (File Format)

From Retro Modding Wiki
Revision as of 16:15, 20 July 2015 by Aruki (Talk | contribs) (Created page with "'''Scriptable layers''' are a data section found in the MREA format, denoted by the fourCC identifier <code>SCLY</code>. It contains script object insta...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Scriptable layers are a data section found in the MREA format, denoted by the fourCC identifier SCLY. It contains script object instances which are used to set the object layout of each room. Rooms can contain multiple layers, with each being able to be toggled on and off independently, allowing for the layout of a room to be updated after significant ingame events (this is done using a SpecialFunction in MP1 and a ScriptLayerController in all the games afterwards). Each instance has a large number of parameters that can be toggled to customize the appearance and behavior of that instance, and they're capable of sending messages to other objects, allowing for fairly complex interaction between objects to be scripted.

There are two versions of this format; the first was used in Metroid Prime, and the second was introduced in Metroid Prime 2 and stayed in use up through Donkey Kong Country Returns. The first version contains all property data in a single binary blob, while the second version includes more metadata by listing a property ID and a size for each individual property. The second version also uses fourCC identifiers for the object ID and for state/message names, while these are represented with simple integers in the first version.

For more info, check the page for the specific version of the format you're interested in: