Skip to content

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.

  • The server file has one [modeN] section per mode. N is the mode index. The client file says the same in its header: the ModeIndex number is the number of [modeN] in the server file. Plaza is mode index 7, Prisoner is 2.
  • Inside [modeN], sub1, sub2 and so on are map groups (a “sub type”). Each has subN_title, subN_type, subN_map_cnt and subN_map1, subN_map2…
  • subN_type is the key. On the client it is the mapK_index in [MapListN], and it is part of the map file name (..._mode<type>_map<n>.ini). The position N does not matter: in the 2021 Plaza, sub18_type = 19, and the client has map19_index = 19 and sp2_training_mode19_map1.ini.
  • The server code is ModeSelectManager.cpp (LoadModeInfo). The client code is ioModeSelectInfo.cpp ([MapInfo] max_list, then [MapListN] max_map) and ioLoadingRender.cpp (GetModeMapINIFileName).

Example: a new Prisoner map with sub type 36.

  1. Put the mesh in the client: resource\model\staticmodel\mymap.txt and its files.
  2. 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 client config\sp2_mode.ini, key modeN_path). Set the mesh:
[map]
mesh_name = staticmodel/mymap.txt
map_friction = 1500.0f
map_gravity = 3200.0f
  1. Client sp2_mode_select.ini, in [MapList2] (Prisoner): raise max_map by one and add:
map37_index = 36
map37_title = My map
map37_order = 37
map37_mark_b = 0
map37_mark_s = 0

max_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.

  1. Server sp2_mode_select.ini, in [mode2]: raise sub_cnt and add:
sub36_title = My map
sub36_type = 36
sub36_map_cnt = 1
sub36_map1 = 1
  1. Restart the game server. Put the changed client files into the packs, or into the unpacked client.

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.

  1. Make sp2_training_mode20_map1.ini from a copy of an existing one (mesh_name, [minimap] image).
  2. Client [MapList7]: raise max_map, add map20_index = 20 with a title.
  3. Server [mode7]: raise sub_cnt, add sub19_type = 20 and one map.
  4. The Plaza list itself is [PlazaList] on the server (mode1_index = 7). Do not add maps there; it only names the mode.

If the client has no map file or mesh for a sub type, the server must not offer it. Use subN_active:

sub16_active = 0
sub16_title = Guild HQ
sub16_type = 16

ModeSelectManager.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.

  1. Compare the lists: every server subN_type that is active must exist as a mapK_index in the client [MapListN], and the matching sp2_..._mode<type>_map<n>.ini and its mesh_name must exist in the client.
  2. 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.
  3. Check the server MLOG folder for errors after the restart.
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