IRC logs for #openttd on OFTC at 2026-10-28
β΄ go to previous day
00:00:06 *** keikoz has quit IRC (Remote host closed the connection)
00:14:59 *** WormnestAndroid has quit IRC (Remote host closed the connection)
00:15:27 *** WormnestAndroid has joined #openttd
00:16:21 *** WormnestAndroid has quit IRC (Remote host closed the connection)
00:16:29 *** MinchinWeb[m] has quit IRC (Ping timeout: 480 seconds)
00:16:30 *** WormnestAndroid has joined #openttd
00:17:27 *** MinchinWeb[m] has joined #openttd
00:17:39 *** WormnestAndroid has quit IRC (Remote host closed the connection)
00:18:35 *** WormnestAndroid has joined #openttd
00:21:34 <_glx_> oh maybe it's just another case of not cleared cache
00:27:31 *** MinchinWeb[m] has quit IRC (Read error: Connection reset by peer)
00:27:47 *** MinchinWeb[m] has joined #openttd
00:34:13 <_glx_> I always forget to clear cache when I add a lib
00:37:40 *** Flygon_ has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
01:20:44 *** MinchinWeb[m] has quit IRC (Ping timeout: 480 seconds)
01:21:26 *** MinchinWeb[m] has joined #openttd
01:36:54 <peter1138> Why is playing Quake not as much fun as playing Doom?
02:47:01 *** kaibaneddy has joined #openttd
02:54:52 <audigex> Not enough dimensions?
03:08:38 *** MinchinWeb[m] has quit IRC (Ping timeout: 480 seconds)
03:10:06 *** MinchinWeb[m] has joined #openttd
04:30:43 *** wallabra has quit IRC (Ping timeout: 480 seconds)
04:38:15 *** Philemon has joined #openttd
04:41:36 *** Phileman has quit IRC (Ping timeout: 480 seconds)
05:01:29 *** tokai|noir has joined #openttd
05:01:29 *** ChanServ sets mode: +v tokai|noir
05:03:06 *** wallabra has joined #openttd
05:07:09 *** toktik is now known as Guest4129
05:08:26 *** tokai has quit IRC (Ping timeout: 480 seconds)
05:12:11 *** Guest4129 has quit IRC (Ping timeout: 480 seconds)
07:10:24 <andythenorth> if it's original Quake vs original Doom
07:10:58 <andythenorth> the gameplay changed, there's less to blast in Doom, and the enemies are more significant
07:11:54 <andythenorth> I think partly because to get performance on a Pentium 75, they couldn't include many enemies at all
07:54:31 *** toktik has quit IRC (Ping timeout: 480 seconds)
08:10:54 <peter1138> Hmm, that's true. There were also more BAD FEATURES in use. Traps that spawn enemies out of no where, often behind you.
08:19:15 <andythenorth> annoying cooker banner obvs
08:26:10 *** andythenorth_ has joined #openttd
08:52:01 <andythenorth_> then more coffee
08:53:04 *** Smedles has joined #openttd
09:32:37 <peter1138> Hmm, is there any code-gen difference between `(int)a`, `static_cast<int>(a)`, and `int{a}`?
09:32:52 <peter1138> (The casts I know are the same)
09:33:47 <LordAro> i'd imagine you could construct some contrived example
09:33:55 <LordAro> though i'd expect it to be the same in normal usage
09:36:14 <peter1138> We previously rejected `int(a)` style because it looks like calling a function, but I think `int{a}` shows intent better, and is a bit "weaker" than an cast which can be useful.
09:36:38 <LordAro> looks like a constructor to me
09:36:43 <LordAro> which i guess it kind of is
09:37:29 <peter1138> That's also why I'm asking, as it is a constructor rather than a cast.
09:39:14 <LordAro> >error: non-constant-expression cannot be narrowed from type 'uint32_t' (aka 'unsigned int') to 'int' in initializer list
09:39:15 <peter1138> We do actually use the {} constructor style in some places already, but it's by no means consistent.
09:39:21 <LordAro> clang doesn't like the int{a} form
09:39:52 <peter1138> Yeah, it depends on the input type and the purpose of the cast.
09:50:13 <kuhnovic> IIRC a C-style cast can silently cast away constness, which obviously isn't ideal
09:50:59 <LordAro> iirc c-casts try all 3 - static -> const -> reinterpret
09:51:19 <kuhnovic> Yeah they just use whatever works
10:08:43 <peter1138> By inconsistency...
10:08:44 <peter1138> case 0x08: cp->callback_mask = static_cast<CanalCallbackMasks>(buf.ReadByte()); break;
10:08:47 <peter1138> case 0x09: cp->flags = CanalFeatureFlags{buf.ReadByte()}; break;
10:09:43 <peter1138> I think I'm in favour of the form used by 0x09 here. It's less lenient with mistakes.
10:11:47 <LordAro> for class types, absolutely
10:11:56 <LordAro> mildly surprised static_cast works
10:45:25 <DorpsGek> - Update: Translations from eints (by translators)
12:10:39 *** wilfreddv has joined #openttd
12:10:40 <wilfreddv> Apparently the original game had a click-and-drag style menu, but OpenTTD added a click-and-click menu. However, menu items are not highlighted when hovered over, only when "dragged" over. I have looked through the GitHub issues and PRs, but was unable to find anything about this. (Looking for "menu", "dropdown")
12:10:40 <wilfreddv> Is this already on the radar, or do most people still utilize the click-and-drag style?
12:13:45 <kuhnovic> "On the radar" is the wrong term. We don't work down a list of things we want to fix or add. Somebody can just create a PR and if enough people like it then it will get merged.
12:14:20 <kuhnovic> In other words, feel free to have a go at it! I think it would be nice to have IMO π
12:23:22 *** tabytac has joined #openttd
12:23:22 <tabytac> looks like ~90% of people (vanilla Q3) use the 'new' behaviour, would be nice
12:25:44 *** MinchinWeb[m] has quit IRC (Ping timeout: 480 seconds)
12:26:51 *** MinchinWeb[m] has joined #openttd
12:27:08 *** talltyler has joined #openttd
12:27:08 <talltyler> The "new" behaviour was made the default for accessibility reasons (it's intended to benefit people who don't know there's a setting to change it). Most people don't change default settings, thus the high usage. π
12:32:57 *** MinchinWeb[m] has quit IRC (Read error: Connection reset by peer)
12:33:14 *** MinchinWeb[m] has joined #openttd
12:34:19 <peter1138> I've finished editing now :)
12:36:05 <peter1138> tabytac, what would "be nice" here?
13:05:24 *** Flygon has quit IRC (Read error: Connection reset by peer)
14:02:13 <kuhnovic> The people demand mouse-following highlighting :widdle_goblin:
14:03:35 <kuhnovic> Some bears need to be poked
14:26:50 * peter1138 ponders storage of community NewGRF translations.
14:28:16 <peter1138> Massive git repository :D
15:03:50 <andythenorth_> just a lot of strings, not that big?
15:04:25 <andythenorth_> we did have one, but we deleted it
15:04:37 <andythenorth_> can't remember why, probably security
15:33:55 <andythenorth_> I did consider a GHA pipeline to process PRs for translations
15:34:40 <LordAro> it was more that ottdc died, no?
15:35:01 <andythenorth_> oh yeah, it was on coop infra
15:35:23 <LordAro> frosch & TB were half way through a translator rewrite, suppose someone could work out how that was supposed to work and finish it ;)
15:35:23 <peter1138> IMHO community NewGRF translations should be completely detached from NewGRF authors (except possibly allow them a way of exporting them to be included natively)
15:35:33 <peter1138> But that poses the problem of where to do it.
15:36:19 <peter1138> (Like you should be able to translate DBSetXL and not need to get MB involved.)
15:37:33 <peter1138> Anyway, getting ahead of things, step 1 is to actually have external translation support.
15:37:55 <peter1138> I fixed my NML patch to expose string ids as strings.
15:40:31 <peter1138> Parameters might be bit awkward :o
15:40:36 <peter1138> 3 * 37 04 00 FF 01 \wxD000 "\0DGoods produced this month: \90\7C" 00
15:40:40 <peter1138> 4 * 30 04 00 FE 01 \wxD000 "STR_INDUSTRY_EXTRA_TEXT" 00
15:54:09 <_glx_> and external translations should probably not done as a newgrf (so no need to add extra grf in the list to get translations)
15:55:31 <peter1138> Sure, plain text file ultimately.
15:55:43 <peter1138> We already read those for scripts.
15:57:28 <_glx_> and of course fully automatic from user POV, just need to be dropped somewhere and they are used as needed
15:59:11 <peter1138> Needs to have information with GRFID and probably the version too.
16:00:15 <peter1138> Oh, you mean for the version, sure.
16:00:48 <_glx_> and someway to allow a wider range of version if they are compatible
16:01:25 <_glx_> but adding a single string in a newgrf can affect the whole list
16:02:30 <peter1138> _glx_, that's the purpose of language 0x7E to provide string ids. They can also change but that's down to the author rather than the order of strings.
16:02:59 <peter1138> Of course that doesn't exist for old GRFs, but then they don't get updated much either)
16:04:25 <_glx_> at least if grf uses 0x7E translation only need to match GRFID
16:05:18 <_glx_> and hardcoded numerical stringid
16:06:17 <peter1138> Not necessarily, if there's no stringid then one could be generated as the hash of the actual text. As long as the text is the same the string would match. Of course that breaks a bit if text is repeated, but then if it's the same text that's probably fine.
16:10:10 <andythenorth_> there's always just falling back to default lang
16:10:24 <andythenorth_> failure can be safe
16:10:51 <andythenorth_> we could load the strings into a WASM OpenTTD with error logging? :P
16:10:59 <andythenorth_> or just even not WASM
16:11:43 <peter1138> Falling back to default lang doesn't make translations work.
16:12:06 <peter1138> Not sure what WASM has anything to do with.
16:13:31 <_glx_> hmm actually 0x7E could be unneeded, if there's a tool to extract strings from any grf with the correct key
16:14:15 <_glx_> with a key base on the actual text
16:17:40 <andythenorth_> why did WASM even pop into my fevered mind? oh translators could check that way, in-place, if that was ever wanted, maybe it's overkill
16:18:34 <peter1138> See, you have no idea of my... ideas.
16:20:25 <_glx_> he the tool could be grfcodec itself with an extra command line flag
16:21:02 <peter1138> In my head, the tool is OpenTTD itself.
16:21:33 <andythenorth_> edit in place, round-trip to the storage?
16:21:34 <peter1138> Barring action 7/action 9 nonsense
16:22:12 <peter1138> (Although it's possible for a separate scan to ignore those.)
16:22:26 <peter1138> andythenorth_, edit in place, initially load/save locally.
16:22:55 <peter1138> Then at some point figure out how to distribute
16:24:29 <peter1138> Anyway, not for 16.0
17:30:15 <peter1138> Huge due to regression test changes.
17:30:29 <peter1138> (Yes I know, updating regression tests means I've broken it, uh...)
17:44:56 <_glx_> what's annoying is 7E line is not always next the string
18:21:00 <peter1138> Not sure where the line-breaks come from but.
18:21:52 <peter1138> Oh, line 65, file.newline() :)
18:44:48 <rito12_13> Thatο»Ώ's half a success...
18:45:44 <andythenorth_> wonder if we could place non-navigable decor to smooth out river corners
18:46:03 <andythenorth_> oxbow lakes? :P
18:49:49 *** MinchinWeb[m] has quit IRC (Ping timeout: 480 seconds)
18:51:55 *** MinchinWeb[m] has joined #openttd
18:52:25 <peter1138> Super portrait mode.
18:52:50 <peter1138> Or rather, at that aspect ratio there's no reason to move the toolbars to the side.
18:53:32 <peter1138> Hmm, come to think of it, it's super-wide that they moved it on. Hmm.
18:55:49 <peter1138> Anyway, basically that UI change doesn't need to be Android only, you might find it easier to develop on a proper computer :p
19:02:26 <_glx_> for now I only managed to get a kinda working dedicated build, when I added SDL via vcpkg it built but failed to start the video driver (needs the same trick as windows regarding `main()` but I failed to make it build in this case)
19:11:04 <rito12_13> peter1138: I have some rust projects to do, and as I did not make rustc work on android this becomes a simple procrastination
19:19:29 <squirejames> andythenorth_: sudden terrible flash back to year 8 geography
19:27:10 *** toktik has quit IRC (Remote host closed the connection)
19:45:50 <peter1138> ModuleNotFoundError: No module named 'grf.incompatible_grfs'
19:50:07 <peter1138> Well, `src/grf/incompatible_grfs.py` exists
19:55:01 <peter1138> I dunno what the rules are on imports and paths.
19:55:13 <peter1138> I would have thought "current directory" is fine.
20:12:44 <andythenorth_> might be I wrote something hokey with adding to search paths
20:13:10 <andythenorth_> are you running the makefile, or something else?
20:18:34 <andythenorth_> from repo root I assume?
20:20:30 <andythenorth_> try `touch src/grf/__init__.py`
20:31:58 <_glx_> andy's makefile often needs adaptation, it's usually quite specific to his environment π
20:34:05 <peter1138> FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/tyler/Documents/OpenTTD/newgrf'
20:35:53 <andythenorth_> _glx_: unashamedly, the former coop makefile tried to adapt to everything, and nobody wanted to touch it
20:35:58 <_glx_> that's a very specific windows path
20:36:27 <_glx_> yeah coop makefile is not better, too generic
20:38:03 <peter1138> Hmm, okay, so there's other strings which maybe want to be translatable too :o
20:38:14 <andythenorth_> I did at least remove the default "launch 16 processes" :P
20:38:33 <andythenorth_> frosch was quite unamused by that one :P
20:38:33 <peter1138> if (grf_future_status("Meo\81")) { error(FATAL, string(STR_ERROR_INCOMPATIBLE_SET, "New Cargos"));}
20:39:20 <peter1138> Although in this instance thee string is insert directly, so there's many copies of it :o
20:40:15 <_glx_> ah indeed actB are translatable
20:47:50 <peter1138> -1 * 1254 14 "C" "INFO"
20:47:51 <peter1138> +1 * 1739 14 "C" "INFO"
20:48:36 *** jfs_ has quit IRC (Ping timeout: 480 seconds)
20:51:55 <peter1138> Probably not very necessary to support ActB strings.
21:34:35 <peter1138> "passing due to luck"
21:35:24 <andythenorth_> not sure why the issue doesn't come up for me, it should
21:36:57 <peter1138> Hmm, my installed nmlc is the one I intended.
21:39:34 <peter1138> Guess it was a bit older, new version ends up with a smaller firs.grf, even with my new stringids added.
21:40:10 <andythenorth_> if it's not pypy3, the time to download and link it is saved on the first compile run :P
21:40:20 <andythenorth_> other people might be more patient than me
21:51:16 <peter1138> The first 11,000 sprites or so of Iron Horse is purchase list sorting instructions.
21:51:37 <peter1138> None of it has been batched.
21:52:15 <peter1138> It's 3 lines per sprite, so over 30,000 lines of sorting. Beautiful.
21:52:21 <peter1138> Variants did not scale.
21:57:05 <peter1138> Also all these badge definitions where you set the flags to empty are all unnecessary.
21:58:49 <will_marshall_> What's the going rate for an NML Spaghetti review session?
22:06:39 <peter1138> Okay, so badges.pynml.
22:06:48 <peter1138> I don't know tal :)
22:23:36 <peter1138> Oops, "not need" -> "need"
22:29:11 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:30:54 <_glx_> previous nmlc could generate useless act2
22:31:38 <_glx_> related to purchase CB36
22:32:15 <_glx_> and tons of vehicles means possibly tons of useless act2
22:51:03 <peter1138> Anyway, regarding that patch: badges automatically exist just by being listed in the badge translation table, so they don't need to be expicitly defined unless you're setting a name, sprite, or some other property.
23:35:05 <_glx_> lol gcc is less strict than other compilers (but it still complains)
23:38:36 <peter1138> No, I missed that one up ExtraEngineFlags was meant to stay a cast.
23:40:26 <peter1138> We reserved a DWord in the spec so we don't need to keep adding new variables if we need more flags, but the in-memory type is only a byte.
23:40:39 <_glx_> yeah storage optimisation inside openttd until more is needed
23:41:50 <peter1138> It's not all that important, we could get rid of the casts if we used the full size. It just wasn't noticed so much when everything used casts... which is kinda the point of trying to not use them :-)
23:43:59 <_glx_> but indeed the current way is not super safe
23:44:40 <peter1138> static_cast is still better than a C cast.
23:44:55 <_glx_> because we don't validate the read DWord to not have unexpected bits
23:55:59 *** andythenorth_ has quit IRC (Quit: Connection closed for inactivity)
23:56:46 <peter1138> * This file implements a linked-lists of strings,
continue to next day β΅