Conditional crops

MithranArkanere

Sodbuster
This would be a series of properties that would allow changing what a crop, tree, fruit tree, or bush produces depending on certain conditions, giving more options to modders who want to make more varied crops.

Conditional crops would allow, for example:
  • Produce that ripens more when left on the plant, changing to a different color or other properties like quality or edibility.
  • Have the same plant produce different things during different seasons or other environmental condtions.
  • Produce more, faster or with better quality when planted next to other objects, like a beehive.
  • Have a plant produce two different items as the same time, like plants with multiple edible parts (roots, leaves, fruits, stems, etc). This would also allow people to make stuff like a pomato mod, making a crop that produces both tomatoes and potatoes at the same time.
  • Let modders more easily change features like having crops produce their seeds whengthered like sunflowers do, just with content patching.
And much more, depending on how many conditions can be set.

Some examples of new crops and updated crops that could happen thanks to conditional crops:
  • Bell pepper, hot pepper, tomato: start green, then then orange, then red.
  • Grapes: Starts green, then turns rosé, then red, then blue.
  • Melon: light green if harvested in spring, pink if harvested in summer, stripped orange and green if harvested in fall.
  • Apple tree: could start green, then turn red.
  • Olive Tree. Produces olives in summer and fall, accumulates 6 fruits instead of 3. Olives turn black if left on the tree. Olives can be put in an oil maker for vegetable oil, black olives would produce virgin oil instead, which takes longer to process but is more expensive.
  • Other Fruit trees could be updated to produce faster and 1 tier higher quality of a beehive is nearby.
  • Existing Berry bushes would also be updated to use conditional production, making modding bushes easier.
    • Blackberries and raspberries could be upated to start red, then turn black if left on the bush.
  • Potatoes could produce additional potatoes if left longer before harvesting, and green potatoes if harvested too early. Green potatoes would then be usable in a slingshot to throw at enemies, exploding in an area and dealing poison damage over time that ignores the enemy's armor.

For example, for crops, this could be done with new properties like "ConditionalHarvests", a list of possible produce, the conditions for that production to happen and related data like visual changes and item info, even allowing for two productions to happen at the same time.:
  • "HarvestConditions". This would be a list of conditions to be fullfilled for the crop in this entry to be produced. It should allow as many conditions as possible to make the most of it, like:
    • Ttime since previous rippening stage
    • What crops has the plant produced already and how many of each one
    • Season, day of the season, time of the day
    • Weather
    • Whether there are certain objects within a cetain radius (trees, other crops, machines, etc),
    • A random chance check with or without luck modifiers
  • "ConditionalTexture", "SpriteIndex", etc would have extra sprite for this crop's variation if they can vary. If this is not set for an entry, it would just try to use the next sprite in the normal Texture property of the plant instead. The crop would still need a base Texture whether this is set or not.
  • The info of its harvested item just like with non-conditional harvests: HarvestItemId, HarvestMethod, CountForMonoculture, etc. Plus properties to allow variations on a single item id, like different random or specific colors, value, edibility, etc.
Berry Bushes, Fruit Trees, Wild Trees and bushes would have similar changes, allowing for more than what the Fruit property of fruit trees and and SeedDropItems property of wild trees allow.


This could be accompanied by changes to recipes to allow cooking recipes that require specific colors. For example, Green Fried Tomatoes would require green tomatoes, and pasta sauce would require both green and red bell peppers. For example, the item id in the recipe could have a color requirement enclosed in brackets before the quantity. For example: (0-80,80-250,0-80) would mean that the recipe would require the crop's colors to be between 0 and 80 red and blue, and between 80 and 250 green, so overall green.
 

FilthyGorilla

Local Legend
As cool as this would be, I have a feeling it would take way more effort than it's worth to Ape, especially if he's trying to focus on his other game
Especially since if the modders want to make more varied crops they wouldn't need new crops in the first place? Like I get some of the suggestions but others are just more content overall in which case it's a little late for that
 
Top