Add a Map
A map is listed in four places. If one is missing, the map is hidden, or it loads as a black screen.
| # | File | Side | What it holds |
|---|---|---|---|
| 1 | config\sp2_mode_select.ini |
Server (ls_gamesvr\config\) |
Which maps each mode and Plaza can pick ([modeN], subN_*) |
| 2 | config\sp2_mode_select.ini |
Client | The map list the player sees ([MapListN]) |
| 3 | config\mode\<ModeFolder>\sp2_<name>_mode<sub>_map<n>.ini |
Client | Settings of the map (mesh, mini map, shadow) |
| 4 | resource\model\staticmodel\<mesh>.txt and its textures |
Client | The 3D model |
Only the first two files are lists. Files 3 and 4 are the map itself. The client paths were checked in the unpacked 2021 client. For 2014 and 2019 the same files sit inside rs.iop and map.iop, which were not opened for this page, so the same layout there is not confirmed yet. Edit packs with the pack tutorials and edit an INI table.
How the numbers connect
Section titled “How the numbers connect”- The server file has one
[modeN]section per mode.Nis the mode index. The client file says the same in its header: theModeIndexnumber is the number of[modeN]in the server file. Plaza is mode index 7, Prisoner is 2. - Inside
[modeN],sub1,sub2and so on are map groups (a “sub type”). Each hassubN_title,subN_type,subN_map_cntandsubN_map1,subN_map2… subN_typeis the key. On the client it is themapK_indexin[MapListN], and it is part of the map file name (..._mode<type>_map<n>.ini). The positionNdoes not matter: in the 2021 Plaza,sub18_type = 19, and the client hasmap19_index = 19andsp2_training_mode19_map1.ini.- The server code is
ModeSelectManager.cpp(LoadModeInfo). The client code isioModeSelectInfo.cpp([MapInfo] max_list, then[MapListN] max_map) andioLoadingRender.cpp(GetModeMapINIFileName).
Add a map to a mode
Section titled “Add a map to a mode”Example: a new Prisoner map with sub type 36.
- Put the mesh in the client:
resource\model\staticmodel\mymap.txtand its files. - Make the map file from a copy of an existing one in the same folder. Prisoner is
config\mode\CatchMode\sp2_catch_mode36_map1.ini(the folder per mode type comes from the clientconfig\sp2_mode.ini, keymodeN_path). Set the mesh:
[map]mesh_name = staticmodel/mymap.txtmap_friction = 1500.0fmap_gravity = 3200.0f- Client
sp2_mode_select.ini, in[MapList2](Prisoner): raisemax_mapby one and add:
map37_index = 36map37_title = My mapmap37_order = 37map37_mark_b = 0map37_mark_s = 0max_map in [MapList2] is 36 in the 2021 client (random map plus 35 maps), so the next free slot is 37. The client file also has a [ListResource] section with map_N_title and map_N_image pairs (preview pictures by title). Whether a new title needs an entry there is not confirmed yet.
- Server
sp2_mode_select.ini, in[mode2]: raisesub_cntand add:
sub36_title = My mapsub36_type = 36sub36_map_cnt = 1sub36_map1 = 1- Restart the game server. Put the changed client files into the packs, or into the unpacked client.
Add a map to the Plaza
Section titled “Add a map to the Plaza”The Plaza is mode index 7 on the server. On the client it is [PlazaMenu] (both entries use mode1_map_list = 7) and [MapList7]. The map files are in config\mode\TrainingMode\ and are called sp2_training_mode<type>_map1.ini.
- Make
sp2_training_mode20_map1.inifrom a copy of an existing one (mesh_name,[minimap] image). - Client
[MapList7]: raisemax_map, addmap20_index = 20with a title. - Server
[mode7]: raisesub_cnt, addsub19_type = 20and one map. - The Plaza list itself is
[PlazaList]on the server (mode1_index = 7). Do not add maps there; it only names the mode.
Switch a map off (map the client lacks)
Section titled “Switch a map off (map the client lacks)”If the client has no map file or mesh for a sub type, the server must not offer it. Use subN_active:
sub16_active = 0sub16_title = Guild HQsub16_type = 16ModeSelectManager.cpp reads subN_active (default on). An inactive sub is not removed: the server copies the data of an active sub into its slot and marks the slot inactive, so the numbering stays in line. Do not delete the section and leave sub_cnt as it is.
The client has a switch of its own: mapK_active = 0 inside [MapListN] hides one map from the list (ioModeSelectInfo.cpp).
What the testbeds switched off:
| Testbed | Switched off in sp2_mode_select.ini |
|---|---|
| 2014 | Prisoner sub 35-60, Deathmatch sub 34-60, Plaza sub 18-60, and single subs in modes 5, 8, 13, 15, 25, 26; Map Shuffle Bonus (mode 21, sub 30-32); Factory (mode 22, sub 2-3); Raid sub 2 |
| 2019 | Plaza sub 16; Map Shuffle Bonus (mode 21, sub 30-32); Factory (mode 22, sub 2-3) |
| 2021 | Plaza sub 16 only |
The 2014 testbed had 153 map entries trimmed because its client lacks them (92 of them Plaza). Map Shuffle Bonus and Factory were turned off for 2014 and 2019 for the same reason. The in-game result of that was not tested yet.
The server also needs its own file for some PvE modes: sp2_factory_mode<sub>_map.ini (the testbeds have only sub 1 and 4), sp2_monstersurvival_mode<sub>_map.ini, sp2_firetemple_..., sp2_darkxmas_..., sp2_towerdef_..., sp2_raid_mode<sub>_map.ini (2014: sub 1 and 2; 2019 and 2021: sub 1), sp2_shufflebonus_mode<sub>_map<n>.ini. Factory sub 2 and 3 have no server file, which fits why they are off. A map with no entry here for these modes has not been tested.
Check it
Section titled “Check it”- Compare the lists: every server
subN_typethat is active must exist as amapK_indexin the client[MapListN], and the matchingsp2_..._mode<type>_map<n>.iniand itsmesh_namemust exist in the client. - Start a room in that mode and pick the map. A black screen means the map ini or its mesh is missing or wrong in the client.
- Check the server
MLOGfolder for errors after the restart.
Differences between versions
Section titled “Differences between versions”| Point | 2014 | 2019 | 2021 |
|---|---|---|---|
Plaza subs in [mode7] |
60 (18-60 off) | 18 | 18 |
[SuccessionModeList] (1 vs 1) |
No | Yes | Yes |
| Mode sections | mode1 to mode27 |
up to mode33 |
up to mode33 |
| Client files readable here | Only in packs (not opened) | Only in packs (not opened) | Unpacked |
