About
This program calculates the refinement chances, as well as number of equipment and ores needed to refine an equipment. The ores, equipment and refinement range are chosen by the user. The user can then use the results as input for the cost calculator sheet to see how much he/she would spend on the process. This program takes into account everything that can happen when attempting to refine an equipment: upgrading, downgrading, breaking, and staying at same refine level. This program was made so that it can be used on any RO server, the user just need to change its configurations. This program was made on google sheets. Make a copy of it.
How to use:
There are only 3 sheets you'll need to manage if you don't want to change anything.
- Main sheet:
- Select the equipment you want to use, the initial and final refine levels
- Choose if you want to inform the "success %", the "failure %", or the "nº of equip", and type in the value.
- Press the giant equal button. It will calculate the 2 other data based on the one you informed. Example, if you chose "success %" it will calculate and show "failure %" and "nº of equip". It will also calculate the averages, and the total amount of ores you will need.
- Ores Used sheet:
- Select the ores you want to use for each refine level. The ores shown on the main sheet after pressing the equal button are selected by this sheet
- Costs Calculator sheet: After you got the total amount of equipment and ores for your refining, you can use this sheet to calculate how much you will spend.
- Add or remove the resources(equipment and ores) used under the "Resource" column
- Type in the number of them used under "Nº of resources to use" column.
- Type in the individual cost for each one(in any currency, zeny/cash/etc) under the "Individual Cost" column. Then under the "Total sum" you will have the total amount of zeny you will spend
Proof that the program works
With the refinement simulation program, you can see that the numbers matches the averages calculated on the main sheet. Save the file as "programa.cpp" then compile it using a C++ compiler, like g++. The command is "g++ programa.cpp -std=c++11 -o programa". If you're under windows, you can install g++ using MinGW or Cygwin
Example:
So here's the result of my program trying to refine a lvl 4 weapon from +0 to +17 using enriched oridecon and HD Bradium(results are in descending order, from +17 to +0):
"17: 0.014112000032579636|16: 0.20160000046542337|15: 2.880000006648905|14: 38.46445723165802|13: 447.3257153184317|12: 5144.4221261623725|11: 59161.03085086769|10: 680352.0311849788|9: 0.07056|8: 0.1764|7: 0.44099999999999995|6: 0.63|5: 0.9|4: 1|3: 1|2: 1|1: 1|0: 1"
and the result of the simulation(results are in ascending order, from +0 to +17), running it 100 thousand times(took like 5 hours on my machine lol):
100000 100000 100000 100000 100000 89823 62950 44053 17612 7122 4049314828 1659344300 517772410 45034477 3872288 289190 20134 1426 0 0 0
So the success chance to get to +17, according to my program, is 0.014112000032579636. Running the simulator 100 thousand times, it got to +17 1426 times, which is very, very close to the value expected(0.014112000032579636 * 100000 = 1411). To +10 and +11 the simulation overflowed because they got over 4294967295(max unsigned 32-bit int)
SHEETS:
iRO renewal refinement
iRO pre-renewal refinement
kRO renewal refinement
FAQ
Q: OMG if I select the final refine level too quickly I can select an invalid value. What now?
A: If this happens, you will either get a message error or the dropdown box will go red. Just type in a valid value.
Q: I clicked on the blue equal button and I got a message error saying the function could not complete or it says "Running Script" forever. What now?
A: If this happened, it is likely that you clicked on the button before it said "All changes saved in drive". Reload the page.
Q: If I type 100 in the "success %" I get #NUM! or infinity as the n of equip and infinity as the number of ores. Why?
A: To reach 100% success you would need an infinite amount of ores, and an infinite amount of equipment. Unless you're refining in the safe levels(+0->+1 for instance) or there is a safe refine level(for instance, say you can't go below +10. If you try to refine between +10 and any other refine level, the success chance will always be 100%, because you will never break the equipment, and given that you have enough ores, you will always reach the refine level you want).
Q: If I type anything less than 100 in the "success %" I get 0 or NaN as n of equip and no ores or NaN as number of ores. Why?
A: You are probably trying to refine with initial and final refine levels being between safe refine levels(+1->+2 for instance) or doing something equivalent(+10->+11 with bless of blacksmith, on kRO spreadsheet). If you try to refine between +12 and +15, using HD Bradiums for example, you're equipment will never break on iRO. That is because you can never go below +10 using HD ores, so even if you downgrade from +12 to +10, eventually you will get to +15 given you have enough ores.You're equipment can't break in that situation, consequently the chance of success is always 100%. On these situations, change the number of equipment only. Actually, just leave the number of equipment at 1, and check how many ores you need.
Q: If I type in 100000 number of equipment(or a really high value) and press the equal button, I get 100% success chance, but if I then type in 100% success chance and press the equal button again right after, instead of getting 100000 number of equipment, I get "#NUM!" or infinity number of equipment and infinity number of ores. Why?
A: When you first type in 100000 number of equipment(or a really high value) and press the equal button, the success chance is so high that the machine can't represent it and rounds it to 100%. This is just a precision problem. You will only ever have 100% success chance if you're refining between safe levels(+1->+2, any range where the initial refine level is >= +10 using HD ores on iRO, like +12->+15(it will never go below +10, given that you have enough ores eventually you will reach +15), etc)
Q: What is a good success % to try out?
A: It depends on how deep is your pocket. I consider a reasonable success % to be >= 60% and <= 70%. However if your pocket allows it...the more the merrier.
Q: What are all those abbreviations when choosing the ores?
A:
1-iRO Renewal and kRO renewal Spreadsheets:
1.1-WS->Whitesmith. They are the regular ores with rates buffed as if you were using Whitesmith's Weapon Refine skill at job level 70.
1.2-E->Refinement Event Rates. They are the ores buffed by the refinement event rates.
2-iRO Renewal:
2.1-H->Enriched Hammer. They are the ores buffed by Enriched Hammer so the equipment doesn't break and just downgrade instead.
2.2-EH->Refinement Event Rates + Enriched Hammer. They are the ores buffed by the refinement event rates and by Enriched Hammer.
3-kRO Renewal:
3.1-B->Bless of Blacksmith. They are the ores buffed by Bless of Blacksmith so the equipment doesn't break or downgrade.
3.2-EB->Refinement Event Rates + Bless of Blacksmith. They are the ores buffed by the refinement event rates and by Bless of Blacksmith.
Q: On the iRO Renewal Spreadsheet, you know that you can only start using enriched hammer and HD Oridecon/Elunium at +7, right? Then why can you select those ores at levels below +7?
A: Because although you can only start using them at +7, if the equipment falls below +7 and you don't exit the npc, you are still able to use the enriched hammer or HD Oridecon/Elunium. The right way to approach this situation is first refine from +0 to +7 without the hammer(on the ores used, below +7, don't select enriched hammer or HD Oridecon/Elunium), take note of the amount of ores required, then change to refine from +7 to +10(or whatever is the final refine level) with the hammer(on the ores used, below +7, select to use enriched hammer or HD Oridecon/Elunium, since you will be able to use them even if below +7 if you don't exit the npc). Take the amount of ores now (+7 to +whatevs) and sum with the amount you got before(+0 to +7). This way you will get the right amount of ores you'll need to use.
Q: On the iRO Renewal Spreadsheet, you know that using a safe cert requires an oridecon or elunium, right? Does the total amount of ores shown take that information into account?
A: Yes, that information is stored in the "Ore Dependency" sheet. So when using a "Safeto7" cert, the line "{"Safeto7":1, "Oridecon":1}" says that it will use 1 safeto7 cert but also 1 oridecon. This same logic applies to bless of blacksmith on the kRO spreadsheet.
Q: I'm trying to adapt one of the spreadsheets to the server I play in, but when I delete an equipment(remove a column) or when I delete anything, it doesn't seem to have any effect.
A: Blame Google. The thing is that there's a code where it says "OnEdit", which means, when you edit stuff, it does something. The problem is this code only detects when you add stuff, or modify stuff. But when you delete stuff, the code doesn't trigger. I can't do anything about this, the workaround is to simply reload the page. Generally, if all you want to do is change the numbers(for example, the success chances), or add equipment, or add ores, then you don't need to reload the page. But if you decide to, say, remove equipment types(remove shadow gear for example), then you would need to reload the page. To keep it simple...if you're not removing any column or row you won't need to reload the page. Just change everything you need to change and after you're done, reload the page.
Edited by JuicyJuices, 12 December 2017 - 08:04 PM.