Jump to content

Modding:Fish ponds: Difference between revisions

From Stardew Valley Wiki
imported>Margotbean
category
imported>Pathoschild
→Format: + BaseMinProduceChance and BaseMaxProduceChange in 1.6.9
 
(15 intermediate revisions by 6 users not shown)
Line 3: Line 3:
This page explains how the game stores and parses [[Fish Pond]] data. This is an advanced guide for mod developers.
This page explains how the game stores and parses [[Fish Pond]] data. This is an advanced guide for mod developers.


== Raw data ==
==Format==
Object data is stored in <tt>Content\Data\FishPondData.xnb</tt>, which can be [[Modding:Editing XNB files#unpacking|unpacked for editing]]; currently, a [https://github.com/Pathoschild/StardewXnbHack special tool] needs to be used to do so. Here's the raw data as of {{version|1.4.3}} for reference:
The fish pond data in <samp>Data/FishPondData</samp> consists of a list of elements with these fields.


{{collapse|Data|content=<source lang="json">
{| class="wikitable"
[
|-
  {
! field
    "RequiredTags": [
! purpose
      "item_squid"
|-
    ],
| <samp>Id</samp>
    "SpawnTime": 3,
| The [[Modding:Common data field types#Unique string ID|unique string ID]] for this entry.
    "ProducedItems": [
|-
      {
| <samp>RequiredTags</samp>
        "RequiredPopulation": 7,
| The [[Modding:Context tags|context tags]] for fish which should use this entry. A tag can be prefixed with <code>!</code> to require that the fish ''not'' have that tag.
        "Chance": 1.0,
        "ItemID": 814,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 5,
        "Chance": 0.6,
        "ItemID": 814,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 3,
        "Chance": 0.45,
        "ItemID": 814,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 0,
        "Chance": 0.25,
        "ItemID": 814,
        "MinQuantity": 1,
        "MaxQuantity": 1
      }
    ],
    "PopulationGates": {
      "4": [
        "393 3",
        "397 1"
      ],
      "6": [
        "131 2"
      ]
    }
  },
  {
    "RequiredTags": [
      "item_midnight_squid"
    ],
    "SpawnTime": 3,
    "ProducedItems": [
      {
        "RequiredPopulation": 10,
        "Chance": 0.25,
        "ItemID": 814,
        "MinQuantity": 2,
        "MaxQuantity": 2
      },
      {
        "RequiredPopulation": 7,
        "Chance": 0.8,
        "ItemID": 814,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 5,
        "Chance": 0.6,
        "ItemID": 814,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 3,
        "Chance": 0.45,
        "ItemID": 814,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 0,
        "Chance": 0.2,
        "ItemID": 814,
        "MinQuantity": 1,
        "MaxQuantity": 1
      }
    ],
    "PopulationGates": {
      "4": [
        "393 3",
        "397 2"
      ],
      "6": [
        "131 2"
      ],
      "9": [
        "560"
      ]
    }
  },
  {
    "RequiredTags": [
      "item_carp"
    ],
    "SpawnTime": 1,
    "ProducedItems": [
      {
        "RequiredPopulation": 0,
        "Chance": 1.0,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      }
    ],
    "PopulationGates": {
      "4": [
        "153 2"
      ],
      "6": [
        "78 2"
      ]
    }
  },
  {
    "RequiredTags": [
      "item_herring"
    ],
    "SpawnTime": 1,
    "ProducedItems": [
      {
        "RequiredPopulation": 0,
        "Chance": 1.0,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      }
    ],
    "PopulationGates": {
      "4": [
        "169 3"
      ],
      "6": [
        "393"
      ]
    }
  },
  {
    "RequiredTags": [
      "item_sunfish"
    ],
    "SpawnTime": 1,
    "ProducedItems": [
      {
        "RequiredPopulation": 10,
        "Chance": 0.08,
        "ItemID": 768,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 0,
        "Chance": 0.9,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      }
    ],
    "PopulationGates": {
      "4": [
        "535 2",
        "309 2"
      ],
      "6": [
        "66",
        "770 3"
      ]
    }
  },
  {
    "RequiredTags": [
      "item_blobfish"
    ],
    "SpawnTime": 4,
    "ProducedItems": [
      {
        "RequiredPopulation": 9,
        "Chance": 0.02,
        "ItemID": 797,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 9,
        "Chance": 0.02,
        "ItemID": 688,
        "MinQuantity": 5,
        "MaxQuantity": 5
      },
      {
        "RequiredPopulation": 6,
        "Chance": 1.0,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 2
      },
      {
        "RequiredPopulation": 0,
        "Chance": 0.9,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      }
    ],
    "PopulationGates": {
      "2": [
        "393 3",
        "397 2",
        "84 2"
      ],
      "4": [
        "306",
        "433 5",
        "206"
      ],
      "6": [
        "348",
        "614",
        "223"
      ],
      "8": [
        "232",
        "394"
      ]
    }
  },
  {
    "RequiredTags": [
      "item_lava_eel"
    ],
    "SpawnTime": -1,
    "ProducedItems": [
      {
        "RequiredPopulation": 10,
        "Chance": 0.033,
        "ItemID": 537,
        "MinQuantity": 10,
        "MaxQuantity": 10
      },
      {
        "RequiredPopulation": 9,
        "Chance": 0.02,
        "ItemID": 537,
        "MinQuantity": 5,
        "MaxQuantity": 5
      },
      {
        "RequiredPopulation": 9,
        "Chance": 0.04,
        "ItemID": 226,
        "MinQuantity": 5,
        "MaxQuantity": 5
      },
      {
        "RequiredPopulation": 9,
        "Chance": 0.033,
        "ItemID": 812,
        "MinQuantity": 3,
        "MaxQuantity": 3
      },
      {
        "RequiredPopulation": 9,
        "Chance": 0.15,
        "ItemID": 812,
        "MinQuantity": 2,
        "MaxQuantity": 2
      },
      {
        "RequiredPopulation": 3,
        "Chance": 0.1,
        "ItemID": 384,
        "MinQuantity": 5,
        "MaxQuantity": 5
      },
      {
        "RequiredPopulation": 6,
        "Chance": 1.0,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 0,
        "Chance": 0.8,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      }
    ],
    "PopulationGates": {
      "2": [
        "82 3"
      ],
      "4": [
        "98",
        "570",
        "72 2"
      ],
      "6": [
        "288 2"
      ],
      "8": [
        "337"
      ]
    }
  },
  {
    "RequiredTags": [
      "item_woodskip"
    ],
    "SpawnTime": -1,
    "ProducedItems": [
      {
        "RequiredPopulation": 9,
        "Chance": 0.05,
        "ItemID": 309,
        "MinQuantity": 1,
        "MaxQuantity": 5
      },
      {
        "RequiredPopulation": 9,
        "Chance": 0.05,
        "ItemID": 310,
        "MinQuantity": 1,
        "MaxQuantity": 5
      },
      {
        "RequiredPopulation": 9,
        "Chance": 0.05,
        "ItemID": 311,
        "MinQuantity": 1,
        "MaxQuantity": 5
      },
      {
        "RequiredPopulation": 8,
        "Chance": 0.08,
        "ItemID": 388,
        "MinQuantity": 5,
        "MaxQuantity": 10
      },
      {
        "RequiredPopulation": 6,
        "Chance": 0.1,
        "ItemID": 709,
        "MinQuantity": 5,
        "MaxQuantity": 5
      },
      {
        "RequiredPopulation": 0,
        "Chance": 0.66,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 0,
        "Chance": 0.66,
        "ItemID": 388,
        "MinQuantity": 1,
        "MaxQuantity": 5
      }
    ],
    "PopulationGates": {
      "2": [
        "709 10"
      ],
      "4": [
        "404 2 3",
        "420 2 3"
      ],
      "6": [
        "725",
        "726"
      ],
      "8": [
        "70 2",
        "815"
      ]
    }
  },
  {
    "RequiredTags": [
      "item_tiger_trout"
    ],
    "SpawnTime": 999999,
    "ProducedItems": [
      {
        "RequiredPopulation": 10,
        "Chance": 0.8,
        "ItemID": 812,
        "MinQuantity": 2,
        "MaxQuantity": 2
      },
      {
        "RequiredPopulation": 5,
        "Chance": 0.4,
        "ItemID": 812,
        "MinQuantity": 2,
        "MaxQuantity": 2
      },
      {
        "RequiredPopulation": 0,
        "Chance": 1.0,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      }
    ],
    "PopulationGates": null
  },
  {
    "RequiredTags": [
      "fish_desert"
    ],
    "SpawnTime": 4,
    "ProducedItems": [
      {
        "RequiredPopulation": 10,
        "Chance": 0.05,
        "ItemID": 802,
        "MinQuantity": 2,
        "MaxQuantity": 5
      },
      {
        "RequiredPopulation": 10,
        "Chance": 0.25,
        "ItemID": 812,
        "MinQuantity": 3,
        "MaxQuantity": 3
      },
      {
        "RequiredPopulation": 8,
        "Chance": 0.5,
        "ItemID": 812,
        "MinQuantity": 2,
        "MaxQuantity": 2
      },
      {
        "RequiredPopulation": 0,
        "Chance": 0.75,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      }
    ],
    "PopulationGates": {
      "4": [
        "88 3",
        "90 3"
      ],
      "6": [
        "125"
      ]
    }
  },
  {
    "RequiredTags": [
      "item_void_salmon"
    ],
    "SpawnTime": -1,
    "ProducedItems": [
      {
        "RequiredPopulation": 9,
        "Chance": 0.05,
        "ItemID": 305,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 8,
        "Chance": 0.08,
        "ItemID": 769,
        "MinQuantity": 5,
        "MaxQuantity": 10
      },
      {
        "RequiredPopulation": 9,
        "Chance": 0.83,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 3
      },
      {
        "RequiredPopulation": 0,
        "Chance": 1.0,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      }
    ],
    "PopulationGates": {
      "2": [
        "769 5"
      ],
      "4": [
        "767 10"
      ],
      "6": [
        "305",
        "72"
      ],
      "8": [
        "386"
      ]
    }
  },
  {
    "RequiredTags": [
      "item_slimejack"
    ],
    "SpawnTime": -1,
    "ProducedItems": [
      {
        "RequiredPopulation": 9,
        "Chance": 0.02,
        "ItemID": 680,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 9,
        "Chance": 0.075,
        "ItemID": 766,
        "MinQuantity": 50,
        "MaxQuantity": 50
      },
      {
        "RequiredPopulation": 9,
        "Chance": 0.12,
        "ItemID": 766,
        "MinQuantity": 30,
        "MaxQuantity": 30
      },
      {
        "RequiredPopulation": 9,
        "Chance": 0.2,
        "ItemID": 766,
        "MinQuantity": 10,
        "MaxQuantity": 10
      },
      {
        "RequiredPopulation": 3,
        "Chance": 0.1,
        "ItemID": 153,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 0,
        "Chance": 0.8,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      }
    ],
    "PopulationGates": {
      "2": [
        "766 20"
      ],
      "4": [
        "684 10"
      ],
      "6": [
        "774 5",
        "456"
      ],
      "8": [
        "557"
      ]
    }
  },
  {
    "RequiredTags": [
      "item_stonefish"
    ],
    "SpawnTime": -1,
    "ProducedItems": [
      {
        "RequiredPopulation": 9,
        "Chance": 0.05,
        "ItemID": 535,
        "MinQuantity": 5,
        "MaxQuantity": 5
      },
      {
        "RequiredPopulation": 9,
        "Chance": 0.075,
        "ItemID": 390,
        "MinQuantity": 30,
        "MaxQuantity": 30
      },
      {
        "RequiredPopulation": 9,
        "Chance": 0.12,
        "ItemID": 535,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 9,
        "Chance": 0.01,
        "ItemID": 72,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 3,
        "Chance": 0.1,
        "ItemID": 378,
        "MinQuantity": 5,
        "MaxQuantity": 5
      },
      {
        "RequiredPopulation": 9,
        "Chance": 0.5,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 0,
        "Chance": 0.25,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      }
    ],
    "PopulationGates": {
      "2": [
        "378 10"
      ],
      "4": [
        "86 5"
      ],
      "6": [
        "382 10",
        "535 5"
      ],
      "8": [
        "334 4",
        "338 5"
      ]
    }
  },
  {
    "RequiredTags": [
      "item_ice_pip"
    ],
    "SpawnTime": -1,
    "ProducedItems": [
      {
        "RequiredPopulation": 9,
        "Chance": 0.05,
        "ItemID": 536,
        "MinQuantity": 5,
        "MaxQuantity": 5
      },
      {
        "RequiredPopulation": 9,
        "Chance": 0.075,
        "ItemID": 84,
        "MinQuantity": 5,
        "MaxQuantity": 5
      },
      {
        "RequiredPopulation": 9,
        "Chance": 0.12,
        "ItemID": 536,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 9,
        "Chance": 0.01,
        "ItemID": 72,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 3,
        "Chance": 0.1,
        "ItemID": 380,
        "MinQuantity": 5,
        "MaxQuantity": 5
      },
      {
        "RequiredPopulation": 9,
        "Chance": 0.5,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 0,
        "Chance": 0.25,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      }
    ],
    "PopulationGates": {
      "2": [
        "380 10"
      ],
      "4": [
        "84 5"
      ],
      "6": [
        "382 10",
        "536 5",
        "414"
      ],
      "8": [
        "335 4",
        "338 10"
      ]
    }
  },
  {
    "RequiredTags": [
      "item_ghostfish"
    ],
    "SpawnTime": -1,
    "ProducedItems": [
      {
        "RequiredPopulation": 9,
        "Chance": 0.05,
        "ItemID": 157,
        "MinQuantity": 5,
        "MaxQuantity": 5
      },
      {
        "RequiredPopulation": 9,
        "Chance": 0.02,
        "ItemID": 457,
        "MinQuantity": 3,
        "MaxQuantity": 3
      },
      {
        "RequiredPopulation": 9,
        "Chance": 0.12,
        "ItemID": 80,
        "MinQuantity": 3,
        "MaxQuantity": 3
      },
      {
        "RequiredPopulation": 9,
        "Chance": 0.05,
        "ItemID": 338,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 3,
        "Chance": 0.08,
        "ItemID": 80,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 0,
        "Chance": 1.0,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      }
    ],
    "PopulationGates": {
      "2": [
        "80 5"
      ],
      "4": [
        "78 5"
      ],
      "6": [
        "157 5"
      ],
      "8": [
        "96",
        "97",
        "338 2"
      ]
    }
  },
  {
    "RequiredTags": [
      "item_sturgeon"
    ],
    "SpawnTime": -1,
    "ProducedItems": [
      {
        "RequiredPopulation": 10,
        "Chance": 0.25,
        "ItemID": 812,
        "MinQuantity": 2,
        "MaxQuantity": 2
      },
      {
        "RequiredPopulation": 10,
        "Chance": 1.0,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 9,
        "Chance": 0.8,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 6,
        "Chance": 0.6,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 3,
        "Chance": 0.4,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 0,
        "Chance": 0.2,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      }
    ],
    "PopulationGates": {
      "2": [
        "72"
      ],
      "4": [
        "724 2",
        "342",
        "344"
      ],
      "6": [
        "749 3"
      ],
      "8": [
        "392"
      ]
    }
  },
  {
    "RequiredTags": [
      "fish_super_cucumber"
    ],
    "SpawnTime": -1,
    "ProducedItems": [
      {
        "RequiredPopulation": 9,
        "Chance": 0.05,
        "ItemID": 386,
        "MinQuantity": 1,
        "MaxQuantity": 3
      },
      {
        "RequiredPopulation": 9,
        "Chance": 0.05,
        "ItemID": 66,
        "MinQuantity": 1,
        "MaxQuantity": 3
      },
      {
        "RequiredPopulation": 0,
        "Chance": 1.0,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      }
    ],
    "PopulationGates": {
      "4": [
        "338 3",
        "340",
        "393 3",
        "723"
      ],
      "6": [
        "422 2 3",
        "60 2",
        "749 2 3",
        "116"
      ],
      "8": [
        "342",
        "336 3",
        "344",
        "386",
        "72"
      ]
    }
  },
  {
    "RequiredTags": [
      "fish_octopus"
    ],
    "SpawnTime": -1,
    "ProducedItems": [
      {
        "RequiredPopulation": 9,
        "Chance": 0.066,
        "ItemID": 749,
        "MinQuantity": 3,
        "MaxQuantity": 3
      },
      {
        "RequiredPopulation": 9,
        "Chance": 0.01,
        "ItemID": 749,
        "MinQuantity": 10,
        "MaxQuantity": 10
      },
      {
        "RequiredPopulation": 9,
        "Chance": 0.1,
        "ItemID": 749,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 0,
        "Chance": 1.0,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      }
    ],
    "PopulationGates": {
      "4": [
        "338 3",
        "340",
        "393 3",
        "723"
      ],
      "6": [
        "422 2 3",
        "60 2",
        "749 2 3",
        "116"
      ],
      "8": [
        "614"
      ]
    }
  },
  {
    "RequiredTags": [
      "fish_rainbow_trout"
    ],
    "SpawnTime": -1,
    "ProducedItems": [
      {
        "RequiredPopulation": 9,
        "Chance": 0.02,
        "ItemID": 394,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 9,
        "Chance": 0.001,
        "ItemID": 74,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 0,
        "Chance": 1.0,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      }
    ],
    "PopulationGates": {
      "4": [
        "338 3",
        "340",
        "393 3",
        "723"
      ],
      "6": [
        "422 2 3",
        "60 2",
        "749 2 3",
        "116"
      ],
      "8": [
        "342",
        "336 3",
        "344",
        "386",
        "72"
      ]
    }
  },
  {
    "RequiredTags": [
      "fish_semi_rare"
    ],
    "SpawnTime": -1,
    "ProducedItems": [
      {
        "RequiredPopulation": 9,
        "Chance": 0.003,
        "ItemID": 166,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 0,
        "Chance": 1.0,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      }
    ],
    "PopulationGates": {
      "4": [
        "338 3",
        "335 3",
        "393 3",
        "420 3",
        "723",
        "66 3"
      ],
      "6": [
        "422 2 3",
        "569",
        "60 2",
        "749 2 3",
        "116"
      ],
      "8": [
        "342",
        "336 3",
        "306",
        "386",
        "72"
      ]
    }
  },
  {
    "RequiredTags": [
      "fish_catfish"
    ],
    "SpawnTime": -1,
    "ProducedItems": [
      {
        "RequiredPopulation": 0,
        "Chance": 1.0,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      }
    ],
    "PopulationGates": {
      "4": [
        "334 3",
        "420 3",
        "66 2",
        "68 2"
      ],
      "6": [
        "422 2 3",
        "767 10",
        "86 2",
        "770 5"
      ],
      "8": [
        "342",
        "335 3",
        "306",
        "72"
      ]
    }
  },
  {
    "RequiredTags": [
      "fish_carnivorous"
    ],
    "SpawnTime": -1,
    "ProducedItems": [
      {
        "RequiredPopulation": 9,
        "Chance": 0.05,
        "ItemID": 684,
        "MinQuantity": 20,
        "MaxQuantity": 20
      },
      {
        "RequiredPopulation": 0,
        "Chance": 1.0,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      }
    ],
    "PopulationGates": {
      "4": [
        "142 2",
        "132 2",
        "702 2"
      ],
      "6": [
        "136 2",
        "700 2"
      ],
      "8": [
        "734 2",
        "164 2",
        "156 2"
      ]
    }
  },
  {
    "RequiredTags": [
      "item_coral"
    ],
    "SpawnTime": 2,
    "ProducedItems": [
      {
        "RequiredPopulation": 9,
        "Chance": 0.06,
        "ItemID": 543,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 9,
        "Chance": 0.06,
        "ItemID": 571,
        "MinQuantity": 1,
        "MaxQuantity": 1
      }
    ],
    "PopulationGates": null
  },
  {
    "RequiredTags": [
      "item_sea_urchin"
    ],
    "SpawnTime": 4,
    "ProducedItems": [
      {
        "RequiredPopulation": 9,
        "Chance": 0.02,
        "ItemID": 812,
        "MinQuantity": 5,
        "MaxQuantity": 5
      },
      {
        "RequiredPopulation": 9,
        "Chance": 0.33,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 5,
        "Chance": 0.2,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 0,
        "Chance": 0.1,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      }
    ],
    "PopulationGates": null
  },
  {
    "RequiredTags": [
      "fish_freshwater",
      "fish_crab_pot"
    ],
    "SpawnTime": -1,
    "ProducedItems": [
      {
        "RequiredPopulation": 9,
        "Chance": 0.075,
        "ItemID": 689,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 0,
        "Chance": 0.05,
        "ItemID": 153,
        "MinQuantity": 1,
        "MaxQuantity": 3
      },
      {
        "RequiredPopulation": 5,
        "Chance": 0.05,
        "ItemID": 770,
        "MinQuantity": 2,
        "MaxQuantity": 3
      },
      {
        "RequiredPopulation": 0,
        "Chance": 0.05,
        "ItemID": 168,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 0,
        "Chance": 0.05,
        "ItemID": 169,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 0,
        "Chance": 0.05,
        "ItemID": 170,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 0,
        "Chance": 0.05,
        "ItemID": 171,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 0,
        "Chance": 0.05,
        "ItemID": 172,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 0,
        "Chance": 0.05,
        "ItemID": 168,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 0,
        "Chance": 0.2,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      }
    ],
    "PopulationGates": {
      "4": [
        "330 5",
        "771 15"
      ],
      "6": [
        "709 5",
        "78",
        "684 10"
      ],
      "8": [
        "768 5",
        "774",
        "403"
      ]
    }
  },
  {
    "RequiredTags": [
      "fish_ocean",
      "fish_crab_pot"
    ],
    "SpawnTime": -1,
    "ProducedItems": [
      {
        "RequiredPopulation": 9,
        "Chance": 0.02,
        "ItemID": 392,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 9,
        "Chance": 0.075,
        "ItemID": 690,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 0,
        "Chance": 0.088,
        "ItemID": 152,
        "MinQuantity": 1,
        "MaxQuantity": 3
      },
      {
        "RequiredPopulation": 5,
        "Chance": 0.05,
        "ItemID": 397,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 5,
        "Chance": 0.075,
        "ItemID": 393,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 0,
        "Chance": 0.05,
        "ItemID": 168,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 0,
        "Chance": 0.05,
        "ItemID": 169,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 0,
        "Chance": 0.05,
        "ItemID": 170,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 0,
        "Chance": 0.05,
        "ItemID": 171,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 0,
        "Chance": 0.05,
        "ItemID": 172,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 0,
        "Chance": 0.05,
        "ItemID": 168,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 0,
        "Chance": 0.2,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      }
    ],
    "PopulationGates": {
      "4": [
        "330 5"
      ],
      "6": [
        "80 5",
        "684 10"
      ],
      "8": [
        "768 5",
        "774",
        "397"
      ]
    }
  },
  {
    "RequiredTags": [
      "fish_ocean"
    ],
    "SpawnTime": -1,
    "ProducedItems": [
      {
        "RequiredPopulation": 5,
        "Chance": 1.0,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 0,
        "Chance": 0.7,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      }
    ],
    "PopulationGates": {
      "4": [
        "536",
        "152 1 2",
        "169 3"
      ],
      "6": [
        "393 2",
        "372 2"
      ],
      "8": [
        "397 2",
        "62 2",
        "719"
      ]
    }
  },
  {
    "RequiredTags": [
      "fish_river"
    ],
    "SpawnTime": -1,
    "ProducedItems": [
      {
        "RequiredPopulation": 0,
        "Chance": 0.9,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      }
    ],
    "PopulationGates": {
      "4": [
        "309 3",
        "310 3",
        "311 3",
        "684 10"
      ],
      "6": [
        "384 3",
        "724",
        "770 5"
      ],
      "8": [
        "70 2",
        "340",
        "716",
        "722"
      ]
    }
  },
  {
    "RequiredTags": [
      "fish_lake"
    ],
    "SpawnTime": -1,
    "ProducedItems": [
      {
        "RequiredPopulation": 0,
        "Chance": 0.9,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      }
    ],
    "PopulationGates": {
      "4": [
        "153 2 3",
        "330 2 3",
        "766 5",
        "684 10"
      ],
      "6": [
        "86 1 2",
        "404 2 3",
        "571"
      ],
      "8": [
        "574",
        "721",
        "774 5"
      ]
    }
  },
  {
    "RequiredTags": [
      "category_fish"
    ],
    "SpawnTime": -1,
    "ProducedItems": [
      {
        "RequiredPopulation": 5,
        "Chance": 0.8,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      },
      {
        "RequiredPopulation": 0,
        "Chance": 0.8,
        "ItemID": 812,
        "MinQuantity": 1,
        "MaxQuantity": 1
      }
    ],
    "PopulationGates": {
      "4": [
        "685"
      ],
      "6": [
        "774"
      ]
    }
  }
]</source>}}


== Format ==
For example, <code>["fish_ocean", "fish_crab_pot", "!fish_carnivorous"]</code> will match ocean fish that can be caught in [[Crab Pot|crab pots]] and aren't carnivorous.
The data file is a list of objects which have the following four elements.
* <tt>RequiredTags</tt> - A list of object context tags.
* <tt>SpawnTime</tt> - An integer
* <tt>ProducedItems</tt> - A list of objects describing possible pond production.
* <tt>PopulationGates</tt> - A dictionary of objects controlling population limits and quests.
Each element is described in more detail below.


=== RequiredTags ===
The first matching entry based on the <samp>Precedence</samp> field is used. If no other entries match, <samp>Data/FishPondData</samp> has a default entry with the required tags <code>category_fish</code> as a catch-all for any fish without their own entry.
To find the definition for a particular pond, the game goes through the pond definitions in the order they appear in the data file. The first definition where all of the required tags match the type of fish in the pond will be used. Individual fish are generally referenced with a tag that looks like <tt>item_<fishname></tt> (e.g. <tt>item_sunfish</tt>). These tags are automatically created by the game for each fish object.
|-
 
| <samp>ProducedItems</samp>
There are some more general tags defined in <tt>Content\Data\ObjectContextTags.xnb</tt> which usually match multiple fish. For example the tag <tt>fish_carnivorous</tt> is assigned to the Dorado, Lingcod, and Pike. The last pond definition in the unmodded Fish Pond data has a required tag of <tt>category_fish</tt> and is a generic catch-all that matches any fish in the <tt>-4</tt> [[Modding:Object_data#Categories|category]].
| The items that can be produced by the selected fish.
 
Although unused in the base game, a tag can be prefaced with an exclamation point to reverse the logic; this will instead match any fish which ''does not'' have the associated tag assigned. For example, a definition with a required tag of <tt>!fish_carnivorous</tt> would match any fish except for Dorado, Lingcod, and Pike.


=== SpawnTime ===
When a fish pond is ready to produce output (based on a hardcoded <code>(15 + 8 * population of pond)%</code> chance), it checks each entry in the list and takes the first one that matches. If no entry matches, no output is produced.
This element controls how many days it takes for the pond to produce a new fish, assuming there is still room. The [[Tiger Trout]] is set to a spawn time of 999999 days which makes it essentially unable to reproduce, even though technically it would eventually do so if the game was played long enough. If the spawn time is set to -1, the game will dynamically determine the spawn time using the base price of the fish as shown below.


This consists of a list of models with these fields:
{| class="wikitable"
{| class="wikitable"
|-
|-
! price range
! field
! spawn time
! purpose
|-
|-
| 0 - 30 || 1 day
| <samp>Id</samp>
| The [[Modding:Common data field types#Unique string ID|unique string ID]] for this entry.
|-
|-
| 31 - 80 || 2 days
| ''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.
|-
|-
| 81 - 120 || 3 days
| <samp>RequiredPopulation</samp>
| ''(Optional)'' The minimum number of fish in the pond required to produce this item. Default 0.
|-
|-
| 121 - 250 || 4 days
| <samp>Chance</samp>
| ''(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.
|-
|-
| 251+ || 5 days
| <samp>MinQuantity</samp><br /><samp>MaxQuantity</samp>
| ''(Deprecated)'' Use <samp>MinStack</samp>/<samp>MaxStack</samp> from the item spawn fields instead.
|}
|}
|-
| <samp>PopulationGates</samp>
| 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.


=== ProducedItems ===
This consists of a number → item IDs lookup, where:
This element defines which items will be produced. Note that there is a base item production chance of <code>(0.15 + 0.08 * population of pond)</code> defined in code and this element will only be processed to select the actual item if that initial check is passed. Each entry contains the following 5 fields:
* The key is the population number at which this gate applies.
* <tt>RequiredPopulation</tt> - integer
* The value is a list of possible quest items that may be requested by the fish at random to complete the gate. Each item is represented by 1&ndash;3 space-delimited values: the item ID, minimum quantity, and maximum quantity. If both min and max quantity are specified, a random number in that range is used. If only the min quantity is specified, that exact number is used. If neither are specified, the fish will request one.
* <tt>Chance</tt> - float
* <tt>ItemID</tt> - integer (object ID)
* <tt>MinQuantity</tt> - integer
* <tt>MaxQuantity</tt> - integer


The entries are processed in order. For each, the game checks to see if the pond has a population of at least the <tt>RequiredPopulation</tt> amount. If so it rolls a random number in the range [0,1) and checks to see if that value is less than or equal to the given <tt>Chance</tt>. If so, the pond will produce between <tt>MinQuantity</tt> and <tt>MaxQuantity</tt> of the object specified by <tt>ItemID</tt>. If not, it will move on to the next element in the list and do the same check. This process repeats until either an item is selected or there are no more entries. Note that if the item is [[Roe]], the game will set the name, color, and value of the Roe based on the type of fish in the pond.
For example, consider this population gate:
<syntaxhighlight lang="json">
"6": [ "422 2 3", "60 2", "749 2 3", "116" ]
</syntaxhighlight>


=== PopulationGates ===
This means that before the population grows to 6, the fish will randomly ask for one of these:
This element controls the population limits and quest items needed to bypass that limit. Note that all ponds have a final limit of 10 fish which is defined in code. If this element is null, there will be no quests and the starting population will be 1/10. The gates themselves are a dictionary where the key is a population number and the value is an array of possible quest items. When the game detects that the pond should grow to the given population number, it will start the quest and randomly choose one of the possible items for the request.
* 2&ndash;3 [[Purple Mushroom|purple mushrooms]] (item ID 422);
* 2 [[emerald]]s (item ID 60);
* 2&ndash;3 [[Omni Geode|omni geodes]] (item ID 749);
* 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>BaseMinProduceChance</samp><br /><samp>BaseMaxProduceChance</samp>
| The daily chance that this fish pond checks for output on a given day, as a value between 0 (never) and 1 (always). The actual probability is lerped between the min and max value based on the fish pond's population (i.e. the probability increases within that range as the population grows). This only affects whether it checks for output; output is only produced if one of the <samp>ProducedItems</samp> passes its checks too.
|-
| <samp>Precedence</samp>
| ''(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.


The possible quest items are strings containing up to 3 integers separated by spaces. These are the object ID (required), minimum quantity (optional), and maximum quantity (optional). If both minimum and maximum are supplied, there will be a random roll in that range to choose the requested quantity. If only the minimum is supplied, that exact amount will be requested. And if neither minimum or maximum is supplied, the requested quantity will be one.
For consistency, vanilla entries use these values:
{| class="wikitable"
|-
! precedence
! used for
|-
| 0<br /><small>(default value)</small>
| specific fish
|-
| 100
| custom groups (e.g. desert fish)
|-
| 500
| broad fish type (e.g. ocean fish)
|-
| 1000
| fallback (e.g. fish category)
|}
|-
| <samp>SpawnTime</samp>
| ''(Optional)'' The number of days needed to raise the population by one if there's enough room in the fish pond.


Example: The <tt>fish_super_cucumber</tt> definition contains the following entry in its population gates:
If omitted, the game chooses a value based on the base fish price: 1 day (0&ndash;30g), 2 days (31&ndash;80g), 3 days (81&ndash;120g), 4 days (121&ndash;250g), or 5 days (250g+).
<source lang="json">      "6": [
|-
        "422 2 3",
| <samp>WaterColor</samp>
        "60 2",
| ''(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.
        "749 2 3",
        "116"
      ],


</source>
This consists of a list of models with these fields:


This entry means that in order to grow from population 5 to population 6, a quest will be initiated, and that quest will require one of the following 4 items (randomly picked with equal weight):
{| class="wikitable"
* 2-3 Purple Mushrooms
|-
* 2 Emeralds
! field
* 2-3 Omni Geodes
! effect
* 1 Dried Starfish
|-
| <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.
|}
|}


[[Category:Modding]]
[[Category:Modding]]
[[ru:Модификации:Рыбный пруд]]
[[zh:模组:鱼塘数据]]

Latest revision as of 23:13, 30 May 2025

← 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, ["fish_ocean", "fish_crab_pot", "!fish_carnivorous"] will match ocean fish that can be caught in crab pots and aren't carnivorous.

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 category_fish as a catch-all for any fish without their own entry.

ProducedItems The items that can be produced by the selected fish.

When a fish pond is ready to produce output (based on a hardcoded (15 + 8 * population of pond)% chance), it checks each entry in the list and takes the first one that matches. If no entry matches, no output is produced.

This consists of a list of models with these fields:

field purpose
Id The unique string ID for this entry.
common fields See item spawn fields for the generic item fields supported by fish pond rewards.

Notes:

  • If ItemId or RandomItemId is set to an item query which returns multiple items, one item will be selected at random.
  • If ItemId and RandomItemId is set to the exact string (O)812 (roe), it will produce roe for the current fish.
  • For the Condition field, the input item matches the fish living in the pond.
RequiredPopulation (Optional) The minimum number of fish in the pond required to produce this item. Default 0.
Chance (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.
MinQuantity
MaxQuantity
(Deprecated) Use MinStack/MaxStack from the item spawn fields instead.
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:

  • The key is the population number at which this gate applies.
  • The value is a list of possible quest items that may be requested by the fish at random to complete the gate. Each item is represented by 1–3 space-delimited values: the item ID, minimum quantity, and maximum quantity. If both min and max quantity are specified, a random number in that range is used. If only the min quantity is specified, that exact number is used. If neither are specified, the fish will request one.

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.
BaseMinProduceChance
BaseMaxProduceChance
The daily chance that this fish pond checks for output on a given day, as a value between 0 (never) and 1 (always). The actual probability is lerped between the min and max value based on the fish pond's population (i.e. the probability increases within that range as the population grows). This only affects whether it checks for output; output is only produced if one of the ProducedItems passes its checks too.
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.

For consistency, vanilla entries use these values:

precedence used for
0
(default value)
specific fish
100 custom groups (e.g. desert fish)
500 broad fish type (e.g. ocean fish)
1000 fallback (e.g. fish category)
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:

field effect
Id The unique string ID for this entry.
Color (Optional) The water color to apply. This can be a standard color value, or CopyFromInput (to use the item color from the fish item data). Default none.
MinPopulation (Optional) The minimum number of fish in the pond before this color applies. Default 1.
MinUnlockedPopulationGate (Optional) The minimum population for the last population gate that was unlocked, or 0 for any value. Default 0.
Condition (Optional) A game state query which indicates whether this entry should be applied. Defaults to always true.