#Advanced Automation

3771 messages Β· Page 4 of 4 (latest)

hybrid hatch
#

but then how do I make the BeaverLimit signal?

south wedge
#

Ah. Lol.

#

Yes, this is a very good question πŸ™‚ How do you want to set it?

#

Sounds like you want a kind of "district parameter". A limit that you can easliy adjust. Do I get it right?

hybrid hatch
#

yea, but it could be global too

#

but you could the UI on the district center for example,

south wedge
#

One (awkward) way of doing it could be using a signal that is always "true". When you save such a rule, the custom signal gets updated, but it happens only once. No ticking. I'd suggest the Constructable.OnUnfinished.State one.

hybrid hatch
#

(and optionally make it a per-district value)

south wedge
#

The custom signal value UI is what I'm considering. However, there are cases to be verified. Like, if you have a rule that constantly updates some signal value, what should the UI do with it? Obviously, all you changes via UI won't make sense.

hybrid hatch
#

yea, currently it only updates when you click off and back on to a building

#

which I think is fine

#

yea, that works,

#

where are import/export are they new?

south wedge
hybrid hatch
#

was there a way to copy a set of rules as text?

#

ahh, yes the ⬆️ and ⬇️ outside the dialog

#

So this works: ⁨```lisp
condition:(gt (sig District.Beavers) (sig Signals.BeaverLimit))
action:(act Pausable.Pause)

condition:(lt (sig District.Beavers) (sig Signals.BeaverLimit))
action:(act Pausable.Unpause)

condition:(eq (sig Constructable.OnUnfinished.State) 'finished')
action:(act Signals.Set 'BeaverLimit' 3000)

#

The last rule is only added to a single place (one of the breeding pods is the easiest way)

#

The Master Control Pod

#

heh, are you going to allow export/import in Python?

south wedge
south wedge
hybrid hatch
#

heh

#

I assume the hard work is done,

#

it's "just" a matter of replacing ⁨condition:($lisp)⁩ with ⁨if $python:⁩ and ⁨action:$lisp⁩ with ⁨ $python⁩?

#

heh, I was going to suggest moving the import/export into the dialog, and then I see you moved it out a couple of months ago πŸ™‚

south wedge
#

UI was the easiest part to switch to a different syntax. It's a representational level.

#

E.g. the constructor UI is actually making Lisp expressions. Dynamites are also using Lisp to make new dynamites. Users of the mod don't need to know it, but I have to deal with it.

hybrid hatch
#

yea, so on export you could run it through the same lisp->python logic, and import run it through python->lisp logic?

south wedge
#

I just need to make the code HappyFT

hybrid hatch
#

ahh, import/export -- maybe have a single dialog for both?

#

sorry my brain is stuck on the icons,

#

I keep thinking they mean "move rule up and move rule down"

#

I was also looking at other options, eg

south wedge
#

I like the suggestions! What are your preferences?

south wedge
#

Left or right? I like both icons.

#

Left will look better.

hybrid hatch
#

heh, I was amused by the discussion about what the arrow is relative to

#

export from server == download to client,

#

import to server == upload from client

south wedge
#

In TB, all icons get scaled. Thin lines don't look nice after this.

hybrid hatch
#

no

south wedge
#

But I like the idea with the bold up/down arrows

#

Let me try it.

hybrid hatch
#

where are they in git?

hybrid hatch
#

ahh, the individual assets are not in git?

hybrid hatch
#

but Unity can compile pdn into an AssetBundle?

#

ahh, under ModsUnityProject gotcha

south wedge
#

PDN is a kind of "adobe photoshop" file. You use it to make PNG.

hybrid hatch
#

ahh, but you have made the icons solid then?

hybrid hatch
south wedge
hybrid hatch
#

I'm still on mod version v3.3.0

#

which is the latest,

#

okay so maybe they will look nicer solid

#

agreed

south wedge
#

Kowalski! Options?
It's for the import icon.

hybrid hatch
#

heh, getpaint.net screenshot is my desktop background πŸ™‚

#

Cosmic Cliffs

hybrid hatch
south wedge
#

However

hybrid hatch
#

But do you want black?

south wedge
#

But no go anyway.

south wedge
hybrid hatch
#

What you updated a week ago looks much nicer (at least looking at the commit diff)

south wedge
#

But $3.33 per a month,. Given I only need ONE month. It may work.

hybrid hatch
#

where did you get the current icons?

south wedge
hybrid hatch
#

heh

#

7000px x 7000px for a set of 4 icons?!?!? What are you putting them in?

#

It looks like most of them have a bar or "container" of some sort at the bottom

#

and then some have it at the top πŸ™‚β€β†”οΈ

#

soem better than others

#

I think I actually prefer the sideways arrows going in and out of boxes

south wedge
#

A variant.

#

(import only)

hybrid hatch
#

needs some tweaking to make it fit the game colors,

south wedge
#

I see a good candidate for importing, but not for exporting.

hybrid hatch
#

upload icons are on the bottom row, download on the top row,

#

export and import are next to each other

south wedge
hybrid hatch
south wedge
#

Ah, the blue color kekw

hybrid hatch
#

They look a bit thin smaller:

south wedge
#

TB theme does't like coloring πŸ™

hybrid hatch
#

no, the color would need to be the existing yellowish color

south wedge
#

How about this?

hybrid hatch
#

I'm mostly looking at the shapes

#

I think sharp straight edges look nicer

south wedge
hybrid hatch
#

Like the above, just in the yellow of TB

south wedge
#

v3.4.0 (February 2nd, 2026):

  • [Feature] The stock game "copy building settings" feature is now also copying the automation rules.
  • [Feature] Rules can now be selectively enabled or disabled. The disabled rules stay on the building, but they won't be executed until enabled.
  • [Feature] Rules order can now be changed via the rules editor dialog. Note that it doesn't affect the execution logic. It's a purely cosmetic function.
  • [Feature] Added a template tool to enable/disdable all rules on the building(s).
  • [Fix] Dynamite detonation doesn't work.
south wedge
hybrid hatch
#

or if you need a 4x version

#

It's this, but filled in

#

nite

hybrid hatch
#

Digital (non-print) License seems to be

#

ahh, no, for $15/month

#

I assume you can do 1 month only?

#

maybe not even "Per user / month, Billed annually"

#

You can also adjust the weight and size easily

#

it also has a stroke/color adjuster

#

"open source vector icons"

reef widget
#

Options to pause individual rules?
That has only been requested... a few dozen times.

cold orchid
#

I must be blind but I don't see the option to pause the rules

#

there is an option but you need to click on the building, then click on the rules cog, then click on each rule

#

it would be great if the option was present in the building screen without having to open rules window

#

I have 4 badwater pumps, for example, and if I want to override all rules I need a total of 14 clicks before I override, and at the end of doing that I will probably need to unpause them all again πŸ˜„

reef widget
potent verge
#

Which sounds like its better for that particular use than having to click on every building

hybrid hatch
#

yea, but it would be nice to have it easily available on the per-building panel too

cold orchid
#

oh thank you, I didn't think of looking there

#

since I've been using those little scripts I haven't touched the templates

#

I have to say, it is possible to automate the entire colony without having to do nothing but watch the beavers running around

#

the only thing needed is a surplus of workforce to avoid collapse when a few buildings kick in all together

#

I wish it was possible to assign a beaver to 2 diffewrent workplaces, so that when 1 closes down I can be sure the workers goes to the second place and nowhere else

south wedge
#

Folks, I'm in a process of thinking on the full Python support. So far, it's more a brainstorm to figure out what we may want. Not even a design. What scripts do you see? Obviously, these should be examples that cannot be done today with using the existing templates. I made this, based on some old convo about reacting on the recipe changes. Any more ideas and examples?

from igorz.automation.buildings import Inventory
from igorz.automation.buildings import DistrictBuilding
from igorz.automation.buildings import Pausable
from igorz.automation.buildings import Workplace
from igorz.automation.core import Signals

class MyBuilding(DistrictBuilding, Inventory, Pausable, Workplace):

  def __init__(self, **kwargs):
    super().__init__(**kwargs)
    self.init_recipes()

  @event("Weather.Season")
  def on_season_changed(self, value):
    if value == "DroughtWeather": self._pausable.Pause()
    else: self._pausable.Unpause()

  @event("Workshop.Recipe")
  def on_recipe_changed(self, value):
    self.init_recipes()

  def on_inventory_changed(self):
    has_input = True
    for good in self._inventory.InputGoods:
      if (self._inventory.AmountInStock(good) == 0
          and self._district_building.Signals.ResourceStock < self._district_building.Signals.ResourceCapacity * 0.1):
        has_input = False
        break
    if has_input: self._workplace.AssignWorkers(self._workplace.MaxWorkers)
    else: self._workplace.RemoveWorkers()

  def init_recipes(self):
    Signals.clear_listeners("recipe")
    for good in self._inventory.InputGoods:
      Signals.register_listener(f"Inventory.InputGood.{good}", self.on_inventory_changed, group: "recipe")
#

In theory, such approach even allows direct access to the game components methods. Which gives a great power... to destroy the game πŸ™‚

hybrid hatch
#

heh, did think about trying to bundle IronPython or Python.NET in a mod πŸ™‚

south wedge
hybrid hatch
#

yea, my assetbundle cacher saves ~15 seconds, but that's a small amount compared to the full load cycle

hybrid hatch
#

large asset bundles (like factions) have load times of 7 or 8 seconds, caching them reduces it to fractions of a second

#

unpublished, but there's a dev version at: #πŸš€mod-users message

#

So the cost is extra disk usage

south wedge
viscid eagle
#

any way to make my loggers only unpause when theres both: no trees to plant OR 20 logs (max) in its output. heres what i have so far, but this just keeps unpausing them because there arent 20 logs inside and the output overrides the ready to plant:

#

i already tried using + like when you are trying to check for two outputs, but i dont know how to check for two different actions.

viscid eagle
#

how do i write it?

#

where exactly do i put OR?

#

sorry im stupid

#

just had to write in lowercase

#

yep, works flawlessly now, thanks.

viscid eagle
#

ok no, it doesnt work...

#

they dont pause if they have 20/20 logs stored because theres still trees that can be cut down which overrides the pause.

#

any way i can make it so that:

if no trees are available to be cut then pause BUT if log output is 20/20 then override first and pause.

#

ofc also resume if there are available ones and if there arent 20/20 logs stored

lost rover
#

Use this script instead (via the import button). It (roughly) does what you want, but better (no dropped logs from gatherers).

condition:(eq (sig Collectable.Ready) 0)
action:(act Workplace.RemoveWorkers)

condition:(ne (sig Collectable.Ready) 0)
action:(act Workplace.SetWorkers 100)

condition:(eq (sig Inventory.OutputGood.Log) 2000)
action:(act Pausable.Pause)

condition:(lt (sig Inventory.OutputGood.Log) 400)
action:(act Pausable.Unpause)

viscid eagle
#

wtf... i didnt know the mod was that powerfull...

#

it can just set workplace slots to 0??

#

thanks btw

#

i wana wait a bit tough to see if it works or not, because i dont need logs rn and they are all paused.

#

gotta wait till i use some

digital pebble
viscid eagle
#

the seasons stuff and population stuff are things i dont need, but im curios as to what you could do with that.

digital pebble
#

One thing missing is power. I would love to be able to include BP(hp) in my scripts.

viscid eagle
#

also, im curios if theres a way to set the "total stock of ... in settlemet" thing to make it active under the condition that there is for example:

i can store 80 planks but want my lumber mill to stop when it reaches 80, but i dont want to manualy adjust the stat everytime i add storage, any way to make it take the max stock and just take that as its number to stop?

digital pebble
#

There is global stock.

viscid eagle
viscid eagle
#

theres only capacity and stock

digital pebble
#

horsepower. I'd love a reading of how much my power sources are making.

viscid eagle
#

so idk if you need to manualy script that part.

#

i only use constructors cuz the actual coding stuff is too advanced for me

viscid eagle
#

do you mean like how much it makes in horsepower or if it displays how much power youre generating?

digital pebble
digital pebble
viscid eagle
#

tried it and it does what i wanted.

viscid eagle
digital pebble
reef widget
viscid eagle
lost rover
# viscid eagle also, im curios if theres a way to set the "total stock of ... in settlemet" thi...

This script might do the trick. It aims for a ratio of 2:1 (logs:planks). If the ratio is too low (too many planks & too few logs), it releases the logs from the lumber mill (e.g. pick up by builders).

condition:(and (eq (sig Inventory.OutputGood.Plank) 1300) (ge (sig District.ResourceStock.Plank) (sig District.ResourceCapacity.Plank)))
action:(act Workplace.RemoveWorkers)

condition:(ge (sub (sig District.ResourceCapacity.Plank) (sig District.ResourceStock.Plank)) (sig Inventory.OutputGood.Plank))
action:(act Workplace.SetWorkers (getvalue Workplace.MaxWorkers))

condition:(and (le (sig District.ResourceStock.Log) (sig District.ResourceCapacity.Log)) (le (add (sig District.ResourceStock.Log) (sig Inventory.InputGood.Log)) (mul 200 (sig District.ResourceStock.Plank))))
action:(act Pausable.Pause)

condition:(or (gt (sig District.ResourceStock.Log) (sig District.ResourceCapacity.Log)) (ge (sub (add (sig District.ResourceStock.Log) (sig Inventory.InputGood.Log)) (mul 200 (sig District.ResourceStock.Plank))) 3900))
action:(act Pausable.Unpause)

half lichen
#

Hmm... am I doign something wrong?
I have a Lumber Mill separate from my main mills that just has a manual power wheel on it, and I'm trying to set it to only be active in Drought/Badtide weather, but it keeps also changing the weather state for the other Lumber Mills (which were set to only "Temperate" weather.

It seem changing one (any) of the lumber mill weather settings is causing it to change the settings for all of them?
Expected, or bug?

viscid eagle
viscid eagle
half lichen
viscid eagle
half lichen
hybrid hatch
#

hmm, copying a breeding pod with rules to manage population ends up with the rule actions with a "parse error" for some reason

#

you still have to copy them using the rule copy tool

lost rover
hybrid hatch
#

and not just breeding pods, seem to happen to other buildings too

#

another idea for breeding pods: to have a completion percentage measurement

half lichen
#

The Timberpunk map is awesome btw - altho I had started it on a semi-broken version of the map... I need to go back and re-try it on the latest release lol

hybrid hatch
#

another feature request: some sort of sound when applying a paste of rules to an item

exotic hemlock
#

I am crashing when trying to reorder items:

#

If I click the down arrow of the top item it works

exotic hemlock
#

Feature request: the copy rules button should be enabled when there are no rules, I want to copy that there are no rules instead of having to click "Clear all rules" on each building

reef widget
exotic hemlock
south wedge
#

@viscid eagle When creating rules, you need to be careful when the same building property is changed from multiple rules. The rule of thumb: the conditions on such rules must be mutual exclusive. Otherwise, you will get unpredictable behavior when one rule sets the state to one value, and the other rule resets it back. You may see it as "the rule doesn't work", but in fact there will be two rules triggeried, which actions overwrite each other.

Good example: Pause/Unpause. E.g. here is an example of mutual exclusive rules (pseudo code):

if ReadyToCollect > 1 and LogStock < 10 then Unpause
if ReadyToCollect == 0 or LogStock >=10 then Pause

Btw, this pair of rules can be made via "Invert" button in UI. Create one rule, and the inverted version will be made for you.

If you have more than two rules affecting the same state, then the logic becomes more complex.

#

I start thinking that some tracking system is needed to detect such cases. I've been though it a couple of times too.

exotic hemlock
#

I just spent too much time trying to make a sluice open and close using contamination level until I realized the contamination I use is multiplied by 100. No idea if this is a bug or its maybe documented somewhere. Have been using water height with no problem.

#

Ignore the "using depth" with no problem, I did not use it anywhere.

#

Found it

viscid eagle
south wedge
#

v3.4.1 (PREVIEW started on Fabruary 11th, 2026):

  • [Change] On the building copy (construction or settings), the automation rules are now copied only if the buildings are the same.
  • [Fix] Automation scripts copying results in the script parsing error on the copied building.
  • [Fix] When building copied structures in the finished state, and with some automation rules on them, could crash the game.

It's a PREVIEW. Barely tested, but seems working. The stable version will be later.

#

(pardon my English, I will polish it with AI later)

south wedge
#

Now, official.

v3.4.1 (February 12th, 2026):

  • [Change] On the building copy (construction or settings), the automation rules are now copied only if the buildings are of the same type.
  • [Fix #135] Game crash when trying reordering the rules #135.
  • [Fix #136] Rule copying results in "parsing error" in the copied rules.
  • [Fix] When placing a copied structure in finished state (dev mode), the game could crash.
exotic hazel
#

"ready for collection" on lumberjacks does not appear to include stumps with remaining logs
the instant the circled tree was cut down the lumberjack flag's worker count was set to zero so the remaining logs never get collected

#

Automation 3.4.0

#

I forced an update and the issue persists in Automation 3.4.1

half lichen
# exotic hazel "ready for collection" on lumberjacks does not appear to include stumps with rem...

Yeah I noticed this, too. One of the other automation-like mods adds a delay (usually 2-5 in-game hours, user-adjustable) before pausing things like collectors to deal with this sort of thing. I'm not sure why that doesn't count as something "ready for collection" - I do know that if storage fills up before it's all collected, there will be stuff out to be picked up still, then you'd probably still want to pause until storage clears up, so there might be a weird edge case if you don't do something simple like just the several-hour delay?

south wedge
exotic hazel
half lichen
exotic hazel
#

With my luck the tree is always cut down as the work day finishes

half lichen
mortal lion
#

Loving the automation mod. I'm trying to figure out if there's a way to send a signal that has the in game time? If there isn't i'll gladly pay someone $20 to make it.

south wedge
#

Or do you need more specific things like "time of the day", "working hours", etc.?

south wedge
#

What do you think?

digital pebble
#

Is there a way to change a farmhouse between plant and harvest? I didn't see anything in the constructor that would work for that.

south wedge
digital pebble
#

Of course simply building more farms wouldn't work because each farm adds housing space for 3 more beavers and in that mod they breed to fill all avaliable housing. πŸ˜›

#

It is a cool, but wicked mod.

south wedge
#

Okay, I will think about it. I was going to revise the building "state" change approach anyway.

#

In my list, I have (had) at least 2 buildings: stockpile and sluice. Now we have farmhouse.

digital pebble
#

Many thanks for the consideration.

exotic hazel
#

seems like a logic error in the rule constructor for buildings under construction: they list every item's stock condition except for the ones relevant to that building

#

tapper's shack construction ghost does not have an option for pine resin (or maple syrup)

#

once construction is finished, pine resin is an option

south wedge
# exotic hazel once construction is finished, pine resin is an option

It's not a bug, more a compromise. If I will be showing all possible resources in the list, it will be hard to use constructor. So, I only show those for which the district has at least one inventory. When you build your first Tapper's Shack , there will be no resin in the output inventories until the construction is complete.

#

Btw, you still can go to the script mode and setup a rule from there.

exotic hazel
deft tulip
digital pebble
deft tulip
#

@south wedge the name of the platforms in whitepaws are different.
"Buildings/Whitepaws Faction/Townstuff/Platforms/Platform_Simple.Whitepaws.blueprint", - 1 height
"Buildings/Whitepaws Faction/Townstuff/Platforms/Platform_Tall.Whitepaws.blueprint",- 2 height
There is no 3-height platform.

south wedge
#

Wow! I wonder what's the name of the platforms for whitepaws

south wedge
#

I will fix it later today.

deft tulip
deft tulip
south wedge
#

Well, this faction thing is not a good thing. Key bindings are not filtered by the faction suffix πŸ™

digital pebble
#

Oh no.

#

I don't want to even contemplate late-game WhitePaws without your automation. /laughs

south wedge
#

I'm looking for a solution. So far, not many options.

digital pebble
#

Your efforts are greatly appreciated.

deft tulip
#

@south wedge Also I think levee and dam will also fail.
White paws have multiple levees and multiple dams.

#

"Buildings/Whitepaws Faction/Dams/FloodgateDam.Whitepaws.blueprint",
"Buildings/Whitepaws Faction/Dams/Loglevee.blueprint",
"Buildings/Whitepaws Faction/Dams/Loglevee2.blueprint",
"Buildings/Whitepaws Faction/Dams/primitivedam3x2.blueprint",
"Buildings/Whitepaws Faction/Dams/primitivedam3x2upgrade.blueprint",
"Buildings/Whitepaws Faction/Dams/primitivedam3x3.blueprint",
"Buildings/Whitepaws Faction/Dams/primitivedam3x3upgrade.blueprint",
"Buildings/Whitepaws Faction/Dams/primitivedam3x3Utility.blueprint",
"Buildings/Whitepaws Faction/Dams/primitivedam3x3UtilityUpgrade.blueprint",
"Buildings/Whitepaws Faction/Dams/primitivedam3x3variant.blueprint",
"Buildings/Whitepaws Faction/Dams/primitivedam3x3variantupgrade.blueprint",

#

It doesn't have a 1x1 dam.

#

and 2 levee
Loglevee- 1 height
Loglevee2 - 2 height

south wedge
#

I don't yet have good solution. Will try today eveng more, but then I;m going to vacation for 3 days. A workaround which you can do on your side, is dropping the bad tools blueprints:

Tool.CustomTools.LeveePlusTool.blueprint.json
Tool.CustomTools.PlatformPlusTool.blueprint.json
reef widget
#

I sure hope there isn't any mod-breaking updates then.

digital pebble
digital pebble
digital pebble
south wedge
#

v1.3.1 (2/20/2026)

  • [Fix] The game crashes if the non-stock game factions are in play.

@digital pebble @deft tulip Folks, I did my best. The "bad tools" should not appear for non-stock factions anymore. If it still fails, you know the workaround πŸ™‚ My anniversary vacation starts at 10AM next day, so - good luck HappyFT You may see me online and even commenting, but no coding in the next 4 days kekw

digital pebble
#

I do hope you have a most wonderful and memorable time. Enjoy.

And thank you very much.

deft tulip
deft tulip
#

Any one knows what is wrong in this condition?

exotic hazel
reef widget
# deft tulip

What building are you trying to apply this to, and is there any storage for gears in the entire district (including factories producing our consuming them)?

deft tulip
#

Yes. And gear work shop.

deft tulip
deft tulip
#

Lisp works without any issue.

south wedge
#

The error about not applicable seems a bit odd, though. I'd expect a parsing error.

west mountain
#

If the documentation is not built into the mod, it's as if it doesn't exist.

south wedge
#

Does the middle button at the bottom count? Or how do you see integration?

west mountain
south wedge
# west mountain Does it open a link in the default browser, instead of opening the documentation...

How about AI, YT and the internet in general? Do they exist for the users if not built-in into the game? C'mon, it's not a serious talk. People don't read documentation not because it's "improperly built-in", but simply because a regular person is lazy. Myself included kekw The only difference is when the person will finally go reading documentation on the confusing topic. Some will go sooner, some will go never. It's a personal choice.

west mountain
#

They exist in genera, but they don't exist in the game. And if I want to play the game, I play the game, I don't watch youtube tutorials unless I'm specifically not playing the game, or any other game, for that matter.

#

So unless someone builds a youtube player or an AI as a mod for the game, the AI and YT in general don't exist in the game.

#

And yes, people will read the documentation on confusing topic, but there are easier ways to solve the same issue, like complaining in the mod's comments, as I did before someone suggested I complain in the Timberborn server.

south wedge
#

Speaking about the easier ways. ChatGPT solved the case in 30 seconds. I spent more time to type the prompt. However, if Alt+Tab during playing Timberborn is not allowed, then this solution doesn't work rip

west mountain
#

Another issue I keep hitting is that Workplace.SetWorkers(0) doesn't work, so I have to rewrite it to Workplace.RemoveWorkers() every time, or duplicate, invert, edit script, copy, paste, save, discard the inverted-duplicated, and delete the inverted-duplicate.

south wedge
#

And please understand me correctly, I'm not saying the mod is perfect and no improvements needed HappyFT I welcome all feedback, but not all feedback will result in code changes for various reasons. I'm just one dude working on the mod in my free time. No way everything will be addressed.

west mountain
#

Also, trying to use District.ResourceStock.WheatFlour < 15 or District.ResourceStock.Bread > District.ResourceCapacity.Bread * 0.995 , after saving, shows it as District.ResourceStock.WheatFlour < 15 or District.ResourceStock.Bread > District.ResourceCapacity.Bread * 1 , but that's merely annoying.

west mountain
#

I'm just bringing suggestions I think are reasonable.

south wedge
west mountain
#

And I believe Workplace.SetWorkers(0) should be calling Workplace.RemoveWorkers() .

#

But editing the script will show the correct value.

south wedge
west mountain
#

My guess is that you're rounding the value at 2 digits, instead of another number of digits, like 4. I think 4 digits should probably be enough, for most use-cases

west mountain
#

So it won't add the extra zeroes, but adding the extra digits could make the script more usable even in the thousands-of-beavers territory.

south wedge
west mountain
#

Gocha.

west mountain
#

After all, we cannot have negative water.

south wedge
west mountain
#

Gocha. That's unfortunate, but understandable.

south wedge
#

And speaking about fixed precision, it becomes even more tricky on the long expressions. E.g. 1 / 3 * 3 = 0.99 and 3.07 / 2 * 2 = 3.08 kekw I'm pretty sure AI will be able to explain it and suggest ways on how to avoid the rounding issue.

But, honestly, this rounding artefact should not affect the game. It's not the science calculation.

west mountain
#

Oh, I understand why. 🀣 I'm a programmer.

worn hinge
south wedge
#

ChatGPT explained it very clear. Much better than I could even try to 🀣 Btw, I spend extra efforts on making Wiki AI friendly. So, if you don't want to read the entire doc, at least try AI queries and report if it didn't work. This I will try to fix for sure (not AI, the Wiki).

west mountain
#

I already use the Stock > Capacity * 0.99 a lot.

#

But good point about the ratios.

#

Even thoguh I'd likely never use it, either.

south wedge
#

I tried to find a free AI API to attach to the game's dialog, but didn't find good options.

west mountain
#

Not sure there are free versions.

west mountain
#

Any chance you're going to add a signal for the power being transmitted?

south wedge
#

It's a long debating topic. Personally, I'm strongly against it. I've spent enough time trying to make automation a good management tool for power distribution. However, it's not working. You can create some very basic rules, but they will cover at most 10% of what you really need. To properly manage power, you need to consider all generators and consumers in the network. Optimizations at the level of a single building won't work on even a small colony.

And that's why I created SmartPower. It does everything that I would want to make via automation, except no coding and no lags. The power based signals would be triggering very frequently, in some cases - every tick. If you only need to read power from a building, the getvalue operator can help.

reef widget
#

Even if you did, I can't see it being anything but an adapter to bridge Automation and Smart Power.

south wedge
#

What is doable, is propagating some signals from SmartPower. Like "building was resumed/suspended". Not sure how helpful it is, but why not. However, I would avoid affecting decisions that SmartPower does. The logic there is already complicated.

west mountain
#

I understand.

south wedge
#

Btw, whoever posted the PR (this) - thank you, mate! LoveIT I can be a douchebag in reviews (and I usually am - ask my colleagues kekw ), but I value the effort. As a result, we will have new signals and actions! birthdaypartyparrot

#

It's very motivating when people actively involve GuitarFT

west mountain
#

Oh, there's a github for the mod? Noice!

exotic hazel
#

one bit of UI feedback: the arrows to move rules up and down suggest that order matters, i.e. that it will stop evaluating rules when one of them has its conditions met

south wedge
south wedge
exotic hazel
south wedge
exotic hazel
#

I use conditional formatting in Excel every day at work so I am used to rules evaluating in order and being able to optionally stop evaluating when a condition is met

#

but with an event-driven system I can see how that would be a pain in the arse to implement

#

and I can use scripting instead of the constructor to produce the results I need

west mountain
exotic hazel
south wedge
west mountain
#

I replied to both of them.

#

I just happened to check my mails. 🀣

south wedge
#

It's always nice to see a person who can file PRs HappyFT

west mountain
#

Not gonna lie, Github is kind of messy, for ease of contributing. We can't even quick-PR by editing a file in the repositories we cannot commit to, or even in repositories we can commit to.

south wedge
#

Copilot just suggested a comment to my new function (copy/paste as-is): "It's teh caller's responsibility to replace the old value". Do you see a problem? πŸ™‚

south wedge
#

Tbh, the best we have.

west mountain
#

Yup. Too bad there isn't a better alternative.

#

By the way, when are you going to update the mod, with those new changes I made PRs for? 🀣

#

Even if the constructor still uses the 30 instead of 0.3, for 30%.

south wedge
west mountain
#

In that case, would it be possible to use floats with 4 digits? (I think I asked before, but I forgot the answer.)

south wedge
west mountain
#

When you have 1000 beavers or obscene amounts of storage with 100 beavers, for droughts and badwater tides which last up to 100 days or more.

south wedge
#

Fixed precision is not a curse. It's just an obstacle. It's avoidable. Multiply all your inputs by 10, and then de-normalize - you've just improve the precision of your calculations by order of magnitude! Multiply by 100, and you'll be a hero.

#

Being a programmer, you likely know why 0.1 + 0.2 may not always be 0.3, right? That's why automation doesn't deal with floats. Only integers.

west mountain
#

when the storage of water is less than the capacity of water multiplied by 0.003, pause the building, applied to all the other buildings, maybe except a farmhouse or two.

south wedge
west mountain
#

Or setting an extra pump to start when the water level is above 0.999 , meaning the dam is about to overflow.

#

Or a dam to open, to prevent overflowing.'

south wedge
#

The game doesn't have anything beyond second digit after the period. So the script does. If you ever need to use more precision, the Math can help.

south wedge
west mountain
#

Oh, I see. That's unfortunate, then.

south wedge
#

Fixed precision only limits what you can put AFTER the point. However, you can move the point as you wish.

#
a / b < 0.001 - BAD!
1000 * a / b < 1 - GOOD!

Even AI knows it kekw

south wedge
#

If you didn't know, AI - is the new reality on the job market. Many IT related people will loose their job in the following 2 years. Which is sad.

However, the smart people say: "It will not be AI that takes the jobs out. It will be people, who know how to use AI in their job positions."

So, learn!

west mountain
#

Also, I sent you a DM/PM.

south wedge
west mountain
#

True.

south wedge
#

In my every day duty, I found AI useful for the routine tasks. In can start 2-4 tasks in background, and focus on one very human task (lol). It really speeds up the work. On the other hand, we don't need many programmers now rip

west mountain
#

Unfortunately, the lack of easy-to-use-and-set-up integration of both online AI and local AI, to popular online services as well as local files, is the thing holding AI back.

#

Also, I sent you a DM/PM on Discord.

#

I mean, using LM Studio is not bad, but it's also not as simple as pressing a button to give the current chat the context of a whole folder and all in it, from my (limited) experience so far.

south wedge
west mountain
#

Oh, I understand. My bad.

#

Feel free to ignore it, if you want.

south wedge
#

Don't ask. I was neartly banned for asking kekw

south wedge
#

I din't mean you can't do it πŸ™‚

#

DO IT

west mountain
#

My experience so far was that it's okay to send messages once, but not to insist if there was no reply or if asked to not DM again. But I might be one of the lucky ones. 🀣

south wedge
west mountain
#

Which is unfortunate.

south wedge
#

When I was pointed out that I can't to DM people if they didn't agree in the public chat. I was surprised. To say the least.

#

But you all probably know the Discords rules by now. Every server, or even channel, is it's own world. With its own rules.

west mountain
#

The lack of standardization is very annoying.

west mountain
#

Could you add a signal for the progress of each building's production? For example, if I want the breeding pods to stop at 99%, or the mulber production, or something else.

#

That would be very useful.

west mountain
#

Also, the rule preview doesn't show the paranthesis. But that's not an issue, since in script-editing mode, it can be seen.

west mountain
#

@south wedge Can you guess what's wrong with this code?

if 
(Collectable.Ready > 0 and (District.ResourceStock.Berries < District.ResourceCapacity.Berries * 0.8 or District.ResourceStock.MangroveFruit < District.ResourceCapacity.MangroveFruit * 0.8) )
then Workplace.SetWorkers(1)

That's right! I have the berry storage full and berries ready to collect, but since I added the condition for mangroove storage, it keeps the job populated.

Is there a way to check what kind of collectable is ready? For exmple, Collectable.Berries.Ready and Collectable.MangroveFruit.Ready and Collectable.Carrots.Ready.

south wedge
# west mountain Could you add a signal for the progress of each building's production? For examp...

For breeding pods not yet feasible. The progress there is not ticking (as it happens for the construction progress), it's a timer that triggers when the breeding time elapses. I haven found a good way to track it without running a check on every tick. And, honestly, freezing pods at 99% seems a bid of cheating. I'd design this component so that it resets all the progress if paused or didn't have nutrients for too long time.

west mountain
#

Lots of people basically have a small army of beavers ready to spawn, just in case.

south wedge
#

In my plays, in the early game, I usually use gathering posts as "free" storages. They gather stuff until overflow, then stop. Once the initial stage passed, only few get activated at time.

west mountain
#

Thanks!

west mountain
west mountain
#

Same story for farmhouses.

south wedge
#

Sounds like I need to give it a second thought WorkHardFT

south wedge
#

@west mountain

#

Not exactly addressing your issue, but at least the error reporting is now better kekw

#

I wish I can express how I *REALLY * hate floats DamFT Btw, it's the reason why Automation only works with integers.

#

0.99 may or may not be equal to 0.99. Sounds weird? Welcome to my world.

serene urchin
#

#πŸ“’announcements message 🀯

south wedge
#

It's 0013 in my time now, so sorry - I will get the most of fun tomorrow πŸ™‚

half lichen
#

oh wow

hard dust
#

That's a big compliment πŸ™‚

tiny badger
#

2 lines of simple code... or an 8 x 2 construction on the map πŸ€” noting I maybe suck at trying to construct with this logic vs writing code as I haven't done basic logic like this in 20 odd years.

deft tulip
tiny badger
serene urchin
#

but may allow this mod to get good triggers for information πŸ˜‰

reef widget
#

In particular, this mod could never trigger on science or rate of production before, and it had no good way to get a direct user input (i.e. levers)

south wedge
#

Just now got a chance to read the announcement. Well, it's a really nice addition. Need to check the code to see how to integrate. Scripts+game automated buildings can be a good pair.

south wedge
#

And we probably need to think about renaming the mod. Now, the used to be plain and clear name "Automation" is confusing. Ideas?

reef widget
somber dagger
#

Or "Auto Automation" hehe πŸ™‚

half lichen
digital pebble
#

The game's new automation is very ONI-like. I will use it, but I will definitely still use this mod.

exotic hazel
#

keep the name "Automation"
you had it first

tiny badger
#

'Real automation'

#

One of my saves i dont plan to open until we have real automation back:)

reef spire
#

To honour the terminology established by Knatte_Anka it should be Automation Extention πŸ˜€

left patio
#

Imo, extended automation implies that it's going to make use of the new automation buildings for implementation, which I hope isn't the case.

#

I hope that it functions like it did before, with perhaps a few new inputs to fetch.

serene urchin
south wedge
#

"More Automation"? ThinkingIT

#

The original idea of this mod grew form the IFTTT concept. From the technical standpoint, it could be "IFTTT Automation", which would describe exactly what this mod does. However, I doubt many people can even spell IFTTT correctly, not to mention understand it 🀣

reef widget
#

It would also help if it wasn't an abbreviation.

south wedge
#

Another update has just been released WorkHardIT

#

I had a feeling that rushing to the fix may not be the best strategy kekw

exotic hazel
#

even if nothing else, I need the chained construction tool

#

forget the beavers getting injured in the explosives factory, I am taking psychic damage from how painful it is making underground power networks without this mod

south wedge
lime python
reef widget
#

I've decided that the detonator is proof that they looked at things this mod was commonly used to do when deciding about what to add for automation.

People are complaining that it makes no sense, but clearly it's perfectly logical.

south wedge
#

FYI. The reason why there is no v11 compatible version so far is NOT because it's hard to fix. It was done yesterday, actually. The problem was that this version update caught me with my pants down. I made massive changes to the v1.0 branch with regard to UI constructor. Hoping I'll sort it out in the following week HappyFT Now, I just can't commit a big batch of incomplete code, even though it seems working. Call it a professional deformation kek

If anyone is interested in a version that loads and hopefully works - let me know. You'll get it kekw

south wedge
#

I was chatting with AI with not much expectations (I'm an old skeptic), and suddenly! What do you think?

πŸ’‘ Idea: Goal-Driven Automation

Right now automation usually works like this:

condition β†’ action

or in vanilla automation something like:

sensor β†’ logic β†’ building

But there could be another layer on top:
Goals.
Instead of writing rules, the player defines what they want the colony to maintain.

Example

Player defines a goal:

Goal: Keep food β‰₯ 300
Priority: High

Automation then manages the system:

  • enables/disables farms
  • pauses mills or bakeries
  • reacts to resource shortages

Another example

Goal: Maintain power surplus β‰₯ 200

Automation could:

  • pause low-priority buildings
  • enable backup generators
  • balance batteries and consumers

Another one

Goal: Keep water tanks β‰₯ 70%

Automation could:

  • enable pumps
  • control floodgates
  • manage water distribution
exotic hazel
#

I'm not enthused

#

it seems like a great idea but when you think about how it would work it's just "if stock > x then pause"

#

and every player's setup is going to be at least slightly different

south wedge
#

A somehow working version, in case you like get you game crashed kekw What's there:

v3.5.0 (started on February 27th, 2026):

  • [Feature #128] New signal Workplace.AssignedWorkers to track the number of workers assigned to the workplace.
  • [Feature] New action Workplace.SetPriority to set the workplace priority.
  • [Change] Update to game v1.0.11.
  • [Change] No more automation tools in the map editor.
  • [Change] Don't format percentile values of exported signals. Show them as-is: the normalized float values.
exotic hazel
#

for instance I had three conditions on my water pump:

  • if water intake level < 0.05 then set workers to zero
  • else if water < [max stock - 100] then set workers to 3
  • else set workers to 1
south wedge
#

(the changelog doesn't cover all the features. there are many uncommitted changes 🀣 )

south wedge
exotic hazel
#

I think you should push the regular player to work things out instead of just saying "do it for me"

#

the rule construction system you have is quite good

#

although it does only seem to allow numbers for the second parameter

#

if I wanted to do stock >= capacity I had to use the script editor instead

#

honestly if anything your mod with the rule constructor is simpler than the automation engine added to the base game

south wedge
exotic hazel
#

masochism

south wedge
#

I have three cats. They learned how to say meow, but it's not helping in the mod development πŸ™

#

Anyway, I'm signing off for today (tonight). See you, folks.

exotic hazel
#

night night

#

I'm going to play for a couple of hours then go to bed for the night too

south wedge
#

Does the priority coloring (green) confuse or is it fine? It's a pure cosmetics. Maybe not a green color to highlight? The idea is to distinguish the priority setting from the text.

#

May be white?

reef spire
#

Would it be possible to give the text the five corresponding priority arrows colours?

south wedge
#

Basically, the localization file.

#
IgorZ.Automation.Scriptable.Workplace.Action.SetPriority,"worker priority: <GreenHighlight>{0}</GreenHighlight>","Name of the action that sets the workplace priority level"

Like this.

#

The color can be anything, not required to be "green".

exotic hazel
#

I kind of like the value/content of the action being green if the condition is met

#

eg in this case "remove" would be green

#

but if the ready for collection > 0 condition was met, then "assign 1" would be green

south wedge
exotic hazel
reef spire
#

Making the colour part of the variable {0} in the script?

exotic hazel
#

or leave it the way it is

south wedge
exotic hazel
#

white/grey, same as "if" and "then"

south wedge
exotic hazel
south wedge
#

Override statically. No way to apply any condition.

#

E.g. the "detonate dynamiate" template has some color schema. But it's static.

exotic hazel
#

idk, just a thought

south wedge
#

The gray color is reserved for the "information". Like "if" or "then", or anything else, which is not the rule.

#

Yellow as the way to distinguish rules from the service text.

reef spire
#

Using a lighter yellow, e.g. 30% for the "Normal"?

south wedge
#

Going to sleep now. Sorry, folks, I was trying to make a release today. It didn't happen DamFT

deft tulip
#

@south wedge Is there any way to know the max worker of a building.
I am writing a script for all building and I don't want to have a static value for every building.

Example:
condition:(lt (sig Inventory.InputGood.TreatedPlank) 1000)
action:(act Workplace.SetWorkers 1000)

Instead SetWorkers 1000 can I use anything that is dynamic and will set the maxworker of that building?

#

Got it (act Workplace.SetWorkers {% (getvalue Workplace.MaxWorkers) %}) works. πŸ‘
Should have read wiki more thoroughly. πŸ˜‚

deft tulip
#

@south wedge Importing rules crashes the game.
;;;;ScrapMetal (TreatedPlank -> ScrapMetal)
condition:(or (lt (sig District.ResourceStock.TreatedPlank) 20000) (ge (div (sig District.ResourceStock.ScrapMetal) (sig District.ResourceCapacity.ScrapMetal)) 90))
action:(act Workplace.RemoveWorkers)

condition:(and (ge (sig District.ResourceStock.TreatedPlank) 20000) (lt (div (sig District.ResourceStock.ScrapMetal) (sig District.ResourceCapacity.ScrapMetal)) 90))
action:(act Workplace.SetWorkers {% (getvalue Workplace.MaxWorkers) %})

south wedge
#

To be more specific, the district signals are broken. If you don;t use them, you should be fine.

deft tulip
# south wedge In case of you're brave enough to use the untested versions πŸ™‚

This also crashes.

;;;;ScrapMetal (TreatedPlank -> ScrapMetal)
condition:(or (lt (sig District.ResourceStock.TreatedPlank) 20000) (ge (div (sig District.ResourceStock.ScrapMetal) (sig District.ResourceCapacity.ScrapMetal)) 90))
action:(act Workplace.RemoveWorkers)

condition:(and (ge (sig District.ResourceStock.TreatedPlank) 20000) (lt (div (sig District.ResourceStock.ScrapMetal) (sig District.ResourceCapacity.ScrapMetal)) 90))
action:(act Workplace.SetWorkers {% (getvalue Workplace.MaxWorkers) %})

south wedge
deft tulip
south wedge
#

I'll try to post the release today night.

#

Or maybe even sooner.

half lichen
#

After having played with the new built-in Automation for the last several days, I am almost certainly going to want to still have the flexibility that the Automation Mod provides.

Trying to set up "only turn on when you need stuff and have adequate input" is a headache to manage, and I cannot easily have different thresholds for different buildings without building a separate sensor for each one(!)

#

(among other things)

south wedge
#

v3.5.0 (March 7th, 2026):

  • [Feature #128] New signal Workplace.AssignedWorkers to track the number of workers assigned to the workplace.
  • [Feature] New action Workplace.SetPriority to set the workplace priority.
  • [Feature] Big improvements to the rules UI consistency. Now, the numbers in the rule editor match the rule's description.
  • [Feature] Show the expected number format in the constructor: whole, decimals, percent. And verify the value.
  • [Feature] In the rules editor, give more verbose hints on the values of signals and action arguments.
  • [Feature] Fully refactor the runtime script value verification. Now, it's fast and reliable. Don't disable it (you can, via the settings)!
  • [Change] Update to game v1.0.11.
  • [Change] Update the mod icons to make them more game compliant. And consistent!
  • [Change] No more automation tools in the map editor.
  • [Change] Don't format percentile values of exported signals. Show them as-is: the normalized float values.

I made it. Those game version changes can make a twist in the regular release schedule πŸ™‚

deft tulip
south wedge
#

The very current version of the game is supposed to be supported.

#

(it's 1.0.12 as of my clock)

#

Anyway, just run it and give it a try kekw

deft tulip
#

@south wedge
Using 3.5.0 But still crashes.
Rule:
;;;;ScrapMetal (TreatedPlank -> ScrapMetal)
condition:(or (lt (sig District.ResourceStock.TreatedPlank) 20000) (ge (div (sig District.ResourceStock.ScrapMetal) (sig District.ResourceCapacity.ScrapMetal)) 90))
action:(act Workplace.RemoveWorkers)

condition:(and (ge (sig District.ResourceStock.TreatedPlank) 20000) (lt (div (sig District.ResourceStock.ScrapMetal) (sig District.ResourceCapacity.ScrapMetal)) 90))
action:(act Workplace.SetWorkers {% (getvalue Workplace.MaxWorkers) %})

south wedge
#

This is something different ThinkingIT I will check it tomorrow.

deft tulip
#

Okay. πŸ™‚

south wedge
#

Good day/night folks. I'm out πŸ™‚

deft tulip
reef spire
south wedge
#

v3.5.1 (March 7th, 2026):

  • [Fix #143] Game crashes when importing rules.

@deft tulip @reef spire

exotic hazel
#

what does this mean in the mod settings?

#

if I leave it unchecked does it evaluate the wrong value?

half lichen
#

Maybe it means "right-hand-side" of a condition? (like, eval the RHS in case there are variables, etc?) I dunno, just a guess

exotic hazel
#

yeah I assume it means RHS but I can't work out what the intended effect is

south wedge
exotic hazel
#

ah, got it, thanks

deft tulip
exotic hazel
#

Is there any way to read a vanilla automation signal, eg the value of a switch or relay?

south wedge
#

However, some automation values can be accessible via getvalue

#

E.g. the lever building has property IsOn, which makes it possible to read it via:

getvalue("Lever.IsOn")

But it won;t be a signal. I.e. you won;t get updates if the value changed.

exotic hazel
#

I can't use ⁨Signals.Set("MySwitchSignal", getvalue("Lever.IsOn"))⁩?

south wedge
#

You can. But you would need some reliable signal in the condition.

#

E.g. you can't do this: if getvalue("Lever.IsOn") == 1 then ....action...

#

But you can add any signal to condition and it will work.. at some extent.

#

E.g.

if Debug.Ticker > 0 and getvalue("Lever.IsOn") == 1
then Debug.Log("Lever is ON")

if Debug.Ticker > 0 and getvalue("Lever.IsOn") == 0
then Debug.Log("Lever is OFF")
#

It will work, but the rules will be executed every tick.

#

Lever.IsOn in some form will become a signal in the future.

#

Just found this in the new Timberborn code:

public static float RoundToPrecision(float value, float precision)
{
    return Mathf.Round(value / precision) * precision;
}

It's an explanation why automation doesn't use real numbers and has fixed precision.

#

Internally, the Automation engine works with integer numbers, so no need to round and suffer from the rounding issues.

south wedge
deft tulip
south wedge
#

Lol. I was going to give you an example of failing condition and... found out it doesn't happen DamIT Now, it's me who needs explanations. My district doesn't have scrap metal, but your rule for it isn't crashing ThinkingIT

deft tulip
south wedge
#

Anyway, here is the demonstration of how the "evaluate the right value in condition" settings work. @exotic hazel

south wedge
#

Just checked it. Apparently, the game devs had my problem πŸ™‚ And they solved it this way.

deft tulip
south wedge
#

That being said, disregard my comment about division by zero. However, if you use "evaluate right argument" setting, you better use the new form. It will be more compact and will give more data.

deft tulip
south wedge
#

Mamma mia! Even I don't have that big file for import DamFT

deft tulip
south wedge
#

Okay, the mod is not failing anymore. Time to go to expedition (33).

tiny badger
#

Thank you for getting this updated. really apprecaite the time you put in to this mod.

deft tulip
#

@south wedge This gives error
(ge (sig District.ResourceStock.Kimchi) (mul 85 (sig District.ResourceCapacity.Kimchi)))
Something is happening when calculating (mul 85 (sig District.ResourceCapacity.Kimchi))
mul 80 amd 100 works in the same condition.

ResourceCapacity = 625

south wedge
#

Ah, wait a minute. I managed to reproduce it. It triggers when the value checking is enabled.

#
IgorZ.Automation.ScriptingEngine.Core.ScriptError+ValueOutOfRange: Value must be an integer, found: 25.50
  at IgorZ.Automation.ScriptingEngine.ScriptableComponents.ValueDef+<>c__DisplayClass31_0.<RangeCheckValidatorInt>b__0 (IgorZ.Automation.ScriptingEngine.Expressions.ScriptValue value) [0x0014c] in R:\TimberbornMods\Automation\ScriptingEngine\ScriptableComponents\ValueDef.cs:118 
  at IgorZ.Automation.ScriptingEngine.Expressions.ComparisonOperator+<>c__DisplayClass14_0.<.ctor>b__0 () [0x00007] in R:\TimberbornMods\Automation\ScriptingEngine\Expressions\ComparisonOperator.cs:109 
  at IgorZ.Automation.ScriptingEngineUI.RuleRow.GetDescription (IgorZ.Automation.ScriptingEngine.Expressions.IExpression expression) [0x00027] in R:\TimberbornMods\Automation\ScriptingEngineUI\RuleRow.cs:374 

So, the signal value is integer (as per definition), but the formula gives a decimal. I think teh display number format should not be checked when validationg values. Will be fixed in the next release. In the meanwhile, either disable value checking or round the value.

south wedge
#

Ok, I removed most of the runtime checks, but kept the percentile one. To let lazy people know that when you do scripting, the values can have format that is not expected by a regular human GolemFT

#

Let me know, folks, if you have better ideas how to educate users who want to start writing scripts, but don't want to spend time reading docs. It's not a sarcasm. Really: how the UI can be improved for this purpose?

south wedge
#

Regardless to the mod, but just out of curiosity. Did you, folks, know that many modern language frameworks round value 2.5 to 2, and value 3.5 to 4? Any guesses why?

#

(one more reason for this mod to work in integers)

#

v3.5.2 (March 8th, 2026):

  • [Change] Many runtime value validations were removed. They were not helping, but only adding frustration.
  • [Change] Show the fractional part of the values when comparing against as signal that can only return a whole number. The math expressions can produce a decimal value, so its worth knowing it's actual value.
  • [Change] Many small "changes here and there" to improve the rules UI behavior.
  • [Fix] In the value checking mode, some valid expressions were marked as "bad value".
  • [Fix] Disabling a rule in the rules editor doesn't mark it as disabled (grayed out).

@deft tulip

reef widget
south wedge
#

In the end, it's all about money πŸ˜‚

#

That being said, don't complain about the mod's fixed precision math having issues kekw

south wedge
#

That being said, if you see Automation making weird math, blame the capitalists HappyFT

hybrid hatch
south wedge
timber portal
#

I haven't been playing experimental (or, in fact, at all for some time now), how do the 1.0 automation features compare to this mod in terms of functionality? I'd be shocked if they have scripting, so I figure this mod will still have a place, but I'd bet a lot of the simpler use cases can now be done in vanilla?

reef widget
timber portal
#

do you plan on making any changes to this mod given the new vanilla functionality?

south wedge
reef widget
#

Science won't matter much for Folktails, but It could be extremely valuable for Iron Teeth players.

last quiver
#

@south wedge Is there a signal to capture the number of unemployed beavers? Or even better, a list of all the available signals and actions? The "Some useful components and their properties" section on your Automation wiki made me wonder if there are things available that weren't specified in the document.
I'd also like to thank you for the work you've done on this mod. It's made the game even more fun for me to play!

south wedge
# last quiver <@429578251724128278> Is there a signal to capture the number of unemployed bea...

For the unemployed beavers there was a PR made by one of the contributors. However, it was for the 0.7 version of the game πŸ™ I keep this functionality in mind, but so far it's not supported.

As for the full list of signals and actions, the best place is Wiki: https://github.com/ihsoft/TimberbornMods/wiki/Automation-(scripting). It's not always up to date, but I try to update it with the new stuff as it get released.

reef widget
south wedge
#

I just updated Wiki to v3.5.2. Now, it's up to date.

south wedge
#

Btw, many things can be done via Debug.Ticker. This signal triggers every tick, so you can use getvalue operator to fetch whatever you want (and know about kekw ).

#

In v1.0 they made DistrictEmploymentStatisticsProvider which returns all the data out of the box. One day, I will make a signal on the district center, which will be exporting those values: EmployedWorkers + Vacancies. The reason why I didn't make it from the beginning was that the stats could only be obtained by scanning the whole district on every tick. Now, the game does it and caches the stats. Even though it's being updated in every ticks, it's not me who does it, so no blames if it's slow HappyFT

south wedge
#

It took less than one year to implement multi-argument support, lol. I created the rule editor on March 7th, 2025 kek

#

Snap! Actually, more than a year DamFT It's 03/13 today.

south wedge
#

v3.6.0 (March 13th, 2026):

  • [Feature] Allow configuring action Signals.Set via UI.

Folks, from now on I'm dropping the support of v0.7. The packages will not have that version anymore. v3.6.0 is the last one that has the legacy support.

hybrid hatch
#

Feature Request: A way to trigger automation (like fireworks) based on new highest wellbeing.

#

The "new higest" might be encodable as rules, and could also be used for "new highest" goods storage (like water, or food)

#

but the wellbeing would need to be a signal like season is

#

(or science would be?)

south wedge
hybrid hatch
#

for wellbeing, the previous max is saved, so might be avoidable,

#

for science, and goods, hmmm

#

isn't current signal value stored on save?

south wedge
south wedge
hybrid hatch
#

yea, I would have done it with a few rules:

  • if current > saved_max: trigger logic
  • if current > saved_max: set saved_max to current
#

(probably need something to reset the trigger too)

south wedge
#

Hmm, this way it may work. But you would need to set it up manually. Out of the box it will trigger firewors always.

hybrid hatch
#

yes

exotic hazel
reef spire
#

Regarding inventory automation, would it be possible to implement Inventory.StartSending() alongside Inventory.StartEmptying(), so only haulers and not the whole colony are starting delivering from this storage? Could use it on my current playthrough. For the fourth in-game state Inventory.StartReceiving() I hadn't yet the need for automation in any playthrough.

south wedge
south wedge
#

Something I wanted to convert to a script action for long time!

serene urchin
#

@south wedge you still have timberapi as req mod for automation ThinkingIT and its causing confusion

south wedge
serene urchin
#

Np πŸ™‚

south wedge
#

"Smart Automation" - out of the poll idea kekw

exotic hazel
#

or Smart Scripts

south wedge
#

Detecting script loops when you're in two worlds (the stock and mod automation) is a nightmare DamIT It's what stops the v4 release for now.

#
condition:(eq (sig Automator.State) 100)
action:(act Lever.SetState 'off')

condition:(eq (sig Automator.State) 0)
action:(act Lever.SetState 'on')

Kills the game. And catching it is not that a trivial task.

south wedge
#

So, I ended up with a full re-implementation of the error handling system. Expect to see more errors in V4, even though it sounds a bit contradictory kekw

west mountain
#

Any idea why this doesn't work as intended? It eitehr keeps raisin the gate, or it keeps lowering the gate.

#

Nevermind, I figured it out.

#

The > and < signs in the IF statement had to be swapped. 🀣

#

OR the + and - in the THEN statement had to be swapped. 🀣

#

This does create waves, but it's better than without it.

#

Would be interesting if there was an option to set the frequency at which a structure's rules get applied. Or a global one, at least. That way, we could reduce the amount of processing done, by running the queue of IF-THEN statements less frequently.

south wedge
#

In your current setup, you try to keep the level at exact value 0.8, which is barely possible. Thus, the gate height is constantly changing.

west mountain
#

I know, I did that after taking the screenshot. And the water meter is some 6-7 blocks away from where the water lands, and that also reduces the wave effect.

#

But it still ends up in some sort of constructive interference, sometimes, making the waves larger and larger, until I manually reset it.

south wedge
#

And I see you change the height relatively to the current height. That's a dangerous approach. I'd use a constant height.

south wedge
# south wedge
poll_question_text

The final call for the new name of the mod:

victor_answer_votes

13

total_votes

29

victor_answer_id

1

victor_answer_text

Advanced Automation

exotic hazel
#

you shouldn't bind yourself to polls

#

for instance that name manages to combine being over-long with being incredibly generic

#

the feature that makes your mod stand out from the base game's new automation features is the scripts, so the name of the mod should probably make reference to that

#

hell, even just "Scripting" would work as a name

#

"Script Doctor" if you want to be cute

reef spire
#

Version 4.0.0preview1
Seems to me sensors 2 and 3 got the same ID (I assume automation signal (#) should be unique). So for the rules the query for sensor3 gets the value from sensor2.

south wedge
#

"Automation signal" is the best string I managed to find for the term "This building current stock automation signal." One of the ideas was to use the name of the signal from the buildings, but didn't try it yet.

south wedge
exotic hemlock
#

Suggestion: Edit the name of this post to "Automation (Mod)" at least until you change the name of the mod? I just posted here by mistake, instead of in automation

south wedge
#

Automation (Mod)

#

So, maybe that's the name? ThinkingIT

exotic hemlock
#

I liked Advanced Automation

hybrid hatch
#

It's interesting to see the split between Advanced and Extended

south wedge
#

Advanced Automation

#

v4.0.0 (March 25th, 2026):

  • [BIG CHANGE] The mod is now named "Advanced Automation" to better reflect its purpose and avoid confusion with the stock game automation system.
  • [Feature] Add SetNoticeIcon, SetStatusIcon, and SetStatus actions to show icons and status text on the buildings.
  • [Feature] Add new tool: Construction complete Notification. Once the buildings is completed, and icon and status text will be shown on it to notify the player.
  • [Feature] Add signal Automator.State to the automation buildings. If the building can be used as source of the stock game automation signal, then it will have this scripting signal. It can be used "as-is" in the conditions of that building, or be exported via the normal Advanced Automation signals feature.
  • [Feature] Add action Lever.SetState to set the state of the lever.
  • [Change] Show a wider input box for the string argument values.
  • [Change] No more mod versions for the pre-1.0 game version. Use v3.6.0 or earlier for the older game versions.
  • [Fix] Don't show SetRecipe action in the rules editor if there are no more than one recipe in the workshop.
reef spire
south wedge
#

And they also made a new experimental version that broke more stuff kekw

exotic hemlock
#

I think the consensus is to ignore the experimental updates and only deal with them when it hits release. Also probably this will be the only thing broken: #πŸ€–mod-creators message

south wedge
#

v4.0.1 (March 25th, 2026):

  • [Fix] Game crashes when selecting non-automatable buildings (like rubble piles).

For the main branch only. Will update Mod.IO later today.

west mountain
west mountain
south wedge
#

v4.0.2 (started on March 25th, 2026):

  • [Update] Support game version 1.0.12.7.
dark vault
#

Can you please add support for setting Fill Valve and Throttling Valve? Similar to how the height can be set for floodgate.
The base game only has two values (on/off), but sometimes I need to switch between three or four values, which is quite complicated.

south wedge
#

v4.0.3 (March 26th, 2026):

  • [Fix] Water flow control actions crash the game.
deft tulip
#

@south wedge Found one issue.
(eq (sig Inventory.OutputGood.Lotus_Flower) 200)
If there is a _ in the name the paser throws error.

south wedge
#

How do you get this underscore? Some mod?

hybrid hatch
#

Lotus Flower is from Water Beavers

south wedge
#

Hmm. Ok, I need to do something then.

hybrid hatch
#

Shouldn't you be using the Id not the DisplayName?

#

oh, the Id is Lotus_Flower

south wedge
#

yup, it's the id

#

When I made the core, I assumed nobody will make IDs with spaces. I forgot about underscores DamFT

hybrid hatch
#

also Apple_WP

#

Thankfully no - in good specs, only buildings

hybrid hatch
#

btw, Moddable Timberborn (one of the dependencies for Moddable Weather) now supports loading optional dlls. So you could get rid of the separate mod for Automation+ModdableWeather

south wedge
hybrid hatch
#

yea, you have to provide Interfaces, and use them from the optional library side

reef widget
#

Did Workplace.MaxWorkers change name?
Every attempt to call it seems to fail.

south wedge
reef widget
#

Okay, it was just being really, really, really finicky.

south wedge
#

I wonder if you folks have any cool ideas about a new mod for the contest? πŸ™‚ It seems, almost everything is already done.

exotic hemlock
#

I started making mods 2 months ago, published 24 mods, have no more ideas, the modding competition is announced. As always, my timing and luck is flawless.ShrugFT

south wedge
serene urchin
reef widget
#

@south wedge I mentioned in the past that automating off Debug.Ticker had minimal effect on performance; it turns out that it's simply because the game's tick rate is incredibly slow; at 1x speed it seems to be just 2 ticks per second.

That said, it is possible to send a signal at the exact same frequency with a timer set to oscillator or a clutch connected to an inverted power meter.

south wedge
#

The stock game, processes automation every tick. But they do it per automation building. You can't make many of them. My mod's rules can run on any building, which is a big difference in the numbers.

ocean stratus
ocean stratus
#

Or even dumber only one rule "every morning check if the building is at 0%, then rotate recipe" might be sufficient

ocean stratus
#

Or a dumb order list like "two cycles of potatoes, one cycle of chestnuts"

serene urchin
#

Can you get a trigger on x time of day with AA? (Advanced automation)

south wedge
#

Stock automation has a way to trigger event on time. You can export this signal and use it in AA rule.

south wedge
#

v4.0.4 (April 28th, 2026):

  • [Fix] Rules are not copied to all objects when using duplicate build tool.
  • [Fix #130] Lumberjacks leaving left over Oak Logs when using Collectable.Ready != 0
olive dew
#

downgraded to 4.0.3 and its all good now

#

game version is v1.0.13.0

south wedge
olive dew
#

nope

#

already made 2 on previous version

#

after update I tried to make another one and this issue has occurred

south wedge
#

v4.0.5 (April 29th, 2026):

  • [Fix] Game crashes when adding a new signal export.
  • [Fix] Game may crash when loading certain saved games.
serene urchin
serene urchin
#

and have to say i do love the invert rule function

south wedge
south wedge
#

Interesting. I got some error with the same rule, but the error is different.

south wedge
#

v4.0.6 (April 30th, 2026):

  • [Fix] Game can crash on loading a state with "available for collection" rules.
south wedge
#

v4.0.7 (Math 2nd, 2026):

  • [Fix] Game can crash when a lumberjack with collectable rules is destroyed.
south wedge
#

From the last game update: "Flow Sensors are now more precise and no longer claim that zero does not equal zero."
That's why AA has fixed precision from the beginning kekw

reef widget
#

I'm honestly surprised that no programming class I have ever taken has mentioned it, given how easy it is to fall foul of the float != float problem.

hybrid hatch
#

... IsAlmostEqual

south wedge
#

In fact, it's not even humor. Unity has method Mathf.Approximately. And it does exactly this: checks if the two float values are almost equal HappyFT

south wedge
#

And if you wonder what it does under the hood. This:

return Abs(b - a) < Max(1E-06f * Max(Abs(a), Abs(b)), Epsilon * 8f);

GolemFT

surreal sparrow
# hybrid hatch ... `IsAlmostEqual`

Yeah, it's a thing. Because when you do == on a float, even if they're supposed to both be the same number, it may return false.

And if you do a == on a float vs a double or int, it'll pretty much always return false

#

so in theory, when doing a comparison between 2 floats, you want to do an Absolute (removes the negative symbol if it's a negative number) on A - B, and then do a Return result < some threashold, in many cases there used to be a < 0.01 or 0.001 in many places in code.

south wedge
#

OMG! What is it?!

worn hinge
#

Ghost beavers faction coming soon? πŸ‘€

south wedge
#

Now, when you said it. Hmm ThinkingFT

#

If you ever tried map "Pressure", you probably felt my pain kekw

#

The "ghost map" is the consequences of that painful experience DamFT

south wedge
#

Or this.

hidden frigate
south wedge
#

Those were early screenshots from my now mod: X-Ray. Inspired by playing on the Oasis map. It has so many underground stuff that it's nearly impossible to learn it with the existing game mechanics of terrain layers.

hybrid hatch
south wedge
#

Not to mention, I have much more cool settings HappyFT Kidding. Of course the original mod does all you would need.

south wedge
hybrid hatch
#

Niiice

reef widget
# south wedge Like this

That would tend to make it superior to the Transparent Terrain, which still has normal occlusion for object selection.

What about building? Can you place a block in a cavern and use that to reference off of?
Tunnels would be hard without using a reference block, but being able to place a vertial line of them would be nice.

south wedge
south wedge
#

Bad new is that this mod cannot be submitted to the contest DamFT It was my only chance.

south wedge
#

Trying to add wireframe, but apparently the game's one cannot be reused ThinkingIT

south wedge
#

Better, but still too much noise.

south wedge
#

Much better!

south wedge
#

I spent only 2 hours chatting with AI. Lol.

#

It will be a new cover of the mod.

#

Did you know you can ask quetions to the AI agents today? Ha! It helps a lot.

#

This is the reference, btw

serene urchin
#

tho just edit in paint πŸ˜‰

south wedge
#

Actually, just checked it. It was "> 60" DamIT The old save, who knows why I did it... kekw

#

Maybe (theoretically): "IF we have too much potatoes THEN start spending it"? kek

serene urchin
south wedge
serene urchin
south wedge
hybrid hatch
# serene urchin

That's the drilling shaft in the original image, it got mutated into a ladder

#

AI also added a 0.6.9.1-rc version in the bottom right (nice)

west mountain
#

Any chance we will get Signals like District.ResourceStorageFilled.Log (for example), so we can use it like the logic gates?

west mountain
#

Looks really good!

west mountain
#

Granted, not in the way you made them, but still.

west mountain
#

Also, placing a water alarm crashes my game. Google AI Mode says it's your mod's fault. 🀣

#

I'm testing now without your mod, to see if your mod is the issue.

serene urchin
#

i do not see why Advanced automation would affect Timberborn.BlockObjectPickingSystem.PickedCoordinates ThinkingIT

west mountain
#

Nope, crashes even without this mod.

west mountain
serene urchin
#

will verify my water extention that it do not crash for me

west mountain
#

I asked in #πŸš€mod-users

#

Maybe someone else knows what the issue could be.

serene urchin
#

worked for me to place water alarm

west mountain
#

To be fair, have you checked how many mods I have enabled? 🀣

west mountain
south wedge
south wedge
west mountain
west mountain
#

For example:
if District.ResourceStorageFilled.Log > 0.99
would replace
if District.ResourceStock.Log > District.ResourceCapacity.Log * 0.99
or
if District.ResourceStock.Log / District.ResourceCapacity.Log > 0.99

#

Easier to write, and easier to debug. Now imagine having 3 or 4 of those in a row, and you can probably see why such a thing would be such a good idea.

#

Plus that the signal already exists (almost certainly), since it's being used by the built-in sensor-blocks.

south wedge
south wedge
# west mountain Free, or paid?

Paid. Free is good to ask some thing occasionally, but if you plan to do any sensible work, the free quota gets exhausted very quick.

south wedge
reef widget
#

Plus, the percentage stock signals given by vanilla automation are completely broken, so copying them would not be wise.

This is one of a few cases where I think reducing the syntax would cause more problems than it would solve.
It's already been reduced massively from the previous iteration, where every single warehouse had to broadcast its stock and capacity separately so you could calculate the sum.

south wedge
south wedge
#

It's my first AI made mod kek

south wedge
#

The contour mesh was a challenge.

tiny badger
#

that looks awesome, you stop follow automation for a bit and come back to xray vision

reef widget
quasi plank
#

just as a clarifying question with the constructor. Is there like a default state you can put on a building, or do you need to have both pause and resume functions?

like, can I have a farmhouse be paused by default but only when there's more than like 3 things to be gathered it gets resumed, or do I need to add both say "if less than 2 then pause" and "if more than 5 resume"?