IRC logs for #openttd on OFTC at 2023-04-10
β΄ go to previous day
00:06:25 <Eddi|zuHause> everyone always reads big red warnings.
00:28:51 *** Soni has quit IRC (Ping timeout: 480 seconds)
00:59:17 <Eddi|zuHause> we're expecting your PR to make it bigger and redder then
00:59:44 <Eddi|zuHause> (i'm assuming the load button is disabled when developer tools are deactivated?)
02:14:22 *** Wormnest has quit IRC (Quit: Leaving)
02:55:56 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:47:48 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
03:59:53 *** bryjen has quit IRC (Quit: Leaving)
05:38:19 <pickpacket> I'd like to add beards to the company manager composer. And maybe a couple more choices for glasses. Trying to figure out how I would do that. I can't even find the files with the current parts
06:13:57 <EmperorJake> I' don't think the code will support adding additional parts, only replace existing ones
06:15:04 <jfs-> yes the president face isn't extensible, it's a fixed number of combinations
06:15:04 <jfs-> the best you can do is modify some of the chin graphics to have beards
06:17:22 <jfs-> my best guess is that the artist might be different
06:19:08 <EmperorJake> Here's the code for the face graphics. All you have to do is replace `base_graphics` with `replace` and you can use it as a NewGRF
06:24:52 *** sla_ro|master has joined #openttd
06:44:56 *** nielsm has quit IRC (Ping timeout: 480 seconds)
06:59:34 <petern> dP: Doesn't crash like that for me.
07:00:07 <petern> Hm, probably different missing NewGRFs.
07:06:18 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
07:08:27 <petern> It is in AfterLoadGame, so it should be picked up by the exception handler. Hmm.
07:08:37 *** WormnestAndroid has joined #openttd
07:20:44 <LordAro> depends on the "exception"
07:23:37 <petern> `GetRoadType(this->tile, RTT_ROAD)
07:23:37 <petern> no suitable user-defined conversion from "TileIndex" to "Tile" exists`
07:23:47 <petern> How do I get around that?
07:26:09 <LordAro> Tile(this->tile) apparently
07:27:21 <petern> `GetRoadType(Tile(this->tile), RTT_ROAD)
07:27:21 <petern> expression preceding parentheses of apparent call must have (pointer-to-) function type`
07:27:25 <petern> Anyway, doesn't matter.
07:28:07 <LordAro> ooh, is that a most-vexing-parse situation?
07:28:17 <petern> When road types are missing, it doesn't know which types are RTT_ROAD or RTT_TRAM, so looks up the wrong part. But it's missing the road type information anyway.
07:30:53 <petern> I have an idea, anyway.
07:40:41 <michi_cc[d]> dP: For the record, don't enable scenario/newgrf developer, and you can't load it in the first place.
07:47:36 <petern> Okay, I've created an invalid game, but it doesn't crash...
07:49:55 <petern> Probably it should refuse to load though.
07:54:45 <petern> SlErrorCorrupt aborts loading, but it only shows the Missing NewGRFs messages. I guess that's better than crashing?
07:55:09 <petern> Spurious `?` in there.
07:55:47 <petern> Ah the string has a newline in it, and console messages don't handle that.
07:57:05 * andythenorth reads scrollback
07:57:58 <petern> The new tileindex/tile split is not very helpful for debugging though π¦
07:59:17 <petern> pickpacket, DrawCompanyManagerFace is handled in company_gui.cp
08:00:26 <pickpacket> petern: thanks! I'll have a look there :)
08:00:27 <petern> But it's tricky, it's only a couple of sprites, and the whole system assumes a specific sprite order.
08:00:50 <petern> Rather, it's lots of sprites, but only a couple are drawn.
08:02:06 <petern> Nobody even converted the raw hex sprite numbers to readable sprite ids.
08:05:14 <LordAro> that's interesting - yapf has rail_[shorter,longer]_platform_per_tile_penalty settings, but they're set to 0
08:24:51 *** D-HUND is now known as debdog
08:34:45 <andythenorth> large maps are over-rated, we only ever needed 256 x 256
08:35:14 <andythenorth> ^ not intentionally playing 50% of the map, just connecting all the things in one area first
09:13:02 <LordAro> I've broken something :( "Broken savegame - Invalid chunk size - expected 390, got 271"
09:22:16 <LordAro> aha, ints are 4 bytes
09:24:39 <TrueBrain> How many did you think? 3? 5? How does it go from odd to even, I am wondering π
09:32:54 <LordAro> ...and i've pushed to the OTTD org instead of my fork
09:33:34 <LordAro> er, i mean, don't know what you're talking about
09:37:28 <LordAro> in positive news, the save from #7670 loads now
09:37:38 <LordAro> barely runs because it's huge, but it does load
09:41:57 <petern> It loaded for me... Weird
09:44:38 <LordAro> well according to JGR, it's the signal lookup polynomial doing strange things, so probably undefined behaviour on integer overflow?
09:44:47 <LordAro> maybe works on Windows but not Linux?
09:45:02 <LordAro> or works without asserts?
09:45:51 *** HerzogDeXtEr has joined #openttd
09:49:03 <petern> > negative integral constant converted to unsigned type
09:49:13 <JGR> It "works" when asserts are turned off, you'll just get wrong pathfinding decisions
09:49:18 <TrueBrain> LordAro: maybe good to put that second commit in its own PR? Sneaking unrelated things in a PR feels .. weird π
09:49:27 <TrueBrain> remember: PRs are cheap!
09:49:42 <petern> I use a standard RelWithDebInfo build, so asserts are on.
09:49:49 <LordAro> TrueBrain: probably, yeah
09:50:02 <LordAro> should expand it to the 3 other "Invalid chunk size" messages too
09:51:04 <JGR> The integer overflow is because when all the penalties are at their upper limits (1000000), it does't take that long a path to overflow an int32
09:51:43 <petern> > /* We will limit the number of nodes for now, until we have a better solution to really fix performance */
09:52:47 <TrueBrain> while asking, I think I already know the answer π
09:53:06 <TrueBrain> yeah, okay, nevermind that question π
09:53:17 <LordAro> alright, i won't answer then :p
09:55:02 <TrueBrain> just not fully sure why you also removed those?
09:55:45 <LordAro> mostly because they were also defined in YapfSettings
09:55:53 <LordAro> and it didn't seem worth keeping them around
09:56:19 <LordAro> given they were replaced in ~2007
09:56:29 <TrueBrain> yes, for old savegames
09:56:35 <TrueBrain> so basically this "breaks" old savegames
09:58:24 <TrueBrain> guess it is time for `_old_` globals? π
09:58:32 <LordAro> in that the setting will then be reset to YAPF, yes
09:58:39 <LordAro> regardless of what it was previously
09:58:50 <TrueBrain> feels like a regression for a bit of lazyness π π
09:59:10 <petern> Remove NPF, then it's not a problem π
09:59:19 <TrueBrain> I am surprised how much more work it was removing these settings .. happy you did it LordAro π
09:59:32 <TrueBrain> petern: I am honestly not against it .. would remove so much more technical debt we have in the code π
09:59:53 <TrueBrain> too bad we don't do telemetry .. curious if anyone really plays NPF ..
10:01:29 <TrueBrain> yeah, but multiplayer != singleplayer π
10:01:39 <TrueBrain> we have so many more singleplayer games π
10:01:57 <TrueBrain> but this too, we could make it a Discord poll
10:02:39 <JGR> What people say and what they do are often different things
10:02:40 <LordAro> some basic data ingest + a post on tt-f/discord/steam to say "stick your config in here"
10:03:18 <TrueBrain> or a small change in our game that ask: would you mind if we send your config to us? π
10:03:31 <LordAro> that'd take a lot longer :p
10:03:43 <TrueBrain> but will give a continuous feed π
10:04:31 <TrueBrain> more and more I noticed we just lack visibility to know what choice would be best
10:04:44 <TrueBrain> and adding telemetry, opt-in ofc, isn't actually difficult
10:04:58 <andythenorth> just survey me π
10:05:02 <andythenorth> "I do not use NPF"
10:05:11 <TrueBrain> yes, let's survey the top 0.1%, and see where that leads us π
10:05:12 <andythenorth> low statistical validity
10:05:24 <TrueBrain> (where the listing is ordered by "niche")
10:05:42 <andythenorth> just remove it in JGRPP
10:05:48 <andythenorth> then it will actually get noticed
10:08:31 <TrueBrain> what is a bit ironic, is that we do select YAPF for savegames before version 28 for some reason, instead of NPF .. but okay π
10:09:02 <JGR> Those probably used the ancient OPF pathfinder?
10:09:16 <LordAro> & YAPF was added in v28
10:10:05 <LordAro> "Do something of which I have no idea what it is :P"
10:10:23 <TrueBrain> lol, `new_pathfinding_all` was actually unused?
10:11:07 <TrueBrain> so okay, it is just 3 globals in the form of `_old_ship_use_yapf` .. we have so many of those; was just checking if I wasn't asking hours of work π As then I agree it is not worth it π
10:12:29 <TrueBrain> hmm .. all this talk about savegames failing to load .. I once started on building a system that loaded every savegame in the archive I have to validate they still load correctly ..
10:12:32 <TrueBrain> what happened to that?
10:15:31 <andythenorth> it is nearly time that I write some GS π
10:15:43 <andythenorth> but then I will ruin the channel with complaining π
10:17:30 <andythenorth> do we expose the cargo linkgraph to GS?
10:17:53 <andythenorth> I want to find the primaries supplying a secondary
10:28:48 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
10:29:13 *** WormnestAndroid has joined #openttd
10:34:15 <michi_cc[d]> We like some controversy, right?
10:35:20 <andythenorth> Zorg things are a one-person controversy
10:36:47 *** WormnestAndroid has quit IRC (Remote host closed the connection)
10:36:51 *** WormnestAndroid has joined #openttd
10:50:32 <dP> well, zorg has one point there, scaling payment distance on map size may be useful
10:50:38 <dP> but mostly for small maps :p
10:51:21 <petern> I think his argument is that companies will make less money. And that is the point of the change from what I see...
10:53:36 <dP> the point of change is to prevent exploiting payment
10:54:07 <dP> but if modelling Russia 1:1 is your intended playstyle I don't see why not it shouldn't be possible
10:54:35 <petern> Is that the exploit on that massive MP game?
11:04:35 <TrueBrain> LordAro: compile before commit please π π π
11:05:24 <TrueBrain> compilers are so picky
11:06:40 <TrueBrain> otherwise, PRs look good π Nice π
11:34:37 <petern> Hmm, had one of those premade sushi packets for lunch. Disappointingly small...
11:35:00 <petern> "that's what she said"
11:36:20 <dwfreed> petern: I usually get 2 or 3 of them
11:36:52 <petern> At 250 kcal a pack, that's a lot.
11:37:18 <dwfreed> they're pretty good, but 1 roll (usually 10 or sometimes 12 pieces) is not enough
11:37:31 <dwfreed> 250 kcal is a snack in US measurements :P
11:37:38 <andythenorth> failed to eat a orange
11:37:46 <andythenorth> been asking GPT to design FIRS
11:38:00 <andythenorth> if FIRS was already designed, GPT would probably have better answers π
11:38:07 <petern> I guess the width of that could be better π
11:38:43 <dwfreed> I just ate about 600 kcal worth of chocolate eggs
11:40:06 <petern> > dbg: [grf] [OPENTTD.GRF:10] String was not terminated with a zero byte.
11:40:28 <petern> There's a few of those. Oops?
11:42:30 <petern> > These bytes, if present at all, are ignored. The action does nothing.
11:42:35 <petern> I guess it shouldn't matter.
11:54:05 <petern> dwfreed: Sure I have another half to eat later
11:56:15 <jfs-> I should try to refresh my development environment again
11:56:41 <jfs-> 5 GB of updates for visual studio to download
11:56:44 <petern> Maybe I should career to something that keeps me on my feet
11:57:01 <petern> Or get a standing desk π
11:57:42 <andythenorth> I am standing up to eat a bowl of pistachios
12:01:14 <petern> Too easy to eat a day of energy in 10 minutes
12:17:19 <Kuhnovic> andythenorth: "Luckily" I have a nut allergy that prevents me from doing this. Chocolate eggs however, damn...
12:20:41 <dwfreed> many chocolate eggs are processed in facilities that also process peanuts and/or tree nuts
12:20:55 <dwfreed> so if you're highly allergic, it's best to steer clear
12:21:43 <dwfreed> oh, huh, the ones I just ate say "processed in a peanut free facility"
12:26:51 <Kuhnovic> Luckily I am not that allergic, and I can eat hazelnuts and cashews which is weird
12:38:15 <dwfreed> it's especially odd if you can eat cashews and not pistachios
12:57:06 <TrueBrain> `std::bind(&CompanyFinancesWindow::Rescale, this, std::placeholders::_1)` is there any better way of doing this? π
12:58:09 <TrueBrain> annoying to make an interval timer as class member .. as you want access to `this` π
13:12:18 <jfs-> TrueBrain: wrap it in a closure
13:14:00 <jfs-> `[&](auto arg1, auto arg2) { this->Rescale(arg1, arg2) }`
13:15:13 <TrueBrain> didn't expect I could capture "this" at that point already, but it seems I can
13:16:15 <TrueBrain> bit silly, as I used "this" in the bind too π
13:16:49 <TrueBrain> `IntervalTimer<TimerWindow> rescale_timer = {std::chrono::seconds(3), [this](auto) { this->Rescale(); }};`
13:16:53 <TrueBrain> did not expect even that works ...
13:18:16 <TrueBrain> (and no, I don't like `[&]` .. can give some nasty results π I rather am explicit in my capture :P)
13:20:48 <LordAro> gotta love some magic
13:22:19 <petern> Presumably because I wore my waterproof jacjet
13:37:21 <TallTyler> How do the `Backport requested` and `Backported` / `Backport squashed` labels work? Do they get applied automatically, or manually? The recent backport PR didn't update them, and there are some newer PRs that weren't included in that which will need backporting.
13:37:25 <TrueBrain> nice LordAro, even went the extra mile π
13:38:40 <TrueBrain> TallTyler: as written in the script I think, but `Backport requested` is done manually, if at the time of merging a PR we are like: we really should have this in the last release too. When you run the script, it creates a PR out of all of that. After merging the PR, you need to run the script again with the `--mark-done` (I think?) parameter, to mark all PRs that were `Backport requested` to now become `Backported`
13:38:46 <TrueBrain> clearly someone didn't do that when the last PR got merged π
13:39:49 <TallTyler> Can that --mark-done be run by anyone or does it need to be the person who did the backport PR?
13:40:01 <TrueBrain> anyone with sufficient rights to modify the labels π
13:40:30 <TrueBrain> Pfew, it is written down π
13:40:35 <TrueBrain> I am never sure I actually did π
13:41:22 <TrueBrain> let me know if you run into any trouble
13:42:07 <TrueBrain> isn't the first question: can you set the rating on a station?
13:42:13 <TrueBrain> I am puzzled by this line of questioning π
13:43:08 <TrueBrain> so it must hold true that ... /me checks ... some completely unrelated system must be able to do it too? π
13:43:28 <andythenorth> my assumption is I'm looking in the wrong place in the docs
13:43:52 <andythenorth> assuming that GS is incomplete would be...negative π
13:43:53 <TrueBrain> I appreciate the assumption; it just makes for a weird question π
13:43:59 <Rubidium_> hmm, I did run the backport script with the --mark-done and it implied it changed things (at least no error messages), but apparantly it hasn't done what it was supposed to do?
13:44:25 <TrueBrain> Rubidium_: blame it on the script π
13:44:47 <TrueBrain> andythenorth: I can't find a reference to being able to set cargo rating; I can only find traces of reading it
13:45:49 <andythenorth> TrueBrain: so you're proposing reimplementing many of the game mechanics in a new API, designed from day 0 to be moddable? Or did I misread your last comment?
13:46:04 <Rubidium_> TrueBrain: probably I didn't have/give it the right rights?
13:46:17 <TrueBrain> andythenorth: huh? Who said anything about reimplementing anything?
13:46:25 <TrueBrain> I now wonder if we are having the same conversation even π
13:46:38 <TrueBrain> Rubidium_: you do. Did you run it on the right PR number?
13:46:52 <andythenorth> oof I've been hallucinating again
13:46:55 <andythenorth> maybe I'm an LLM
13:47:08 <TrueBrain> I am puzzled Andy π
13:47:17 <TrueBrain> I say I can only find references to reading cargo rating
13:47:22 <andythenorth> wonder if I could roleplay an LLM
13:47:22 <TrueBrain> you reply with that I suggest reimplementing things
13:47:31 <TrueBrain> I have no clue how you read that in what I wrote .. not even the slightest clue, sorry π
13:47:45 <Rubidium_> TrueBrain: probably, because it listed all the backported PRs
13:48:51 <TrueBrain> Rubidium_: very odd, as it even validates the requests were executed successful
13:49:00 <andythenorth> I've now asked GPT to roleplay a hallucinating LLM, but it has gone off on some sidequest
13:50:20 <andythenorth> oh wait...that's what I asked for π
13:50:32 <TrueBrain> Rubidium: well, in good news, you can rerun the `--mark-done` as often as you like
13:51:26 <TrueBrain> assume the GitHub token is valid, I see no reason why it would fail
13:51:54 <TrueBrain> maybe the token doesn't have permission?
13:53:21 *** lobstarooo_ has joined #openttd
13:53:28 <TrueBrain> the `curl` should still fail .. odd
13:54:37 *** lobstarooo has joined #openttd
13:54:38 <Rubidium_> I didn't give the token any "extra" permissions, i.e. I left all the checkboxes unchecked as that all didn't seem applicable
13:54:51 <TallTyler> I get this error when I run it, but I'm probably doing it wrong π€·
13:55:01 <TrueBrain> yeah, okay, so you could read all the things for the first step, but it couldn't write anything in the second π
13:55:03 *** lobstarooo__ has joined #openttd
13:55:10 <TrueBrain> it needs to have repo:public, I think, to at least write stuff too
13:55:13 <TrueBrain> but it should error out .. annoying
13:55:30 *** lobstarooo___ has joined #openttd
13:56:08 <TrueBrain> TallTyler: it should have errored a bit earlier π But clearly `curl` is not erroring when a 404 is returned π
13:56:21 <TrueBrain> looks like your token is not valid π
13:56:54 <TrueBrain> and either of you, feel free to look into why `curl` doesn't return an error when a non-2XX is returned, and improve the script π
13:57:00 <LordAro> TrueBrain: without --fail curl doesn't error
13:57:28 <TrueBrain> well, there you have it, it seems it needs a `--fail` π
13:57:36 <andythenorth> hmm, I was going to try improving station rating if there was a serviced crane factory nearby π
13:57:46 <andythenorth> can't be worse than the statue mechanic
13:57:49 <LordAro> there's also --fail-with-body (--fail stops after receiving headers) , but needs a new enough curl (ubuntu 20.04 is not new enough, as i discovered recently :( )
13:58:14 <TrueBrain> we don't need the body in that case anyway, so `--fail` sounds fine π
13:58:44 <TrueBrain> so add it in the 3 `curl` commands, and see if it fails properly π
14:01:23 *** lobstarooo_ has quit IRC (Ping timeout: 480 seconds)
14:01:30 *** lobstarooo___ is now known as lobstarooo_
14:02:52 *** lobstarooo has quit IRC (Ping timeout: 480 seconds)
14:03:06 *** lobstarooo__ has quit IRC (Ping timeout: 480 seconds)
14:03:38 <TallTyler> That's all way over my head. If someone wants to do the backporting stuff for a 13.1 release I'll happily write changelog and announcement posts for them π
14:03:38 <andythenorth> hmm can grf callback 145 read information about other cargos?
14:04:47 <dP> I'm thinking... it may be a good idea to add deprecation mode for settings
14:05:03 <andythenorth> hmm can I deliver cargo *to* stations π
14:05:09 <dP> some flag in ini that pops a warning like "you use a non-default value, give feedback or don't complain later"
14:05:58 <Rubidium_> TrueBrain: I enabled "public repo" and it does not seem to fail, so the backport tags have been updated (or they were updated by someone else)
14:06:25 <TrueBrain> cool! If you wouldn't mind adding that to the script repo, and adding `--fail` in the script, that would be lovely
14:06:29 <TrueBrain> prevents the next person to be confused π
14:07:29 <dP> dP: ideally even linking to a pr that added deprecation
14:13:45 <jfs-> nielsmhviaGitHub: adding some game-internal special folders isn't hard, but I'm wondering what makes sense to add tbh
14:14:13 <jfs-> like adding Saves and Scenarios folders, probably? but what about Heightmaps and Autosaves?
14:14:34 <jfs-> do they even make sense to add when not browsing for that specific type of content?
14:15:24 <TrueBrain> ideally it is context-aware, yes π
14:27:09 <TrueBrain> `static constexpr auto LINKGRAPH_REFRESH_PERIOD = std::chrono::milliseconds(7650);`
14:27:12 <TrueBrain> what a weird number π
14:28:34 <DorpsGek> LordAro: 0.8153846153846154
14:29:56 <TrueBrain> petern: that explain 7650, so the next question: why 0xff? π
14:29:58 <jfs-> isn't the linkgraph refresh supposed to run on game tick time? because it needs to synchronize at specific intervals in game time
14:30:22 <TrueBrain> this is the GUI refresh, not the linkgraph itself refresh
14:31:17 <jfs-> is this getting too wordy...
14:31:22 <TrueBrain> petern: lovely π
14:31:42 <TrueBrain> "Directory" is a bit redudant
14:31:49 <TrueBrain> they all are directories; the colour tells you that π
14:31:49 <petern> Are those items real directories?
14:32:13 <jfs-> well, "materialized paths" kind of?
14:32:30 <petern> Hmm, so you have C:\Users\nielsm\Documents\OpenTTD\save\OpenTTD Saved Games Directory\?
14:33:29 <jfs-> they're shortcuts to the directories the game defaults to for those content types
14:35:06 <petern> Hmm, alloca is a nasty thing :p
14:36:38 <LordAro> apparently i've got a 2 year old branch that removes all alloca stuff
14:36:47 <LordAro> guess i never finished that
14:36:53 <TrueBrain> owh no, LordAro is becoming a peter ...
14:37:07 <petern> Well, I have some here in my NewGRF *spec clean up.
14:37:15 <Eddi|zuHause> aren't we all a little peter?
14:37:16 <petern> ("have some" as in remove some)
14:37:39 <TrueBrain> love the branch-name π
14:37:49 <Eddi|zuHause> LordAro: PR or it didn't happen
14:38:37 <andythenorth> I HAVE BRANCHES TOO
14:38:45 * andythenorth didn't want to be left out
14:38:55 <petern> I have some PRs which are less... large π
14:39:12 <petern> Except when they run the CI π
14:40:12 <TrueBrain> the CI will get to it, no worries π
14:45:18 <Rubidium_> TrueBrain: you (or someone else with write rights on the scripts repo; I'm not one of them it seems) needs to merge #3
14:49:09 <TrueBrain> Rubidium_: Haha, will do, tnx for PR π
15:02:08 <dP> haha, speaking of pathfinder settings :P
15:05:49 <Rubidium_> is that pathfinder settings? Or servicing interval understanding?
15:06:23 <dP> and MH likes these off-line depots so his viewers constantly have these issues :p
15:06:49 <dP> it's very unclear that at a certain distance they just stop working
15:07:13 <dP> also trains look for depots every day not tick iirc so that's not helping either
15:07:44 <dP> well, 2000 pf penalty limit to be more precise, so it's less than 20 tiles in reality
15:16:00 <JGR> At the risk of being a broken record about this, letting trains automatically pathfind to depots is just a sea of footguns
15:16:10 <JGR> Users would be better off being told how to use depot orders
15:16:36 <dP> depot orders is not a perfect solution
15:16:50 <dP> I prefer forced depots for example
15:16:51 *** lobstarooo_ has quit IRC (Remote host closed the connection)
15:17:01 <Eddi|zuHause> depot orders should be an option, not forced...
15:17:02 <glx[d]> going to random depot can lost trains
15:17:11 <Eddi|zuHause> we don't force users to use non-stop orders either
15:17:13 <dP> though I only play breakdons in "oh, crap breakdowns on" mode
15:17:37 <Eddi|zuHause> even though implicit orders can have all sorts of problems as well
15:18:27 <JGR> Eddi|zuHause: Thankfully the default is that they are non-stop
15:18:33 <Eddi|zuHause> maybe the 2000 limit is too strict
15:18:50 <Eddi|zuHause> JGR: do we default to "service at depot"?
15:19:38 <JGR> No, because the user needs to choose where to build a depot, and then suitably include that in the vehicle's orders, same as a station/waypoint/etc
15:19:40 <dP> Eddi|zuHause: but if you increase it they start getting lost
15:20:17 <Eddi|zuHause> dP: maybe the limit should include the way back to the current orders
15:21:08 <dP> iirc there were some issues with that idea as well
15:21:10 <glx[d]> maybe once a path to a depot is found, a check for an existing path from the depot to current order
15:21:25 <glx[d]> but that can be too intensive
15:22:36 <Eddi|zuHause> the limit should be the difference between current location->current order, and current location->depot->current order (possibly ignoring "dynamic penalties" like signal state)
15:24:03 <dP> yeah, so every depot check you need to run pf 3 times
15:24:29 <dP> two of them with unlimited distance
15:25:10 <dP> since you measure difference
15:27:47 <jfs-> pushing some blindly written macos code there
15:28:11 <dP> actually, right, how would that even work? you need to pathfind in every direction with unlimited distance to find depot
15:28:33 <dP> only after finding depot you can tell if it's a good one by running pf from it to destination
15:29:07 <dP> so you basically need to check every reachable depot every time
15:29:09 <JGR> There's no need to do any pathfinding with "unlimited" distance/cost limits
15:29:28 <dP> well, it's limited by distance to destination + depot penalty
15:29:29 <JGR> If you don't find anything within the limit you don't change order to service
15:30:11 <dP> but then it'll have the same issue of having some unclear limit after which it stops working
15:30:33 <dP> basically, it will fix lost trains but not missed servicing
15:32:46 <dP> things like this, overhead is nearly zero but train on the outer line won't service
15:33:36 <dP> assuming X crossing after ofc
15:35:55 <dP> it's hard to fix though, you kinda need to do the initial pf run with servicing already in mind
15:42:57 <LordAro> well it compiles and runs..
15:44:20 <petern> I've done the newgrf stuff differently. Hmm.
15:44:55 <LordAro> i'm open to alternatives
15:45:17 <petern> I'll open my PR which has other changes π
15:45:27 <petern> After checking it compiles π
16:02:08 <LordAro> played around with running the backport script. immediately falls over due to #10601 - the addition of newgrf roadstops makes it difficult to backport...
16:04:29 <petern> Shouldn't be "difficult" just not automagic.
16:05:25 <LordAro> yeah, think i've got it now
16:05:36 <glx[d]> similar issue with #10604, that's why I didn't add the label
16:10:41 <petern> Can remove for 10601 if it causes issues. Or I should add to 10625 as well.
16:12:54 <Rubidium_> there were plenty of commits in the previous backport session with such problems (especially when it came to script stuff)
16:13:06 <Rubidium_> and I might've made it worse with the tile changes
16:13:33 <LordAro> glx[d]: any particular reason not to backport #10446 ?
16:19:12 <glx[d]> well #10446 is not mostly an internal change (except a window caption)
16:19:48 <glx[d]> (without "not" for IRC people)
16:23:00 <LordAro> guess that cast was necessary after all
16:25:46 <JGR> Given that both values are clamped to between 1 and 128, you're not likely to have any problem in practice
16:29:25 <jfs-> okay I'd appreciate if someone with macos could build #9984 and check if it actually adds some extra folders in the Load Game window
16:34:51 <Rubidium_> 1006M Apr 10 18:29 libopenttd_lib.a <- a bit bloated?!?
16:37:20 <TrueBrain> does that include all BaNaNaS content too?
16:41:49 <Rubidium_> nope, that's just the compile code (with debug symbols I guess and without much optimisation)
16:42:08 <LordAro> quite a few static libs as well?
16:45:21 <LordAro> nope, i've got no idea what's going on with regression
16:45:28 <LordAro> game runs fine, and can run AIs
16:45:41 <LordAro> but regression throws an error?
16:47:10 *** nebulabc has quit IRC (Quit: No Ping reply in 180 seconds.)
16:49:33 <glx[d]> crashed building a station the log says
16:50:28 <glx[d]> and windows CI sees stuck
16:50:40 *** nebulabc has joined #openttd
16:51:33 <LordAro> yeah, windows is a missing include
16:52:16 *** herms has quit IRC (Quit: bye)
17:03:31 *** gnu_jj has quit IRC (Remote host closed the connection)
17:11:18 <petern> > 75 files changed, 687 insertions(+), 683 deletions(-)
17:14:12 <andythenorth> GS authoring time
17:14:28 <glx[d]> 1.5h and it was still compiling lang files
17:16:48 <LordAro> that doesn't seem like something i did
17:20:35 <glx[d]> that explains the hang
17:21:34 <LordAro> does it? wouldn't it just error?i see
17:22:18 <glx[d]> it errors and open a window
17:22:54 <LordAro> well the stuff i changed in strgen_base.cpp is a bit hairy, but nothing too significant
17:23:11 <LordAro> looks fine as far as i can tell
17:23:14 <LordAro> and works fine on linux
17:23:23 <glx[d]> I can run strgen inside debugger
17:24:47 *** tokai|noir has joined #openttd
17:24:47 *** ChanServ sets mode: +v tokai|noir
17:27:50 <glx[d]> `words[nw] = words[nw - 1];` words' size is 3, nw is 3
17:29:24 <glx[d]> oh it's untranslated strings
17:31:46 *** tokai has quit IRC (Ping timeout: 480 seconds)
17:33:45 <andythenorth> can't figure out how to update a specific text element in a story page
17:34:38 <andythenorth> mentions a reference, but SPET_TEXT may not have a reference
17:34:49 <glx[d]> GSStoryPage.UpdateElement
17:35:13 <glx[d]> and you pass the ID of the element
17:35:42 <andythenorth> local display_growth_rate = GSStoryPage.NewElement(this.story_page, GSStoryPage.SPET_TEXT, 2, growth_rate_text);
17:35:42 <andythenorth> is the constructor
17:35:53 <andythenorth> and ` local display_growth_rate = GSStoryPage.UpdateElement(this.story_page, 2, growth_rate_text);`
17:35:57 <andythenorth> is the update call
17:36:16 <andythenorth> but that updates the first text element on the page
17:36:19 <glx[d]> ah seems the doc is "wrong"
17:36:21 <andythenorth> I suspect only the first is checked
17:36:49 <glx[d]> story_page_element_id The page id of the story page which the page element should be appended to. <-- looks like it's copy/pasted from NewElement
17:37:30 * andythenorth reading story.cpp
17:37:32 <andythenorth> `void UpdateElement`
17:37:40 <glx[d]> pass display_growth_rate
17:38:39 <glx[d]> and return of UpdateElement is a bool
17:39:22 <andythenorth> it does want the story page ID as first param
17:39:26 <andythenorth> crashes if I give it display_growth_rate
17:40:28 <andythenorth> /me reading `CmdUpdateStoryPageElement`
17:41:28 <glx[d]> bool ScriptStoryPage::UpdateElement(StoryPageElementID story_page_element_id, SQInteger reference, Text *text)
17:41:48 <glx[d]> it really wants the return value of NewElement
17:42:43 <andythenorth> but SPET_TEXT has no return value?
17:42:56 <andythenorth> previously I have just been deleting the page every time and recreating it
17:42:59 <andythenorth> which might be easier
17:43:20 <andythenorth> and requires only one constructor function, not a constructor and an update with slightly different commands
17:43:44 <andythenorth> creating pages seems slow, but then again, updating them might be
17:44:21 <glx[d]> NewElement() should return an id for any type
17:45:39 <andythenorth> yes it is returning
17:45:49 <andythenorth> so I need to store more of the page in a table I think
17:46:02 <andythenorth> like...a page has no way to understand its own elements
17:46:09 <andythenorth> it all has to be in some additional structure
17:46:28 <andythenorth> then I can reference them
17:46:51 <glx[d]> if you want to access elements you need to store their ids yes
17:48:06 <andythenorth> oh that might be helpful
17:48:11 <glx[d]> but it feels useless without GSStoryPageElement
17:48:25 <andythenorth> StoryPage is kind of known to be unfinished I think
17:48:27 <andythenorth> awaiting use cases
17:50:12 <glx[d]> you can get the list of elements but no info about them
17:50:55 <andythenorth> maybe I'll just remove and re-create the story page every month
17:51:10 <glx[d]> you get the list and valuate with this function
17:51:39 <glx[d]> then they are sorted as they were added
17:51:52 <andythenorth> then I can just walk over them in order
17:52:40 <andythenorth> I already have a table for each page
17:52:59 <andythenorth> if I give it an elements slot, I can store a table for each element, with id, and update function
17:53:11 <glx[d]> but if only some elements need to be updated it might be simpler to store the ids
17:54:28 <Xarick> very impressive numbers by AAAHogEx
17:54:50 <Xarick> will wait for 5000 ships
17:57:30 <glx[d]> LordAro: now VS pass the language state
17:59:41 <TallTyler> I think it's time to release 13.1, particularly now that LordAro has done the backporting for me π
18:00:30 <TallTyler> What's the best view for seeing changes since the last update? Closed PRs with the Backported label? π€
18:00:49 <LordAro> github search with merged PRs
18:00:58 <LordAro> you can set date limits and things
18:01:12 <TallTyler> (Also you need to merge that backport PR and run the script with --mark-done, at your convenience π )
18:04:34 <andythenorth> ugh how do I assign a table slot and value in squirrel?
18:04:58 <andythenorth> `this.page_elements["display_test"] = town_name;`
18:05:05 <andythenorth> page_elements exists as a table
18:06:00 <andythenorth> ugh this stupid frigging language
18:06:21 <TrueBrain> TallTyler: `git log 13.0..release/13` π
18:06:28 <TrueBrain> `git log --oneline` if you want it to be useful
18:06:40 <andythenorth> why can I sometimes use `<-` as a slot operator in a class?
18:06:41 <JGR> [] is for arrays, presumably
18:06:47 <andythenorth> but other times I can't?
18:07:09 <andythenorth> `Your script made an error: class instances do not support the new slot operator`
18:07:14 <andythenorth> this is just dog crap
18:07:23 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
18:07:50 <andythenorth> ok so I can use it for a table created in a class instance
18:08:02 *** WormnestAndroid has joined #openttd
18:08:03 <andythenorth> but I can't use it to create tables in class instances
18:08:17 <TallTyler> TrueBrain: Ah, thanks π
18:08:26 <andythenorth> probably because classes are just tables, in the implementation
18:08:27 <TallTyler> That's commit names, not PR titles, but is a good place to start
18:08:35 <andythenorth> squirrel: failed to launch
18:08:44 <TrueBrain> yup; then you look up the PRs they belong to if people didn't squash π
18:08:49 <TrueBrain> most commits show their PR
18:09:21 <TrueBrain> and if everyone would squash, and if we would stop rebase, it would be so much easier to make changelogs π
18:10:59 <andythenorth> why is there no separator between the declarations for a and b?
18:10:59 <andythenorth> b=function(a) { return a+1; }
18:11:06 <andythenorth> are newlines equivalent to commas?
18:11:30 *** gelignite has joined #openttd
18:12:10 <TrueBrain> TallTyler: similar to the backport script, we could automate generating the initial changelog
18:12:45 <TallTyler> Git log doesn't match PRs marked backported, unless I'm doing something wrong
18:13:00 <TallTyler> Well, I'm almost certainly doing something wrong, the question is what π
18:13:48 <TallTyler> Ignore those deleted posts, the thing I'm doing wrong is "reading" π
18:14:03 <TrueBrain> was about to say, `git log --oneline 13.0..upstream/release/13` works fine here π
18:14:15 <TrueBrain> lots of commits that didn't get squashed π¦
18:14:20 <TrueBrain> made for more work!
18:14:47 <TrueBrain> a new feature in 13.1? Tssk
18:15:17 <TallTyler> I think the issue is that the order isn't always the same, as on GitHub
18:15:35 <TrueBrain> the commits are pretty much 100% in identical order as on GitHub
18:15:41 <TrueBrain> there is not a single possibility for that to be different π
18:16:23 <TrueBrain> so not sure what order you are looking at π
18:17:50 <TrueBrain> btw, to realise there were only 2 backport PRs, so it is easy to find the actual PRs this time π
18:18:27 <TallTyler> The commits for #10444 are stuffed between commits for #10489 and #10496
18:18:50 <TrueBrain> yes .... you didn't realise we don't merge PRs in order yet? π
18:19:41 <Rubidium_> so, why does the dedicated video driver remain, while the rest got lost with that change?
18:19:45 <TallTyler> I figured it was something obvious
18:20:01 <TrueBrain> π Would be fun, if we had to merge the PRs as they arrived π
18:21:57 <TallTyler> I suspect we'd be closing a lot of PRs instead of letting them sit quietly for someone more motivated to take a look π
18:22:33 <TallTyler> Most of our old PRs are unfinished though, either intentionally a draft or reviewed with no response from the author
18:23:44 <TrueBrain> yeah, we could close a lot of them, honestly
18:24:12 <TrueBrain> Rubidium_: what are you even doing there π
18:24:53 <TrueBrain> if I would to be guess, none of the -D parameters are set on `openttd_lib`
18:28:48 <Rubidium_> TrueBrain: introduce unit tests, without having to compile every twice
18:28:50 <TrueBrain> (for ease of reasoning, I assumed the `null` driver was also there)
18:29:06 <Rubidium_> no, the null driver is also missing
18:29:21 <TrueBrain> those are nearly identical in how they are compiled and registered
18:31:32 <Rubidium_> so, essentially: split openttd into openttd_lib and the main() functions. Then either link openttd_lib + main() function to openttd, or openttd_lib + unit tests to openttd_test. And the unit tests actually function, although I'm not testing the blitters/drivers
18:34:18 <TrueBrain> good luck debugging that π I have zero ideas ..
18:36:07 <andythenorth> hmm I miss something. "MakePushButtonReference" is specifically required to get a reference for buttons
18:36:17 <andythenorth> but SPET_TEXT has no equivalent method
18:37:52 <andythenorth> logging them, I get the same ID for the text element on every story page
18:38:06 <frosch> rubidium: probably violoation of one-definition rule
18:38:20 <frosch> some static template variable may be instantiated in both the lib and the main
18:38:32 <TrueBrain> it's a frosch ! π
18:40:04 <DorpsGek> - Update: Translations from eints (by translators)
18:41:37 <frosch> rubidium: does it work if you move DriverFactoryBase::GetDrivers into the .cpp file?
18:42:08 <andythenorth> does GSBase.RandRange return the same value across calls?
18:42:59 <petern> 4. Guaranteed to be random.
18:44:43 <Rubidium_> just for context: I split os/<platform>/<platform>.cpp to also os/<platform>/<platform>_main.cpp with only the entry point (and some minor checks). To test our thing I reduced the unix_main.cpp to: int openttd_main(int, char*[]); int CDECL main(int argc, char *argv) { return openttd_main(argc, argv); }, and even that doesn't work
18:45:11 <Rubidium_> openttd just links openttd_lib and unix_main.cpp.o
18:47:08 <Rubidium_> but even if I did, *why* does one video driver remain and are all the other drivers/blitters gone?
18:47:23 <Rubidium_> yes, also the null drivers/blitters are gone
18:47:51 <Rubidium_> the code is in the library, so I guess it's some flag for linking that "removes" it when making the executable
18:53:15 <frosch> rubidium: what is the linker command for the lib? does it generate static-initialization code?
18:53:58 <frosch> you could check whether there are symbols like "iFVideoDriver_SDL_Default" or ".init"
18:56:18 <frosch> so, "-whole-archive" is the option you are looking for
18:57:43 <TallTyler> Ah, we don't include the commit hash in the changelog
18:58:15 <LordAro> TallTyler: afraid not :)
18:58:30 <LordAro> more importantly, changelog entries are tried to be written in a manner that's useful to the end user
18:58:59 <TallTyler> Gotcha, can do π
18:59:45 <LordAro> so things like "Let <function> clamp instead of assert" isn't all that great as a changelog entry
19:00:16 <andythenorth> lol had a small unpleasant adventure into squirrel class attributes
19:00:34 <andythenorth> declaring a table in the class declaration will result in it being shared across all instances π
19:01:06 <andythenorth> has to be null in the class declaration, then the attribute must be instanced as a new table in the constructor
19:01:11 <andythenorth> I should not attempt programming
19:01:33 <Rubidium_> the lib has loads of .init_arrays but no .init as far as I could spot. The executable has one .init_array and one .init
19:07:00 <frosch> i am not exactly sure how static initialisation works in static libs. but that "-whole-archive" options sounds like it is related
19:07:54 <frosch> shared libaries all have their own .init method. but static libraries need to be combined at static link time, so completely different to shared libs π
19:08:13 <andythenorth> anyone see a string formatter for "current town growth rate" in GS?
19:08:21 <Rubidium_> "-whole-archive" is not nice as both the lib and the executable seem to link to libgcc and now it complains about duplicates
19:10:56 <andythenorth> GS can't get base game strings? e.g. "STR_TOWN_VIEW_TOWN_GROWS_EVERY"
19:11:41 <Rubidium_> maybe a shared library works?!?
19:12:26 <frosch> yeah, that has always been the solution at work... if static libs fail, use shared
19:13:04 <Rubidium_> will mean a really small openttd.exe and a huge openttd.dll though :(
19:13:56 <frosch> isn't there the option to still static-link the shared-lib later?
19:16:07 <Rubidium_> the major caveat with all this is that my computer's relatively ancient
19:16:23 <andythenorth> crowdfund all devs new PCs π
19:17:53 <frosch> my pc is new enough, can i get a new phone instead?
19:17:58 <Rubidium_> nah, it's only 10 years old and works just fine for most normal tasks. It's just that this thing requires literally recompiling everything almost every time you change something tiny
19:18:37 <LordAro> andythenorth: but then we'd never improve performance
19:19:33 <frosch> lordaro: sure we would. new computers means more cores, so more reason to parallelize things
19:19:40 <frosch> single-core speed did not change much
19:21:23 <andythenorth> ok, I have a story page π
19:21:29 <andythenorth> I would like a medal pls
19:23:24 <Rubidium_> yup... shared lib seems to work
19:28:11 <andythenorth> can't find the GS string formatter for linebreak
19:28:14 <andythenorth> {} isn't working
19:28:28 <andythenorth> \n and \r are just displayed as `?`
19:30:23 <andythenorth> nothing in table/control_codes.h
19:34:25 <TallTyler> Psst, I need reviews on a changelog and a website post, then I can release 13.1 π
19:39:58 *** Wormnest has joined #openttd
19:41:23 <andythenorth> much thanks π
19:45:52 <TallTyler> Now to wait on actions... π
19:48:45 <TallTyler> Maybe I'll take a little walk and come back, I think they took a while last time I did this
19:49:48 <dP> hm... is there a way to quickly get release source package without waiting for actions? xD
19:51:42 <JGR> The source tar is there as usual
19:51:50 <dP> that's just github zip without release metadata
19:53:07 <dP> though probably good enough to start merging...
19:54:20 <glx[d]> andythenorth: it should work
19:54:25 <JGR> Surely you'd be better off using git for that?
19:56:11 <dP> cmclient is based on a release package because compatibility
19:56:53 <dP> I think it went github before vanilla :p
20:03:01 <TrueBrain> TallTyler: just remember ... it is always MacOS
20:06:49 <Rubidium_> the nightly's MacOS build probably almost done after about 56 minutes
20:07:12 <Rubidium_> so... still 40 minutes to go for the release
20:08:29 <dP> ok, this was a way faster merge than 13.0
20:08:59 <dP> despite making things harder for myself my pr stuff that messes with commands
20:10:32 <TrueBrain> Rubidium_: could be faster if we bothered to make the builds parallel .. but .. yeah ... waiting is also fine π
20:12:53 <andythenorth> glx[d]: thanks was using raw string not GSText, oops
20:36:30 <TrueBrain> Steam done, GOG done
20:39:44 <TallTyler> Iβm still on a walk, feel free to check/create a tag for the website release if youβre in a hurry π
20:39:57 <TallTyler> Otherwise I will when I get home
21:05:26 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:21:23 <andythenorth> can't use COMPANY_INVALID to get all?
21:22:35 <andythenorth> there's no company list
21:22:45 <andythenorth> so I can't see an effective way to iterate over companies
21:23:45 <andythenorth> how many companies can there be, including dead ones?
21:30:06 <TallTyler> Why isn't my news post showing up on staging?
21:30:28 <Rubidium_> andythenorth: GSCompany.COMPANY_LAST - GSCompany.COMPANY_FIRST + 1
21:30:44 <TallTyler> Ugh, wrong download link too
21:31:02 <TrueBrain> We left 2023 a while ago
21:31:14 <TrueBrain> Even my phone autocorrected π
21:31:22 <andythenorth> discord_user_f4a0790: thanks
21:31:41 <andythenorth> Rubidium_ thanks
21:31:49 <glx[d]> don't try to auto ping IRC users
21:31:52 <andythenorth> companies can't have gaps?
21:32:08 <andythenorth> e.g. if a company is bankrupt or purchased, there's no gap in the ID?
21:32:27 <Rubidium_> there will eventually be gaps
21:32:36 <andythenorth> so I need to check invalid
21:32:38 <TrueBrain> TallTyler: So if you check the archive, you will find the post :p
21:32:59 <TrueBrain> You can safely rename the file btw in a new commit
21:33:47 <TrueBrain> (And yes, also please use the correct download link too :))
21:34:22 *** discord_user_f4a0790 has joined #openttd
21:34:22 <discord_user_f4a0790> I was pinged here?
21:35:07 <discord_user_f4a0790> Ooo fair
21:36:13 <andythenorth> lol can't array.insert to an empty array
21:36:19 <andythenorth> even if index is 0
21:37:48 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:37:52 <TallTyler> Ha, more actions π
21:37:54 <TrueBrain> To make you feel better TallTyler , I did the same several times :d
21:38:08 <andythenorth> I need a squirrel complaining channel
21:38:12 <andythenorth> maybe GPT can do it
21:38:27 <TallTyler> I blame copy-and-paste, not forgetting the year π
21:40:15 <andythenorth> it's a bit too nice
21:40:31 <andythenorth> "lol, learn to program better" would be a more human answer
21:51:41 *** gelignite has quit IRC (Quit: Stay safe!)
21:55:38 <dP> dammit, I missed my chance to release cmclient before vanilla
21:55:42 *** sla_ro|master has quit IRC ()
21:58:34 <TallTyler> TrueBrain: Good to go on Reddit/Twitter/Steam posts! I'll do Discord and TT-Forums.
21:59:07 <TrueBrain> Go for it; I already did my thing with Steam and GOG
21:59:58 <TrueBrain> And releases are worth an `at everyone` :p
22:01:14 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
22:02:44 *** tokai|noir has quit IRC (Quit: c('~' )o)
22:06:02 *** ChanServ sets mode: +v tokai
22:07:02 <TallTyler> Horse release next? π
22:12:13 <andythenorth> 5 sprites left to draw for Horse 3
22:42:25 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:44:13 <dP> "try not to crash" is a questionable motto for the release π€£
22:48:01 <Eddi|zuHause> better than "try to crash"?
22:50:14 <dP> imo no, try to crash implies it's stable enough to be a challenge
22:50:32 <dP> though it's more fitting for a beta/rc
22:51:03 <Eddi|zuHause> we've already established that nobody tests rcs
23:42:50 <wao> will openttd ever have a more moddable UI?
23:48:42 <TallTyler> What do you want to add/change?
23:51:21 <dP> openttd has moddable ui, called patch packs xD
continue to next day β΅