海狸浮生记 Timberborn

海狸浮生记 Timberborn

Automation
 此主题已被置顶,因此可能具有重要性
ihsoft  [开发者] 2024 年 11 月 22 日 下午 11:32
Q&A: 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.
最后由 ihsoft 编辑于; 9 月 27 日 下午 5:14
< >
正在显示第 1 - 15 条,共 48 条留言
ihsoft  [开发者] 2024 年 11 月 22 日 下午 11:37 
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()
最后由 ihsoft 编辑于; 2024 年 11 月 22 日 下午 11:38
Wolfman 2024 年 12 月 23 日 下午 10:19 
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  [开发者] 2024 年 12 月 25 日 下午 2:36 
引用自 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 2024 年 12 月 26 日 下午 11:55 
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  [开发者] 2024 年 12 月 27 日 上午 1:38 
引用自 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  [开发者] 1 月 8 日 下午 11:15 
引用自 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.
最后由 ihsoft 编辑于; 1 月 8 日 下午 11:16
引用自 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..
最后由 Professor H. Farnsworth 编辑于; 4 月 27 日 上午 4:08
ihsoft  [开发者] 4 月 27 日 下午 3:26 
引用自 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  [开发者] 4 月 28 日 上午 11:23 
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  [开发者] 5 月 16 日 下午 4:56 
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 5 月 18 日 上午 5:40 
I just noticed, is there no signal related to how much energy is left on gravity batteries? that wuold be incredibly helpful
ihsoft  [开发者] 5 月 18 日 下午 11:36 
引用自 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?
Gwlegion (FR) 5 月 19 日 上午 8:46 
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
< >
正在显示第 1 - 15 条,共 48 条留言
每页显示数: 1530 50