Better Map Replacement System
The gamemapwadfolder
variable is used to determine what folder in MAPS/
for pk3 files is preferred for loading the current map and supports read and write with Lua. By default, the gamemapwadfolder
variable is set to \0
, which means no folder is preferred and the last file with a map that meets the criteria of gamemapwadname
. The gamemapwadname
is used to determine which file is going to be used for the gamemap, which is set to '\0' by default as well which means that the last wad file that has a map in the mapslot for the current gamemap is going to be used, while if the gamemapwadname
is set to zones.pk3
then the vanilla zones will be used even if files are added that have maps that replace those maps. If no maps are found in the file set by gamemapwadname
or the file set by gamemapwadname
doesn't exist when gamemapwadname
is not equal to '\0', then the old behavior of replacing maps that is used in the latest vanilla SRB2 version will be used instead. There is also now support for a special SOC lump called MODCFG
, which will only support the maincfg and map headers and will be loaded when necessary. It will be recommended to use this special lump now for level packs once this merge request gets merged and SRB2 gets updated. Folders mark the game as modified no matter what order the files are in, because folders are for development-purposes only.
Test files: srb2win_mrstest.exe Mrstest_script.lua Mrstest_mapset1.pk3 Mrstest_mapset2.pk3
New Recommended Load Order for Files After Mainfiles:
- Characters, Lua scripts, level packs w/o
MODCFG
lump that setsGameData
, and other game-modifying type of files - Level pack 1 with
MODCFG
lump that setsGameData
- (Optional) Music file(s) for level pack 1
- Level pack 2 with
MODCFG
lump that setsGameData
- (Optional) Music files(s) for level pack 2
- etc.