IRC logs for #openttd on OFTC at 2026-02-07
⏴ go to previous day
00:00:18 <_glx_> wrong airport hangar and they become invisible ?
00:00:39 <lea001> xarick: Are you on the release this year?
00:01:10 <xarick> was something changed regarding heading to hangars?
00:02:51 <lea001> No, I fixed issues related to that in the last release of ClulessPlus, and YOLO-enabled planes as default. 🙂 But apparently it wasn't as stable as I thought.
00:02:51 <_glx_> IIRC scripts can only see one hangar if airport has more than one
00:04:27 <_glx_> so if planes use goto to closest depot it might be an issue
00:04:33 <lea001> xarick: What are their names?
00:05:29 <lea001> Could also just be that the AI is busy pathfinding or similar.
00:05:44 <xarick> they're not stopped, they're in the hangar they're told to go, but don't stop, weird bug
00:06:52 <xarick> was this a go to nearest hangar order?
00:06:57 <xarick> i'll investigate tomorrow
00:07:49 <_glx_> and there's only one hangar in these airports it seems
00:07:55 <lea001> The AI use both that or explicit depot orders IIRC. In different situations.
00:08:53 <xarick> I suspect it's a me problem :(
00:09:42 <_glx_> could be something wrong with handling of OF_STOP_IN_DEPOT in openttd
00:10:17 <xarick> but it was to solve high cpu spikes from the pathfinder on road vehicles
00:10:54 <xarick> but this used to be tile 0
00:11:37 <_glx_> on the screenshot orders for T83 are explicit and clearly marked as stop in depot
00:14:42 <lea001> In version 39 of CluelessPlus it did accidentally also set the non-stop order when sending aircraft to airports. v40 fixes that so they actually go to the hangar.
00:14:42 <lea001> I didn't observe issues with selling them, but I am in my bed already so cannot check right now. (:
00:17:58 <xarick> tested in 15.1, no issue
00:18:25 <xarick> this is only happening in master, something very recently must have caused it, last month
00:19:47 <xarick> got no time to check, bed, good night
00:21:47 <_glx_> yeah I just tested and it seems Stop has no effect
00:26:03 *** Timberwolf has quit IRC (Remote host closed the connection)
00:27:49 <_glx_> but only for planes, and it's fine in 15.1
01:24:40 *** aperezdc has quit IRC (Ping timeout: 480 seconds)
01:48:34 <Zathras_4> is there a way to pause a server if no client is connected? I seem to remember an option for that but cannot find it anymore.
01:48:57 <Zathras_4> mayhap I just dreamt that? :)
01:55:32 <_glx_> yes there's a setting for that
01:56:21 <_glx_> it's `min_active_clients`
02:04:38 <Zathras_4> _glx_: thanks a lot! I was searching for something with pause, hehe
02:35:09 *** MinchinWeb[m] has quit IRC (Ping timeout: 480 seconds)
02:36:03 *** MinchinWeb[m] has joined #openttd
03:03:38 *** Extrems` has joined #openttd
03:03:38 *** Extrems has quit IRC (Remote host closed the connection)
03:03:41 *** Extrems` is now known as Extrems
03:16:46 *** aperezdc has joined #openttd
04:08:26 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
04:08:52 *** WormnestAndroid has joined #openttd
04:13:44 *** Wormnest has joined #openttd
04:13:45 *** WormnestAndroid has quit IRC (Remote host closed the connection)
04:14:33 *** WormnestAndroid has joined #openttd
04:29:05 *** Zathras_1 has joined #openttd
04:32:25 *** Zathras_4 has quit IRC (Ping timeout: 480 seconds)
05:45:29 *** MinchinWeb[m] has quit IRC (Ping timeout: 480 seconds)
05:46:29 *** MinchinWeb[m] has joined #openttd
05:47:18 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
05:47:36 *** WormnestAndroid has joined #openttd
05:47:43 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
05:47:44 *** WormnestAndroid has joined #openttd
05:52:42 <jfkuayue> I saw it. I said it. I sorted it.
06:38:46 <jfkuayue> I remember when I tried to say caesar sauce in english for the first time, didn’t realise the english pronunciation was different from original… but finally got the sauce
07:16:29 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
09:28:01 <LordAro> presumably there's nothing stopping a change to the save data to store the actual names rather than the indexes?
09:28:14 <LordAro> other than time and effort, obviously
09:28:33 *** Zathras_7 has joined #openttd
09:36:23 <Rubidium> you would still need to keep the old townname generators around for loading old saves and you still can't change them
09:39:23 *** Zathras_1 has quit IRC (Quit: Connection reset by beer!)
11:35:33 *** Timberwolf has joined #openttd
11:59:25 <xarick> the helicopter explodes if no hangar exists, interesting
12:07:18 *** r00tina has joined #openttd
12:14:45 <xarick> maybe my suggestion about empty string is bad :| didn't give it much though
12:16:43 *** r00tina has quit IRC (Quit: Page closed)
12:27:51 <lea001> If it is just for this case, I can release an update, but the question is I guess a wider issue that there is just a lot of potential race conditions in AI codes that can casue them to fail pre conditions. It feels like API returning null is valid, just wonder if it is documented that it does that?
12:29:21 <lea001> The correct way for AIs to handle these kind of race conditions is likely to check the return value from the API, rather than checking the inputs prior to calling. If I am not mistaken CluelessPlus in this case grabs the input value from list of vehicles, and during the processing a vehicle did crash in the game so the id becomes invalid.
12:29:55 <lea001> It is just so many places that an id could end up invalid under the foot of the AI. 🙂
12:31:48 <Rubidium> for the real fun... it could end up valid (again), but for a completely different vehicle
12:43:37 <lea001> AIs is just hard, they are unpredictable, hard to write CI/CD tests for, uses a dynamic language with no hard type checks etc. 🙂
12:45:15 <andythenorth[d]> get an LLM to write one
12:45:38 <andythenorth[d]> that would be lolz, as squirrel is such a tiny language, the models will likely fail hard
13:07:21 <peter1138> 12:14 < xarick> maybe my suggestion about empty string is bad :| didn't give it much though
13:09:34 *** WormnestAndroid has joined #openttd
13:17:43 <_glx_> hmm and skipping invalid IDs inside Valuate is almost impossible to do too
13:19:37 <_glx_> since ID is just a number without any info about what it refers too
13:21:14 <peter1138> The script "needs" to check if each is valid ... or just handle the appropriate return value when it's not. Like handle the null.
13:22:32 <peter1138> I guess the new suspendable valuate stuff makes this more likely to occur, but it was always possible for other loops done in scripting to have the same problem
13:23:08 <lea001> I think there might be an issue that the API is not declared to return null. But maybe I am just to used to other languages these days where nullable is a separate type?
13:23:36 <peter1138> Basically if it's a string, then it could be null.
13:25:55 <lea001> Ok. Great. I am with you that I don't think the API should change as any change is the chance to break some other script in unpredictable ways.
13:28:50 <lea001> This is a bug in SuperLib/ClueslessPlus. Thanks xarick for bringing it to attention.
13:35:42 <_glx_> and yes suspendable valuate makes invalid id easier to happen, but it was already possible with custom for loops
13:39:14 <lea001> Maybe the info you wrote @glx should be in the docs somewhere:
13:39:14 <lea001> > Anyway, failed precondition return value depends on return type:
13:39:15 <lea001> > any other type: the invalid value specific to the type
13:41:18 <lea001> or maybe it is, but good thing to check if it is in the wiki already.
13:47:26 <_glx_> I don't think this is mentionned anywhere in the docs
13:53:01 <lea001> If it is possible to have this as part of the documented public facing API, then scripts could handle the null on GetName(). Or maybe it always should be null-aware for string API:s.
14:01:18 <peter1138> Well, scripts can handle it without being documented, but if it's documented then it's clearly wrong when they don't.
14:01:40 *** Wormnest has joined #openttd
14:14:01 <xarick> I'm starting another OpenTTD dev run, with 15238 fix already in
14:23:23 <peter1138> So you "approved" it before testing it?
14:23:35 <xarick> i tested earlier today
14:27:59 <xarick> what a difference it makes: CluelessPlus is now thriving
14:37:40 <_glx_> being able to actually sell planes makes a difference 🙂
15:06:19 *** yiffgirl has joined #openttd
15:06:19 <yiffgirl> > I almost no knowledge of C++ programming but my gut feeling is that this would be aq very easy option to add,
15:25:25 <_glx_> it's not super hard to remove exclusive fullscreen, but a lot of things need to be touched to make it behave properly
15:28:12 <peter1138> Then you need to add windowed, windowed fullscreen, and exclusive fullscreen modes, because someone will object.
15:31:54 <xarick> AroAI doing bad, due to tons of road vehicle jams
15:32:09 <xarick> caused by... Admiral/Clueless
15:36:48 <xarick> road vehicle breakdowns are super aggressive
15:40:08 <xarick> CluelessPlus script just crashed, again the 'len'
15:42:17 <xarick> it was doing well though
16:07:35 <xarick> since 1980, it's 1994 now
16:07:49 <xarick> doesn't seem to be doing any construction
16:10:30 <xarick> new vehicles is due to autoreplace
16:12:55 <LordAro> xarick: as i recall, the vast majority of my testing of AroAI was on its own with TTRS
16:19:03 <_glx_> based on the log I could guess it's in an infinite waiting for money loop somewhere
16:19:36 <_glx_> and somehow never detects money is back
16:22:16 <lea001> xarick: Good to have another data point on it. So for your setup it looks like it is not uncommon to occur.
16:23:24 <_glx_> side effect of suspendable valuate
16:23:44 <lea001> is that in 15.x, or just in master?
16:24:06 <_glx_> valuate is spread over multiple ticks
16:25:20 <_glx_> so referenced item may disappear during the sleep in middle of valuate
16:25:23 <lea001> God to know. I have so far this decade mainly tested AIs with stable.
16:25:53 <xarick> not sure what AroAI was trying to do
16:26:37 <_glx_> the new valuate is similar to a squirrel for loop over the list
16:27:08 <_glx_> with all possible effects of changing ticks while iterating
16:34:29 <lea001> _glx_: sounds overall better than crashing scripts for taking too long in a valuate even though it may cause some side effects due to splitting execution over multiple ticks.
16:34:53 <lea001> and allows hopefully for more stable frame rate of the game
16:35:26 <_glx_> yeah spreading removes the CPU peaks
16:37:16 <_glx_> but deleting or clearing a huge list still affects CPU
16:39:35 <_glx_> explicit clear can be made suspendable, but the implicit clear of list object destruction is not suspendable (deep inside c++ std lib)
17:14:21 <xarick> who actually owns WrightAI?
17:19:42 <xarick> the chance of vehicle 12269 being invalid is 0.00000001%
17:20:01 <LordAro> xarick: what maths did you do to come up with that figure?
17:20:04 <xarick> this.distance_of_route must have another vehicle id
17:20:19 <xarick> because the list of vehicles has just been created
17:21:42 <talltyler> That’s a real “goes it remove limitation” PR 🙂
17:23:59 <kuhnovic> Too harsh? I'm sick so I'm more cranky than usual 😇
17:26:51 <andythenorth[d]> obviously I might be wrong, not pointing fingers
17:29:21 <ahyangyi> The PR changes the limit to 50 though
17:32:18 <kuhnovic> ahyangyi: No they changed the default to 50, and the limit to 255. I see no reason to change the default.
17:35:09 <ahyangyi> I used the term "limit" liberally to mean "the limit of the train length" instead of "the limit of what you can adjust in settings"
17:35:23 <_glx_> I don't see valid reason for more than 64 tiles
17:35:45 <ahyangyi> Nobody sees any reason, valid or not, because they have posted none.
17:36:14 <xarick> if stations could be curved, 64 tiles
17:38:52 <ahyangyi> Or, trains longer than platforms
17:40:28 <ahyangyi> I wonder if anyone wants to explore the possibility of one train simultaneously loading or unloading from two platforms of the same station
17:40:54 <ahyangyi> ( simultaneously interacting with two stations is probably not worth talking about )
17:48:39 <xarick> that's a 64 tile train
17:49:23 <_glx_> and it will take hours to load from binhill mines
17:51:30 <xarick> i tried to make all one station
17:51:51 <xarick> didn't stop at the right place :(
17:56:12 <xarick> a bit of nudging it into the right place, but it still takes a long time to load
18:10:44 <gwyd4016> Where's that link to the OpenTTD usage stats? Like the different distribution of different settings etc
18:17:28 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
18:31:35 <lea001> _glx_: Oh.. only 40% actually have start year in 1950 (survey: 2025, Q3, version 14)
18:33:53 <lea001> Toyland for last week is up from 0.8% in 25-Q3 to 1.3% now (version 15.1, week 5).
18:57:18 <xarick> snapshot: PAXLink is... surprisingly not crashing and not struggling
18:58:19 <xarick> 58 million in the bank
19:21:51 *** goddess_ishtar has quit IRC (Quit: User went offline on Discord a while ago)
19:41:37 <xarick> oh, Zuu is the SuperLib author
19:43:02 <xarick> I have a confusing question
19:43:17 <xarick> how does a library and a script versions interact?
19:43:50 <xarick> AI requires API 14, library requires API 1.10
20:01:07 <lea001> xarick: PAX Link is a hit or miss AI. It is not that bad at late game tactics, but it is not good at surviving the early years. :p
20:02:07 <lea001> xarick: The AI decides which compat files that are loaded. The declaration by the library I beleive is just for information to the AI author.
20:03:33 <lea001> CluelessPlus v40 uses API level 15, while it uses SuperLib v39 which declares API 1.1. So CluelessPlus v40 had to do some monkey patching to make SuperLib v39 run on API level 15.
20:04:52 <lea001> xarick: money in bank means the AI has saturated at its capability to spend it to make even more money.
20:15:16 <xarick> WrightAI code is a little buggy
20:15:58 <lea001> Many AIs are a little buggy. Including CluelessPlus too. The more I look on it (or PAX Link), the more problems I see.
20:17:05 <lea001> But I think there will be a new CluelessPlus-release soon for the str.len() fix.
20:22:00 <_glx_> the plus on using SuperLib is, once the string handling bug is fixed, all AIs using the library will benefit from the fix
20:23:18 <peter1138> Do they automatically use a newer version?
20:26:35 <xarick> nop, they import by version
20:27:40 <xarick> the AI author needs to import the SuperLib version with the fix
20:30:56 <xarick> `this.name = AICompany.GetName(AICompany.COMPANY_SELF);` WrightAI has this thing. I don't think that's how it works
20:32:30 <xarick> okay, I'm wrong :) it actually works
20:34:43 <_glx_> why would it be wrong ?
20:35:10 <_glx_> COMPANY_SELF is first translated to the correct CompanyID
20:36:36 <_glx_> and indeed `import` uses hard versioning
21:03:10 <lea001> _glx_: That was the idea of the library. But I don't know. It is almost half an AI in a library.
21:03:10 <lea001> Some things in it possible nowdays have better support in AI API:s and could be removed.
21:05:51 <lea001> It does have some useful things though, such as the tile patterns to use to estimate the queue length of airplanes waiting to land on different airports.
21:10:19 <lea001> And high level things for station building, road building etc. that could help some ppl get started writing their AI. But possible many ppl then figure out ways to do that smarter. 🙂
21:35:45 *** Smedles_ has joined #openttd
21:36:00 *** Smedles__ has joined #openttd
21:36:03 *** Smedles has quit IRC (Read error: Connection reset by peer)
21:39:31 *** Smedles__ has quit IRC (Remote host closed the connection)
21:40:40 *** Smedles has joined #openttd
21:43:47 *** Smedles_ has quit IRC (Ping timeout: 480 seconds)
22:07:57 *** SigHunter has quit IRC (Remote host closed the connection)
22:09:29 <xarick> hmm yeah, the logic to check if a vehicle is already heading to a depot without resorting to lists and tables is this:
22:09:52 <xarick> `if (AIVehicle.GetState(i) != AIVehicle.VS_CRASHED && !AIVehicle.IsStoppedInDepot(i) && (AIOrder.IsCurrentOrderPartOfOrderList(i) || !AIOrder.IsGotoDepotOrder(i, AIOrder.ORDER_CURRENT) || (AIOrder.GetOrderFlags(i, AIOrder.ORDER_CURRENT) & AIOrder.OF_STOP_IN_DEPOT) == 0)) {`
22:10:04 *** SigHunter has joined #openttd
22:10:25 <xarick> WrightAI was using some table
22:10:56 <xarick> but vehicle_ids change
22:23:02 <jfkuayue> I would, should, could have had done it in 28 hours, if I didn’t choose to head straight into the hotel, but to catch the next bus to JOG on 2 April
22:23:02 <jfkuayue> And the reverse should be doable in 24h, since when I last checked, Wick-Penzance was 21.05 by train (if on time)
22:33:56 <lea001> xarick: Looks like I did. I am a bit rusty with this.
22:34:21 <lea001> Thanks for letting me know.
22:35:34 <lea001> But I think it is the right file in BaNaNaS. But will fix the forum post.
22:36:16 <LordAro> pretty sure bananas would shout at you on upload if it didn't match
22:36:51 <Rubidium> LordAro: by bicycle?
22:37:26 <LordAro> given the record is something like 43 hours, a bit slow really
22:38:49 <jfkuayue> I can’t imagine any cycling > 10km
22:39:12 <lea001> xarick: It is now fixed.
22:39:54 <xarick> nice, I'm just starting a new run, this time a 1024x512 size map
22:41:19 <lea001> How do you get those table windows, is that a GS that adds them?
22:42:23 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:44:13 <LordAro> jfkuayue: i maintain that almost anyone could cycle 30k with zero preparation
22:46:33 <_glx_> yup 30k is not very much
22:48:19 <_glx_> I did it in 1995 to go to school (15km from home), but only 2.5 days because bike stolen the 3rd day
22:49:30 <belajalilija> Yeah that’s perfectly doable
22:49:35 <lea001> Oh, is it this one: (GS on Xarick's screen)
22:50:37 <belajalilija> I can quite comfortably walk 15km without prep, i can’t imagine biking 30 would be harder
22:51:13 <_glx_> if the road is not flat in can be harder 🙂
22:51:34 <lea001> depends on if it is an up or down slope. 🙂
22:52:07 <belajalilija> Yeah the whole reason i don’t bike is because my area isn’t flat
22:52:21 <_glx_> on foot it's easier for me to go up than down
22:52:36 <belajalilija> But I’m just assuming that anyone biking 30km is doing it somewhere flatter
22:54:07 <belajalilija> Think the most I’ve done in a day was close to 20km
22:54:25 <belajalilija> I ended to getting drunk and ubering home
22:54:53 <belajalilija> Anyone who is remotely healthy could do that
22:54:56 <mmtunligit> 30k on a bike is pretty easy yeah
22:55:10 <mmtunligit> ive done 80 with zero prep
22:55:41 <_glx_> but now I can drive, so it's easier even if it can take longer with trafic
22:57:24 <belajalilija> The only thing i really envy about people who live in flat places is the ability to bike tbh
22:58:39 <mmtunligit> i mean i biked even when i lived in hilly places
23:01:22 <belajalilija> Like, the only flat direction from my town is west and that just takes you to post industrial urban decay :kek:
23:01:58 <belajalilija> Valleys or sea on the other sides
23:02:34 <mmtunligit> once i realized i could go places on my own id pretty regularly bike this and back
23:03:08 <mmtunligit> that spike there is known as "heartbreak hill"
23:04:59 <lea001> lea001: But also wind towards you can be as challenging as an up slope.
23:06:27 <belajalilija> 11miles is about 17,6km
23:08:03 <belajalilija> Going south is better
23:09:58 <belajalilija> West is flat but you bike will be stolen and sold for heroin
23:14:46 <belajalilija> This is an interesting thing about perception i guess
23:15:49 <belajalilija> Because i don’t consider my area really hilly, just too hilly to bike for transport or enjoyment
23:31:10 <xarick> one day we'll have a MasterHellish AI
23:32:50 <lea001> It has been teased at streams.
23:45:15 <xarick> snapshot, before heading to bed
23:45:34 <xarick> map is maybe too large
23:46:24 <xarick> WrightAI has a problem, it doesn't take into account max distance
23:46:44 <xarick> breakdowns ruins his profits
23:47:34 <xarick> not sure I want to fix it by adding limit to a max distance
23:47:53 <xarick> becomes less of WrightAI
23:48:05 <xarick> and something of my own, which I want to avoid
continue to next day ⏵