Tutorial: Map merging by LightChaosman - BLCM/BLCMods GitHub Wiki
Alright, time to teach you people about map merging.
what exactly determines what is loaded in a level.
A few things, one of them being the map(s) loaded.
There is always a single main map (a persistent), and numerous secondary maps.
This is all defined in a LevelList. Each DLC has it's own levelList object. These are the following:
GD_Globals.General.LevelList
GD_AlliumPackageDef.AlliumTG_LevelList
GD_AlliumPackageDef.AlliumXmas_LevelList
GD_AsterPackageDef.Aster_LevelList
GD_FlaxPackageDef.Flax_LevelList
GD_IrisPackageDef.LevelList.Iris_LevelList
GD_LobeliaPackageDef.LevelList
GD_OrchidPackageDef.LevelList.Orchid_LevelList
GD_NasturtiumPackageDef.NasturtiumVday_LevelList
GD_NasturtiumPackageDef.NasturtiumEaster_LevelList
GD_SagePackageDef.LevelList.Sage_LevelList
The part you're looking for is in the LevelList
field of the LevelList
(makes sense, right).
Each entry in the LevelListField
has an entry called SecondaryMaps
.
There all the additional stuff for the map is loaded.
The main map will always end in _P
, while secondary maps usually end with _Combat
or other things.
if you want to make a mod that uses something from map X in all other maps, you need to figure out which map it is in.
For instance, terra is in his persistent main map (the _P
) one, while some unique enemies are either in _Dynamic
, _Combat
, _Mission
or other kinds of secondary map.
Finding out where your stuff is stored is a trail and error process.
Once you know this, you need to edit all 72 or so entries among the LevelList
objects I listed above. (So it's annoying if you do not automate it).
This will inevitably increase your load times, and will cause issues with textures and sounds, since some of the stuff will get overwritten, and the game will be like, "Yo, bruh, wtf".
Also, as original with hotfixes, since you're basically modifying a huge ass array to facility your mod, multiple mods with map merging will conflict, and break each other, unless the map merging aspects are merged, which again, is annoying.
Don't load the same map data twice, game doesnt like that.
Don't load anything from the Coloseum map, it will screw your game.
example
The following is the original LevelList
for the Easter DLC:
LevelList(0)=(
PersistentMap = "Easter_P",
SecondaryMaps = ("Easter_Audio","Easter_Boss","Easter_Combat","Easter_Dynamic","Easter_FX","Easter_Lights","Easter_Mission","Easter_Mission_1","Easter_Mission_2","Easter_Mission_Side","Easter_Skybox"),
ConnectedPersistents = ,
LevelName = "Wam Bam Island",
GameReleaseDef = GameReleaseDefinition'GD_NasturtiumPackageDef.GameRelease_Nasturtium',
DiscoveryAchievements =
)
If you want terra to be able to spawn during the crawmerax fight, you would need to add ThresherRaid_P
to the secondary maps field there, so it would become
LevelList(0)=(
PersistentMap = "Easter_P",
SecondaryMaps =
("Easter_Audio","Easter_Boss","Easter_Combat","Easter_Dynamic","Easter_FX","Easter_Lights","Easter_Mission","Easter_Mission_1","Easter_Mission_2","Easter_Mission_Side","Easter_Skybox","ThresherRaid_P"),
ConnectedPersistents = ,
LevelName = "Wam Bam Island",
GameReleaseDef = GameReleaseDefinition'GD_NasturtiumPackageDef.GameRelease_Nasturtium',
DiscoveryAchievements =
)
Notice that if you're loading in _P
levels, that it may not equal the _P
stored under PersistentMap.
In this example there is just a single map, since its a single map dlc. In other LevelList (for the main game or the story DLC), you need to update the SecondaryMaps field of every entry in the LevelList field of the LevelList object.
Editing the LevelList
is a regular set command.
Everything else you do with non-native (or native) data is done with Level hotfixes.
or you can be lazy and use this