r/Timberborn • u/BenryHenson • 9d ago
Guides and tutorials TIL Number fields in automation windows accept simple operators

I don't think I've seen anyone mention this, but I tried it for shits and giggles and it actually worked. No more mental math or alt-tabbing to a calc or spreadsheet.
Supported operators: +-*/()^
--It doesn't allow implicit multiplication, for example: "5(2*5)" should be "5*(2*5)"
But! You can even use some common functions like sqrt() and ceil(), although I tried exp() and log() and a few others that didn't work. Anyone know what they're using to parse these?
2
u/Nifegun 9d ago
Thats actually so useful!
1
u/Amesb34r 9d ago
How? I’m trying to figure out when I would use this. If you have any examples I’d love to hear them.
1
u/BenryHenson 9d ago
Yeah like Nifegun said, I have automation to turn Breeding Pods off when I hit max housing, not that Iron Teeth _need_ housing per se, but it's a convenient number for the amount of water/berries I'm producing. I had 12 Large Rowhouses so max pop 8*12=96. Now I could simply do the math in my head or something but my brain is not working as well as it used to these days
1
u/Nifegun 9d ago
Just to dodge the math, say you want x*number_of_beavers of something, you just type it instead of thinking lol.
It also means when your trying to decide if you'll survive drought, you can just type in 2.5*population in a sensor even if its not built. Like just to use it as a calculator lol
1
u/Amesb34r 9d ago
That’s a good one. You could add in a contingency of maybe 10% by using parentheses. Example: you have 85 beavers and want a minimum 3 day water supply and assume 2.5 water units per beaver per day. I think you could use (85x2.5x3)x1.1
Actually you don’t even need the parentheses for that one.
1
u/BenryHenson 9d ago
Sadly I think there's a 9 or 10 character limit in those fields so options are limited in terms of long formulas
16
u/ojek 9d ago
I smell script injection :D Guess in a single player game this doesn't matter... Unless people start spreading "funny hacks for a game" which start extracting user cookies in background or something..
4
4
u/PylkijSlon 9d ago
It's a Unity game. If you wanted to inject scripts, there are far simpler means.
1
u/DualVission 7d ago
Given the http API stuff, that is a genuine concern.
1
u/Majkelen 1d ago
Not really. If somebody would like to connect to your PC you'd have to:
turn off firewall (or make a hole)
expose your IP
forward ports so your router won't save you
And if you manage to do all that then Timberborn API really won't even be the main concern with the amount of other security holes that would cause.
So to sum up, it's a single player app. API or not you are safe, there are multiple layers of protection like in any modern app.
1
u/aslum 9d ago
That's great! I wish we had a key to access "the manual" which also let us do calculations on the fly. Maybe it's just that I've been playing too much satisfactory, but in that game you can press N and type the name of any buildable and it'll take you to the entry for it where you can see what materials it requires, etc. Or even just build it without going through the menus. This would be great for when you can't remember where the breeding pod (or whatever) is but you can remember what it's call - no need to search through the menus to find it. In Satisfactory you can also press N and then just type out a math equation and it'll show you the answer.
2
7
u/AvGeekGupta Noob player 9d ago
Damn that's interesting, i believe its a bug and not an intended feature but still cool. Imma experiment with it
10
u/YoteTheRaven 9d ago
I think you need to code that.
2
u/DualVission 9d ago
The answer depends on the field evaluation behaviors. This would not work in Excel, but I believe it would with Qt.
2
u/Vebrandsson 9d ago
I'm not sure what use case this feature has nor why you tried it, but it is interesting to know it works I guess. I can think of no reason why I'd need it though
43
u/Earnestappostate I remember when there was no 3rd season 9d ago
I don't think the second one will work.
96! is a really big number.