RimWorld

RimWorld

123 ratings
Farming Hysteresis
4
4
2
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.3, 1.4, 1.5
File Size
Posted
Updated
533.143 KB
21 Mar, 2021 @ 12:37am
23 May @ 1:01am
16 Change Notes ( view )

Subscribe to download
Farming Hysteresis

Description
Farming Hysteresis lets you automate enabling and disabling growing zones based on the amount of product already in storage.

Operation

The mod adds an "Enable hysteresis" gizmo to all supported growing zones and hydroponics basins. Only plants that produce a harvestable product are supported. When you enable this setting, the "Enable sowing" button is removed, and sowing and/or harvesting is instead controlled by a set of hysteresis bounds. Hydroponics basins typically don't have this setting, but with this mod and hysteresis enabled, sowing and/or harvesting also stops on those when appropriate.

When the amount of stored product goes below the lower bound, sowing and/or harvesting is enabled and remains enabled until the amount of stored product goes above the upper bound, at which point it is disabled and remains disabled until the amount of stored product once again goes below the lower bound.

Here's a graph illustrating the hysteresis process:


In this example, we assume the lower bound is set to 500, and the upper bound is set to 1000. As we can see by the three regions:
* 0-500 is the region below the "lower bound" in which sowing gets enabled if it were disabled,
* 500-1000 is the region between the "lower bound" and the "upper bound" in which no change to whether sowing is enabled or disabled is made,
* 1000+ is the region above the "upper bound" in which sowing gets disabled if it were enabled.

What this gives us is a way to build up a buffer of product, then hold off on production while we're consuming some of it, and then turning production back on when we're running low, but before we're running out.

Translations
  • None yet
Want your translation in this list? Release a translation mod (i.e. a mod with only a Languages folder, not a copy of this entire mod + the translation) for this mod, and notify me of its existence, and I'll add it to the list.

Version support

This mod supports RimWorld 1.3, 1.4 and 1.5

Source code

Source code can be found on GitHub[github.com]. Report any bugs or feature suggestions/requests on the issue tracker[github.com].

Like my work?
[ko-fi.com]

Feel free to join my Discord server[discord.gg] if you want to talk to me (and other members) about my projects, or just to hang out, I guess. :)
Popular Discussions View All (1)
0
30 May @ 4:54am
Your hysteresis bounds?
lol
118 Comments
Johnny Silverman 26 Jun @ 2:14pm 
Nevermind, either I'm just extremely dumb and was trying to sow something during a cold snap, or that was some really random occurence, but it's fully working as intended
Either way thanks a lot for responding, as I said, this mod is practically a total must for me now
Johnny Silverman 26 Jun @ 1:31pm 
https://rentry.co/9o8vkcy8
Don't think so? I'm actually running a pretty light setup rn so I'm surprised that somethings seems to break in it - mainly it's just non-intrusive, not mechanics-heavy QoL, interface mods, and little improvements.
But I have a weird feeling that it may be connected to Performance Fish, or Rocketman/Performance Optmizer since they may just cause some weird behavior in mods, especially Fish with its amounts of tweaks and improvements.
ilyvion  [author] 25 Jun @ 9:05pm 
@JohnnySilverman I'm unable to get this behavior to happen on my end. Do you use any other mods that interfere/interact with how farming/planting works?
ilyvion  [author] 25 Jun @ 9:00pm 
@JohnnySilverman I'll look into it; that's definitely not expected behavior!
Johnny Silverman 25 Jun @ 4:25pm 
This is a really useful mod as it practically removes the tedious micromanagement of growable/harvestable things in your storage, however there's something weird going on for me
When I disable hysteresis it acts as if I somehow completely disallowed the growing zone/hydroponics basin - nobody ever touches them anymore, and they cannot be right clicked to force work
So they work as long as hysteresis is on, but if there's a zone that I want to grow like a normal, vanilla zone - it's not possible anymore
Codi 24 May @ 2:25pm 
@konstantynopolitaneczka In the mod options menu you can toggle between 'sowing', 'harvesting', and 'sowing and harvesting'
Sounds like you may want the harvesting option, they will always sow but only harvest when the lower threshold is hit
konstantynopolitaneczka 23 May @ 5:43am 
Is it possible to add a function that changes designated plant to another (presumably lower bound) when it reaches the upper bound? So for example pawns would start sowing potatoes when you have enough corn, instead of just disabling sowing and completely halting your production.
ilyvion  [author] 23 May @ 1:29am 
@SigourneyWeaverinAlien4 Alright, I've looked into it. These plants have a secondary output defined that is a custom behavior added by the Vanilla Expanded Framework, but otherwise function like normal plants that have a normal output. So unless I add special code to handle this, Farming Hysteresis will just base itself off of the primary output, which in the case of oats is flour.

I don't want to promise to have it done anywhere near as fast as this bug fix I did, but I'm considering adding a compatibility layer for that Vanilla Expanded plant extension so that you can configure the hysteresis to be based on either the primary or the secondary output instead of only the primary one. Maybe even some combination like both need to be within the right parameters, or either one, but it doesn't matter which.
Sigourney Weaver in Alien4 23 May @ 1:26am 
thank you!
ilyvion  [author] 23 May @ 1:03am 
@SigourneyWeaverinAlien4 Honestly, I have no idea. I've never played with such a mod before. I'll add it to my list of things to investigate.

But in the meantime, a new version has been released with a fix to the problem you had. 👍Unsubscribe and resubscribe for immediate update.