IRC logs for #openttd on OFTC at 2025-04-11
⏴ go to previous day
00:01:27 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
01:32:26 *** Wormnest has joined #openttd
02:11:33 *** Wormnest has quit IRC (Quit: Leaving)
02:16:46 *** gnu_jj_ has joined #openttd
02:20:07 *** gnu_jj has quit IRC (Ping timeout: 480 seconds)
02:42:04 *** geizeskrank has quit IRC (Ping timeout: 480 seconds)
02:45:15 *** WormnestAndroid has quit IRC (Remote host closed the connection)
02:45:16 *** WormnestAndroid has joined #openttd
02:45:22 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
02:45:23 *** WormnestAndroid has joined #openttd
02:45:26 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
02:45:27 *** WormnestAndroid has joined #openttd
02:45:36 *** geizeskrank has joined #openttd
03:54:04 *** D-HUND has quit IRC (Ping timeout: 480 seconds)
04:46:08 <DorpsGek> - Update: Translations from eints (by translators)
05:18:20 *** keikoz has quit IRC (Ping timeout: 480 seconds)
05:52:02 <andythenorth> could just do rects, no slope
05:57:26 <jfkuayue> What’s the “fried yellow pancake” provided everywhere in Scotland but nowhere outside of Scotland?
06:13:34 <jfkuayue> It is said to be made with potato
06:35:14 <Rubidium> can't be potato/tattie scones, as those are also provided outside of Scotland (at least I think London is outside of Scotland)
06:39:44 * Rubidium wonders whether New Zealand is far enough outside of Scotland to disqualify tattie scones :D
06:49:08 <andythenorth> never judge a day till it's over, or something
06:49:45 <jfkuayue> Half of my Easter break has gone…
06:56:00 <andythenorth> I recently added build logs to Horse
06:56:25 <andythenorth> I bet I never use them, until they fill up my disk and have to write a rotation mechanic
06:56:49 <LordAro> ...why do they store more than one build?
06:57:02 <andythenorth> they have detailed output from one script
06:57:19 <andythenorth> I guess I could unify and filter
06:57:39 <andythenorth> design effort was 0, GPT gave me a function to do it, I pasted it
06:57:54 <andythenorth> was better than searching shell history for timing prints
07:16:15 <andythenorth> well, that ih_livery is quite PHPBoss in use of caps
07:36:53 <peter1138> LordAro, can o' worms.
07:37:09 <peter1138> Apparently a TimeoutTimer can't retrigger itself.
07:39:46 <andythenorth> most of my badge code is now .upper() or .lower()
07:39:59 <andythenorth> for badge strings vs lang string IDs
07:46:20 <peter1138> > "Badge labels should be camelCase"
07:46:35 <peter1138> ((That would be a right mare))
07:48:12 <peter1138> The flags are uppercase :S
07:48:33 <peter1138> Probably worth making the game case-insensitive?
07:51:20 <andythenorth> I could just code generate badges in all cases
07:52:00 <andythenorth> freight_OIL_Black
07:53:43 <peter1138> Forcing to lowercase makes most sense, and doing so before anyone depends on case makes more sense.
08:07:59 <peter1138> 3 files changed, 54 insertions(+), 15 deletions(-)
08:08:13 <peter1138> Github only seems to show the total, which is more as it's combined with a different PR.
08:18:48 <locosage> andythenorth: had this idea
08:18:54 <locosage> probably not the greatest though
08:19:24 <peter1138> You can't have circles in OpenTTD.
08:19:32 <peter1138> Or was that Minecraft?
08:22:20 <locosage> it's 2025 and still no circles?
08:22:27 <locosage> good thing I dropped it a decade ago
08:22:31 <locosage> such slow development
09:19:50 <andythenorth> pff what's left to do for badges?
09:20:06 <andythenorth> re-implement all action 0 props like power and speed as cb 36 reading badges? 😛
09:20:13 * andythenorth adds to list of 'not to do'
09:27:06 <andythenorth> looks like status indicators, or on-off slide switches
09:40:07 <andythenorth> does TILT_CABBAGE get a visual badge?
09:40:31 *** geizeskrank has left #openttd (tom is gone)
09:40:49 <peter1138> It does if you draw one.
09:46:27 <_zephyris> Help me understand badges - if _any_ loaded grf defines a badge icon, then all vehicles from any grf using that badge will be given that icon in the purchase list?
09:49:25 <andythenorth> people could replace horse badges with their own? 👀
10:05:17 <peter1138> _zephyris, and yes, this is a good reason to provide a range of sensible stylised defaults, to avoid every and all grfs just doing their own and being incoherent. It works both ways...
10:05:33 <_zephyris> andythenorth: If the grf is loaded after, yes. Or if they provide an extended horse with more badge icons which you didn't provide.
10:05:45 <_zephyris> All sounds good to me 🙂
10:16:05 <peter1138> Bound to be issues.
10:53:27 <xarick> a function takes parameters or arguments?
10:55:24 <_zephyris> i'd say arguments are the values, parameters are the names
10:55:35 <_zephyris> But I mostly push pixels 🙂
10:56:55 <LordAro> _zephyris: my dimly remembered CS degree would agree with you
10:57:34 <xarick> alright, so it's arguments the word I'm looking for
10:58:16 <_zephyris> I'm always looking for an argument
11:38:30 <frosch123> Meh, it doesn't work. How to debug this...
11:49:04 <peter1138> Hmm, how often does the content server update its own view of available content?
11:49:38 <peter1138> Is it periodic or triggered.
11:49:45 <peter1138> I assume it doesn't actually change all that much.
12:00:06 *** kuka_lie has joined #openttd
12:01:53 <andythenorth> "`**kwargs` is a param"
12:02:11 <andythenorth> unless it's an arg 😛
12:14:44 <peter1138> Hmm, each ContentInfo is 256 bytes. Might be a bit much to keep sorted.
12:16:16 <peter1138> 2139 items listed, so just over 500KB.
12:23:27 <andythenorth> using livery badge to switch recolour...
12:23:39 <andythenorth> `has_badge` will work, unless I accidentally add 2 livery badges 😛
12:23:45 <andythenorth> I guess I should not do that
12:24:35 <andythenorth> switch format might be a bit weird, I might need to loop unroll
12:26:34 <peter1138[d]> I dunno how much of a act3/2/1 chain NML lets you share, but you could handle CB 2D specifically for each variant and then chain onto the common callbacks/graphics.
12:27:01 <peter1138[d]> But NML's abstraction of callbacks probably prevents that.
12:27:03 <andythenorth> mostly the callbacks are shared
12:28:17 <andythenorth> 2D is handled via a switch that puts a livery number into a register, then chains to common
12:28:38 <andythenorth> then the actual recolour handling is just 1 set of global varact2
12:29:14 <andythenorth> I want to read the badge, and drop the register stuffing
12:29:55 <andythenorth> I feel like a 40-switch loop unroll is killing kittens though
12:30:55 <andythenorth> ah maybe this was what I wanted 'pick a random badge from a list' for
12:33:42 <peter1138> I just forget how inefficient act3/2/1 can be at times :-)1
12:34:08 <peter1138> It's not quite "this variant should return palette X for CB 2D"
12:34:27 <andythenorth> it's not far off
12:34:31 <andythenorth> if you don't look closely
12:34:58 <peter1138> Mainly the linking of palette to action 2 is a bit manual, right?
12:35:43 <peter1138> In fact how does it even work with custom palettes... Hmm.
12:36:00 <peter1138> I think I looked once and got scared.
12:36:35 <andythenorth> frosch gave me some magical nml once for picking out the palette
12:36:49 <andythenorth> I put it in a loop and tried to never look again
12:37:12 <andythenorth> I _think_ palettes might depend on GRM, but not sure
12:41:44 * andythenorth inventing horrific grf var requests
12:42:04 <andythenorth> "badge n from all badges with prefix `foo`"
12:50:15 <andythenorth> or I could just loop unroll, checking candidate badges in order, and yielding 'true' when found
12:50:32 <andythenorth> which involves no weird grf vars
12:52:34 <frosch123> Vehicles have a recolour callback to set a default recolouring, stacked sprites can override that per sprite via some 100+ register
12:53:19 <frosch123> Nml has buildins to get the 2cc recolour sprites from actiond
13:00:21 <frosch123> Gh action trial and error
13:06:14 <DorpsGek> - Update: Translations from eints (by translators)
13:07:34 <peter1138> No description provided.
13:12:56 <frosch123> Pff, ogfx2 is the first eints project using main branch instead of master
13:20:48 <andythenorth> hmm 50 item loop unroll every time recolour callback runs?
13:23:30 <peter1138> It is actually cached.
13:33:44 <andythenorth> peter1138: "probably fine then"
13:35:39 <andythenorth> hmm not really any faster to compile without the register stuffing on recolour
13:36:23 <andythenorth> I guess I removed "switch_foo(23)" and instead have "switch_foo" and "switch_foo_purchase" so ~same switch count
13:37:38 <andythenorth> concurrent varact2 ID consumption increased from 160 to 161
13:38:16 <andythenorth> but in principle, if there was a debug mode to allow mutating badges per vehicle, the livery would change 😛
13:38:23 <andythenorth> previous implementation that wouldn't happen
13:47:01 <andythenorth> right, what else can I badge? 😛
13:49:14 <andythenorth> is `flag_foo/true` too weird for a badge?
13:51:56 <truebrain> Screen not wide enough 😛
14:00:44 <andythenorth> badge for 'can go on high speed rail tracks'?
14:00:53 *** zanooda2000 has joined #openttd
14:00:53 <zanooda2000> _zephyris: Hmm, for this variant tile grid must be thicker, it almost not visible here
14:02:37 <andythenorth> hmm 10k vehicles in horse, wonder how much bloat each badge adds
14:02:50 <andythenorth> I assume action 0 is just an offset into translation table?
14:04:54 <andythenorth> badges are *immensely* useful for debugging behaviour
14:08:46 <andythenorth> adding them seems negligible so far
14:13:36 <frosch123> Ah crap, why is eints so complicated
14:20:37 <peter1138> Wasn't there something else "in progress"? :)
14:24:29 <truebrain> If only I had more free time 😛
14:26:03 <peter1138> Did you know that opening the Online Content window now downloads metadata for over 2000 pieces of content?
14:27:03 <peter1138> I probably blabbed it earlier.
14:38:34 <andythenorth> well I crashed nmlc 😛
14:40:00 <truebrain> peter1138: even worse, it does it in no way that is efficient .... it wasn't designed for this
14:45:41 <peter1138> Well, #13990 helps a bit, but yeah.
14:46:26 <peter1138> But I've been wondering if we can do incremental listing -- only send information that wasn't sent last time.
14:46:45 <peter1138> Which is mostly "send nothing after the first go" because I don't think it updates all that much.
14:55:21 <andythenorth> hmm obligations call
14:55:35 <andythenorth> but I have a nice reproducible crash of nmlc and no useful debug 🙂
14:55:40 <peter1138> Have you tried DNDing them?
14:56:01 <andythenorth> the obligations are human
14:56:05 <andythenorth> and can interrupt DND
14:58:08 <andythenorth> maybe I can add some badge error handling to the nml PR
14:58:21 <andythenorth> [skill issues result]
15:02:01 <_zephyris> Well done wrangling eints!
15:02:34 <peter1138> Are languages added automatically or does that need doing too?
15:03:05 <_zephyris> Looks like you can pick a language, then ogfx2 gets a "start new" button.
15:03:26 <_zephyris> (on translator.openttd.org)
15:05:02 <peter1138> Hmm, STR_GRF_DESCRIPTION mentions the original github account.
15:07:06 <_zephyris> The readme could use a revamp too
15:08:42 <xarick> do enums end in }; or }
15:13:14 <andythenorth> badge action 0 is word?
15:14:27 <talltyler> Heheh, no work for me to do with an en-US translation. You already have a `gray` cursor option 😛
15:15:25 <_zephyris> I blame programming languages, teaching me wrong english
15:17:09 <talltyler> I changed one colour->color, that’s it
15:18:05 <talltyler> Do you mean to have the version number as a translatable string? (`STR_OBG_DESCRIPTION_VERSION`)
15:20:02 <talltyler> I have no idea how base sets work but for GRFs I use a custom_tags.txt document to create my own string codes for TITLE and VERSION so the translatable name of the grf is just `{TITLE} {VERSION}`.
15:26:49 <_zephyris> Yeah, that could do with a fix.
15:28:36 <peter1138> andythenorth, yes, in case have more than 255 badges for some reason.
15:34:29 <DorpsGek> [OpenTTD/OpenGFX2] GraionDilach opened issue #170: Landscape feature can introduce shade inconsistencies between standard grass tiles grassy areas which are part ofd other tiles (specific houses, low-level company HQ) https://github.com/OpenTTD/OpenGFX2/issues/170
15:36:32 <andythenorth> ok so I don't think I'm crashing nmlc due to too many badges
15:36:47 <andythenorth> I should add some `raise`
16:17:38 <xarick> how do I download old versions of my AI?
16:18:41 <Rubidium> checkout the older version from your version control
16:20:01 <Rubidium> unless you know the md5 checksum
16:24:02 <peter1138> Even as the content owner?
16:29:52 <xarick> yes, I own the content and trusted bananas would let me download my own stuff
16:32:35 <peter1138> Load up an old savegame that needs them :-)
16:33:20 <xarick> doesn't work like that
16:36:39 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
16:37:44 *** WormnestAndroid has joined #openttd
16:48:20 *** toktik has quit IRC (Remote host closed the connection)
16:52:29 <andythenorth> hmm `nmlc ERROR: nmlc: An internal error has occurred:` ... `line 146, in prepare_byte`
16:52:42 <andythenorth> this will be fun 🙂
17:00:10 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
17:06:01 <xarick> can't I do this kind of stuff? `m_cargo_type_list = AICargoList().Sort(AIList.SORT_BY_ITEM, AIList.SORT_ASCENDING);`
17:09:13 <xarick> which newgrfs have 2 types of passengers
17:09:39 <andythenorth> ECS vector has Tourists
17:11:03 *** gelignite has joined #openttd
17:11:12 <andythenorth> ah caught out by aggressive badge caching 🙂
17:11:27 <andythenorth> I couldn't figure out why the badges disappeared from buy menu
17:11:48 <andythenorth> removing the grf from grf list, rescanning, readding it, made badges reappear
17:12:09 <peter1138> If you need a list of cargos, I suppose that is what you can do...?
17:13:41 <xarick> m_cargo_type_list doesn't have a Begin when I do it this way
17:15:30 <xarick> ``` m_cargo_type_list = AICargoList();
17:15:30 <xarick> this.m_cargo_type_list.Sort(AIList.SORT_BY_ITEM, AIList.SORT_ASCENDING);
17:15:31 <xarick> this solves. a bit ugly but fine
17:16:02 <peter1138> Yeah, Sort doesn't return the list itself.
17:19:40 <andythenorth> oof have to afk for a bit, but if I add this to my badge generator, nmlc crashes 🙂
17:19:40 <andythenorth> for i in range(100):
17:19:40 <andythenorth> label=f"cabbage/foo/bar_{i}"
17:19:49 <andythenorth> "so don't do that" might be an answer
17:20:41 <andythenorth> the error is probably mine, but eh
17:21:36 <andythenorth> there are 292 badges in the badge table
17:22:54 <andythenorth> is the table limited to 255?
17:23:07 <andythenorth> seems to be a reliable trigger for the error
17:23:49 <andythenorth> nmlc reports 65k limit in the printed output
17:24:31 <_glx_> of course unable to test with only this file
17:25:46 <_glx_> needs a complete test case (including langs)
17:30:51 <peter1138> I may not have told NML about how to emit more than 255 entries in a translation table.
17:32:07 <peter1138> Ah, also it's not generally possible fo translation tables, only the badge translation table.
17:34:00 <peter1138> Okay, I did but probably didn't try it.
17:36:43 <peter1138> Outputting the badge table is fine.
17:36:47 <peter1138> Maybe using it is not.
17:40:05 <peter1138> Nope, that seems to work fine.
17:40:18 <peter1138> +\wx0000 \wx0002 \wx0127
17:40:31 <peter1138> That's past the 255 limit.
17:53:40 <_glx_> xarick: I think your keys are arrays, might not be what you expect
17:56:57 <_glx_> ah no it should be fine actually
18:22:37 <peter1138> Yeah, I found #13986 after look at alternatives to part of #13982 :)
18:29:28 <frosch123> It already conflicted with the override_id rename. You broke it twice :p
18:36:21 <andythenorth> _glx_: Sorry was going afk, but I can paste full Horse later, or push a broken branch
18:36:29 <peter1138> Also, GrfMsg() uses _cur, but is sometimes called outside of the grf loading path.
18:37:28 <andythenorth> There’s a separate invalid badge error which is handled explicitly but doesn’t raise the badge name
18:37:32 <peter1138> Things like NewGRFClass::Allocate, which is called when setting up default data, and when NewGRFs are defining classes.
18:37:48 <andythenorth> And I need to add constants for badge flags
18:42:58 *** ChanServ sets mode: +v tokai
18:45:18 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
18:45:19 *** WormnestAndroid has joined #openttd
18:49:55 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
19:11:24 <peter1138> What does your function "add_badge()" do?
19:12:47 <andythenorth> it appends badges to a list, which are then templated into the badge table
19:14:18 <peter1138> I guess you are not using the badgers branch here.
19:14:24 <peter1138> "consistfactoryyolo"
19:14:31 <peter1138> You are... not great with branches, are you?
19:16:34 <andythenorth> make branches great again
19:16:54 <andythenorth> I tried being great with branches once
19:17:35 <andythenorth> I have been diligently rebasing my badgers branch for weeks onto consistfactoryyolo
19:17:41 <andythenorth> then yesterday...I forgot 🙂
19:26:02 <peter1138> Btw, if you pass `-s` to nmlc, then it will give you a stack trace, which is a bit more useful.
19:26:20 <andythenorth> I should remember that
19:27:32 <peter1138> So the action 4 code doesn't understand that extended bytes can be used.
19:28:21 <peter1138> Probably action4.py:202
19:28:25 <peter1138> size = 3 if feature <= 3 else 1
19:28:36 <peter1138> Somewhat hardcoded and hidden, right?
19:30:05 <peter1138> "Why do you hate NML so much, peter1138?"
19:32:31 <andythenorth> because it's not rust?
19:40:21 <peter1138> So yeah, I was focusing on the badge table side of things, rather than the definitions.
19:42:55 <andythenorth> breaking things appears to be my superpower 😛
19:43:22 <andythenorth> let's see what I can break next
19:44:33 <peter1138> More importantly, I finished that .wad. On to another.
19:45:58 <notluke2578> inthemiddleofourstreet
19:46:30 <andythenorth> 'pick a random badge from a subset' 👀
19:47:45 <peter1138> myhouse isn't a wad.
19:51:35 <andythenorth> hmm how shall I do a hint from a badge?
19:52:05 <andythenorth> I want to explain, in fewest possible words, that this vehicle chooses random wagons from a selection
19:52:23 <andythenorth> I don't think the player needs to see a list of the candidates though
19:54:29 <andythenorth> NameListFirstOnly looks interesting
19:54:43 <andythenorth> not sure what I want it for, but eh
19:55:47 <andythenorth> so nml needs constants for badge flags
19:55:58 <andythenorth> can I do that and force push it to 359 somehow?
20:01:07 <andythenorth> or we could do it like we used to 😄
20:01:56 <peter1138> Linux-kernel style mailing list workflow...
20:02:08 <andythenorth> shall I mail a patch?
20:02:30 <andythenorth> I can add you as a remote or something dunno
20:02:47 <andythenorth> I could push this and you could cherrypick it
20:03:34 <andythenorth> anyway there's no flag bits for hiding the `:` character on badge category
20:03:46 <andythenorth> alternative options exist
20:06:28 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
20:07:42 <andythenorth> wasn't quite what I anticipated 😛
20:07:57 <andythenorth> "Random: Random"
20:08:14 *** WormnestAndroid has joined #openttd
20:20:33 <peter1138> ClientNetworkContentSocketHandler::OnReceiveData looks a bit trust-worty.
20:21:03 <peter1138> Dealing with a std::vector<char> as a text buffer.
20:22:55 <peter1138> Hmm, there is a nul-terminator added, so I guess it's fine.
20:34:05 <frosch123> Last string refactoring pr.
20:34:05 <frosch123> I leave the remaining 800 "char*" matches to someone else
20:38:01 *** Wormnest has joined #openttd
21:02:36 <andythenorth> can I prevent repeated badge names? 🙂
21:02:47 <andythenorth> they're unique badges, but share name string
21:03:09 <andythenorth> could also do it compile side
21:04:22 <_zephyris> Identical names doesn't sound like a great plan...
21:04:37 <andythenorth> there are 3 types of Lime Hopper (for example)
21:05:35 <andythenorth> I can fix this compile side or alternately, I could not show the list at all
21:05:53 <andythenorth> "Assortment: Mineral Wagons" etc
21:06:10 <andythenorth> "Assortment: wagons for metal cargos"
21:06:26 <xarick> i need a newgrf with 64 cargos
21:07:20 <andythenorth> not sure it actually has 64
21:08:18 <xarick> nice, AI can still start
21:08:47 <xarick> i am worried about a `this ai took to long to start` error
21:14:57 <andythenorth> so there's a badge spec proposal in grf wiki
21:15:26 <andythenorth> should I do `livery/iron_horse/freight_wagon/foo_name`?
21:16:07 <andythenorth> currently my branch uses `ih_livery/foo_name`
21:24:09 <peter1138> Well, the idea is that many NewGRFs might want to provide a livery badge.
21:25:00 <andythenorth> I'm implementing it now in Horse
21:28:56 <peter1138> In that example, uk might probably ought to be gb, to avoid conflicting with ukraine.
21:29:37 *** coobies has joined #openttd
21:29:37 <coobies> Wouldn't ukraine be ua?
21:30:59 <andythenorth> "where did my badges go?" 😄
21:32:10 <peter1138> coobies, what are you doing, creating an international tariff policy using information from top-level dns codes?
21:32:25 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:33:44 <coobies> Exactly! We need to make sure we save room for any liveries that originate in the British Indian Ocean Territory
21:33:54 <coobies> They might get a train there someday
21:51:17 <andythenorth> colour the colour names via string codes? 👀
21:56:44 <andythenorth> not a criticism 🙂
21:57:41 <_zephyris> Kinda cheerful feel
21:59:05 <andythenorth> less manic than traditional toyland
21:59:58 <andythenorth> not my favourite climate 🙂
22:01:34 <andythenorth> ok actual naptime
22:01:59 <_zephyris> Do I try to increase contrast by one notch? Or done?
22:07:22 <talltyler> I like it the way it is
22:08:34 <_zephyris> Shinier slopes? Would look more plastic
22:21:50 *** kuka_lie has quit IRC (Quit: Lost terminal)
22:43:29 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:55:22 <xarick> I'm kinda cheating though
22:55:36 <xarick> max ops for Hog is low
23:55:37 <belajalilija> xarick: Too orange
continue to next day ⏵