Skip to content

Guilds - Settings, Guild HQ and Guild Marks

A guild has members, a point score that decides its grade, an optional HQ room, and a mark (emblem). This guide shows the files behind each part and what to change.

All file names come from the code that loads them. Anything marked not confirmed yet was not verified in code or config.

Part File Runs on Loaded by
Grades, member limit sp2_guild.ini main server (ls_mainsvr\config\) GuildNodeManager::InitNodeINI
Create and mark prices config.ini, section [guild] game server Help::InitHelpConstant (EtcHelpFunc.cpp)
Daily and rank rewards sp2_guild_reward.ini game server GuildRewardManager::LoadINI
HQ start layout sp2_guild_room_block.ini game server GuildRoomsBlockManager
HQ room mode headquartersmode.ini game server game mode loader
Client prices, marks, upload address sp2_guild.ini client config\ ioGuildInfo.cpp, ioGuildMarkMgr.cpp, ioFileWriteClient.cpp
Mark upload folders FileWriteServerInfo.ini file write server ls_filewritesvr

The server and the client both have a file named sp2_guild.ini. They are different files. Do not copy one over the other.

Open the main server file sp2_guild.ini.

[info]
UpdateTime = 10000
DefaultGuildPoint = 1000
[level]
DefaultGuildMaxEntry = 32
LevelCheckReverse = 0
MaxLevel = 7
6_Level = 1
6_Level_Per = 100.00f
6_Level_MaxUser = 32
6_Level_Bonus = 0.05f
  1. DefaultGuildPoint is the point score a guild needs to be ranked at all. Guilds below it get the default grade (the entry whose level number is 0, the last one).
  2. Ranked guilds are sorted by points. A guild gets the first grade whose N_Level_Per is at or above its rank in percent (CheckGuildLevel). The shipped table: 1_Level = 6 (grade S) up to the top 2 percent, grade A up to 8, B up to 20, C up to 40, D up to 70, E up to 100.
  3. N_Level_MaxUser is the member limit of that grade. N_Level_Bonus is the bonus rate of that grade (read by GetGuildBonus). What the bonus applies to in game: not confirmed yet.
  4. MaxLevel is how many N_Level blocks are read. UpdateTime (milliseconds) is how often the ranking is recalculated.

The client has its own member limits for the tooltips: max_entry_0 to max_entry_6 in the client sp2_guild.ini, one per grade (0 = default, 6 = S). Keep them equal to the server.

Differences:

  • 2014: the member limit falls by grade: 32, 28, 24, 20, 16, 12, 8 (1_Level_MaxUser to 7_Level_MaxUser).
  • 2019 and 2021: every grade is 32. The 2021 client also has 32 everywhere.
  1. In the game server config.ini:

    [guild]
    CreatePeso = 50000
    MarkChangePeso = 50000

    All three sources ship 50000 for both. The code default is 25000. For a mark change, the game server passes the player’s pesos and this price to the database agent (OnInsertGuildMarkChangeKeyValue in User.cpp, Help::GetChangeGuildMarkPeso). Where CreatePeso is charged: not confirmed yet.

  2. In the client sp2_guild.ini set the same numbers under [info]: guild_create_peso, guild_mark_change_peso, guild_create_limit_level (minimum level to create a guild), guild_kick_out_peso, guild_leave_peso. The client shows these numbers; if they differ from the server, the shown price is wrong. guild_create_limit_level and the kick and leave prices are client-side keys. A server check for them: not confirmed yet.

  3. In sp2_guild_reward.ini set the daily rewards:

    [common]
    renewal_hour = 5
    [rank_reward]
    reward1_rank = 2
    reward1_values = 3.1003674.1
    reward1_ment = 978
    reward1_period = 14
    [attendance_reward]
    reward1_attendance = 5
    reward1_values = 3.1000043.1

    values is type.value1.value2. Type 3 is an etc item: value1 is the item code and value2 the amount (type list in regular_tournament_reward_table.ini). rank is the guild grade (0 = F, 6 = S). attendance is “up to this many members attended”. ment is a message id in the client text. period is the item period (shipped: 14). renewal_hour is the hour of the day the reward day changes.

  4. The attendance and rank rewards come from game_guild_attend_* and game_guild_reward_set_*. In 2014 the testbed gets them from 10_LS14_2021_features.sql.

The HQ is a room only the guild can enter. The guild master activates it by using the etc item 3007545 (EIT_ETC_CREATE_GUILD_HQ, ioEtcItemCreateGuildHQCreate).

  1. In sp2_etcitem_info.ini check the server block for type = 3007545. Shipped: [etcitem2879], 1000000 pesos or 19800 gold. The client has a block with the same type.
  2. The server refuses the item (STPK_GUILD_ROOM_ACTIVE) if the user has no guild, is not the master, or the HQ is already active. On success it builds the default layout and uses up the item.
  3. The default layout is [default_construct] in sp2_guild_room_block.ini: item<n>, XZ<n>, Y<n>, direction<n> per block. limited_install_cnt in [common] is the maximum number of blocks a guild may place.
  4. The room rules (round time, player limit, score) are in headquartersmode.ini. Shipped const_max_player = 32 and round_time = 300000 (milliseconds).
  5. HQ data is stored with game_guildHQ_get_data, game_guildHQ_set_status, game_guildHQ_set_fit, game_guildHQ_set_add, game_guildHQ_set_default_add, game_guildHQ_ver_get_info (query ids 199 to 204 in ls_query.ini).

Differences:

  • The HQ code and the config files exist in all three sources. game_guildHQ_ver_set_status is in the 2019 and 2021 scripts but not in the 2014 testbed script.
  • In 2014 the HQ procedures are empty stubs in 05_LS14_LosaGame_stubs.sql until 10_LS14_2021_features.sql replaces them. Whether the HQ works in the 2014 client: not confirmed yet.
  • The block items (code 2000001 and others) need models and entries in the client. Their setup is not confirmed yet.

There are two kinds of mark.

Kind Where it comes from Client keys
Default marks Pictures inside the client max_mark, def_<n>_small, def_<n>_big, big_none under [resource]
Custom marks The player uploads a picture. The server stores it. Other players download it load_url, large_custom_count, small_custom_count under [custom]

To make custom marks work:

  1. Run the file write server (ls_filewritesvr). In its FileWriteServerInfo.ini, [WriteFile] has an entry with Ext1 = jpg and Path1 (the final folder, shipped upload\guildmark), TempPath1 and ErrorPath1. The server checks the file extension against .jpg (ls_filewritesvr\NodeInfo\User.cpp).

  2. In the client sp2_guild.ini, [custom], point the upload address to this server:

    [custom]
    load_url = http://127.0.0.1/guildmark/
    file_server_ip = 127.0.0.1
    file_server_port = <port of ls_filewritesvr>

    The 2021 package sets both addresses to 127.0.0.1, and the shipped port is the original one. Set file_server_port to the port in [NETWORK] of FileWriteServerInfo.ini. For a real server use your own public address and port.

  3. Serve the upload folder over HTTP at load_url. The client downloads <guild index>_<mark index>_l.jpg (large) and <guild index>_<mark index>_s.jpg (small) into a Guild\ folder next to the game (ioGuildMarkMgr.cpp, URLDownloadToFile). The 2014 and 2019 client sources contain the same loader (same keys and _l.jpg pattern).

  4. Keep the texture slots: large_custom_count (shipped 14) and small_custom_count (shipped 100) need matching images Guildmark_Large#CL001 and Guildmark_Small#CS001 in the client UI image sets.

  5. Mark changes are saved with game_guild_mark_save and logged with game_guild_mark_log_add, _get_self_idx and _delete (query ids 117 to 120).

Not confirmed yet: the file name the file write server gives the uploaded picture, and whether it matches the names the client downloads. Test with a real upload before you rely on it.

  1. sp2_guild.ini is read when the main server starts, so restart the main server. sp2_guild_reward.ini and the room files are read when the game server starts. Live reload for these files was not checked.
  2. Create a guild, check the member limit and prices, then change the mark and see if the picture appears for a second account.
  • Where CreatePeso is charged, and the effect of N_Level_Bonus.
  • The pack contents of the 2014 and 2019 clients.
  • Upload file naming and a full upload test.
  • HQ block items in the client.