Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@cydh
Last active May 27, 2019 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cydh/8345784d62ecb7e585ab0ec7d98b73a9 to your computer and use it in GitHub Desktop.
Save cydh/8345784d62ecb7e585ab0ec7d98b73a9 to your computer and use it in GitHub Desktop.
Guide to modify edited Refine DB related to https://github.com/cydh/rathena/pull/10

Table of contents

  1. Structure
  2. Add New Cost Type

refine_db.yml of rAthena is revamped in cydh/rathena#10 so be easy to modified.

Structure

<refine_type>:
  StatsPerLevel: 0
  RandomBonusStartLevel: 0
  RandomBonusValue: 0
  Costs:
    - Type: <refine_cost_type>
      Price: <price>
      Material: <material_item_id>
      RefineUI: <display_refine_ui>
      OnFail:
        Break: <break_chance>
        DownRefine: <down_refine_chance>
        DownRefineNum: <down_refine_num>
  Rates:
    - Level: <refine_level>
      Chances:
      - Type: <refine_cost_type>
        Rate: <success_rate>
      Bonus: 100
      BlacksmithBlessing:
        ItemID: <blacksmith_blessing_id>
        Count: <blacksmith_blessing_required>

<refine_type> current valid values are (case-sensitive)

  • Armor
  • WeaponLv1
  • WeaponLv2
  • WeaponLv3
  • WeaponLv4
  • Shadow
  • Costume

Costs

<refine_cost_type> valid values are defined in status.hpp in group of enum refine_cost_type. If you willing to add another 'chance', you should add new value above REFINE_COST_MAX. Current valid values are

  • REFINE_COST_NORMAL,
  • REFINE_COST_OVER10,
  • REFINE_COST_HD,
  • REFINE_COST_ENRICHED,
  • REFINE_COST_OVER10_HD,
  • REFINE_COST_HOLINK,
  • REFINE_COST_WAGJAK,
  • REFINE_COST_BLESSED,
  • REFINE_COST_EVT_ENRICHED,
  • REFINE_COST_EVT_OVER10_HD, If you want to add new cost-set (item material, price, break/downrefine chance, and refining Rates), open status.hpp and add new entry in enum refine_type before REFINE_TYPE_MAX. Then make sure you add this cost-set type in Rates block later.

<price> Zeny required for each refine attempt.

<material_item_id> Item ID required for each refine attempt.

<display_refine_ui> Boolean value, the default is true that mean this cost-set will be displayed in Refine UI if the refine level and equip are match. Set it false to hide this cost-set.

OnFail this block in optional, by default will be OnFail.Break: 100

<break_chance> Break chance if refine attempt is fail (0-100%)

<down_refine_chance> Chance to downrefine (reduce the current refine level) if the refine attempt is fail (0-100%).

<down_refine_num> Default is 1 if DownRefine is defined.

Rates

<refine_level> Indicates 'this rate block is used to refine equip to refine +n

Chances this block can contains multiple Types.

<refine_cost_type> Type of posible rate chance defined in 'Costs' block.

<success_rate> Success rate to increase the refine level of equipment. If refine is failed, the OnFail block for this cost-set will be triggered.

BlacksmithBlessing Block is optional. If defined, the Black Smith Blessing item will be displayed in Refine UI. This is will prevent equipment to break or downrefine on refine failure.

<blacksmith_blessing_required> Number of Blacksmith Blessing required.

Add New Cost Type

WIP

@Chywoner
Copy link

Hello, I have an error when trying to modify the refine_db.yml I leave my db to see if you could help me ..

https://pastebin.com/0izkCPYu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment