Capacity & Ripe Drops

Limit the amount of fruit a Shrub can collect, and allow it to drop the excess as items sometimes.

A shrub may produce a fruit every 10 minutes, but players may go to sleep and return 8 hours later. It is undesirable to have them come back to 48 generated fruit (constantly generating), but its also underwhelming to come back to only 1. Therefore, you may choose to make shrubs store within themselves any amount of fruit, so that they dont need to be harvested all the time.

When a shrub is at capacity, one can make them randomly drop the extra produce to the ground.

YML Format:

Storage_Capacity: [Integer Number]

RipeDropChance: [Decimal number from 0.0 to 1.0]

Capacity (1)

When a shrub has reached this amount of stored fruit, it will produce no more.


Ripe Drops (0.0)

Instead of not producing any more fruit, it has this chance of dropping it as an item to the ground every successful generation roll.

Example

A shrub with capacity 2, ripe drop chance 0.2 (20%), and generation chance 0.05 5%:

Once it has generated two fruits, and its generation cooldown reached zero:

  • Every second it has a 5% chance of generating a new fruit. If this 5% chance succeeds.

  • Because it is at capacity, it wont generate a new fruit, instead it will roll with 20% chance of success to drop it as an item.

More Technical

When a shrub would generate X amount of fruit, and fails to generate Y amount because it reached capacity (Say, it generates 3 at the same time but had only one remaining capacity, Y=2 because two failed to generate), it will roll for RIpe Drop.

If it succeeds on a Ripe Drop Roll, all those Y fruits that were not generated due to capacity cap will drop as items.

Idea: Configuring ripe drops for tree shrubs allows them to drop fruit as trees would