This wiki is a read-only version of the Stardew Valley Wiki. The official editable wiki maintained by ConcernedApe can be found at stardewvalleywiki.com

Changes

Jump to: navigation, search

Modding:Weapon data

664 bytes added, 18:57, 4 October 2019
expand container drop info into its own section
| 9
| ''74''
| The base mine level. When a mine container is broken, which affects the probability of the weapon being added to the loot table increases the closer this is to the base mine level: 100% if equal, 92% if 5 levels apart, 71% if 10 levels apart, 46% if 15 levels apart, 25% if 20 level aparts, 11% if 25 levels apart, 4% if 30 levels apart, etc. (This is essentially a bell curve centered on the base mine level, with [[wikipedia:Gaussian function#Mine container drops|Gaussian functionmine container drops]] <code>e<sup>(-(current mine level - base mine level)<sup>2</sup> / (2 * 12<sup>2</sup>))</sup></code>). If multiple weapons are selected, one is selected randomly to drop.
|-
| 10
| ''50''
| The minimum mine level on which the item can be found in containersfor [[#Mine container drops|mine container drops]].
|-
| 11
Weapons have a hardcoded category of -98 (<tt>Object.weaponCategory</tt>).
 
==Mine container drops==
When the player breaks a container in [[The Mines|the mines]], there's a chance it will drop a weapon. Here's how the weapon to drop is chosen<ref>See <tt>Utility.getUncommonItemForThisMineLevel</tt> in the game code.</ref>:
 
<ol>
<li>Match weapons whose minimum mine level ([[#Format|field 10]]) is less than the current mine level.</li>
<li>From that list, match weapons with a probability check based on the gap between the base mine level ([[#Format|field 9]]) and current mine level. The probability is a bell curve centered on the base mine level:
{| class="wikitable"
|-
! level difference
! probability
|-
| 0
| 100%
|-
| 5
| 92%
|-
| 10
| 71%
|-
| 15
| 46%
|-
| 20
| 25%
|-
| 25
| 4%
|}
The difference applies in both directions; for example, two weapons whose base levels are 5 below and 5 above the current level both have a 92% chance. (The probability is calculated with a [[wikipedia:Gaussian function|Gaussian function]] <code>e<sup>-(current mine level - base mine level)<sup>2</sup> / (2 * 12<sup>2</sup>)</sup></code>.)</li>
<li>From the remaining list of weapons, randomly choose one to drop.</li>
</ol>
 
==References==
<references />
[[Category:Modding]]
Protected, translators
5,421
edits

Navigation menu