IRC logs for #openttd on OFTC at 2024-01-01
โด go to previous day
00:01:46 <peter1138[d]> Do houses have classes?
00:02:46 <xarick> AfterLoadGame is the function with the most ::Iterate()'s so far
00:03:52 <_glx_> peter1138[d]: they havec a kind of per grf class
00:05:04 <_glx_> but AfterLoadGame is called only once, and most of the time it doesn't even have to iterate
00:06:30 *** gelignite has quit IRC (Quit: Stay safe!)
00:07:00 *** nielsm has quit IRC (Ping timeout: 480 seconds)
00:07:11 <andythenorth> peter1138[d]: Why not? ๐
00:13:30 <andythenorth> oof dicts keyed on ints
00:13:41 <andythenorth> and in order ascending from zero
00:13:56 <andythenorth> probably the worst of the available choices, not sure why I did that
00:14:05 <andythenorth> "have you heard of lists"?
00:23:10 <xarick> is it gonna be protected by a "CPU Valuator" equivalent?
00:23:39 <_glx_> only the no allowed command
00:24:08 <andythenorth> "scared" is quite strong ๐
00:25:19 <_glx_> of course if there are too many abuses we can add some opcodes counting
00:25:33 <xarick> i could pass the most complicated function ever to it, it's gonna stall so hard
00:26:54 <_glx_> for now I assumed it was not necessary to control cpu usage, but it can be added
00:29:13 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
00:38:54 <andythenorth> I can trivially stall the CPU in GS
00:39:21 <andythenorth> there's some level of "just don't do that" when developing games
01:07:06 *** keikoz has quit IRC (Ping timeout: 480 seconds)
01:10:48 <peter1138[d]> Hmm, need to make these windows remember their position.
01:22:16 <andythenorth> _need to sleep_ ๐
01:32:51 <andythenorth> I'll tell you in 6 hours or so ๐
01:37:15 <peter1138[d]> Hmm, that's a pain, WindowDesc only saves dimensions, and only one.
04:00:54 *** debdog has quit IRC (Ping timeout: 480 seconds)
05:52:29 *** Wormnest has quit IRC (Quit: Leaving)
06:55:55 <wensimehrp> aww, still 2255 2023-12-31 UTC-8
07:31:38 <Eddi|zuHause> so, 6h is over...
09:00:17 <Eddi|zuHause> but are we any wiser?
09:18:42 <peter1138[d]> Seem to have an off-by-one.
09:21:48 <peter1138[d]> Okay, with this small function to arrange the windows it's actually quite usable. Takes up a bit more space due to the extra title bars...
09:23:16 <peter1138[d]> Well, okay, I guess not much more space ๐
09:23:59 <andythenorth> we could open them split ๐
09:24:06 <andythenorth> to either side of the screen
09:24:17 <andythenorth> leaving room for building in the middle of the viewport
09:24:33 <locosage> it's the vertical space that matters
09:26:00 <locosage> also, what's even your goal here? there isn't any point in splitting into 3 windows if you open them all at once anyway
09:27:19 <peter1138[d]> No point in this, no point in that.
09:27:30 <peter1138[d]> It's a 20 year old game based off a 30+ year old game.
09:27:36 <peter1138[d]> There's no point in any of it.
09:29:03 <locosage> there is a point in not making it worse :p
09:37:06 <peter1138[d]> Do we have a function to do `x / step_height * step_height`?
09:38:41 <peter1138[d]> Sounds stupid but the actual call here is `(parent->width - class_picker->width) / class_picker->resize.step_width * class_picker->resize.step_width` which is... quite long.
09:40:02 <peter1138[d]> locosage: Anyway, Happy New Year!
09:40:40 <peter1138[d]> Alternative layout that is not massively different from now.
09:41:20 <andythenorth> it's nice that the class and type are now individually resizable
09:41:48 <peter1138[d]> The plan is to add a button to open the class/type windows, and it will remember if you had them open or closed last time you used it.
09:41:50 <andythenorth> the actual selection palette....we could set that on fire in future TBH ๐
09:41:56 <andythenorth> but one step at a time eh
09:42:07 <merni> andythenorth: Why would someone want to search classes and types separately?
09:42:14 <merni> Not rhetorical, genuinely curious
09:42:29 <peter1138[d]> Okay, as this is already a rewrite, what needs to change about the type picker?
09:42:58 <peter1138[d]> It has separate search because the class list already had a search, and the waypoint window (which is the basis of the picker window) already had a search.
09:43:22 <locosage> peter1138[d]: now, that makes sense
09:43:39 <merni> peter1138[d]: This seems a bit over-complicated. "Building a station" from player's pov is a single action, not three
09:44:02 <merni> (Also, why do station classes even exist when vehicles are just all dumped into a single list :p )
09:45:17 <andythenorth> because TTDP probably
09:45:47 <peter1138[d]> Yeah, TTDP designed it.
09:45:47 <andythenorth> and because we don't have ground types? ๐
09:45:57 <andythenorth> or in-game painting
09:46:23 <peter1138[d]> Also "fun fact", if I ignore classes and list every station type in one window, it will crash because scrollbars have a 16 bit limit.
09:46:58 <peter1138[d]> NWID_MATRIX is scrolled by pixels, so hitting that limit at 2x or 4x is not that hard.
09:47:10 <peter1138[d]> I guess MATRIX could be clever about it ๐
09:47:29 <merni> A nice (but probably hard to implement) idea might be to have a unified list with station classes acting as collapsed "folders" with station types under them
09:48:06 <peter1138[d]> That does not allow quick access to different classes, but...
09:48:21 <merni> peter1138[d]: It deos if all the classes are collapsed initially
09:48:29 <andythenorth> I can make a station tile appear in more than one class, yes/no?
09:48:52 <peter1138[d]> So basically inline the class and type pickers.
09:48:59 <merni> Dunno how this would work with previews though
09:49:17 <merni> I was imagining a purely text list but I also like previews
09:50:13 <merni> bc when I'm using the Dutch station set names like "Zwolle" or "Rosendal" don't really mean anything but I know I want "that platform with the black roof with glass in the middle"
09:52:49 <locosage> I don't really know what's the best way to merge them but having class and type in separate windows is quite awkward indeed
09:53:23 <peter1138[d]> Pretend the extra window stuff isn't there.
09:55:21 <locosage> lol, I was confused what is that bottom list for a second
09:55:43 <peter1138[d]> That'll be the rest of the classes when classes & types are inline.
09:56:26 *** gelignite has joined #openttd
09:56:44 <locosage> filter bars can probably be merged into one
09:57:00 <peter1138[d]> Yes of course. That screen shot actually is a mock-up this time...
09:57:34 <merni> this is my idea of a mock-up :p
09:57:57 <merni> I guess the first + should be a - instead
09:58:19 <merni> But MSPaint in 2023 still cannot edit existing text
09:58:41 <peter1138[d]> It doesn't use layers, so...
09:59:59 <Rubidium> merni: as if you can edit text with real paint ;)
10:00:11 <peter1138[d]> Someone joked about small font last night...
10:01:15 <merni> Rubidium: Unfortunately there is no MS PencilAndRubber or I'd use that instead
10:02:25 <merni> I guess Paint does have an eraser but it's much clunkier than the real one
10:02:47 <locosage> I can't think of better solution than collapsible classes
10:03:01 <locosage> what would be nice addition though is some kind of palette for favourite or most used types
10:03:25 <peter1138[d]> A virtual class?
10:03:48 <Rubidium> or an "only show used" toggle?
10:04:43 <locosage> peter1138[d]: maybe... but I'd just put it as a separate column I think
10:06:06 <locosage> some kind of cloning tool can be an alternative
10:06:24 <merni> locosage: why do you want to see both simultaneously?
10:06:24 <locosage> well, they're not mutually exclusive
10:07:50 <reldred> andythenorth: as a sidenote, been really loving newchips, but I've yet to use anything other than CC ๐
10:08:04 <locosage> merni: my thinking is that "favourites" panel should be used in like 90% cases and player will only go to full list if something isn't there
10:09:16 <merni> locosage: Then it makes sense to have the favourites/recent/whatever as the first folder and open by default, while all others are collapsed by default
10:09:47 <merni> given that the trigger for this whole thing was the station window being too big, adding another column to it may not be great
10:09:52 <andythenorth> reldred: try harder
10:09:54 <locosage> what I'd prefer to avoid is having to switch between favourites and some other class that player temporarily needs
10:10:48 <locosage> btw, another useful tool in this context would be some cloning/picker
10:10:52 <merni> I think if classes are implemented as collapsible folders, then the discussion about "favourites" can be a separate PR
10:11:39 <reldred> andythenorth: The grey looks nice, probably the only one I've used
10:12:03 <andythenorth> paintable objects though?
10:14:28 <reldred> The ability to set a surface type, colour, etc. would be very nice
10:16:08 <locosage> I guess this grass is a bit too bright for ISR ๐
10:16:15 <peter1138[d]> hot key to toggle between favourite class and last open class.
10:16:29 <andythenorth> more tile composer vicar?
10:16:50 <peter1138[d]> Highly advanced mockups.
10:16:55 <peter1138[d]> I dunno what they are showing though.
10:17:05 <andythenorth> isn't it obvious? ๐
10:17:11 <andythenorth> high fidelity design
10:17:27 <andythenorth> I think my buy menu sprite compositor has....issues ๐
10:26:16 <xarick> ` local never_return = function(var) { while(true); return true; };
10:26:16 <xarick> GSVehicleList(never_return);`
10:33:56 <peter1138[d]> I nearly did a boo-boo.
10:34:23 <peter1138[d]> Hadn't committed anything so far.
10:34:37 <peter1138[d]> So committed as is, now modifying for lots of custom widget drawing.
10:37:53 <andythenorth> git reset --hard
10:38:01 <andythenorth> keep that in your shell history, always useful
10:38:33 <peter1138[d]> That seems to be the opposite of what I need to do.
10:39:49 <andythenorth> Such sprite issues. The spritesheet has this for buy menu sprite
10:40:00 <andythenorth> the game is drawing this ๐
10:40:20 <andythenorth> I have my suspicions
10:40:24 <xarick> #11663 shouldn't have been merged ๐ฆ
10:40:38 <xarick> very abuseable feature
10:42:43 <xarick> and it's gonna end up like another feature prone to excessive CPU usage crashes... ๐ฆ I don't like it
10:45:34 <xarick> even if the AI authors use it the right way... it's still going to be a source of micro stalls
10:45:45 <xarick> much like Valuate function
10:50:13 <Rubidium> xarick: it'll be less of a micro stall than Valuate though...
10:51:20 <Rubidium> as not adding is almost guaranteed cheaper than adding plus removing, regardless of the underlying data structures
10:56:16 <rau117> andythenorth: This is an electric train, isn't it? ยซHowยป does it... get electricity if it is in the โonly 2 wagonsโ state, there is no pantograph?
10:57:14 <andythenorth> I think you're missing a point somewhere
11:13:25 <andythenorth> oh we improved the sprite aligner recently?
11:13:44 <andythenorth> I have found my bug (but not what causes it)
11:14:04 <peter1138[d]> We never improve things.
11:14:34 <andythenorth> we ruined the sprite aligner recently?
11:14:49 <andythenorth> anyway, there's a spritelayer picking the wrong sprite, then drawing it over my train
11:15:02 <andythenorth> that will be...my fault ๐
11:15:26 <andythenorth> this is supposed to be just pantographs
11:17:16 <peter1138[d]> Would be nice if it worked :p
11:17:36 <xarick> oh snap Afterload is a difficult beast to tame. `SettingsDisableElrail` can be called from `AfterLoadGame` before `InitializeWindowsAndCaches` which is where groups create the vehicle lists ๐ฆ
11:17:54 <peter1138[d]> "Too hard to switch class"
11:18:04 <peter1138[d]> combined with "Why do we even have classes"
11:18:41 <andythenorth> the main reason I stopped using ISR was playing 'hunt the tile' in someone else's filing system ๐
11:18:43 <peter1138[d]> We have vehicle classes.
11:18:57 <peter1138[d]> They are just VEH_TRAIN, VEH_ROAD, VEH_SHIP and VEH_AIRCRAFT ๐
11:19:10 <Eddi|zuHause> xarick: sounds like you're doing a thing in the completely wrong place.
11:19:56 <peter1138[d]> xarick: You almost 200% certainty do NOT need to 'optimize' SettingsDisableElrail'
11:20:11 <Eddi|zuHause> xarick: which is where you step out and look at where you took a wrong turn
11:20:42 <Eddi|zuHause> almost certainly you're already too deep into a rabbit hole to correct it.
11:23:36 <peter1138[d]> Hmm. Multiple WAYP classes?
11:25:41 <xarick> how further up the chain in afterload can groups start to be generated? :p
11:28:39 <Eddi|zuHause> probably not a good question to ask
11:30:48 <andythenorth> peter1138[d]: ship waypoints?
11:30:58 <Eddi|zuHause> "how close do i need to be to the car in front of me to read its license plate seal"?
11:38:45 <andythenorth> buy menu sprite generating correctly
11:39:24 <andythenorth> might be somewhat limited ๐
11:39:42 <andythenorth> I am deep in rabbits
11:45:17 <xarick> ` if (IsSavegameVersionBefore(SLV_62)) {
11:45:17 <xarick> GroupStatistics::UpdateAfterLoad(); // Ensure statistics pool is initialised before trying to delete vehicles`
11:45:33 <xarick> it has already be done
11:47:33 <xarick> there's a removal of phantom oil rigs too that needs to be addressed
11:47:55 <peter1138[d]> None of this is performance crtiical.
11:47:56 <xarick> afterload is mean to my cache
11:48:11 <xarick> it calls delete station
11:48:48 <xarick> and deleting a station needs the list to exist to remove vehicles with orders going to it... but since the oil rig is phantom, I wonder if any ships had orders to it
11:52:48 <xarick> seriously, how can you guys manage to maintain Afterload?
11:53:12 <xarick> that thing is massively conditioning
11:53:15 <peter1138[d]> Step 1) Don't random add caches everywhere.
11:54:42 <andythenorth> I am sure we've missed a Step 0 somewhere
11:55:33 <peter1138[d]> I've missed a Step 0 ๐ฆ
11:56:26 <peter1138[d]> Hmm, I think I need to store opened state separateโor only allow 1 open at a time.
11:57:15 <rau117> peter1138[d]: the option with several windows looks much more convenient and compact (even if it is 3 different windows)
11:57:54 <peter1138[d]> Yes I think it is easier to use but, they said...
11:58:23 <peter1138[d]> Need to get this scrollbar working.
12:00:39 <rau117> peter1138[d]: especially if you can make so when you click on ยซstation classยป the window does not overlap ยซstation type.
12:00:59 <andythenorth> the nice thing about this accordian view thing is that you can see tiles from multiple classes simultaneously
12:01:07 <andythenorth> it's kind of odd though ๐
12:02:48 <peter1138[d]> It probably wants more spacing when classes are open, but I've stuck with everything multiples of resize height for now to make it easier.
12:03:24 <rau117> ahh, how about open a new station type window when you ctrl+click on station class?
12:03:24 <rau117> It seems to me that closing all these tabs will not be the most convenient thing
12:05:08 <locosage> well, accordion can be made to close all but one pane but that starts to smell like gui setting ;p
12:05:46 <rau117> peter1138[d]: And also regarding the vertical arrangement - in 99% of cases, players have more monitor width than height, using vertical space to display 1-2 stations types does not seem to be the most optimal use of space
12:06:37 <locosage> so more of that horizontal space can be used for windows without blocking the viewport too much ;)
12:15:10 <rau117> But if we take into account that by default the station window opens somewhere in the middle of the screen, a long but low window covers less useful space than a narrow and tall one
12:15:10 <rau117> But this issue can be solved in a slightly different way - by adding the ability to change the default location of the window. So, by clicking on the station tool you will get a station window not directly in the center of the screen, but somewhere on the side, outside the โconstruction fieldโ. And in *this *form, a vertical window could be (a little) more convenient.
12:16:56 <locosage> well, yeah, for vertical windows to work well they need to be somewhere on the side
12:18:12 <locosage> locosage: as for main station window I already suggested making it more flat
12:19:16 <rau117> locosage: Hmm... can you do this in the citymania client?
12:19:42 <locosage> though in cmclient I can probably go further
12:20:14 <locosage> ideally I'd like to get rid of that window completely
12:26:09 <peter1138[d]> Who needs windows when you can have a hotkey for every station type.
12:26:53 <rau117> locosage: It would be worth keeping it at least as setting, citymania client is useful not only for... citymania
12:27:17 <locosage> ofc I'll make sure to cover all the functionality of that window by other means first
12:27:36 <locosage> but leave it smth like a regular green toolbar
12:28:29 <locosage> rotate button, type window button, drag&drop and track num selector
12:28:43 <xarick> found already some issues in afterload, but oh well...
12:28:45 <locosage> though having and option to just show vanilla window is not an isuse
12:30:19 <locosage> drop platform length and show acceptance elsewhere
12:30:46 <locosage> and drop station preview coz there is preview in the viewport
12:33:26 <locosage> actually, plat length can always be draggable
12:34:37 <locosage> ah, no the ohter way around, drop track length selector and make it draggable but leave plat len
12:35:30 <locosage> somehow extending it past 7 in the process xD
12:35:37 <xarick> i have to place GroupStatistics::UpdateAfterLoad(); as early as line 900 in Afterload
12:35:59 <xarick> good that it doesn't crash at least, but uncertain of side effects
12:39:14 <locosage> hmm, 7x7 mode is a nice coverage tester though
12:39:45 <locosage> well, can always add one more button xD
12:40:50 <peter1138[d]> Too much scrolling
12:41:45 <peter1138[d]> And that's quite wide.
13:06:35 <peter1138[d]> Who made object previews be different to station previews... :/
13:07:10 <peter1138[d]> Hmm, I think it's just the drawing code actually.
13:10:31 <peter1138[d]> Ah shit, I didn't do Airports :p
13:30:59 <peter1138[d]> This feels easier to use to me.
13:32:08 *** Hobbyboy has quit IRC (Quit: The BNC has broken!)
13:32:32 <peter1138[d]> Although it almost wants the scrollbar/resize box to be on the left, but that's weird ๐
13:33:08 <xarick> Is my group vehicle list project doomed because of afterload?
13:33:28 <rau117> peter1138[d]: Looks pretty convinient!
13:33:28 <rau117> But if these panels are rearranged by players, will the places be remembered?
13:35:31 *** Hobbyboy has joined #openttd
13:36:48 <peter1138[d]> Hmm, I need a NWID_HORIZONTAL that can change direction depending on if the window is next to the right screen edge.
13:37:03 <peter1138[d]> Yes, window places can be remembered, although perhaps not saved.
13:38:02 <xarick> does anyone have old savegames with phantom oil rigs and buoys, the old waypoint struct?
13:38:32 <xarick> without any savegame to test this, it becomes difficult
13:38:51 <xarick> also road drive through stuff has been changed
13:39:58 <Eddi|zuHause> xarick: definitely you should only initialize your cache AFTER afterload finished all the conversions.
13:40:44 <Eddi|zuHause> because you cannot assume sanity of any data structures before that point.
13:42:29 <Eddi|zuHause> if in doubt, reimplement all the functions that afterload calls...
13:43:13 <xarick> that's like reinventing the wheel ๐
13:47:18 <Eddi|zuHause> well, it's a chicken & egg problem
13:48:35 <andythenorth> Letโs cache the old structures instead ๐
13:48:47 <andythenorth> Probably more performant ๐
13:52:33 <Eddi|zuHause> just throwing this out there: caches are often a desync hazard.
13:52:51 <talltyler> peter1138[d]: This is really cool ๐
14:03:14 <_glx_> xarick: never use cache when loading a game
14:03:27 <xarick> yes, but yes, I know, but...
14:03:58 <_glx_> And no need to use it for almost never called functuons
14:03:59 <peter1138[d]> I suspect part of the problem is the cache is being used by other things already before it's set up...
14:04:40 <truebrain> are we sure there isn't a more fundemantal issue at play here? ๐
14:07:34 <peter1138[d]> SighโI touched english.txt
14:07:36 <xarick> I need it as early as... whichever afterload action does a station removal
14:07:53 <truebrain> peter1138[d]: yeah, don't do that ๐
14:08:11 <peter1138[d]> I need me one of these 1000 core 100GHz CPUs...
14:08:18 <xarick> station/waypoint/depot*
14:08:38 <truebrain> or, less files should know about strings ๐
14:13:42 <peter1138[d]> Such pitchforks.
14:15:17 <truebrain> you are too quick with UI designs ๐
14:15:55 <peter1138[d]> I did a whole custom window which I threw away because it was a usability nightmare. Sounded good in principle but...
14:19:25 <andythenorth> peter1138[d]: Canโt we compile on the GPU yet?
14:19:53 <peter1138[d]> Objects are weird. Why are they even?
14:20:54 <peter1138[d]> That's one of the 'docked' options. the resize stuff is a bit awkward especially on the right window.
14:21:08 <Eddi|zuHause> truebrain: i'm very sure there's a more fundamental issue at play, but i'm trying to not make that my problem :p
14:21:19 <andythenorth> Objects are a bit weird ๐
14:22:56 <andythenorth> peter1138[d]: My brain expects categories on the left, tiles on the right. Might be wrong though
14:22:57 <peter1138[d]> I wonder about sorting the lists by name but I think that might break everyone's spacebars.
14:23:15 <peter1138[d]> peter1138[d]: Oh really?
14:23:34 <andythenorth> Still find categories weird ๐
14:24:11 <peter1138[d]> So yeah, that's an option. But type previews on the left "works for me".
14:26:11 <andythenorth> How about moving the categories to global menu as dropdown list? ๐๐
14:26:48 <admeliora> peter1138[d]: Just casually break into the one of nasa computing centres :deletethis:
14:27:34 <peter1138[d]> dock panels might be a nice thing to do.
14:27:55 <peter1138[d]> Instead of moving windows to the edges like here.
14:28:51 <peter1138[d]> Windows inside windows, like vehicles inside vehicles.
14:30:41 <andythenorth> Might be a thing ๐
14:32:30 <peter1138[d]> Hmm, if docked, draw panel without border = flat
14:33:49 <xarick> I'm investigating if it's a good idea to add GroupStatistics::UpdateAfterLoad() to inside AfterLoadVehicles
14:35:28 <xarick> they need to be already defined or else crash
14:36:53 <peter1138[d]> > dbg: [sprite] Tried to load character sprite #2 as a normal sprite. Probable cause: NewGRF interference
14:36:57 <peter1138[d]> Was that me... ๐ฎ
14:37:50 <peter1138[d]> > 18 files changed, 1152 insertions(+), 1337 deletions(-)
14:37:53 <peter1138[d]> Hmm, not that good ๐ฎ
14:38:08 <peter1138[d]> Write everything on one line?
14:43:46 <rau117> peter1138[d]: Maybe display both orientations directly in the list? ยซRail station selectionยป has important buttons that affect station itself, but ยซobject selectionยป has just 2 buttons-orientations. Just get rid of the object selection window and make the object type a little wider
14:44:11 <peter1138[d]> object can have 1, 2 or 4 orientations.
14:44:34 <peter1138[d]> I'm not sure why even, but it does.
14:44:56 <rau117> Hmm, even more so, if an object has only 1 button, should it be displayed at all? Perhaps as a bigger previewโฆ
14:45:03 <locosage> I suspect they were supposed to be rotations
14:45:16 <peter1138[d]> Yes, but nobody draws them like that.
14:46:06 <rau117> in my memory, rotation objects sometimes used as โletโs put 4 different objects in one menu itemโ
14:46:32 <locosage> iirc that was because of object limit that got extended recently
14:46:48 <peter1138[d]> object-per-grf limit.
14:47:01 <andythenorth> 4 rotations makes complete sense for objects
14:47:06 <andythenorth> the object spec is pretty good
14:48:25 <peter1138[d]> Hmm, road stops do sort of have orientations too.
14:48:40 <andythenorth> new station spec could have 4 ๐
14:49:02 <peter1138[d]> But then it's supposed to be a type selector, not an orientation selector.
14:49:30 <andythenorth> hmm probably cranes should animate or something
14:49:39 <andythenorth> or rotate if you overbuild the same tile?
14:49:47 <andythenorth> there's something in the spec for overbuild count I think
14:51:04 <xarick> UpdateCompanyLiveries is also called before the vehicle cache is built!
14:54:37 <xarick> I got a question, it's NewGRF related unfortunately
14:57:46 <xarick> the statistics will count engines
14:57:54 <xarick> and that's the scary part
14:58:24 <xarick> or could StartupEngines be moved to before AfterLoadVehicles?
14:58:34 <xarick> so many difficult questions
15:01:59 <xarick> I really hope I don't have to rewrite the wheel
15:04:19 <andythenorth> why are you moving GroupStatistics inside AfterLoadVehicles?
15:07:00 <xarick> because I found a pattern about it
15:10:45 <andythenorth> probably had enough
15:12:30 <xarick> all I know so far is that vehicles at this point at the end of AfterLoadVehicles become in a saneish state and that's what got me thinking if that's gonna be okay to also do the group statistics right away at that point. I'm experimenting with the idea
15:13:29 <xarick> when changing newgrfs or reloading newgrfs stuff, there's also an AfterLoadVehicles call
15:14:05 <xarick> it's just that StartupEngines() that might ruin it
15:15:01 <xarick> it calls group statistics as well, which is the pattern I observe, but not in the same order
15:15:11 <xarick> as the one found in afterload
15:15:26 <andythenorth> do you ever put in prints in functions to observe when they're called and who the caller is?
15:15:36 <andythenorth> _never learnt to use debugging breakpoints_ ๐
15:15:50 <peter1138[d]> Breakpoints are good but don't let you quickly see flow.
15:15:52 <andythenorth> I wonder if xarick does?
15:16:28 <peter1138[d]> I have a patch that lets me see what functions call other functions. Probably valgrind will do that, but who has time to compile a build that is valgrind compatible?
15:16:55 <peter1138[d]> Anyway, that's how I know how many times the font cache is reloaded on start up ๐
15:17:18 <andythenorth> lol my buy menu compositor is still failing ๐
15:17:28 <andythenorth> it only needs to generate one vehicle here, and not with open doors
15:17:44 <andythenorth> sometimes I wonder if OpenTTD could just generate the buy menu sprite for me ๐
15:17:54 <andythenorth> we could...cache them? ๐
15:18:50 <andythenorth> oh it's generating buy menu sprites for *everything* ๐
15:18:57 <andythenorth> that's why my compile got slower
15:20:07 <xarick> I tried to load a bunch of NewGRF's
15:23:31 <xarick> who can share some complex newgrf presets, to see if I broke something
15:26:16 <_jgr_> peter1138[d]: Valgrind seems to work fine on optimised/release builds, at least whenever I've used it
15:26:26 <andythenorth> peter1138[d]: one window per object?
15:26:36 <andythenorth> then I can pin my favourites
15:27:01 <peter1138[d]> I think truebrain mentioned something about it not liking builds from clang.
15:27:26 <peter1138[d]> ```==1317763== Valgrind: debuginfo reader: ensure_valid failed:
15:27:26 <peter1138[d]> ==1317763== Valgrind: during call to ML_(img_get)
15:27:26 <peter1138[d]> ==1317763== Valgrind: request for range [163364102, +4) exceeds
15:27:26 <peter1138[d]> ==1317763== Valgrind: valid image size of 160686816 for image:
15:27:26 <peter1138[d]> ==1317763== Valgrind: "/home/petern/src/openttd/build/openttd"```
15:27:36 <xarick> all the newgrfs i used
15:28:03 <truebrain> peter1138[d]: Needs a newer valgrind, but .. #effort ๐
15:29:26 <peter1138[d]> (svn r27346) -Feature: Make the object placement gui an independent window.
15:29:34 <peter1138[d]> Oh, that's why it behaves oddly :/
15:34:43 *** gelignite has quit IRC (Quit: Stay safe!)
15:36:45 <xarick> what happened to that very old opntitle savegame?
15:45:11 <xarick> i've been getting this one you see in the background for quite some time
15:45:55 <xarick> I don't even know where it's located
15:55:07 <xarick> what's the size of it?
15:58:50 <jfs> well it's clearly located in the baseset folder
15:59:08 <jfs> in the openttd console you can use the command `list_dirs baseset` to see which ones it's actually searching
15:59:14 *** Wormnest has joined #openttd
16:02:58 <jfs> yes it is rather odd that it isn't using the install location as the primary one
16:03:14 <jfs> unless, are you starting the game with a parameter to set the config file to use?
16:03:42 <xarick> it's started via visual studio debug button
16:03:48 <_glx_> It should default to the one next to exe
16:04:04 <xarick> then that's the one in D:
16:04:28 <_glx_> Title in master is still the very old one
16:07:59 <xarick> why I'm not getting... the old one loaded
16:10:42 <xarick> the 135 kb is the old one, but it loads the one in the documents folder
16:12:33 <Rubidium> maybe it's due to duplicate path filtering or so?
16:12:46 <xarick> the one next to exe would be in D:\OpenTTD... etc...
16:19:40 <xarick> do I just delete opntitle.dat from the documents path?
16:20:00 <xarick> I don't know who put it there
16:20:11 <xarick> probably some install of the past did
16:27:23 <xarick> the lighthouse in an island, the dock, that big orange tower building
16:28:27 <peter1138[d]> Urgh, "overlapping" objects ๐ฆ
16:47:59 <andythenorth> they are quite the popular thing
16:54:39 <peter1138[d]> I seem to have a race condition where w->parent is no longer valid ๐ฎ
17:01:24 <LordAro> doesn't eints maintain its own internal cache that overwrites whatever's there?
17:06:21 <Rubidium> I'm not sure; it might, but I've seen previous mass language changes... so I got not real clue
17:07:12 <truebrain> Not like we have a doc for this ๐
17:07:34 <truebrain> Frosch took effort writing most of this down ๐
17:08:06 <Rubidium> so, who has admin access? :D
17:08:38 <truebrain> That, I do not know
17:12:50 *** esselfe has quit IRC (Remote host closed the connection)
17:28:40 <xarick> I loaded the old intro save and it started the game script I had set up from the main menu ๐ฆ
17:33:14 <LordAro> i thought we fixed that
17:37:01 <xarick> for some reason it doesn't detect i'm loading from the main menu
17:38:29 <peter1138[d]> Loading current for old saves that don't have that config is normal, right?
17:40:26 <xarick> _game_mode == GM_NORMAL...
17:42:15 <LordAro> are you loading the titlegame as a save?
17:43:42 <xarick> renamed it and added .sav, then loaded from main menu Load
17:44:26 <xarick> it shouldn't start the GS
17:44:28 <LordAro> though perhaps not as desired
17:47:06 <truebrain> No, that was fully intentional
17:47:15 <truebrain> We had a big conversation about it ๐
17:49:01 <truebrain> right, let's see, admin access in eints .. how would that work ..
17:50:29 <truebrain> nothing in how we start it up suggests there is any setting for it ..
17:51:20 <_glx_> would be nice to have an "import diff" in eints, but as usual someone has to implement
17:51:30 <LordAro> i feel like it might be "access to the database"
17:51:41 <truebrain> there is no database as such
17:52:38 <truebrain> yeah, okay, the GitHub authentication backend has no support for the admin role
17:53:11 <truebrain> so someone would have to implement that first, I am afraid ๐
17:53:14 <truebrain> shows how rare these requests are ๐
17:53:40 <LordAro> "just" need to query GH org membership?
17:53:51 <truebrain> we do that in other places too, so I guess
17:54:16 <peter1138[d]> GRF scan is "kinda slow" with valgrind ๐
18:00:47 <xarick> MakeNewGameSettingsLive
18:01:22 <_glx_> ok let's look at dmp from recent crash report
18:01:30 <truebrain> hopefully one of the last times you have to ๐
18:02:06 <_glx_> and of course I need to download all symbols from MS
18:03:33 <truebrain> _jgr_: fair point; I always forget we can also manually many unique_ptr; so use to `make_unique` .. it is terrible ๐
18:06:20 <_glx_> oh I think it's already fixed (gender in strings)
18:14:36 <xarick> I'm incredibly slow...
18:32:08 *** Flygon has quit IRC (Remote host closed the connection)
18:38:53 <DorpsGek> - Update: Translations from eints (by translators)
18:39:59 <_zephyris> No TTF ligature support?
18:45:10 <_glx_> I think layouter handles that (if non fallback)
18:45:44 <truebrain> _jgr_: lol .. that is a nasty bug ๐
18:46:34 <truebrain> means that was also already an issue with the 13.X series
18:48:06 <truebrain> btw, another issue you describe, which should not happen, is that the UI hangs on this
18:48:14 <truebrain> as when someone has a slow connection, this happens
18:48:18 <truebrain> so I guess that is another bug ๐
18:50:19 <_jgr_> The user has to press cancel to close the window
18:50:30 <truebrain> but it doesn't show the download is stalled, does it?
18:50:43 <_jgr_> The progress bar just stops moving
18:50:51 <truebrain> yeah .. I think we should close the window and show an error dialog
18:50:56 <truebrain> to indicate the download failed
18:51:50 <_jgr_> It doesn't because it was considered explicitly cancelled
18:52:14 <truebrain> sounds like a bug to me ๐
18:52:38 <andythenorth> oof, changing `over-ride` to `override` in all my code comments
18:52:48 <andythenorth> and is it `sub-class` or `subclass`?
19:03:17 <peter1138[d]> Is that the bug that means that cancelling doesn't cancel?
19:03:36 <truebrain> no, that has been long fixed
19:06:52 <truebrain> the bug JGR just fixed is one where your download cancels if it takes more than N minutes ๐
19:06:57 <truebrain> which is a bit rude ๐
19:39:43 <peter1138[d]> That's part of 11667, but not the reason for the crash.
19:40:12 <peter1138[d]> I also don't know why an aircraft carrying fruit cannot be refitted to fruit, when I can buy it a new model and refit it to fruit manually...
19:47:45 <talltyler> truebrain: Is Saturday or Sunday better for you to attend a NotDaylength test game?
19:48:03 <truebrain> my attendance is hardly required ๐
19:49:41 <talltyler> Yes, just figured Iโd invite you ๐
20:06:07 <xarick> I'm worried about the perspective of two times and how that will affect existing AIs
20:08:08 <xarick> most AIs authors are inactive... no good perspectives...
20:12:39 <peter1138[d]> Are you worried about the baggage retrieval system they've got at Heathrow?
20:14:54 <xarick> some authors base their scripts on game date
20:15:02 <xarick> some base it on game ticks
20:17:36 <xarick> then there's also handling of ageing vehicles, or even pathfinders based on different kinds of timers, how much they take to do stuff, when to cancel when it takes too much time
20:18:22 <truebrain> I see Marvin entered the chat ๐
20:20:29 <_glx_> oh right #11669 is unrelated to the crash
20:23:59 <peter1138[d]> Yes. But if it was a string crash that could well be fixed already.
20:24:48 <xarick> I recently (1 or 2 days ago) got a crash also from the newspaper, about the company name
20:25:03 <xarick> it was a debug build, I couldn't get the dump
20:25:34 <xarick> the news that appears when a competitor starts, retrieving the company name crashed
20:25:59 <talltyler> The nice thing about scripts is that even if theyโre unmaintained, their source is not lost so anyone so inclined can fix/update their favorite script ๐
20:27:00 <xarick> yes, but that will require a new entry to the bananas, the old ones will remain in the list, dated...
20:29:30 <talltyler> There is no way to split time without possibly breaking some scripts
20:29:38 <peter1138[d]> It's always great, finding hypothetical bugs...
20:30:09 <xarick> sorry I'm a pessimist by nature ๐
20:34:43 <xarick> should be a possibility to have "maintainers" access to other ppl's work in bananas, but I can also see why that's not gonna happen
20:36:03 <xarick> original authors might not like it either, have their stuff altered by outsiders
20:36:56 <Rubidium> well, if it's buggy you could always check whether there's a github repository for it an provide PRs to fix the issues
20:39:21 <_glx_> xarick: that was already an issue with valuators, nothing new here
20:39:33 <andythenorth> Some bugs would be better addressed by people who worry about them getting therapy ๐
20:40:27 <andythenorth> Fears are often habits that can be adjusted ๐
20:41:29 <xarick> a valuate doing a while(true) will kill the script with excessive cpu
20:41:41 <_glx_> no it will just hang the game
20:42:09 <_glx_> the cpu check is done once the function returns
20:43:07 <xarick> i thought it was counting actions
20:44:34 <_jgr_> Making it easier to remove a GS from an existing game would make misbehaving scripts less of a problem
20:49:04 <xarick> wow, you're right, this is terrible news!
20:49:26 <_glx_> calls inside valuate or constructor are not suspendable, so the functions have unlimited opcodes
20:50:23 <_glx_> we can't protect againts all stupid things
20:50:26 <_jgr_> They are suspendable, just not resumable, so you could just kill the script in this case
20:58:16 <LordAro> the dacia sandero will not be coming to uk markets
20:58:18 *** ChanServ sets mode: +v tokai
21:07:03 <Rubidium> I guess their spokesperson isn't on TV talking about that vehicle anymore
21:11:17 <peter1138[d]> Hmm, how to solve windows that re-use WidgetIDs.
21:11:23 <peter1138[d]> Or... not bother?
21:16:35 <_zephyris> _glx_: I'll dig in the code and see if I can work out what's going on. Thought it might be fun to use ligatures to auto-substitute {train} with the train symbol, etc.
21:33:11 <talltyler> I'm so excited to be done with endless rebasing of PRs on top of PRs
21:50:49 *** esselfe has joined #openttd
21:55:51 <peter1138[d]> Oh jeez, cyberdemon :/
22:32:21 <xarick> v->last_station_visited and v->last_loading_station - isn't this just for the PrimaryVehicle?
22:32:39 <xarick> code seems to imply it's not
22:34:55 <_glx_> let me introduce you to `<url>`
22:35:15 <_glx_> automatically disable the preview
22:35:24 <xarick> removal of station iterates VehicleListPool 3 times per station
22:35:39 <xarick> no wonder bankrupting big companies takes a while
22:36:29 <xarick> _glx_: thanks, will try to remember
22:39:03 <peter1138[d]> This not a flat dock.
22:39:51 <_glx_> looks like Windows when you move window near desktop border
22:40:25 <peter1138[d]> Yeah, this is some what annoying :o.
22:40:38 <peter1138[d]> I'll see if I can make it require MORE delta.
22:41:32 <peter1138[d]> (So it only docks if you really shove it in there...)
22:42:50 <dwfreed> I mean, easy way would be to just require the mouse be at the edge itself as well :)
22:43:15 <dwfreed> or within some small limit
22:43:59 <peter1138[d]> Funnily enough...
22:45:20 <dwfreed> though if you don't prevent the mouse from leaving the bounds of the game, that could be really challenging in dual monitor setups
22:46:42 <talltyler> Windows requires the mouse to be at the edge, and if the mouse is moving slowly it traps the mouse from crossing to the next monitor
22:47:01 <talltyler> I doubt OpenTTD can control the mouse like that (at least easily)
22:47:20 <peter1138[d]> Not over the edge of monitors no ๐
22:48:44 <talltyler> Okay, all rebased (as long as I didn't make a mistake somewhere ๐ )
22:49:10 <talltyler> peter1138: No more changing date stuff until this is merged ๐ (joking of course, do what you like)
22:49:31 <peter1138[d]> approve -> merge -> yolo?
22:50:47 <talltyler> As soon as CI finishes its thing, I'm going to create a build of #11428 and set up a test game this coming weekend. Then TrueBrain wants to do a final review, merge, and start finding bugs
22:51:11 <talltyler> We could do a few days in nightly or go straight to a beta1 release
22:51:45 <peter1138[d]> You're very keen on this beta1 schedule you've made up ๐
22:52:23 <peter1138[d]> It's almost like we have a project manager.
22:53:02 <talltyler> lol, made a typo in a commit title "ecomomy date" ๐
22:53:14 <talltyler> No need to rebase the rest though...
22:53:19 <peter1138[d]> I think that was mentioned before ๐
22:53:45 <peter1138[d]> Huh, weird, sometimes the docked mode doesn't fully resize ๐ฎ
22:53:56 <peter1138[d]> Why. Why did I even attempt this UI design... ๐ฎ
22:54:38 <talltyler> peter1138[d]: I've been working on this for over a year, I'm eager to see it out the door ๐
22:55:01 <talltyler> (three years if you count my previous implementation attempts)
22:55:21 <peter1138[d]> (Throwing these two windows at the side is amusing though)
22:55:31 <peter1138[d]> 3 years is baby ๐
22:55:49 <peter1138[d]> custom company colours is 10 years old and STILL has marmite reactions.
22:58:52 <peter1138[d]> I'm so glad they have an amusing handle.
23:00:20 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
23:02:42 <andythenorth> /me must to sleep though
23:06:36 *** keikoz has quit IRC (Ping timeout: 480 seconds)
23:07:33 <peter1138[d]> Non flat docks...
23:16:50 *** nielsm has quit IRC (Ping timeout: 480 seconds)
23:17:54 <peter1138[d]> lol @ limitations
23:22:23 <xarick> I would rather prefer a "rework" of valuate-like functions
23:23:24 <xarick> not sure how feasible it would be to maintain a script alive but suspended/resumed instead of just killing it
23:24:55 <xarick> i'd take the risk of a different game state than having the kill outright killed
23:30:37 <xarick> or allow the user to chose between current-game state valuation at the risk of having the script killed or have the game suspend, change state then resume.
23:34:26 <talltyler> Or just don't write a script that does that ๐
23:39:44 <xarick> wow, the url brackets didn't work
23:40:42 <xarick> actually, the embed didn't pop up so it kinda worked
23:42:51 <Rubidium> xarick: ah yes, the tried and true method of making things significantly slower to prevent stuttering when using a badly written AI
23:45:07 <Rubidium> I rather kill scripts, so the developer is forced to write better code. than slowing down the well written scripts
23:45:58 <Rubidium> but alas, you seem to be on the side that is attempting to improve the performance of badly written scripts
23:46:29 <peter1138[d]> Well, a few hours ago it was all doom and gloom with the potential for scripts to hang.
23:46:44 <peter1138[d]> Now it's doom and gloom that a script might be killed if it does that...
23:47:11 <_jgr_> It's a problem if the game is made unplayable because of a script, it's no great loss if a script is killed
23:51:27 <peter1138[d]> Hmm, do we prefer "auto p" or "auto *p"...
23:52:00 <peter1138[d]> There's not many "auto *"...
23:52:35 <peter1138[d]> Hmm, or not use auto. Silly me.
continue to next day โต