Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refine DB Revamped & Refine UI support #10

Open
wants to merge 42 commits into
base: master
Choose a base branch
from
Open

Conversation

cydh
Copy link
Owner

@cydh cydh commented Jul 9, 2018

Excuse

A clean up of #9 that I updated it by merging it from master but one day I rebase it 🙊

The changes

Zero

The structures explained in this separated gist file. Read

One

Refine cost type is changed to

REFINE_COST_NORMAL         - For normal refining
REFINE_COST_OVER10         - For refining over +10
REFINE_COST_HD             - For refining with HD ores
REFINE_COST_ENRICHED       - For refining with enriched ores
REFINE_COST_OVER10_HD      - For refining over +10 with HD ores
REFINE_COST_HOLINK         - For refining at Holink in Malangdo
REFINE_COST_WAGJAK         - For refining at Refining Machine Wagjak in the Novice Academy
REFINE_COST_BLESSED        - For refining using Blessed Ore
REFINE_COST_EVT_ENRICHED   - For refining with enriched ores with event rates
REFINE_COST_EVT_OVER10_HD  - For refining over +10 with HD ores with event rates

Two

Changed getequippercentrefinery(<equipment slot>{,<enriched>,<char_id>})
To: getequippercentrefinery(<equipment slot>,<type>{,<char_id>})
The enriched flag (boolean) is removed by type

Three

See on refine_db.yml, it's more complicated detailed now to support Refine UI that will show the correct materials based on equipment and its refine level, such

  • Enriched ore are always be shown to refine from +0 to +10
  • HD ores limitation and downgrade
  • Blacksmith Blessing options

If you are using custom refiner (that excluded from this changes) make sure you check again that I separated the REFINE_COST_NORMAL and normal for REFINE_COST_OVER10, because before +10 for Armor as example needs Elunium but until +20 is Carnium. If you force to use 'REFINE_COST_NORMAL' for refining to +11, it gives you 0% success rate and gives no material ID.

Four

About to 'separate' equip to its own materials (include chances and costs). Read this comment

Disclaimer

There are many credits by every commits, see yourself. Use this by your own risk such that maybe conflicted with your server or conflicted on future update on rAthena. I don't accept any support about "can you make it ..." related this changes, except as paid request.
This branch/PR includes

Lemongrass3110 and others added 28 commits October 9, 2017 14:58
Added a new configuration values in the YAML configuration to mark if a material will break or downgrade the item in case of failure.
# Conflicts:
#	src/map/script.cpp
* Updated it to the proper constant name.
# Conflicts:
#	conf/battle/feature.conf
#	db/re/refine_db.yml
#	npc/re/merchants/hd_refiner.txt
#	src/map/atcommand.cpp
#	src/map/battle.cpp
#	src/map/battle.hpp
#	src/map/clif.cpp
#	src/map/pc.hpp
#	src/map/script.cpp
# Conflicts:
#	conf/msg_conf/map_msg.conf
# Conflicts:
#	src/map/script.cpp
* Enabled Blacksmith Blessing check for refining to disable downrefine on fail! (of course without breaking the refined item)
  * +7 to +8 needs 1 ea
  * +8 to +9 needs 2 ea
  * +9 to +10 needs 4 ea
  * +10 to +11 needs 7 ea
  * +11 to +12 needs 11 ea
* Added Blacksmith Blessing entries to refine_db.yml follow the values above.
* Fixed refine_info clearances on loading files.

Signed-off-by: Cydh Ramdh <[email protected]>
* HD Oridecon & HD Elunium only can be used to update equip with refine level +7 to +9. It means +7 -> +8, +8 -> +9, +9 -> +10.
* Enriched Oridecon & Enriched Elunium are just replacement of normal materials. It means only can be used to refine up to +10.
* Corrected `true = enriched` flag for `getequippercentrefinery` commands. HD just simply use normal rates, not enriched. Or create new value for HDs later

Signed-off-by: Cydh Ramdh <[email protected]>
* You are now allowed to add your own refine costs/chances!
* Say goodbye to `event_refine_chance` config. If you need 'event'-like chance, just add the chance value and use that type for `getequippercentrefinery` command, just like its bro `getequiprefinecost`.
* To disable certain refine material (based on refine cost/type) on certain refine level/type, just remove its value from it!
* The most important,see your refine_db.yml now, the refine rates are using refine cost types. If you have custom values, just simply adjust it.
* There are Blessed Oridecon/Elunium from `blessed_refiner` NPC to refine_db.yml but it won't be displayed in NEW Refine UI, why? Because the `RefineUI` value in refine_db.yml is set as `false`.
* technically Over +10 is 'normal' rates, just have different material, so the `REFINE_COST_NORMAL` never be in +11 to +20 so does `REFINE_COST_OVER10` will never be in below +10. There are also HD, Enriched, and Blessed ores with this refine level restriction.

Signed-off-by: Cydh Ramdh <[email protected]>
* 'Break' is percentage number to break the equip on fail, 100 = 100%
* 'DownRefine' is percentage number to downrefine the equip on fail, 100 = 100% (checked after 'Break' chance if passed)
* 'DownRefineNum' is number of down refine
* `getblacksmithblessing(<type>,<refine>{,<var>})` to get info of Blacksmith Blessing usage for refining
* Removed unnecessary changes were changed on merge
* Updated `getequippercentrefinery` to allow without type
@ghost
Copy link

ghost commented Jul 12, 2018

There's a warning for the event_refince_chance on this PR since it was removed.
image

Need to delete it in battle/items.conf

@kukas9
Copy link

kukas9 commented Feb 16, 2019

No news? @cydh :(

Brog, voce ta usando o emulador dele ou voce pegou as mudanças que foram feitas nos arquivos e colocou direto no seu emulador?

@luan122
Copy link

luan122 commented Mar 8, 2019

Could you update this for the latest version of rA?

# Conflicts:
#	conf/battle/feature.conf
#	src/map/atcommand.cpp
#	src/map/battle.cpp
#	src/map/clif.cpp
#	src/map/clif_packetdb.hpp
#	src/map/script.cpp
@luan122
Copy link

luan122 commented Mar 11, 2019

Thank you!

@iubantot
Copy link

Sorry for the noob question but im using the latest rathena and is it possible to fetch this pull request? if yes then how?

@cydh
Copy link
Owner Author

cydh commented Dec 4, 2019

seems gonna make diff just for refine ui only without the script changes 🤔

@admkakaroto
Copy link

@cydh crash on map_server:

Core was generated by `./map-server'.
Program terminated with signal 11, Segmentation fault.
#0  0x000000000051ebcf in pc_delitem (sd=sd@entry=0x88879c0, n=n@entry=65535,
    amount=amount@entry=1, type=type@entry=0, reason=reason@entry=0,
    log_type=log_type@entry=LOG_TYPE_CONSUME) at pc.cpp:5015
5015            if(n < 0 || sd->inventory.u.items_inventory[n].nameid == 0 || amount <= 0 || sd->inventory.u.items_inventory[n].amount<amount || sd->inventory_data[n] == NULL)
Missing separate debuginfos, use: debuginfo-install glibc-2.17-260.el7_6.6.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.15.1-37.el7_6.x86_64 libcom_err-1.42.9-13.el7.x86_64 libgcc-4.8.5-36.el7_6.2.x86_64 libselinux-2.5-14.1.el7.x86_64 libstdc++-4.8.5-36.el7_6.2.x86_64 mariadb-libs-5.5.60-1.el7_5.x86_64 openssl-libs-1.0.2k-16.el7_6.1.x86_64 pcre-8.32-17.el7.x86_64 zlib-1.2.7-18.el7.x86_64
(gdb) bt full
#0  0x000000000051ebcf in pc_delitem (sd=sd@entry=0x88879c0, n=n@entry=65535,
    amount=amount@entry=1, type=type@entry=0, reason=reason@entry=0,
    log_type=log_type@entry=LOG_TYPE_CONSUME) at pc.cpp:5015
No locals.
#1  0x0000000000495627 in clif_parse_refineui_refine (fd=33, sd=0x88879c0) at clif.cpp:21841
        i = <optimized out>
        index = <optimized out>
        material = <optimized out>
        use_blacksmith_blessing = false
        materials = {{cost = {nameid = 985, zeny = 2000, refineui = true, breaking = 100,
              downrefine = 0, downrefine_num = 0}, chance = 12 '\f', bs_bless = {nameid = 0,
              count = 0}}, {cost = {nameid = 6241, zeny = 20000, refineui = true, breaking = 0,
              downrefine = 100, downrefine_num = 1}, chance = 9 '\t', bs_bless = {nameid = 0,
              count = 0}}, {cost = {nameid = 7619, zeny = 2000, refineui = true, breaking = 100,
              downrefine = 0, downrefine_num = 0}, chance = 20 '\024', bs_bless = {nameid = 0,
              count = 0}}, {cost = {nameid = 6439, zeny = 20000, refineui = true, breaking = 0,
              downrefine = 0, downrefine_num = 1}, chance = 12 '\f', bs_bless = {nameid = 0,
              count = 0}}, {cost = {nameid = 0, zeny = 0, refineui = false, breaking = 0,
              downrefine = 0, downrefine_num = 0}, chance = 0 '\000', bs_bless = {nameid = 6635,
              count = 4}}}
        j = 65535
        item = 0x88a2c20
        id = 0x7f90477194cc
#2  0x000000000046b709 in clif_parse (fd=33) at clif.cpp:22293
        cmd = 2723
        packet_len = 7
        sd = 0x88879c0
        pnum = 0
#3  0x00000000006306ad in do_sockets (next=<optimized out>) at socket.cpp:1407
        rfd = {fds_bits = {8589934592, 0 <repeats 15 times>}}
        timeout = {tv_sec = 0, tv_usec = 3315}
        ret = 0
        i = 33
#4  0x000000000040764d in main (argc=1, argv=0x7fffc68cd758) at core.cpp:369
---Type <return> to continue, or q <return> to quit---
        next = <optimized out>
(gdb)

@Badarosk0
Copy link

Can you update this PR to the latest version of rAthena? Thank you

@RagnaWay
Copy link

@cydh please update.

@Chywoner
Copy link

image

Could someone help me with this error?

@LordWhiplash
Copy link

Working perfectly, thank you!

@iubantot
Copy link

is blessed ores not yet supported? its not showing on materials that i can use

@LolyAll
Copy link

LolyAll commented May 18, 2020

Hello @cydh , could you update to work with Lemon's PR? That of the new clients, using version 2020, the list of materials does not appear in the UI, only the blessing is showing, the other items appear as unknown.

@hoosaa9
Copy link

hoosaa9 commented Jun 2, 2020

@cydh please update.

@ecdarreola
Copy link

Shadow items can be refined using RefineUI and use blacksmith's blessing even it is commented out on refine_db.yml

@Badarosk0
Copy link

@cydh Could you update this PR with the current rAthena?

@RagnaWay
Copy link

RagnaWay commented Jun 7, 2020

https://rathena.org/board/topic/124590-refineui-cydh/

napatkung added a commit to napatkung/rathena that referenced this pull request Jun 14, 2020
napatkung added a commit to napatkung/rathena that referenced this pull request Jun 14, 2020
This reverts commit ccf09e3.
@zdurexz
Copy link

zdurexz commented Oct 22, 2020

@cydh Help, New #4335 can not use refineui as picture
image

gravity-ro referenced this pull request in rathena/rathena Jul 30, 2021
cydh pushed a commit that referenced this pull request Nov 29, 2022
* Corrected script for some item #10
* add some items JRO costume

Thanks to @Atemo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.