Mods / Easy Fruit Trees

Category: #Cheat #Food #QoL #Tweak #Utility #Worldgen
Author: Aureus_Prime
Side: Both
Created: Jan 17th at 6:37 PM
Last modified: Jan 18th at 1:49 PM
Downloads: 572
Follow Unfollow 11

Makes Cuttlings always survive and grafting never fail.

Version For Game version Downloads Release date Changelog Download
v1.0.1 456 Jan 18th at 1:49 PM Show EasyFruitTrees 1.0.1.zip
v1.0.0 116 Jan 17th at 6:39 PM Show EasyFruitTrees.zip

3 Comments (oldest first | newest first)

Aureus_Prime, Jan 18th at 1:52 PM

Taska  I implemented your fix and it worked so i uploaded a new file and credited you for your help Thank you much appreciated.

Taska, Jan 18th at 6:42 AM

Harmony isn't necessary to do this. Even in code mods that'd be overkill. Instead, for a code mod, you're able to create your own custom class that inherits Block and assign it in your JSON file as 'class: "CustomClass"'. From there, it's as simple as overriding the GetHeldItem and GetPlacedBlockInfo functions and appending whatever strings you want to the StringBuilder dsc parameter provided.

That being said, Easy Fruit Trees seems like a content mod. Code won't work for for it, but thankfully easier method.

Aureus_Prime All you've gotta do is create a lang folder in the same place where you have your patches folder. Create an 'en.json' file. Copy and paste this into it, and it'll change the description in game for you:

{

"blockdesc-fruittree-cutting": "I'm a tree cutting, wheeee!",

}

KenigVovan, Jan 18th at 6:03 AM

You can use harmony on Vintagestory.API.Common.CollectibleObject "GetHeldItemInfo" for item in inventory and

Vintagestory.API.Common.Block "GetPlacedBlockInfo" for placed block HUD. (Postfix for example and change returned string in Block and change StringBuilder

in CollectibleObject. And check if it is really cutting ofc.

Maybe somebody knows a better solution.

delete edit