Changes

Jump to navigation Jump to search
m
Text replacement - "luck buff" to "luck buff"
Line 1: Line 1:  +
{{Stub|Work in progress}}
 
Small minable stones and ores can appear as random stones throughout the floor, or rarely as small clumps. These have different distributions<ref name="populateLevel" /><ref name="chooseStoneType" />.
 
Small minable stones and ores can appear as random stones throughout the floor, or rarely as small clumps. These have different distributions<ref name="populateLevel" /><ref name="chooseStoneType" />.
 
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 Shrine of Challenge or by accepting the 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 can appear, as well tree stumps and fallen logs. The double up of difficulty has a few affects; those relavent 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.
  −
 
  −
From random stones, for the normal mines, there is a 2.9% chance to get copper on on floors 2-39, or gold ore on floors 81-119; and on floors 41-79, there is a 15% chance to get ice crytals and a 2.465% chance to get iron ore.
  −
 
  −
//Add in more summary.
  −
 
      +
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 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 38: 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 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 mystic stones (internally chanceForMysticStone) to determine what stone to place. This code first checks for 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 becomming a purple mushroom, a 11% chance of becomming a 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 becomming a purple mushroom, a 9.35% chance of becomming 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.
    
===Metal Ores - Normal Mines===
 
===Metal Ores - Normal Mines===
Line 72: Line 68:     
===Metal Ores - Dangerous Mines===
 
===Metal Ores - Dangerous Mines===
[[File:SDV Mines Radioactive.png|300px|thumb|right|Changing distribution of radioactive ore with danger and luck (daily luck and luff buffs).]]
+
<!--[[File:SDV Mines Radioactive.png|300px|thumb|right|Changing distribution of radioactive ore with danger and luck (daily luck and luff buffs).]]-->
 
The first step is to check if the stone should be radioactive ore, with the following check:
 
The first step is to check if the stone should be radioactive ore, with the following check:
 
<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 (0.025, contribution to AverageDailyLuck) is equivalent to an additional 192.3 floors (2500/13), making 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 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.
+
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 132: Line 128:  
         }
 
         }
 
}</syntaxhighlight>
 
}</syntaxhighlight>
This has the same 2.9% chance check for ore as for the regular mines, however there are some significant differences. Firstly there was the chance for them to be replaced by radioactive ore, which depends heavily on luck. On floors 1-39, there is a 33% chance for it to set the normal stone type to stone ore; if it is less than level 30, and it doesn't return copper ore, it will return this stone ore. This gives a 32% chance to return stone ore. On floors 41-69, there is a 15% chance to return a twig instead of a stone. This means that overall (assuming no radioactive ore) on floors 41-69, 15% of the "random stones" will be weeds, 12.75% of the time they will be twigs, 2.1% of the time they will be iron, and 70.2% of the time they will be something else. Also, on floors 41-69, the rocks that spawn will be more likley to drop ore when broken, the rocks on other floors will be less likely to drop ore.
+
This has the same 2.9% chance check for ore as for the regular mines, however there are some significant differences. Firstly there was the chance for them to be replaced by [[Radioactive Ore|radioactive ore]], which depends heavily on [[luck]]. On floors 1-39, there is a 33% chance for it to set the normal stone type to stone ore; if it is less than level 30, and it doesn't return [[Copper Ore|copper ore]], it will return this stone ore. This gives a 32% chance to return stone ore. On floors 41-69, there is a 15% chance to return a twig instead of a stone. This means that overall (assuming no radioactive ore) on floors 41-69, 15% of the "random stones" will be weeds, 12.75% of the time they will be twigs, 2.1% of the time they will be iron, and 70.2% of the time they will be something else. Also, on floors 41-69, the rocks that spawn will be more likely to drop ore when broken, the rocks on other floors will be less likely to drop ore.
    
===Metal ores – Quarry levels===
 
===Metal ores – Quarry levels===
Line 173: Line 169:  
If there isn't an adjacent stone to the location being considered, there is a 45% chance that this will return nothing. However, as the stone chance was multiplied by 2 when adjusting level chances, this doesn't result in less stone on these levels.
 
If there isn't an adjacent stone to the location being considered, there is a 45% chance that this will return nothing. However, as the stone chance was multiplied by 2 when adjusting level chances, this doesn't result in less stone on these levels.
 
The brown spots are generated in <code>StardewValley.Locations.MineShaft::loadLevel</code>, where it will randomly place brown spots so that 1% of the total map area are brown spots. Technically it is possible for these to be the same square, or for these to be outside the map and have no effect.
 
The brown spots are generated in <code>StardewValley.Locations.MineShaft::loadLevel</code>, where it will randomly place brown spots so that 1% of the total map area are brown spots. Technically it is possible for these to be the same square, or for these to be outside the map and have no effect.
If it is within 4 tiles of a brown spot, there is a 1% chance for copper ore, and a 99% chance to be a normal, brown coloured rock.
+
If it is within 4 tiles of a brown spot, there is a 1% chance for [[Copper Ore|copper ore]], and a 99% chance to be a normal, brown coloured rock.
If it is 6 or more tiles away from a brown spot, there is a 1% chane for iron ore, and a 99% chance to be a normal, grey coloured rock. (Not the dark grey rocks which are stone ores)
+
If it is 6 or more tiles away from a brown spot, there is a 1% chance for [[Iron Ore|iron ore]], and a 99% chance to be a normal, grey coloured rock. (Not the dark grey rocks which are stone ores)
 
Otherwise, if it is within 6 tiles, but outside 4 tiles, there will be no rocks. This means that multiple brown spots can connect, but there should be a gap between brown rocks and grey rocks.
 
Otherwise, if it is within 6 tiles, but outside 4 tiles, there will be no rocks. This means that multiple brown spots can connect, but there should be a gap between brown rocks and grey rocks.
    
===Other ores===
 
===Other ores===
Other than for radioactive ore up until this point, luck has not factored into the calculation, and level has only affected what area is used and removed ores on floors divisible by 5.
+
Other than for [[Radioactive Ore|radioactive ore]] up until this point, [[luck]] has not factored into the calculation, and level has only affected what area is used and removed ores on floors divisible by 5.
 
However, if it does not return an ore or stone above (or null for a quarry), it moves on to gemstone ores, dark grey rocks (stone ore), purple stones and mystic stones.
 
However, if it does not return an ore or stone above (or null for a quarry), it moves on to gemstone ores, dark grey rocks (stone ore), purple stones and mystic stones.
 
This is done in the following complex code (code related to colour removed for simplicity, it will return a coloured object instead of an object):
 
This is done in the following complex code (code related to colour removed for simplicity, it will return a coloured object instead of an object):
Line 216: 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. Diamonds 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), 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 263: Line 259:  
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]] & [[topaz]]) will be double that:
 
       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 280: 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 daily luck will increase your chance of finding diamonds, gems, 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 349: 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. Otherwise, if the floor is greater than 20, it isn't area 40, there is a 10% chance to return a red mushroom. Otherwise there is a 25% chance to return an item based upon the area, or a 100% chance if 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. 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 8% of the time, otherwise there is a 5/6th chance for it to be one of seaweed, coral, sea urchin, clam or a nautilus shell; the reamining 1/6th will be nothing, ending up with the default quartz. For area 40, the item based upon area will be a 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, a 25% chance to be a common mushroom and a 25% chance to be a red mushroom, with an 8% chance to be overridden by a purple mushroom. In area 80, the area based item is 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]].  
    
{| class="wikitable"
 
{| class="wikitable"
Line 383: Line 379:     
==Terrain Features==
 
==Terrain Features==
If the mine is set to dangerous, then additional terrain features can be added. This occurs after checking for stones, monsters, items and large resources. If the floor is between 40 and 70, then there is a 1% chance to generate a mahogany tree. Otherwise there is a 10% chance to add grass if the floor is between 40 and 70, or above 80.
+
If the mine is set to dangerous, then additional terrain features can be added. This occurs after checking for stones, monsters, items and large resources. If the floor is between 40 and 70, then there is a 1% chance to generate a [[Mahogany Tree|mahogany tree]]. Otherwise there is a 10% chance to add grass if the floor is between 40 and 70, or above 80.
    
==Area Uniques==
 
==Area Uniques==
Line 399: 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 daily luck. The maximum possible average daily luck is 0.1 from random luck and 0.025 from the 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.
Line 407: Line 403:  
However, each try chooses a random tile on the map and will only place an ore clump there if the tile is free, resulting in less than these numbers. But if successful, it will then have the possibility to expand outwards to cover multiple tiles with the ore.
 
However, each try chooses a random tile on the map and will only place an ore clump there if the tile is free, resulting in less than these numbers. But if successful, it will then have the possibility to expand outwards to cover multiple tiles with the ore.
   −
To choose which type of ore to add it calls the function <code>StardewValley.Locations.MineShaft::getAppropriateOre</code><ref name="whichOre" />. In this function it sets the default to 751 (copper ore) and then modifies it based upon mine area. If it is area 0 or 10, and the mines are difficult, it will change it to 849, a different type of copper ore. For area 40, if it is difficult it will be iron, otherwise, 80% of the time it will be iron. For area 80, 80% of the time it will be gold. Then just before returning if it is not area 40 and not difficult, then there is a 25% chance 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" />. In this function it sets the default to 751 ([[Copper Ore|copper ore]]) and then modifies it based upon mine area. If it is area 0 or 10, and [[The Mines|the mines]] are difficult, it will change it to 849, a different type of [[Copper Ore|copper ore]]. For area 40, if it is difficult it will be [[Iron Ore|iron]], otherwise, 80% of the time it will be iron. For area 80, 80% of the time it will be [[Gold Ore|gold]]. Then just before returning if it is not area 40 and not difficult, then there is a 25% chance to set the ore to 668 or 670, which are the dark grey rocks (stone ore).
    
This results in the following chances for the regular mines:
 
This results in the following chances for the regular mines:
Line 434: Line 430:  
</syntaxhighlight>
 
</syntaxhighlight>
   −
This results in a chance to find ore of 5.1% at worst, and 5.7% at best; with a corresponding 47.45% to 47.15% chance to obtain stone. If it would generate ore, then there is a 25% chance to obtain coal, doubled to 50% with the [[Mining#Mining_Skill|Prospector profession]]. This results in approximately a 1% chance to get coal from a rock.
+
This results in a chance to find ore of 5.1% at worst, and 5.7% at best; with a corresponding 47.45% to 47.15% chance to obtain stone. If it would generate ore, then there is a 25% chance to obtain [[coal]], doubled to 50% with the [[Mining#Mining Skill|Prospector profession]]. This results in approximately a 1% chance to get coal from a rock.
    
Then inside <code>StardewValley.Locations.MineShaft::getOreIndexForLevel</code>, the following code is run to obtain the ore<ref name="oreIndex" />:   
 
Then inside <code>StardewValley.Locations.MineShaft::getOreIndexForLevel</code>, the following code is run to obtain the ore<ref name="oreIndex" />:   
106,004

edits

Navigation menu