MLVL (File Format): Difference between revisions

Jump to navigation Jump to search
→‎Area Dependencies: Updates this section with the results of my research into recreating MP2's dependencies as accurately as possible. I've overwritten the previous note about ANCS per-character dependencies - I'm assuming that it works the same way in MP1, but I haven't confirmed that. I have confirmed the behavior for MP2.
imported>Darkszero
(→‎Area Dependencies: Updates this section with the results of my research into recreating MP2's dependencies as accurately as possible. I've overwritten the previous note about ANCS per-character dependencies - I'm assuming that it works the same way in MP1, but I haven't confirmed that. I have confirmed the behavior for MP2.)
 
Line 509: Line 509:
This is a data chunk appearing in the area definition in Metroid Prime 1 and 2 that lists all assets needed to load the area. It's extremely important that this list be optimized and complete, as all assets listed here will be perpetually kept in memory as long as the area itself is in memory; the list also specifies the order that assets are loaded in, so '''it must be grouped by load order to roughly match the [[PAK (File Format)|PAK]] file for optimized load times'''. Assets that are missing will still be dynamically loaded after the area itself is loaded, but this will cause the game to freeze up until the load is finished. There are a few exceptions that are excluded from this list in the original game files (and should be excluded in custom MLVLs as well to avoid out-of-memory crashes):
This is a data chunk appearing in the area definition in Metroid Prime 1 and 2 that lists all assets needed to load the area. It's extremely important that this list be optimized and complete, as all assets listed here will be perpetually kept in memory as long as the area itself is in memory; the list also specifies the order that assets are loaded in, so '''it must be grouped by load order to roughly match the [[PAK (File Format)|PAK]] file for optimized load times'''. Assets that are missing will still be dynamically loaded after the area itself is loaded, but this will cause the game to freeze up until the load is finished. There are a few exceptions that are excluded from this list in the original game files (and should be excluded in custom MLVLs as well to avoid out-of-memory crashes):


* [[SCAN (File Format)|SCAN]] files and their dependencies are not included in the list in MP1. These are loaded dynamically after the area itself is finished loading, presumably so that scan dependencies are not kept in memory when the scan isn't actually in use. In MP2, SCANs are actually included in the list but their dependencies aren't.
* Some [[AGSC (File Format)|AGSC]] files are not included in MP2. The game has specific DGRP files which include the "global" sound effects for that type of world. Any files inside that DGRP are excluded from the list. These are:
* [[ANCS (File Format)|ANCS]] per-character dependencies for PlayerActor script instances are not included; this allows the game to avoid keeping assets in memory for suits that the player doesn't have. The exception is the Empty Suit character (character index 5 in MP1, and index 3 in MP2), which is a low-memory-overhead character that allows for the list to include all common assets that are stored in the file per-character (such as particle effects).
** Single-player worlds: ''AudioGrp/audio_groups_single_player_DGRP.DGRP''
** Multiplayer worlds: ''AudioGrp/audio_groups_multi_player_DGRP.DGRP''
** Frontend: ''AudioGrp/audio_groups_front_end_DGRP.DGRP''
* [[SCAN (File Format)|SCAN]] files and their dependencies are not included in the list in MP1. These are loaded dynamically after the area itself is finished loading, presumably so that scan dependencies are not kept in memory when the scan isn't actually in use. In MP2, SCANs are actually included in the list but their dependencies aren't. Make sure to update the dependency list inside the SCAN file if you change them - the game may crash when scanning otherwise.
* Script instances with an AnimationParameters property only include the dependencies from their [[ANCS (File Format)|ANCS]] which are used by their character index. This includes:
** Any dependencies in the CharacterSet for that character
** Any [[ANIM (Metroid Prime)|ANIM]]s (and [[EVNT (File Format)|EVNT]]s, for MP1) used by that character's animations
** Any valid [[AGSC (File Format)|AGSC]] dependencies in any animation events used by that character, '''including''' events with a character index of -1.
** Any [[Particle Script|Particle Script]] dependencies in any animation events used by that character, '''not including''' events with a character index of -1.
** Any dependencies of '''all''' [[Meta-Transition|Meta-Transition]]s in the ANCS. '''This includes transitions not used by that character!'''
* The skybox model and its dependencies are not included.
* The skybox model and its dependencies are not included.


Line 546: Line 555:
| ''Dependency Offset Count''
| ''Dependency Offset Count''
| '''Dependency Offset Array'''
| '''Dependency Offset Array'''
| Array of offsets into the dependency array. There is one offset per script layer, with the offset referring to the index of that layer's first dependency. There is a final extra offset that points to area dependencies that are not layer-specific.
| Array of offsets into the dependency array. There is one offset per script layer, with the offset referring to the index of that layer's first dependency. There is a final extra offset that points to area dependencies that are not layer-specific. These include dependencies of the world geometry, as well as the PATH, PTLA, and EGMC dependencies from their respective sections. Note that the area name STRG is not included (at least in MP2).
|}
|}


Line 563: Line 572:
|-
|-
| 0x4
| 0x4
| char
| {{FourCC}}
| 4
| 1
| '''Dependency Asset Type'''
| '''Dependency Asset Type'''
|}
|}
11

edits

Navigation menu