adding_new_fishable_sea_fish_which_only_eats_krapfen

Adding new fishable sea fish which only eats Krapfen

In the last guide we created a furniture which we can use to craft the new Modder Krapfen food item. Now we will add to the game a new type of fishable fish, which only likes to eat Krapfen, so we will have to use a Krapfen to fish it.
To do it we will have to do the following steps:

  • Create a new FishItem
  • Add the newly created fish to the appropriate fishingSpot, in this case the sea fishing spot.

So let's begin then!

Ok, if you followed the previous guides you should be fairly familiar with this operation. First create a FishItem folder:

C:\Users\{YOUR USERNAME}\AppData\LocalLow\RadicalFiction\HARDTIMES\Mods\MyMod_MODPKG\Items\FishItem

Copy (save image as) this awesome sprite in the Sprites folder you will create under the FishItem folder:

C:\Users\{YOUR USERNAME}\AppData\LocalLow\RadicalFiction\HARDTIMES\Mods\MyMod_MODPKG\Items\FishItem\Sprites

Made this step we will create a FishItems.json file in the FishItem folder:

C:\Users\{YOUR USERNAME}\AppData\LocalLow\RadicalFiction\HARDTIMES\Mods\MyMod_MODPKG\Items\FishItem\FishItems.json

So that it will look just like this:

{
  "archetipusName": "baseItemArchetipus",
  "category": "FishItem",
  "items": [
	{
	  "itemRootPath": "",
	  "itemId": "ModderFish",
	  "itemSpriteName": "fish.png",
	  "itemProxySprite": "",
	  "itemExpiration": 2800,
	  "maxStackable": 3,
	  "effectModifiers": [],
	  "extras": [
		{
		  "key": "bait",
		  "stringValue": "Modder Krapfen"
		}
	  ]
	}
  ]
}

It's whorth noting that we have to define a “bait” property related to the fish, containing the id of the Item this fish likes to eat.
Don't forget to create also the appropriate lang file for this item:

C:\Users\{YOUR USERNAME}\AppData\LocalLow\RadicalFiction\HARDTIMES\Mods\Lang\English\FishItems.json

(Please note that names are arbitrary, since lang files entries all reside in the same logic level)
Fill the file with the following code:

{
  "items": [
	{
	  "key": "ModderFish",
	  "value": "Modder Fish"
	},
	{
	  "key": "ModderFish-DESCRIPTION",
	  "value": "The Modder Fish only swims in the sea and it only eats krapfens. Strange creature indeed."
	}
  ]
}

Please remember that “-DESCRIPTION” is a suffix that the game uses for looking after description of game items. So for every item id entry in the lang file the game expects to exist also a itemId-DESCRIPTION entry. Now that we have a brand new fish in game, we have to edit our FishingSpot entry, the one regarding the sea. Let's go on! [Undead fascist thugs hate modders]

In Hard Times fishing is done by approaching a FishingSpot. In the Vanilla game are defined 3 different fishing spots: the sea, the pond and the sewers. In this case we will replace the original Vanilla sea fishing spot with our own version, containing also the new fish.
Create a brand new sea fishing spot file:

C:\Users\{YOUR USERNAME}\AppData\LocalLow\RadicalFiction\HARDTIMES\Mods\MyMod_MODPKG\FishingSpots\sea.json

Fill the contents of the file with this code:

{
  "fishingSpotId": "sea",
  "successPercentage": 10,
  "minQuality": 0,
  "maxQuality": 2,
  "effectOnFish": "fishing_at_sea_effect",
  "achievementsOnCatch": "CatchFish",
  "secondaryActionWash": true,
  "secondaryActionWashEffect":""
  "fishableIds": [
	"Blowfish",
	"flattula",
	"Codfish",
	"ModderFish"
  ]
}

This fishing spot will replace (since it will load after it) the one already present in the Vanilla game. It only differs from the original concerning the addition of the ModderFish.
Please refer to the FishingSpot Modding Reference for a full explanation of all the possible FishingSpot object properties and their values.

Since we modified the fishingSpots entities we have to notify the mod descriptor so it knows that we have to load fishingSpot data.
Edit the mod descriptor file in:

C:\Users\{YOUR USERNAME}\AppData\LocalLow\RadicalFiction\HARDTIMES\Mods\MyMod_MODPKG\Descriptor.json

and add the new entry to those inserted during the previous tutorials:

{
  "modName": "MyMod_MODPKG",
  "author": "RadicalFiction",
  "gameVersion": "",
  "langFolder": "Lang",
  "itemsFolder": "Items",
  "shopsFolder": "Shops",
  "spawnersFolder": "Spawners",
  "figuresFolder": "Figure",
  "furnituresFolder": "Furnitures",
  "recipesFolder": "Recipes",
  "fishingSpotsFolder": "FishingSpots"
}

If everything went well you should now be able to start again the game with no errors(!). Be sure you have your new mod active and start a new game.
Now we should go to the seaside zone of the city and approach the sea with a Fishing Pole, and some Krapfen as a bait. We can craft Krapfen via a new furniture we added to the game, so in the next guides we will create a brand new npc, put it in a scene and create a new questline to assign him. The new questline will concern all of this things to be done for him. Cool!

If you have problems or find errors in this guide please get in touch at info@tempi-duri.net.

You could leave a comment if you were logged in.
  • adding_new_fishable_sea_fish_which_only_eats_krapfen.txt
  • Last modified: 2019/02/11 11:19
  • by thorfinio