Changes

Jump to navigation Jump to search
3,898 bytes added ,  22:12, 24 August 2020
revamp Spawning section
Line 3: Line 3:     
Most forageables can be found throughout their season.  One exception is [[Salmonberry]], which can only be found during Salmonberry Season ([[Spring]] 15-18), on bushes around town.  Blackberries can be found on the ground during [[Fall]], but during Blackberry Season ([[Fall]] 8-11), they can also be found on bushes throughout town.
 
Most forageables can be found throughout their season.  One exception is [[Salmonberry]], which can only be found during Salmonberry Season ([[Spring]] 15-18), on bushes around town.  Blackberries can be found on the ground during [[Fall]], but during Blackberry Season ([[Fall]] 8-11), they can also be found on bushes throughout town.
  −
==Spawning Limit==
  −
0-4 new forageables spawn each day in each map (''i.e.'', areas bounded by screen transitions). There is a hard cap of 6 spawns allowed in any area at a time.  One exception to this rule is [[The Beach]].  The area at the right of the beach, that can be accessed only after repairing the bridge with 300 [[Wood]], is considered a separate area, and can contain more than 6 items on any given day.  Another exception are the [[Spring Onion|Spring Onions]] that grow south of [[Leah's Cottage]] in [[Cindersap Forest]].  Spring Onions don't count against the limit and are reset every day. All other forageables reset when the player goes to sleep on Saturday night.
      
==Quality==
 
==Quality==
Line 143: Line 140:  
{{:Survival Burger|RecipeRow}}
 
{{:Survival Burger|RecipeRow}}
 
{{Recipes|footer}}
 
{{Recipes|footer}}
 +
 +
==Spawning==
 +
New forageable items can potentially spawn (appear) overnight in any exterior map.<ref name="spawning" /> This section describes the rules used to spawn all typical forageable items.  However, specialized items are handled differently and are described on their individual pages, namely [[Spring Onion]]s in [[Cindersap Forest]]; [[Coral]], [[Sea Urchin]]s and [[Seaweed]] at [[the Beach]]; fruit in [[the Farm Cave]]; all forageables on the [[Forest Farm Map]].  Also, [[Salmonberry]] bushes, [[Blackberry]] bushes, [[Winter Root]]s, and [[Snow Yam]]s don't spawn individual items.
 +
 +
There is a hard limit of six standard forageable items per map (''i.e.'', areas bounded by screen transitions), so leaving uncollected items can reduce how many new items spawn.  As long as there are at most two uncollected items on a map, the game tries to spawn 1-4 new items per night.  The upper limit is reduced by one for each extra uncollected item.  However, each of the attempts may fail to find a valid item and location, so the actual number of new items is generally smaller.
 +
 +
Only a subset of all the tiles on each map are valid spawning locations.  On most maps, forageable items can only spawn on the green (grassy-type) tiles, and in fact only on certain specific types of green tiles.  [[The Beach]] and [[the Desert]] are exceptions, where spawning is possible on most yellow (sandy-type) tiles.  Items never spawn in occupied locations (trees, chests, weeds, sticks, stones, etc.) They also never spawn in hidden tiles behind buildings, bushes, non-removable trees, or other permanent features.  They can spawn behind removable trees (ones that can be chopped down; they also turn semi-transparent when the player walks behind them), but the spawn rate is 90% smaller in about half of the tiles behind a tree.
 +
 +
Therefore, the fraction of valid tiles differs for every map, which directly affects the chance of items spawning on each map.  It is also affected by the player's actions.  Removing debris (weeds, etc.) and chopping down trees can increase the number of valid tiles, whereas placing equipment (chests, etc.) may decrease the number.  Planting trees can also have an effect: even though (on most maps) trees can only be planted in tiles where forage items can't spawn, they reduce the spawn chance in some tiles behind the tree (and also make it hard to find items that do spawn).  However, these effects are generally small, unless a large fraction of the map tiles are occupied.  All spawn rates are calculated assuming the default trees are in place and fully grown, but that all other tiles are cleared.
 +
 +
All uncollected forageable items are removed from the map overnight before Sunday morning and before the first day of a season.<ref name="removal" />  This cleanup applies both to standard forageable items and nearly all specialized items (fruit in [[the Farm Cave]] is the only known exception).  Even non-season-specific items are removed at the start of a new season.  In order to help repopulate the map, the chances of new items spanwing are slightly higher on these days.<ref name="extra_spawn" />
 +
 +
Forageable items will be destroyed if they are in the path of a [[villager]].
    
==Foraged Items==
 
==Foraged Items==
Line 630: Line 640:  
==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="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="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="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 <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:
 
# Calculating the sum of all percentages listed in <tt>Locations.xnb</tt> for a season
 
# Calculating the sum of all percentages listed in <tt>Locations.xnb</tt> for a season

Navigation menu