RimWorld

RimWorld

144 ratings
Farming Hysteresis
5
4
2
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.3, 1.4, 1.5, 1.6
File Size
Posted
Updated
832.983 KB
21 Mar, 2021 @ 12:37am
30 Jun @ 1:11am
18 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, 1.5 and 1.6

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, 2024 @ 4:54am
Your hysteresis bounds?
lol
143 Comments
Annabellee 21 hours ago 
i am get error on start fro ve plants aquatic and sandy zone.Could not find a type named FarmingHysteresis.VanillaPlantsExpandedMorePlants.Defs.FarmingHysteresisControlWorker_Zone_GrowingAquatic
Could not find a type named FarmingHysteresis.VanillaPlantsExpandedMorePlants.Defs.FarmingHysteresisControlWorker_Zone_GrowingSandy https://gist.github.com/HugsLibRecordKeeper/6cf3adc9a20f9f3cade9f0f291ce51ab
ilyvion  [author] 4 Jul @ 4:29am 
@Kei I'll have a look at it when I have the chance. I know the two mods are a little unhappy working together. 😅
Kei 3 Jul @ 3:00pm 
Yes, the issue is gone. But I noticed something else. I’m using Smart Farming Continued, and when Hysteresis is enabled, the game ignores the "No petty jobs" function—which is just a QoL feature to prevent pawns from running across the map to sow a single tile.

Smart Farming Continued’s Compatibility section:
"No Sow mode is ignored if using Farming Hysteresis's toggle."

So maybe this should be reported under that mod? I’m not entirely sure how the mods interact, so I figured I’d mention it here first, just in case.

If the issue might be on your end, for testing purposes: after enabling/disabling Hysteresis on crops, you’ll need to wait about an hour for Smart Farming to update its cache.
ilyvion  [author] 1 Jul @ 11:10pm 
@Kei -- I've released a new version of ilyvion's Laboratory that should work for you now. Although you might as well stay on the old version since there's no functional changes yet. But it should at least keep working in the future now.
ilyvion  [author] 1 Jul @ 9:01pm 
@noszbytouj I'll look into it. I don't think zones are ever supposed to be able to have their plants unset, which is why I assumed it never was.
noszbytouj 1 Jul @ 1:28pm 
I think there’s a soft incompatibility between Farming Hysteresis and the Progression: Agriculture mod (https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3418017359) .
With both enabled, whenever I make a new farming zone, I get a bunch of null exceptions and all the zone’s gizmos disappear.

If I disable Farming Hysteresis for a moment, restart, pick any plant for the zone (since Progression: Agriculture leaves it blank by default), and then turn Hysteresis back on, everything works again for this zone.
noszbytouj 30 Jun @ 12:30pm 
Man thanks a lot! This is one of my fav qol mods out there; now I can play 1.6 just the way I like it
ilyvion  [author] 30 Jun @ 4:33am 
@Kei Thanks for the report. I'll see if I can't figure out why my Laboratory mod and HardcoreSK can't cooperate.
Kei 30 Jun @ 4:07am 
The new version breaks HardcoreSK. It now requires ilyvion’s Laboratory to run—without it, the game spits out an error log on startup. But if you enable Laboratory in the mod menu, game only shows a black screen when launching, and then after a restart all mods get disabled. Thank goodness the save file remembers the correct mod order, or I would have had to reinstall everything. I just downloaded the previous version from GitHub and everything’s back to normal. If I remember correctly, when the mod first added a notice that it would need ilyvion’s Laboratory in the future, I downloaded it back then and got a similar result. The master HSK build is still on version 1.4, but the mod lists it as a supported version.
ilyvion  [author] 10 Jun @ 10:23pm 
@Enrico I don't know when I will be able to add it, since I'm currently unable to work on modding, but that is a planned feature of my Colony Manager Redux mod. 😊