Changes

Jump to navigation Jump to search
60 bytes added ,  18:47, 4 November 2021
m
Text replacement - "tt>" to "samp>"
Line 22: Line 22:     
===Quality Ratios===
 
===Quality Ratios===
For players without the Botanist Profession, the game first tests for gold quality according to the following formula:  <tt>foraging level/30</tt>.  If the item fails this check, then the game tests for silver quality, according to the following formula:  <tt>foraging level/15 and not gold</tt>, or <tt>(1-foraging level/30)*foraging level/15</tt>.  If both checks fail, the foraged item will be normal quality.
+
For players without the Botanist Profession, the game first tests for gold quality according to the following formula:  <samp>foraging level/30</samp>.  If the item fails this check, then the game tests for silver quality, according to the following formula:  <samp>foraging level/15 and not gold</samp>, or <samp>(1-foraging level/30)*foraging level/15</samp>.  If both checks fail, the foraged item will be normal quality.
    
The table below shows the probabilities of obtaining each quality of foraged goods.
 
The table below shows the probabilities of obtaining each quality of foraged goods.
Line 690: Line 690:  
==References==
 
==References==
 
<references>
 
<references>
<ref name="spawning">Spawning of standard forage items is done in <tt>GameLocation::spawnObjects</tt>, which is triggered by <tt>GameLocation::dayUpdate</tt>. The six item per map limit is controlled by <tt>numberOfSpawnedObjectsOnMap</tt>.  The number of attempts to add an item is a random number ranging from 1 to <tt>min(4, 6-numberOfSpawnedObjectsOnMap)</tt>. For each attempt, the code checks up to 11 locations that are randomly located anywhere on the map.  An item is only placed if one of those 11 locations is a valid spawning location, and if a randomly-selected forage item also passes its probability test.</ref>
+
<ref name="spawning">Spawning of standard forage items is done in <samp>GameLocation::spawnObjects</samp>, which is triggered by <samp>GameLocation::dayUpdate</samp>. The six item per map limit is controlled by <samp>numberOfSpawnedObjectsOnMap</samp>.  The number of attempts to add an item is a random number ranging from 1 to <samp>min(4, 6-numberOfSpawnedObjectsOnMap)</samp>. For each attempt, the code checks up to 11 locations that are randomly located anywhere on the map.  An item is only placed if one of those 11 locations is a valid spawning location, and if a randomly-selected forage item also passes its probability test.</ref>
<ref name="removal">End-of-week removal of forageables is part of <tt>GameLocation::dayUpdate</tt>.  End-of-season removal is part of <tt>gameLocation::seasonUpdate</tt>.  All items with the <tt>IsSpawnedObject</tt> flag are removed, and <tt>numberOfSpawnedObjectsOnMap</tt> is set to zero.</ref>
+
<ref name="removal">End-of-week removal of forageables is part of <samp>GameLocation::dayUpdate</samp>.  End-of-season removal is part of <samp>gameLocation::seasonUpdate</samp>.  All items with the <samp>IsSpawnedObject</samp> flag are removed, and <samp>numberOfSpawnedObjectsOnMap</samp> is set to zero.</ref>
<ref name="extra_spawn">Extra calls are made to <tt>GameLocation::spawnObjects</tt> after clearing existing items (one extra call on the first of a season; two extra on Sunday morning). However, these extra calls frequently generate no extra items, because the same random-number seed (based on game ID and days played) is used every time. So the second and third calls retest the same list of locations and items as the first call.</ref>
+
<ref name="extra_spawn">Extra calls are made to <samp>GameLocation::spawnObjects</samp> after clearing existing items (one extra call on the first of a season; two extra on Sunday morning). However, these extra calls frequently generate no extra items, because the same random-number seed (based on game ID and days played) is used every time. So the second and third calls retest the same list of locations and items as the first call.</ref>
<ref name="spawnpercent">The foraged items that can spawn in a given location each season are determined by <tt>GameLocation::spawnObjects</tt> in the game code, using input from the data file <tt>Content\Locations.xnb</tt>.  The percentages provided here have been normalized to ensure that the percentages sum to 100% for each season in each location. The data was normalized by:
+
<ref name="spawnpercent">The foraged items that can spawn in a given location each season are determined by <samp>GameLocation::spawnObjects</samp> in the game code, using input from the data file <samp>Content\Locations.xnb</samp>.  The percentages provided here have been normalized to ensure that the percentages sum to 100% for each season in each location. The data was normalized by:
# Calculating the sum of all percentages listed in <tt>Locations.xnb</tt> for a season
+
# Calculating the sum of all percentages listed in <samp>Locations.xnb</samp> for a season
 
# Dividing each percentage by the sum</ref>
 
# Dividing each percentage by the sum</ref>
 
</references>
 
</references>
106,679

edits

Navigation menu