Automation - ihsoft/TimberbornMods GitHub Wiki

Overview

This mod allows assigning a set of rules on the buildings and objects. The rules execute logic "If This Then That" (a.k.a. IFTTT). Each rule has a condition to check and an action to execute if the condition evaluates to "true". The automation engine allows creating any conditions and any actions. The system can easily be extended with extra conditions and actions as needed.

To keep the UI simple, a selection tool is implemented that applies a set of rules (a template) on the selected objects. It keeps UI simple, but limits the available options. However, you can adjust the templates or create your own variants via the ToolSpecification files.

Integration with other mods

Advanced Automation 4.12.0 for Timberborn 1.1 lets mods expose signals and actions through AutomationHooks*.json configuration files. These appear in the rule constructor with their provider's origin, and actions can have multiple arguments. They can also be used directly in scripts as Mods.<ProviderId>.*.

Moddable Weathers support is included: enable both mods to use Mods.ModdableWeathers.Season, without a separate integration mod. See the scripting reference for using these capabilities, or Integrating other mods for adding them to a mod.

Currently supported rules

Dynamite drill down

image

Template that automatically detonates a dynamite and places a new one at the same place. It can be handy when doing massive terraforming.

image

Pause/resume buildings based on the current weather season

image

It's especially useful for the water pumps.

image

Set floodgate heights based on the current weather season

image

Any height can be configured, but the current templates set only covers the basic cases.

image

Storage emptying

image

If the output stock goes above the defined threshold, then the building is turned into the "emptying mode". In this mode, all the available workers, including the ones from the idle buildings, will rush to help moving the good out of the building. This way it's possible to achieve 100% efficiency at the water pump.

image

⚠️ **GitHub.com Fallback** ⚠️