summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/pre-re/refine_db.conf29
-rw-r--r--db/re/refine_db.conf30
-rw-r--r--doc/script_commands.txt21
3 files changed, 48 insertions, 32 deletions
diff --git a/db/pre-re/refine_db.conf b/db/pre-re/refine_db.conf
index 523c2605c..dd3bcdb41 100644
--- a/db/pre-re/refine_db.conf
+++ b/db/pre-re/refine_db.conf
@@ -30,19 +30,22 @@
/**************************************************************************
************* Entry structure ********************************************
**************************************************************************
-Armors/WeaponLevel1~4: { // Specifies weapon level or armor type
- - For armors, values of 100 add 1 armor defense.
- - For weapons, values of 100 add 1 ATK.
- StatsPerLevel: value (int) // This value is applied for ever level.
- RandomBonusStartLevel: level (int) // This value specifies the start point for those levels that give a random bonus value (usually the first unsafe upgrade).
- RandomBonusValue: value (int) // A random number between 0 and (Random bonus start level - Upgrade level + 1) * this value is applied for all upgrades past.
- // Random bonus start level. This is only applied for weapons, and not displayed client-side.
- Rates: { // Per level configuration of the refine rates.
- Lv1~10: { // Level of refine
- NormalChance: value (int, optional, defaults to 100) // Chance of successful refine (100 = 100%)
- Bonus: value (int, optional, defaults to 0) // Bonus for this level of refine
- }
- // Note: Refine levels that use default values need not be listed. (Example: Lv1: NormalChance: 100 Bonus: 0)
+Armors/WeaponLevel1~4: { // Specifies weapon level or armor type.
+ // - For armors, values of 100 add 1 armor defense.
+ // - For weapons, values of 100 add 1 ATK.
+ StatsPerLevel: (int) // This value is applied for ever level.
+ RandomBonusStartLevel: (int) // This value specifies the start point for those levels that give a random bonus value (usually the first unsafe upgrade).
+ // - RandomBonusStartLevel is only applied for weapons, and not displayed client-side.
+ RandomBonusValue: (int) // A random number between 0 and (Random bonus start level - Upgrade level + 1) * this value is applied for all upgrades past.
+ Rates: { // Per level configuration of the refine rates.
+ Lv1~10: { // Lv1 ~ Lv10.
+ NormalChance: (int) // (optional, defaults to 100) Chance of successful refine using normal ores (100 = 100%).
+ EnrichedChance: (int) // (optional, defaults to 100 for weapons below refine level 10, otherwise 0.) Chance of successful refine using enriched ores (100 = 100%).
+ EventNormalChance: (int) // (optional, defaults to 100) Chance of successful refine using normal ores (100 = 100%) during a refine event.
+ EventEnrichedChance: (int) // (optional, defaults to 100 for weapons below refine level 10, otherwise 0.) Chance of successful refine using enriched ores (100 = 100%) during a refine event.
+ Bonus: (int) // (optional, defaults to 0) Bonus (Armor) for this level of refine.
+ }
+ // Note: Refine levels that use default values need not be listed. (Example: Lv1: { NormalChance: 100 Bonus: 0 })
}
}
**************************************************************************/
diff --git a/db/re/refine_db.conf b/db/re/refine_db.conf
index 3c0e66070..4974e0033 100644
--- a/db/re/refine_db.conf
+++ b/db/re/refine_db.conf
@@ -30,22 +30,24 @@
/**************************************************************************
************* Entry structure ********************************************
**************************************************************************
-Armors/WeaponLevel1~4: { // Specifies weapon level or armor type
- - For armors, values of 100 add 1 armor defense.
- - For weapons, values of 100 add 1 ATK&MATK.
- StatsPerLevel: value (int) // This value is applied for ever level.
- RandomBonusStartLevel: level (int) // This value specifies the start point for those levels that give a random bonus value (usually the first unsafe upgrade).
- RandomBonusValue: value (int) // A random number between 0 and (Random bonus start level - Upgrade level + 1) * this value is applied for all upgrades past.
- // Random bonus start level. This is only applied for weapons, and not displayed client-side.
- Rates: { // Per level configuration of the refine rates.
- Lv1~10: { // Level of refine
- NormalChance: value (int, optional, defaults to 100) // Chance of successful refine (100 = 100%)
- Bonus: value (int, optional, defaults to 0) // Bonus for this level of refine
- }
- // Note: Refine levels that use default values need not be listed. (Example: Lv1: NormalChance: 100 Bonus: 0)
+Armors/WeaponLevel1~4: { // Specifies weapon level or armor type.
+ // - For armors, values of 100 add 1 armor defense.
+ // - For weapons, values of 100 add 1 ATK & MATK.
+ StatsPerLevel: (int) // This value is applied for ever level.
+ RandomBonusStartLevel: (int) // This value specifies the start point for those levels that give a random bonus value (usually the first unsafe upgrade).
+ // - RandomBonusStartLevel is only applied for weapons, and not displayed client-side.
+ RandomBonusValue: (int) // A random number between 0 and (Random bonus start level - Upgrade level + 1) * this value is applied for all upgrades past.
+ Rates: { // Per level configuration of the refine rates.
+ Lv1~20: { // Lv1 ~ Lv20.
+ NormalChance: (int) // (optional, defaults to 100) Chance of successful refine using normal ores (100 = 100%).
+ EnrichedChance: (int) // (optional, defaults to 100 for weapons below refine level 20, otherwise 0.) Chance of successful refine using enriched ores (100 = 100%).
+ EventNormalChance: (int) // (optional, defaults to 100) Chance of successful refine using normal ores (100 = 100%) during a refine event.
+ EventEnrichedChance: (int) // (optional, defaults to 100 for weapons below refine level 10, otherwise 0.) Chance of successful refine using enriched ores (100 = 100%) during a refine event.
+ Bonus: (int) // (optional, defaults to 0) Bonus (Armor) for this level of refine.
+ }
+ // Note: Refine levels that use default values need not be listed. (Example: Lv1: { NormalChance: 100 Bonus: 0 })
}
}
-// A note about renewal Armors, there may or may not be another bonus, according to iRO wiki: Every upgrade gives floor[( 3 + current upgrade ) / 4]
**************************************************************************/
Armors: {
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 0ba350ad1..b54b0721d 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -2993,21 +2993,32 @@ Examples:
---------------------------------------
-*getequippercentrefinery(<equipment slot>)
+*getequippercentrefinery(<equipment slot>{, <type>})
This function calculates and returns the percent value chance to
successfully refine the item found in the specified equipment slot of the
-invoking character by +1. There is no actual formula, the success rate for
-a given weapon level of a certain refine level is found in the
-db/refine_db.txt file. For a list of equipment slots see getequipid().
+invoking character by +1. Refine rates are defined in the db/<re/pre-re>/refine_db.conf
+files. For a list of equipment slots see getequipid().
These values can be displayed for the player to see, or used to calculate
the random change of a refine succeeding or failing and then going through
with it (which is what the official NPC refinery scripts use it for).
+Refine Chance Type Constants -
+REFINE_CHANCE_TYPE_NORMAL: 0 (Normal Ores)
+REFINE_CHANCE_TYPE_ENRICHED: 1 (Enriched Ores)
+REFINE_CHANCE_TYPE_E_NORMAL: 2 (Event Normal Ores)
+REFINE_CHANCE_TYPE_E_ENRICHED: 3 (Event Enriched Ores)
+
+Refine rate information -
+Normal Ores: http://ro.gnjoy.com/news/probability/View.asp?category=4&seq=1941553&curpage=1
+Enriched Ores: http://ro.gnjoy.com/news/probability/View.asp?category=4&seq=1941565&curpage=1
+Event Normal Ores: http://ro.gnjoy.com/news/probability/View.asp?category=4&seq=1941558&curpage=1
+Event Enriched Ores: http://ro.gnjoy.com/news/probability/View.asp?category=4&seq=1941567&curpage=1
+
// This will find a random number from 0 - 99 and if that is equal to or
// more than the value recovered by this command it will show a message
- if (getequippercentrefinery(EQI_HAND_L) <= rand(100))
+ if (getequippercentrefinery(EQI_HAND_L, REFINE_CHANCE_TYPE_NORMAL) <= rand(100))
mes("Aww");
---------------------------------------