IRC logs for #openttd on OFTC at 2022-09-10
            
00:00:07 *** bitsousa[m] has quit IRC (autokilled: Spambot. Mail support@oftc.net if you think this is in error. (2022-09-10 00:00:07))
00:04:08 <glx[d]> Discord Moderator
00:04:44 <dwfreed> that was a matrix user via irc
00:05:05 <glx[d]> yes, but I can't delete the message here πŸ™‚
00:05:54 <dwfreed> probably the relay bot has a higher role than you?
00:05:59 *** wyndbain has joined #openttd
00:05:59 <wyndbain> Woah
00:06:00 <wyndbain> Wtf?
00:06:13 <glx[d]> typical irc spam
00:06:24 <dwfreed> s/irc/matrix/
00:06:41 <dwfreed> and this one is new
00:07:11 <wyndbain> Ah i see
00:07:48 <wyndbain> Might have to get truebrain to look at that
00:08:01 <glx[d]> but they manage (probably unintentionaly) to spam 3 different services in one message
00:21:32 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
00:46:31 <kamnet> glx[d]: I'm assuming somebody else got to this before me? I missed it.
00:47:30 <glx[d]> yes wyndBrain took care of it
00:50:39 <kamnet> andythenorth: I've complained about how inconsistent the Object UI is compared to the Stations UI. Hopefully somebody will come along and fix it.
00:54:35 <kamnet> https://cdn.discordapp.com/attachments/1008473233844097104/1017961249771884555/unknown.png
00:54:35 <kamnet> andythenorth: I convinced GarryG and (I think) Quast65 to adopt this stile of organization. I know it's more work but I think it massively helps in organization.
01:35:11 *** HerzogDeXtEr has joined #openttd
01:37:37 *** Wormnest has quit IRC (Quit: Leaving)
01:50:54 <DorpsGek> [OpenTTD/OpenTTD] ssokolow opened pull request #10015: Add the Simulation subcategory to openttd.desktop https://github.com/OpenTTD/OpenTTD/pull/10015
02:05:43 *** D-HUND has joined #openttd
02:06:09 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
02:09:10 *** debdog has quit IRC (Ping timeout: 480 seconds)
02:46:17 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
03:03:23 *** debdog has joined #openttd
03:06:45 *** D-HUND has quit IRC (Ping timeout: 480 seconds)
04:53:53 *** WormnestAndroid has joined #openttd
05:20:57 *** nielsm has joined #openttd
05:47:59 <DorpsGek> [OpenTTD/OpenTTD] Bouke commented on pull request #10013: Fix: Incorrect player name in online players window https://github.com/OpenTTD/OpenTTD/pull/10013#issuecomment-1242638411
06:24:40 <DorpsGek> [OpenTTD/OpenTTD] LordAro approved pull request #10013: Fix: Incorrect player name in online players window https://github.com/OpenTTD/OpenTTD/pull/10013#pullrequestreview-1103083038
06:25:41 <DorpsGek> [OpenTTD/OpenTTD] LordAro approved pull request #10015: Add the Simulation subcategory to openttd.desktop https://github.com/OpenTTD/OpenTTD/pull/10015#pullrequestreview-1103083106
06:27:03 <DorpsGek> [OpenTTD/OpenTTD] LordAro approved pull request #10014: Fix: DrawStringMultiLine() could overdraw https://github.com/OpenTTD/OpenTTD/pull/10014#pullrequestreview-1103083198
06:27:14 <dwfreed> approve all the things
06:27:18 <LordAro> Β―\_(ツ)_/Β―
06:44:24 <andythenorth> ok how do I patch
06:44:49 <andythenorth> parameterised varaction 2 for objects
06:44:50 <andythenorth> 'company colour of nearest industry of type (x)'
07:19:21 *** OsteHovel has joined #openttd
07:25:56 *** OsteHovel_ has quit IRC (Ping timeout: 480 seconds)
08:26:59 <Brickblock1> andythenorth: multiple grfs
08:27:49 <andythenorth> lol no πŸ™‚
08:28:29 <andythenorth> I just cap to 255 then
08:29:08 <dP> 255 grfs? ;)
08:30:07 <andythenorth> 255 versions of firs.grf
08:31:02 <dP> did you not exceed that already? xD
08:31:20 <andythenorth> 255 different firs.grf
08:31:23 <andythenorth> one per industry
08:31:25 <andythenorth> also one per cargo
08:31:49 <dP> oh, like ecs?
08:33:58 <andythenorth> maybe one per industry tile?
08:34:02 <andythenorth> maximum flexibility
08:43:30 *** Flygon has joined #openttd
09:04:07 <DorpsGek> [OpenTTD/OpenTTD] JGRennison opened issue #10016: [Crash]: #9895 causes assertion failure in multiplayer https://github.com/OpenTTD/OpenTTD/issues/10016
10:05:54 *** Wolf01 has joined #openttd
10:08:56 *** sla_ro|master has joined #openttd
10:09:39 <andythenorth> object order in building UI is just by ID?
10:09:43 <andythenorth> or I need new glasses?
10:13:01 *** HerzogDeXtEr has joined #openttd
10:15:06 <frosch> id or alphabetic, i wouldn't know any other option
10:15:13 <frosch> id gives more control to author
10:15:32 <frosch> alphabetic is kind of arbitrary, if you only look at the sprites anyway πŸ™‚
10:17:00 <andythenorth> is is somewhat lacking for savegame compatibilty πŸ˜›
10:17:20 <andythenorth> I can just bump the version
10:17:31 <andythenorth> I was concerned about all these model railway people, but eh
10:17:41 <andythenorth> FIRS is breaking savegames every release currently
10:18:40 <andythenorth> I would have expected alphabetic like cargos, industries etc, but changing that now will probably cause drama
10:19:34 * andythenorth has been making a list :P
10:19:36 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1018103442083954748/unknown.png
10:19:46 <dP> you can always assign ids in alphabetic order :p
10:19:57 <andythenorth> yes
10:20:05 <andythenorth> such lolz
10:21:38 <andythenorth> reshuffling 100 IDs to make a gap πŸ˜›
10:22:05 <JGR> Upgrading any GRF mid game should be assumed to break your savegame, that isn't really notable
10:22:47 <andythenorth> I try to preserve compatibility where I can, as it causes scenarios etc to be lost frequently to the playerbase
10:22:59 <andythenorth> or at least, stuck with older, broken grfs
10:23:17 <andythenorth> it's not particularly something I achieve though
10:23:30 <JGR> If a GRF worked then, it should work now as well
10:23:43 <andythenorth> I think we can assume all GRF releases are broken
10:23:54 <andythenorth> newer ones are just differently broken
10:25:00 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1018104802443542538/unknown.png
10:25:00 <andythenorth> unrelated, these all look the same to me πŸ™‚
10:25:10 <andythenorth> picking which one I want is random clicking
10:26:10 <andythenorth> how do I stop the view changing?
10:26:19 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1018105134565302272/unknown.png
10:26:44 <andythenorth> means I can't really learn what's where
10:26:51 <andythenorth> the menu isn't stable
10:27:06 <andythenorth> oh maybe force the purchase sprite?
10:27:37 <andythenorth> can't see the correct var
10:27:39 <andythenorth> maybe it's missing
10:29:19 <andythenorth> where's the equivalent of var 10 for vehicles?
10:30:02 <andythenorth> I guess the precedent for view changing is stations?
10:34:08 *** wallabra_ has joined #openttd
10:39:08 *** wallabra has quit IRC (Ping timeout: 480 seconds)
10:39:08 *** wallabra_ is now known as wallabra
11:01:04 <andythenorth> funny
11:01:08 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1018113891974271057/object_gui_lol_720p.mov
11:07:56 <petern> That was awkward
11:19:58 <andythenorth> wonder if I can force a null object to make 3s
11:26:32 <andythenorth> nah
11:26:34 <andythenorth> nvm
11:27:32 <andythenorth> nml seemed a bit angry about object action 0s
11:27:45 <andythenorth> when I tried to declare them multiple times
11:27:52 <andythenorth> wonder if i can make it work though
11:28:10 <andythenorth> then I can do objects per FIRS economy, which has much more chance of fitting in 255 ID limit
11:29:10 <andythenorth> max 128 industries, some don't get objects for $reasons
11:29:13 <andythenorth> some get 3 or 4
11:29:17 <andythenorth> 'might be fine'
11:29:46 <petern> Split into different files?
11:30:07 <petern> I'm surprised there's a limit of 255 to be honest.
11:30:39 <andythenorth> goes it throw out?
11:31:25 <andythenorth> did TTDP have objects?
11:31:38 <frosch> kind of, yes
11:32:09 <frosch> it may have been the last ttdp feature, implemented in parallel to ottd
11:32:41 <DorpsGek> [OpenTTD/OpenTTD] ssokolow commented on pull request #10015: Add the Simulation subcategory to openttd.desktop https://github.com/OpenTTD/OpenTTD/pull/10015#issuecomment-1242710362
11:33:05 <petern> Simulation of earning too much money to spend.
11:33:18 <frosch> also: https://github.com/OpenTTD/OpenTTD/commit/ac599625da28a448a4f9ec655e4767e6436d0e16
11:33:47 <frosch> the limit used to be 256 for all grf together
11:34:08 <andythenorth> so the limit is grf-local...for reasons?
11:34:16 <andythenorth> or because we didn't change it yet?
11:34:28 <petern> "Extended byte" eh?
11:34:43 <frosch> it's probably only "noone increased it yet"
11:35:07 <andythenorth> it would be a service to Bananas
11:35:14 <andythenorth> and people using the Australian grfs
11:35:41 <andythenorth> I've tried using the views thing to compress into smaller ID space
11:35:44 <andythenorth> it's kinda weird
11:36:13 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1018122723790164028/unknown.png
11:36:13 <andythenorth> these just aren't similar πŸ˜›
11:36:18 <frosch> https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Objects#Get_object_type_at_offset_.2860.29 <- i guess that's the limit for the spec
11:36:26 <frosch> 65534 per grf
11:36:41 <petern> The reason is probably "andythenorth hasn't tried using it yet so hasn't found the limits"
11:36:56 <andythenorth> all those object grfs though πŸ™‚
11:37:06 <andythenorth> objects and stations are the weirdest things in grf
11:37:13 <andythenorth> but probably the most made
11:37:38 <frosch> most objects sets have multiple grf, for people to pick from
11:37:45 <andythenorth> is there any connection between 'FIRS' and 'industry spec is very good, and very complete' ?
11:37:45 <andythenorth> πŸ˜›
11:37:45 <petern> If I plug in my broken monitor is it likely to just work...?
11:37:48 <andythenorth> yes
11:37:49 <frosch> noone just dumps 500 firs sprites in random order onto the player πŸ™‚
11:37:54 <JGR> The object spec is much less weird than stations, to be honest
11:38:05 <andythenorth> the spec is good, but the UI is laughably broken
11:38:17 <andythenorth> as in 'such lol' πŸ™‚
11:38:25 <frosch> yeah, it's weird that the gui is so broken and noone complained
11:38:30 <JGR> The UI works fine for me and princely most players
11:38:36 <frosch> so either andy is doing things weirdly different, or noone used objects :p
11:38:44 <andythenorth> there is a cohort who don't complain
11:38:52 <andythenorth> the same cohort who wanted the shunting patch merged etc πŸ™‚
11:39:11 <andythenorth> the filter doesn't even work
11:39:16 <andythenorth> unreported πŸ˜›
11:39:26 <petern> ALL THE FEATURES EVEN IF THEY ARE BUGGY
11:39:30 <andythenorth> yup
11:40:11 <JGR> Typically object GRF authors don't try to deliberately break the UI :p
11:40:33 <andythenorth> I never set out to break features
11:40:50 <andythenorth> similarly to I never set out to scrape my van into things πŸ˜›
11:40:58 <andythenorth> several insurance claims though
11:41:58 <dP> pretty sure I complained about object ui at some point :p
11:42:03 <dP> that one time I tried to use it
11:42:11 <andythenorth> pylons? πŸ˜›
11:42:23 <dP> nah, pylons were automatic
11:42:32 <andythenorth> once these objects are in, I am wondering about GS to place industry objects πŸ˜›
11:42:41 <andythenorth> can GS read the company colour of an industry?
11:42:42 * andythenorth looks
11:42:45 <dP> also pylons are nothing after 83 river objects :p
11:43:03 <dP> I just added some auz objects to see how they do rivers and stuff and tried to make some sense of it
11:43:12 <andythenorth> ha
11:43:25 <andythenorth> ok so GS is going to need industry.company_colour or something
11:43:45 <andythenorth> Industry.GetCompanyColour
11:44:29 <andythenorth> and it will need ObjectType.SetCompanyColour
11:45:05 <andythenorth> I don't actually want massive industries made of buildings that are objects
11:45:10 <andythenorth> but it might be funny to try
11:45:29 <JGR> Object colours does not seem like an often used feature
11:45:45 <dP> hm, I actually did quite a lot of objects grfs now that I think of it, just never tried placing them manually xD
11:46:05 <JGR> It's been broken in NML for some time
11:46:32 <JGR> (The variable for it, that is)
11:50:11 <andythenorth> ha
11:50:33 <andythenorth> it's pretty useless to me for this case, without a var for colour of nearby industry
11:50:41 <andythenorth> which I suspect is an easy var, but eh
11:51:01 <JGR> Colours don't /have/ to match
11:51:13 <andythenorth> historically we have not allowed inspection into nearby industry types
11:51:47 <JGR> It is an easy way to make things which perform badly
11:52:42 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1018126871814221935/unknown.png
11:52:42 <andythenorth> JGR: well they won't be for now πŸ˜„
11:53:01 <andythenorth> I could do what I did with station tiles, and force them all to grey
11:53:05 <andythenorth> 'goes with everything'
11:53:17 *** sla_ro|master has quit IRC ()
11:53:19 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1018127025766146058/unknown.png
11:53:32 <andythenorth> could probably just remap CC
11:53:42 <andythenorth> or let players choose a colour in parameters
11:54:05 <andythenorth> Horse sets wagon colours in parameters πŸ˜›
11:55:29 <JGR> Putting things like colours in parameters means it won't get changed by the vast majority of players, and not at all in multiplayer
11:55:51 <andythenorth> ++
11:56:34 <Brickblock1> CC and param?
11:59:58 <EmperorJake> How about a colour palette and paint tool in the objects menu ala Rollercoaster Tycoon
12:00:31 <andythenorth> far too sensible πŸ˜›
12:00:42 <andythenorth> imagine, you could even do the same thing when building trains πŸ˜›
12:02:05 <andythenorth> adding something like this to vehicle buy menu and object build menu
12:02:08 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1018129243470835782/unknown.png
12:03:06 <andythenorth> is lunch?
12:03:24 <petern> Oh right, we get an extra bank holiday
12:03:39 <petern> Is lunch yes
12:03:44 <EmperorJake> Individually repaintable wagons in a train would be nice to see
12:05:43 <andythenorth> imagine the evil I could do
12:06:08 <andythenorth> would finally be time for "red train goes faster"
12:07:02 <dP> well, you can set color to train groups...
12:08:13 <andythenorth> yes
12:08:16 <dP> and red already go faster in nuts ;)
12:08:19 <dP> well, kind of xD
12:08:26 <andythenorth> but groups are for setting which realistic livery to choose
12:08:38 <andythenorth> πŸ˜›
12:21:48 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #10015: Add the Simulation subcategory to openttd.desktop https://github.com/OpenTTD/OpenTTD/pull/10015#issuecomment-1242717553
12:24:42 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1018134926941491210/unknown.png
12:24:42 <andythenorth> objects forced to grey CC would look like
12:26:07 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1018135281628631040/unknown.png
12:26:36 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1018135401346629724/unknown.png
12:26:36 <andythenorth> compared to
12:40:02 <kamnet> frosch: I've complained, but this was years ago on TT-F
12:42:54 <andythenorth> maybe no-one complained in the correct places πŸ™‚
12:43:49 <kamnet> It's true, I never filed a report on Flyspray. and I've grown use to it so I didn't make one when everything moved to Github.
12:44:16 <kamnet> This would have been like 10, almost 15 years ago. LOL
12:47:52 <petern> Did NewGRF objects exist 15 years ago?
12:48:43 <andythenorth> time has ticked on a lot
12:48:58 <andythenorth> just keeps doing it, every day πŸ˜›
12:56:11 <kamnet> petern: 2008, according to TT-F archives when WallyWeb made a post on it. https://www.tt-forums.net/viewtopic.php?t=28517
12:56:41 <petern> Hah
12:56:58 <petern> Maybe I should squash all these commits and then pull it apart again.
12:57:35 <andythenorth> https://tenor.com/view/slinky-jumping-gif-6244630
12:58:02 <DorpsGek> [OpenTTD/team] XiaoJi-Game opened issue #347: [zh_CN] Translator access request https://github.com/OpenTTD/team/issues/347
13:05:25 <andythenorth> hmm
13:05:48 <andythenorth> increasing the object limit per grf would also make it trival to provide stability of IDs whilst controlling the overall order
13:06:22 <andythenorth> I can space out industries in blocks of 10, so that each industry has up to 10 objects
13:06:43 <andythenorth> changes to spritelayouts at one industry would not then cause all objects to have their ID borked
13:07:14 <andythenorth> adding an entirely new industry would reshuffle everything, but that's accepted
13:08:25 <andythenorth> nah even that would work, I'd just do industry numeric_id * 10
13:09:18 <DorpsGek> [OpenTTD/OpenTTD] ssokolow commented on pull request #10015: Add the Simulation subcategory to openttd.desktop https://github.com/OpenTTD/OpenTTD/pull/10015#issuecomment-1242725058
13:09:18 <andythenorth> then FIRS can just alphabetise them in the compile
13:09:38 <andythenorth> hmm maybe that doesn't quite work, but yolo
13:12:34 <andythenorth> frosch: 65k objects is enough πŸ˜›
13:12:44 <andythenorth> I'd have to work really hard to generate that many
13:12:52 <andythenorth> I guess I could do them in all company colours
13:13:07 <andythenorth> and steal the 'weathered / faded' company colour alternatives from Horse
13:13:20 <frosch> andythenorth: oh, good point, better not increase the limit, to prevent that πŸ™‚
13:13:26 <andythenorth> that's still only about 16k
13:13:45 <andythenorth> maybe I can read the company 2CC as well, and offer that to players
13:14:03 <andythenorth> might get me to 32k objects
13:14:18 <andythenorth> oh I could do snow / not snow
13:14:21 <andythenorth> that doubles it nicely
13:14:22 <andythenorth> 65k
13:14:28 <andythenorth> well 64k
13:14:32 <frosch> i am not sure, but i think the builder's CC is copied to the object on construction
13:14:42 <frosch> so you can control object color by switing your CC all the time
13:14:45 <andythenorth> there is an option to force 2CC
13:14:59 <andythenorth> oh it's an instance var πŸ˜›
13:15:01 <andythenorth> ?
13:15:05 <andythenorth> that would be funny
13:15:19 <andythenorth> nah it respects current colour
13:16:02 <andythenorth> I've run out of silly ideas now
13:16:23 <frosch> yeah, object colour is defined by building company
13:16:26 <andythenorth> 64k is the most I can reach, and that involves an object for each silly variant, not compressing into 4 views
13:16:38 <frosch> so you can already control object colour by switching your cc before building
13:16:56 <andythenorth> oh I'd have to read the var? and recolour sprite?
13:17:07 <frosch> or in other words: making the colour selectable in the object gui is "just a gui patch", no spec change
13:17:22 <andythenorth> I think it's an interesting idea
13:17:51 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1018148300861472798/unknown.png
13:17:51 <andythenorth> there is room
13:18:02 <frosch> https://github.com/OpenTTD/nml/issues/256 <- would need fixing first ofc πŸ™‚
13:18:21 <frosch> ha, issue 256, how fitting :p
13:22:33 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1018149485148377148/unknown.png
13:22:44 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1018149530648182824/unknown.png
13:23:00 <andythenorth> might be a vertical scroll of menu issue on some viewports
13:23:01 <andythenorth> not sure
13:24:02 <andythenorth> oh the menu can open upwards
13:24:28 <frosch> 16/17 toggle buttons may be nicer
13:24:39 <frosch> you already see the colour result in the preview
13:24:44 <frosch> the bus is not that helpful
13:24:48 <andythenorth> agree
13:25:07 <frosch> not sure how many objects actually use CC
13:25:08 <andythenorth> we use it for planes and trains πŸ™‚
13:25:12 <andythenorth> quite funny the bus
13:25:23 <frosch> if none of the existing objects use CC, i would prefer some a0 flag to enable the color selection
13:25:45 <andythenorth> there's a big existing FIRS / CHIPS object set that uses CC
13:25:50 <andythenorth> I never looked at the others really
13:25:54 <frosch> now... a CC dropdown using the large FISH sprites would be funny :p
13:26:10 <andythenorth> clip it to just the funnel πŸ˜›
13:26:16 <TallTyler> Some of my industry sets have industry tile objects but they're hardcoded to the colour that the industry always uses
13:26:18 <andythenorth> there is some thing about ship recognition by funnels
13:26:23 <andythenorth> like airplanes and the tail logo
13:26:55 <andythenorth> there used to be books of steamships with funnel arrangement and colours
13:27:09 <andythenorth> so you could decide whether to torpedo it or not
13:28:52 <dP> hm, someone is using lzo compression on their server
13:28:56 <dP> and it isn't me :p
13:31:08 <frosch> must be someone who does not know about "apt-get build-dep"
13:38:18 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1018153448660807690/unknown.png
13:38:18 <andythenorth> there can't be 3 views πŸ˜›
13:38:22 <andythenorth> I could fill the 4th with 'random'
13:38:29 <andythenorth> and overlay dice sprites
13:38:53 <andythenorth> the sprites for each view all need to be quite similar, otherwise it's weird to use
13:39:52 <kamnet> andythenorth: Quast65 would split the view into 4 more tiles for random stuff in ISR/DWE Objects.
13:40:40 <EmperorJake> The random DWE objects are very annoying to place when you need a specific one
13:41:13 <kamnet> https://cdn.discordapp.com/attachments/1008473233844097104/1018154181615419392/unknown.png
13:41:21 <EmperorJake> it would be better to have it cycle through a sequence every time you place it but idk if that's possible
13:42:16 <kamnet> Agreed, annoying. Especially when you get charged for every overbuild and you have to click a dozen times or more to get thet tile you want.
13:42:24 <EmperorJake> Luckily trackless tracktype provides a good alternative for diagonal seawalls
13:42:32 <andythenorth> Interesting. Different case to FIRS I think πŸ™‚
13:42:54 <andythenorth> Given I can't nerf the 4th view, might as well just make it pick one of the other 3 randomly
13:43:36 <EmperorJake> Sometimes randomness is good too, for some quick and easy varietyπŸ˜‰
13:45:13 <kamnet> You could make it an empty tyle that you can overbuild.
13:45:31 <andythenorth> that is a good alternative option
13:45:59 <andythenorth> I assume it has to be 1, 2, or 4 views because it's just 2 bits somewhere
13:46:06 <andythenorth> rather than some arbitrary decision
13:47:00 <dP> aren't views supposed to be rotations?
13:48:43 <JGR> Broadly yes
13:49:29 <andythenorth> I suspect that's more theory than reality
13:49:53 <dP> but that would explain 1, 2, 4
13:50:00 <DorpsGek> [OpenTTD/nml] frosch123 opened pull request #267: Fix #256: Objects have a 'colour' in var 47. https://github.com/OpenTTD/nml/pull/267
13:50:58 <nielsm> the map view can't rotate in game, so having views be rotated versions isn't really needed? I'm pretty sure I've seen object sets just using the views for variations over the same thing
13:51:26 <andythenorth> perhaps if there are specific slope variants...
13:51:58 <JGR> Plenty of buildings have a front side
13:52:28 <dP> yeah, grfs use views for all kinds of stuff but I suspect spec was made to force rotations
13:52:36 <frosch> ah, i need to remember that for the next time, someone asks why the map can't be rotated
13:52:46 <JGR> Having that front in one of 4 rotations seems reasonable enough and is consistent with existing GRFs
13:52:53 <dP> it's very newgrf to try and force one specific use in spec
13:52:53 <kamnet> Most object buildings have 2 views since artists are not interested/too lazy to draw backsides of buildings
13:52:59 <frosch> even today newgrf authors spoil any future effort to make the map rotate, by abusing the orientaiton var πŸ™‚
13:53:48 <frosch> dP: no, it's very newgrf for authors to abuse things meant for other things πŸ™‚
13:54:38 <dP> frosch: that's the consequence :p
13:55:28 <JGR> If you did things "properly" you'd run out of IDs and navigating the object list would be even worse
13:57:31 <peter1138> Run out of IDs? Oh dear.
13:58:27 <DorpsGek> [OpenTTD/nml] frosch123 merged pull request #266: Fix: Station animation triggers every 250 ticks, not 256. https://github.com/OpenTTD/nml/pull/266
14:15:50 <dP> hm, weird, python lzo module doesn't want to decompress openttd saves...
14:20:59 *** gelignite has joined #openttd
14:31:20 <andythenorth> More IDs vicar?
14:41:08 <petern> Already?
14:45:34 <petern> Although more tea is probably a good idea.
14:46:26 <petern> @seen belugas
14:46:26 <DorpsGek> petern: belugas was last seen in #openttd 5 years, 23 weeks, 2 days, 18 hours, 27 minutes, and 55 seconds ago: <Belugas> yeah, a birthday :) a good friend of mine!
14:53:31 <petern> He's just been spamming the Give Kudos button on my Strava πŸ™‚
15:09:30 <kamnet> LOL.
15:36:00 <Wolf01> Miss him
15:48:08 <andythenorth> wonder if I can just reuse object IDs in different economies
15:48:26 <andythenorth> highest industry count is 33
15:48:46 <andythenorth> most industries have about 8 sprite layouts
15:58:16 *** sla_ro|master has joined #openttd
16:01:20 <petern> Another cuppa?
16:02:11 <andythenorth> maybe
16:02:30 <andythenorth> it is only a 2 coffee day so far
16:04:56 <andythenorth> ok let's see if I can find the object limit in source πŸ˜›
16:06:05 *** wallabra_ has joined #openttd
16:06:08 <petern> Another beer?
16:06:54 <andythenorth> I try to alternate beer and coffee
16:06:59 <andythenorth> I don't believe in water
16:07:04 <andythenorth> diluting
16:08:12 <DorpsGek> [OpenTTD/nml] glx22 approved pull request #267: Fix #256: Objects have a 'colour' in var 47. https://github.com/OpenTTD/nml/pull/267#pullrequestreview-1103149763
16:09:59 <andythenorth> so is there some object pool?
16:10:04 <andythenorth> and is the ID just an offset into the pool?
16:10:20 *** wallabra has quit IRC (Ping timeout: 480 seconds)
16:10:20 *** wallabra_ is now known as wallabra
16:11:14 <frosch> local ids are not in pools, they are in the override manager
16:11:34 <andythenorth> I found a uint32 global ID
16:11:39 <andythenorth> ObjectID
16:11:55 <andythenorth> and I found ObjectOverrideManager
16:12:49 <andythenorth> https://youtu.be/EsWfh7pz5ag?t=46
16:15:14 <andythenorth> maybe invalid_ID will lead me πŸ˜›
16:16:10 <andythenorth> no that might not be local id
16:16:15 <petern> if (id + numinfo > NUM_OBJECTS_PER_GRF) {
16:17:18 <petern> I guess you might be able to just increase that and see what happens πŸ˜‰
16:18:39 <andythenorth> limited to 255 to allow extending Action3 with an extended byte later on.
16:18:45 <andythenorth> so by design
16:23:47 <petern> Is it later on?
16:23:51 <andythenorth> very
16:23:59 <andythenorth> ok nml expects a byte
16:24:01 <andythenorth> lol
16:24:11 * andythenorth at least can fix that :P
16:25:37 <petern> Sadly because it's limited to 255 currently, the allocation is a bit too simple to just increase that constant.
16:26:31 <petern> Or maybe not, it's an allocate of pointers, that's only 8 bytes each.
16:26:55 <andythenorth> I could just work around it for FIRS, there are ways. But then there are all these other object sets spanning multiple grfs πŸ˜›
16:26:56 <petern> Do we still run on 386s?
16:26:59 <andythenorth> yes
16:27:03 <andythenorth> I have an ARM 386
16:27:06 <petern> (with 4MB)
16:27:38 <andythenorth> DOS Extended Mode?
16:27:48 <petern> Hmm, can I play on my Fitbit?
16:29:09 <andythenorth> the object GUI might not fit
16:32:25 <andythenorth> glx[d]: nml seems to have object IDs as a byte somewhere.
16:32:33 <andythenorth> I already changed ` BlockAllocation(0, 0xFFFF, "Object")`
16:33:03 <andythenorth> FIRS failing on prepare_byte though
16:34:33 <frosch> check action3.py
16:34:48 <frosch> it will write a byte instead of byte_ext somewhere
16:35:00 <frosch> there should be a check for vehicles, which needs to be extended for objects
16:35:34 <andythenorth> thanks
16:35:50 <andythenorth> L67
16:35:56 <frosch> not sure whether it could write byte_ext in all cases
16:36:08 <frosch> maybe some feature is messed up to allow id 255 :p
16:36:38 <petern> Probably stations ;D
16:37:15 <andythenorth> "Expected 17 bytes to be written to sprite, got 15"
16:37:18 <andythenorth> lolz continue
16:37:35 <petern> Hmm, OpenTTD reads an extended byte regardless of the feature, so should be fine.
16:37:38 <andythenorth> more conditions πŸ™‚
16:38:13 <glx[d]> for this error you need to check the relevant "get_size()"
16:38:22 <andythenorth> fixed it for now
16:38:30 <andythenorth> ` file.print_varx(self.id, 3 if (self.feature <= 3 or self.feature == 0x0F) else 1)
16:38:30 <andythenorth> `
16:40:00 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1018199175294365827/unknown.png
16:40:00 <andythenorth> progress
16:40:33 <frosch> https://github.com/OpenTTD/OpenTTD/blob/master/src/newgrf.cpp#L5702 <- most features read a byte
16:40:50 <glx[d]> a size is wrong somewhere andythenorth
16:41:14 <andythenorth> πŸ™‚
16:41:42 <petern> Oh I was looking at the wrong action, silly.
16:41:59 <glx[d]> and the nml message you got is one of the checks to ensure the correct size is written
16:42:42 <glx[d]> but it seems openttd didn't read a value as you would expect it
16:43:39 <frosch> looks like all *_PER_GRF constants are < 256, so we could change it to ext.byte everywhere
16:44:11 <frosch> fewer stupid feature-specific exception lists πŸ™‚
16:45:19 <andythenorth> 'quickly add objects to FIRS' -> refactor nml, patch OpenTTD πŸ˜›
16:45:28 <andythenorth> then update the grf spec tracker πŸ˜›
16:46:52 <kamnet> This sounds like a bad feature already...
16:47:16 <DorpsGek> [OpenTTD/nml] frosch123 merged pull request #267: Fix #256: Objects have a 'colour' in var 47. https://github.com/OpenTTD/nml/pull/267
16:47:21 <DorpsGek> [OpenTTD/nml] frosch123 closed issue #256: Object company_colour variable points to wrong NFO variable number https://github.com/OpenTTD/nml/issues/256
16:48:42 <DorpsGek> [OpenTTD/OpenTTD] PeterN merged pull request #10014: Fix: DrawStringMultiLine() could overdraw https://github.com/OpenTTD/OpenTTD/pull/10014
16:57:12 <dP> Checked some savegame sizes:
16:57:12 <dP> default save - 1.3 Mb
16:57:12 <dP> without trees - 155 Kb
16:57:12 <dP> without trees and rough ground - 126 Kb
16:57:12 <dP> without trees, rocks, and rough ground - 103 Kb
16:57:19 <dP> all the eyecandy entropy...
16:57:56 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1018203686553534646/unknown.png
16:57:56 <andythenorth> ok I will learn how to objects > 1x1 tiles πŸ˜›
16:58:20 <andythenorth> maybe the ID limit matures while I do that πŸ˜›
16:58:53 <andythenorth> dP: do grf trees, just a byte offsetting into pre-composed sprites
16:58:56 <andythenorth> scrap all the true random
16:59:21 <andythenorth> nobody will notice, pre-composing is enough
16:59:56 <dP> need to figure out how to do that without grfs first
17:00:14 <andythenorth> embed grf in basegame πŸ˜›
17:00:40 <dP> embedding is not a problem but trees grow and spread and stuff
17:00:56 <nielsm> do away with trees dying, change tile tree level to a 0..63 byte indicating how close to having four fully grown trees the tile has
17:01:24 <nielsm> so a large forest on the map will just be filled with all tiles of the same value, "fully grown forest"
17:03:39 <nielsm> but would also have to make "tree types" simpler, maybe group into "forest type" as "coniferous", "broadleaf", "mixed", "tropical" (rainforest or cactus depending on underlying terrain)
17:03:54 <andythenorth> aren't trees bugged anyway?
17:04:07 <andythenorth> I'm sure there was something weird, like they all die or something
17:05:01 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1018205469065617558/unknown.png
17:05:01 <andythenorth> yeah my 90 year game, only trees left are under the cursor
17:05:13 <nielsm> and the specific tree composition on a tile would only be tied to the tile index
17:05:15 <andythenorth> trees die, nobody notices or reports it
17:05:54 <andythenorth> 'probably fine'
17:06:50 <nielsm> or maybe rather, the "forest types" would be defined per climate, and a trees newgrf could replace the forest types
17:06:54 <dP> I did add some settings recently that save trees
17:08:40 <dP> I kinda like that all trees are always available
17:08:53 <dP> and don't like climate-dependant stuff in general
17:09:29 <dP> imo climate is nice as a map generationg but not as a part of storage specifics
17:10:09 <dP> basically, biomes ftw
17:14:52 <petern> Sure, awaiting your PR.
17:16:28 <petern> Okay, finally finished Disenchantment, what's next.
17:56:50 <andythenorth> rewatch all of The Sweeney?
17:59:08 <petern> Maybe the new LOTR thing.
17:59:56 <andythenorth> Rings of Power?
18:00:01 <petern> Or I could continue ST:TNG
18:00:07 <andythenorth> advert just literally came up at the start of The Sweeney πŸ˜›
18:08:15 <petern> Another beer?
18:09:28 <andythenorth> it's time
18:11:51 <LordAro> http://ipv4.games/
18:44:52 *** Wormnest has joined #openttd
18:52:15 <andythenorth> hmm
18:52:27 <andythenorth> I thought I had a cargo id manager in FIRS I could copy for object ids πŸ˜›
18:52:30 <andythenorth> "I don't"
18:52:43 <andythenorth> some kind of weird getting ids in loops, passing stuff around
19:01:19 <andythenorth> hmm
19:01:28 <andythenorth> yeah FIRS is ass backwards
19:01:33 <andythenorth> although it makes sense for how it got here
19:01:41 <Wolf01> petern: I just finished Stargate SG1 :P
19:01:54 <andythenorth> sometimes it's a long path to end up where you should be, next to where you started πŸ˜›
19:02:39 *** Tirili has joined #openttd
19:11:11 <petern> back asswards
19:11:45 <petern> [build] Previous IPDB and IOBJ mismatch, fall back to full compilation.
19:11:50 <andythenorth> not refactoring it just to put some objects in neatly πŸ˜›
19:11:56 <andythenorth> they can be un-neat
19:11:57 <petern> Seems to be occurring every time I build now 😦
19:27:46 <petern> Hmm, okay, this font y offset stuff is messing with the existing ascenders stuff.
19:31:40 <LordAro> Wolf01: now Atlantis & Universe?
19:53:07 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
19:56:52 *** HerzogDeXtEr has joined #openttd
20:13:04 <frosch> there is so much wtf in DrawStationTile
20:13:09 <frosch> i may have to look at ttdp again
20:19:02 <andythenorth> ha
20:21:47 <frosch> ttdp looks fine, someone was drunk when coding ottd
20:25:28 <andythenorth> happens πŸ™‚
20:26:10 <frosch> glx[d]: i guess nml should enforce an even number of spritelayouts
20:26:14 <frosch> otherwise ottd will just crash
20:26:22 <frosch> or maybe ottd should enforce it? :p
20:28:00 <glx[d]> I can add that to nml, but ottd should not crash
20:29:31 <petern> "someone"
20:31:38 <glx[d]> hmm but nml already does this check "elif isinstance(layouts, expression.Array) and len(layouts.values) % 2 == 0:" else error is "'{}' must be an array of even length, or the ID of a station"
20:32:34 <frosch> ah, in action3.py
20:32:42 <frosch> i was only looking in action0 and action2layout
20:32:59 <glx[d]> it's a "callback"
20:33:30 <glx[d]> to work around station specs
20:34:44 <glx[d]> while keeping the nml flow
20:34:52 <frosch> i had another question: does prepare_layout have to be a function?
20:34:59 <frosch> it's a function in the chips examples
20:35:42 <glx[d]> it can be a switch, or just inline IIRC
20:35:54 <glx[d]> but I can check quickly
20:37:18 <frosch> petern: https://github.com/OpenTTD/OpenTTD/commit/a7a194c4df25659ef71a2fd4c257a73428b4f837#diff-0e75a3f5b201503c6ada0a6ef0ef5f0668eb5395c06adc9ea68f68c12a4b4c6bR596 <- surely you remember what that 0x2110000 was for πŸ™‚
20:38:12 <petern> Platforms/Length, IIRC πŸ™‚
20:40:03 <frosch> ah, impressive, that's plausible
20:40:30 <frosch> callback 14 and 24 are easy to confuse
20:40:53 <frosch> cb24 indeed has that var10 meaning, but here cb14 is called
20:41:31 <andythenorth> hmm giving an object 3 views gets me 1 in game πŸ˜›
20:42:23 <andythenorth> nmlc info: Object items: 74/256
20:44:29 <glx[d]> hmm I use parse for prepare_layout, but I should have used parse_expr
20:44:36 <glx[d]> I think
20:45:31 <petern> The resolvers were very different back then, there was "enough" to get basic vehicles working but nothing else. So many rewrites as it came together, not surprising some mistakes got left in.
20:46:45 <glx[d]> and I guess nml should create an intermediate proc call if it's not a spritegroup_ref
20:47:24 <frosch> haha, i just wanted to write some docs :p
20:47:36 <petern> The other major TTDPatch contributor at the time got into a right state once when I was able to get some stations working in OpenTTD, as TTDPatch was still a competitive concern back then.
20:47:51 <petern> Can't remember their nick any more.
20:48:10 <frosch> oh, i know who from the description πŸ™‚
20:48:49 <petern> Oh it came to me. Oskar.
20:48:57 <frosch> yes, typical german
20:49:38 <andythenorth> ok so when there's 4 spritelayouts each of quite unique graphics, it's better do 4 objects with 1 view
20:49:52 <andythenorth> this retro id-saving nonsense of compressing them into 1 object 4 views is silly
20:50:08 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1018262117348024380/unknown.png
20:50:26 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1018262197832523856/unknown.png
20:50:26 <andythenorth> this is better
20:50:46 <frosch> what exactly is that thing in the topleft?
20:50:53 <frosch> is that a real building from firs?
20:50:54 <andythenorth> lime kiln
20:51:04 <frosch> or is it usually hidden behind other buildings?
20:51:05 <andythenorth> super realism!
20:51:10 <glx[d]> frosch: just say "expression" πŸ™‚
20:51:14 <andythenorth> usually it's combined with the tower thing
20:52:06 <frosch> andythenorth: it looks like one of these dutch houses, which can float up/down on a pole, when there is flooding
20:52:22 <frosch> illustrated with the house in multiple positions
20:53:16 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1018262908368588880/1._Tunstead_Kilns.jpg
20:53:16 <andythenorth> unbridled realism πŸ˜›
20:54:11 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1018263139885789184/unknown.png
20:54:11 <andythenorth> am I supposed to be using these object classname thingies?
20:54:16 <andythenorth> I could do a class per industry
20:54:26 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1018263202825502790/unknown.png
20:54:26 <andythenorth> this is confusing
21:01:29 <andythenorth> oo str.zfill()
21:01:31 <andythenorth> new
21:01:33 <andythenorth> to me
21:01:45 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1018265046213730334/unknown.png
21:02:05 <andythenorth> the "class" things are now just the industry numeric ID, padded to 4 chars with zfill πŸ˜›
21:02:11 <andythenorth> duck tape
21:02:15 <petern> Okay that was a silly rabbit hole.
21:03:11 <andythenorth> oh doing it as classnames makes the filter work
21:03:30 <andythenorth> ok the filter isn't actually broken, it's just meaningless
21:03:46 <petern> It just filters classes I bet?
21:04:11 <andythenorth> yes
21:04:23 <andythenorth> so if you want to find the things that are...hidden behind the classes
21:04:25 <andythenorth> nope
21:04:40 <andythenorth> it's like a windows find tool that only gets you folders not files
21:04:49 <frosch> it should probably filter on both
21:05:25 <frosch> settings gui filter shows single settings which match. but if tree nodes match, it shows all subordinate settings
21:05:26 <andythenorth> probably πŸ™‚
21:05:33 <andythenorth> also nobody needs 'string' πŸ™‚
21:05:39 <andythenorth> even I could patch that probably
21:05:41 <andythenorth> but eh
21:05:53 <andythenorth> where are our new contribs?
21:09:24 <andythenorth> ok let's see how fast I run out of IDs this way
21:09:55 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1018267099723989092/unknown.png
21:09:55 <andythenorth> this seems like a reasonable case for using views?
21:10:09 <andythenorth> same building, different units
21:12:08 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:15:14 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1018268437321097237/object_gui_lol_2_720p.mov
21:15:14 <andythenorth> ha
21:16:11 <andythenorth> reminds me of my game coding days πŸ˜›
21:16:26 <andythenorth> something is not being measured somewhere πŸ˜›
21:16:39 <andythenorth> I guess the UI has some relayout function?
21:17:09 <petern> Lots of it
21:17:29 <andythenorth> perhaps an excess here πŸ™‚
21:18:57 <DorpsGek> [OpenTTD/OpenTTD] frosch123 opened pull request #10017: Fix weirdness of new stations. https://github.com/OpenTTD/OpenTTD/pull/10017
21:20:30 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1018269764491169812/unknown.png
21:20:30 <andythenorth> pretty convinced this is a more usable way to organise
21:20:41 <andythenorth> pretty certain someone is going to complain on the internet though πŸ˜›
21:20:48 <andythenorth> it's not the normal object grf way
21:21:08 <andythenorth> it's a bit like when cargo labels were considered precious
21:21:15 <andythenorth> and should have lots of meanings packed into them
21:22:01 <frosch> the internet will probably complain that you do not use a separate object grf
21:22:11 <frosch> but use the monopoly of FIRS to force your objects onto everyone
21:22:20 <frosch> and hide object grfs of smaller creators
21:22:36 <andythenorth> oh yes
21:22:38 <andythenorth> that
21:22:55 <andythenorth> I should probably pre-pend FIRS to all the classnames eh
21:22:57 <frosch> i see some legal actions from antitrust agencies
21:23:03 <andythenorth> otherwise they will be weirdly interleaved
21:23:45 <frosch> hmm, i think i have seen that in other object grfs
21:23:50 <frosch> prepending things with "VAST:" etc
21:23:56 <frosch> maybe same for station grfs
21:24:17 <DorpsGek> [OpenTTD/OpenTTD] ldpl opened pull request #10018: Codechange: Don't store tree counter in the map array https://github.com/OpenTTD/OpenTTD/pull/10018
21:24:49 <andythenorth> should I prepend "HORSE" to all trains too πŸ™‚
21:25:47 <frosch> the vehicle purchase list seems to be sorted by newgrf usually
21:25:58 <frosch> not sure how guaranteed that result is
21:26:06 <frosch> or whether it's just a "usually" thing
21:26:41 <frosch> i guess if you change newgrf in-game and they add more engines than before, they will be pushed to the end
21:32:38 <andythenorth> nmlc info: Object items: 100/256
21:37:23 <andythenorth> nmlc info: Object items: 107/256
21:37:29 <andythenorth> hmm, might squeak in under 256
21:37:40 <andythenorth> or I just make the ID reset per economy
21:41:49 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
21:45:31 <DorpsGek> [OpenTTD/nml] glx22 opened pull request #268: Change: allow any expression for station (purchase_)prepare_layout https://github.com/OpenTTD/nml/pull/268
21:49:25 <dP> is the game progressing in regression?
21:49:51 <dP> random state seems to blow up even though I'm not changing on map generation
21:52:53 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1018277914904629419/unknown.png
21:52:53 <andythenorth> stupid idea πŸ˜› add objects to existing company colour choices πŸ˜›
21:53:20 <glx[d]> the time can pass differently if you add checks in regression
21:53:36 <dP> dP: ah, I forgot it runs tile loop on map generation
21:53:54 *** ChanServ sets mode: +v DorpsGek
21:53:54 *** ChanServ sets mode: +v orudge
21:54:10 <dP> it's kind of pointless to check random things in regression then
21:54:17 <glx[d]> regression check is a load and play with an AI
21:57:46 <DorpsGek> [OpenTTD/OpenTTD] glx22 approved pull request #10017: Fix weirdness of new stations. https://github.com/OpenTTD/OpenTTD/pull/10017#pullrequestreview-1103179871
21:58:21 <frosch> https://cdn.discordapp.com/attachments/1008473233844097104/1018279287163465788/station_gfx.dot.png
21:58:21 <frosch> useful for docs, or as confusing as the refit magic? :p
21:59:50 <frosch> https://cdn.discordapp.com/attachments/1008473233844097104/1018279661253439538/station_gfx.dot.png
21:59:50 <frosch> updated
22:01:49 <glx[d]> oh you can add little/lot mechanisme -> spriteset after the spritegroup πŸ™‚
22:02:30 <andythenorth> I'm hoping I can never see little/lot again 😦
22:03:12 <dP> ehm, is that normal? xD
22:03:12 <dP> https://github.com/OpenTTD/OpenTTD/blob/master/regression/regression/result.txt#L9562
22:03:32 <frosch> https://cdn.discordapp.com/attachments/1008473233844097104/1018280591671693362/station_gfx.dot.png
22:03:32 <frosch> fine, more arrows πŸ™‚
22:03:59 <frosch> dP: changing random seeds?
22:04:24 <glx[d]> regression script dies when finished
22:04:47 <dP> frosch: I mean `ERROR: The script died unexpectedly.`
22:05:41 <dP> but yeah, I changed random a bit so regression just blows up, I guess I'll replace it and be done as it looks sufficiently random :p
22:11:59 <frosch> glx[d]: prepare_layout and custom are run in the same callback, so use the same temporary registers. how shall i document that? (a) values stored with STORE_TEMP in prepare_layout may be used in LOAD_TEMP in default (b) prepare_layout and default must not use the same registers for LOAD/STORE_TEMP?
22:12:34 <frosch> i.e. allow passing data from prepare_layout to default, or hide it?
22:15:29 <glx[d]> custom is executed before prepare IIRC
22:16:00 <glx[d]> I need to check my gist
22:16:45 <frosch> i read action3.py as: prepare_layout is called before branching on var10, is it is run for all default, custom and foundations
22:16:50 <glx[d]> ah no, prepare is done before
22:16:52 <frosch> (i'll not mention foundations :))
22:17:00 <glx[d]> then custom is selected
22:19:05 *** sla_ro|master has quit IRC ()
22:19:11 <glx[d]> I think mentioning that registers are shared between prepare and custom (and maybe foundations too) should be enough
22:19:56 <glx[d]> then users will do what they want based on the info
22:20:32 <dP> nice tests :p
22:20:32 <dP> RandRange(2): 1
22:20:32 <dP> RandRange(2): 1
22:20:32 <dP> RandRange(2): 1
22:23:02 <glx[d]> the main use for prepare is to fill the registers mentioned in the sprite layout, but it can also fill registers used in custom or foundations
22:23:17 <frosch> hmm, i guess authors may also use STORE_TEMP in cargo-specific switches, and use the result in a cargo-independent layout
22:23:18 <glx[d]> if users needs it
22:23:42 <frosch> hmm, no, ignore that
22:23:50 <frosch> that's too complicated with var10 stuff
22:24:03 <frosch> it's better if all registers are the same for all var10 values
22:24:19 <frosch> so, better to say: do not use STORE_TEMP in default or custom_spritsets πŸ™‚
22:25:21 <glx[d]> should not be an issue to use STORE_TEMP there
22:26:09 <DorpsGek> [OpenTTD/OpenTTD] ldpl updated pull request #10018: Codechange: Don't store tree counter in the map array https://github.com/OpenTTD/OpenTTD/pull/10018
22:26:19 <andythenorth> hmm can't substring a raw TTD string
22:26:28 <andythenorth> maybe if I used the text stack πŸ˜›
22:26:38 <glx[d]> it won't have any effect, as registers used in the layout are filled right after prepare
22:26:41 <andythenorth> probably can't text stack in an action 0
22:27:41 <frosch> oh, you mean the layout will always use nml-allocated registers?
22:27:59 <frosch> if i use LOAD_TEMP(0) in the layout, the value will be copied to another register in the beginning
22:28:10 <glx[d]> exactly
22:28:52 <frosch> nice, then there is no issue. i assumed i had to document some magic πŸ™‚
22:30:18 <glx[d]> all this was already done for industry tile and objects I think
22:36:11 <andythenorth> hmm ~215 object IDs so far
22:36:25 <andythenorth> for the subset of industries I gave objects to
22:37:17 <frosch> oh, i missed "purchase" in the dot graph :p
22:38:30 <frosch> luckily no purchase_custom_spritesets πŸ™‚
22:46:36 <andythenorth> wonder if I'll be able to generate stations as trivially as objects
22:47:07 <andythenorth> dunno if industry tiles make sense as stations
22:47:32 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1018291666215510077/unknown.png
22:47:50 <andythenorth> mix of industry, objects, stations
22:49:12 <frosch> you want to expose the same sprites as industries, objects and stations? :p
22:50:50 <glx[d]> hmm it seems some LOAD_TEMP registers may end up in the layout
22:51:40 <glx[d]> https://gist.github.com/glx22/9ac3eec2dbd7dd58abae92c780b7c138 <-- nml and nfo side by side
23:14:02 <glx[d]> frosch: after analysing the nfo output in my chips test it seems register 0 is accessed directly in the layout if LOAD_TEMP(0) is the reduced expression for the register value
23:14:58 <glx[d]> like yoffset: LOAD_TEMP(6); or sprite: CUSTOM(1, 0 + LOAD_TEMP(7));
23:15:07 <frosch> so default/purchase/custom_spriteset should better not use STORE_TEMP πŸ™‚
23:16:59 <glx[d]> https://github.com/OpenTTD/nml/blob/master/nml/actions/action2layout.py#L209-L220
23:17:17 <glx[d]> it's a special case
23:18:03 <glx[d]> from https://github.com/OpenTTD/nml/commit/3010e45561fb97a366675f391210996fa4eaf6ea
23:18:55 *** esselfe has quit IRC (Remote host closed the connection)
23:18:58 <glx[d]> maybe I should disable that for stations, just to be safe
23:20:18 <frosch> sounds reasonable, stations do a lot of useless operations anyway, so that optimisation may not be worth it
23:20:58 <frosch> https://cdn.discordapp.com/attachments/1008473233844097104/1018300078294847579/station_gfx.dot.png
23:20:58 <frosch> current status: not sure whether to make the callbacks green, or the other reserved words
23:21:47 *** Flygon has quit IRC (Read error: Connection reset by peer)
23:25:47 *** esselfe has joined #openttd
23:29:43 <DorpsGek> [OpenTTD/nml] glx22 updated pull request #268: Change: allow any expression for station (purchase_)prepare_layout https://github.com/OpenTTD/nml/pull/268
23:32:38 <DorpsGek> [OpenTTD/nml] glx22 updated pull request #268: Change: allow any expression for station (purchase_)prepare_layout https://github.com/OpenTTD/nml/pull/268
23:35:11 <glx[d]> spritelayou may also have direct references to spritesets