Stardew Valley
0 of 0

File information

Last updated

Original upload

Created by

aedenthorn

Uploaded by

chiccenSDV

Virus scan

Safe to use

About this mod

Lets you plant fruit trees next to other trees and on any map or tile, let them grow next to objects and crops, change their growth rate, set max fruit and fruit per day, days maturity required for quality crops, and more! I did not create this mod, just updated some things for Stardew Valley version 1.6

Requirements
Permissions and credits
Changelogs
Fruit Tree Tweaks is a mod originally by aedenthorn. He did almost all the work, I just stumbled around some code I didn't even know to try and update it since some guy on the official forums complained it wasn't working with 1.6. If you encounter issues, disable the mod and please post a bug report. A full log of the changes from the original mod are available upon request, but the spark notes will also be listed in the changelog. The source code is also available on my Github.

DESCRIPTION
===========

This mod lets you tweak fruit trees in the following ways:

  • Prevent crops from stopping fruit tree growth
  • Prevent craftables from stopping fruit tree growth
  • Allow planting fruit trees next to other trees
  • Allow planting fruit trees on any map and most valid tiles
  • Allow fruit trees to bear fruit in all three seasons
  • Change how many days it takes for fruit trees to mature
  • Set max fruit per tree
  • Set number of fruit grown per day, or a random range of fruit grown per day
  • Allow all fruit trees to bear fruit in all seasons including winter, optionally
  • Set size and color variations to make individual fruit look slightly different from each other on the same tree.
  • Set custom days maturity for silver, gold, and iridium quality harvest


The default configuration is:

EnableMod = true
CropsBlock = false
ObjectsBlock = false
TreesBlock = false
PlantAnywhere = false
FruitAllSeasons = true
FruitInWinter = false
DaysUntilMature = 28
MaxFruitPerTree = 3
MinFruitPerDay = 1
MaxFruitPerDay = 1
DaysUntilSilverFruit = 112
DaysUntilGoldFruit = 224
DaysUntilIridiumFruit = 336
Debug = false (only enable if posting bug report)
ColorVariation = 50
SizeVariation = 20
FruitSpawnBufferX = 5
FruitSpawnBufferY = 40


You can edit the config in Generic Mod Config Menu or by editing the mod's config.json file after starting the game once.

!!! CONSIDER POSSIBLE MOD CONFLICTS FOR HEAVILY-MODDED PLAYTHROUGHS. !!!
Fruit Tree Tweaks uses Harmony which essentially re-writes game code. Other mods using Harmony may potentially cause this mod to function improperly, or cause other mods to function improperly.

Known Conflicts:
  • Deluxe Grabber Redux -- Mostly compatible, but breaks custom fruit quality timelines. Only use Fruit Tree Tweaks with this mod if you intend to keep fruit quality ages the same as vanilla.

For Users:
  • Avoid mixing Fruit Tree Tweaks with other mods that affect fruit trees, fruit quality (or even crop quality, to be double-safe), how fruit trees are harvested, or in any other way provide similar functions or changes as Fruit Tree Tweaks.
  • Custom fruit tree mods (mods that add new fruit trees to the game) or other Content Patcher should be perfectly compatible. However, this is completely untested, so do so at your own risk and definitely investigate these mods first before submitting a bug report.
  • If you find any conflicting mods, please reach out to me on Discord (see "Technical" section below) or in the "Posts" tab for awareness and so I can document these conflicts and perhaps even resolve them in a later update.


For Mod Developers or the Mod-Savvy:
Below is a list of Harmony patches applied so you know what to look out for in your other mods, or mods you are working on.
  • FruitTree constructor (FruitTree.FruitTree) - Post-fixed to change daysUntilMature.Value
  • FruitTree.IsInSeasonHere - Prefixed to return !Game1.IsWinter (i.e. returns true unless it is winter, so trees produce fruit any season except Winter)
  • FruitTree.IsGrowthBlocked - Prefixed to return false unless either (Config.)ObjectsBlock, CropsBlock, or TreesBlock is enabled and that respective object is in range.
  • FruitTree.GetQuality - Prefixed to individually check daysUntilMature.Value against custom fruit quality timelines (e.g. Config.DaysUntilGoldFruit) and return quality based on that value rather than original logic.
  • Object.placementAction - Prefixed to circumvent placement logic to allow fruit trees to be placed near each other, or even to be placed anywhere if Config.PlaceAnywhere is set to true.
  • Object.canBePlacedHere - Prefixed to accomplish essentially the same as above.
  • FruitTree.dayUpdate - Transpiled to change how daysUntilMature to growthStage conversion works.
  • FruitTree.TryAddFruit - Transpiled to change the maximum allowed fruit on a tree. Might mess with 1.6 save migrator a little.
  • FruitTree.TryAddFruit - Post-fixed to change the amount of fruit grown on a tree per day.
  • FruitTree.shake - Transpiled to change fruit offset.
For more details on patches, review the source code on my Github.



Technical

Requires SMAPI, uses Harmony.

Implements a Generic Mod Config Menu interface to change config settings in-game.

Compatible with Mod Updater for automatic updates.

Original 1.5 Code is at https://github.com/aedenthorn/StardewValleyMods (uploader note: this is the original source code, not including any changes I made).

Updated 1.6 Code is at https://github.com/chiccenFL/FruitTreeTweaks

If you want to complain or ask for help or help me test my mods, message me on Discord (@chiccen). I am also reachable on the Official Stardew Valley Discord with the same username.

A list of all aedenthorn's mods for Stardew Valley is available at https://www.nexusmods.com/stardewvalley/articles/895.