IRC logs for #openttd on OFTC at 2025-05-30
β΄ go to previous day
00:02:04 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
00:06:50 *** WormnestAndroid has joined #openttd
00:31:17 *** WormnestAndroid has quit IRC (Remote host closed the connection)
00:38:18 *** bryjen has quit IRC (Quit: Leaving)
00:39:01 *** WormnestAndroid has joined #openttd
02:22:11 *** Wormnest has joined #openttd
02:49:06 *** gnu_jj_ has quit IRC (Ping timeout: 480 seconds)
02:58:12 *** Wormnest has quit IRC (Quit: Leaving)
03:00:06 *** herms has quit IRC (Quit: bye)
03:23:26 *** Zathras has joined #openttd
03:26:46 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:26:49 *** D-HUND has quit IRC (Ping timeout: 480 seconds)
07:15:09 *** kuhnovic has joined #openttd
07:38:57 *** toktik has quit IRC (Read error: Connection reset by peer)
08:14:33 <peter1138[d]> What's the betting that MS Teams will require me to sign in again as soon as a video meeting starts...
08:17:30 <andythenorth> well only so it can then ask you to update
08:31:59 <_zephyris> I swear login session expiry and updates are timed deliberately
08:35:15 <LordAro> it does seem to have been a bit funky recently, outlook web keeps signing me out, and another user recently complained about something similar
10:02:56 <andythenorth> any reason railtype prop 0x1D couldn't be extend to dword?
10:05:43 <andythenorth> hmm nvm, I've found the necessary clause in the Standardised Scheme π
10:07:49 <peter1138[d]> andythenorth: You mean the list of compatible types?
10:08:00 <andythenorth> I mean alternative types
10:08:11 <peter1138[d]> Erm, yes, that one.
10:08:25 <peter1138[d]> Interesting fact, you can just specify the property multiple times.
10:08:31 <andythenorth> yes, it's additive
10:08:32 <peter1138[d]> NML might have fun with that, mind you.
10:08:42 <andythenorth> that's not documented, but the standardised scheme relies on it
10:08:59 <andythenorth> as the convention is to extend RAIL and ELRL
10:11:04 <andythenorth> for basic narrow gauge, the scheme provides for `NAAN`, which needs to then set prop 0x1D to all the other possible narrow gauge labels. So `NA[foo]N` for non-electrified, where `foo` is supposed to be A to E and a to e.
10:11:15 <andythenorth> But it has been extended now to F and presumably f
10:11:37 <andythenorth> I was just going to autogenerate labels in the compile for A to Z and a to z
10:11:59 <andythenorth> should fit in a byte though
10:13:32 <andythenorth> wonder if I can one line python that π
10:17:59 <andythenorth> "please run that python code" -> GPT -> output -> "did you run the code" -> GPT -> "no I interpolated what the output would be"
10:18:19 <andythenorth> but you know, programming is a dead skill
10:19:37 <andythenorth> this is quite neat though π `labels = [f"NA{char}N" for char in string.ascii_letters]`
10:50:29 <LordAro> is it just the list comprehension that's neat, or am i missing something? :p
11:06:53 <andythenorth> it's just neat the ascii_letters exists, and happens to map (currently) to the railtype thingy
11:22:27 *** WormnestAndroid has quit IRC (Remote host closed the connection)
11:22:36 *** WormnestAndroid has joined #openttd
11:32:50 <peter1138[d]> Well, labels are actually 4 arbitrary bytes.
11:41:14 <andythenorth> aren't they just π
11:54:33 *** WormnestAndroid has quit IRC (Remote host closed the connection)
11:54:45 *** WormnestAndroid has joined #openttd
12:06:17 *** WormnestAndroid has quit IRC (Remote host closed the connection)
12:06:20 *** WormnestAndroid has joined #openttd
12:39:50 <xarick> how much value would these 2 functions add?
12:56:40 <peter1138[d]> Okay, accruing a daily average gives best results, just a shame it needs a pool iteration once a day. Could maybe spread it out over ticks?
12:57:31 <peter1138[d]> Average is `average * 30 + current_value) / 31` which I believe is reasonable for a rolling monthly average,
12:59:32 <andythenorth> hello lunch π
12:59:47 <talltyler> and lunch, but itβs not quite time for that where I am
13:01:14 <peter1138[d]> Hmm, `OnTick_Industry()` iterates the pool every tick anyway.
13:04:46 <peter1138[d]> talltyler: Never actually played a game with it, it doesn't seem to get much mention around here.
13:08:01 <peter1138[d]> I like the idea of adding more things but not ALL the things.
13:08:08 <peter1138[d]> (A bit like rail types ;-))
13:13:53 <talltyler> It's very well designed for gameplay, one of my favorite industry sets for solo games.
13:17:42 *** WormnestAndroid has quit IRC (Remote host closed the connection)
13:17:44 *** WormnestAndroid has joined #openttd
13:27:56 *** WormnestAndroid has quit IRC (Remote host closed the connection)
13:28:03 *** WormnestAndroid has joined #openttd
13:29:20 <peter1138[d]> Hmm, is there an easily accessed flag to see if stockpiling is used?
13:31:31 <andythenorth> I can't see one, iirc, the production callback being enabled might be a flag for it
13:31:43 <andythenorth> but what the grf actually does....is private
13:32:03 <andythenorth> wonder why `tile_is_railtype` returns True for missing railtypes
13:34:02 <andythenorth> oh because of the silly nml fallbacks
13:34:11 <andythenorth> I'm testing for a type that has ELRL in fallbacks
13:36:09 <andythenorth> ok how about badges for railtypes? π
13:38:19 <peter1138[d]> Like property 1E?
13:40:34 <andythenorth> readable from vehicle though? π
13:40:40 <andythenorth> no scope for that
13:41:08 <andythenorth> we have the vehicle var 0x63 stuff though
13:43:22 <peter1138[d]> That allows testing of power and compatibility.
13:48:07 <peter1138[d]> Okay, so let's say var 65 will test for a badge on the rail/road/tram type of the current vehicle.
13:49:24 <peter1138[d]> Or maybe just implement the nearby tile test for vehicles, so they can test for badges in stations too.
13:51:19 <andythenorth> intriguing idea π
13:51:27 <andythenorth> station specific vehicle sprites π
13:59:10 *** Wormnest has joined #openttd
13:59:46 <_glx_> that's why latest nighly build failed, it should not have started at all
14:09:35 *** Wormnest has quit IRC (Read error: No route to host)
14:09:52 <peter1138[d]> How has it been working recently if it's since Dec 2024?
14:13:39 <_glx_> it didn't, always triggered a new nightly even if no changes
14:15:11 <peter1138[d]> Okay, I guess that is roundaboutly explained in the PR, but wasn't clear to me.
14:25:59 <truebrain> Clearly there haven't been much days without a change, as I have seen that build failure only a handful amount of times π
14:27:43 <peter1138[d]> Well, I am obviously broken because I didn't understand the description π¦
14:30:14 <truebrain> peter1138[d]: Haha, or you are just not that deep into this part of our release stuff π
14:31:46 <peter1138[d]> If it said something like "nightlies are being built when there is no new nightly" I would've probably understood it. It just says "triggers a nightly build" but in my mind, the nightly build was already triggered otherwise this piece wouldn't be running.
14:32:40 <truebrain> I get where you are coming from. In my mind, this workflow isn't the nightly yet: it is checking whether it should trigger one
14:32:53 <truebrain> And somewhere there is the disconnect, I guess :d
14:34:17 <truebrain> It used to be needed to have it in another repo .. but I have been wondering if that still is the case
14:34:29 <truebrain> Maybe we should just move it into OpenTTD repo
14:34:54 <peter1138[d]> Anyway, is it coffee time, or tea time?
14:36:13 <andythenorth> I had coffee, might have wine
14:49:55 *** Wormnest has joined #openttd
15:02:05 *** Tirili has quit IRC (Quit: Leaving)
15:06:01 <peter1138[d]> Does FIRS stockpile?
15:08:17 <peter1138[d]> Does this difference in order matter?
15:08:26 <andythenorth> well, it uses the stockpile, because that's the implementation in OpenTTD
15:08:33 <andythenorth> but it clears the stockpile immediately on processing
15:08:43 <talltyler> Order doesn't matter to me, personally
15:08:47 <andythenorth> the order doesn't matter to me
15:08:54 <andythenorth> I will change my opinion next time I notice ;P
15:09:34 <talltyler> There's a draft PR somewhere about letting the player sort the graph, so they can choose alphabetical or value
15:09:49 *** yiffgirl has joined #openttd
15:09:49 <yiffgirl> as someone who brought pitchforks when changing the order on the right was pr'd, yeah it's fine
15:10:09 <peter1138[d]> I'm not touching the industry window, so that's not changing.
15:10:48 <peter1138[d]> I've touched the graph window, so it's now sorted by name (like it already is for the payment rate graph)
15:15:30 <peter1138[d]> Hmm, okay, the text that says in the industry window how much is waiting / stockpiled is driven by callbacks.
15:15:42 <peter1138[d]> So no simple on/off property I can test π¦
15:24:45 *** SigHunter has joined #openttd
15:46:36 <_glx_> ECS uses stockpiling I think
15:47:41 <_glx_> but I don't know if it uses the callbacks
15:47:57 <peter1138[d]> Hmm, AIs don't seem to do anything with freight in IOTC
15:51:49 <peter1138[d]> Watching John Romero play the new Doom Dark Ages.
16:09:41 <talltyler> Uh, IOTC uses callbacks for cargo value, AI might not know what to do with that π
16:09:58 <talltyler> (Custom cargo value which doesnβt depend on distance, and can be negative)
16:15:20 <xarick> what is IOTC ? internet of things cute?
16:15:41 <_glx_> industries of the carribean
16:20:45 <xarick> but I haven't dealt with filter functions, they can also crash, it's just that nobody uses them yet
16:24:06 <_glx_> filter is in constructor, the only way to work around opcode limit is replacing the constructor with filter with constructor without filter, valuate using filter, keep value 1
16:24:55 <peter1138[d]> Squishy squashy.
16:31:50 <xarick> oops mistakes on my code π¦
16:32:34 <xarick> list[item] = but there is no list anymore, it's just this
16:36:25 *** Smedles has joined #openttd
16:43:02 <peter1138[d]> Hmm, that's something I hadn't considered.
16:43:16 <peter1138[d]> Sometimes you just gotta clean your ball.
17:03:36 <andythenorth> hmm doesn't build π
17:04:19 <andythenorth> oh same as this :Dhttps://github.com/OpenTTD/OpenTTD/actions/runs/15351734494/job/43201406041?pr=14312
17:08:59 <andythenorth> "Friday Afternoon Mini Metro"
17:09:21 <peter1138[d]> It's a bit warm.
17:14:21 <andythenorth> should I patch nml? π
17:17:16 <andythenorth> peter1138[d]: works
17:17:48 *** Wormnest has quit IRC (Quit: Leaving)
17:22:01 <peter1138[d]> Now you just need a standardised badge scheme for standardised rail types and... yeah... not all that useful :p
17:23:33 <andythenorth> it reduces the yak-shaving for compatible and alternative and powered
17:23:40 <andythenorth> which is 6x harder than needed
17:44:34 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
17:47:58 *** WormnestAndroid has joined #openttd
17:54:31 <peter1138[d]> Ah the old "update file" commit message
17:55:00 <andythenorth> 14312 is probably fine, can you merge it? π
17:55:09 <andythenorth> I can do the one line nml patch
17:56:15 <xarick> hmm how do I proceed from there
18:16:47 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
18:23:25 *** WormnestAndroid has joined #openttd
18:27:32 *** kuka_lie has joined #openttd
18:37:35 <fairyflossy> ...so we are getting badges on tracks in the end?
18:42:27 <peter1138[d]> Badges already exist on tracks.
18:43:10 <peter1138[d]> They are not involved in power and compatibility decisions.
18:47:16 <andythenorth> they're an elegant solution for stuff like 'go faster if fancy signals'
18:47:23 <andythenorth> they might solve rack rail too
18:47:33 <andythenorth> rack rail description in the standardised scheme is lolz
18:47:40 <andythenorth> "do this, and do this, but neither works"
18:49:54 <andythenorth> or `badge rail_behaviour/has_rack` (argue the words later)
18:50:11 <andythenorth> then change engine props accordingly
18:50:50 <andythenorth> hmm waypoint badges
18:57:52 <xarick> GSVehicleList.constructorCompat15 <- GSVehicleList.constructor this cursed coding works, kinda
19:14:52 <peter1138[d]> Oops, side-tracked again.
19:20:51 <peter1138[d]> Tempted to go much further with #14309
19:22:12 <peter1138[d]> And the data comes from?
19:22:35 <andythenorth> I'm just the project manager
19:24:21 <andythenorth> oops seems I posted in the wrong channels
19:24:27 <_glx_> xarick: that fills very wrong
19:24:29 <andythenorth> hmm `railtype_has_badge` though?
19:24:46 <andythenorth> `roadtype_has_badge`, `tramtype_has_badge`?
19:25:06 <andythenorth> I think we can just duplicate the assignments for road and tram to var 0x65 with same params, different token
19:25:51 <andythenorth> or we use the existing `tile_[predicate_foo]` pattern
19:26:02 <andythenorth> which assumes that tile == railtype, for vehicles
19:27:08 <xarick> i was trying to print class name but don't know how
19:29:06 <andythenorth> xarick: maybe you need a code generator π
19:29:18 <_glx_> there's no way to print classname IIRC
19:30:00 <andythenorth> there might be if you store the name in a prop on the class in advance
19:30:17 <_glx_> squirrel doesn't do that IIRC
19:31:45 <andythenorth> AI author can though
19:32:17 <andythenorth> there are some extensible print methods, I forgot what they do
19:39:20 <_glx_> there's `typeof` but it defaults to "instance" (I once made it return the proper type, but it broke many exisiting strings so I reverted)
19:40:36 <andythenorth> hmm I can't base an nml patch on master
19:40:47 <andythenorth> it relies on badge support in 359
19:41:05 <andythenorth> `badge_parameter`
19:41:24 <andythenorth> can I branch from 359, or is that not really done?
19:45:56 <xarick> this.getclass() gives me an unique memory address i think
19:47:34 <_glx_> but you don't need the class name
19:48:40 <_glx_> all that just for debug statement
19:50:51 <_glx_> you could do `GSTownList._typeof <- function() { return "GSTownList"; }`
19:51:46 <_glx_> then you can print `typeof this` in your debug line
19:52:29 <_glx_> but that will break anything expecting `typeof this` to return "instance"
20:03:18 <andythenorth> you could add __class__ namespace π
20:03:21 <andythenorth> and add __name__
20:04:04 <_glx_> squirrel relies on metamethod for that
20:04:40 <andythenorth> I've not touched GS for 12 months, have forgotten all squirrel π
20:05:15 <_glx_> there's usually no need to know the name
20:15:57 <xarick> local list = this.constructorCompat15(); this doesn't do what I want
20:18:34 <xarick> constructor doesn't return anything right? π¦ oh well
20:21:43 <andythenorth> ha ha we have been busy π v
20:26:33 <_glx_> xarick: IIRC `constructor` doesn't return anything
20:27:03 <_glx_> but it should create the c++ object and link it to `this`
20:27:45 <xarick> I just realized that :p
20:30:15 <peter1138[d]> Hmm. So much side-tracking π¦
20:34:27 <_glx_> this.constructorCompat15(filter[, arg1, ...]);
20:34:27 <_glx_> if (!e.find("CPU")) throw e;
20:34:29 <_glx_> this.Valuate(filter, [, arg1, ...]); // using your slow valuate probably
20:35:58 <xarick> squirrel accepts [, ...] things?
20:46:15 <_glx_> no it's just syntax simplification
20:47:32 <_glx_> but your version should partially be fine except when constructor has required args before the filter
20:50:40 <xarick> case 1: foreach(item, _ in this) if (!vargv[0]()) this[item] = null; return;
20:52:10 <xarick> case 2: foreach (item, _ in this) if (!vargv[0](vargv[1])) this[item] = null; return;
20:57:21 *** kuka_lie has quit IRC (Remote host closed the connection)
21:01:44 <xarick> hmm wrong number of parameters, i failed
21:16:42 <_zephyris> andythenorth: I had no idea this existed! Great document, and looks like a big thank you to frosch123
21:19:13 <xarick> I'm not checking if the filter_function returns bool
21:26:12 *** Flygon has quit IRC (Read error: Connection reset by peer)
21:27:46 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:37:17 <xarick> this gonna be costly in ops
21:44:04 <xarick> oh, the actual filter function: `local filter_function = function(item, out, max) { return GSBase.Chance(out, max); };`
21:57:48 <andythenorth> now I see your sidequest
21:59:35 <andythenorth> do you get a badge for each quest completed?
22:01:10 *** tokai|noir has joined #openttd
22:01:10 *** ChanServ sets mode: +v tokai|noir
22:08:11 *** tokai has quit IRC (Ping timeout: 480 seconds)
22:09:19 <andythenorth> I've forgotten what quest I was on
22:09:25 <andythenorth> something about trains
22:13:52 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:15:11 <andythenorth> oh I was playing OpenTTD
22:15:29 <andythenorth> then I built a PR and patched my grf
22:15:35 <andythenorth> wonder if I've broken my savegame π
22:16:35 <peter1138[d]> Sidequest did you say?
22:17:06 <andythenorth> have you considered faking the data to test if anyone is checking? π
22:17:46 <peter1138[d]> So this is 1) let's add history for cargo accepted as well as produced 2) let's add highlighting because now there's a lot of data 3) let's extend it from just months to quarters and years as well.
22:18:07 <peter1138[d]> It's easier to just run a few years with AIs.
22:18:08 <andythenorth> oh dear, I failed to save for some time
22:19:35 <andythenorth> "errors of omission and comission"
22:19:41 <peter1138[d]> Quarters can be more revealing...
22:20:24 <andythenorth> inclined to try and use this in FIRS GS
22:20:40 <andythenorth> production history
22:20:50 <andythenorth> GS stuff is usually patchable
22:20:58 <peter1138[d]> Yeah, there's no script interface for this.
22:21:04 <andythenorth> I started writing some concept about industry happiness
22:21:07 <peter1138[d]> Also you "joked" about NewGRF graphs earlier.
22:21:12 <andythenorth> I forget waht, it was all squirrel
22:21:15 <peter1138[d]> But actually, GS graphs could be a thing.
22:21:40 <peter1138[d]> Cargo monitors have their uses, but... monitoring everything is kinda awkward.
22:22:32 <andythenorth> it's a bit yak-shavey
22:22:39 <andythenorth> I think I just set up some massive loop for it
22:23:09 <peter1138[d]> Cargo monitors support per-company stats though.
22:24:51 <andythenorth> whatever this was supposed to be, is buried under an Iron Horse rewrite
22:25:02 <andythenorth> I'm sure it was a good idea at the time
22:25:27 <andythenorth> GS is under-used π
22:36:16 <andythenorth> hmm so you're saying with #14314 I could stop setting FIRS payment rates just to space them out on the graph?
22:36:28 <andythenorth> there's an algorithm that forces them apart
22:36:33 <andythenorth> "such a balanced game"
23:53:51 *** tateisukannanirase has joined #openttd
23:53:51 <tateisukannanirase> What IDE and debugging tools are people using these days? I want to try and fix the bus dt stop occupancy issue again but I will try and start with a bit more tooling than Sublime and a terminal window this time.
continue to next day β΅