Changes

Jump to navigation Jump to search
m
Text replacement - "luck buff" to "luck buff"
Line 3: Line 3:  
On average there will be less than 0.67 small resource clumps on each floor with neutral luck, and less than 1 for the largest possible luck.
 
On average there will be less than 0.67 small resource clumps on each floor with neutral luck, and less than 1 for the largest possible luck.
 
The other type of resource found are large (2 by 2) stones, as well as random items.
 
The other type of resource found are large (2 by 2) stones, as well as random items.
The mine difficulty can also be changed by using the [[The Mines#Shrine of Challenge|Shrine of Challenge]] or by accepting the [[Quest#List of Mr. Qi's Special Orders|Qi quest]] Danger in the Deep. This provides 3 levels, normal (0), one of these active (1), or both of these active (2). If the mine is difficult, [[Radioactive Ore|radioactive ore]] can appear, as well as [[Large Stump|large stumps]] and [[Large Log|large logs]]. The double up of difficulty has a few affects; those relevant to this page are that it increases the chance of finding radioactive ore, monsters spawning and leapers having partners.
+
The mine difficulty can also be changed by using the [[The Mines#Shrine of Challenge|Shrine of Challenge]] or by accepting the [[Quests#List of Mr. Qi's Special Orders|Qi quest]] Danger in the Deep. This provides 3 levels, normal (0), one of these active (1), or both of these active (2). If the mine is difficult, [[Radioactive Ore|radioactive ore]] can appear, as well as [[Large Stump|large stumps]] and [[Large Log|large logs]]. The double up of difficulty has a few affects; those relevant to this page are that it increases the chance of finding radioactive ore, monsters spawning and leapers having partners.
   −
Floors have a chance of being a quarry level, which modifies the chances and are dealt with seperately.
+
Floors have a chance of being a quarry level, which modifies the chances and are dealt with separately.
   −
From random stones, for the normal mines, there is a 2.9% chance to get [[Copper Ore|copper]] on on floors 2-39, or [[Gold Ore|gold ore]] on floors 81-119; and on floors 41-79, there is a 15% chance to get ice crystals and a 2.465% chance to get [[Iron Ore|iron ore]].
+
From random stones, for the normal mines, there is a 2.9% chance to get [[Copper Ore|copper ore]] on floors 2-39, or [[Gold Ore|gold ore]] on floors 81-119; and on floors 41-79, there is a 15% chance to get ice crystals and a 2.465% chance to get [[Iron Ore|iron ore]].
    
==Populate Levels==
 
==Populate Levels==
Line 34: Line 34:  
* Floors 80-120 have an area of 80.
 
* Floors 80-120 have an area of 80.
 
==Random ore placement (stoneChance and chooseStoneType)==
 
==Random ore placement (stoneChance and chooseStoneType)==
The game goes through 3 stages, first if the mine area is 40, there is a 15% chance for the stone to be either an ice crystal (319, 320, 321), or if [[The Mines|the mines]] are set to dangerous and it is between floor 41 and 69, then it will be a weed (313, 314, 315). Then it checks if it is a mushroom floor, and if so there is a 55% chance to not generate a stone and 25% of the time it doesn't it will generate a mushroom, being a purple mushroom 20% of the time and a red mushroom otherwise. If it fails the weed check, and the 55% chance on a mushroom floor (or isn't a mushroom floor), it then uses the function <code>StardewValley.Locations.MineShaft::chooseStoneType</code>, passing the gemstone chance from above and the magic numbers 0.001 and 5e-5 for gem nodes (internally chanceForPurpleStone) and [[Mining#Mystic Stone|mystic stones]] (internally chanceForMysticStone) to determine what stone to place. This code first checks for [[Radioactive Ore|radioactive ore]], then through each mine area for metal ores, then for other ores.
+
The game goes through 3 stages, first if the mine area is 40, there is a 15% chance for the stone to be either an ice crystal (319, 320, 321), or if [[The Mines|the mines]] are set to dangerous and it is between floor 41 and 69, then it will be a weed (313, 314, 315). Then it checks if it is a mushroom floor, and if so there is a 55% chance to not generate a stone and 25% of the time it doesn't it will generate a mushroom, being a [[Purple Mushroom|purple mushroom]] 20% of the time and a [[Red Mushroom|red mushroom]] otherwise. If it fails the weed check, and the 55% chance on a mushroom floor (or isn't a mushroom floor), it then uses the function <code>StardewValley.Locations.MineShaft::chooseStoneType</code>, passing the gemstone chance from above and the magic numbers 0.001 and 5e-5 for gem nodes (internally chanceForPurpleStone) and [[Mining#Mystic Stone|mystic stones]] (internally chanceForMysticStone) to determine what stone to place. This code first checks for [[Radioactive Ore|radioactive ore]], then through each mine area for metal ores, then for other ores.
    
This means overall on a mushroom floor, not in area 40, the default stone has a 45% chance of becoming a stone, a 2.75% chance of becoming a [[Purple Mushroom|purple mushroom]], a 11% chance of becoming a [[Red Mushroom|red mushroom]], and a 41.25% chance of being nothing; and in area 40 the default stone has a 15% chance of becoming a weed, a 38.25% chance of becoming a stone, a 2.3375% chance of becoming a purple mushroom, a 9.35% chance of becoming a red mushroom, and a 35.0625% chance of being nothing. The below calculations and graphs will include weeds in area 40, but not mushroom floors.
 
This means overall on a mushroom floor, not in area 40, the default stone has a 45% chance of becoming a stone, a 2.75% chance of becoming a [[Purple Mushroom|purple mushroom]], a 11% chance of becoming a [[Red Mushroom|red mushroom]], and a 41.25% chance of being nothing; and in area 40 the default stone has a 15% chance of becoming a weed, a 38.25% chance of becoming a stone, a 2.3375% chance of becoming a purple mushroom, a 9.35% chance of becoming a red mushroom, and a 35.0625% chance of being nothing. The below calculations and graphs will include weeds in area 40, but not mushroom floors.
Line 72: Line 72:  
<syntaxhighlight lang="C#">
 
<syntaxhighlight lang="C#">
 
if (this.GetAdditionalDifficulty() > 0 && this.mineLevel % 5 != 0 && this.mineRandom.NextDouble() < (double)this.GetAdditionalDifficulty() * 0.001 + (double)((float)this.mineLevel / 100000f) + Game1.player.team.AverageDailyLuck() / 13.0 + Game1.player.team.AverageLuckLevel() * 0.0001500000071246177)</syntaxhighlight>
 
if (this.GetAdditionalDifficulty() > 0 && this.mineLevel % 5 != 0 && this.mineRandom.NextDouble() < (double)this.GetAdditionalDifficulty() * 0.001 + (double)((float)this.mineLevel / 100000f) + Game1.player.team.AverageDailyLuck() / 13.0 + Game1.player.team.AverageLuckLevel() * 0.0001500000071246177)</syntaxhighlight>
For this, the luck boost from the [[Special Charm|special charm]] (0.025, contribution to AverageDailyLuck) is equivalent to an additional 192.3 floors (2500/13), making [[Radioactive Ore|radioactive ore]] more likely on floor 1 with a special charm than floor 100 without it. A single point of luck (such as from a food buff) is worth ~15 floors. With the best possible luck 1.2% of stones will be radioactive ore. With the worst possible [[luck]] no radioactive ore will appear in [[The Mines|the mines]] at all, and the worst possible [[Luck#Daily Luck|daily luck]] would require a luck buff of 24 along with the special charm to be able to have any chance to find radioactive ore. Also note that radioactive ore will not appear on any floor divisible by 5.
+
For this, the luck boost from the [[Special Charm|special charm]] (0.025, contribution to AverageDailyLuck) is equivalent to an additional 192.3 floors (2500/13), making [[Radioactive Ore|radioactive ore]] more likely on floor 1 with a special charm than floor 100 without it. A single point of [[luck]] (such as from a food buff) is worth ~15 floors. With the best possible luck 1.2% of stones will be radioactive ore. With the worst possible luck no radioactive ore will appear in [[The Mines|the mines]] at all, and the worst possible daily [[luck]] would require a luck buff of 24 along with the special charm to be able to have any chance to find radioactive ore. Also note that radioactive ore will not appear on any floor divisible by 5.
   −
If the mines are doubly difficult (Qi quest "Danger in the Deep" while Shrine of Challenge is active), it will contribute an extra 0.1%. This is not used in the below calculations.
+
If the mines are doubly difficult ([[Quests#List of Mr. Qi's Special Orders|Qi quest]] "Danger in the Deep" while the [[The Mines#Shrine of Challenge|Shrine of Challenge]] is active), it will contribute an extra 0.1%. This is not used in the below calculations.
    
After this, it will go through the different areas, picking a default stone, and checking for ores, returning if one is found.
 
After this, it will go through the different areas, picking a default stone, and checking for ores, returning if one is found.
Line 212: Line 212:     
[[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 analyzing 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 the [[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.
 
The chance for gem nodes and mystic stones don't directly use the floor, and the multiplier for the chance is used in all parts of the calculation. Now the range for averageDailyLuck/2 (0.1125) is quite large, over 20% of the base 0.5 chance, making this much more dependent upon luck. Likewise, the 14 levels from mining contribute 0.112, over 10%, but the 4 gained from food buffs only contribute 0.032, much less significant. Likewise, for Mystic Stones the contribution from luck is over 10% of the base of 1, with the mining levels having a similarly reduced impact.
 
The chance for gem nodes and mystic stones don't directly use the floor, and the multiplier for the chance is used in all parts of the calculation. Now the range for averageDailyLuck/2 (0.1125) is quite large, over 20% of the base 0.5 chance, making this much more dependent upon luck. Likewise, the 14 levels from mining contribute 0.112, over 10%, but the 4 gained from food buffs only contribute 0.032, much less significant. Likewise, for Mystic Stones the contribution from luck is over 10% of the base of 1, with the mining levels having a similarly reduced impact.
Line 262: Line 262:  
       jade = (1-chanceForDiamond)*chanceForGem/11
 
       jade = (1-chanceForDiamond)*chanceForGem/11
 
       other = (1-chanceForDiamond)*chanceForGem*2/11
 
       other = (1-chanceForDiamond)*chanceForGem*2/11
However, if you have not yet reached the bottom of the mines, and the floor generated is less than floor 80, this distribution will be different. Until floor 40 there is an equal chance for amethyst or topaz. Between floor 40 and floor 80 there is a complex chance where the chance for emerald and ruby are replaced with amethyst, topaz, aquamarine and jade; this results in an 18.2% chance for Jade, and a 27.3% chance for each of amethyst, topaz and aquamarine.
+
However, if you have not yet reached the bottom of the mines, and the floor generated is less than floor 80, this distribution will be different. Until floor 40 there is an equal chance for amethyst or topaz. Between floor 40 and floor 80 there is a complex chance where the chance for emerald and ruby are replaced with amethyst, topaz, aquamarine and jade; this results in an 18.2% chance for jade, and a 27.3% chance for each of amethyst, topaz and aquamarine.
    
The chance to not be a gem stone ore, and be some other option (other than diamond) relies upon either passing the diamond check, or failing the diamond check and failing the gemstone check. This chance is equal to:
 
The chance to not be a gem stone ore, and be some other option (other than diamond) relies upon either passing the diamond check, or failing the diamond check and failing the gemstone check. This chance is equal to:
Line 276: Line 276:  
       rock = (1-chanceForDiamond)*(1-chanceForGem)*(1-chanceForPurple)*(1-chanceForMystic)*(1-chanceForStone)
 
       rock = (1-chanceForDiamond)*(1-chanceForGem)*(1-chanceForPurple)*(1-chanceForMystic)*(1-chanceForStone)
   −
Due to the interaction between the different checks it is hypothetically possible for the chance for one of these to be found increasing to decrease the chance of finding others. This is observed with the increasing chance to find mystic stones on floor 100 reducing the chance to find gem nodes and gem stone ores. Additionally, the increase in chance of finding these valuable items due to [[luck]] or [[mining]] level reduces the chance of finding dark grey rocks and rocks, but does not parasitically affect each other, e.g. a higher [[Luck#Daily Luck|daily luck]] will increase your chance of finding [[diamond]]s, gems, [[Mining#Mystic Stone|mystic stones]] and gem nodes, and will decrease the chance of finding dark grey rocks and normal rocks.
+
Due to the interaction between the different checks it is hypothetically possible for the chance for one of these to be found increasing to decrease the chance of finding others. This is observed with the increasing chance to find mystic stones on floor 100 reducing the chance to find gem nodes and gem stone ores. Additionally, the increase in chance of finding these valuable items due to [[luck]] or [[mining]] level reduces the chance of finding dark grey rocks and rocks, but does not parasitically affect each other, e.g. a higher daily [[luck]] will increase your chance of finding [[diamond]]s, [[Minerals#Gems|gems]], [[Mining#Mystic Stone|mystic stones]] and gem nodes, and will decrease the chance of finding dark grey rocks and normal rocks.
    
==Items==
 
==Items==
Line 345: Line 345:  
}
 
}
 
</syntaxhighlight>
 
</syntaxhighlight>
First the item is set to 80 ([[Quartz]]) which will be returned if all other checks fail. Then, if the floor is greater than 80, there is a 5% chance for it to return a [[Purple Mushroom|purple mushroom]]. Otherwise, if the floor is greater than 20, it isn't area 40, there is a 10% chance to return a [[Red Mushroom|red mushroom]]. Otherwise there is a 25% chance to return an item based upon the area, or a 100% chance if [[The Mines|the mines]] are set to difficult. Otherwise it will return [[quartz]]. For a quarry floor, there is no area item, so it will return a mushroom or quartz.
+
First the item is set to 80 ([[quartz]]) which will be returned if all other checks fail. Then, if the floor is greater than 80, there is a 5% chance for it to return a [[Purple Mushroom|purple mushroom]]. Otherwise, if the floor is greater than 20, it isn't area 40, there is a 10% chance to return a [[Red Mushroom|red mushroom]]. Otherwise there is a 25% chance to return an item based upon the area, or a 100% chance if [[The Mines|the mines]] are set to difficult. Otherwise it will return [[quartz]]. For a quarry floor, there is no area item, so it will return a mushroom or quartz.
 
In areas 0 and 10, if the mines are not set to dangerous or it is above floor 30, the item will be an [[Earth Crystal|earth crystal]]. If the mines are dangerous and it is below floor 30, the area item will be a [[pearl]] 0.5% of the time, otherwise a [[Rainbow Shell|rainbow shell]] 8% of the time, otherwise there is a 5/6th chance for it to be one of [[seaweed]], [[coral]], [[Sea Urchin|sea urchin]], [[clam]] or a [[Nautilus Shell|nautilus shell]]; the remaining 1/6th will be nothing, ending up with the default [[quartz]]. For area 40, the item based upon area will be a [[Frozen Tear|frozen tear]] if the mines are not set to dangerous or it is above floor 70, otherwise there is a 50% chance to be a [[Fiddlehead Fern|fiddlehead fern]], a 25% chance to be a [[Common Mushroom|common mushroom]] and a 25% chance to be a [[Red Mushroom|red mushroom]], with an 8% chance to be overridden by a [[Purple Mushroom|purple mushroom]]. In area 80, the area based item is [[Fire Quartz|fire quartz]].  
 
In areas 0 and 10, if the mines are not set to dangerous or it is above floor 30, the item will be an [[Earth Crystal|earth crystal]]. If the mines are dangerous and it is below floor 30, the area item will be a [[pearl]] 0.5% of the time, otherwise a [[Rainbow Shell|rainbow shell]] 8% of the time, otherwise there is a 5/6th chance for it to be one of [[seaweed]], [[coral]], [[Sea Urchin|sea urchin]], [[clam]] or a [[Nautilus Shell|nautilus shell]]; the remaining 1/6th will be nothing, ending up with the default [[quartz]]. For area 40, the item based upon area will be a [[Frozen Tear|frozen tear]] if the mines are not set to dangerous or it is above floor 70, otherwise there is a 50% chance to be a [[Fiddlehead Fern|fiddlehead fern]], a 25% chance to be a [[Common Mushroom|common mushroom]] and a 25% chance to be a [[Red Mushroom|red mushroom]], with an 8% chance to be overridden by a [[Purple Mushroom|purple mushroom]]. In area 80, the area based item is [[Fire Quartz|fire quartz]].  
   Line 395: Line 395:     
==Ore Clumps==
 
==Ore Clumps==
In the <code>StardewValley.Locations.MineShaft::tryToAddOreClumps</code><ref name="oreClumps" /> function, a try will only be made if a random number is less than 0.55 plus the average [[Luck#Daily Luck|daily luck]]. The maximum possible average daily luck is 0.1 from random luck and 0.025 from the [[Special Charm|special charm]]<ref name="dailyLuck" />. This means with neutral luck there is a 55% chance to try, and with the best possible luck there is a 67.5% chance.
+
In the <code>StardewValley.Locations.MineShaft::tryToAddOreClumps</code><ref name="oreClumps" /> function, a try will only be made if a random number is less than 0.55 plus the average daily [[luck]]. The maximum possible average daily luck is 0.1 from random luck and 0.025 from the [[Special Charm|special charm]]<ref name="dailyLuck" />. This means with neutral luck there is a 55% chance to try, and with the best possible luck there is a 67.5% chance.
 
It will try once, and then generate a random number and keep going if that random number is less than 0.25 plus the average daily luck.
 
It will try once, and then generate a random number and keep going if that random number is less than 0.25 plus the average daily luck.
 
This means there will be 1 chance, plus a 25% chance with neutral luck or a 37.5% chance with best possible luck.
 
This means there will be 1 chance, plus a 25% chance with neutral luck or a 37.5% chance with best possible luck.
106,342

edits

Navigation menu