IRC logs for #openttd on OFTC at 2023-09-26
β΄ go to previous day
02:38:40 *** debdog has quit IRC (Ping timeout: 480 seconds)
04:29:25 *** D-HUND is now known as debdog
05:56:23 <merni> if that actually works and gets merged I'd be so happy
05:59:48 <truebrain> Following a template is still the hardest thing in the world .. why is there an uptake in that? I wonder if we can reinforce the need to follow the template better .. harsher wording? Hmmm ...
06:00:18 <truebrain> Anyway, seems peter1138 has some competition on the same subject in regards to that setting π
06:00:25 <LordAro> banhammer truebrain incoming
06:01:33 <truebrain> Well, we can just autoclose PRs that fail the basics π but I rather check how we can make people more aware they should follow it π
06:03:34 <merni> The commit message follows the format though
06:04:05 <truebrain> Yeah, kinda. But it just makes it harder for no reason
06:04:14 <merni> Maybe that could be clarified
06:04:35 <truebrain> Least worried about PR title tbh
06:04:51 <truebrain> Chances of people reading that document is low anyway π
06:06:07 <LordAro> i suppose they could've used a cli to create it
06:06:25 <merni> Would it be possible to create a form like there is for issues?
06:06:39 <truebrain> LordAro: Possible.. would be weird if GitHub didn't present the template there
06:06:42 <merni> That way it can't be bypassed
06:06:50 <truebrain> merni: Nope ..... sadly π¦
06:07:36 <LordAro> truebrain: depends on the xli
06:07:53 <LordAro> there are plenty out there, official or otherwise
06:08:33 <truebrain> I guess .. but when we ask people to fill in the template, it reads to me that people actually knew they removed it the first time
06:39:26 * andythenorth looks at the template
06:39:57 <andythenorth> unrelated, but in the 'Checklist for review' section, will it take the GH 'list as checkable checkboxes' format?
07:09:12 <andythenorth> oops I should read more spec
07:09:30 <andythenorth> `orientation_ne_sw` in my code, but `GROUNDSPRITE_RAIL_X` in nml
07:09:45 <andythenorth> I'll have to write some code π
07:10:08 <andythenorth> can't just append `${orientation_suffix}`
07:12:15 <andythenorth> lol I could do it python 2 style π `sprite: GROUNDSPRITE_RAIL_${{'ne_sw': 'X', 'nw_se': 'Y'}[orientation]};`
07:12:31 <andythenorth> as though ternary doesn't exist
07:13:24 <andythenorth> `GROUNDSPRITE_RAIL_${'X' if orientation == 'ne_sw' else 'Y'};` might be less weird eh
07:14:17 <ahyangyi> The dict implementation looks more readable for me
07:14:40 <ahyangyi> leave the ternary for silly stuff like `return None if x is None else x**2+1`
07:25:55 <andythenorth> that's interesting, most people who see the dict implementation are like 'lolwut?'
07:32:26 <locosage> GROUNDSPRITE_RAIL_CONSTANT[orientation]
07:33:55 <locosage> but for silly options there ai also 'XY'[orientation=='ne_se']
07:34:30 <andythenorth> `spritelayout.resolve_ground_sprite_constant(orientation)` π
07:34:44 <andythenorth> wonder how many abstractions I could add
07:35:28 <andythenorth> `global_constants.ground_sprite_orientation_mapping[orientation]`
07:35:48 <andythenorth> locosage: this one is good
07:37:10 <andythenorth> nah `[False, True][True]`
07:42:15 <ahyangyi> We can use all solutions at once:
07:42:15 <ahyangyi> `"XY"[{False: True, True: False}[False if orientation[True]=='error'[False] else True]]`
07:45:18 <locosage> one mory for you to use :p `chr(88 + (orientation == 'ne_se'))`
07:51:43 <locosage> oh, and this one: `orientation == 'ne_sw' and 'X' or 'Y'`
07:53:55 <ahyangyi> oh, that shell-like one is cute π
07:54:00 <peter1138> If you're happy and you know clap your MBP
07:55:40 <ahyangyi> Will the bananas fall off my MBP when I clap it?
07:56:05 <peter1138> Only if you ask nicely.
09:09:00 <andythenorth> ok so best way to set ground sprite to: baseset track X | baseset track Y | full-tile sprite from CHIPS
09:09:17 <andythenorth> custom_spriteset, and the switch checks the vars for track bits?
09:09:35 * andythenorth checking there's no built-in magic
09:11:30 <Eddi|zuHause> are there vars for trackbits?
09:13:56 <andythenorth> that might be neighbouring tiles only, not sure
09:14:11 <Eddi|zuHause> that should be the next tile
09:16:02 <andythenorth> otherwise maybe I have to read tile_type
09:16:12 <andythenorth> and then just know which tile_types are track or not
09:17:03 <andythenorth> or I just hard-code the return values, and make lots of unique switches
09:18:53 <peter1138> Oops, I broke the law :(
09:19:04 <Eddi|zuHause> difficult not to.
09:19:26 <peter1138> I put a <div> inside a <ul> without an <li>
09:19:50 <Eddi|zuHause> how could you! think of the children!
09:30:39 <andythenorth> peter1138: naughty
09:30:57 <andythenorth> probably rendered fine anyway?
09:31:33 <peter1138> It did. In fact it renders wrong when it's right...
09:34:32 <peter1138> Anyway, true to form, I've optimised the layout and styles so that it does not need filling with tons of classes. Just for this bit.
09:36:26 <peter1138> Such classes... `<li class="active"><a href="/">Home</a></li>`
10:05:25 <Eddi|zuHause> nobody could ever explain to me why hyperlinks are called "<a>"
10:07:53 <andythenorth> keep fighting the anti-classes π
10:08:12 <andythenorth> I made my peace with it years ago, explicit classes are how we control formatting
10:08:25 <andythenorth> not inferring things from the parent-child hiearchy and doing algebra
10:08:54 <andythenorth> eh I should STFU, or someone will ask me to redo Bananas UI
10:10:59 <locosage> Eddi|zuHause: Anchor
10:11:32 <Eddi|zuHause> how is that an explanation
10:12:55 <andythenorth> ```What is a hyperlink?
10:12:55 <andythenorth> Back in the days of websites, long before The Web App Space, a boffin called Tim Berners-Lee invented something called the "anchor", which looked like <a> and was a type of HTML element. It was called an "anchor" because it took you to places much like a boat would. Tim Berners-Lee often sailed boats into Switzerland to visit the LHC, you see.```
10:13:07 <andythenorth> this may be invented history, not sure
10:14:20 <andythenorth> sounds like retcon / trolling to me
10:14:29 <andythenorth> we could ask Tim Berners Lee?
10:14:34 <andythenorth> he answers mail I think
10:14:49 <andythenorth> he once left a bug report on one of our web apps, in public
10:22:10 <ketsuban[d]> That's a pretty bogus etymology (anchors were points on a single page which you could travel to by clicking links) but yeah that *is* why the "hyperlink" element is <a>.
10:24:56 <Eddi|zuHause> that page also doesn't explain it.
10:25:17 <andythenorth> I hope it was related to Choose Your Own Adventure books
10:25:44 <andythenorth> ideally the whole thing was planted as a hypertext troll, to cause people to research it
10:26:36 <andythenorth> "I will call it anchor, so in future people will make up narratives about why"
10:27:19 <Eddi|zuHause> i get that anchor is a special kind of link. but that in no way explains the name of the tag
10:39:19 <peter1138> Well, see, "a" is short for "anchor"...
10:53:35 <andythenorth> I reckon <a> is because a is the first letter of the alphabet
10:53:40 <andythenorth> and everything else is retconned
10:53:53 <andythenorth> I suspect the tags were <a>, <b>, <c> etc
10:54:09 <andythenorth> like variable names in truly optimised code
10:54:43 <peter1138> Not to be confused with <em> for em-dash.
10:55:58 <peter1138> And <h> for hyp-hen.
10:56:12 <kamnet> Has anybody else successfully used the Dependencies box on Bananas?
10:56:27 <andythenorth> SELF CLOSING TAG
10:57:17 <_glx_> IIRC dep box is only for grfs
10:57:38 <_glx_> Other types are autofill
10:58:39 <peter1138> Remember when they tried to make HTML XML and then gave up?
10:58:52 <kamnet> It is a huge PITA to go find the full Content ID for 30 NewGRFs.
10:59:09 <peter1138> But we're left with <br /> and <hr /> etc...
11:00:37 <peter1138> andythenorth, breakfast salad time?
11:00:47 <andythenorth> yes breakfast salad cheese
11:01:06 <andythenorth> it's important to fill the gap before the next allowed coffee
11:01:26 <kamnet> my breakfast was Cincinnati-style 3-way chili.
11:10:15 <kamnet> YES! "AuzObjects 1-Click Downloader" works as expected!
11:11:32 <kamnet> truebrain: *chefs kiss*
11:15:51 <truebrain> I have no clue what I did, but you are welcome? π
11:16:39 <brickblock19280> grf collections when?
11:16:55 <truebrain> also include settings etc with it π
11:17:02 <brickblock19280> where is your source?
11:18:30 <kamnet> Oh I should post that somewhere. The source is really nothing, I borrowed a template from GarryG that makes a throwaway object. I could probably use something much more simple but I'm too lazy to figure it out LOL
11:20:04 <peter1138> Given you can have NewGRFs with just a GRF Info, that seems excessive.
11:20:34 <peter1138> (All those silly separator GRFs...)
11:20:46 <brickblock19280> that won't show up with object on bananas tho
11:22:57 <peter1138> Does it need to? Given it has "AuzObjects" in the name, just searching for "object" will show it.
11:26:07 <kamnet> brickblock19280: Why wouldn't it?
11:26:07 <kamnet> Content Id newgrf/4b464155
11:26:11 <kamnet> AU Australia / Australia and New Zealand / Oceania
11:26:13 <kamnet> Name AuzObjects 1-Click Downloader
11:26:56 <brickblock19280> It is only classified as an object if it has objects
11:27:27 <truebrain> search also look in the name; so even if it isn't an object set, it will still find it?
11:28:19 <kamnet> peter1138: Right but if the file is not, in fact, an object then it will not show up as "Objects" under the set filter. But, not an issue with mine.
11:28:22 <truebrain> (just rewording what peter1138 says, as I too, am confused π )
11:29:17 <truebrain> kamnet: but the actual object GRFs are .. having this "collection" GRF show up there sounds confusing?
11:29:56 <peter1138> (Also, version 2026-09-26, lol :D)
11:30:02 <brickblock19280> It wouldn't work on the website
11:30:24 <truebrain> as people filtering for the type "objects" want to see what is available .. and this specific "fake" GRF is just for people to easier install it in-game?
11:30:54 <kamnet> Yes, so they don't have to click on 30+ files.
11:31:05 <truebrain> yes ... but why does it need to be an object GRF for that?
11:31:19 <truebrain> as either you are in-game, you search for objects, you find this GRF, and are like: cool!
11:31:25 <truebrain> or you are on the website, and don't care about this GRF?
11:31:58 <truebrain> worded differently, say, in a weird world, OpenTTD would support "collections" GRFs
11:32:04 <truebrain> they would be in their own "set" type
11:32:09 <truebrain> right? As that would make most sense?
11:32:35 <brickblock19280> yes that would be best and prompted my grf collections comment
11:32:54 <peter1138> Searching by tag on the website is not useful for this GRF, because downloading it will only download the single GRF...
11:33:12 <kamnet> Yes, that would make sense. I just went with "object" because I just needed something I could edit quickly and not fluff around with because my brain is too soft to recall all the NML and NFO I've forgotten.
11:33:24 <peter1138> But kamnet is in the future, maybe in 3 years time we'll have collections? :D
11:33:36 <truebrain> and after all, this is a consequence of not having presets, I guess .. people will hack around the system to simulate a similar experience π
11:33:47 <peter1138> (I just noticed the Updated date says 2026 too)
11:34:36 <truebrain> kamnet: if you like btw, you can grab one of those annoying "category" GRFs if you need an empty template π
11:34:39 <truebrain> but I get your choice here π
11:35:15 <peter1138> It's an erroneous choice. Btw, nobody is complaining, just... confused and intrigued :D
11:35:16 *** KenjiE20 has quit IRC (Remote host closed the connection)
11:35:37 <truebrain> well worded peter1138 π
11:36:01 *** KenjiE20 has joined #openttd
11:36:12 <brickblock19280> Can I make a grf to require that grf?
11:36:17 <kamnet> peter1138: You can't download files from the website anymore, though.
11:36:28 <truebrain> brickblock19280: you sir, can do ANYTHING you set your mind to
11:36:30 <peter1138> kamnet, so even less relevant for it to be tagged Object :)
11:36:59 <brickblock19280> I still use the website to find grfs
11:37:09 <kamnet> But IIRC, the same system that sorts stuff on the website also sorts it in the game.
11:37:27 <truebrain> it does generate tags however
11:37:34 <truebrain> but searching in-game is a lot better than on the website
11:37:50 <truebrain> what you see on the website as filters, are added as tags in the client
11:37:57 <truebrain> and searching in-game searches in names, tags, ...
11:38:15 <truebrain> it is far from ideal, either system, but .. nobody is improving it π
11:38:50 <peter1138> In-game needs could do with a basic content type filter to start with...
11:39:22 <truebrain> I would prefer to have "presets" first, honestly π Would solve most of the issues anyway π
11:39:50 <peter1138> You know where the source is ;)
11:40:07 <truebrain> sadly, I do .. now to find time to act on that knowledge!
11:40:36 <kamnet> brickblock19280: And bananas now updated with a url to link to the source code. Thank you for reminding me.
11:41:29 <peter1138> andythenorth, I might have to start complaining about scss/sass compile times...
11:41:40 <truebrain> it took more than 2 seconds?!
11:42:10 <andythenorth> is it compiling on the host via a shell process, or in js?
11:42:28 <truebrain> owh my .... unacceptable
11:42:34 <andythenorth> that is quite high
11:42:37 <peter1138> Precompiled as part of the build process.
11:43:00 <andythenorth> in the compiles I've got, I'd expect about 4s, including some python file io moving static assets around
11:43:07 <andythenorth> and generating docs from python templates
11:43:17 <andythenorth> is this local dev, or in prod?
11:43:23 <peter1138> It's 1) a customized bootstrap 2) a local site css but which also includes some of the bootstrap helpers
11:43:25 <andythenorth> prod hosts are often slow
11:44:03 <peter1138> This is done on build so not a problem, just annoying when testing changes to have to keep waiting :)
11:46:39 <andythenorth> I only used lessc, which is maybe faster, but it lost to sass so eh
11:46:44 <andythenorth> my future contains sass
11:48:59 <andythenorth> ok let's make ground sprites work
11:49:55 <peter1138> This is a .Net-based compiler, so I do have to mess around with other dependencies.
11:50:07 <peter1138> Anything with node is a pita.
11:50:58 <andythenorth> we have same with python -> node
11:51:24 <andythenorth> hmm I need an arbitrary ground tile, for the non-track case
11:51:34 <andythenorth> wonder if we have one that is just 'current terrain'
11:58:22 <peter1138> Rocky bars are now only 96 kcal. They're also a LOT smaller
12:06:41 <andythenorth> looks like I can't use `GROUNDSPRITE_RAIL_X` as a return value from a switch
12:07:49 <andythenorth> only valid inside spritelayout maybe
12:10:23 <andythenorth> nah that's just in the nml global constants table
12:10:32 <andythenorth> it's a straight mapping to sprite 1012
12:11:01 <andythenorth> maybe the issue is that a spriteset is expected, and I'm returning a sprite number
12:13:31 <andythenorth> I should learn nml one day
12:14:32 <andythenorth> hello GROUNDSPRITE_NORMAL
12:14:40 <andythenorth> this is the droid I was looking for
12:15:39 <andythenorth> ok I think I have to duplicate spritelayouts, one per ground sprite
12:16:07 <andythenorth> there's no obvious way to have it calculate the required sprite at tun time
12:16:39 <peter1138> Stations generally have rail as the ground...
12:16:46 <andythenorth> unless they are non-track
12:17:01 <andythenorth> and they need the orientation
12:17:10 <andythenorth> there's no graphics chain, so I can't do anything with temp registers
12:17:21 <peter1138> Just draw over the ground in your layout...?
12:17:39 <andythenorth> it's an option yes
12:17:50 <andythenorth> custom_spritesets works for realsprites I've defined, but not sprite numbers
12:19:00 <andythenorth> I thought there might be a graphics chain, but the spritelayouts callback result has to be assigned directly to an array, as though it was a static prop
12:19:09 <andythenorth> returning the array from a switch fails as invalid
12:19:40 <andythenorth> maybe select_spritelayout is what I need
12:19:50 <peter1138> Okay, 1 second build is better, only building the file I touch instead of all off them.
12:27:13 <andythenorth> yeah looks like no temp storage available for stations
12:31:13 <andythenorth> at least via select_sprite_layout
12:32:09 <andythenorth> wonder what prepare_layout is for
12:33:53 <andythenorth> maybe it's cb 24
12:35:45 <andythenorth> there must be an action 3 -> 2 chain?
12:38:09 <peter1138> One rail station can be built from multiple NewGRF stations, even from separate NewGRFs.
12:38:55 <peter1138> Not sure how temporary temporary storage is, but having storage per station would be a recipe for GRFs writing over each other.
12:39:06 <andythenorth> nah I mean in graphics varact 2
12:39:33 <peter1138> Having it per station part is maybe possible but there's lots of them, so... space.
12:39:41 <andythenorth> I can't find any entry point in nml to the graphics chain
12:39:53 <andythenorth> but the nfo shows it's just a normal action 3 -> action 2 -> action 1
12:40:56 <andythenorth> no entry point means no way to put anything in a register via advanced varact2
12:41:08 <andythenorth> so no way to use that to hold sprite numbers
12:45:37 <andythenorth> ok I just duplicate all spritelayouts, much simpler π
13:00:02 <peter1138> You'd be better off sending the files listed.
13:00:34 <andythenorth> I removed spritelayouts from an active grf
13:03:35 <andythenorth> I guess duplicating spritelayouts was the easier thing π
13:04:45 <talltyler> That sounds like user error
13:21:02 <_glx_> the big issue is the doc, but I think I included all possible options
13:21:16 <andythenorth> ok I try it again in a bit
13:21:47 <andythenorth> for the actual CHIPS case, it might be cleaner to have different spritelayouts for track / non track, and for each orientation
13:22:08 <andythenorth> I've been trying to do it all with one spritelayout, and lots of configuration, but it leaves magic numbers around
13:22:21 <_glx_> but I wanted an advanced test
13:22:43 <_glx_> it was mostly to test the implementation details
13:23:18 <andythenorth> I'll want that for snow and things I think
13:23:30 <_glx_> overly complex and can be done simpler with more spritelayouts
13:23:32 <andythenorth> I can't also fork the spritelayout for every variant of snow, or random sprites
13:23:52 <andythenorth> ok, this makes sense
13:24:11 <andythenorth> when I understand it, I'll help with the docs
13:24:19 <andythenorth> currently I'd be making them worse π
13:24:28 <_glx_> original NFO uses multiple spritelayouts
13:26:36 <_glx_> so you can write `sprite: LOAD_TEMP(xxx);` and fill the temp in `prepare_layout` I think
13:27:16 <_glx_> 2022 + a in the example is actually 2022 + LOAD_TEMP() π
15:40:56 *** HerzogDeXtEr has joined #openttd
16:16:09 <peter1138> Okay, installing OpenTTD in Steam :D
16:21:55 <peter1138> Hmm, how open OpenGFX2 is nearly twice the size of OpenGFX...
16:23:48 <peter1138> Oh it's configurable.
16:24:01 <peter1138> We ought to move the configuration of basesets into basesets.
16:26:54 <peter1138> Hmm, my local build is slightly faster than the Steam nightly.
16:27:29 <peter1138> Now it swings the other way, heh.
16:34:38 <andythenorth> how do I have 3 tabs open with the chips example nml glx made, but I seem to not have read any of them properly? π
16:43:52 <andythenorth> _glx_: for the switch that handles custom spritesets, is that called as a procedure from the spritelayout, or some other time?
16:46:05 <peter1138> Oh, JGRPP doesn't store those bits in the map. Hmm.
16:49:44 *** virtualrandomnumber has joined #openttd
16:49:58 *** virtualrandomnumber has quit IRC ()
16:50:26 <_jgr_> It's never come up when I've done any profiling so I hadn't looked into it, seems like a sensible enough optimisation though
17:04:35 <_glx_> andythenorth: it's done via action3, first the prepare_layout is called as a procedure, then the internal `Station Layout@registers` (generated when parsing the sprite_layout), and finally it switches on var10 to get the right spriteset
17:05:15 <_glx_> sprite layout for stations is static with workaround to make it somehow dynamic
17:05:52 <andythenorth> I was curious if arbitrary parameter could be passed from CUSTOM() to the switch
17:06:48 <andythenorth> it's not essential, there are already 2 or 3 other solutions, just none are nice
17:06:48 <_glx_> no it's only index into the array and offset into the returned spriteset
17:07:10 <andythenorth> I dislike offsets into spritesets because they're magic numbers
17:07:22 <andythenorth> more so because my spritesets are code generated
17:07:36 <andythenorth> I could use a templating constant I guess π
17:08:22 <_glx_> station spritesets have less limitation than other features
17:08:44 <andythenorth> off-topic, but do they have the thing where all spritesets in a spritelayout must be same size?
17:08:54 <_glx_> they don't need to have the same size
17:09:02 <andythenorth> one of the reasons FIRS doesn't have much animation is because of that
17:09:26 <andythenorth> changing number of animation frames in one spriteset in a spritelayout requires changing all others
17:09:38 <andythenorth> and naturally, spritesets are often shared between spritelayouts π
17:12:21 <_glx_> in my gist you can see `houses_spriteset` with 8 sprites, while other are only 4 sprites
17:20:00 <_glx_> and houses_spriteset is referenced directly in the spritelayout but also via custom
17:24:34 <_glx_> but even when referenced directly it still goes through var10 mechanism
17:25:56 <_glx_> that's why the total of direct reference and custom array is limited to 6 for a given station
17:27:50 <_glx_> because var10 range is 0-7 with 0 being default (cargo) and 2 is for custom foundations
17:29:22 <_glx_> people coding stations in NFO deserves respect π
17:32:03 <peter1138> I've done it, so... :D
17:40:16 <andythenorth> funny you should mention that limit _glx_ π ``` nmlc ERROR: "generated/chips.nml", line 324: A station can't use more than 6 different sprite sets```
17:40:24 <andythenorth> ok I need to rethink my design
17:40:50 <andythenorth> I guess things need packed into spritesets
17:40:53 <andythenorth> and I have magic numbers
17:48:21 <locosage> peter1138: You mean #11337 ? I wanted to comment on that yesterday but forgot.
17:49:02 <_glx_> You can have more than 6 spritesets using switches in the custom_spriteset array
17:49:04 <andythenorth> ok so that's CHIPS done? π
17:49:23 <andythenorth> ground tile done, ground overlay (platforms) done, front and rear building parts done
17:51:32 <_glx_> Like if you have many layouts selected with the select callback, you can use the same function to select the spriteset
17:52:21 <_glx_> So all layouts can use different spriteset via a single custom
17:52:43 <andythenorth> this will become clearer as I do it more π
17:53:08 <peter1138> Yeah, without actual performance metrics its hard to say yes or no to it :D
17:53:28 <peter1138> Oh, I forgot about dark mode on that custom CSS...
17:53:39 <peter1138> At least CSS variables make that relatively easy these days.
17:57:08 <andythenorth> do stations need fences?
17:57:36 <andythenorth> "at last, a use for station variants"
18:01:19 <peter1138> You can just detect the edge of the station and draw them there.
18:02:18 *** gelignite has joined #openttd
18:03:04 <andythenorth> do we need player choice of fence / not fence?
18:03:32 <andythenorth> _glx_: no idea if it's useful, but I pushed a mostly-working CHIPS nml-port now
18:03:50 <andythenorth> kamnet: ok so ground tile type * 3 fence types
18:03:59 <andythenorth> so now we need 12 classes of industrial station? π
18:11:34 <andythenorth> I could do plain ground tiles with / without fence though
18:11:51 <andythenorth> every supported cargo needs a station tile
18:15:41 <andythenorth> is there a better way? Current CHIPS just uses 'most cargo waiting' which looks bad
18:19:40 <andythenorth> wonder how CHIPS does that
18:19:56 <andythenorth> can't see how action 3 check per cargo gets that outcome
18:29:15 <peter1138> OpenTTD picks the first cargo type that is waiting.
18:30:48 <peter1138> There's no particular reason why that couldn't be modified.
18:33:22 <andythenorth> within the existing spec, could it be done per tile?
18:33:37 *** gelignite has joined #openttd
18:33:46 <andythenorth> wondering if there's a neat way to show different cargos on different tiles, depending on (for example) xy location
18:33:56 <peter1138> It actually is done per tile... but it's always the same result for the same station...
18:34:57 <peter1138> Problem with per-tile data is what, when and how do you store it?
18:36:01 <peter1138> e.g. for the game to know that one cargo type is 'better' than another for a tile, you need to store data for all cargo types.
18:36:20 <andythenorth> I think I just want to pick a specific order of cargos depending on tile xy
18:36:40 <andythenorth> maybe I could make some huge arrays of indexes into CTT
18:36:46 <peter1138> The game has already chosen the cargo type by that point.
18:36:48 <andythenorth> then shuffle them around depending on xy
18:37:51 <peter1138> I guess you can completely ignore the cargo type in action 3, and then also discard the little/lots info in the result.
18:38:28 <peter1138> But then you have you end up checking everything yourself, and that'll be slow.
18:39:04 <andythenorth> it would be a huge set of varact 2 checks
18:39:12 <DorpsGek> - Update: Translations from eints (by translators)
18:39:55 <peter1138> I would say different strategies to pick the cargo type and the little/lots value should be implemented in the game.
18:40:09 <peter1138> And then the NewGRF can just choose a strategy.
18:41:17 <andythenorth> my objective would be to show more than one cargo per station
18:41:21 <andythenorth> maybe not all the cargos
18:41:27 <peter1138> e.g. now that cargo is loaded/unloaded, perhaps it's possible to store the cargo type in the off-map storage for each station part.
18:41:42 <peter1138> .. loaded/unloaded on a platform/tile level.
18:43:08 <peter1138> That would not be by tile or even per platform, but depends on how you build the station.
18:45:50 <peter1138> There is actually per-tile data for roadstops.
18:46:27 <peter1138> I didn't actually look to see if it's necessary, just assumed it was :p
18:47:57 <peter1138> Heh, correct assumption. Technically there are enough bits, but they are spread out so not really usable.
18:50:27 <andythenorth> right what was I doing?
18:50:31 <andythenorth> I had wine and cheese and pie
18:50:39 <andythenorth> I've forgotten everything before that point
18:50:58 <andythenorth> oof fences, let's avoid that
18:53:51 <peter1138> Okay, so off-map storage for station tiles...
18:53:56 <peter1138> How big are stations...
18:55:48 <peter1138> How do custom airport tiles work?
18:57:34 <_pruple> like industry tiles. the spec is practically identical.
18:57:49 <peter1138> How do custom industry tiles work?
18:58:09 <_pruple> like object tiles. the spec is practically identical.
18:58:54 <peter1138> How do custom object tiles work?
18:59:03 <peter1138> Hmm, they all ignore action 3 cargo types.
18:59:15 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
18:59:31 <peter1138> No airport stockpiling for you.
18:59:54 <peter1138> Okay, so rail stations and road stops at least use the action 3 cargo types.
19:00:25 <peter1138> That means thats the game can change the cargo type selection strategy for them.
19:01:09 <peter1138> For airports, no such luckβbut could probably be implemented.
19:23:02 <peter1138> Maybe "last cargotype (un)loaded at this tile" is good enough... anything else I can think of needs some statistics which is going to get big.
19:23:43 <_glx_> anyway a well served station will never show cargo π
19:24:30 <_glx_> unless `little` shows something
19:27:01 <peter1138> That's why I suggest changing the strategy as well.
19:27:23 <peter1138> Rather than trying to implement it (differently) in every NewGRF station under the sun.
19:29:41 <peter1138> And for GRF authors probably the main distinction is whether it's meant to be a loading station graphic or an unloading station graphic.
19:29:48 <_glx_> yeah last vehicle cargo or something
19:30:29 <peter1138> Yes, last cargo could work but could be a bit flickery (but then that's no change from the current algorithm)
19:31:02 <peter1138> And if it's done per tile, if you have dedicated platforms that will work okay,.
19:31:10 <_glx_> current algo is max waiting if there's a match else sum of all waiting
19:31:10 <peter1138> But blocked tiles would need something else.
19:31:54 <peter1138> Yeah, there's two different things at play here... what cargo to show, and how much cargo to show. First can be done per station part, or per tile, relatively easily.
19:32:04 <peter1138> How much can only really be done on a per-station basis.
19:32:34 <andythenorth> stations get added quite fast once the compile is set up π
19:32:39 <peter1138> (Without bloating stations even more, that is)
19:35:01 <andythenorth> hmm....station tile order...must be a feature for that
19:37:18 <andythenorth> can't see the sort order prop in nfo spec
19:38:17 <_glx_> I think the sort order is grf then id
19:39:41 <_glx_> kinda in which order the grfs are loaded
19:40:26 <andythenorth> classes get renamed according to grf order also π
19:40:34 <andythenorth> but I guess that's just inevitable
19:41:26 <_glx_> last one to set the name wins
19:44:20 <peter1138> Yes. That's a bit of "weird ttdpatch spec" :D
19:44:36 <andythenorth> ok so would we add sort order?
19:44:36 <peter1138> I think we carried on with objects and roadstops though.
19:44:50 <peter1138> Classes could reasonably be sorted by name.
19:44:56 <peter1138> But stations themselves, perhaps not.
19:45:06 <andythenorth> I can fake tile sort order in the compile TBH, and just bump version compatibility every time I add a tile
19:51:45 <peter1138> Sort by max speed and price.
20:08:33 <andythenorth> name string works here
20:09:06 *** gelignite has quit IRC (Quit: Stay safe!)
20:10:24 <andythenorth> it will be PEBKAC, but I can't see it
20:12:11 <talltyler> Iβm so excited for these
20:12:54 <talltyler> Do these match industry colours, like the objects that come bundled with FIRS?
20:14:23 <andythenorth> but that could be an option
20:17:38 <talltyler> This this not a feature request, but I would talk lovingly about such a feature endlessly if it were to exist π
20:18:19 <peter1138> They're stations, so they're built in company colours.
20:28:30 <andythenorth> talltyler: no colour cb for stations π
20:30:15 <talltyler> Huh, thatβs surprising
20:30:20 <talltyler> Could be added π
20:30:25 <_glx_> station names are in 0xC5xx range, maybe you overflowed
20:30:26 *** nielsm has quit IRC (Ping timeout: 480 seconds)
20:31:03 <peter1138> Can we get vehicles coloured by nearby industries too?
20:33:26 <andythenorth> yellow houses for sulphur mine
20:35:11 <_glx_> hmm yeah might be a limitation in how strings for station are handled
20:36:29 <talltyler> peter1138: Itβs not nearby industries, itβs town index % number of colours, I believe?
20:38:06 <_glx_> andythenorth: your ID range is wide, that might be an issue for C5xx strings
20:38:56 <andythenorth> talltyler: oh CHIPS would need the colour seed from FIRS
20:38:58 <andythenorth> yeah, not happening
20:39:32 <andythenorth> _glx_: I might have to move to auto-assigned IDs
20:39:47 <andythenorth> usually I try to preserve savegame compatibility with stable IDs
20:39:55 <andythenorth> but that's not possible for stations, so eh
20:40:00 <_glx_> the spec uses C4xx for classes and C5xx for stations
20:40:18 <peter1138> That's a property to set strings avoiding the C5xx method.
20:40:46 <peter1138> 1C for station name, 1D for class name.
20:44:21 <_glx_> ah yes in nml `"name": {"size": 2, "num": 0x1C, "string": (256, 0xC5, 0xDC), "required": True},`
20:44:38 <_glx_> it should use C5xx for the first 256 ids
20:45:42 <peter1138> It doesn't need to but might as well.
20:46:00 <peter1138> Ah, the grf spec status page was updated but not the grf spec itself.
20:46:02 <_glx_> not sure it has been very tested
20:47:02 <peter1138> But the grf spec status page doesn't mention anything afaict.
20:47:10 <peter1138> So whatever andy was on about, no idea. I'm blaming him :p
20:48:19 <peter1138> Yeah probbly not tested. Does it even work...
20:51:05 <_glx_> anyway it's hard to tell what can be wrong without seeing the NFO
20:51:34 <andythenorth> I can generate nfo
20:51:40 <andythenorth> or does CHIPS build for you now?
20:52:02 <_glx_> I tried only with wsl and python is too old
20:56:06 <_glx_> and which name should be displayed ?
20:57:18 <andythenorth> string(STR_NAME_STATION_FLOOD_LOADER_SILO)
20:57:36 <andythenorth> `Flood loader silo`
20:57:43 *** blobstarbarooo has joined #openttd
20:59:11 <_glx_> 70 * 24 04 04 FF 01 \wxC5C8 "Flood loader silo" 00
21:03:51 <_glx_> and I can see 1C is set properly too
21:04:18 <_glx_> so on NFO side it should work
21:06:21 <andythenorth> it will be PEBKAC π
21:06:21 <_glx_> anyway the string is duplicated 8 times because id < 256, while "Tipple" is defined only once in DC range
21:06:55 <_glx_> but I don't see anything wrong in the generated NFO
21:07:03 <andythenorth> ok so there are 2 stations missing IDs....
21:07:18 <andythenorth> think both are ID < 256
21:07:48 <_glx_> could be a bug in openttd
21:07:49 <andythenorth> yes, 100 and 200
21:08:32 <_glx_> or the choice to keep C5xx for <256 in nml
21:09:22 <_glx_> or maybe it should not use prop 1C for C5xx strings
21:10:16 <peter1138> Unknown StringID 0xC5C8 remapped to STR_EMPTY.
21:12:05 <peter1138> If TTDPStringIDToOTTDStringIDMapping was aware of C5xx strings would it help?
21:12:27 <_glx_> nml should not set prop 1C for C5xx strings
21:12:34 <peter1138> Or rather... MapGRFStringID
21:13:25 <_glx_> or just forget about C5xx
21:13:54 <_glx_> with have a huge DC range now
21:14:04 <peter1138> Not huge enough for andy :D
21:14:30 <_glx_> D800-FFFF should be more than enough
21:14:52 <andythenorth> peter1138: 65k station IDs?
21:15:00 <andythenorth> one string per station
21:15:23 <peter1138> So the aim of those changes wasn't to allow 65k IDs. It was to allow more than 255...
21:15:57 <peter1138> It's a one-liner in OpenTTD to allow those strings to be used here.
21:16:29 <peter1138> You can't rename the default station CABBAGE though :(
21:16:51 <peter1138> It makes a new one...
21:20:16 <peter1138> Meh, the comment is wrong for that block, I guess it should be done as an else condition.
21:24:15 <_glx_> and keep C5xx in legacy world
21:24:31 <peter1138> I mean... it's not is it? It's a lot more changes :p
21:25:05 <_glx_> yeah because all the NFO π
21:26:14 <_glx_> but it makes sense to use only DC range for the props
21:26:41 <_glx_> especially when andy reuses the strings π
21:27:05 <peter1138> That's why I didn't add any feature check... to allow reuse ignoring feature ;)
21:32:52 <_glx_> that's what happens when the spec is not written π
21:33:32 <_glx_> but clearly it should be DCxx only for the prop
21:33:53 <_glx_> like other string props
21:51:30 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
21:51:47 <andythenorth> ha the 6 spriteset limit is easily triggered in CHIPS
21:52:03 <andythenorth> I might have to write something to merge spritesets
21:52:15 <andythenorth> and track offsets
21:53:45 <_glx_> yeah the spriteset limit is shared across all spritelayouts of a station, it's very easy to reach
21:57:49 <andythenorth> once I understand it better, I can probably dump everything into one giant spriteset for the whole grf
21:57:55 <andythenorth> and just offset by number
21:58:07 <andythenorth> I can make a table of offsets and assign constants
21:58:20 <andythenorth> how big can a spriteset be?
22:00:26 <andythenorth> ok so some, but not enough for the whole grf
22:02:05 <andythenorth> ok this is a tomorrow problem π
22:19:48 *** tokai|noir has joined #openttd
22:19:49 *** ChanServ sets mode: +v tokai|noir
22:25:21 <andythenorth> if I have one spritelayout, and it switches ground tile on custom_spriteset
22:25:26 <andythenorth> and there are 4 types of ground tile
22:25:34 <andythenorth> I'll hit the limit of 6 rather fast?
22:26:09 <_glx_> 4 ground types for a single station ?
22:26:41 *** tokai has quit IRC (Ping timeout: 480 seconds)
22:26:44 <andythenorth> no, each station has a unique ID
22:27:05 <andythenorth> limit per station, not per spritelayout
22:27:29 <_glx_> but if you reference a switch in custom_spriteset and this switch select between 4 spritesets it counts for 1
22:28:12 <andythenorth> and do sprite numbers count, or only spritesets?
22:28:33 <_glx_> it's really 6 unique spritesets/switches for all the spritelayouts of a station
22:29:00 <_glx_> direct references or indirect in custom_spriteset
22:29:48 <andythenorth> ok tomorrow I try consolidating spritesets into one per station I think
22:29:54 <andythenorth> bit of a rethink, but should be ok
22:30:02 <andythenorth> will end up with a lot of duplicated realsprites in the grf
22:30:38 <_glx_> I think my chips gists uses 7 different spritesets (only 4 "real" ones, 1 of them using 4 not counted)
22:31:16 <_glx_> and one spriteset is referenced directly and in double indirection
22:31:37 <andythenorth> ok falling asleep here π
22:31:41 <andythenorth> definitely zzz time
22:32:25 <_glx_> anyway the 6 spriteset limit can be worked around
22:35:34 <peter1138> Yeah, this 6 limit came up before but I still can't remember what it's all about.
23:04:18 *** blobstarbarooo has quit IRC (Quit: Page closed)
23:11:40 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
23:23:31 <_glx_> var10 possible values (0-7 with 0 and 2 reserved)
23:25:22 <_glx_> of course we could also increase the range
23:56:04 <peter1138> Okay, these things were not there when I implemented grf stations.
23:58:29 *** _aD has quit IRC (Quit: leaving)
continue to next day β΅