Scriptable Layers (Metroid Prime 2): Difference between revisions
Jump to navigation
Jump to search
m
no edit summary
>Aruki (Created page with "''This article is for the scriptable layers format from Metroid Prime 2, 3, and Donkey Kong Country Returns. See Scriptable Layers (File Format) for other revisions of thi...") |
>Aruki mNo edit summary |
||
Line 1: | Line 1: | ||
''This article is for the scriptable layers format from Metroid Prime 2, 3, and Donkey Kong Country Returns. See [[Scriptable Layers (File Format)]] for other revisions of this format.'' | ''This article is for the scriptable layers format from Metroid Prime 2, 3, and Donkey Kong Country Returns. See [[Scriptable Layers (File Format)]] for other revisions of this format.'' | ||
'''Scriptable layers''' are a data section found in the MREA format, denoted by the fourCC identifier <code>SCLY</code>. 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, which is done using a | '''Scriptable layers''' are a data section found in the MREA format, denoted by the fourCC identifier <code>SCLY</code>. 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, which is done using a ScriptLayerController object. 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 interactions between objects to be scripted. | ||
In Echoes, the SCLY format was overhauled. The most notable change is that all properties now have a 32-bit ID and a size value listed, allowing the game to match properties in the file with data members by ID rather than by their position in the file; this was presumably done to avoid breaking cooked data when objects were modified during development, since this change meant the file could still be read correctly if properties were added or removed from an object and the script data hadn't been recooked. Another change is that there's now a separate layer for generated objects (ie objects that are spawned using a Generator or a PickupGenerator), which uses the fourCC <code>SCGN</code>. Aside from minor changes in the header, the <code>SCGN</code> layer is identical to <code>SCLY</code> layers. | In Echoes, the SCLY format was overhauled. The most notable change is that all properties now have a 32-bit ID and a size value listed, allowing the game to match properties in the file with data members by ID rather than by their position in the file; this was presumably done to avoid breaking cooked data when objects were modified during development, since this change meant the file could still be read correctly if properties were added or removed from an object and the script data hadn't been recooked. Another change is that there's now a separate layer for generated objects (ie objects that are spawned using a Generator or a PickupGenerator), which uses the fourCC <code>SCGN</code>. Aside from minor changes in the header, the <code>SCGN</code> layer is identical to <code>SCLY</code> layers. |