Game Modes and Sub Types
Everything about “what the server offers” is in one server file: ls_gamesvr\config\sp2_mode_select.ini. The client has its own file with the same name. They must agree.
Read this page with Add a Map. Edit packs with the pack tutorials and edit an INI table.
The three levels
Section titled “The three levels”| Level | Where | Example |
|---|---|---|
| Mode | [modeN] section. N is the mode index |
[mode2] is Prisoner |
| Sub type | subN_* keys inside a mode |
sub1_type = 1 is the first map group |
| Map | subN_mapK keys |
sub1_map1 = 1 |
Which modes a room type may use is decided by the list sections at the end of the file. A mode that is not in the list for a room type cannot be picked there, even if its [modeN] section exists.
| List section | Room type |
|---|---|
[ShamModeList] |
Normal battle rooms (and shuffle rooms) |
[SafetyModeList] |
Newbie battle |
[BroadcastModeList] |
Broadcast battle |
[LadderTeamModeList] |
Ladder and faction war |
[SuccessionModeList] |
1 vs 1 (2019 and 2021 only) |
[PlazaList] |
Plaza |
[HeadquartersList] |
Guild headquarters |
[HomeModeList] |
Personal headquarters |
The code is ModeSelectManager.cpp (InitModeInfoList). It picks the list by room style, then reads:
[ShamModeList]mode_list_size = 33mode1_active = 1mode1_index = 2mode1_minuser = 1
rand_list_size = 6rand1_active = 1rand1_index = 2mode_list_sizeis the number ofmodeN_entries the loader reads. An entry past the size is ignored.modeN_activedefaults to on.0removes the entry.modeN_indexis the mode index (the[modeX]number).modeN_minuseris the minimum player count.rand*is the list the “random mode” button draws from. A random entry only counts if the mode is also in the normal list.
Mode indexes
Section titled “Mode indexes”The header of the client file gives the names. The server [modeN] numbers are the same.
| Index | Mode | Index | Mode |
|---|---|---|---|
| 1 | Power Stone | 17-19 | Monster dungeons (Deep Forest, Snow Town, Fire Temple) |
| 2 | Prisoner | 20 | Double Crown |
| 3 | Hidden Crown | 21 | Shuffle |
| 4 | Deathmatch | 22 | Secret Factory |
| 5 | Team Deathmatch | 23 | Team Survival AI |
| 6 | Team Deathmatch (beginner) | 24 | Personal headquarters |
| 7 | Plaza | 25 | Pantymon |
| 8 | Boss Raid | 26 | Classic |
| 9 | Broadcast | 27 | Raid |
| 10 | Skeleton Hero | 28 | 1 vs 1 (2019 and 2021) |
| 11 | Soccer | 30 | Flag (2019 and 2021) |
| 12 | Ladder | 31 | Arena (2019 and 2021) |
| 13 | Gangsi Survival | 32 | Battle (2019 and 2021) |
| 14 | Headquarters | 33 | Farming (2019 and 2021) |
| 15 | Dwarf | 16 | Fight Club (server comment) or Champion (client comment) |
Index 29 does not exist in any version.
Turn a mode off
Section titled “Turn a mode off”- In the list for the room type (usually
[ShamModeList]), set the entry to0:
mode4_active = 0mode4_index = 3- Remove it from the random list too (
randN_active = 0), or leave the random entry: it is ignored when the mode is not in the normal list. - In 2019 and 2021, Hidden Crown is switched off a second way: its section is named
[-mode3]. The loader looks for[mode3], so the renamed section is never found. To turn it back on, rename it to[mode3]and setmode4_active = 1. - In the client
sp2_mode_select.ini, set the same entry under[BattleMenu]:
mode3_active = 0mode3_index = 3The client loader (ioModeSelectInfo.cpp) reads modeN_active for the battle menu and the quick start menu. In the 2021 client file, Hidden Crown is off this way.
5. Restart the game server. A client that still lists a mode the server turned off was not tested yet.
Turn a sub type off
Section titled “Turn a sub type off”Set subN_active = 0 inside the [modeN] section. The sub stays in the file and in sub_cnt.
[mode21]sub30_active = 0sub30_title = Examplesub30_type = 30The server copies an active sub into the slot of an inactive one and marks it inactive, so the numbers stay in line. Do not delete a subN block and keep sub_cnt the same.
Used for this when the client lacks the map: see Add a Map. Known cases:
- 2014 and 2019: Map Shuffle Bonus (mode 21, sub 30-32) and Factory (mode 22, sub 2-3) are off because the client lacks those maps. The in-game result was not tested yet.
- 2014: many subs are off in Prisoner, Deathmatch and Plaza (sub 18 to 60).
- 2021: only Plaza sub 16 is off in the shipped testbed file.
Mode settings (round time, score, rewards)
Section titled “Mode settings (round time, score, rewards)”- Each mode has its own file in
config\, for examplegangsimode.ini,bossmode.ini,fightmode.ini,arenamode.ini. They are loaded throughsp2_mode_ini_load.ini:
[Common]MaxINI = 36FileName1 = config/gangsimode.iniMaxINImust match the number ofFileNameNlines. A new mode file is not read until it is listed here.- The client counterpart is
config\sp2_mode.ini, which maps each mode type to a folder underconfig\mode\(keymodeN_path).
Differences between versions
Section titled “Differences between versions”| Point | 2014 | 2019 | 2021 |
|---|---|---|---|
[modeN] sections |
mode1 to mode27 |
to mode33 |
to mode33 |
mode_cnt in [ModeTypeInfo] |
27 | 33 | 33 |
[ShamModeList] size |
21, all on | 33, mode index 3 off | 33, mode index 3 off |
| Hidden Crown section | [mode3] |
[-mode3] |
[-mode3] |
[SuccessionModeList] |
No | Yes | Yes |
MaxINI in sp2_mode_ini_load.ini |
35 | 36 | 36 |
In 2019 and 2021 the [ShamModeList] entries 22 to 29 point at index 27 with active = 0. They look like filler. Their purpose is not confirmed yet.
Things that look wrong but are in the shipped files
Section titled “Things that look wrong but are in the shipped files”[LadderTeamModeList]saysmode_list_size = 4but lists five entries. By the loader code the fifth (index 20) is not read.mode_cntin[ModeTypeInfo]is not read byModeSelectManager.cpp. The list sections decide.- What
mode_safety,mode_broadcastanduser_modedo inside[modeN]is not confirmed yet.
