bapey
Newcomer
Hello! I would like some help creating a small mod that adds one fish to the game as a starting point! I've been using Content Patcher as I think that's all I'll need to complete this. I've used Ridgeside Village and the in-game XNBs to formulate my JSONs. Furthermore, I've been able to spawn in the item I added, but I crash when I attempt to fish it from the location I've added it to! I can fish up normal fish & trash from the Beach, but I'm assuming it is crashing when it reaches my fish. I've included raw versions of these files below so no one has to download them.
The error code is as follows:
These are the JSONs I've created for this:
manifest.json:
content.json:
fish.json
(I've also tried a much smaller fish.json similar to Ridgeside Village):
Larger fish.json:
fishponds.json:
aquarium.json:
Any help or pointers would be greatly appreciated! I would like to stray away from external libraries or other dependencies for now. Thank you again, have a wonderful day.
The error code is as follows:
Code:
[game] An error occurred in the base update loop: FormatException: Input string was not in a correct format.
at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type)
at StardewValley.Menus.BobberBar..ctor(String whichFish, Single fishSize, Boolean treasure, List`1 bobbers, String setFlagOnCatch, Boolean isBossFish, String baitID, Boolean goldenTreasure) in D:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Menus\BobberBar.cs:line 105
at StardewValley.Tools.FishingRod.startMinigameEndFunction(Item fish) in D:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Tools\FishingRod.cs:line 751
at StardewValley.TemporaryAnimatedSprite.unload() in D:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\TemporaryAnimatedSprite.cs:line 1029
at StardewValley.TemporaryAnimatedSprite.update(GameTime time) in D:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\TemporaryAnimatedSprite.cs:line 1182
at StardewValley.Game1.UpdateOther(GameTime time) in D:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Game1.cs:line 6732
at StardewValley.Game1._update(GameTime gameTime) in D:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Game1.cs:line 4093
at StardewValley.Game1.Update(GameTime gameTime) in D:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Game1.cs:line 3199
at StardewModdingAPI.Framework.SCore.OnPlayerInstanceUpdating(SGame instance, GameTime gameTime, Action runUpdate) in SMAPI\Framework\SCore.cs:line 1082
manifest.json:
JSON:
{
"Name": "Custom Fish Reimplemented by Bapey",
"Author": "Bapey",
"Description": "Reimplements fish from older mods.",
"Version": "1.0.0",
"UniqueID": "Bapey.CustomFishReimplemented",
"UpdateKeys": ["Nexus:???"],
"ContentPackFor": {
"UniqueID": "Pathoschild.ContentPatcher"
}
}
JSON:
{
"Format": "2.0.0",
"Changes": [
{
"LogName": "Include Fish Data",
"Action": "Include",
"FromFile": "data/Aquarium.json, data/fish.json, data/fishpond.json"
},
{
"LogName": "Include Object Data",
"Action": "Include",
"FromFile": "data/Objects.json"
}
]
}
(I've also tried a much smaller fish.json similar to Ridgeside Village):
JSON:
{
"Changes": [
{
"Action": "EditData",
"Target": "Data/Fish",
"Entries": {
"Bapey.CustomFishReimplemented_InvertedClownFish": "Inverted Clownfish/15/sinker/2.7/6.7/600 2600/spring summer fall winter/both/683 .4/1/.2/.3/0/false"
}
},
{
"Action": "EditData",
"Target": "Data/Locations",
"Fields": {
"Beach": {
"Fish": [
{
"ItemId": "Bapey.CustomFishReimplemented_InvertedClownFish",
"Condition": "SEASON Here spring summer fall winter"
}
]
}
}
}
]
}
JSON:
{
"Changes": [
{
"Action": "EditData",
"Target": "Data/Fish",
"Entries": {
"Bapey.CustomFishReimplemented_InvertedClownFish": "Inverted Clownfish/15/sinker/2.7/6.7/600 2600/spring summer fall winter/both/683 .4/1/.2/.3/0/false"
}
},
{
"Action": "EditData",
"Target": "Data/Locations",
"Fields": {
"Beach": {
"Fish": [
{
"Id": "Bapey.CustomFishReimplemented_InvertedClownFish",
"ItemId": "Bapey.CustomFishReimplemented_InvertedClownFish",
"RandomItemId": null,
"MaxItems": null,
"MinStack": -1,
"MaxStack": -1,
"Quality": -1,
"ObjectInternalName": null,
"ObjectDisplayName": null,
"ToolUpgradeLevel": -1,
"IsRecipe": false,
"StackModifiers": null,
"StackModifierMode": 0,
"QualityModifiers": null,
"QualityModifierMode": 0,
"ModData": null,
"PerItemCondition": null,
"Condition": "LOCATION_SEASON Here spring summer fall winter",
"CatchLimit": -1,
"Chance": 1,
"Season": null,
"FishAreaId": null,
"BobberPosition": null,
"PlayerPosition": null,
"MinFishingLevel": 0,
"MinDistanceFromShore": 0,
"MaxDistanceFromShore": -1,
"ApplyDailyLuck": false,
"CuriosityLureBuff": -1,
"IsBossFish": false,
"SetFlagOnCatch": null,
"RequireMagicBait": false,
"Precedence": 0,
"IgnoreFishDataRequirements": false,
"CanBeInherited": true,
"ChanceModifiers": null,
"ChanceModifierMode": 0,
"ChanceBoostPerLuckLevel": 0,
"UseFishCaughtSeededRandom": false
}
]
}
}
}
]
}
JSON:
{
"Changes": [
{
"Action": "EditData",
"Target": "Data/FishPondData",
"Entries": {
"Inverted Clownfish": {
"RequiredTags": [
"item_inverted_clownfish"
],
"Precedence": 0,
"SpawnTime": -1,
"ProducedItems": [
{
"RequiredPopulation": 10,
"Chance": 0.40,
"ItemID": 390,
"MinQuantity": 3,
"MaxQuantity": 4
},
{
"RequiredPopulation": 6,
"Chance": 0.45,
"ItemID": 390,
"MinQuantity": 2,
"MaxQuantity": 4
},
{
"RequiredPopulation": 3,
"Chance": 0.50,
"ItemID": 390,
"MinQuantity": 1,
"MaxQuantity": 2
},
{
"RequiredPopulation": 0,
"Chance": 0.70,
"ItemID": 390,
"MinQuantity": 1,
"MaxQuantity": 2
}
],
"PopulationGates": {
"2": [
"390 2"
],
"4": [
"390 2"
],
"8": [
"390 2"
]
}
}
}
}
]
}
JSON:
{
"Changes": [
{
"Action": "EditData",
"Target": "Data/AquariumFish",
"Entries": {
"Bapey.CustomFishReimplemented_InvertedClownFish": "1/fish"
}
},
{
"Action": "Load",
"Target": "assets/testClownFish",
"FromFile": "assets/testClownFish.png"
}
]
}