Talk:Trinkets: Difference between revisions
Appearance
imported>Darkstreamfarm added Trinket Source discussion section |
imported>第二个熺 →Probability obtained from Crates and Barrels: new section |
||
| Line 2: | Line 2: | ||
I added a "source" column and included information on trinkets I've obtained. --[[User:Darkstreamfarm|Darkstreamfarm]] ([[User talk:Darkstreamfarm|talk]]) 05:06, 27 March 2024 (UTC) | I added a "source" column and included information on trinkets I've obtained. --[[User:Darkstreamfarm|Darkstreamfarm]] ([[User talk:Darkstreamfarm|talk]]) 05:06, 27 March 2024 (UTC) | ||
== Probability obtained from Crates and Barrels == | |||
In the game code <samp>BreakableContainer::releaseContents</samp>, the code for determining whether to generate four types of seeds is at the very beginning, as follows: | |||
<pre> | |||
if (r.NextDouble() < 0.2) | |||
{ | |||
if (r.NextDouble() < 0.1) | |||
{ | |||
Game1.createMultipleItemDebris(Utility.getRaccoonSeedForCurrentTimeOfYear(who, r), new Vector2(x, y) * 64f + new Vector2(32f), -1, location); | |||
} | |||
return; | |||
} | |||
</pre> | |||
When the random number is less than 0.2, this section of code executes and directly returns, so the subsequent code does not execute. Therefore, the probability of all other items appearing after this code segment should be multiplied by 0.8. This affects the probability of all items available from the container, including trinkets. [[User:第二个熺|第二个熺]] ([[User talk:第二个熺|talk]]) 14:35, 30 September 2024 (UTC) | |||
Revision as of 14:35, 30 September 2024
Trinket Source
I added a "source" column and included information on trinkets I've obtained. --Darkstreamfarm (talk) 05:06, 27 March 2024 (UTC)
Probability obtained from Crates and Barrels
In the game code BreakableContainer::releaseContents, the code for determining whether to generate four types of seeds is at the very beginning, as follows:
if (r.NextDouble() < 0.2)
{
if (r.NextDouble() < 0.1)
{
Game1.createMultipleItemDebris(Utility.getRaccoonSeedForCurrentTimeOfYear(who, r), new Vector2(x, y) * 64f + new Vector2(32f), -1, location);
}
return;
}
When the random number is less than 0.2, this section of code executes and directly returns, so the subsequent code does not execute. Therefore, the probability of all other items appearing after this code segment should be multiplied by 0.8. This affects the probability of all items available from the container, including trinkets. 第二个熺 (talk) 14:35, 30 September 2024 (UTC)