Modding:Fish ponds: Difference between revisions
imported>Pathoschild remove outdated 'raw data' section |
imported>Pathoschild →Format: update for 1.6.9 (based on Modding:Migrate to Stardew Valley 1.6.9#Fish pond data changes, where I'm the only author) |
||
| Line 32: | Line 32: | ||
! purpose | ! purpose | ||
|- | |- | ||
| <samp> | | <samp>Id</samp> | ||
| The [[Modding:Common data field types#Item | | The [[Modding:Common data field types#Unique string ID|unique string ID]] for this entry. | ||
|- | |||
| ''common fields'' | |||
| See [[Modding:Item queries#Item spawn fields|item spawn fields]] for the generic item fields supported by fish pond rewards. | |||
Notes: | |||
* If <samp>ItemId</samp> or <samp>RandomItemId</samp> is set to an [[Modding:Item queries|item query]] which returns multiple items, one item will be selected at random. | |||
* If <samp>ItemId</samp> and <samp>RandomItemId</samp> is set to the exact string <code>(O)812</code> ([[roe]]), it will produce roe for the current fish. | |||
* For the <samp>Condition</samp> field, the input item matches the fish living in the pond. | |||
|- | |- | ||
| <samp>RequiredPopulation</samp> | | <samp>RequiredPopulation</samp> | ||
| Line 41: | Line 49: | ||
| ''(Optional)'' The probability that this item will be produced, as a value between 0 (never) and 1 (always). This is applied ''after'' the base chance of producing any item above. Default 1. | | ''(Optional)'' The probability that this item will be produced, as a value between 0 (never) and 1 (always). This is applied ''after'' the base chance of producing any item above. Default 1. | ||
|- | |- | ||
| <samp>MinQuantity</samp> | | <samp>MinQuantity</samp><br /><samp>MaxQuantity</samp> | ||
| ''(Deprecated)'' Use <samp>MinStack</samp>/<samp>MaxStack</samp> from the item spawn fields instead. | |||
| ''( | |||
|} | |} | ||
|- | |- | ||
| Line 65: | Line 70: | ||
* 2–3 [[Omni Geode|omni geodes]] (item ID 749); | * 2–3 [[Omni Geode|omni geodes]] (item ID 749); | ||
* or 1 [[Dried Starfish|dried starfish]]. | * or 1 [[Dried Starfish|dried starfish]]. | ||
|- | |||
| <samp>MaxPopulation</samp> | |||
| ''(Optional)'' The maximum number of fish that can live in this pond, whether added manually or through population growth. This can't exceed the hardcoded maximum of 10. If omitted, defaults to the maximum based on <samp>PopulationGates</samp>. | |||
|- | |- | ||
| <samp>Precedence</samp> | | <samp>Precedence</samp> | ||
| Line 73: | Line 81: | ||
If omitted, the game chooses a value based on the base fish price: 1 day (0–30g), 2 days (31–80g), 3 days (81–120g), 4 days (121–250g), or 5 days (250g+). | If omitted, the game chooses a value based on the base fish price: 1 day (0–30g), 2 days (31–80g), 3 days (81–120g), 4 days (121–250g), or 5 days (250g+). | ||
|- | |||
| <samp>WaterColor</samp> | |||
| ''(Optional)'' The color tint to apply to the water when this entry applies. If multiple are specified, the first matching entry is applied. If none match, the default water color is used. | |||
This consists of a list of models with these fields: | |||
{| class="wikitable" | |||
|- | |||
! field | |||
! effect | |||
|- | |||
| <samp>Id</samp> | |||
| The [[Modding:Common data field types#Unique string ID|unique string ID]] for this entry. | |||
|- | |||
| <samp>Color</samp> | |||
| ''(Optional)'' The water color to apply. This can be [[Modding:Common data field types#Color|a standard color value]], or <samp>CopyFromInput</samp> (to use the item color from the fish item data). Default none. | |||
|- | |||
| <samp>MinPopulation</samp> | |||
| ''(Optional)'' The minimum number of fish in the pond before this color applies. Default 1. | |||
|- | |||
| <samp>MinUnlockedPopulationGate</samp> | |||
| ''(Optional)'' The minimum population for the last population gate that was unlocked, or 0 for any value. Default 0. | |||
|- | |||
| <samp>Condition</samp> | |||
| ''(Optional)'' A [[Modding:Game state queries|game state query]] which indicates whether this entry should be applied. Defaults to always true. | |||
|} | |||
|} | |} | ||
Revision as of 00:25, 16 November 2024
← Index
This page explains how the game stores and parses Fish Pond data. This is an advanced guide for mod developers.
Format
The fish pond data in Data/FishPondData consists of a list of elements with these fields.
| field | purpose | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Id | The unique string ID for this entry. | ||||||||||||
| RequiredTags | The context tags for fish which should use this entry. A tag can be prefixed with ! to require that the fish not have that tag.
For example, The first matching entry based on the Precedence field is used. If no other entries match, Data/FishPondData has a default entry with the required tags | ||||||||||||
| ProducedItems | The items that can be produced by the selected fish.
When a fish pond is ready to produce output (based on a hardcoded This consists of a list of models with these fields:
| ||||||||||||
| PopulationGates | The rules which decide when the fish pond population can grow (up to a hardcoded limit of 10 fish), and the quests that must be completed to do so. If omitted, the population can grow to 10 fish with no quests.
This consists of a number → item IDs lookup, where:
For example, consider this population gate: "6": [ "422 2 3", "60 2", "749 2 3", "116" ]
This means that before the population grows to 6, the fish will randomly ask for one of these:
| ||||||||||||
| MaxPopulation | (Optional) The maximum number of fish that can live in this pond, whether added manually or through population growth. This can't exceed the hardcoded maximum of 10. If omitted, defaults to the maximum based on PopulationGates. | ||||||||||||
| Precedence | (Optional) The order in which this entry should be checked, where 0 is the default value used by most entries. Entries with the same precedence are checked in the order listed. Default 0. | ||||||||||||
| SpawnTime | (Optional) The number of days needed to raise the population by one if there's enough room in the fish pond.
If omitted, the game chooses a value based on the base fish price: 1 day (0–30g), 2 days (31–80g), 3 days (81–120g), 4 days (121–250g), or 5 days (250g+). | ||||||||||||
| WaterColor | (Optional) The color tint to apply to the water when this entry applies. If multiple are specified, the first matching entry is applied. If none match, the default water color is used.
This consists of a list of models with these fields:
|