Tutorial: Adding a New Fish

From The Stardew Modding Wiki
Jump to navigation Jump to search


Supplemental notes[edit | edit source | hide | hide all]

See Setting Up Localization Options for information on how to make your mod compatible with translations in JSON Assets.

As of Content Patcher 1.23, fields can now be appended to, so custom fish can be added without overwriting other fish mods:

   "Action": "EditData",
   "Target": "Data/Locations",
   "TextOperations": [
         "Operation": "Append",
         "Target": ["Fields", "Beach", 4], // spring
         "Value": "{{spacechase0.JsonAssets/ObjectId:Sea Bass}} -1 {{spacechase0.JsonAssets/ObjectId:Redbanded Perch}} -1 {{spacechase0.JsonAssets/ObjectId:Dusky Grouper}} -1",
         "Delimiter": " "
      }, ]

Do note that this is not compatible with mobile modding currently, which is restricted to Content Patcher 1.19.

You can use a dependency in your manifest.json to prevent older mods using overwrites from blocking out your fish. For example, here is my mod setting a dependency for Pearl Fish so that the Sea Bass appears on the beach in winter:

      "UniqueID": "Boogie.PearlFish.CP",
      "IsRequired": false // Setting it to false means it will look for it and load your mod afterward, but will not throw errors if it's not there.
Because fish tank sprites are assigned to specific slots, they will be overwritten if two mods add a fish to the same slot. (TODO: add fish council .png)