海狸浮生记 Timberborn

海狸浮生记 Timberborn

174 个评价
Automation
3
5
2
2
   
奖励
收藏
已收藏
取消收藏
Mod
文件大小
发表于
更新日期
2.661 MB
2024 年 9 月 4 日 上午 12:12
10 月 24 日 上午 12:12
31 项改动说明 ( 查看 )

订阅以下载
Automation

描述
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.



Gathering and planting templates
The gathering templates create rules that trigger based on the current number of plants available for gathering. The buildings will pause if there are no plants left and resume if there are some plants available. It is a good way to control the gathering buildings.

The planting template creates rules that trigger based on if there are empty soil blocks available for planting. The buildings will pause if there is no soil left and resume if there are some empty soil blocks available. It is a good way to control the planting buildings.



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.



Other mods support
Mods that significantly alter gameplay may affect Automation behavior. You can suggest mods for support in Discord or the Discussions threads — they might be added in the future.

Here’s the full list of what is supported as of now:

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
热门讨论 查看全部(18)
21
10 月 22 日 下午 11:00
Last update seems to have broken something
Aramid
3
10 月 19 日 下午 10:49
Cannot Copy Rules in Update 2.8.2
K1n1gl
1
10 月 23 日 下午 10:18
Crash on latest version triggered by scavenger flag
Emma
169 条留言
ihsoft  [作者] 22 小时以前 
@jolyne I'm glad to hear that :) Yes, you can set the gates height. You can create such a rule via the UI rules editor. If you want to write more advanced scripts, checkout Wiki: https://github.com/ihsoft/TimberbornMods/wiki/Automation-(scripting)
jolyne 10 月 24 日 上午 8:07 
This mod is awesome and exactly what I've been looking for! Is there a way in the code to change the height of sluice gates? thanks!
ihsoft  [作者] 10 月 23 日 下午 10:41 
@OldGamer This is how the game's area selection tool works. If you have more than two buildings at the same spot, then you need to decide which building to pick. The game only gives two modes: upward stack and downward stack. Making own tool which would be able to pick exactly one building is not in the plans for now - too much efforts with the little output.
OldGamer 10 月 23 日 上午 7:34 
Hi Igor, great job with the improvements, I love the new presentation with small icons in the building window. Apart from the above, there is a very small error when selecting a medium-sized warehouse (200 pieces) when it has another of the same size above it, both are selected as if it were a large warehouse (1200 pieces), it is not a critical error but it is annoying (you have to delete the rules for the other warehouse).
OldGamer 10 月 20 日 下午 4:13 
I made a mistake. I opened a game already started with v2.7.1, and when updating to v2.8.5, the game crashed. With new games, it works perfectly. My apologies.
OldGamer 10 月 20 日 上午 6:36 
v2.8.5 still crash the game. Code error on discussions.
nnnnnneko2016 10 月 20 日 上午 12:29 
After the update in the afternoon, even when starting a new game, there was no crash! Thanks!:steamhappy:
nnnnnneko2016 10 月 19 日 下午 9:58 
@dcasez According to what you said, I found the previous version at https://mod.io/g/timberborn/m/automation#description! Thank you so much! I successfully downloaded the previous version, and I was also able to find the previous version for another mod to use. Thank you very much for your help.
dcasez 10 月 19 日 上午 11:24 
mod io of timberborn automation page has previous versions you can download, then you just have to manually place it in the mods folder. had to do dl the 2.71, as i was also getting the crash.
Overheadcam 10 月 19 日 上午 11:12 
How do you revert version