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.
Where the settings are
Section titled “Where the settings are”| 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.
Step 1: Guild size and grade
Section titled “Step 1: Guild size and grade”Open the main server file sp2_guild.ini.
[info]UpdateTime = 10000DefaultGuildPoint = 1000
[level]DefaultGuildMaxEntry = 32LevelCheckReverse = 0MaxLevel = 7
6_Level = 16_Level_Per = 100.00f6_Level_MaxUser = 326_Level_Bonus = 0.05fDefaultGuildPointis the point score a guild needs to be ranked at all. Guilds below it get the default grade (the entry whose level number is0, the last one).- Ranked guilds are sorted by points. A guild gets the first grade whose
N_Level_Peris 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. N_Level_MaxUseris the member limit of that grade.N_Level_Bonusis the bonus rate of that grade (read byGetGuildBonus). What the bonus applies to in game: not confirmed yet.MaxLevelis how manyN_Levelblocks 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_MaxUserto7_Level_MaxUser). - 2019 and 2021: every grade is 32. The 2021 client also has 32 everywhere.
Step 2: Prices and rewards
Section titled “Step 2: Prices and rewards”-
In the game server
config.ini:[guild]CreatePeso = 50000MarkChangePeso = 50000All 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 (
OnInsertGuildMarkChangeKeyValueinUser.cpp,Help::GetChangeGuildMarkPeso). WhereCreatePesois charged: not confirmed yet. -
In the client
sp2_guild.iniset 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_leveland the kick and leave prices are client-side keys. A server check for them: not confirmed yet. -
In
sp2_guild_reward.iniset the daily rewards:[common]renewal_hour = 5[rank_reward]reward1_rank = 2reward1_values = 3.1003674.1reward1_ment = 978reward1_period = 14[attendance_reward]reward1_attendance = 5reward1_values = 3.1000043.1valuesistype.value1.value2. Type 3 is an etc item: value1 is the item code and value2 the amount (type list inregular_tournament_reward_table.ini).rankis the guild grade (0 = F, 6 = S).attendanceis “up to this many members attended”.mentis a message id in the client text.periodis the item period (shipped: 14).renewal_houris the hour of the day the reward day changes. -
The attendance and rank rewards come from
game_guild_attend_*andgame_guild_reward_set_*. In 2014 the testbed gets them from10_LS14_2021_features.sql.
Step 3: Guild HQ
Section titled “Step 3: Guild HQ”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).
- In
sp2_etcitem_info.inicheck the server block fortype = 3007545. Shipped:[etcitem2879], 1000000 pesos or 19800 gold. The client has a block with the same type. - 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. - The default layout is
[default_construct]insp2_guild_room_block.ini:item<n>,XZ<n>,Y<n>,direction<n>per block.limited_install_cntin[common]is the maximum number of blocks a guild may place. - The room rules (round time, player limit, score) are in
headquartersmode.ini. Shippedconst_max_player = 32andround_time = 300000(milliseconds). - 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 inls_query.ini).
Differences:
- The HQ code and the config files exist in all three sources.
game_guildHQ_ver_set_statusis 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.sqluntil10_LS14_2021_features.sqlreplaces 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.
Step 4: Guild marks
Section titled “Step 4: Guild marks”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:
-
Run the file write server (
ls_filewritesvr). In itsFileWriteServerInfo.ini,[WriteFile]has an entry withExt1 = jpgandPath1(the final folder, shippedupload\guildmark),TempPath1andErrorPath1. The server checks the file extension against.jpg(ls_filewritesvr\NodeInfo\User.cpp). -
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.1file_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_portto the port in[NETWORK]ofFileWriteServerInfo.ini. For a real server use your own public address and port. -
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 aGuild\folder next to the game (ioGuildMarkMgr.cpp,URLDownloadToFile). The 2014 and 2019 client sources contain the same loader (same keys and_l.jpgpattern). -
Keep the texture slots:
large_custom_count(shipped 14) andsmall_custom_count(shipped 100) need matching imagesGuildmark_Large#CL001andGuildmark_Small#CS001in the client UI image sets. -
Mark changes are saved with
game_guild_mark_saveand logged withgame_guild_mark_log_add,_get_self_idxand_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.
Reload and check
Section titled “Reload and check”sp2_guild.iniis read when the main server starts, so restart the main server.sp2_guild_reward.iniand the room files are read when the game server starts. Live reload for these files was not checked.- Create a guild, check the member limit and prices, then change the mark and see if the picture appears for a second account.
Not confirmed yet
Section titled “Not confirmed yet”- Where
CreatePesois charged, and the effect ofN_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.
