Timberborn

Timberborn

Automation
 This topic has been pinned, so it's probably important
ihsoft  [developer] 22 Nov, 2024 @ 11:32pm
Automation features
This is a common place to suggest and discuss features. Throw you ideas, but, please, keep in mind that I cannot implement everything. Some features may be too complex. Some can be out of the mod's philosophy. But it should not stop you.

Also, here I will post the notes on big changes to the mod.

There is a backlog of the features that were already proposed/suggested. You can find them here: https://github.com/ihsoft/TimberbornMods/issues?q=state%3Aopen%20label%3A%22automation%22. Feel free to add your ideas there too.
Last edited by ihsoft; 22 May @ 2:32pm
< >
Showing 1-15 of 29 comments
ihsoft  [developer] 22 Nov, 2024 @ 11:37pm 
And for the start. I heard from some people that they would like a kind of "scripting language". The thing is, most of the players are no programmers. Only few will benefit of the scripting abilities. The most people will unlikely be using it. However, I like the idea itself (I'm a programmer).

Let's say we have this feature, and you see the script below. What would you think it does and how intuitive it is?
Self is Floodgate level1 is Gauge("gauge1") On WeatherSystem.SeasonChangedEvent("any", "drought"): Self.Floodgate.SetMaxHeight() On WeatherSystem.SeasonChangedEvent("drought", "temperate"): if (level1.ContaminationPct < 3) then Self.Floodgate.SetHeight(0) On level1.ContaminationChangedEvent: if (WatherSystem.CurrentSeason = "drought") then break if (level1.ContaminationPct < 3) then Self.Floodgate.SetHeight(0) else Self.Floodgate.SetMaxHeight()
Last edited by ihsoft; 22 Nov, 2024 @ 11:38pm
Wolfman 23 Dec, 2024 @ 10:19pm 
I'm not sure this has been suggested yet but I'd be glad to automate bot production. Now, I have to switch manually between bot parts in the bot part factory. It would be great if the Bot Part Factory would produce exactly those parts the Bot Assembler needs.
ihsoft  [developer] 25 Dec, 2024 @ 2:36pm 
Originally posted by Wolfman:
I'm not sure this has been suggested yet but I'd be glad to automate bot production. Now, I have to switch manually between bot parts in the bot part factory. It would be great if the Bot Part Factory would produce exactly those parts the Bot Assembler needs.
This is a part of more generic problem: stopping buildings when their output inventory is close to 100%. I'm trying to address it ion the next version of Automation.
NeonDrip 26 Dec, 2024 @ 11:55pm 
a feature to pause based on how full a stockpile is would be nice for pumps and farms so they free up jobs when your close to full

for farms pausing when there's no planting or harvesting jobs would also be nice
ihsoft  [developer] 27 Dec, 2024 @ 1:38am 
Originally posted by NeonDrip:
for farms pausing when there's no planting or harvesting jobs would also be nice
The planting and harvesting conditions would require a lot of CPU to check. It's the way of how the game is made. So far, I haven't figured out a good way of doing such a check.
This is a fantastic mod. The Pause and Unpause Mass buttons alone sold me. I am excited for the things you have stated you're working on to improve this mod.

My suggestion for features is being able to disable parts of the mod using Mod Settings. I can understand some people's hesitation on how "cheaty" some parts can be (for example the population controls) and would want to not use them or see them at all.

Again, fantastic job so far and have fun with making more!
ihsoft  [developer] 8 Jan @ 11:15pm 
Originally posted by Giles_Darkwater:
My suggestion for features is being able to disable parts of the mod using Mod Settings.
If you mean some "templates" tools, then hiding them based on the settings would be a non-trivial thing. They are defined as text resources and are loaded with the game. There is no API to interact with them in runtime. I'm not saying it not possible, though.

However, if you need like to remove some tools (for whatever reason):
  • Navigate to the mod's folder and find subfolder "Specifications".
  • Delete the JSON files for the tools you don't need.
  • Reload the game.
  • Keep in mind that the mod update will undo your changes.

Btw, the same way you can create your OWN templates ;) Just edit the existing files or create a new one.
Last edited by ihsoft; 8 Jan @ 11:16pm
Originally posted by ihsoft:
And for the start. I heard from some people that they would like a kind of "scripting language". The thing is, most of the players are no programmers. Only few will benefit of the scripting abilities. The most people will unlikely be using it. However, I like the idea itself (I'm a programmer).

Let's say we have this feature, and you see the script below. What would you think it does and how intuitive it is?
Self is Floodgate level1 is Gauge("gauge1") On WeatherSystem.SeasonChangedEvent("any", "drought"): Self.Floodgate.SetMaxHeight() On WeatherSystem.SeasonChangedEvent("drought", "temperate"): if (level1.ContaminationPct < 3) then Self.Floodgate.SetHeight(0) On level1.ContaminationChangedEvent: if (WatherSystem.CurrentSeason = "drought") then break if (level1.ContaminationPct < 3) then Self.Floodgate.SetHeight(0) else Self.Floodgate.SetMaxHeight()

Sets the floodgate to the self keyword
Sets the Gauge as level1 keyword
- I assume variables, but I don't know which language we're talking here, so it's hard to tell.

When weather changes from any weather to drought max height for floodgates. Could be temperate to drought tho. It never swaps from bad tide to drought.

When weather changes from drought to temperate AND if level1 gauge is below 3% contamination set floodgate to 0.

When contamination changes then do
if the season is drought, break out of if statements.
if the contamination is less than 3% set height to 0 on floodgate otherwise max height on floodgate

I'm a coder too, so it helps. Honestly though, just make a file that has comments in it.. It should be standard, I don't know what modders never do this.. It'd make it a lot easier for people to understand the code.

I'd like to see the ability to link floodgates to gauges so we can setup rules for contamination levels too..
Last edited by Professor H. Farnsworth; 27 Apr @ 4:08am
ihsoft  [developer] 27 Apr @ 3:26pm 
Originally posted by Professor H. Farnsworth:
Originally posted by ihsoft:
And for the start. I heard from some people that they would like a kind of "scripting language". The thing is, most of the players are no programmers. Only few will benefit of the scripting abilities. The most people will unlikely be using it. However, I like the idea itself (I'm a programmer).

Let's say we have this feature, and you see the script below. What would you think it does and how intuitive it is?
Self is Floodgate level1 is Gauge("gauge1") On WeatherSystem.SeasonChangedEvent("any", "drought"): Self.Floodgate.SetMaxHeight() On WeatherSystem.SeasonChangedEvent("drought", "temperate"): if (level1.ContaminationPct < 3) then Self.Floodgate.SetHeight(0) On level1.ContaminationChangedEvent: if (WatherSystem.CurrentSeason = "drought") then break if (level1.ContaminationPct < 3) then Self.Floodgate.SetHeight(0) else Self.Floodgate.SetMaxHeight()

Sets the floodgate to the self keyword
Sets the Gauge as level1 keyword
- I assume variables, but I don't know which language we're talking here, so it's hard to tell.

When weather changes from any weather to drought max height for floodgates. Could be temperate to drought tho. It never swaps from bad tide to drought.

When weather changes from drought to temperate AND if level1 gauge is below 3% contamination set floodgate to 0.

When contamination changes then do
if the season is drought, break out of if statements.
if the contamination is less than 3% set height to 0 on floodgate otherwise max height on floodgate

I'm a coder too, so it helps. Honestly though, just make a file that has comments in it.. It should be standard, I don't know what modders never do this.. It'd make it a lot easier for people to understand the code.

I'd like to see the ability to link floodgates to gauges so we can setup rules for contamination levels too..

You deciphered it well! However, I ended up with a simpler system. Here is the concept: https://github.com/ihsoft/TimberbornMods/wiki/Automation-(scripting)
Oh that's actually really nice, I wasn't aware it had progressed this far. I'm sorry, reading my reply the file comments strikes me as a tad.. blunt, but seriously I never see people do this and it helps tremendously xD.

Are there scripting options for contamination and floodgates?
ihsoft  [developer] 28 Apr @ 11:23am 
Originally posted by Professor H. Farnsworth:
Are there scripting options for contamination and floodgates?
You mean, create rules based on conditions on another building (like gauge)? This needs the custom signal system to be implemented first. It's a work in progress. Once done, it will be possible to react on the gauge contamination or water level indications. And not only this.
ihsoft  [developer] 16 May @ 4:56pm 
Originally posted by Professor H. Farnsworth:
Oh that's actually really nice, I wasn't aware it had progressed this far. I'm sorry, reading my reply the file comments strikes me as a tad.. blunt, but seriously I never see people do this and it helps tremendously xD.

Are there scripting options for contamination and floodgates?
The custom signals feature is now live. Try playing with it and let me know if it works how you'd expect it to.
Psigh 18 May @ 5:40am 
I just noticed, is there no signal related to how much energy is left on gravity batteries? that wuold be incredibly helpful
ihsoft  [developer] 18 May @ 11:36pm 
Originally posted by Psigh:
I just noticed, is there no signal related to how much energy is left on gravity batteries? that wuold be incredibly helpful
It's an interesting idea. Could you please give some rule examples where this can be useful?
hi....
sorry, i'm french, so please excuse some lack of language.
i've explained my need on discord ...
with inactive, i mean unemployed bots and beavers
< >
Showing 1-15 of 29 comments
Per page: 1530 50