Back to Home / #openttd / 2022 / 01 / Prev Day | Next Day
#openttd IRC Logs for 2022-01-16

---Logopened Sun Jan 16 00:00:31 2022
00:07<wiscii>on the list as 'tct'
00:07<wiscii>login, save, look
00:07<Gustavo6046>okay!
00:07<wiscii>i am curious for others thoughts
00:07<wiscii>for know this is utter crap
00:08<wiscii>or it could be interesting..
00:15<wiscii>Gustavo6046: &?
00:18<Gustavo6046>wiscii, back, got a coffee
00:18<Gustavo6046>tct?
00:19<wiscii>and popcorn! ;-)
00:19<Gustavo6046>found it
00:19<Gustavo6046>ah!
00:19<Gustavo6046>no, in Brazil it's guarana soda and popcorn :D
00:20<Gustavo6046>apparently it wants a password
00:20<wiscii>my name here <-
00:22<Gustavo6046>ah okay
00:22<Gustavo6046>anyway as for the popcorn and guarana soda thing, https://www.youtube.com/watch?v=Sk48VxcjIyw
00:22<Gustavo6046>oo
00:22<Gustavo6046>it looks neat
00:23<Gustavo6046>hah, that windmill must have given you a headache
00:23<wiscii>lol ;-)
00:23<wiscii>i probably put it there
00:23<Gustavo6046>lol Ripley Farton
00:24<Gustavo6046>Lung.. Face..
00:24<Gustavo6046>Balls?!
00:24<wiscii>i got fed up of the names
00:24<Gustavo6046>That's creative :p
00:25<wiscii>so i came up with easy ones ;P
00:25<Gustavo6046>Avonbourne is a boring name, set something more fun
00:25<wiscii>i have all 4k years, if you like to try it again
00:26<Gustavo6046>hm?
00:26<wiscii>yeah avonbourne was a later bloomer :)
00:26<wiscii>you can have the save
00:26<Gustavo6046>ah
00:26<Gustavo6046>no, thanks!
00:26<Gustavo6046>it's a bit too intricate for me
00:26<Gustavo6046>I love it and the junctions you put in it
00:26<wiscii>i'm more curious about how others might tackle it
00:27<wiscii>the layout is quite simple, not too many towns etc
00:27<Gustavo6046>is it just me used to fast-forwarding with maglevs or your trains have more realistic acceleration than default?
00:27<wiscii>the powerhouse factory
00:27<wiscii>and the huge oil influx
00:28<Gustavo6046>the mitochondria
00:28<wiscii>nope, my trains are all default
00:28<wiscii>i only increased station length, i think
00:29<Gustavo6046>ah hahaha
00:29<Gustavo6046>so
00:29<Gustavo6046>go to the station named "Kidney Woods", and click the factory right next to it
00:29<wiscii>i just played it to the end to see how the engine worked :)
00:29<Gustavo6046>gawk in awe at the factory's name!
00:29<Gustavo6046>shady stuff xD
00:29<wiscii>fuel supply ;-)
00:31<Gustavo6046>nono
00:31<wiscii>Gustavo6046: question, how would you now, go about supplying that factory, when everything else is in harmony ?
00:31<Gustavo6046>the factory just northwest of Kidney
00:31<Gustavo6046>hmm?
00:31<Gustavo6046>it'd be easier if there was an option to fund a new industry
00:31<Gustavo6046>which I assume there is not
00:31<wiscii>i seee the one .. but what would you send ?
00:32<wiscii>i guess you could fund an industry .. but then you have to factor it into the rest
00:32<Gustavo6046>send?
00:32<Gustavo6046>like where I'd get stuff to supply the factory?
00:32<Gustavo6046>not sure
00:32<wiscii>i'm curious .. is that the sort of thing that often gets made ?
00:33<Gustavo6046>what?
00:34<Gustavo6046>am confus
00:34<Gustavo6046>what sort of thing?
00:34<wiscii>is that a typical end game type thing ?
00:34<Gustavo6046>not sure
00:34<Gustavo6046>you mean running out of industries?
00:35<wiscii>lol .. i think i just ignored industry outside my game ..
00:35<wiscii>the factory you point to being an example
00:37<Gustavo6046>oh lol
00:37<Gustavo6046>I guess that's normal
00:37<Gustavo6046>since I don't think it's really that worth it to supply more than one factory to get your goods
00:37<Gustavo6046>I mean, it has its benefits
00:37<Gustavo6046>a) it could help balance the load on your trainsit network, especially with Cargodist
00:37<wiscii>i can look at it but i only get my own opinion .. i am simply curious about others opinions
00:38<Gustavo6046>b) more interesting!
00:38<wiscii>yeah ..
00:39<wiscii>it's very flat
00:39<wiscii>good test though
00:40<Gustavo6046>I agree, your cities could use more butt o.o
00:42<Gustavo6046>wiscii, I'm almost tempted to make a company and try to have a foothold in this conquered and monopolized world. Maybe with road passenger service. But I don't know if you'd be okay with that, so.
00:43<wiscii>Gustavo6046: hehe :) i'm not leaving the server up for long
00:43<Gustavo6046>ah :p
00:43<Gustavo6046>that's perfectly fine by me
00:44<wiscii>i could share day one, 1950, but i don't think it's even that interesting now
00:44<wiscii>it is too flat!
00:44<Gustavo6046>It's fiine
00:45<wiscii>strange "game" ;-)
00:46<wiscii>that game was due to lock-down, it's not completely my fault! ;-)
00:47<Gustavo6046>ah :p
00:47<Gustavo6046>ah wow, there's nowhere to put a road depot even
00:47<Gustavo6046>wait, I found a place!
00:48<Gustavo6046>ah hahahahahahahaha Heart Transfer
00:49<Gustavo6046>best station name ever
00:51<wiscii>heart exchange ;-)
00:51<Gustavo6046>:p
00:51<Gustavo6046>hang on I'll rename the station to Heart Transplant
00:51<wiscii>rofl :D
00:51<Gustavo6046>ahh, much better!
00:51<Gustavo6046>:D
00:52<wiscii>your bus broke down already!
00:53<Gustavo6046>o.o
00:53<wiscii>in the year forty-four forty-four the buses still fkn broke down a lot
00:53<Gustavo6046>lol
00:53<Gustavo6046>where are my flying cars?!
00:53<wiscii>;)
00:53<Gustavo6046>it's sad that there are no helicopters
00:54<wiscii>hoverboards!
00:54<Gustavo6046>hey, why don't you try enabling cargodist?
00:54<Gustavo6046>i wanna put an airport here
00:54<wiscii>i shall give it a shot!
00:54<Gustavo6046>right!
00:54<Gustavo6046>it's in environment -> cargo distribution
00:54<wiscii>oh no !! plane crashes!
00:54<wiscii>sure
00:54<Gustavo6046>you just have to set all the cargo distribution mode... dropdown options from manual to asymmetric
00:54<Gustavo6046>I think it only appears if you flick the settings menu to advanced
00:55<Gustavo6046>rather than basic
00:55<wiscii>i think i found it
00:55<Gustavo6046>:o
00:55<Gustavo6046>yeah, distribution mode ones
00:56<Gustavo6046>might as well check the "manual primary industry construction method" option under environment -> industries
00:57<Gustavo6046>"Kidney Airport"
01:00<wiscii>lol
01:00<wiscii>i already did and all the planes crashed!
01:00<Gustavo6046>wat
01:00<Gustavo6046>oh lol
01:00<Gustavo6046>yeah, they do over time
01:01<Gustavo6046>so, what Cargodist does is, whenever cargo is generated, it'll already know where it wants to go, and the next stop to reach there
01:01<Gustavo6046>this is based on what stations and vehicle routes you have set up
01:01<Gustavo6046>it's neat because it handles transfers automatically
01:01<wiscii>ok
01:01<Gustavo6046>I'm worried I'm just short of being able to buy a plane, though :p
01:02<wiscii>i'll have to experiment with that one, i think i understand
01:02<Gustavo6046>yeah
01:02<Gustavo6046>it's fun
01:02<Gustavo6046>I don't know how but it helped rekindle my interest in openttd
01:03<Gustavo6046>you deserve some attention UwU
01:03<Gustavo6046>oops
01:04<Gustavo6046>I'm referring to the station ratings
01:04<Gustavo6046>I'm astounded at how high they are despite the irregularity of my road vehicles
01:04<Gustavo6046>wiscii, did you set Cargodist on the server?
01:04<Gustavo6046>oh wait
01:04<Gustavo6046>maybe it's clientside
01:04<wiscii>no
01:04<Gustavo6046>oh it's not clientside
01:05<Gustavo6046>That's alright
01:05<Gustavo6046>I was asking because most of my airports are gonna be pretty far from the centre of their respective cities
01:05<Gustavo6046>near the outskirts
01:05<Gustavo6046>so I set up road vehicles between them and the city centres
01:06<Gustavo6046>I could just set up a transfer order, but that would just be to shove the passengers in the airports, not offloading them back at their destinations
01:06<Gustavo6046>with Cargodist, some passengers would go through the airport and be unloaded at the other airport right away, but most would probably want to be taken to the city centre
01:07<Gustavo6046>fortunately my existing road services are actually decently profitable
01:08<Gustavo6046>so I shouldn't be too far away from being able to buy a plane :D
01:08<Gustavo6046>it'll just take a while though, as I spent quite a bit of the money on setting up the road vehicles and airports and whatnot
01:09<wiscii>symmetric or asymmetric ?
01:10<Gustavo6046>asymmetric
01:10<wiscii>ok
01:10<Gustavo6046>heh I never noticed how bad inflation really is in 4333 :p
01:11<wiscii>i have absolutely no idea what i've done :)
01:12<Gustavo6046>hm?
01:12<wiscii>kidney failure ;-)
01:12<Gustavo6046>lol yeah
01:13<Gustavo6046>well
01:13<Gustavo6046>it doesn't really change a whole lot for existing transport networks
01:14<wiscii>those two airport . garunteed air disasters
01:14<Gustavo6046>but click, say, Fuel Supply, then "X crates from this station"
01:15<Gustavo6046>you see that there are destinations for the cargo?
01:15<wiscii>i have to go Gustavo6046 but cheers for taking a look :)
01:15<Gustavo6046>aw
01:15<Gustavo6046>that's fine
01:15<Gustavo6046>see you, sleep well! :)
01:15<Gustavo6046>thank you for the fun!
01:15<Gustavo6046>I should play multiplayer openttd more often
01:15<wiscii>i'll be back, this is just bad timing :)
01:15<Gustavo6046>okay!
01:15<Gustavo6046>_dp_, who do I pester to add cargodist to openttdcoop?
01:16<wiscii>thanks :)
01:19<Gustavo6046>:D
02:28-!-Compu [~Compu@0001feeb.user.oftc.net] has joined #openttd
02:28-!-Compu is "Compu" on #help #openttd #/r/openttd
02:29-!-Compu [~Compu@0001feeb.user.oftc.net] has quit []
03:23-!-Wolf01 [~wolf01@0001288e.user.oftc.net] has joined #openttd
03:23-!-Wolf01 is "Wolf01" on #openttd
03:25-!-jottyfan [~Thunderbi@dynamic-089-014-026-131.89.14.pool.telefonica.de] has joined #openttd
03:25-!-jottyfan is "jottyfan" on #openttd
03:54-!-andythenorth [~andytheno@cpc87165-aztw31-2-0-cust40.18-1.cable.virginm.net] has joined #openttd
03:54-!-andythenorth is "andythenorth" on #openttd
03:58<TrueBrain>lol @ #9789 ... NewGRF specs leaking through .. changes in 1/255th :P
03:58<TrueBrain>silly :)
03:59<TrueBrain>just use percentages, like all sane settings should :)
03:59<_dp_>Gustavo6046, huh? coop is kinda dead :p
04:00-!-nielsm [~nielsm@188-181-82-243-cable.dk.customer.tdc.net] has joined #openttd
04:00-!-nielsm is "Niels Martin Hansen" on #openttd
04:01<@DorpsGek>[OpenTTD/OpenTTD] TrueBrain commented on pull request #9789: Feature: Technology progresses independently of game time https://github.com/OpenTTD/OpenTTD/pull/9789#pullrequestreview-853647671
04:04<Gustavo6046>ah okay
04:58<@DorpsGek>[OpenTTD/OpenTTD] nielsmh commented on pull request #9789: Feature: Technology progresses independently of game time https://github.com/OpenTTD/OpenTTD/pull/9789#pullrequestreview-853654130
04:59<_dp_>btw, #9789 could use a preview
05:01<@DorpsGek>[OpenTTD/OpenTTD] ldpl commented on pull request #9789: Feature: Technology progresses independently of game time https://github.com/OpenTTD/OpenTTD/pull/9789#pullrequestreview-853654396
05:02-!-sla_ro|master [~sla.ro@93.118.46.75] has joined #openttd
05:02-!-sla_ro|master is "slamaster" on @#sla #openttd
05:02<@DorpsGek>[OpenTTD/OpenTTD] nielsmh commented on pull request #9789: Feature: Technology progresses independently of game time https://github.com/OpenTTD/OpenTTD/pull/9789#issuecomment-1013845299
05:03<_dp_>nielsm, it already disables randomization on frozen
05:08<@DorpsGek>[OpenTTD/OpenTTD] TrueBrain commented on pull request #9789: Feature: Technology progresses independently of game time https://github.com/OpenTTD/OpenTTD/pull/9789#pullrequestreview-853655188
05:11<TrueBrain>and .... GitHub CoPilot just wrote a function I really didn't know how to write
05:11<TrueBrain>but it is spot-on
05:12<TrueBrain>still scary shit
05:12<Gustavo6046>it is
05:12<Gustavo6046>so I spent an unhealthy amount of time in the game with a bunch of newgrfs
05:12<Gustavo6046>first time trying out ECS and I must say, I actually quite like it
05:12<Gustavo6046>It's more expansive than FIRS
05:13<Gustavo6046>And there are more interesting mechanics in the industries
05:13<Gustavo6046>Here's the save uh
05:13<TrueBrain>https://gist.github.com/TrueBrain/1fafce9fb04d56b5caaa3c57f1ffc183 <- this is what I mean with scary shit
05:13<Gustavo6046>https://files.catbox.moe/lwb867.sav
05:14<Gustavo6046>filename is mangled by catbox, so please rename to 'Bloggs & Co., 1987-12-19.sav' if you care to give it a meaningful, honourable name :p
05:14<andythenorth>TrueBrain AI future :P
05:14<Gustavo6046>TrueBrain, I know, I have a few friends who have been toying with it for a while and it can be pretty fun
05:14<andythenorth>all the sci-fi gets it wrong with skynet type sentient AI
05:14<Gustavo6046>Splitting whitespace is a bit of a menial operation, though, so maybe not the best prompt.
05:15<andythenorth>the AI writes the code, that's the future
05:15<Gustavo6046>How about an octree, or a raymarcher?
05:15<Gustavo6046>Or a raymarcher with an octree?
05:15<TrueBrain>I like that the more comments I give, the better it helps me out
05:15<TrueBrain>it kinda forces you to write good comments :)
05:15<TrueBrain>just to be more lazy :P
05:15<nielsm>TrueBrain: not like that isn't almost standard library level tbh
05:15<andythenorth>humans really shouldn't be writing code, we're not equipped for it :P
05:15<Gustavo6046>By not the best prompt I mean copilot is best at figuring out menial tasks like that.
05:15<TrueBrain>nielsm: sure; but it found the context .. and that is surprising about this :)
05:16<TrueBrain>I was like .. in Rust .. how do I iterate a string ...
05:16<TrueBrain>CoPilot was: hold my beer
05:16<_dp_>yeah, sounded more impressive before I saw the function...
05:16<_dp_>why do you even need to write split yourself?
05:16<TrueBrain>mind you that I picked the parameter name "string" really poorly
05:16<TrueBrain>it was like: sure, no worries, I gotcha
05:16<TrueBrain>and just used that in the function
05:19<@DorpsGek>[OpenTTD/OpenTTD] nielsmh commented on pull request #9789: Feature: Technology progresses independently of game time https://github.com/OpenTTD/OpenTTD/pull/9789#pullrequestreview-853656195
05:20<_dp_>hacking in 2030: training co-pilot to inject malicious code
05:20<Gustavo6046>I've tried Rust before. It's a really good language. It does take more pre-planning than most, if you're gonna structure your project e.g. with traits and structs, compared to languages like Nim or even C, or of course Python or JavaScript.
05:20<Gustavo6046>I'm bad at planning. Which is massively exacerbated by the fact I have ADHD :(
05:20<Gustavo6046>I don't plan stuff out and I always forget what I was gonna do
05:20<Gustavo6046>Heck, it's 7 AM and I should be in bed
05:20<Gustavo6046>See what I mean? :p
05:20<Gustavo6046>But yeah I think I'll head to bed now
05:21<Gustavo6046>Nini! o/
05:21<@DorpsGek>[OpenTTD/OpenTTD] nielsmh commented on pull request #9789: Feature: Technology progresses independently of game time https://github.com/OpenTTD/OpenTTD/pull/9789#pullrequestreview-853656372
05:23-!-Gustavo6046 [~Gustavo60@2804:14d:4cd8:96b6:f57:b290:e69a:6832] has quit []
05:37<@DorpsGek>[OpenTTD/OpenTTD] ldpl commented on pull request #9789: Feature: Technology progresses independently of game time https://github.com/OpenTTD/OpenTTD/pull/9789#issuecomment-1013850751
05:46<andythenorth>can parent scope in grf have a parent scope?
05:47<andythenorth>in theory?
05:48<TrueBrain>I guess if you would make another variable for it?
05:48<TrueBrain>hmm .. so I was splitting up my Rust application .. and now I have issues with memory management :P Rust is funny .. he is not wrong, but it is annoying :P
05:50<@DorpsGek>[OpenTTD/OpenTTD] nielsmh commented on pull request #9789: Feature: Technology progresses independently of game time https://github.com/OpenTTD/OpenTTD/pull/9789#issuecomment-1013852571
05:51<@Rubidium>andythenorth: an industry tile's parent parent would be the town, right? Or doesn't that work?
05:51-!-jottyfan [~Thunderbi@dynamic-089-014-026-131.89.14.pool.telefonica.de] has quit [Quit: jottyfan]
05:52<andythenorth>dunno :)
05:52<andythenorth>way out of my depth
05:53<andythenorth>we have 81 / 85 / 89
05:53<andythenorth>and 82 / 86 / 8A
05:53-!-frosch123 [~frosch@00013ce7.user.oftc.net] has joined #openttd
05:53-!-frosch123 is "frosch" on #openttd
05:53<TrueBrain>well, seems that summoned frosch123 :P
05:53<TrueBrain>I need to remember that chain of commands
05:58<frosch123>andythenorth: https://wiki.openttd.org/en/Development/Design%20Drafts/NewGRF/Secondary%20Related%20Objects
05:59<andythenorth>frosch123 "Towns Nearest city" is aspirational, not fact?
05:59<frosch123>"New stuff is shown bold."
06:00<frosch123>it's just what was considered useful in 2011
06:00<frosch123>maybe when tb is done with truegrf we can get new newgrf features
06:01*andythenorth trying to work out if towns can gain a 'regional capital'
06:01<andythenorth>without boiling the ocean
06:03<frosch123>TrueBrain: oh look, there is space the va2 to add a 64bit variant :p
06:04<TrueBrain>you are allowed only if you also change the 15bit to 64bit :P
06:04<frosch123>that's difficult, does 63bit also work?
06:04<TrueBrain>no
06:04<frosch123>:)
06:06<TrueBrain>:D
06:06<frosch123>ah well, i guess RPN will become the native format of ottd, and ottd will contain a nfo->rpn transpiler
06:06<TrueBrain>guess OpenTTD is going to need an RPN parser :P
06:06<TrueBrain>:D :D :D
06:06<frosch123>haha, too predictable
06:08<TrueBrain>[9:1] Unexpected token 'func:test' found
06:08<TrueBrain>line and position indication! \o/
06:09<@DorpsGek>[OpenTTD/OpenTTD] michicc commented on pull request #9789: Feature: Technology progresses independently of game time https://github.com/OpenTTD/OpenTTD/pull/9789#issuecomment-1013855464
06:24<toktik>wow ive been listening to the TTD music for 3 days straight
06:33*andythenorth explores NoGo spec more
06:34*andythenorth questions :P
06:35<andythenorth>can we see a way to make a cargo non-transportable?
06:35<andythenorth>can we have a second set of shadow cargos?
06:35<andythenorth>i.e. 64, but they're not available to vehicles or stations, only industries
06:36*andythenorth exploring using cargos for grf to control GS
06:40<andythenorth>i.e. GS could use https://docs.openttd.org/gs-api/classGSIndustry.html#aa6d289ec4afaa7abc6c4bae378f05dac
06:41<andythenorth>and industry could produce cargos like 'electricity', 'town satisfaction', 'pollution' etc
06:41<andythenorth>which are non-transportable
06:41<_dp_>andythenorth, just don't produce that cargo? :p
06:41<andythenorth>well
06:41<andythenorth>then I need to implement FIRS production mechanics in GS
06:41<andythenorth>via GSCargoMonitor?
06:43<andythenorth>not sure which is easier
06:43<andythenorth>I'm probably not good enough to write my own python -> squirrel transpiler for production rules
06:44<andythenorth>meh currently the rules are actually in the nml anyway
06:44<andythenorth>worse
06:47-!-sla_ro|master [~sla.ro@93.118.46.75] has quit []
06:48<_dp_>why do you need the same production mechanics for those "fake" cargoes?
06:48<_dp_>just make real cargo production in grf and fake in gs
06:49<_dp_>like any citybuilder script :p
06:50<andythenorth>??
06:51*andythenorth doesn't know how citybuilders worked
06:51<andythenorth>tried one once, confusing
06:51<_dp_>I mean you can calculate electricity, town satisfaction and whatever in gs entirely
06:51<_dp_>only problem will be if you want to control industries back from gs
06:51<andythenorth>industries are controlled via the town
06:52<andythenorth>GS is for town growth and win conditions
06:52<_dp_>gs is for global scope, newgrfs for local
06:52<andythenorth>eh what?
06:53<andythenorth>how silly
06:53<andythenorth>GS is for local scope also
06:53-!-gelignite [~gelignite@55d4ed71.access.ecotel.net] has joined #openttd
06:53-!-gelignite is "gelignite" on #llvm #openttd
06:53<andythenorth>industries can't control town growth
06:53<andythenorth>that's GS
06:54<andythenorth>also GS can't tell if an industry is satisfied unless it produces something
06:54<_dp_>silly it may be, but that's more or less how it currently is
06:54<andythenorth>so either fake cargos, or a copy implementation of FIRS in GS
06:54<andythenorth>FIRS rules aren't that hard, and GS can monitor delivered cargo somewhat
06:55<andythenorth>far as I can tell, I can copy a bunch of industry properties and registers into a GS structure
06:55<andythenorth>basically GS can replicate grf industry mostly
06:56<andythenorth>let's see what's missing
06:56<andythenorth>ok GS needs some extra industry props/vars
06:57<andythenorth>simplest would be reading industry registers, but I can't imagine that getting approved
06:57<andythenorth>'because it might go wrong'
06:58<frosch123>afaik someone added a gs->industry communication channel last year
06:58<frosch123>they did not bother documenting it, so i do not know any details
06:58<andythenorth>not sure the 'it might go wrong' objection is valid now
06:58<andythenorth>https://docs.openttd.org/gs-api/classGSNewGRF.html
06:58<andythenorth>if the GS can check for specific version of specific grf, reading industry registers would be safe
06:59<frosch123>https://wiki.openttd.org/en/Development/NewGRF/Specification%20Status#openttd-1-11 <- variable 47
06:59<frosch123>maybe you can figure out what it is
06:59<andythenorth>yeah I didn't understand that one
06:59<andythenorth>there's no docs
07:00<andythenorth>I guess I read the PR
07:00<andythenorth>ok it's a protect from closure / increase / decrease flag
07:01<andythenorth>so a 'stable industry' GS could be made
07:01<_dp_>basically in jusst exposes ctrflags to newgrf https://github.com/OpenTTD/OpenTTD/blob/master/src/industry.h#L47
07:01<_dp_>not sure how useful that is
07:02<andythenorth>what's the grf implementation of it?
07:02*andythenorth confused
07:02<andythenorth>oh this is grf implementation?
07:03<andythenorth>can we document it?
07:06<andythenorth>it adds var 47 so grf can read whether GS is controlling the industry?
07:06<_dp_>yep
07:07<andythenorth>what are the return values?
07:07<_dp_>it's just industry ctlflags directly
07:07<andythenorth>so it's some bit set?
07:08<_dp_>yeah, I linked it above
07:08<+michi_cc>Bitset, bit 0 no decrease, bit 1 no increase, bit 2 no closure
07:09<andythenorth>"Industry is under GS control (47)"?
07:09<andythenorth>as title
07:09<andythenorth>it's not really GS control though
07:09<_dp_>by gs standards that's already plenty of control xD
07:09<andythenorth>"Production changes allowed / disallowed by GS"
07:10<+michi_cc>"GS control status" maybe?
07:10<andythenorth>ok
07:10<+michi_cc>But probably GameScript as I'm note sue GS is unviversally understood among people.
07:11<andythenorth>GameScript, Gamescript, Game Script or NoGo?
07:11<andythenorth>https://wiki.openttd.org/en/Manual/Game%20script
07:11<andythenorth>not clear which is canonical
07:13<andythenorth>GameScript in changelog
07:13<+michi_cc>NoGo is just as unclear, and for GameScript or Game Script, who knows, pick whatever :p
07:13<frosch123>we discussed that during the bananas1.5 implementation
07:13<frosch123>apparently the result was "Game-Script" :)
07:15<_dp_>Game.?Script xD
07:17<TrueBrain>frosch123: https://github.com/marianoguerra/hiapl would that be better you think? :D
07:17<andythenorth>https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Industries#GameScript_control_status_.2847.29
07:17<frosch123>TrueBrain: i skipped that link on HN today :p
07:18<andythenorth>TrueBrain that would work great with my templating library, which is designed for html :P
07:18<andythenorth>is var 47 in nml?
07:18*andythenorth doesn't see it
07:18<TrueBrain>frosch123: you missed out :P
07:19<_dp_>andythenorth, by the looks of it no: https://github.com/OpenTTD/nml/blob/master/nml/actions/action2var_variables.py#L531
07:19<frosch123>i did read the python-communism thing though
07:19<andythenorth>meh I had better add it to nml then
07:20<andythenorth>can someone else write the nml docs?
07:20<andythenorth>I hate the nml docs format, the nfo docs are much better
07:21<andythenorth>this is actually 3 vars in nml?
07:21<andythenorth>gs_disallows_production_increase, etc?
07:23<_dp_>logic behind nml vars isn't something I tried to comprehend yet xD
07:23<andythenorth>it's just a big mapping
07:23<andythenorth>shrug
07:23<frosch123>yes, if it is separate flags, they are separate variables
07:25<frosch123>not sure whether "forbid" is more common than "disallows"
07:25<_dp_>does nml try to optimize the calls if multiple flags are used?
07:25<frosch123>no :)
07:25<@DorpsGek>[OpenTTD/nml] andythenorth opened pull request #249: Change: add industry vars for industry var 0x47 (GameScript control s… https://github.com/OpenTTD/nml/pull/249
07:25<_dp_>yeah...
07:27<andythenorth>commit msg is a bit crappy
07:28<@DorpsGek>[OpenTTD/nml] andythenorth updated pull request #249: Change: add industry vars for industry var 0x47 (GameScript control s… https://github.com/OpenTTD/nml/pull/249
07:29<_dp_>also gg alignment
07:29<andythenorth>shorter var names better?
07:30<andythenorth>'gs' would shorten it here
07:30<_dp_>yeah, was about to suggest gs as well
07:30<andythenorth>I can't see these vars actually being used by anyone
07:30<andythenorth>so it's probably moot
07:31<@DorpsGek>[OpenTTD/nml] andythenorth updated pull request #249: Change: add industry vars for industry var 0x47 (GameScript control s… https://github.com/OpenTTD/nml/pull/249
07:38<andythenorth>updated https://wiki.openttd.org/en/Development/NewGRF/Specification%20Status
07:42<andythenorth>how are registers read anyway :P
07:42*andythenorth looks
07:43<andythenorth>seems to be this->psa
07:44<andythenorth>oh lol stations have a PersistentStorage?
07:44<andythenorth>things I didn't know
07:45<andythenorth>maybe I can translate this for GS
07:45<andythenorth>case 0x7C: return (this->industry->psa != nullptr) ? this->industry->psa->GetValue(parameter) : 0;
07:49<andythenorth>hmm
07:49<andythenorth>GS params seem to use some kind of named types
07:50<andythenorth>like GetLastMonthProduction uses CargoID
07:50<andythenorth>would accessing a numbered parameter in persistent storage need a named type?
07:53<_dp_>type for register number or for register value?
07:53<_dp_>probbaly no for both though
07:53<frosch123>andythenorth: the station psa is for airports
07:53<frosch123>not for rail/road/ship stations
07:53<andythenorth>does it do anything?
07:53<andythenorth>looks legacy
07:54<frosch123>opengfx+airports is the only airport newgrf, isn't it?
07:54<frosch123>it's from the time people wanted newgrf-state-based airports
07:54<_dp_>also wasn't there like a whole kerfuffle for isolating gs from newgrfs?
07:54<frosch123>i think today player-built-tile-based airports are more popular
07:55<@DorpsGek>[OpenTTD/OpenTTD] 2TallTyler commented on pull request #9789: Feature: Technology progresses independently of game time https://github.com/OpenTTD/OpenTTD/pull/9789#pullrequestreview-853671854
07:55<andythenorth>ok so can I just pass a persistent register number to read it?
07:56<andythenorth>I don't have to create some PersistentStorageID type?
07:57<andythenorth>everything else in GS seems to have types
07:57<andythenorth>oh I found some that just use int32
07:57<andythenorth>also int64
07:59<andythenorth>also uint32
08:10<TrueBrain>my first Rust iterator ... <3
08:13<frosch123>does rust distinguish iterators and generators?
08:13<TrueBrain>An iterator is a struct with a next() function
08:13<TrueBrain>so I guess: no, it doesn't :P
08:16-!-jottyfan [~Thunderbi@dynamic-089-014-026-131.89.14.pool.telefonica.de] has joined #openttd
08:16-!-jottyfan is "jottyfan" on #openttd
08:20<@DorpsGek>[OpenTTD/OpenTTD] 2TallTyler commented on pull request #9789: Feature: Technology progresses independently of game time https://github.com/OpenTTD/OpenTTD/pull/9789#pullrequestreview-853674545
08:24<andythenorth>hmm
08:24<andythenorth>industries might be from more than 1 grf
08:24<andythenorth>GS should test grfid
08:29<@DorpsGek>[OpenTTD/OpenTTD] ldpl commented on pull request #9789: Feature: Technology progresses independently of game time https://github.com/OpenTTD/OpenTTD/pull/9789#pullrequestreview-853675563
08:52<TrueBrain>yippie, after a whole day of refactoring, my code still works :P
08:52<TrueBrain>gained functionality: 0
08:55<TrueBrain>I did create the absolute best economy anyone ever will
08:56<TrueBrain>the coal mine increases every month by 16 tonnes of coal
08:56<TrueBrain>the longer you play
08:56<TrueBrain>the more impossible it gets
08:56<TrueBrain>the only way to really play it, honestly
08:56<andythenorth>\o/
08:57<_dp_>hmm, openttd ini doesn't make a valid toml :(
08:57<_dp_>still tempted to convert citymania config to toml :p
09:06<andythenorth>oof was it lunch?
09:09<@DorpsGek>[OpenTTD/OpenTTD] 2TallTyler commented on pull request #9789: Feature: Technology progresses independently of game time https://github.com/OpenTTD/OpenTTD/pull/9789#issuecomment-1013882935
09:12<TrueBrain>haha, a while ago you silly :)
09:22<andythenorth>meh
09:22<andythenorth>every idea I have for industry - town economy fails :D
09:23<andythenorth>always fails on 'GS cannot signal to grf'
09:23<TrueBrain>you say it well .. from an outside perspective it is like you keep hitting that gas peddle, hit a wall, notice it hurts
09:23<TrueBrain>get out of the car, get in another car
09:23<TrueBrain>and repeat
09:23<TrueBrain>:)
09:23<TrueBrain>sorry ...
09:24<andythenorth>I get 90% to a workaround every time
09:28<TrueBrain>w00p, constant works
09:28<TrueBrain>including doing math on it, which TrueGRF calculates (and not the NewGRF)
09:29<TrueBrain>next up: lists and dicts .. but that is not for today :)
09:29<andythenorth>ok I think there are 3 bits of signalling information since GS -> grf industry since 1.11.0
09:30<andythenorth>that might be enough
09:30<andythenorth>CmdIndustryCtrl can set 3 flags
09:30<andythenorth>and newgrf can read them as industry var 47
09:31<TrueBrain>pretty sure you concluded that already ... how many months ago? :D
09:31<andythenorth>I don't know, I have to discover things at least 3 times
09:32<andythenorth>so this can do 'town is satisfied', and 'region has electricity supply'
09:32*andythenorth wonders if GS can find neighbouring towns
09:32<andythenorth>well there's the xy
09:33<andythenorth>so maybe just put them into some partitioned lists somehow
09:34<andythenorth>or just divide the map into quadrants
09:36<@DorpsGek>[OpenTTD/OpenTTD] ldpl opened issue #9790: [Bug]: Map download time is limited by max_join_time instead of max_download_time setting. https://github.com/OpenTTD/OpenTTD/issues/9790
09:36<andythenorth>ok so in GS, divide map into quadrants
09:37<andythenorth>find the towns in each quadrant (simple xy partitioning)
09:37<andythenorth>find power plants in each quadrant
09:37<andythenorth>each quadrant gets a storybook page
09:37-!-supermop_Home [~user@pool-162-83-189-16.nycmny.fios.verizon.net] has joined #openttd
09:37-!-supermop_Home is "Guest" on #openttd
09:37<supermop_Home>yo
09:38<andythenorth>tertiary cargos are delivered on either a quadrant basis or town basis
09:38<andythenorth>optional goals are:
09:38<andythenorth>- please every town in at least one quadrant
09:38<andythenorth>- win all the quadrants, or x% of quadrants
09:39<andythenorth>- in MP assign a quadrant to win per company (might be crappy RNG of resources, but eh)
09:39<andythenorth>each town has a spurious 'signalling' industry (I already created this in FIRS as a plaza)
09:40<andythenorth>GS communicates with that industry via the 3 signalling bits
09:40<andythenorth>that industry uses town register to communicate with other nearby industries
09:40<andythenorth>ok this version works 100% IFF I've understood the spec
09:40<supermop_Home>yay
09:41<frosch123>supermop_Home: https://github.com/OpenTTD/OpenTTD/blob/master/src/tile_type.h#L20 <- you were looking for that. it is maximum building height relative to north corner without foundations. so for building you have to subtract 8 or 16 for normal/steep foundations
09:43<_dp_>lol @ signalling industry
09:43<_dp_>nice first usecase for var 0x47 xD
09:44<andythenorth>oh there is another signalling channel
09:44<supermop_Home>frosch123 thanks!
09:44<andythenorth>but it uses up industry IDs
09:44<andythenorth>and has a latency
09:44<andythenorth>GS can build an industry in a town, then that industry can write to town registers, then self-close the next month
09:44<supermop_Home>128 seems to work well for the cartoon-y scale of this building,
09:44<andythenorth>by consuming multiple industry IDs, I can write different values
09:45<supermop_Home>and it leaves a little room for another building to be taller in the future
09:45<andythenorth>128 industry IDs is quite a lot
09:45<supermop_Home>https://imgur.com/a/JOmWX9g
09:45<andythenorth>so I could have 16 different signalling bits
09:45-!-sla_ro|master [~sla.ro@93.118.46.75] has joined #openttd
09:45-!-sla_ro|master is "slamaster" on @#sla #openttd
09:46<andythenorth>or a byte
09:46<supermop_Home>https://cdn.hawaii.house/images_properties/1750-kalakaua-ave-3202-honolulu_201910219_12.jpg?id=201904081323
09:46<andythenorth>it might be quite messy in towns, adding then deleting industries
09:46<andythenorth>also spammy news message
09:47<andythenorth>GS can't set industry production level?
09:47<supermop_Home>should I draw big streak reflections across the whole façade, or little reflections on each pane of glass like most other buildings have in game^
09:47<supermop_Home>well I already drew both, so rather, which looks better
09:48<_dp_>andythenorth, you're starting to think like me :p
09:48<_dp_>pile ugly hacks until it works
09:48<andythenorth>I assumed mine were uglier
09:48<_dp_>my easter egg object keeping the map from desyncing would object :P
09:51<supermop_Home>in real life, mirrored buildings look mostly like the color of the sky to a viewer, who is typically on the ground - unless you view them from above when they look like the color of the structures and trees around them
09:52<supermop_Home>in the game they should look just blotchey grey and green, but we still expect them to look sky colored
09:52<andythenorth>ok so the grf only has read on the industry control flags
09:52*andythenorth wonders if it should have write :P
09:52<andythenorth>always good when 2 actors can both write to same prop.
09:52<andythenorth>never goes wrong
09:53<_dp_>it should've a proper communication channel :p
09:53<supermop_Home>frosch123 do you have a preference in window pixel style ^
09:53<andythenorth>yes but that proper comms channel has been debated for 10 years
09:53<andythenorth>and concludes in muddle
09:53<andythenorth>meanwhile I have 3 bits
09:54<andythenorth>and a CargoMonitor
09:54<_dp_>part of what makes server patching infinitely better than gs is that it has all the info
09:54<supermop_Home>andythenorth local town office industry
09:55<frosch123>supermop_Home: sorry, i hate skyscrapers :)
09:55<andythenorth>it's really a shame that GS can't set industry prod_level value directly
09:55<supermop_Home>it need to asses taxes or whatever anyway, so it's auditors are going around inspecting the local industries anyway
09:55<andythenorth>supermop_Home I tried 'town office' but converted it to 'plaza' :P
09:55<frosch123>it will be hard to do the reflexions in ottd though
09:55<andythenorth>oh
09:56<andythenorth>I could indicate the region by sprites
09:56<andythenorth>region 1 = red flag
09:56<andythenorth>region 2 = blue flowers
09:56<andythenorth>etc
09:56<andythenorth>the GS regions will be an xy partition that the grf can just implement the same maths for
09:57<supermop_Home>frosch123 I am generally bored by them and find this one in particular very blasé in design, but it is very quintessential for 1) this time period in 2) Honolulu specifically, and 3) replacing the expected skyscrapers in the tropic base set houses
09:57<supermop_Home>so I need to have at least one 70s-80s skyscraper in here to have a good faith replacement of the tropic houses
09:58<supermop_Home>andythenorth which window style do you prefer?
09:59<andythenorth>I would do standard purple, but with some windows deliberately striped differently
10:00<supermop_Home>https://imgur.com/a/JOmWX9g
10:03<supermop_Home>still need to put streaks on the dark side
10:05<supermop_Home>its a shame, the most architecturally interesting part of this building is the decorative relief frieze on the slab edges of the parking garage plinth, something impossible to show even at 4x zoom
10:18<andythenorth>hmm let's see how var 47 really works
10:22<andythenorth>I see nothing here that prevents grf manipulating prod_level independent of the GS flags? https://github.com/nielsmh/OpenTTD/blob/eace2c9a4fa21d3115d1b469b84092f463d0fa0d/src/industry_cmd.cpp
10:22<andythenorth>it's case 0xF I believe
10:25<_dp_>andythenorth, yeah, it's mostly a conceptual issue
10:25<_dp_>will be a mess if both gs and grf start to control it
10:25-!-glx [~glx@000128ec.user.oftc.net] has joined #openttd
10:25-!-glx is "Loïc GUILLOUX" on #openttd.noai #openttd.notice #openttd
10:25-!-mode/#openttd [+v glx] by ChanServ
10:26<_dp_>ah, nvm, I misread that
10:27<_dp_>though I guess the answer doesn't change xD
10:28<andythenorth>means I can abuse var 47 without side effects
10:29<andythenorth>FIRS already sets prod_level, needs to be orthogonal to GS comms
10:30<_dp_>wow, wait a sec
10:30<_dp_>I just realized other 29 bits of var 47 are a free real estate xD
10:31<andythenorth>ctrl flags innit
10:31<andythenorth>what if they could be user defined :P
10:32<_dp_>yeah, and in my case they can be user defined on mapgen
10:32<andythenorth>the presumption that the GS doesn't know what the grf is, that's now officially dead and buried
10:33<frosch123>_dp_: you can also use current_month to transmit different data every month
10:33<frosch123>that way you can stream data over time
10:33<_dp_>hm...
10:33<frosch123>synchronous data transfer :p
10:33<_dp_>what I want is to get data into cb36
10:34<_dp_>sorry, cb39
10:34<_dp_>and sadly industries don't help either here :(
10:34<andythenorth>nah
10:34<andythenorth>you could do it in airports via the airport persistent storage :P
10:35<_dp_>I just need to join airport to every station, ez xD
10:36<_dp_>though it doesn't seem like cb39 even gets a station
10:36<_dp_>the most useless callback ever
10:38<andythenorth>tyler found a use I think
10:38<andythenorth>but I never found anything useful there
10:39<_dp_>isn't tyler juts making it constant?
10:39<_dp_>kinda boring use :p
10:39<_dp_>also I think TheDude used it as well for some stuff
10:41<andythenorth>it has practically no vars except global
10:42<andythenorth>so mostly junk
10:42<_dp_>yeah, it's totally underwhelming to what I'd expect out of "Custom profit calculation"
10:42<andythenorth>so can we have 16 of the other 29 free bits as 'user defined'?
10:43<andythenorth>it's not a hard patch, yes/no?
10:43<_dp_>there is an anecdote that doesn't translate well, but basically it's like making the word ETERNITY out of letters A R S E
10:44<_dp_>andythenorth, would be better to just make another var or two for user defined in that case
10:45<andythenorth>well then that triggers the debate again :P
10:45<wiscii>is there a way to use a bold font ?
10:45*andythenorth politics -> implementation
10:45<supermop_Home>is a class 40 just a long 37?
10:48<andythenorth>not exactly
10:49<andythenorth>heavier, less HP/ton
10:49<andythenorth>longer, worser
11:08-!-Strom [strom@strom.user.oftc.net] has quit []
11:10-!-Strom [strom@strom.user.oftc.net] has joined #openttd
11:10-!-Strom is "Strom" on #tor-project #tor #alpine-linux #virt #debian-next #pipewire #openttd #kernelnewbies
11:12<andythenorth>ok well GS -> industry signalling works
11:13<andythenorth>so 3 bools, or values 0-7
11:16<frosch123>1 start/stop bit, 2 data bits
11:16<andythenorth>I was wondering about alternating every 256 ticks
11:17<andythenorth>for example, 8 vars per month with 8 possible values
11:17<andythenorth>might be unreliable
11:18<andythenorth>streaming is an interesting alternative though :P
11:19<+glx>GS can only execute one command per tick
11:20<andythenorth>hmm, how many ticks in the month?
11:21<andythenorth>74 * 31 or something?
11:21<andythenorth>so realistically, on a 4k x 4k, setting monthly industry values from GS isn't going to work
11:34<andythenorth>@calc 74 *31
11:34<@DorpsGek>andythenorth: 2294
11:34*andythenorth generates a 4k^2 map
11:34<andythenorth>20480 industries
11:34<andythenorth>oof
11:34*andythenorth now confused again
11:35<andythenorth>if GS is for global control, but can only do 10% of the industries on the map, lol?
11:35<andythenorth>a gameplay loop that can't run once a month :D
11:35<andythenorth>seems funny
11:36<andythenorth>I really thought this would work
11:36<andythenorth>I have test code running with expected results, for a small map
11:37<frosch123>you only have to care for the industries served by players
11:39<+michi_cc>This made me remember a question I had: What would be a good way to export a function that takes an array/vector to squirrel? Most scripts I see internally use squirrel arrays/lists, but on the OTTD api side there is almost only ScriptList class.
11:39<andythenorth>do we apply cynical realism to players of 4k^4k maps frosch123 ? :P
11:40<andythenorth>you know there's that one reddit player who is diligently connecting all 20k industries manually
11:40<andythenorth>also JGRPP players conventionally play 16k^2
11:40<andythenorth>but that's maybe not worth worrying about
11:40<frosch123>does jgrpp raise the 5k trains per company limit?
11:41<andythenorth>dunno, don't have a recent compile :)
11:41<frosch123>michi_cc: GSText is a class that that can be filled with multiple parameters, and is then passed to a command
11:42<frosch123>but yes, all api lists are just lists of integers
11:42<frosch123>no lists of structs
11:42<+michi_cc>I was mostly thinking about arrays of WhateverID (so ints).
11:42<frosch123>save/load gets a dict though
11:43<frosch123>GSList then
11:43<_dp_>oh, lol, I just discovered an uber exploit: https://i.imgur.com/QNKljrH.png
11:43<frosch123>unless you can duck-type squirrel lists or something
11:44<+michi_cc>No idea, I haven't looked at the internals of squirrel lists yet.
11:44<frosch123>_dp_: is that an industry accepting its own cargo?
11:45<frosch123>like the TTD bank bug
11:45<+michi_cc>But as long as creating GS/AIList is painless from a script writer perspective, I'd guess it is the easiest way.
11:45<_dp_>frosch123, no, that's just a coal that makes 97k on 5 tiles ;)
11:46<_dp_>no transfer
11:46<frosch123>by station walking?
11:46<_dp_>yep
11:46<_dp_>and you can station walk the whole map in one jump if you delete station
11:46<frosch123>i think that exploit is even described in the ottd wiki
11:46<_dp_>well, and patch client I guess
11:47<frosch123>station walk the whole map? it should be limited to 64 tiles
11:47<_dp_>if station is deleted it can be joined from anywhere
11:48<_dp_>client doesn't suggest it but server allows
11:48<_dp_>also that's not quite the problem
11:48<_dp_>problem is cargo packets keep source tile
11:48-!-Wormnest [~Wormnest@35.136.189.95] has joined #openttd
11:48-!-Wormnest is "Wormnest" on #openttd
11:48<frosch123>michi_cc: https://github.com/OpenTTD/OpenTTD/blob/master/regression/regression/main.nut#L28 <- apparently creating AIList is just fine
11:49<+michi_cc>Yeah, that looks totally fine.
11:49<+michi_cc>Now I just have to check if the squirrel export generator can already deal with it :)
11:49<frosch123>_dp_: so you have to relocate the station for every delivery trip?
11:50<_dp_>not every, you can stockpile 4k on one side, relocate and quickly deliver all
11:50<_dp_>it's not a viable strategy in a long run, but as a start it's quite broken
11:51<frosch123>at, relocating the station keeps the cargo
11:54<_dp_>it's also kinda hard to fix that exploit
11:54<_dp_>limiting join distance would make it more bothersome for humans bot not really fix it
11:55<_dp_>also long jumps are somewhat convenient for valid reasons
11:57<frosch123>there was a similar thing in the past
11:57<frosch123>the station sign used to not move
11:57<andythenorth>what if I disable FIRS on big maps?
11:57<frosch123>so you could diconnect the station from the sign, and have them on opposite ends of the map
11:57<_dp_>fun
11:57<frosch123>it was fixed by moving the station sign when it leaves the station rect
11:58<_dp_>it's still not ideal solution btw
11:58<frosch123>hmm, so profit uses the industry location as source and the station location as dest?
11:58<frosch123>that's funnily asymmetric
11:58<_dp_>no, I think it was station location for source as well, but it's stored when cargo is added to the station
11:59<andythenorth>ok so what if I disable FIRS on maps that are bigger than 1024 x 1024?
11:59<frosch123>andythenorth: i have a suggestion for the error message "Xtreme maps require XIS"
11:59<andythenorth>yes
11:59<andythenorth>also I don't know how I'm going to disable FIRS if the GS is missing
12:00<andythenorth>I don't think we added the equivalent 'list GS' for grf
12:00<frosch123>not possible, chicken-egg :)
12:03-!-Flygon [~Flygon@2001:44b8:411e:4e00:dd2e:ebe:4322:6554] has quit [Quit: A toaster's basically a soldering iron designed to toast bread]
12:04<_dp_>I guess one way to fix it would be to track how far cargo was actually moved by a vehicle
12:04<andythenorth>someone has to move first I guess
12:04<_dp_>as a manhattan distance between load and unload points
12:05<_dp_>would also fix all the spreading issues and probably even transfer credits
12:05<andythenorth>oh I can just close all industries in first month if GS is not present
12:06<_dp_>and increasing distance by moving back and forth isn't better than just moving to destination because of loading/unloading time
12:09<andythenorth>lol a 1024x1024 map generates too fast
12:10<andythenorth>can't count how many industries
12:10<andythenorth>I'm guessing about 1000
12:10<frosch123>the minimap gives you the amount per type
12:10<andythenorth>yeah that involves counting :)
12:10<frosch123>the amount on mapgen is only the amount of tries, no meaning about actual result
12:10<andythenorth>I could just print out the length of GSindustryList
12:10<andythenorth>oh
12:10<andythenorth>I can ignore map gen
12:10<andythenorth>the GS can just build all the industries
12:11<andythenorth>at game start
12:11<andythenorth>then the limit can be enforced
12:11<andythenorth>or grf could enforce it
12:11<andythenorth>GS can't prevent towns being generated at map gen?
12:11<andythenorth>I need 1 signalling industry per town
12:13<_dp_>gs can't prevent pretty much anything
12:13<_dp_>only react to it
12:15<_dp_>though if it sets town count to 1 I'm not sure will that be before mapgen or after
12:17<andythenorth>so there's an event for town founded
12:17<andythenorth>but not allow / disallow
12:18<andythenorth>maybe it can just count the towns at map start, then pause game if there are too many
12:18<_dp_>you need callbacks to allow/disallow, gs can't into callbacks
12:19<andythenorth>oh yeah that
12:19<andythenorth>events bubble etc
12:19<andythenorth>bubbles don't go downhill
12:19<_dp_>events bubble game goes xD
12:19<andythenorth>ok so just count towns and pause the game if > n
12:19<andythenorth>does GS main loop still run if game is paused?
12:20<frosch123>gs starts after mapgen is done
12:20<frosch123>so no influence on mapgen
12:20<andythenorth>ok
12:20<frosch123>but you can bulldoze industries iirc
12:20<andythenorth>can I pause gameplay while GS completes a housekeeping task?
12:20<andythenorth>e.g. pause every month to update all industries?
12:21<frosch123>yes and no
12:21<andythenorth>the best answer :D
12:21<frosch123>gs runs while paused
12:21<frosch123>but the commands it triggers are affected by the what-command-are-allowed-while-pause setting
12:21<frosch123>so if you build stuff while paused, players can as well
12:21<andythenorth>but walking over industries and setting flags might be fine?
12:22<_dp_>iirc gs does get some initial opcodes for housekeeping though
12:22<andythenorth>I need to do this once a month
12:22<frosch123>DEF_CMD_TRAIT(CMD_INDUSTRY_CTRL, CmdIndustryCtrl, CMD_DEITY | CMD_STR_CTRL, CMDT_OTHER_MANAGEMENT) <- looks like it is always allowed
12:22<andythenorth>thanks :)
12:23<nielsm>it might be worth only updating industries that actually need updating, if you can somehow detect that
12:23<nielsm>or keep track of
12:24<andythenorth>as an optimisation that's probably viable
12:25<andythenorth>in principle it needs to be able to do all on the map :P
12:32<andythenorth>ok so I set probability of all industry to 0 for map gen
12:32<andythenorth>then have the GS build them in first few loops
13:17<andythenorth>ok so I need a cargo monitor
13:17<andythenorth>Silicon Valley probably has that
13:19*andythenorth wonders how to organise GS source
13:26*andythenorth wonders about squirrel namespaces
13:27<andythenorth>declaring functions unscoped in an imported file
13:33<andythenorth>this won't work as expected? https://github.com/andythenorth/firs/blob/gs-is-real/src/gs/firs.pynut#L54
13:33<andythenorth>return is after the break
13:33<andythenorth>do I even need the break
13:33<andythenorth>?
13:34<+glx>break skips the return
13:34<andythenorth>do I need an explicit break after the return?
13:35<andythenorth>I can't understand squirrel docs :P
13:35<andythenorth>unclear if the iterator ends or continues on return
13:35<+glx>if there's a return, anything after it is useless
13:36<andythenorth>thanks
13:39<andythenorth>now I have 2 kinds of regions in FIRS :)
13:39<andythenorth>industry distribution to different areas of map
13:39<andythenorth>and adjacent towns
13:39<andythenorth>lol
13:40<andythenorth>what else is like a region? biome?
13:48<@DorpsGek>[OpenTTD/OpenTTD] DorpsGek pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/523901887827768d6bff347ddb57787b295cc9e1
13:48<@DorpsGek> - Update: Translations from eints (by translators)
13:49<TrueBrain>fuck you git.io :P
13:49<+glx>at least we can see the expected version number
13:53<andythenorth>so frosch123 TrueBrain as you are electricity grid experts now ....
13:53<TrueBrain>no
13:53<andythenorth>in-game power grid, regional (like USA) or whole map (like Europe)?
13:53<TrueBrain>owh, sorry, you didn't ask yet :D
13:54<TrueBrain>Make it an option: "sane power grid" / "weirdo power grid"
13:54<andythenorth>frigging options :P
13:55<andythenorth>the worst
13:55<andythenorth>ok
13:55<andythenorth>I'm doing some kind of town region thing
13:55<andythenorth>it will have weird results like towns on opposite side of mountain / sea being in same region
13:55<andythenorth>because I know nothing about terrain
13:55<andythenorth>but eh
13:57<frosch123>it's a train game, so you should offer 10 different frequencies and voltages
13:57<frosch123>3-phase and 2-phase systems
13:57<frosch123>https://github.com/wonderworks-software/PyFlow <- also, is that the next language to implement firs?
13:58<TrueBrain>lol
13:58<frosch123>i never saw a code-by-flowdiagram language that had a "forEachLoop" block
13:58<frosch123>usually those are put around stuff, here they are chained
14:00<TrueBrain>I wonder if it compiled to WASM :P
14:00<andythenorth>that looks nice :P
14:02<andythenorth>frosch123 maybe player has to build substation industries?
14:02<andythenorth>and there are different technologies?
14:04<_dp_>btw, I decompiled fist into my grf-py for shits and giggles
14:04<_dp_>looks terribly effecient stuff like https://pastebin.com/W5w5eMMJ :p
14:04<_dp_>*firs
14:04<frosch123>andythenorth: is there a town action "publish fake news to defame AC"?
14:05<frosch123>_dp_: who knows, maybe optimisation is easier in RPN
14:06<_dp_>considering it seems even more complex than nml I wouldn't hold my hopes high :p
14:09<andythenorth>frosch123 via the storybook or GS
14:11<TrueBrain>is it safe to assume registers are zero'd on start? Code suggests they are .. specs suggests they aren't :D
14:12<andythenorth>I always assume they are
14:12<andythenorth>nothing broke yet :P
14:14<frosch123>TrueBrain: the zeroing was added when newgrf started to exploit that they weren't
14:14<TrueBrain>haha, lol
14:14<TrueBrain>I am not surprised :P
14:15<andythenorth>so what's involved in maintaining grid frequency, on average?
14:15*andythenorth wonders if GS can replicate it
14:15<frosch123>a lot of rotating mass
14:16<TrueBrain>blackouts!
14:16<frosch123>a network is essentially a flywheel
14:16<frosch123>every substation has some kind of mechanical flywheel to add mass to the network
14:16<andythenorth>ok so it's like a motor-generator thing?
14:16<andythenorth>I read about them last year some time
14:17<frosch123>differenced in infeed and consumers is compensated by the flywheels, which slow down or speed up
14:17<frosch123>the frequency is measuered at the powerplants to adjust production
14:17<andythenorth>ok so this is different to load-shedding?
14:17<frosch123>but the flywheels need to have neough weight to sustain while the powerplants react
14:18*andythenorth wondering whether to measure electricity consumption and generation
14:18<frosch123>there are two types of load-shedding
14:18<andythenorth>consumption is % population
14:18<andythenorth>and active industry
14:18<frosch123>automatic shedding happens when the frequency drops too much, and to avoid the whole net from going down
14:18<frosch123>planned shedding is when you know in advance you won't have enough power plants
14:19*andythenorth considers shedding the aluminium smelter first
14:19<TrueBrain>black outs black outs black outs
14:19<frosch123>since the advent of solar power, there is also the opposite of load schedding
14:20<frosch123>previously you had consumers which you could turn off, now you have consuemrs which you can turn on, when there is too much
14:20<TrueBrain>really? Lol
14:20-!-WormnestAndroid [~WormnestA@35.136.189.95] has quit [Ping timeout: 480 seconds]
14:20-!-WormnestAndroid [~WormnestA@172.56.27.202] has joined #openttd
14:20-!-WormnestAndroid is "WormnestAndroid" on #openttd
14:20<TrueBrain>first summer I was in this house they found another way .. just shut down the whole neighbourhood :P
14:21<TrueBrain>our solars are not allowed to generate power if the main is down, which is annoying :P You have all these solar panels doing their work, but because the main is gone, your house is dark too :P
14:22<frosch123>you lack the rotating mass :)
14:22<TrueBrain>sadly my house can't be rewired for that :P
14:22<TrueBrain>shocker
14:23<frosch123>also you are lucky, you are not in a village with pitchfork fights between solar owners and milk-cow owners
14:23<andythenorth>ok so how does this get represented in FIRS :P
14:23<TrueBrain>sparkles!
14:23<andythenorth>thanks TrueBrain
14:24<frosch123>there was this unlucky village which had an old substation that supplied the village with electrictiy
14:24<andythenorth>hmm
14:24<Xaroth>Balloons.
14:24<frosch123>then solar infeed increased in the village when every second house installed a lot of solar power
14:24<andythenorth>if I had say....3 types of industry per town for GS signalling
14:24<frosch123>so on sunny days the infeed would more than double the consumption of the village
14:24<andythenorth>how much data do I get?
14:24<andythenorth>3 bits per industry
14:24<frosch123>resulting in the substation shutting down due to overload
14:24<frosch123>resulting in depowerment of the milk freezers
14:25<frosch123>repeat that every day for a month
14:25<TrueBrain>till the milkfreezers is what happened here when these houses were finished .. worst part, it was a brand new substation :P For days we have high-voltage powercables running over the road to supply us with power :D
14:26<TrueBrain>(all houses connected to that substation had twice the amount of solars any normal human would suggest installing on a house .. :P)
14:26<TrueBrain>these houses are meant to be energy neutral .. and they delivered :D
14:27<TrueBrain>I myself have 22 solars, where realisticly I need only 14 to be neutral :P
14:28<TrueBrain>luckily it means I get a decent amount of money back at the end of the year for supply power .. so not complaining
14:28<frosch123>well, now solars have to limit their peak production
14:28<frosch123>it does not change much on year-average, but makes the peaks way easier to handle
14:29<TrueBrain>smart
14:29<TrueBrain>new world, new problems
14:29<andythenorth>so 3 sets of 3 bits
14:29<andythenorth>are there better or worse ways to use them?
14:44<TrueBrain>I have a cargodict as type
14:45<TrueBrain>I keep typing cargodist :P
14:45<andythenorth>oof
14:49<TrueBrain>meh; I need that stupid CTT to do cargodicts correctly ...
14:49<TrueBrain>but they are so useful :P
14:50<TrueBrain>hmm .. that reminds me .... changing cargo order also makes savegames incompatible :P
14:50<TrueBrain>(read: any change to the CTT causes it)
14:51<frosch123>don't confuse CTT with cargo-definitions
14:51<frosch123>changing CTT is fine, cargo-definitions is not
14:52<TrueBrain>no, you are not hearing me :)
14:52<TrueBrain>in my RPN, changing the CTT is not fine :)
14:52<TrueBrain>remember the talk we had about keeping perm-registers as much the same as possible? :)
14:52<TrueBrain>I allow creating "cargodicts", which are variables where you can use cargo as key
14:52<TrueBrain>this key is ctt:COAL etc
14:52<TrueBrain>which is a lot more readable etc
14:52<TrueBrain>but I need to translate this string to a number
14:53<TrueBrain>I bounce this via the CTT, as .. well, that is the most sane thing to do
14:53<TrueBrain>but .. that means if the CTT changes, so does the usage of registers
14:53<frosch123>you store cargodicts in persistent storage? :p
14:53<TrueBrain>FIRS does, yes
14:54<supermop_Home>https://imgur.com/1uqEXcC
14:54<supermop_Home>note the statue
14:55<TrueBrain>okay, this needs another look "soon"
14:55<frosch123>why does the statue have pink hands?
14:56<frosch123>is it some hawaiian personality?
14:57<supermop_Home>https://media.istockphoto.com/photos/duke-kahanamoku-statue-on-waikiki-beach-hawaii-picture-id855550386
15:00<supermop_Home>really it should have palms, but it also gets used in temperate and arctic
15:01<frosch123>https://en.wikipedia.org/wiki/Duke_Kahanamoku#/media/File:Duke_Kahanamoku_1920.jpg
15:03<TrueBrain>right, at least list and dict support should work now ... lets give it a spin :)
15:03<supermop_Home>this guy is basically single handedly responsible for getting Australians to surf
15:11<TrueBrain>[20:18, around '[]'] Key '3' not found in list 'locallist'
15:13<TrueBrain>there we go, it works \o/ :D Kinda surprised .. it "just worked" :P
15:13<TrueBrain>right, const / local / industry-storage ... integer / list / dict ... done!
15:13<TrueBrain>now only for cargodict ..
15:14<andythenorth>super :)
15:14<andythenorth>then GS - grf integration after that :P
15:14<andythenorth>using my new 'spec'
15:19<TrueBrain>hahaha, no
15:20<TrueBrain>right ... basic cargodict also works for now
15:20<TrueBrain>that only leaves dynamic lists ... as in, that NewGRF needs to resolve the index
15:20<TrueBrain>which is .. an interesting issue to resolve :D
15:21-!-jottyfan [~Thunderbi@dynamic-089-014-026-131.89.14.pool.telefonica.de] has quit [Quit: jottyfan]
15:22<TrueBrain>I guess I need to store the index in a register for that
15:23<TrueBrain>hmm .. can it be done without a switch at all?
15:24<TrueBrain>ah, fuck it, not that important now anyway .. lets just limit the language
15:24-!-andythenorth [~andytheno@cpc87165-aztw31-2-0-cust40.18-1.cable.virginm.net] has quit [Quit: andythenorth]
15:24<frosch123>are you looking for var 7B?
15:24-!-andythenorth [~andytheno@cpc87165-aztw31-2-0-cust40.18-1.cable.virginm.net] has joined #openttd
15:24-!-andythenorth is "andythenorth" on #openttd
15:25<andythenorth>"12:30:24 <andythenorth> I can't see these vars actually being used by anyone"
15:25<andythenorth>4 hours later....I have a working use case
15:25<TrueBrain>frosch123: I just failed to parse that description completely
15:25<andythenorth>never predict the future
15:25<TrueBrain>something something "difficult"
15:25-!-WormnestAndroid [~WormnestA@172.56.27.202] has quit [Ping timeout: 480 seconds]
15:26-!-WormnestAndroid [~WormnestA@35.136.189.95] has joined #openttd
15:26-!-WormnestAndroid is "WormnestAndroid" on #openttd
15:26<+glx>7B is indirect index to anything that needs an index
15:26<frosch123>"7B 7C" is "persistent[accumulator]"
15:26<frosch123>"7B 7D" is "temporary[accumulator]"
15:27<frosch123>or in rpn "temporary .... []" -> "... 7B 7D"
15:27<TrueBrain>yeah .... bit of gibberish to me, sadly :P
15:28<TrueBrain>that description on the spec-page is one of the most difficult to read from any of the spec :D
15:28<TrueBrain>specially as any form of example are missing
15:28<frosch123>it's take value from RPN stack, and use that to index persistent/temporary storage
15:28<+michi_cc>Does 7B 7E work? That would make for interesting code :)
15:28<frosch123>fair, it was mostly added for nml
15:28<TrueBrain>"it allows to evaluate any other 60+x variable using a non-constant parameter from a register." <- here "registers" all of a sudden come into play ...
15:28<TrueBrain>michi_cc: explicitly disallowed according to specs :)
15:28<frosch123>michi_cc: 7B and 7E are explicitly excluded :)
15:29<+michi_cc>So no dynamic dispatch VM inside a grf then? :p
15:30<TrueBrain>frosch123: basically, I cannot figure out where "accumulator" is located
15:30<frosch123>it's your current expression value
15:30<TrueBrain>is it a register? The last value?
15:30<TrueBrain>okay
15:30<TrueBrain>then I do not know what the "from a register" means in that description :D
15:30<frosch123>fair, the "register" part may be misleading :)
15:30<frosch123>it was mostly implemented for nml
15:30<TrueBrain>okay, in that case, I think I understand :D
15:31<frosch123>not assuming that anyone would use it in nfo
15:31<TrueBrain>so it is basically the only varactions with 2 parameters, so to say?
15:31<TrueBrain>(wher 7C, 7D, etc have 1 parameter)
15:32<frosch123>well, the regular 60+x parameter is a constant value
15:32<TrueBrain>yeah, but I am trying to decypher how the bytecode looks
15:32<TrueBrain>60+x add another byte after the opcode
15:32<TrueBrain>and 7B adds yet another, right?
15:32<frosch123>but it's definitely not the "only" one
15:32<TrueBrain>(one can also read that it is the following opcode)
15:33<TrueBrain>there are more with multiple parameters? Meh ... couldn't find any :D
15:33<frosch123>7B only makes sense with \rst
15:33<TrueBrain>Rust doesn't allow me to be this dynamic :P
15:33<frosch123>i.e. loading the value
15:33<+michi_cc>No, because the 60+x param is now the accumulator value and not the next constant byte.
15:33<TrueBrain>you are going to laugh how many \rst I insert :D
15:33<TrueBrain>michi_cc: hmm, good point!
15:33<TrueBrain>so it is still 2 bytes
15:33<_dp_>lol, I spent like an hour looking into firs nfo figuring out what kind of nonsense my decompiler generates
15:33<frosch123>TrueBrain: https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Vehicles#Query_variable_of_n-th_vehicle_in_chain_.2861.29
15:34<_dp_>I return to catch up to the chat and see that exact 7B kind of nonsense xD
15:34<frosch123>vehicle var 61 has parameters in 10F and in 10E
15:34<TrueBrain>yeah, but those are registered slotted
15:34<TrueBrain>maybe I should have formulated my question better, but I wonder what bytes to write
15:34<TrueBrain>this 60+x stuff is already a nightmare :P
15:34<TrueBrain> [self.variable],
15:34<TrueBrain>self.parameter.map(|x vec![x]).unwrap_or_default(),
15:34<+michi_cc>7B <variable-to-read>
15:35<TrueBrain>tnx michi_cc :)
15:35<TrueBrain>how the fuck are we going to call that .... hmmm
15:35<+michi_cc>I.e 7B is a normal 60+x variable that just happens to take a variable number as its 60+x parameter.
15:35<frosch123>TrueBrain: it's the [] operator
15:36<TrueBrain>Global::DynamicParameter(variable) => Self { variable: 0x7b, parameter: variable.variable, shift: variable.shift, mask: variable.mask },
15:36<TrueBrain>I think .. lets give it a spin :)
15:41<TrueBrain>Register::Temporary { register } => Stack::Variable(StackVariable::Variable(Variable::Global::DynamicParameter(Variable::Register::Temporary(register).into()).into())),
15:41<TrueBrain>you can write such ugly code if you like to :D
15:42<frosch123>i thought you only write comments now
15:43<TrueBrain>[23:1, around '='] Left hand side of assignment must be a variable
15:43<TrueBrain>sad
15:48<TrueBrain>okay ... so 7B is for reading I guess .. how to write is the next question ..
15:49<frosch123>\psto \tsto?
15:49<frosch123>it's a completely separate thing :)
15:50<TrueBrain>no shit :P
15:50<TrueBrain>but during resolving I already created the 7B chain
15:50<TrueBrain>but .. you cannot assign to that :D
15:50<frosch123>yeah [] is different for lvalue and rvalues
15:51<TrueBrain>so I need to delay the actual resolving to much later .. which is interesting :D
15:52<frosch123>or you use a different variable name
15:52<frosch123>one variable read-only, one variable write-only
15:52<frosch123>there are other write-only variables as well :p
15:52<TrueBrain>nah, I just need to create a new element to push on the stack
15:55<_dp_>what happens if var 7B is used with anything but rst as an operation?
15:56<_dp_>is it like accumulator <operation> 7bvar(accumulator) ?
15:56<+glx>7B uses whatever is the last computed result
15:56<_dp_>yeah, as a a parameter for a variable
15:57<frosch123>_dp_: you can do "a + temporary[a]", but probably there is no usecase
15:57<_dp_>but operation will also use that accumulator if it's not rst
15:58<_dp_>how fun
15:58<+glx>but yeah it's probably never used without rst
15:59<frosch123>7B is a very easy and standard thing, just very weird to describe
15:59<frosch123>the accumulator-choice is maybe add in hindsight, later additions assigned special meaning to 10E+10F and stuff
15:59-!-Thedarkb-T60 [~Thedarkb-@cust158-dsl48.idnet.net] has joined #openttd
15:59-!-Thedarkb-T60 is "realname" on #oolite #openttd
15:59<frosch123>but i think 7B was the first one to use another expression value
16:00<frosch123>s/add/odd/
16:00<TrueBrain>indeed, now I understand what it actually does, it makes perfect sense :P
16:00<TrueBrain>and don't ask me to give a better description
16:00<TrueBrain>I can't even come up with a name for it :P
16:01<_dp_>oh, I think some functional nonsense may have a name for it :p
16:01<_dp_>like partial()
16:01<_dp_>or what it was in haskel, $
16:01<_dp_>ah, no, probably apply()
16:02<frosch123>it's probably best to consider "\rst 7B" as a single token
16:03<_dp_>can't quite do that in decompiler if other operations are valid
16:04<_dp_>for compiler that's probably the most sensible choice, yes
16:04<frosch123>what do you use that decompiler for? just to avoid reading pynml?
16:04<_dp_>idk, it kinda happened xD
16:05<_dp_>I find it easier to make both compiler and decompiler at the same time
16:05<_dp_>can look at other grfs to understand the format and also debug my compiler output
16:05<frosch123>ah, yet another compiler
16:06<frosch123>are newgrf-compilers and newgrf-authors like multiplayer-server and multiplayer-client?
16:06<frosch123>more compilers than users?
16:06<_dp_>xD
16:07<frosch123>there is a 1.10.3 server with 3 clients now
16:08<andythenorth>I don't have a compiler
16:08<_dp_>maybe some popular distro version or smth
16:10<andythenorth>so electricity within some radius of power station?
16:10<andythenorth>maybe 128 tiles?
16:10*andythenorth wonders if GS has manhattan distance calculator thing
16:11<_dp_>already used my compiler for 2 and a half newgrfs :p
16:13-!-WormnestAndroid [~WormnestA@35.136.189.95] has quit [Read error: Connection reset by peer]
16:14<andythenorth>superlib has loads of stuff, let's see
16:14-!-WormnestAndroid [~WormnestA@35.136.189.95] has joined #openttd
16:14-!-WormnestAndroid is "WormnestAndroid" on #openttd
16:15<andythenorth>seems not
16:15<andythenorth>manhattan distance is magic? or just pythagoras?
16:16<+glx>https://docs.openttd.org/gs-api/classGSMap.html#a8b02957b2d3defde0e3038478dfbb207
16:16<frosch123>https://docs.openttd.org/gs-api/classGSTile.html#aecd329d13db274c8c15538a0c0a91350
16:16<frosch123>ahaha
16:16<andythenorth>oh nice thanks
16:16<andythenorth>is it expensive?
16:16<frosch123>oh, it's even twice in the api
16:17<frosch123>no, it's not a command call
16:17<frosch123>it doesn't even count to the opcode limit
16:17*andythenorth needs to calculate manhattan distance from any serviced power station to all industries within radius
16:17<frosch123>builtins are always cheaper wrt. opcode limit
16:17<andythenorth>I could cache them and watch for open / close, but might be over engineering
16:17<frosch123>gslist has valuator stuff
16:18<andythenorth>oh that yes
16:18<andythenorth>not even sure what I'm doing with power yet
16:18<andythenorth>might be more of a town thing
16:19<+glx>you get the list, then apply valuators, then filter, then apply another valuator, filter again ...
16:19<andythenorth>wonder if I can put 'nearest power station' in town window
16:19<andythenorth>or if I can link town window to a storybook page
16:20<+glx>GSList is quite powerful
16:21<andythenorth>oh I can make a troll GS with GSWindow
16:21<andythenorth>it can watch for open windows, then close them as a troll
16:21<+glx>like in your case you probably want an IndustryList, then valuate with type, remove power stations, valuate with distance, keep below the max distance
16:22-!-Thedarkb-T60 [~Thedarkb-@cust158-dsl48.idnet.net] has quit [Ping timeout: 480 seconds]
16:22<andythenorth>thanks
16:22*andythenorth wonders if GSText can link to story book pages
16:23<frosch123>no hyperlinks yet, but there are some zuu drafts :)
16:23<frosch123>zuu's ai/gs drafts are just like my newgrf drafts, 10 years or older :)
16:24<andythenorth>there is MakeTileButtonReference
16:24<andythenorth>but that's a bit ass backwards
16:24<andythenorth>seems to be make button, click button, choose tile, get story page
16:24<andythenorth>maybe
16:26<+glx>https://docs.openttd.org/gs-api/classGSIndustry.html#ac5fba88d1396d67b862e6ed6c6f922f1 <-- lol a third one
16:27<+glx>I think there's one for each class because valuators
16:28<TrueBrain>wow, okay .. 7B was a lot more difficult than I expected .. lol .. "list key []", the "key" part can be a complex chain. So what I do now, is first calculate that chain, add the position of "list[0]" to it, use 7B 7C to lookup the actual register value, store it in another temporary register ... now I can use that single register in the calculation
16:28<TrueBrain>lol
16:28<frosch123>glx: that one uses industryid+tile instead of 2 tiles
16:28<+glx>yes because first arg for a valuator is the item
16:29<frosch123>ah, that makes sense
16:29<+glx>so GSTile for a TileList
16:29<+glx>which uses tile+tile
16:30<+glx>the generic version is in GSMap
16:30<+glx>also uses tile+tile
16:33<TrueBrain>lol, storing on a dynamic place is as difficult .. as I there too need to store the location I want to store at in a register first :P Or I might be missing some command .. but this is tricky as fuck :D
16:34<TrueBrain>I guess I might be able to abuse 1C, but .. that is also effort :P
16:35<frosch123>yes, if the index is constant, you can use 1C
16:35<TrueBrain>it isn't :P And requires me to do a procedure call .. so I am not sure what is more difficult ..
16:35<frosch123>if you compute the index earlier, you have to store it in a temporary
16:35-!-Thedarkb-T60 [~Thedarkb-@cust158-dsl48.idnet.net] has joined #openttd
16:35-!-Thedarkb-T60 is "realname" on #openttd #oolite
16:36<frosch123>ah you can also use a procedure call to index, but then have to use the 15bit result
16:36<frosch123>which is not a limitation in this case
16:36<TrueBrain>yup
16:36<TrueBrain>but .. requires creating more chains
16:36<TrueBrain>so register vs chain, I guess
16:39<TrueBrain>the one thing I have found, is that in RPN and the fact I don't make an AST, it is really hard to find out when a a register like this can be free'd again :P
16:39-!-Speedy` [~speedyn@mobile-access-5672e9-171.dhcp.inet.fi] has quit [Ping timeout: 480 seconds]
16:39<TrueBrain>I now just reset every "statement" (so, after an assignment, all temporary registers I was using can be free'd)
16:39<TrueBrain>shockingly, this work I made compiles, and acts as I expected :o :o
16:39-!-Thedarkb-T60 [~Thedarkb-@cust158-dsl48.idnet.net] has quit [Read error: Connection reset by peer]
16:40-!-Thedarkb-T60 [~Thedarkb-@cust158-dsl48.idnet.net] has joined #openttd
16:40-!-Thedarkb-T60 is "realname" on #openttd #oolite
16:40<TrueBrain> myproduction 1 =
16:40<TrueBrain> locallist myproduction [] 12 =
16:40<TrueBrain>that is allowed now
16:40<TrueBrain>and the 7B chain works too
16:41<TrueBrain>not sure wha tto think of this :D
16:42<TrueBrain>but okay ..... next up: loop{
16:42<TrueBrain>not tonight :D
16:43-!-Wormnest [~Wormnest@35.136.189.95] has quit [Ping timeout: 480 seconds]
16:44-!-frosch123 [~frosch@00013ce7.user.oftc.net] has quit [Quit: be yourself, except: if you have the opportunity to be a unicorn, then be a unicorn]
16:47<TrueBrain>I wonder how to make test-cases for this .. as I don't really care how it is generated .. just as long as it does the right thing :D
16:48<TrueBrain>so far in a very simple function I have 7 \rsts ... pretty sure I can do better :D
16:48-!-Thedarkb-T60 [~Thedarkb-@cust158-dsl48.idnet.net] has quit [Ping timeout: 480 seconds]
16:48-!-gelignite [~gelignite@55d4ed71.access.ecotel.net] has quit [Quit: Stay safe!]
16:49-!-WormnestAndroid [~WormnestA@35.136.189.95] has quit [Ping timeout: 480 seconds]
16:50-!-WormnestAndroid [~WormnestA@172.56.27.143] has joined #openttd
16:50-!-WormnestAndroid is "WormnestAndroid" on #openttd
16:56<_dp_>decompiled 7B: https://pastebin.com/5UDbAi7H
16:56<_dp_>wonder how that looked in nml
16:57<andythenorth>'removed by pastebin staff'
16:57<andythenorth>lol
16:57<_dp_>wth
16:58<andythenorth>weird
16:59<_dp_>ok, this one seems to live for now https://pastebin.com/Ek2GBgr3
16:59<_dp_>looks like somehow pastebin didn't like binary in the comment
17:01<andythenorth>ok so if towns need nearby electricity to grow
17:01<andythenorth>how much?
17:01<andythenorth>the FIRS thing of fixed values like > 128t coal per month for level 1 and > 640t for level 2?
17:02<andythenorth>or coal required as % of population in area?
17:06<_dp_>80 coal per 1000 inhabitants ;)
17:07<andythenorth>sounds about right
17:07<_dp_>I just copied that from my cb server xD
17:08<andythenorth>I want electricity to affect industry somehow
17:08<andythenorth>but not in basic production
17:11<andythenorth>lol
17:11<supermop_Home>hmm my rainbow buses seem to be changing livery at random
17:11<andythenorth>maybe electricity substation industries could be like company statues :P
17:11<supermop_Home>random switch supposed to be triggered on service
17:11<andythenorth>yak shaving
17:12<supermop_Home>but they are changing while just driving around
17:12<andythenorth>supermop_Home is it articulated?
17:16-!-lobster [~lobster@86-91-159-125.opennet.kpn.net] has joined #openttd
17:16-!-lobster is "Lob Star" on #tycoonexiles #openttd
17:17<TrueBrain>awh, I generated an invalid NewGRF :(
17:17<andythenorth>GG
17:17<TrueBrain>that remains a very hard thing to do, so it always surprises me :)
17:22<TrueBrain>ah, empty function
17:22<TrueBrain>:D
17:24-!-lobster [~lobster@86-91-159-125.opennet.kpn.net] has quit [Ping timeout: 480 seconds]
17:25-!-Wormnest [~Wormnest@35.136.189.95] has joined #openttd
17:25-!-Wormnest is "Wormnest" on #openttd
17:27<andythenorth>ok so to find nearest power station to a town
17:27<andythenorth>I need to valuate a list of tile distances
17:27<andythenorth>let's see
17:30<andythenorth>hmm
17:33<andythenorth>nah I don't get it :)
17:33<andythenorth>there's some explanation here https://wiki.openttd.org/en/Development/Script/Lists
17:33<andythenorth>but failing to grok
17:34<andythenorth>oh I don't valuate inside a foreach loop?
17:40<andythenorth> local industry_list = GSIndustryList();
17:40<andythenorth> industry_list.Valuate(GSIndustry.GetIndustryType);
17:40<andythenorth> industry_list.KeepValue(1);
17:40<andythenorth>seems to get coal mines
17:46-!-Wolf01 [~wolf01@0001288e.user.oftc.net] has quit [Quit: Once again the world is quick to bury me.]
17:46<andythenorth>hmm
17:47<andythenorth>how to copy a GSList?
17:59<supermop_Home>ok hale updated
17:59<supermop_Home>is now pretty close to done
17:59<supermop_Home>remaining things to add are scope creep
18:00-!-sla_ro|master [~sla.ro@93.118.46.75] has quit []
18:01<@DorpsGek>[OpenTTD/OpenTTD] LC-Zorg commented on pull request #9789: Feature: Technology progresses independently of game time https://github.com/OpenTTD/OpenTTD/pull/9789#issuecomment-1013970620
18:09<supermop_Home>andythenorth articulated and rigid both
18:09<andythenorth>supermop_Home hmm
18:09<andythenorth>'triggers are weird'
18:09<andythenorth>LC comments, usually a sign that it's bedtime
18:10<supermop_Home>yep
18:10<supermop_Home>well not for me
18:10<supermop_Home>but i'm calling it a day for train game
18:13-!-nielsm [~nielsm@188-181-82-243-cable.dk.customer.tdc.net] has quit [Remote host closed the connection]
18:18<andythenorth>Busy Bee makes industry names clickable somehow
18:18<andythenorth>in goal window
18:18<andythenorth>maybe town window doesn't support that
18:29-!-andythenorth [~andytheno@cpc87165-aztw31-2-0-cust40.18-1.cable.virginm.net] has quit [Quit: andythenorth]
18:47<_dp_>code looks much nicer with nml comparisons combined back: https://pastebin.com/Sj29uj7L
18:58-!-cathartes [~cathartes@000270b3.user.oftc.net] has joined #openttd
18:58-!-cathartes is "cathartes (vultur-cadens)" on #openttd #C #moocows #oftc
19:07<+glx>I can see a ternary at the begining _dp_
19:08<+glx>128 and 129 are guard and !guard, same for 131/132 and 134/135
19:08<_dp_>glx, yeah, but that's harder to unfold
19:09<_dp_>never know when temporary is gonna get used again
19:11<+glx>lol I think there is a (construction_state != 3) ? 1 : 0
19:11<+glx>which is silly
19:22<_dp_>in general nml va2 code seems very bloated, simplest expressions explode into a few dozen opcodes
19:23<_dp_>because first it doesn't encourage optimal code, then it doesn't optimize what it got, then it expands operators and now needs shitton of temporaries to calculate all that
19:29<supermop_Home>anyone here have a Nikon f100?
20:01<+glx>ah it's https://github.com/andythenorth/firs/blob/master/src/templates/graphics_switches.pynml#L38-L53 so yeah translated to nfo it's a mess
20:03<_dp_>oh god
20:03<_dp_>I'd say it's more readable in nfo xD
20:10<_dp_>here's the full firs btw if anyone fancies a read https://citymania.org/static/files/misc/firs.py.gz
20:22<+glx>I already have the nml version (more than 215k lines)
21:21-!-Gustavo6046 [~Gustavo60@2804:14d:4cd8:96b6:f57:b290:e69a:6832] has joined #openttd
21:21-!-Gustavo6046 is "realname" on #llvm #openttd
21:27<Gustavo6046>Hello!
21:28<wiscii>hi
21:28-!-WormnestAndroid [~WormnestA@172.56.27.143] has quit [Ping timeout: 480 seconds]
21:28-!-WormnestAndroid [~WormnestA@35.136.189.95] has joined #openttd
21:28-!-WormnestAndroid is "WormnestAndroid" on #openttd
21:41<Gustavo6046>wiscii, how are you? :D
21:41<wiscii>i was just looking at odd NewGFX
21:42<wiscii>any good ones ?
21:45<Gustavo6046>hm? not that I know
21:57<wiscii>so what are you up to ?
22:04<Gustavo6046>hmm
22:04<Gustavo6046>maybe revisit that server
22:05-!-glx [~glx@000128ec.user.oftc.net] has quit []
22:07<wiscii>you mean mine ?
22:11<Gustavo6046>yeah
22:12<wiscii>you can have a copy of a save file from practically any year but i've finished with that one
22:14<wiscii>we could start from scratch ?
22:15<wiscii>i really don't know much about online with this game
22:15<wiscii>too many things can go wrog
22:15<Gustavo6046>hmm okay
22:15<Gustavo6046>we can start from scratch
22:16<Gustavo6046>did you see the save file I posted yesterday before sleep?
22:16<wiscii>do you have any preferred settings ? like i said .. noob here
22:16<wiscii>i missed your save
22:17<wiscii>there was a lot of chat here today for the devs
22:17<wiscii>pages of it !
22:18-!-Flygon [~Flygon@2001:44b8:411e:4e00:c030:1ecf:1a1c:f87f] has joined #openttd
22:18-!-Flygon is "Flygon" on #openttd
22:25<Gustavo6046>wiscii, ah
22:25<Gustavo6046>I like slightly larger max. station spread and train size limit
22:26<wiscii>Gustavo6046: are you able to host a server ?
22:27<Gustavo6046>wiscii, no, I am behind a CGNAT
22:27<Gustavo6046>I am publicly reachable through IPv6 and Yggdrasil, though.
22:32<wiscii>if you have a preferred save, i could host it for a while
22:33<wiscii>i'm just curious ..
22:34<Gustavo6046>hmm
22:34<Gustavo6046>it's fiine
22:34<Gustavo6046>I can show you mine
22:34<Gustavo6046>https://files.catbox.moe/lwb867.sav
22:35<Gustavo6046>the filename is clobbered, a more meaningful one is 'Bloggs & Co., 1987-12-19.sav'
22:38<wiscii>wow .. that is a LOT of NewGFX settings!!!
22:39<wiscii>this could take a while ..
22:39<wiscii>there are quite a few i don't recognise
22:39<wiscii>ok .. seems to be ok-ish
22:39<Gustavo6046>NewGRF
22:39<Gustavo6046>ah
22:40<Gustavo6046>I should have used trains
22:40<wiscii>i'm working on it :)
22:40<Gustavo6046>:o
22:40<Gustavo6046>the industries here behave in interesting and unexpected ways
22:41<wiscii>ok, it should be up as before 'tct' with my name = pw
22:42<wiscii>well .. not yet but soon
22:43<wiscii>road fan!
22:45<wiscii>there i am :)
22:46<Gustavo6046>hm?
22:46<wiscii>see me ?
22:46<Gustavo6046>I do
22:46<wiscii>https://servers.openttd.org/listing -- tct
22:46<wiscii>ok
22:46<wiscii>are you in ?
22:47<Gustavo6046>yup
22:48<Gustavo6046>TrueBrain, is there any prospects for a future continent-based terrain generation?
22:49<wiscii>a completely different style of game to me -- roads!
22:49<Gustavo6046>well
22:49<Gustavo6046>yeah
22:49<Gustavo6046>a lot of those should use trains instead
22:49<Gustavo6046>especially some of the freight
22:49<wiscii>i honestly do not believe i have ever tried that way before, i start with trains
22:49<wiscii>how short sighted of me!
22:50<wiscii>i may have tried once but something annoyed me
22:53<wiscii>Purr City East looks deserted
22:53-!-Wormnest [~Wormnest@35.136.189.95] has quit [Quit: Leaving]
22:54<wiscii>yeah .. 884 vehicles !
22:55<wiscii>that's why you go to trains in the end
22:57<Gustavo6046>yeah
22:57<Gustavo6046>what are trams good for again? slower speed but higher cargo capacity?
22:57<wiscii>it's cool, i have tried something similar
22:57<wiscii>but you have some cool GFXs
22:58<Gustavo6046>ah, thanks!
23:14<wiscii>looks like a bit of a jam in Griffey Valley
23:15<wiscii>i have to go :(
23:15<wiscii>so does the server, sorry
23:16<Gustavo6046>aw
23:16<Gustavo6046>is okay
23:16<wiscii>thanks for sharing :)
23:21<Gustavo6046>no probs :)
23:21<Gustavo6046>see you! take care!
---Logclosed Mon Jan 17 00:00:32 2022