Skip to content

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.

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.

The compound merges a victim gear into a target gear. The victim is deleted before the roll, and a miss still costs it.

  1. Open sp2_item_compound_info.ini on the server. Find [compound_rate1]. Its compound_item_code is the etc item that starts this compound (the etc item type, for example 1000023, class ioEtcItemExtraItemCompound). [compound_rate2] uses 1000096 (class ioEtcItemExtraItemCompound2).

  2. Set the step sizes of that block:

    [compound_rate1]
    compound_item_code = 1000023
    small_up_reinforce = 1
    big_up_reinforce = 2
    down_reinforce = 1
    compound2_level = 1
    compound2_same_rate = 40
    compound2_same_special_rate = 20
    compound2_other_rate = 40
    compound2_other_special_rate = 20
  3. Each compoundN_level row is the current level of the target. The loader reads N from 1 to max_info_cnt (25 in the shipped file). A level with no row has rate 0 and the server refuses the compound (return code 5 in CheckCompoundSuccess, the victim is kept).

  4. The roll is a number from 0 to 99. If it is below same_rate (or other_rate), the level goes up by small_up_reinforce. If it is below rate plus special_rate, it goes up by big_up_reinforce. Otherwise it drops by down_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.

  5. “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).

  6. Set Change = 1 in [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.

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.

The material table has a header and one block per upgrade item.

[piece_compound]
max_reinforce = 30
fixed_fail_reinforce = 25
system_reinforce_need_money = 4000
right_high_material = 0.5f
right_rare_material = 2.0f
[piece_compound_rate1]
compound_item_code = 1004880
success_constant = 50
fail_exp_constant_rate = 1.0f
compound1_level = 0
compound1_need_material = 50
compound1_need_peso = 500
compound1_max_fail_exp = 100
pc_room_bonus1 = 50

How ioItemCompoundManager uses it:

  • The block is looked up by compound_item_code (here the etc items 1004880 to 1004929, EIT_ETC_ITEM_MATERIAL_COMPOUND001 to 050). compoundN_level is the current gear level.
  • The player pays compoundN_need_material pieces (etc item EIT_ETC_ADDICTIVE_PIECE, type 1012011) or compoundN_need_peso peso.
  • Success chance in percent is ceil( (fail exp + success_constant) / max_fail_exp * 100 ), plus pc_room_bonusN for internet cafe players, capped at 100. A miss adds fail exp (pieces times fail_exp_constant_rate times right_high_material or right_rare_material), up to compoundN_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 in ioItemCompoundManager.h, not in a config file).
  • CheckReinforce is the “system reinforce”. It uses the block of 1004880, charges system_reinforce_need_money on top, and with peso it refuses at fixed_fail_reinforce (25) or higher.
  • GetGainExp takes fail_exp_constant_rate as 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.

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 raises the grade of a hero and of its signature gear. It has no random roll in the loader.

  • sp2_powerup_manager.ini: [common] has max_char and the reload flag change. [need_material] has material_code and the material counts per grade (char_gradeN_cnt, item_gradeN_cnt, char_down_gradeN_cnt, item_down_gradeN_cnt). Every [charN] links char_code, item_code, max_power_grade and gradeN_weapon.
  • sp2_powerup_rare_manager.ini: [common] has max_item and gradeN_mtrl_cnt. Every [itemN] has item_code, grade_max and gradeN_code.
  • Add a hero or gear by adding a block and raising max_char or max_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.

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.

  1. Restart the game server (always for the material table). Restart the client after a client file change.
  2. Use a test account with a gear at the level you changed and the needed etc item.
  3. Do the compound ten or more times. The server log RateCheckLOG writes a line for each roll with the target, victim, result and new level.
  4. 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).