Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
HEModdingWiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Resources/Master Level
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Infobox Resource |type=[[Resources#Levels|Levels]] |extension=.mlevel |games=* [[Sonic Frontiers|Sonic Frontiers]] * [[Shadow Generations|Shadow Generations]] |tools=* [[Tools/Restoration Issue Pocketknife|Restoration Issue Pocketknife]] * [[Tools/KnuxTools|KnuxTools]] |status=Done |container=BINA |name=Master Level }} Starting with Sonic Frontiers, HE2 includes the Levels system to automatically and dynamically load resources when they are needed. Master Level is a resource type that contains information on which resources should be loaded to load a level, and also describes the dependencies between different levels. Master Level is stored in a Binary File container. == Structure == <syntaxhighlight lang="cpp"> struct DependencyData { const char* name; unsigned long long unk1; }; struct ResourceData { const char* path; const char* resourceType; unsigned long long unk1; }; struct LevelData { const char* name; int resourceCount; int dependencyCount; ResourceData** resources; DependencyData** dependencies; bool isPublic; bool hasResources; }; struct MasterLevelData { unsigned int magic; unsigned int version; int levelCount; LevelData** levels; }; </syntaxhighlight> === LevelData === The structure of the Master Level resource is fairly simple. At the top level, it simply consists of a list of level definitions. Each of these definitions contains the following data within them: * The level name. This name is a unique identifier that's used whenever the game refers to the level, e.g. when it submits a "LoadLevel" request. * A list of resources that must be loaded to load this level. * A list of dependency levels, which will automatically be loaded when this level is loaded. * A boolean <code>isPublic</code> flag. If this flag is true, the level will be registered as a loadable level. If it is not, then the level can only be loaded as a dependency of other levels. * A boolean <code>hasResources</code> flag. If this flag is false, the game will not try to load the resources associated with this level. It is unclear what the purpose of this flag is. === DependencyData === Every dependency of a level is described by a <code>DependencyData</code> structure. It contains a pointer to the name of the dependency level. It also contains a second 64 bit zero value <code>unk1</code>. It is possible that the whole of <code>name</code> + <code>unk1</code> is actually a <code>csl::ut::VariableString</code> object. === ResourceData === Every resource associated with a level is described by a <code>ResourceData</code> structure. This structure contains the following: * The path to the resource. This is a standard ResourceManager URI. * The resource type. This is an engine internal resource type name like <code>ResReflection</code>. If this property is a null pointer, the resource type is deduced from the filename extension. * A 64 bit zero value property <code>unk1</code>. It is possible that the whole of <code>resourceType</code> + <code>unk1</code> is actually a <code>csl::ut::VariableString</code> object.
Summary:
Please note that all contributions to HEModdingWiki are considered to be released under the Creative Commons Attribution-ShareAlike (see
HEModdingWiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Infobox
(
edit
)
Template:Infobox Resource
(
edit
)
Template:Template other
(
edit
)
Module:Infobox
(
edit
)
Module:Infobox/styles.css
(
edit
)