Timberborn

Timberborn

155 ratings
Automation
5
2
   
Award
Favorite
Favorited
Unfavorite
Mod
File Size
Posted
Updated
2.305 MB
4 Sep, 2024 @ 12:12am
22 Jun @ 9:30pm
22 Change Notes ( view )

Subscribe to download
Automation

Description
Overview
This mod allows assigning a set of rules to a building. 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 rules are written with a simple scripting language. However, it is not required to learn this language to make simple rules, since for this purpose a UI is provided. The UI is designed to be simple and intuitive, so you can easily create rules without writing any code.

If you feel like you can learn the scripting language, you can do so. The scripting language is simple and easy to learn. Read about it here[github.com].

Supported languages
English
Русский

Rules editor dialog

Rules can be created and edited via the Rules editor dialog. The dialog is opened by clicking on the related button in the building's entity UI.



Templates tools
For the simple and frequently used cases, a set of templates is provided. You can select a set of buildings and apply a template to them. The template will automatically create the rules needed to achieve the desired behavior. The created rules can be modified via the editor dialog later if needed.

All templates are grouped by their purpose. The root menu has an icon for each group.



There are also special actions available, not related to the rules:
  • Pause/resume tool. Use it to quickly change the state of a set of buildings.
  • Chained construction tool. Apply this rule to the unfinished buildings. This rule will try to order the constructions so that the builders aren't getting blocked while working. It is not guaranteed that the builders will not get blocked, but it is a good way to reduce the number of blocks.
  • Pause when almost ready. This tool applies rules that stop the construction at the last moment. Just in case you need to have control of it!
  • [Dev mode only] Immediate completion of the selected buildings. Select buildings to complete, and they all will instantly finish.
  • [Dev mode only] Inspects components and navmeshes on the buildings. Useful for those who make mods.
* Press Shift+Alt+Z to activate dev mode

Dynamite templates
Templates to create rules that automatically detonate a dynamite and place a new one at the same place. This action is repeated multiple times. It can be handy when doing massive terraform. Be careful not to kill your workers! Once one dynamite is activated, the whole field will explode. The safest usage is to dig holes below the surface (for example, from the bridges or at the cliff).



Water templates
Templates to create rules that trigger on the weather season change:
  • Pause/resume a building on the season change.
  • Close/open floodgates based on the current season.
  • Open/close the water control buildings during the drought season.



Storage templates
Templates to create rules that trigger based on the building's storage.
  • Start emptying the building when there is too much product in the inventory. In this mode, all the available workers, including the ones from the idle buildings, will rush to help move the goods out of the building to the appropriate storage with spare capacity.
  • Prioritize building to haulers when the building construction completes. The game doesn't allow setting it via UI, but with automation you can do it.



Population templates
Templates to create rules that trigger based on the current beaver or bot population size. The buildings will pause if the population is too high and resume if it is too low. It is a good way to control the bot population. Also, it will work well for the Ironteeth faction to control the beaver population.



Signals templates

This group is for the advanced players. When you need to make a rule based on a stat value of another building, the very first thing you need to do is to create a custom signal. This signal can be used in the conditions of other buildings.

The floodgate group template demonstrates how the custom signals system can be used to synchronize the behavior on the similar buildings.



Questions and discussions
Note that Steam has a special tab called "Discussions." It is a better place to ask questions or discuss features than doing so in the comments. I will do my best to answer all questions there, so don't hesitate to ask.



Discord:
See more details in the Wiki: https://github.com/ihsoft/TimberbornMods/wiki/Automation
Report a bug: https://github.com/ihsoft/TimberbornMods/labels/automation
GitHub repository: https://github.com/ihsoft/TimberbornMods
Popular Discussions View All (16)
24
15 Jul @ 7:47am
PINNED: HELP! Automation scripting questions and answers
ihsoft
10
19 Jun @ 12:19am
Crash: Automation v Moddable Weather
波紋 小石
29
28 May @ 4:40am
PINNED: Automation features
ihsoft
138 Comments
ihsoft  [author] 2 Jul @ 7:40pm 
@maxvar Are you at the latest version (2.6.0)? Please, share your save file in a discussions thread (or on Discord).
maxvar 29 Jun @ 5:34am 
Very promising (I honestly hate pop management with pods for IT!), but somehow unusable on my side - FPS drops from 100 to 3-5 when this mod is enabled.
If anyone knows how to fix this, please help.
Feniks 21 Jun @ 12:18pm 
Having the same crash with Automation but this time vs Progressive Difficulty. Game attempts to patch automation with the new seasons but it fails to find the event and crashes:

Aperion.FreeFlow: Mod started
2025-06-21 20:09:40.576 ProgressiveDifficulty Info ProgressiveDifficultyStarter.StartMod():30 Start Patching
2025-06-21 20:09:40.632 ProgressiveDifficulty Info ProgressiveDifficultyStarter.StartMod():45 Automation Mod detected... Patch Started
First uncaught exception at 2025-06-21 20:09:40Z
Stopping all root objects in active scene
Exception: Parameter "event" not found in method System.Void IgorZ.Automation.ScriptingEngine.ScriptableComponents.WeatherScriptableComponent::OnHazardousWeatherStartedEvent(Timberborn.HazardousWeatherSystem.HazardousWeatherStartedEvent _)
darkdroider 19 Jun @ 8:48pm 
good. thanks
ihsoft  [author] 19 Jun @ 5:26pm 
@darkdroider This is a question to the game developers. This mod cannot address it, but I asked one of the game devs in Discord if they would like to consider this feature.
darkdroider 19 Jun @ 9:48am 
I play on cloud gaming, and every time I need to reconfigure the game's mods and configs. Is there any way to synchronize all this, via mod (there is no access to files in the VM)???
NiJaS *Ore wa Strika Da! 19 Jun @ 4:50am 
I see, thanks cool thanks
ihsoft  [author] 18 Jun @ 7:00pm 
@NiJaS You can, but not via the constructor. The constructor supports only one condition. Via script, you can define any condition. E.g. "(and (...) (...) (...))".
NiJaS *Ore wa Strika Da! 18 Jun @ 6:21am 
Can i do an If .... and ...
then ?
ihsoft  [author] 17 Jun @ 7:06pm 
@OUTTATIME88 This time, it's not Automation to blame. It seems you have "Moddable Bindito" mod, and its the most recent version causes it. Try uninstalling the mod. Or wait till its author fixes it.