Times are UTC Toggle Colours
00:04:15 *** HerzogDeXtEr has quit IRC 00:08:33 <Pruple> I'm still wondering how withdrawal works... I'm not sure keeping the parent in buy lists when it's no longer available makes sense. reparenting to the oldest/lowest ID currently available? and/or synchronised withdrawal for variants with the same intro date and lifespan? 00:10:29 <petern> In theory if reliability is synced, and the intro dates/lifespan are the same, it'll be synced withdrawal too. Perhaps. 00:17:32 <petern> Okay, Iron Horse is a good test of getting the order correct for reliability 00:51:34 <petern> https://cdn.discordapp.com/attachments/1008473233844097104/1050575400335593592/image.png 00:51:34 <petern> Well it's not quite syncing withdrawal, but the top one is how the expired parent appears since a couple of days ago. 01:17:52 <Eddi|zuHause> i haven't followed the discussion, but: reliability syncing works on initial intro date, can't you just override the per-company mask to change variant availability? 01:20:17 <Eddi|zuHause> we might have shuffled that around in the past, but on model initialisation there's code to store/load random seed for the reliability curve 01:29:11 <petern> reliability isn't synced 01:30:24 <petern> <https://github.com/OpenTTD/OpenTTD/pull/8470> 01:34:29 <Eddi|zuHause> right, so someone undid this 01:34:57 <Eddi|zuHause> but it could technically be done this way 01:36:43 <petern> However that does rely on the intro date being the same. 01:44:10 <petern> Ah, and of course the variant parent is not flagged, so has different reliability anyway. Poot. 01:51:36 <petern> Oh this is bad idea 😄 01:56:04 <petern> Urgh, andy's still got random-colour liveries hiding behind the variants 🙂 01:57:04 <petern> https://cdn.discordapp.com/attachments/1008473233844097104/1050591885829349537/image.png 01:57:05 <petern> Confused me somewhat 😄 01:59:07 <petern> Anyway I can sync reliability by fixing the random seed and including the variant id (if sync is turned on) or just the engine id (if it's not) 01:59:34 <petern> That way it uses the same ID as for the parent, even if the parent isn't set to sync 02:00:03 <petern> reset_engines no longer randomises reliability though 02:02:11 <Pruple> I don't think that's a problem 02:17:21 <petern> Only that I found it handy to randomly test various engine expiry combinations 🙂 02:19:52 <petern> Hmm, so reliability can then be synced purely by using spec-state, and doesn't need state of other engines. Good. 02:20:10 <petern> Although this way won't work of the intro date is different. 02:27:41 <petern> Hm, perhaps I could use the variant parent's age in that case. 02:29:23 <petern> That would make them expire at the same time too (given the same base life), even if the intro date was later. 02:35:32 *** WormnestAndroid has quit IRC 03:06:58 <petern> Oh, if the intro date is before the current game date, it calculated the age in months, by dividing the number of days by 32. 03:13:22 <Eddi|zuHause> that sounds almost correct :p 03:13:45 <Eddi|zuHause> maybe file that under 1mph=1.6kph :p 03:50:23 *** Flygon has joined #openttd 03:56:36 <DorpsGek> [OpenTTD/OpenTTD] perezdidac updated pull request #10215: Feature: Expand all towns in the scenario editor https://github.com/OpenTTD/OpenTTD/pull/10215 03:58:18 *** debdog has joined #openttd 04:01:40 *** D-HUND has quit IRC 04:21:38 <EmperorJake> Does the variants feature work for wagons as well? 07:33:17 *** sla_ro|master has joined #openttd 08:17:39 <andythenorth> petern: surprise! 08:19:30 <Pruple> o/ 08:21:22 <andythenorth> hi 08:25:58 <andythenorth> goes it variants today? 08:26:06 <andythenorth> I'm supposed to be working a half day 08:34:36 <Pruple> half day, half horse? 08:59:49 <petern> EmperorJake: It should do but I've not tried it 09:01:43 <EmperorJake> Good, because I can think of quite a few use-cases for it already in my GRFs 🙂 09:45:44 <petern> Those are probably the reason for it 😉 09:46:26 <petern> andythenorth: Goes it throw out colour-based trolling? 09:49:43 <ag> petern: Oh dear 10:12:41 <andythenorth> I'll turn that off later 10:13:09 <andythenorth> I want to port the existing automagical CC liveries to variants directly 10:13:18 <andythenorth> instead of pissing around adding lots of new trains 10:13:38 <andythenorth> compile can sort that out, just requires attention / headspace 😛 10:13:47 *** Wolf01 has joined #openttd 10:28:51 <petern> Magic preprocessing 10:39:05 <petern> Is there a reason to save/restore random seed state instead of just using a new Randomizer? 10:42:14 <petern> `Random()` has specialness when `RANDOM_DEBUG` is enabled I suppose. 10:45:02 <petern> Eddi|zuHause: In true old-code fashion, it's a cryptic `>> 5` rather than `/ 32` 10:46:30 <dwfreed> which makes no sense, because compilers will automatically optimize a / 32 to a >> 5 in the assembly 10:46:43 <petern> It's old code. 10:53:37 <petern> ConvertDateToYMD is complex 🙂 10:59:33 <petern> So if the age is calculated 10 years after the intro date, it's a 6 month difference. Does it matter? Probably not. 11:00:05 <Timberwolf> Good old Chris Sawyer. Never do a simple calculation when you can shift, twiddle a couple of bits and shift again to save 2 cycles. 11:00:30 <Timberwolf> Even if it's something only called once per frame! 11:02:12 <petern> That isn't quite fair. 11:02:18 <petern> CS was writing in assembly. 11:04:50 <Timberwolf> There's something somewhere where he admits it's habit, having to do it so often for tight loops in simple games that it's just habit even in places where a MUL or DIV with an extra memory access would be fine. 11:06:08 <petern> Even in 1995, every instruction counted. 11:14:50 <petern> Probably less so when he wrote Locomotion 🙂 11:15:21 <petern> Anyway a compiler will (probably) compile /32 as >>5. 11:21:21 <LordAro> https://godbolt.org/z/d7fKqEjfG doesn't even need optimisations turned on 11:21:46 <LordAro> oh, clang does / 32 11:21:58 <LordAro> until you turn optimisations on 11:23:24 <Timberwolf> RCT is the one I tend to think of where he does it for things like the ride rating calculation. 11:24:19 <Timberwolf> But I think a lot of it is having written so much 8-bit stuff and conversions to PC when they were very limited, it's just ingrained by that point. 11:24:41 <Timberwolf> And it's not like it hurts if you're the only person reading it and to you that's the "natural way" of, say, dividing by 5/8ths. 11:27:00 <Timberwolf> There's a good thing from Carmack somewhere where he talks about doing "dumb things really fast in assembly" in Wolfenstein to using smarter algorithms in Doom and writing pretty much the entire thing in C apart from a few of the *really* tight loops like the wall column renderer. 11:39:57 <petern> Never forget the Fast inverse square root algorithm from Quake 🙂 12:00:09 *** Samu has joined #openttd 13:13:36 <petern> Hmm tempted to start using flags fields in databases, instead of lots of individual booleans. 13:14:00 <petern> Bad for querying and normalization, good for quickly adding something without updating schema 13:23:14 <TallTyler> I strongly considered flags for employee qualifications in my current Blazor application, but two-way binding is so much easier with booleans that I opted for faster development time and a slightly less optimized database 13:24:13 <TallTyler> (Binding with the model object, not directly with the database, of course) 13:24:33 <petern> I use some views to simplify getting the right data without having code for it. So I need to update the real object, and the views, and... meh. 14:27:36 <petern> And then you think maybe just a flag isn't enough information anyway... 14:33:28 <petern> And is it too hard to set up if I make it flexible enough. 14:54:30 <petern> Crap, now I need to run reset_engines twice. Maybe I should 😄 14:55:08 <petern> Ah no, this is still wrong. 15:07:09 <supermop_toil> hi 15:07:51 *** WormnestAndroid has joined #openttd 16:02:36 *** gelignite has joined #openttd 16:09:00 *** sla_ro|master has quit IRC 17:32:31 *** HerzogDeXtEr has joined #openttd 17:46:46 *** Tirili has joined #openttd 17:57:09 <andythenorth> so hungry 18:00:30 <petern> Many variants? 18:01:07 <andythenorth> will be yes 18:01:14 <andythenorth> soon 18:20:59 *** Flygon has quit IRC 18:25:42 *** sla_ro|master has joined #openttd 18:43:33 <DorpsGek> [OpenTTD/OpenTTD] DorpsGek pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/2756741575b29ccf5c2646ecacd561851c9fb2a0 18:43:34 <DorpsGek> - Update: Translations from eints (by translators) 18:48:01 *** Wormnest has joined #openttd 19:18:04 <petern> Well... I wonder what actually happens with reliability syncing with different introduction dates. 19:18:37 <supermop_toil> different reliability per livery? 19:26:38 <petern> That's why I'm syncing it, so it's the same. 19:26:52 <petern> It now works if the intro date is the same, which is a start. 19:27:03 <petern> It should also work even if it isn't, but I'm not sure 🙂 20:00:52 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1050864628583899136/iron-horse.grf 20:00:52 <andythenorth> petern: no new variants, but nerfed the CC stuff 20:01:09 <petern> heh 20:03:20 <petern> So, adding flags 20:06:55 <andythenorth> testing something about ID ranges here 😛 20:06:57 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1050866161652338799/image.png 20:07:03 <andythenorth> that's one engine 😛 20:10:14 <petern> Well 20:10:17 <petern> ID ranges? 20:10:30 <petern> Are you using 64k engine IDs yet? 😄 20:11:37 <andythenorth> no 😛 20:11:44 <andythenorth> the IDs go in blocks of 10 20:11:57 <andythenorth> I am using the intermediates for variants 😛 20:12:13 <petern> Hmm, just turned my boiler temperature up, it's cold enough that 60 isn't warming the house up. 20:12:41 <andythenorth> resilient: 13980, 13981, 13982 etc 20:13:12 <bigyihsuan> only 10 variants? 😛 20:13:22 <andythenorth> they can exceed 10 😛 20:13:29 <petern> So, extra flags... I only need 4. Should I make it a DWORD anyway, so there's enough room for future flags without adding more properties...? 20:13:32 <andythenorth> just the next ID has to be left unused by anything else 20:13:38 <andythenorth> many flags 20:13:55 <andythenorth> what do other flags have? 20:14:34 <petern> The first set of flags is 8 bits. 20:14:35 <petern> But it's full. 20:14:54 <andythenorth> dword 😛 20:15:00 <petern> The other way to extend that is to create NewGRF v9. But no. 20:15:05 *** keikoz has joined #openttd 20:15:27 <petern> DWord is overkill but means there's future space for lots of things even though I can't think of anything right now. 20:17:29 <andythenorth> flags for air brake or vacuum brake or both 😛 20:17:43 <andythenorth> oh no, we'd need probably actual PSI and line charge speeds 20:17:49 <andythenorth> for true fidelity 20:17:52 *** keikoz has quit IRC 20:17:53 <andythenorth> and gold plated AC cables 20:27:09 *** reldred has quit IRC 20:38:25 *** keikoz has joined #openttd 20:53:18 *** Wormnest has quit IRC 20:53:38 *** Wormnest has joined #openttd 21:26:56 *** keikoz has quit IRC 21:27:10 *** keikoz has joined #openttd 21:27:47 <petern> Well 21:29:35 <petern> Time to throw that cheese out 21:30:54 <petern> I should update the PR 21:31:04 <petern> Oh yes, when it compiles. 21:39:37 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #10220: Feature: Engine variant groups https://github.com/OpenTTD/OpenTTD/pull/10220 21:40:11 <Pruple> o/ 21:40:25 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #10220: Feature: Engine variant groups https://github.com/OpenTTD/OpenTTD/pull/10220#issuecomment-1344807415 21:40:37 <petern> Who knows? 21:40:48 <Pruple> big nose. 21:41:03 <petern> Thanks, I grew it myself 21:41:45 <andythenorth> consist.add_variant( 21:41:45 <andythenorth> type="livery" 21:41:46 <andythenorth> ) 21:41:52 <andythenorth> somewhat 21:41:58 <Pruple> you can pick your friends, but you can't pick your nose 21:42:20 <Pruple> variants will be handy for road vehicles with extra trailers 🙂 21:42:43 <Pruple> times I have completely rewritten the plan for my road vehicle set since the last time I actually drew a road vehicle sprite: 4. 21:43:44 <andythenorth> variants with 1, 2, 3, 9 trailers? 21:44:03 <Pruple> something like that 21:51:48 <petern> Should be fine 21:54:43 <petern> I need to pop out, I expect someone to have tried using these flags and reporting bugs 😉 21:58:07 <andythenorth> Pruple: will do it 😛 22:10:01 <Pruple> won't I? 22:15:51 <andythenorth> ok brains, need help 😛 22:16:11 <andythenorth> variants should not be shown in the tech tree, just the parent https://grf.farm/iron-horse/2.63.1/html/tech_tree_table_red.html 22:16:38 <andythenorth> variants should be show on the vehicle details page https://grf.farm/iron-horse/2.63.1/html/bone.html 22:16:45 <andythenorth> but what should I do here? https://grf.farm/iron-horse/2.63.1/html/trains.html 22:17:10 <petern> There's a tech tree? Heh 22:17:15 <andythenorth> 'tech tree' 22:17:30 <petern> Oh your website 😄 22:18:02 <petern> I came back in, I was not needed for lift duties after all 22:19:11 <petern> You could make it fold/unfold lol 22:20:17 *** wallabra has joined #openttd 22:20:55 *** wallabra has joined #openttd 22:23:13 *** wallabra has quit IRC 22:23:41 *** wallabra has joined #openttd 22:37:11 *** keikoz has quit IRC 22:48:53 <andythenorth> I could 22:49:00 <andythenorth> oops fell asleep on the sofa 22:50:24 <petern> Slack 22:52:46 <andythenorth> ok tomorrow, more variants 😛 22:53:05 <petern> lol, when you name-drop OpenTTD and they're like, what, never heard of it. 22:57:39 *** Tirili has quit IRC 22:58:57 *** Tirili has joined #openttd 23:04:28 *** Wormnest has quit IRC 23:06:34 *** Samu has quit IRC 23:10:56 *** HerzogDeXtEr has quit IRC 23:18:13 *** WormnestAndroid has quit IRC 23:18:29 *** WormnestAndroid has joined #openttd 23:23:41 *** gelignite has quit IRC 23:26:32 *** WormnestAndroid has quit IRC 23:27:13 *** WormnestAndroid has joined #openttd 23:32:35 *** Wolf01 has quit IRC 23:37:41 *** sla_ro|master has quit IRC 23:48:15 *** Wormnest has joined #openttd