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