Changes

Jump to navigation Jump to search
no edit summary
Line 4: Line 4:  
The distribution for random stones is more complex and varies with depth and best understood in a few stages.
 
The distribution for random stones is more complex and varies with depth and best understood in a few stages.
   −
If a [[Quests#List of Mr. Qi's Special Orders|Qi quest]] is in progress which makes the mine more dangerous, there is a small chance for a stone to be replaced with a [[Radioactive Ore|radioactive ore]]. This is very dependent upon [[luck]], with the luck boost from the special charm being worth 192 floors, and the worst luck requiring a depth of floor 550 to have any chance ore will drop. This is also dependent on luck [[buffs]], with each level of luck worth 15 floors. This will replace any of the below stones.
+
If a [[Quests#List of Mr. Qi's Special Orders|Qi quest]] is in progress which makes the mine more dangerous, there is a small chance for a stone to be replaced with a [[Mining#Radioactive Node|radioactive node]]. This is very dependent upon [[luck]], with the luck boost from the special charm being worth 192 floors, and the worst luck requiring a depth of floor 550 to have any chance ore will drop. This is also dependent on luck [[buffs]], with each level of luck worth 15 floors. This will replace any of the below stones.
   −
The chance for a stone to be a metal ore (copper, iron, gold or iridium) will vary depending on floor, starting at 2% on floor 1, rapidly increasing to 16% on floor 100, and then increasing to 100% on floor 1780. Luck has no effect on this chance, or on the ore distribution. Copper and iron have the same distribution. From floor 2010 only [[Gold Ore|gold]] and [[Iridium Ore|iridium ore]] will be found, and from floor 5700 only iridium ore will be found from this generation.
+
The chance for a stone to be a metal ore ([[Copper Ore|copper]], [[Iron Ore|iron]], [[Gold Ore|gold]], or [[Iridium Ore|iridium]]) will vary depending on floor, starting at 2% on floor 1, rapidly increasing to 16% on floor 100, and then increasing to 100% on floor 1780. Luck has no effect on this chance, or on the ore distribution. Copper and iron have the same distribution. From floor 2010 only [[Gold Ore|gold]] and [[Iridium Ore|iridium ore]] will be found, and from floor 5700 only iridium ore will be found from this generation.
   −
If the stone is not a metal ore, there is a chance for it to be a a gem stone ore ([[diamond]], [[emerald]], [[aquamarine]], [[ruby]], [[amethyst]], [[topaz]] and [[jade]]), a gem node (the round purple stone), a mystic stone or a dark grey rock. This means that the chance can decrease as you go deeper as more of the stone is metal ore, and above floor 1780 these will not be found.
+
If the stone is not a metal ore, there is a chance for it to be a a gem stone ore ([[diamond]], [[emerald]], [[aquamarine]], [[ruby]], [[amethyst]], [[topaz]], and [[jade]]), a gem node (the round purple stone), a mystic stone or a dark grey rock. This means that the chance can decrease as you go deeper as more of the stone is metal ore, and above floor 1780 these will not be found.
Luck and mining level only play a significant role for mystic stones and gem nodes. For others the contribution is negligible.
+
Luck and mining level only play a significant role for [[Mining#Mystic Stone|mystic stones]] and gem nodes. For others the contribution is negligible.
    
For gem stone ores, diamond is slightly rarer than most, and jade is twice as rare as most. The chance initially increases, peaking at a chance of ~0.35% (~0.18% for jade) at a depth of ~800, before dropping back down.
 
For gem stone ores, diamond is slightly rarer than most, and jade is twice as rare as most. The chance initially increases, peaking at a chance of ~0.35% (~0.18% for jade) at a depth of ~800, before dropping back down.
   −
Dark grey rocks, start with their maximum chance at floor 1 (9.73% for dark grey rocks, 0.005% for mystic stones, 0.059% for gem nodes for best chances), and drop proportionally as ores take their place.
+
Dark grey rocks, start with their maximum chance at floor 1 (9.73% for dark grey rocks, 0.005% for mystic stones, 0.059% for gem nodes for best chances), and drop proportionally as ores take their place.
   −
During the [[Desert_Festival]], there are some small changes to how the ore is generated, this is to allow the generation of egg nodes. This occurs below in the section to generate ore clumps, and the section to generate metallic ores.
+
During the [[Desert Festival]], there are some small changes to how the ore is generated, this is to allow the generation of [[Mining#Calico Egg Node|Calico egg nodes]]. This occurs below in the section to generate ore clumps, and the section to generate metallic ores.
    
==Code Details==
 
==Code Details==
Line 34: Line 34:  
To choose which type of ore to add it calls the function <code>StardewValley.Locations.MineShaft::getAppropriateOre</code><ref name="whichOre" />, which just before returning has a 25% chance (if it is not in hard mode) to set the ore to 668 or 670, which are the dark grey rocks (stone ore).
 
To choose which type of ore to add it calls the function <code>StardewValley.Locations.MineShaft::getAppropriateOre</code><ref name="whichOre" />, which just before returning has a 25% chance (if it is not in hard mode) to set the ore to 668 or 670, which are the dark grey rocks (stone ore).
   −
Otherwise, it first checks if the [[Desert_Festival]] is ongoing. If it is there is a (25 + [[Desert_Festival#Skull_Cavern|"Egg Rating"]] / 20)% chance of the node being an egg node.
+
Otherwise, it first checks if the [[Desert Festival]] is ongoing. If it is there is a (25 + [[Desert Festival#Skull Cavern|"Egg Rating"]] / 20)% chance of the node being a [[Mining#Calico Egg Node|Calico egg node]].
 
Otherwise, the ore is set as 764, gold ore, with a 2% chance to set it to 765, iridium ore.
 
Otherwise, the ore is set as 764, gold ore, with a 2% chance to set it to 765, iridium ore.
   Line 50: Line 50:  
The luck boost from the [[Special Charm|special charm]] (0.025, contribution to AverageDailyLuck) is equivalent to an additional 192.3 floors (2500/13), and a single point of luck (such as from a food buff) is worth ~15 floors. The boost from the additional difficulty (setting it to 2 instead of 1) is equivalent to 100 floors.
 
The luck boost from the [[Special Charm|special charm]] (0.025, contribution to AverageDailyLuck) is equivalent to an additional 192.3 floors (2500/13), and a single point of luck (such as from a food buff) is worth ~15 floors. The boost from the additional difficulty (setting it to 2 instead of 1) is equivalent to 100 floors.
   −
With the difficulty set to 1, with the best possible luck (0.125 daily luck with special charm, +9 luck from [[Magic Rock Candy]], a [[Ginger Ale]] made with [[Qi Seasoning]], and 2 [[Lucky Ring]]s) 1.32% of stones will be [[Radioactive Ore|radioactive ore]] on floor 1, increasing to 1.42% on floor 99. With the worst possible luck no radioactive ore will appear until floor 550. Also note that radioactive ore will not appear on any floor divisible by 5.
+
With the difficulty set to 1, with the best possible luck (0.125 daily luck with special charm, +9 luck from [[Magic Rock Candy|magic rock candy]], a [[Ginger Ale|ginger ale]] made with [[Qi Seasoning|Qi seasoning]], and 2 [[Lucky Ring|lucky rings]]) 1.32% of stones will be [[Radioactive Ore|radioactive ore]] on floor 1, increasing to 1.42% on floor 99. With the worst possible luck no radioactive ore will appear until floor 550. Also note that radioactive ore will not appear on any floor divisible by 5.
    
This means that hypothetically with the best possible luck, with difficulty set to 2, from floor 98584 onwards, except on floors divisible by 5, the only ore found from random stones would be radioactive ore. With the worst possible luck, this increases to floor 100450. Reaching these floors would require bypassing the [[Quarry Mine]] floor, which can be found on floor 77257 of Skull Cavern.
 
This means that hypothetically with the best possible luck, with difficulty set to 2, from floor 98584 onwards, except on floors divisible by 5, the only ore found from random stones would be radioactive ore. With the worst possible luck, this increases to floor 100450. Reaching these floors would require bypassing the [[Quarry Mine]] floor, which can be found on floor 77257 of Skull Cavern.
Line 67: Line 67:  
[[File:Skull Cavern Ore Distribution.png|300px|thumb|right|Changing distribution of metal ore with floor.]]
 
[[File:Skull Cavern Ore Distribution.png|300px|thumb|right|Changing distribution of metal ore with floor.]]
   −
First, if the [[Desert_Festival]] is ongoing. If it is there is a (13 + [[Desert_Festival#Skull_Cavern|"Egg Rating"]] / 20)% chance of the node being an egg node. This will not be included in the below graphs and discussions. After that, it first checking for [[Iridium Ore|iridium]], then [[Gold Ore|gold]], then [[Iron Ore|iron]], then returning [[Copper Ore|copper]].
+
First, if the [[Desert Festival]] is ongoing. If it is there is a (13 + [[Desert Festival#Skull Cavern|"Egg Rating"]] / 20)% chance of the node being an [[Mining#Calico Egg Node|Calico egg node]]. This will not be included in the below graphs and discussions. After that, it first checking for [[Iridium Ore|iridium]], then [[Gold Ore|gold]], then [[Iron Ore|iron]], then returning [[Copper Ore|copper]].
 
As an example, this means for a stone to be gold ore it must pass the ore check, then fail the iridium check, then pass the gold check.
 
As an example, this means for a stone to be gold ore it must pass the ore check, then fail the iridium check, then pass the gold check.
 
This means in order to get an ore, the chance for the previous ore must be less than 100%, so once iridium ore reaches 100%, no other metal ores can be made.
 
This means in order to get an ore, the chance for the previous ore must be less than 100%, so once iridium ore reaches 100%, no other metal ores can be made.
Line 135: Line 135:  
     };</syntaxhighlight>
 
     };</syntaxhighlight>
   −
[[File:Skull Cavern Diamond.png|300px|thumb|right|Changing distribution of diamond nodes with floor, luck and mining level]]
+
[[File:Skull Cavern Diamond.png|300px|thumb|right|Changing distribution of diamond nodes with floor, luck, and mining level]]
 
Before analysing in full, it is worth noting the impact of [[luck]]. [[Diamond]]s and Gemstones both use <code>chanceModifier</code>. As daily luck ranges from a minimum of -0.1 to a maximum of 0.125 (with [[Special Charm|special charm]]), and farmer level ranges from 0 to 14, the lowest this can be is -0.1, and the highest is 0.195. For diamonds this is multiplied by 0.0005 and divided by 2 making its effect range from -0.0025% to 0.004875%, or by approximately 0.007%, equivalent to 8.85 floors. For a farmer with the special charm and level 10 mining, the range is reduced to 0.005%, equivalent to 6.6 floors. This is also quite small compared to the base of 0.126% for floor 1 with 0 luck and 0 mining levels.
 
Before analysing in full, it is worth noting the impact of [[luck]]. [[Diamond]]s and Gemstones both use <code>chanceModifier</code>. As daily luck ranges from a minimum of -0.1 to a maximum of 0.125 (with [[Special Charm|special charm]]), and farmer level ranges from 0 to 14, the lowest this can be is -0.1, and the highest is 0.195. For diamonds this is multiplied by 0.0005 and divided by 2 making its effect range from -0.0025% to 0.004875%, or by approximately 0.007%, equivalent to 8.85 floors. For a farmer with the special charm and level 10 mining, the range is reduced to 0.005%, equivalent to 6.6 floors. This is also quite small compared to the base of 0.126% for floor 1 with 0 luck and 0 mining levels.
 
For gemstone ores, the range works out to be 0.044% for the entire range, or 0.033% for the reduced range; equivalent to 10.62 and 7.92 floors, and still small compared to the 0.654% at floor 1.
 
For gemstone ores, the range works out to be 0.044% for the entire range, or 0.033% for the reduced range; equivalent to 10.62 and 7.92 floors, and still small compared to the 0.654% at floor 1.
Line 174: Line 174:  
Which will randomly select an integer in the range [59,70), and then add 1 if it is odd.
 
Which will randomly select an integer in the range [59,70), and then add 1 if it is odd.
 
This has the effect of randomly selecting an even integer from 60 to 70 inclusive, with the integers from 60 to 68 inclusive having an equal likelihood and 70 being half as likely.
 
This has the effect of randomly selecting an even integer from 60 to 70 inclusive, with the integers from 60 to 68 inclusive having an equal likelihood and 70 being half as likely.
This is because the mineRandom.Next(a,b) will return an integer greater than or equal to a and less than b, from internally generating a random number from 0 to 1, scaling it and offsetting it to be a random decimal number from 59 to 70, and then rounding down. This means that the range 59 to just below 61 will round to 59 or 60, which is then both forced to 60; while the numbers from 69 to 70 will round to 69 and then be converted to 70, meaning 70 has half the range. This means that the chance for jade (from 70) will be one 11th of the chance to obtain a gem, and the other gems (emerald, aquamarine, ruby, amethyst & topaz) will be double that:
+
This is because the mineRandom.Next(a,b) will return an integer greater than or equal to a and less than b, from internally generating a random number from 0 to 1, scaling it and offsetting it to be a random decimal number from 59 to 70, and then rounding down. This means that the range 59 to just below 61 will round to 59 or 60, which is then both forced to 60; while the numbers from 69 to 70 will round to 69 and then be converted to 70, meaning 70 has half the range. This means that the chance for [[jade]] (from 70) will be one 11th of the chance to obtain a gem, and the other gems ([[emerald]], [[aquamarine]], [[ruby]], [[amethyst]], and [[topaz]]) will be double that:
 
       jade = (1-chanceForOre)*(1-chanceForDiamond)*chanceForGem/11
 
       jade = (1-chanceForOre)*(1-chanceForDiamond)*chanceForGem/11
 
       other = (1-chanceForOre)*(1-chanceForDiamond)*chanceForGem*2/11
 
       other = (1-chanceForOre)*(1-chanceForDiamond)*chanceForGem*2/11
Line 240: Line 240:     
==History==
 
==History==
{{History|1.6|chooseStoneType renamed to createLitterObject. Additional difficulty can now be 2. Calico statues introduced.}
+
{{History|1.6|chooseStoneType renamed to createLitterObject. Additional difficulty can now be 2. [[Calico Statue|Calico statues]] introduced.}}
 
      
==References==
 
==References==
1,424

edits

Navigation menu