Gear Upgrade and Compound Rates
This guide shows how to change the success rates, costs and limits of gear upgrades. The game has four separate systems that all raise a gear level, and each one reads its own table. Read it with Add, Price and Remove Shop Items (gear boxes set the starting level) and Market and Player Trading.
All file names below come from the source code that loads them. Anything marked not confirmed yet was not verified in code or config.
The four systems
Section titled “The four systems”| System | What the player does | Server file (ls_gamesvr\config\) |
Client file (config\) |
Server code |
|---|---|---|---|---|
| Compound | Merge a second gear into a target gear | sp2_item_compound_info.ini, sections [common_info], [compound_rateN] |
sp2_item_compound_info.ini |
ioItemCompoundManager::CheckCompoundSuccess |
| Multiple compound | Merge three gears into one random new gear | sp2_item_compound_info.ini, sections [multiple_compound], [multiple_compound_infoN] |
same file | CheckMultipleCompound |
| Material upgrade | Spend pieces or peso on one gear | sp2_item_material_compound_info.ini |
sp2_item_compound_material_info.ini |
CheckMaterialCompound, CheckReinforce |
| Power-up | Raise a hero or gear grade with a material | sp2_powerup_manager.ini, sp2_powerup_rare_manager.ini |
same names, plus sp2_powerup_item.ini, sp2_powerup_extraitem.ini |
ioPowerUpManager |
Note the file names of the material table: the server file is sp2_item_material_compound_info.ini, the client file is sp2_item_compound_material_info.ini. They are not the same name, and they hold different keys.
The server owns the roll. The client files give the windows their numbers (cost, shown rate, limits). If the two disagree, the window shows one number and the server does another.
Change the compound rates
Section titled “Change the compound rates”The compound merges a victim gear into a target gear. The victim is deleted before the roll, and a miss still costs it.
-
Open
sp2_item_compound_info.inion the server. Find[compound_rate1]. Itscompound_item_codeis the etc item that starts this compound (the etc item type, for example1000023, classioEtcItemExtraItemCompound).[compound_rate2]uses1000096(classioEtcItemExtraItemCompound2). -
Set the step sizes of that block:
[compound_rate1]compound_item_code = 1000023small_up_reinforce = 1big_up_reinforce = 2down_reinforce = 1compound2_level = 1compound2_same_rate = 40compound2_same_special_rate = 20compound2_other_rate = 40compound2_other_special_rate = 20 -
Each
compoundN_levelrow is the current level of the target. The loader readsNfrom 1 tomax_info_cnt(25 in the shipped file). A level with no row has rate 0 and the server refuses the compound (return code 5 inCheckCompoundSuccess, the victim is kept). -
The roll is a number from 0 to 99. If it is below
same_rate(orother_rate), the level goes up bysmall_up_reinforce. If it is below rate plusspecial_rate, it goes up bybig_up_reinforce. Otherwise it drops bydown_reinforce, never below 0. So the numbers are percent. Keep rate plus special rate at or below 100. In the shipped file at level 1 this gives 40 percent +1, 20 percent +2, 40 percent -1. -
“Same” means the victim has the same item code as the target. “Other” is any other gear of the same part. The part is the item code divided by 100000, and a different part is refused (return code 4).
-
Set
Change = 1in[common_info]so the server reloads the block. The line that would reset it to 0 is commented out in the code, so while it stays 1 the file is reloaded at every check. How often the check runs: not confirmed yet.
What the server does not read from [common_info]: need_level, enable_same_part, enable_same_code, max_reinforce and all_alarm_level. Only the client reads them (LSClient\ioItemCompoundManager.cpp, max_reinforce default 25). The server refuses a target at or above the max_reinforce of the material file (30), not the 25 in this file.
Change the three-gear compound
Section titled “Change the three-gear compound”Section [multiple_compound] lists [multiple_compound_infoN] blocks. Each block is started by one etc item.
| Key | Meaning |
|---|---|
multiple_compound_item_code |
etc item type (1000030, 1000031 equal gears, 1000099, 1000423, 1000424) |
type |
the gear machine type the result is copied from (5 or 10 in the shipped file) |
item_cnt, itemN_code, itemN_rate |
override the result list of that machine type. Commented out in the shipped file |
period_time_cnt, period_timeN_rate, period_timeN_value, period_timeN_alarm |
result duration in hours and whether it is announced |
reinforce_cnt, reinforceN_rate, reinforceN_value |
result level and its weight |
The loader starts from the defaults of the machine type (g_ExtraItemInfoMgr.CopyDefaultMachineAll) and applies only what you write. The weights are relative (the total of the list is the base), they do not have to add up to 100.
Change the material upgrade
Section titled “Change the material upgrade”The material table has a header and one block per upgrade item.
[piece_compound]max_reinforce = 30fixed_fail_reinforce = 25system_reinforce_need_money = 4000right_high_material = 0.5fright_rare_material = 2.0f
[piece_compound_rate1]compound_item_code = 1004880success_constant = 50fail_exp_constant_rate = 1.0fcompound1_level = 0compound1_need_material = 50compound1_need_peso = 500compound1_max_fail_exp = 100pc_room_bonus1 = 50How ioItemCompoundManager uses it:
- The block is looked up by
compound_item_code(here the etc items1004880to1004929,EIT_ETC_ITEM_MATERIAL_COMPOUND001to050).compoundN_levelis the current gear level. - The player pays
compoundN_need_materialpieces (etc itemEIT_ETC_ADDICTIVE_PIECE, type1012011) orcompoundN_need_pesopeso. - Success chance in percent is
ceil( (fail exp + success_constant) / max_fail_exp * 100 ), pluspc_room_bonusNfor internet cafe players, capped at 100. A miss adds fail exp (pieces timesfail_exp_constant_ratetimesright_high_materialorright_rare_material), up tocompoundN_max_fail_exp. The fail exp makes the next try more likely. - A success adds 1 level, only while the level is below
max_reinforce, and resets the fail exp. - A miss at level 25 or higher sets the gear back to 25 (
ROLLBACK_LEVEL = 25, fixed inioItemCompoundManager.h, not in a config file). CheckReinforceis the “system reinforce”. It uses the block of1004880, chargessystem_reinforce_need_moneyon top, and with peso it refuses atfixed_fail_reinforce(25) or higher.GetGainExptakesfail_exp_constant_rateas an integer. A value such as 1.5 becomes 1. This is from the function signature. A test was not done yet.
The client file holds its own copy. Keep max_reinforce, fixed_fail_reinforce, system_reinforce_need_money, the compoundN_* rows and success_constant equal. The client also has max_info_cnt, max_reinforce_cnt and compoundN_success_rate, which the server does not read, so which of the two sets the number the window shows: not confirmed yet.
The material table is not hot reloaded from its own file. CheckNeedReload reads the flag Change in section [piece_compound] of sp2_item_compound_info.ini, and the shipped file has no such section. Restart the game server after editing the material table. This is from reading the code and the testbed file.
Change the starting level of gear
Section titled “Change the starting level of gear”New gear gets its level from the gear machine, not from these tables. In sp2_extraitem_info.ini each [random_machineN] has reinforce_cnt with reinforceN_rate and reinforceN_value (for example 1800 for +1, 2800 for +2 in the 2021 testbed). Weights are relative. reinforce_cash_cnt is the same list for gold purchases. See Gacha Boxes.
Power-up
Section titled “Power-up”Power-up raises the grade of a hero and of its signature gear. It has no random roll in the loader.
sp2_powerup_manager.ini:[common]hasmax_charand the reload flagchange.[need_material]hasmaterial_codeand the material counts per grade (char_gradeN_cnt,item_gradeN_cnt,char_down_gradeN_cnt,item_down_gradeN_cnt). Every[charN]linkschar_code,item_code,max_power_gradeandgradeN_weapon.sp2_powerup_rare_manager.ini:[common]hasmax_itemandgradeN_mtrl_cnt. Every[itemN]hasitem_code,grade_maxandgradeN_code.- Add a hero or gear by adding a block and raising
max_charormax_item. The new grade items must exist in the item tables first (Add an Item).
The shipped testbed files have max_char = 42 and max_item = 65. What the client windows do with the client copies of these files was not checked. Not confirmed yet.
Differences between versions
Section titled “Differences between versions”| 2014 | 2019 | 2021 | |
|---|---|---|---|
[multiple_compound] blocks (testbed) |
3 (1000030, 1000031, 1000099) |
5 (adds 1000423, 1000424) |
5 |
| Material upgrade on the server | CheckMaterialCompound only, with material code check (IsRightMaterial) |
adds CheckReinforce, pieces or peso |
same as 2019 |
system_reinforce_need_money in the material table |
not in the testbed file | 4000 | 4000 |
Old file sp2_item_compound_material_info.ini on the server |
present | not present | not present |
| Power-up files on the server | present | present | present |
ROLLBACK_LEVEL |
25 | 25 | 25 |
The 2014 server folder also has sp2_soldier_item_compound.ini and growth files (sp2_extraitem_growth_catalyst_info.ini, sp2_extraitem_growth_save.ini, growth_info.ini). The etc item list has many more compound types (ioEtcItemCompoundEx, ioEtcItemFourExtraCompound). What they read: not confirmed yet.
Check your change
Section titled “Check your change”- Restart the game server (always for the material table). Restart the client after a client file change.
- Use a test account with a gear at the level you changed and the needed etc item.
- Do the compound ten or more times. The server log
RateCheckLOGwrites a line for each roll with the target, victim, result and new level. - Compare the window numbers with your file. A difference means the client copy was not updated.
Not confirmed yet: the exact reload interval, the client display source of the material success rate, and the 2014 and 2019 client file contents (packed).
