Skip to content

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.

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 = 33
mode1_active = 1
mode1_index = 2
mode1_minuser = 1
rand_list_size = 6
rand1_active = 1
rand1_index = 2
  • mode_list_size is the number of modeN_ entries the loader reads. An entry past the size is ignored.
  • modeN_active defaults to on. 0 removes the entry.
  • modeN_index is the mode index (the [modeX] number). modeN_minuser is 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.

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.

  1. In the list for the room type (usually [ShamModeList]), set the entry to 0:
mode4_active = 0
mode4_index = 3
  1. 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.
  2. 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 set mode4_active = 1.
  3. In the client sp2_mode_select.ini, set the same entry under [BattleMenu]:
mode3_active = 0
mode3_index = 3

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

Set subN_active = 0 inside the [modeN] section. The sub stays in the file and in sub_cnt.

[mode21]
sub30_active = 0
sub30_title = Example
sub30_type = 30

The 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)”
  1. Each mode has its own file in config\, for example gangsimode.ini, bossmode.ini, fightmode.ini, arenamode.ini. They are loaded through sp2_mode_ini_load.ini:
[Common]
MaxINI = 36
FileName1 = config/gangsimode.ini
  1. MaxINI must match the number of FileNameN lines. A new mode file is not read until it is listed here.
  2. The client counterpart is config\sp2_mode.ini, which maps each mode type to a folder under config\mode\ (key modeN_path).
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] says mode_list_size = 4 but lists five entries. By the loader code the fifth (index 20) is not read.
  • mode_cnt in [ModeTypeInfo] is not read by ModeSelectManager.cpp. The list sections decide.
  • What mode_safety, mode_broadcast and user_mode do inside [modeN] is not confirmed yet.