Changes

Jump to navigation Jump to search
Add new data field that was added in Stardew Valley 1.6
Line 4: Line 4:     
==Parsing fish spawn conditions==
 
==Parsing fish spawn conditions==
The game checks two places to determine which fish to spawn when the player is fishing. This only applies to normal fish; the chance of spawning a legendary fish is calculated separately by the location code, ''before'' following the rules below. <small>(Reverse engineered from <tt>BobberBar</tt> and <tt>GameLocation::getFish</tt>.)</small>
+
The game checks two places to determine which fish to spawn when the player is fishing. This only applies to normal fish; the chance of spawning a legendary fish is calculated separately by the location code, ''before'' following the rules below. <small>(Reverse engineered from <samp>BobberBar</samp> and <samp>GameLocation::getFish</samp>.)</small>
    
===Spawn locations===
 
===Spawn locations===
Line 16: Line 16:  
* All other locations only have area -1, so where you fish from has no impact.
 
* All other locations only have area -1, so where you fish from has no impact.
   −
The fish that can be spawned in a given location are defined in the slash-delimited data from <code>Data\Locations.xnb</code>, specifically field indexes 4 (spring), 5 (summer), 6 (fall), and 7 (winter). Each field contains any number of {{t|int fishID}} (matching <code>Data\Fish.xnb</code>) + {{t|int areaID}} (or -1 for any area) pairs. For example, [[Cindersap Forest]] has this fish data for summer: <code>153 -1 145 0 144 -1 138 0 132 0 706 0 704 0 702 0</code>. That can be parsed as:
+
The fish that can be spawned in a given location are defined in the slash-delimited data from <code>Data\Locations.xnb</code> (see also: [[Modding:Location data]]) specifically field indexes 4 (spring), 5 (summer), 6 (fall), and 7 (winter). Each field contains any number of {{t|int fishID}} (matching <code>Data\Fish.xnb</code>) + {{t|int areaID}} (or -1 for any area) pairs. For example, [[Cindersap Forest]] has this fish data for summer: <code>153 -1 145 0 144 -1 138 0 132 0 706 0 704 0 702 0</code>. That can be parsed as:
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 124: Line 124:  
| {{t|darting randomness}}
 
| {{t|darting randomness}}
 
| <code>floater</code>
 
| <code>floater</code>
| How the bobber behaves during the fishing minigame; one of <code>mixed</code>, <code>smooth</code>, <code>floater</code>, or <code>sinker</code>.
+
| How the bobber behaves during the fishing minigame; one of <code>mixed</code>, <code>smooth</code>, <code>floater</code>, <code>sinker</code>, or <code>dart</code>.
 
|-
 
|-
 
| 3
 
| 3
Line 143: Line 143:  
| [{{t|season}}]+
 
| [{{t|season}}]+
 
| <code>summer</code>
 
| <code>summer</code>
| Unused; seasons are taken from <tt>Data/Locations</tt> instead.
+
| Unused; seasons are taken from <samp>Data/Locations</samp> instead.
 
|-
 
|-
 
| 7
 
| 7
Line 153: Line 153:  
| {{t|locations}}
 
| {{t|locations}}
 
| <code>690 .4 685 .1</code>
 
| <code>690 .4 685 .1</code>
| Unused; locations are taken from <tt>Data/Locations</tt> instead.
+
| Unused; locations are taken from <samp>Data/Locations</samp> instead.
 
|-
 
|-
 
| 9
 
| 9
Line 174: Line 174:  
| <code>0</code>
 
| <code>0</code>
 
| The minimum [[skills|fishing level]] needed for this fish to appear.
 
| The minimum [[skills|fishing level]] needed for this fish to appear.
 +
|-
 +
| 13
 +
| {{t|first-catch tutorial eligible}}
 +
| <code>true</code>
 +
| Indicates whether the fish can be selected for the first-catch tutorial.
 
|}
 
|}
   Line 186: Line 191:     
The relative probability that a specific type of fish (including algae and seaweed) in a location will spawn during a specific time and weather is: ''{relative spawn probability} = {base spawn probability} * POWER( ({all fish failure rate} - {this fish failure rate}) / ({number of fish} - 1}), ({fish queue position} - 1))'', where ''all fish'' and ''number of fish'' are all other fish present at the same location during the same time and weather conditions. This calculation is repeated for each possible position in the spawning order (''fish queue position'') for a type of fish, and then averaged. The total added relative spawn probability for all fish at a location at a certain time and weather will always be under 100%, with any remaining difference under 100% being the relative probability of catching [[trash]]: ''{trash probability} = 100% - {total relative spawn probability}''.
 
The relative probability that a specific type of fish (including algae and seaweed) in a location will spawn during a specific time and weather is: ''{relative spawn probability} = {base spawn probability} * POWER( ({all fish failure rate} - {this fish failure rate}) / ({number of fish} - 1}), ({fish queue position} - 1))'', where ''all fish'' and ''number of fish'' are all other fish present at the same location during the same time and weather conditions. This calculation is repeated for each possible position in the spawning order (''fish queue position'') for a type of fish, and then averaged. The total added relative spawn probability for all fish at a location at a certain time and weather will always be under 100%, with any remaining difference under 100% being the relative probability of catching [[trash]]: ''{trash probability} = 100% - {total relative spawn probability}''.
 +
 +
==Aquarium fish==
 +
Fish in [[Fish Tank|fish tank]]s can be edited via the <samp>Data/AquariumFish</samp> asset:
 +
 +
{| class="wikitable"
 +
|-
 +
! index
 +
! field
 +
! purpose
 +
|-
 +
| 0
 +
| sprite index
 +
| The index of the sprite in the <samp>LooseSprites/AquariumFish</samp> spritesheet, starting at 0 for the top-left sprite.
 +
|-
 +
| 1
 +
| type
 +
| The fish type, which influences their behavior. Possible values:
 +
{| class="wikitable"
 +
|-
 +
! value
 +
! notes
 +
|-
 +
| <samp>eel</samp>
 +
|
 +
|-
 +
| <samp>cephalopod</samp></samp>
 +
|
 +
|-
 +
| <samp>crawl</samp>
 +
|
 +
|-
 +
| <samp>ground</samp>
 +
|
 +
|-
 +
| <samp>fish</samp>
 +
|
 +
|-
 +
| <samp>front_crawl</samp>
 +
| Used for crawling fish whose sprites extend past the floor. They are always closest to the glass and sort above other fish to avoid sorting issues.
 +
|}
 +
|-
 +
| 2<br />3&ndash;5
 +
| idle animation<br />dart animation
 +
| The animation used by the fish when it's idling (2) or darting (3&ndash;5). This is specified as a list of space-delimited frames, where each frame is the sprite index in the <samp>LooseSprites/AquariumFish</samp> spritesheet to display. Each frame is displayed for 125ms. For example, [[Stingray]]s have their idle animation set to <samp>70 70 70 71 71 72</samp>.
 +
 +
The dart animation is split into three fields: start (3), hold (4), and end (5).
 +
|}
 +
 
[[Category:Modding]]
 
[[Category:Modding]]
    
[[pt:Modificações:Dados de Peixes]]
 
[[pt:Modificações:Dados de Peixes]]
 +
[[ru:Модификации:Рыболовство]]

Navigation menu