IRC logs for #openttd on OFTC at 2025-11-03
⏴ go to previous day
00:44:39 <alfagamma7> andythenorth: That makes me sad ngl
00:44:39 <alfagamma7> Wdym OpenTTD is not for making digital railway dioramas???? /S
01:37:35 *** Wormnest has quit IRC (Quit: Leaving)
02:12:35 *** jonathanrobert0718 has joined #openttd
02:12:35 <jonathanrobert0718> I'll help the first 10 people interested on how to start earning $50k or more within a week, but you will reimburse me 10% of your profits when you receive it. Note: only interested people should send a friend request or send me a dm! asking (HOW)
02:12:35 <jonathanrobert0718> Telegram username below 👇
02:12:35 <jonathanrobert0718> @Jonathanman123
02:42:18 *** Zathras_4 has joined #openttd
03:56:44 *** gnu_jj_ has quit IRC (Ping timeout: 480 seconds)
04:35:35 *** Zathras_11 has joined #openttd
04:35:48 *** Zathras_1 has joined #openttd
04:39:10 *** Zathras_4 has quit IRC (Ping timeout: 480 seconds)
04:39:10 *** Zathras has quit IRC (Ping timeout: 480 seconds)
04:53:00 *** lobster has quit IRC (Read error: Connection reset by peer)
04:53:28 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
04:53:32 *** WormnestAndroid has joined #openttd
04:53:37 *** lobster has joined #openttd
04:53:40 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
04:53:41 *** WormnestAndroid has joined #openttd
07:06:02 <DorpsGek> - Add: summary for week 44 of 2025 (by OpenTTD Survey)
07:12:35 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
07:12:41 *** WormnestAndroid has joined #openttd
07:18:09 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
07:18:43 *** WormnestAndroid has joined #openttd
07:46:37 *** SigHunter has joined #openttd
08:33:10 <peter1138> Hmm, now that I have GCC 14.2 I'm plagued with the maybe uninitialized pool index :(
08:40:20 <LordAro> have you tried initialising it? :p
08:40:42 <peter1138> Have you seen how pools work?
08:41:37 <peter1138> index is initialized by the pool, before the object is actually constructed.
08:42:48 <peter1138> When we call "new Vehicle()" we have no idea what the index is.
08:52:25 <peter1138> Hmm, how does std::map::swap manage to keep iterators valid?
08:54:03 <peter1138> Hmm, or do they simply still reference the original data, which is now on a different std::map.
08:54:39 <peter1138> (In which case they are only "technically" valid)
09:08:02 *** yozora3 has joined #openttd
09:08:02 <yozora3> Just to be sure here, there are not any plans to completely remove the track/road dropdown menu?
09:09:06 <reldred> I mean there's been enough violent protest on Rito's PR that I'm pretty sure he was putting it behind a settings menu option.
09:12:15 <LordAro> nah, we're removing tracks entirely
09:12:19 <LordAro> ships and aircraft only
09:13:27 <peter1138> NRT - No road types.
09:15:10 <yozora3> well hopefully dropdown stays, it's already much better as it is than anything i have seen in many other games
09:20:34 <peter1138> Hmm, anyone have a large vanilla savegame with cdist in use?
10:12:16 <peter1138> Oops, I broke things again.
11:03:41 <xarick> dang it, this was difficult to reproduce
11:04:36 <xarick> I knew my iterator retarget was bonkers, but actually finding a way to reproduce the bad behaviour was difficult
11:07:23 <xarick> first we call list.Begin
11:07:53 <xarick> and call list next twice
11:19:51 <xarick> either I'm not seeing the big picture, or std::map, std::set don't need iterator retargeting...
11:20:26 <xarick> removed the retargeted code
11:20:45 <xarick> and Next now produces the correct values
12:13:39 *** WormnestAndroid has quit IRC (Remote host closed the connection)
12:13:42 *** WormnestAndroid has joined #openttd
12:15:23 <xarick> the clone list feature isn't copying the iterator positions 🙁
12:57:30 <_glx_> xarick: Why would the clone copy iterator? It's a new list
13:00:01 <_glx_> Might be possible using some `std::distance` and `std::next` but why?
13:05:17 <xarick> I don't know how practicable it is
13:05:53 <xarick> would it be something expected?
13:07:07 <xarick> i clone a list and wanna continue to the next item on the new list
13:07:29 <xarick> but can't think of a use case for myself
13:08:31 *** lobster has quit IRC (Read error: Connection reset by peer)
13:09:08 *** lobster has joined #openttd
14:00:35 <_glx_> _glx_: actually it's way harder than that, especially for by value sorters, simpler to assume the clone iterator is not initialised
14:11:05 <peter1138> Oh, maybe it's inverted condition.
14:15:49 <xarick> is `this->items.swap(list->items);` the same as `std::swap(this->items, list->items);`?
14:16:31 <xarick> this->items is a std::map
14:24:05 <peter1138> It's not the same, no.
14:26:43 <peter1138> It's likely what you want.
14:38:36 <andythenorth> did I miss anything interesting?
14:47:26 <peter1138> andythenorth, I can't find how to get to this secret area.
14:54:02 *** Rito12 has quit IRC (Quit: Lost terminal)
14:59:07 <andythenorth> peter1138 did you try `go north`
14:59:15 <andythenorth> or `talk to the goblin`?
15:08:06 <ahyangyi> Sounds like a MUD game in 1994
15:08:32 <peter1138> I tried "load the wad in an editor to see the line specials" but the editor doesn't understand modern doom maps.
15:11:46 <andythenorth> my life could have been so different if I'd found a mac wad editor
15:11:50 <andythenorth> before I found grfcodec
15:13:47 *** Wormnest has joined #openttd
15:16:43 <rito12_51026> Could we get a preview for #14605 and #14703 ?
15:28:52 <xarick> oh crap, JGR still doesn't have the clone feature in
15:29:18 <xarick> can't do apples to apples comparison
15:33:08 <rito12_51026> I don't know how to write it in a few words
15:33:52 <rito12_51026> so it is in a few sentences
15:43:56 <Borg> andythenorth: you can try port my ZETH to MAC ;>
15:44:34 <Borg> but ZETH is old.. doesnt understand UDF
15:48:09 <xarick> well, not an official openttd bug, just a JGR bug
15:48:54 <xarick> i better point out the issue, let me edit screenshots
15:56:42 <xarick> SetIterValue probably the problem
16:00:52 <xarick> not sure about the other two
16:01:05 <xarick> refining my test so that it can't return 0's
16:08:01 <xarick> nep, value ascending and descending are fine, just retested
16:32:44 <peter1138> If that's the value *after* IsEnd is reached, then it's basically bogus.
16:39:12 <Borg> hah.. I like how YAPF works. I have loops.. and trains really take detours sometimes. when track is busy
16:57:53 <_glx_> noticed by accident when reading logs from #359 checks
17:08:50 *** Zathras_4 has joined #openttd
17:11:33 <xarick> a bit more detail shows, it's about the list.IsEnd
17:14:09 <_glx_> since `IsEnd` is `return this->list->items.empty() || this->has_no_more_items;` I'd guess `has_no_more_items` is not updated properly
17:23:13 <_glx_> one sorts by item, the other by value
17:23:26 <_glx_> so by item doesn't care about the value
17:24:13 <xarick> well master does something
17:24:27 <xarick> removes item on value change
17:25:25 <_glx_> master doesn't have value change handler
17:26:46 <xarick> gonna investigate better. for me /* do nothing */ seems to be the problem
17:27:45 <_glx_> I'm quite sure it's not related
17:31:00 <xarick> checking all cases that call SetIterValue
17:31:35 <xarick> maybe changing this here may break behaviour somewhere else
17:31:36 <locosage> how to remove field from the savegame nowadays? do I need to update sl version?
17:56:20 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
17:56:57 *** WormnestAndroid has joined #openttd
18:05:48 *** Flygon has quit IRC (Read error: Connection reset by peer)
18:10:57 <xarick> JGR doesn't like my script for some reason
18:41:21 <peter1138> Hmm, this one is a bit noisy :(
18:46:02 <peter1138> 16x16 repeating pattern over the map?
18:51:37 <xarick> I feel I'm doing something fishy...
18:54:44 <xarick> converting from safe btee map/set to std map/set, i found out that I could remove "retarget iterator", and "post erase". However, "value change" was expanded to also cover sort by item sorter.
18:55:15 <xarick> post erase still elusive for me
18:55:22 <xarick> I wish i could understand
19:23:47 <locosage> though just hardcoding one "random enough" pattern is indeed an option
19:24:10 <locosage> but it doesn't make much difference for performance afaict, just simplifies the code a bit
19:25:33 <_jgr_> xarick: Post the script somewhere and I will take a look in a bit
19:26:52 <mmtunligit> locosage: i think generating random patterns is a better solution anyway, if it was the same every single time maybe it would get noticed and irksome
19:32:34 *** gelignite has joined #openttd
19:50:29 <andythenorth> pre-generated entropy works pretty well in games usually
19:50:44 <andythenorth> out of context comment though, no idea if that's relevant here 😛
20:12:07 <xarick> flip rotate, mirror to try to disguise it
20:12:39 <andythenorth> the pattern is really obvious to me, but I don't really mind
20:13:33 <andythenorth> select pregenerated pattern on modulo of the tile index or something
20:19:32 <andythenorth> I haven't checked OpenTTD
20:19:43 <andythenorth> but I use `has_badge` on railtypes, and it works 😛
20:19:48 <andythenorth> can I call that resolved?
20:29:59 <peter1138> Hmm, why wasn't that inlined?
20:40:41 <peter1138> My videos normally play within the comment, not showing as a link.
20:43:59 <locosage> I can't reproduce that btw, it doesn't even seem to complete the whole map iteration so definitely a but
20:44:05 <locosage> I assume pr is on the right?
20:44:28 <peter1138> After removing that static, so it gets a new pattern every so often.
20:44:29 <locosage> maybe it's because of static
20:45:14 <locosage> so it looks more like vanilla without static?
20:48:21 <peter1138> No, it looks more like vanilla if the pattern doesn't change -- so that that static in place.
20:48:50 <peter1138> And if it's static, you might as well use some known constant.
20:49:33 <locosage> ok, looks like it only happens when loading the game
20:49:40 <locosage> guess I somehow change the pattern off-cycle
20:49:59 <locosage> anyway, it will probably all change once I fix scenario editor
20:50:20 <locosage> think of keeping _cur_tileloop_tile to drive tile loop intead of counter
20:50:40 <locosage> just confine it within the pattern
20:55:06 <locosage> I think that's what I actually did in that tree pr
20:55:36 <locosage> it's just so much time passed I forgot why and tried to optimize away a bit too much xD
20:57:18 *** Borg has quit IRC (Quit: leaving)
21:00:53 *** ChanServ sets mode: +v tokai
21:06:23 <xarick> i can't for the best of me get an assert
21:07:56 <xarick> i still don't know what this do
21:08:04 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
21:08:55 <xarick> i'm iterating a list and removing random items as it is iterated
21:11:33 <xarick> current conclusion, I can remove this code, but I don't know why
21:39:20 <_jgr_> xarick: You don't need this for your std::map/std::set stuff
21:42:41 <xarick> but this is on the safe btree branch. I'm working on 2 branches simultaneously
21:45:08 *** Wolf01 has quit IRC (Read error: Connection reset by peer)
21:45:29 <xarick> the safe btree -> very much verbatim copy from jgr with some clean up / rebasing, no change in functionality
21:45:29 <xarick> the map/set -> change the containers from safe btree to std
21:45:54 *** emperorkuni has joined #openttd
21:46:10 <emperorkuni> I have a fully working factory
21:46:17 <emperorkuni> But idk where to transport its goods
21:46:54 <andythenorth> Discord channel #openttd-help: 🙂
21:48:13 <_jgr_> The "safe" part of safe_btree is that the iterator will automatically do the lookup again (at approximately log N cost) if they're used when stale with respect to the container, so your asserts will never fail here
21:48:56 <_jgr_> The whole purpose of this code is to not have to do this additional lookup in the trivial case where we already have an up to date iterator as a result of just have done the erase which updated the container
21:48:57 <emperorkuni> Can you merge towns?
21:52:24 <kaji_kaede> emperorkuni: Nobody is talking there actively because nobody is asking for help there right now.
21:52:37 <emperorkuni> kaji_kaede: Oh ok
21:52:39 * andythenorth wonders if ScriptList should be deprecated
21:52:51 <emperorkuni> But since your here can platforms go more tham 7?
21:54:12 <kaji_kaede> I don't think your question will be answered by anyone in this channel.
21:54:31 <andythenorth> hmm GSList has too many fancy methods to delete it 🙂
21:56:03 <rito12_51026> Can we have road vehicles longer than one tile?
21:56:14 <andythenorth> yes, HEQS has them
21:56:23 <andythenorth> and many tram sets
21:58:17 <rito12_51026> So can we have road stops placement like rail stations, with the lenght and width?
21:58:58 <andythenorth> you can drag-build stops?
21:59:58 <andythenorth> the length and width for rail stations are only still there because of ~~pitchforks~~ meaningfully expressed player needs
22:03:43 <mmtunligit> i like selecting my station size beforehand :)
22:06:49 <rito12_51026> andythenorth: Wow, I didn't know that
22:07:24 <andythenorth> EDIASD in OpenTTD
22:12:08 <kaji_kaede> ...The pain of seeing the results of us not having a tutorial.
22:13:25 <andythenorth> a tutorial only teaches novice stuff
22:14:38 <andythenorth> a tutorial, almost by definition, isn't the comprehensive user manual
22:15:54 <kaji_kaede> For sure. But on the other hand, I find it hard to imagine information like this in particular not being easily covered by a "you can click *(and drag)* a bus stop", or something akin to that, in a tutorial.
22:16:28 <kaji_kaede> Very possibly wrong. I've not been a new player in a long time.
22:16:40 <andythenorth> the tutorial would take days to watch
22:16:48 <andythenorth> and the information wouldn't be retained
22:17:08 <andythenorth> hmm maybe a livestream 'tips and tricks' series 😛
22:17:10 <xarick> _jgr_: I noticed something strange around iterator in/equality, similar to what you describe. It at first compared `a == b` as being `false`, then it appears to be doing a second `a == b` and this time it was `true.` Thx for the clarification.
22:17:17 <andythenorth> I only found draggable signals a few years ago
22:17:33 <xarick> ultimately it returned `true`
22:17:52 <xarick> so that's it. mystery solved
22:18:13 <rito12_51026> I find tooltips very helpful
22:18:16 <kaji_kaede> andythenorth: I was talking with the assumption of an in-game one... Like the one I'm supposed to be making. *But my brain threatened to go on strike if it had to write any more Squirrel.*
22:18:38 <andythenorth> as so often the way 🙂
22:19:54 <rito12_51026> Will it take days to playthrough?
22:20:29 <kaji_kaede> ...If it would, I'd be horrified to know how I screwed up that badly.
22:22:01 <rito12_51026> How about a tutorial for experienced players 😛
22:22:56 <kaji_kaede> amazing idea, working on this rn
22:23:16 <kaji_kaede> will never be done like everything else, because ADHD
22:30:19 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:39:38 <audigex> Is there anything specific that needs testing with the nml badges PR (#359) or just a general “use it, do weird things with it, see what you can break”?
22:51:05 <xarick> This will make it always call `sorter->Remove` for all sorter types when using `list.SetValue`. The problem happens when this is the last item in a `for x = list.Next / !list.IsEnd` loop that gets changed - The next `!list.IsEnd` call will not interrupt the loop, and assigns `x = list.Next` the same value as the previous iteration in the loop. See
22:55:16 <xarick> master is the one on the right
22:57:18 <xarick> how does for loops work, what's the order?
22:57:26 <xarick> im so confused at times
23:09:21 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
23:10:30 <_jgr_> xarick: I don't agree that it should be Remove, it conceptually does not make sense for this operation to result in sort by item sorters needing to update their iterators
23:10:50 <_jgr_> I can't work out what you're doing from your screenshot, if you post the script I can look at it
23:12:35 <xarick> ok let me fix it up so it works on jgr
23:17:04 *** lobster has quit IRC (Ping timeout: 480 seconds)
23:30:09 <xarick> ignore the name, that's the test
23:51:09 *** Zathras_4 has joined #openttd
23:53:32 <_jgr_> xarick: I would argue that master and my branch both handle the end behaviour incorrectly in the same way
23:59:17 <_jgr_> The `item == this->item_next` test in `Remove` does the wrong thing in the case where `this->item_next` has not been updated in the `FindNext` end path
continue to next day ⏵