IRC logs for #openttd on OFTC at 2024-01-31
            
00:00:57 <truebrain> lol, okay, there are some other things that could use a touch-up ๐Ÿ˜„
00:01:14 <truebrain> so when ScriptConfig is created, the AddRandomDeviation is done
00:01:17 <truebrain> but when the AI starts
00:01:24 <truebrain> it is done again
00:01:27 <truebrain> sometimes
00:01:28 <truebrain> ๐Ÿ˜›
00:02:14 <_glx_> something is wrong with your triple backquote ๐Ÿ™‚
00:02:34 <peter1138[d]> Yeah I fixed them ๐Ÿ™‚
00:03:36 <peter1138[d]> So I moved the seed initialization to the InitializeGame() function, instead of the ... landscape generator.
00:04:07 <truebrain> on its own, that sounds like a good fix
00:04:14 <_glx_> makes sense
00:04:16 <truebrain> but it does hide again the actual problem with AIs ๐Ÿ™‚
00:04:30 <_glx_> it fixes one issue ๐Ÿ™‚
00:05:01 <peter1138[d]> What is it hiding?
00:05:01 <truebrain> I get why the ctor does this stuff, but it is just weird in the way it is done ...
00:05:04 <_glx_> AIs have more than one
00:05:51 <truebrain> What also sits weird with me, is that the ctor calls `AddRandomDeviation`, but doesn't do the `SCRIPTCONFIG_RANDOM`
00:05:55 <peter1138[d]> Okay, it's not great design, but let's separate "design issue" from "behaviour issue" here ๐Ÿ™‚
00:06:18 <peter1138[d]> A bit at least.
00:06:28 <_glx_> at least your change put initialisation where it should be
00:06:33 <truebrain> yeah, your change makes things back to the "working" state; it is still shit ๐Ÿ˜›
00:07:00 <truebrain> mostly, I don't think `AddRandomDeviation` should be called by a ctor; but I think it should be done on a more explicit moment in time ๐Ÿ™‚
00:07:11 <truebrain> and after that, never again by shit like `Change()` ๐Ÿ˜›
00:07:19 <peter1138[d]> There is one issue that may need attention.
00:07:21 <peter1138[d]> "one"
00:07:40 <truebrain> but I have the feeling this is the kinda thread when you pull ........
00:08:18 <_glx_> smells like a rabbit ๐Ÿ˜‰
00:08:20 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #11937: Fix: Initialize random seed earlier in new game process. https://github.com/OpenTTD/OpenTTD/pull/11937#pullrequestreview-1852645971
00:08:42 <peter1138[d]> There is a LOT of stuff that happens between this seed initialisation position, and the current one.
00:08:49 <peter1138[d]> Like, massive amounts of initialization.
00:09:09 <peter1138[d]> Hopefully none of it uses random...
00:09:20 <truebrain> what we could also do, but it is a bit nasty: mark the randomizer as NOT USABLE, during starting of a game
00:09:28 <peter1138[d]> Except for the AI/GS init of course.
00:09:28 <truebrain> and only mark it usable later on in the process
00:09:35 <truebrain> just to make sure nobody is doing weird random shit ๐Ÿ˜›
00:09:37 <truebrain> but ... #effort
00:10:12 <peter1138[d]> Can't even move comments without the grammar police picking up on something I didn't change!
00:10:24 <truebrain> anyway, one minor issue with your PR peter1138[d] , please also move line 310 in genworld.cpp before `InitializeGame`
00:10:47 <truebrain> otherwise a lot of maps will look like `GENERATE_NEW_SEED` ๐Ÿ™‚
00:11:04 <peter1138[d]> Oh lol
00:11:36 <truebrain> it fixes the issue in one place, but introduces a shitton of other issue in another ๐Ÿ˜„
00:11:58 <truebrain> maybe move it inside that function btw
00:12:03 <truebrain> makes much more sense
00:13:05 <truebrain> only actual change I can otherwise see, is that TTDLX and TTDp now have the randomizer actually initialized
00:15:32 <_glx_> oldloader overwrites with the actual state during load
00:15:40 <truebrain> I hoped as much ๐Ÿ™‚
00:16:16 <truebrain> `SCRIPTCONFIG_RANDOM` is still odd; it reads like it is rather broken
00:18:07 <_glx_> oh at least we nuked `start_date`, it was even worse with it
00:18:16 <_glx_> special handling everywhere
00:18:17 <truebrain> I know ๐Ÿ˜ฆ I am sorry ๐Ÿ˜ฆ
00:18:33 <_glx_> the idea was nice
00:18:35 <truebrain> the idea was great! The execution was terrible! ๐Ÿ˜›
00:18:52 <_glx_> delay between start is simpler
00:18:59 <peter1138[d]> assert(saved_seeds.random.state[0] == _random.state[0]);
00:18:59 <peter1138[d]> assert(saved_seeds.random.state[1] == _random.state[1]);
00:18:59 <peter1138[d]> assert(saved_seeds.interactive_random.state[0] == _interactive_random.state[0]);
00:18:59 <peter1138[d]> assert(saved_seeds.interactive_random.state[1] == _interactive_random.state[1]);
00:19:03 <peter1138[d]> Brute force :p
00:19:06 <truebrain> haha
00:19:08 <truebrain> mad man ๐Ÿ˜„
00:19:27 <truebrain> oops, it is 0130 almost ...
00:19:37 <truebrain> need to get out by 0630? Something like that ..
00:19:38 <truebrain> oops ๐Ÿ˜›
00:19:40 <truebrain> night!
00:22:11 <peter1138[d]> Well, it worked, and then my PC locked up.
00:22:17 <peter1138[d]> Nvidia drivers I bet.
00:27:45 <_glx_> oh BTW it "worked" before <https://github.com/OpenTTD/OpenTTD/commit/c5ff61c5f2c30748ea03825685f0d9d68c0952de> because AIs used `return _networking ? _interactive_random : _random;`
00:28:04 <truebrain> truebrain: Lol, just moving isn't enough, as it needs settings initialized, which is done later, in the function that needs the random .. Full circleA
00:28:57 <peter1138[d]> Perfect.
00:29:16 <peter1138[d]> I might go for an early night...
00:30:24 <_glx_> so we're back to the "need to touch ScriptConfig" one ?
00:32:28 <peter1138[d]> Okay, so... load settings, set up scripts but don't do the deviation stuff, then later set up randomizers, and add deviation.
00:34:56 <_glx_> oh but Change() applying deviation should not be an issue when loading, because config->StringToSettings(_ai_saveload_settings);
00:35:01 <truebrain> I am very tempted to just untangle it all, and make things like `Change` more sane.. maybe tomorrow. For now, any quick hack works ๐Ÿ™‚
00:35:01 <peter1138[d]> Or just leave everything as it is and do the deviation stuff in generate world :p
00:36:47 <peter1138[d]> OnNewGame...
00:37:16 <rau117> talltyler: May I ask if you have any thoughts on this suggestion? https://github.com/OpenTTD/OpenTTD/pull/11798#issuecomment-1914132095
01:04:37 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #11798: Fix #10118: Cycle through current signal group, not just path signals https://github.com/OpenTTD/OpenTTD/pull/11798#issuecomment-1918177244
01:05:59 <talltyler> Uh, disregard, I misread
01:06:51 <talltyler> Iโ€™ll need to think about that some other time.
01:08:03 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on issue #10341: [Bug]: AI/GS settings randomization issues https://github.com/OpenTTD/OpenTTD/issues/10341
01:09:48 <_glx_> the issue descriptions are as bad as PR descriptions
01:10:25 <_glx_> at least for PR we can try to understand the code
01:13:23 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
01:16:55 <wensimehrp> https://cdn.discordapp.com/attachments/1008473233844097104/1202059909043343431/image.png?ex=65cc1487&is=65b99f87&hm=36a791d83242e6e7c5eee896e51893f04236b90e89b381e7853d6c0a5fdcf586&
01:16:55 <wensimehrp> what is this? currencies?
01:18:06 <rau117> talltyler: Although reassigning โ€œctrl+click on empty trackโ€ from โ€œbuild the opposite appearanceโ€ to โ€œbuild opposite groupโ€ may be enough for now.
01:18:06 <rau117> Redistributing groups will be more logical, but it still needs to be programmed... But reassigning ctrl+click (I think) will be much easier and faster to do.
01:19:37 <wensimehrp> Other parts of the world uses this kind of format:
01:19:37 <wensimehrp> 000-000-000-000
01:19:37 <wensimehrp> East Asians uses this:
01:19:37 <wensimehrp> 0000-0000-0000
01:19:37 <wensimehrp> ๐Ÿค”
01:23:24 <_glx_> it used to be hardcoded to `k` for 1000 and `M` for 1000000, now it's translatable and there are 2 more values
01:24:09 <_glx_> oh and the ' are just for the code
01:25:00 <_glx_> so the numbers are easier to read
01:30:07 <rau117> _glx_: So this is not related to the game itself and the display of large but still super-accurate values remains as is?
01:36:26 <_glx_> <https://github.com/OpenTTD/OpenTTD/pull/11921> the formatting still use the usual separators
01:39:30 <_glx_> the only change is translatable suffixes used for big numbers displayed with {CURRENCY_SHORT}
01:39:43 <rau117> https://cdn.discordapp.com/attachments/1008473233844097104/1202065646926700584/SPOILER_image.png?ex=65cc19df&is=65b9a4df&hm=a53a01eb33c195fa92a52a48c8be34b1f3121384ebe958b46dbe3fa00ec98845&
01:39:43 <rau117> hehehe
01:40:02 <_glx_> yeah here it uses {CURRENCY_LONG}
01:40:48 <rau117> heheheheheh, not really, it's 13.4 (=
01:41:44 <_glx_> 13.4 had k and M for {CURRENCY_SHORT}
01:42:52 <rau117> *Well... okay, it was a joke, perhaps inappropriate. Some zeros are just fake.*
02:04:05 *** Wormnest has joined #openttd
02:06:24 *** herms has quit IRC (Quit: bye)
02:07:45 *** herms has joined #openttd
02:26:51 *** Wormnest has quit IRC (Quit: Leaving)
02:34:37 <wensimehrp> _glx_: Personally, I will not translate this string because *there is no Chinese equivalent*.
02:34:37 <wensimehrp> Traditionally, as I've just mentioned, most East Asians use the four-digit format 0000-0000, with the units "ไธ‡" meaning 10,000; "ไบฟ", 100,000,000; and "ๅ…†", 1,000,000,000,000. The problem is that someone translated "m" to "ๅ…†" which confuses the meaning.
02:34:37 <wensimehrp> Also, no CJK native speakers would say things like 10k in their languages. In Chinese it would be "10 ๅƒ".
02:34:37 <wensimehrp> As I said, I personally won't translate this string, and there may be two solutions, one is to change the codes and add an extra setting to switch between the 000-000 system and the 0000-0000 system, the other, which is much simpler, is not to translate the string. However, this needs further discussion, and I cannot be sure that other translators would translate it, so a comment system or a lock
02:34:37 <wensimehrp> system is necessary in this situation.
02:35:57 <wensimehrp> and to follow the British format or the American format is another problem
02:46:09 <wensimehrp> https://cdn.discordapp.com/attachments/1008473233844097104/1202082362096357396/image.png?ex=65cc2970&is=65b9b470&hm=32b26ca3655d16eed313f37689bbcf67cb77e7fd99fcfd372c30d1556e957654&
02:46:09 <wensimehrp> A screenshot from A-Tourism to illustrate. "9ๅ…†7566ไบฟ701ไธ‡ๆ—ฅๅ…ƒ" means 9,756,607,010,000 Yen
02:57:31 <DorpsGek> [OpenTTD/OpenTTD] WenSimEHRP opened issue #11938: [Bug]: Cannot fund towns while using infinate money https://github.com/OpenTTD/OpenTTD/issues/11938
02:59:31 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on issue #11938: [Bug]: Cannot fund towns while using infinate money https://github.com/OpenTTD/OpenTTD/issues/11938
03:12:40 <merni> Hah.
03:18:37 <merni> truebrain: Hm, I will take a look at the text editor gui to see if rubidium's suggestion can be implemented easily. Otherwise probably not :)
03:24:12 *** D-HUND has joined #openttd
03:27:55 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:30:18 <merni> I wonder if it is even necessary to filter the list and only display actions for which you have enough money
03:30:54 <merni> Eg. we don't remove trains from the purchase list if you don't have enough money to buy them
03:31:22 *** gnu_jj has joined #openttd
03:32:36 <merni> Anyway, towns.cmd:3438 is the issue, will fix in the evening
03:34:30 *** gnu_jj_ has quit IRC (Ping timeout: 480 seconds)
03:34:55 <_glx_> actions used to be hidden, now they are just disabled
03:35:56 <merni> Ah right
03:37:01 <_glx_> but indeed the money check is useless in infinite mode
03:37:04 <merni> Still, why not have them clickable but display the usual error message that happens if there isn't enough money for the command?
03:37:26 <merni> _glx_: Of course but I am talking in general
03:38:19 <_glx_> yeah they could probably be displayed like others, I can't remember what was the reasoning
03:40:04 <DorpsGek> [OpenTTD/OpenTTD] Limyx826 commented on issue #9565: [Bug]: XG MIDI playback is weird with external MIDI output https://github.com/OpenTTD/OpenTTD/issues/9565
03:45:43 <_glx_> anyway it comes from <https://github.com/OpenTTD/OpenTTD/pull/9928>
03:46:21 <DorpsGek> [OpenTTD/OpenTTD] Limyx826 commented on issue #9295: Music Audio is not normalized/leveled correctly https://github.com/OpenTTD/OpenTTD/issues/9295
04:47:06 *** keikoz has joined #openttd
04:47:59 *** Flygon has joined #openttd
04:52:31 <rau117> TallTylerviaGitHub: btw loan interest in inf. money โ€“ is this how it was intended?
05:07:13 <DorpsGek> [OpenTTD/OpenTTD] DefinitelyNotRau117 commented on issue #11938: [Bug]: Cannot fund towns while using infinate money https://github.com/OpenTTD/OpenTTD/issues/11938
06:17:11 *** keikoz has quit IRC (Ping timeout: 480 seconds)
06:22:49 <reldred> Oh nice, your PR got merged merni, congrats. Not the implementation I wanted but still very useful and I am greateful nonetheless ๐Ÿ˜„
07:03:19 *** D-HUND is now known as debdog
09:11:17 <peter1138[d]> ๐Ÿ˜ฎ
09:32:26 <locosage> ugh, so changing time scale changes income per cargo but not income per train...
09:34:58 <locosage> and mildly affects game start...
09:35:14 <peter1138[d]> There might be some things using the wrong time.
09:37:09 <locosage> I mean in the context 11926
09:37:21 <locosage> haven't even looked how minutes per year affect economy yet
09:37:41 <locosage> but given that's just the nature of math involved it's probably something similar
09:38:41 <locosage> don't quite like 11926 being a "difficulty" setting
09:41:51 <peter1138[d]> Do does your change not affect the income that a vehicle receives?
09:42:21 <peter1138[d]> (That would be odd)
09:43:19 <locosage> if you look at a single trip, yes, but if you look at train average per year it barely changes.
09:43:45 <locosage> distance where the peak is reached changes but yearly income itself is about the same, train just does more/less trips
09:46:11 <peter1138[d]> Scaling the cargo payment shouldn't affect the travel time of vehicles at all.
09:47:09 <locosage> https://cdn.discordapp.com/attachments/1008473233844097104/1202188312761348107/Screenshot_from_2024-01-31_15-16-57.png?ex=65cc8c1d&is=65ba171d&hm=3840959f68ba2c629464f54f56cfc75d811a006c0ef97f2ffb5d2b532f2df431&
09:48:13 <locosage> it's not comparing the same route, it's how much you can possibly make in a year with a single vehicle
09:48:26 <locosage> if you have unlimited cargo
09:50:06 <locosage> https://cdn.discordapp.com/attachments/1008473233844097104/1202189054964408390/Screenshot_from_2024-01-31_15-19-49.png?ex=65cc8cce&is=65ba17ce&hm=1a82e5dbea854c63ccefc486b5c6e2dddd9acc2d15d86ecd6fea9ca8a1c97a3d&
09:50:06 <locosage> but with limited cargo it ofc scales...
09:50:54 <peter1138[d]> In your video 200% means you get paid less.
09:51:12 <peter1138[d]> But 200% in your picture means you get paid more? or still less?
09:51:40 <locosage> same as pr
09:52:42 <peter1138[d]> Basically, you are changing to too many things to be able to make a comparison.
09:54:06 <locosage> huh?
09:54:21 <locosage> I'm changing one thing, it's just that in yearly profit time factor cancels out
09:54:39 <locosage> optimal distance is shorter, optimal payment is less but you can make more trips
09:55:12 <peter1138[d]> You are changing distance and timescale.
09:55:51 <locosage> changing time scale changes optimal distance
09:58:36 <merni> rau117: Yes -- nothing in the economy is changed
09:59:20 <merni> That is how it was *intended* at least, whether that is the correct or best approach is a different question
10:01:54 <peter1138[d]> merni: there is a bug though ๐Ÿ™‚
10:02:04 <peter1138[d]> If you have infinite money you should be able to pay off all your loan.
10:02:09 <merni> Yes
10:02:13 <merni> I got that part
10:02:24 <merni> Will look at it in a few hours
10:02:32 <peter1138[d]> Nice ๐Ÿ™‚
10:02:46 <peter1138[d]> First time trying it, hehe.
10:04:45 *** wallabra has quit IRC (Ping timeout: 480 seconds)
10:04:58 <locosage> well, I guess that's just how math works, can't scale both charts on one axis only
10:05:11 <locosage> and profit per cargo is a more endgame thing so less of a concert
10:05:44 <peter1138[d]> You increase profit by pretending a vehicle took less time than it dies.
10:06:19 <peter1138[d]> Existing games therefore will make a bit more money for their longer lines.
10:07:47 <locosage> I'm not comparing it for existing games, those ofc scale trivially
10:08:01 <locosage> I'm comparing its effect on an optimal playstyle
10:08:35 <merni> It is worth thinking about the loan thing though...
10:09:44 <merni> A loan is pointless in infinite money mode. So on that basis having one and charging interest on it doesn't make a great deal of sense. But on the other hand, the setting can be toggled during the game -- so do you charge interest only if the setting is off?
10:10:15 <merni> I intentionally kept all income and costs the same so that it would not become more like a money-spawning cheat
10:10:31 <peter1138[d]> Keep is simple. You can still have a loan, and if you do it works as before.
10:10:36 <merni> Yeah
10:10:45 <peter1138[d]> Just allow paying it all off because you infinite money.
10:10:58 <merni> Yeah that bit is definitely a bug lol
10:11:11 <locosage> to be more specific I'm comparing max amount of money that can be made in two scenarios:
10:11:11 <locosage> 1. You have an industry with fixed production and no limit on trains.
10:11:11 <locosage> 2. You have one train and unlimited cargo.
10:11:49 *** wallabra has joined #openttd
10:15:19 <peter1138[d]> For me it is relatively obvious that if you increase the payment of cargo based on time.... and then make vehicles travel further because of it, you are going to counteract that increase.
10:16:39 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #11937: Fix: Initialize random seed earlier in new game process. https://github.com/OpenTTD/OpenTTD/pull/11937#issuecomment-1918801030
10:18:16 <peter1138[d]> I need a bigger toaster... fancy sourdough bread is not fitting in :p
10:19:46 <DorpsGek> [OpenTTD/OpenTTD] M3Henry commented on pull request #11917: Change: Make the unloading button toggle Transfer, not Unload All https://github.com/OpenTTD/OpenTTD/pull/11917#issuecomment-1918806513
10:25:13 <DorpsGek> [OpenTTD/OpenTTD] PeterN commented on pull request #11917: Change: Make the unloading button toggle Transfer, not Unload All https://github.com/OpenTTD/OpenTTD/pull/11917#issuecomment-1918815773
10:26:44 <reldred> Well Zorg doesn't want it, so, merge it.
10:28:08 <xarick> hello, let's test 11937
10:30:13 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #11937: Fix: Initialize random seed earlier in new game process. https://github.com/OpenTTD/OpenTTD/pull/11937
10:30:17 <peter1138[d]> xarick: ^^
10:30:27 <peter1138[d]> Yes it's full of debug
10:30:38 <xarick> visual studio installer got in the way
10:31:06 <peter1138[d]> Final will be debug printlns removed and squashed, if it's the right way ๐Ÿ˜„
10:31:25 <DorpsGek> [OpenTTD/OpenTTD] M3Henry commented on pull request #11917: Change: Make the unloading button toggle Transfer, not Unload All https://github.com/OpenTTD/OpenTTD/pull/11917#issuecomment-1918826805
10:32:00 <peter1138[d]> Red cross, whoops.
10:32:14 <peter1138[d]> Oh because of bad commit titles of course.
10:36:48 <xarick> these random stuff have a complex set of rules
10:39:07 <xarick> there's a good AI for testing I posted somewhere
10:39:45 <xarick> https://github.com/OpenTTD/OpenTTD/files/10406107/AI.Settings.test.zip
10:43:29 <peter1138[d]> And unit tests cos of my lazy debug ๐Ÿ˜„
10:43:58 <merni> reldred: Out of curiosity, what was the implementation you wanted? :P
10:45:02 <reldred> Basically final balance is hidden/irrelevent, but operating profit/etc. is still shown, current operating profit/loss shown in status bar. This is pretty much how it works in City Skylines
10:45:31 <reldred> So you can go absolutely hog wild with construction, but can still optimise your network to turn a profit.
10:46:42 <merni> reldred: Showing the profit in the status bar is a cosmetic thing, which can always be added
10:47:27 <merni> should not be very hard to do either if someone wants to attempt it
10:47:45 <peter1138[d]> Yes, that is the same implementation, just with extra visual differences.
10:48:13 <peter1138[d]> A different implementation would be "just set everyone's money to 2^63 every tick"
10:56:10 <xarick> hmm... not sure I found yet another bug
10:56:19 <xarick> or if this is how it used to be
10:57:04 <xarick> you have a random ai, it starts, then you type restart in console, and this random ai is now no longer random, but the ai that started
11:02:02 <reldred> I don't see how that's a bug, you're restarting the existing AI's not re-rolling the dice entirely.
11:02:06 <xarick> verified, it's how it used to be... then that's a bug
11:03:35 <xarick> it's a bug due to the order random deviation settings are applied, this random AI calls the Randomizer.Next() only when it starts, while the other AIs call it upon game start
11:03:51 <xarick> i fail at explaining things...
11:04:01 <xarick> but it's messing with the order of execution
11:06:25 <locosage> https://cdn.discordapp.com/attachments/1008473233844097104/1202208258580811786/Screenshot_from_2024-01-31_16-36-14.png?ex=65cc9eb0&is=65ba29b0&hm=adea551f7e1377561f47dfbd37da30c7ab5ce43ba8a351bff325877840cfff9f&
11:06:25 <locosage> ๐Ÿคฃ
11:07:09 <peter1138[d]> That's a good reason not to allow 500%
11:08:53 <xarick> From the main menu:
11:08:53 <xarick> Configure slot 1: Random AI, slot 2: LuDiAIAfterFix, time between starts: 1 minute
11:08:53 <xarick> start new game
11:08:53 <xarick> slot 2 applies random deviation to that AI
11:08:53 <xarick> wait 1 minute
11:08:54 <xarick> slot 1 starts and becomes LuDiAI too, which also applies random deviation
11:08:59 <xarick> now type restart in console
11:09:20 <xarick> and slot 1 remains as luDiAI, meaning that it runs the randomizer first, before slot 2
11:09:34 <peter1138[d]> So?
11:09:50 <peter1138[d]> Slot 1 and Slot 2 have separate randomizers.
11:10:12 <xarick> isn't it using OWNER_NONE?
11:11:27 <peter1138[d]> Not sure, but why does it matter?
11:11:36 <locosage> https://cdn.discordapp.com/attachments/1008473233844097104/1202209565161304115/Screenshot_from_2024-01-31_16-40-56.png?ex=65cc9fe8&is=65ba2ae8&hm=5032e0366094e72a72bb489a0c2b25f056cdcb930fc6f2cb4b1603848c217f84&
11:11:36 <locosage> peter1138[d]: well, not in vanilla but it can make some sense in some cases...
11:12:25 <xarick> restart command should replicate the same conditions as they were when new game was issued
11:12:33 <peter1138[d]> Why should it?
11:12:59 <peter1138[d]> restart ai is not the same thing as start new game.
11:13:15 <reldred> yeah that's what I was trying to get at
11:13:28 <locosage> https://cdn.discordapp.com/attachments/1008473233844097104/1202210036483629056/Screenshot_from_2024-01-31_16-43-09.png?ex=65cca058&is=65ba2b58&hm=11aebc402f48f89957046b9a2b4c5a3fb03acfce5064d66545986a370b611955&
11:13:28 <locosage> xD
11:13:34 <reldred> it's to restart the current AI's in place, say if one crashes out, etc?
11:13:49 <locosage> I'm not even sure profit calc replicates math correctly in these weird edge cases...
11:14:08 <xarick> was supposed to maintain replayability intact
11:14:37 <peter1138[d]> oh you mean restart game. I suppose that should.
11:14:56 <reldred> yeah that seems more reasonable
11:15:09 <reldred> still niche
11:15:34 <peter1138[d]> But restart game should also restart random ai back to random.
11:15:46 <xarick> yes, that's what I'm trying to say
11:15:55 <peter1138[d]> You're doing a poor job of it.
11:16:09 <peter1138[d]> Are you saying "restart game" does not reset AI state?
11:16:37 <xarick> it should change the slot 1 which became LuDiAI back to Random AI, as you said
11:17:05 <peter1138[d]> Okay. That seems to be a bug.
11:17:29 <peter1138[d]> It's not actually related to what #11937 fixes though.
11:17:43 <xarick> and given it's a "restart" it should still become LuDiAI once it starts
11:17:49 <xarick> after 1 minute
11:18:21 <peter1138[d]> Focus on the part that matters.
11:18:41 <peter1138[d]> Random AI is not changed back to Random AI on game restart.
11:19:14 <peter1138[d]> The rest will happen if the seeds are initialized in the correct order, but that is a separate issue.
11:22:28 <peter1138[d]> MakeNewgameSettingsLive is not called if you do `restart` as `reset_settings` is false.
11:22:42 <peter1138[d]> Therefore, AI is not reconfigured.
11:24:14 <peter1138[d]> If you do `restart` ALL changed settings are retained.
11:24:23 <peter1138[d]> If you change YAPF to NPF then it will start on NPF.
11:24:59 <xarick> oh... i guess those aren't randomized during the course of a game without my own intervention
11:25:19 <xarick> but I see
11:25:21 <merni> Okay, so transferring money between companies in multiplayer still checks if the comapny has repaid its loan or has enough money to do so. Does that still make sense with infinite money? IMO transferring money doesn't really make sense if there is infinite money
11:25:39 <peter1138[d]> Allow transferring infinite money? ๐Ÿ˜ฎ
11:25:41 <merni> so it doesn't matter
11:26:49 <reldred> Oh hey, infinite money will allow running eyecandy car AI's without needing gstoylib
11:26:54 <reldred> that's handy
11:26:55 <merni> I love the comment on the money cheat `///< get rich or poor`
11:27:56 <peter1138[d]> Next someone will be wanting infinite money but only for some companies...
11:28:22 <xarick> "make a new grf"
11:28:36 <xarick> was the excuse I used to get
11:28:42 <locosage> peter1138[d]: I already have a usecase for that xD
11:29:04 <locosage> though it only exists because deity mode has less rights than a company sometimes xD
11:29:55 <xarick> i think there was a base costs newgrf
11:30:07 <xarick> set every multiplier to the lowest possible
11:30:07 <merni> there is
11:31:42 <xarick> there's a whole different philosophy after 2TallTyler took over
11:32:01 <merni> "took over"...?
11:32:07 <merni> and what is this new philosophy?
11:32:39 <xarick> "everything had to be done via NewGRF", "no more settings!" kind of
11:32:47 <reldred> lol what
11:32:57 <merni> ^
11:33:21 <merni> companies' money is not even accessible to newgrf (to my knowledge)
11:34:37 <xarick> in that case it was then "make a GS for that"
11:34:55 <reldred> yet merni still got his PR merged
11:35:07 <reldred> so... what's your point?
11:35:08 <xarick> "change the API", "add to the API", but "no more settings!"
11:35:36 <reldred> I
11:36:11 <locosage> newgrfs over settings was a thing long before 2TT
11:36:38 <merni> I think xarick is saying 2tt is reversing that
11:36:43 <merni> which is also not true...
11:37:00 <merni> it is just that there are some things which make sense for grf/gs, and some which don't
11:37:40 <peter1138[d]> And some things which just need somebody to do them.
11:38:48 <locosage> ah, I guess in reverse it's at least somewhat plausible...
11:39:53 <peter1138[d]> Settings which do things that can (and are) done by NewGRFs are still probably going to be nope.
11:40:40 <merni> Okay, so github search is incomplete...
11:41:02 <peter1138[d]> It's not great ๐Ÿ™‚
11:41:16 <merni> I searched for "money" in the openttd repo and `town_cmd.cpp` didn't appear as a result even though there are 5 instances of that wod
11:41:24 <merni> still doesn't appear
11:41:29 <merni> peter1138[d]: Well, TIL :)
11:41:35 <merni> Anything better?
11:42:05 <locosage> peter1138[d]: It sounds great in theory until you suddenly need to write a newgrf to configure a server
11:43:58 <merni> I guess grep is possible
11:44:36 <locosage> permissive local authority used to be a great example, you just had to write vanilla house set with no authority cost on houses.
11:44:57 <DorpsGek> [OpenTTD/team] daishan-swe opened issue #483: [sv_SE] Translator access request https://github.com/OpenTTD/team/issues/483
11:45:52 <locosage> or, in later version gamespript that set max rating constantly
11:46:02 <merni> Eternal Love :)
11:46:19 <locosage> yeah, one of them xD
11:46:30 <merni> Wouldn't be a terrible option if there could be >1 game script at a time
11:46:57 *** thelounge345 has quit IRC (Ping timeout: 480 seconds)
11:48:00 <peter1138[d]> merni: If I'm searching code I just use the search in VS Code.
11:48:13 <merni> I'm not using vs code
11:48:17 <merni> I guess I could do so
11:48:31 <locosage> ha, and it was 2TT who added permissive authority xD
11:49:02 <peter1138[d]> merni: If you'd like to get your hands dirty...
11:49:08 <merni> Oh geez
11:49:12 <merni> one thing at a time
11:49:21 <peter1138[d]> Could be fun having GS conflict with each other though.
11:49:22 <merni> and that sounds scarily complex
11:55:13 <merni> ok so the old fashioned `grep -r --color -C 5 money .` worked
11:56:56 <xarick> 11937 works
11:57:01 <peter1138[d]> I used to do all my developing with vim ๐Ÿ™‚
11:58:23 *** thelounge345 has joined #openttd
12:00:40 <peter1138[d]> Is `alt` still forbidden due to Linux? My systems use the 'win'-key for things that used to be alt 20 years ago...
12:01:28 <xarick> not sure about AIConfig::GetConfig changes, but it's working so i guess it doesn't matter
12:02:04 <merni> Hm, is `INT64_MAX` the same as `UINT32_MAX`?
12:03:17 <peter1138[d]> No.
12:03:56 <merni> for some reason one function in the gs api checks `EnforcePrecondition(false, (int64_t)money <= UINT32_MAX);`
12:04:19 <merni> converting to int64 and then checking against the max of uint32... ๐Ÿค”
12:05:42 <peter1138[d]> Money is already int64, but it's but in a special type that prevents overflows.
12:06:09 <merni> right, still doesn't explain why it is checked against UINT32_MAX and not INT64_MAX
12:07:20 <xarick> looks like a leftover?
12:07:28 <xarick> ask glx
12:07:31 <peter1138[d]> Money was originally uint32
12:07:47 <peter1138[d]> But even then checking its less than or equal to UINT32_MAX is redundant.
12:08:07 <peter1138[d]> Ah, it wasn't checked then.
12:08:18 <peter1138[d]> <https://github.com/OpenTTD/OpenTTD/commit/691c22ac6a02004d464aa6d12648b690b332aca6>
12:09:03 <peter1138[d]> So the type was changed and the checks added to ensure it's within the old bounds.
12:09:14 <peter1138[d]> Whether that is necessary...
12:10:37 <xarick> company.engine_renew_money
12:10:43 <xarick> is that uint32? or Money or
12:11:03 <peter1138[d]> Ah still uint32_t.
12:11:09 <peter1138[d]> Good call. That's why the check is there.
12:11:48 <merni> ah
12:11:56 <xarick> SLE_UINT
12:12:13 <peter1138[d]> Of course, the command itself probably checks that, but it avoids sending a command if it's not going to work.
12:13:07 <peter1138[d]> Hmm, maybe I should look into convert my CI tasks to github style.
12:17:42 <xarick> item.flags & SCRIPTCONFIG_RANDOM hmm
12:19:17 <xarick> yeh, it works!, I don't know why, but it works!
12:23:31 <peter1138[d]> Confidence.
12:24:32 <xarick> I wanted to understand what those do <https://github.com/OpenTTD/OpenTTD/pull/11937/files#diff-c7dbd766c6b179d60b090c37cc411718f4d4a021bf31c8781ed613e0319f4cf7R29-R32>
12:24:40 <xarick> can't figure it out
12:25:59 <xarick> can only reach there when booting openttd
12:27:25 <peter1138[d]> Might not be necessary.
12:30:18 <xarick> new AIConfig() is called... and it's in a blank state
12:30:34 <xarick> there's no setting at all to do any kind of deviation
12:30:50 <peter1138[d]> Fair.
12:31:41 <DorpsGek> [OpenTTD/OpenTTD] PeterN updated pull request #11937: Fix: Initialize random seed earlier in new game process. https://github.com/OpenTTD/OpenTTD/pull/11937
12:33:21 <peter1138[d]> +44-8 ๐Ÿ˜ฆ
12:35:11 <peter1138[d]> Hmm, I wonder.
12:36:19 <peter1138[d]> MakeNewgameSettingsLive doing the AI/GS clean-up and start-up seems weird.
12:37:45 <peter1138[d]> Let's go with out-of-scope ๐Ÿ™‚
12:48:52 <peter1138[d]> Teams needs me to refresh again... stupid piece of crap.
13:10:01 <locosage> should've made 2bil server and called it og money overflow goal
13:23:47 <_glx_> <https://github.blog/changelog/2024-01-30-github-actions-macos-14-sonoma-is-now-available/> <-- so `macos13` will never be `latest`
13:25:22 *** keikoz has joined #openttd
13:35:48 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #11818: Codechange: use std::source_location over __FILE__/__LINE__ all over the code https://github.com/OpenTTD/OpenTTD/pull/11818#issuecomment-1919116394
13:48:24 <DorpsGek> [OpenTTD/team] glx22 commented on issue #483: [sv_SE] Translator access request https://github.com/OpenTTD/team/issues/483
13:55:35 <xarick> oh, you changed something else ๐Ÿ˜
13:57:22 <xarick> very interesting
13:58:34 <peter1138[d]> sup
14:05:40 <xarick> I like it when removing code fixes stuff
14:05:59 <xarick> not sure what a virtual function is
14:34:19 <xarick> 11932
14:34:58 <xarick> trying to display too much information on a small line
14:36:07 <xarick> i was thinking...
14:36:56 <xarick> split that into 2 widgets maybe, one to display start/stop/lost status and destination, the other to display speed
14:37:25 <xarick> and the destination widget would be similar to a ticker
14:39:32 <xarick> the automatic scrolling
14:48:33 <rau117> https://cdn.discordapp.com/attachments/1008473233844097104/1202264160608727041/image.png?ex=65ccd2c0&is=65ba5dc0&hm=81e08dfa0c84c2fca559232e80d531da7faad7e86b01b60fcd264ef93431fbe2&
14:48:33 <rau117> Speaking of widgets... How about adding a little placeholder to the left in not_cheats?
14:48:33 <rau117> In the current form, the buttons located close to the edge of the window look not very nice
14:52:16 <_zephyris> https://cdn.discordapp.com/attachments/1008473233844097104/1202265095988838441/image.png?ex=65ccd39f&is=65ba5e9f&hm=3798631185b56abd4669a2b940df53a73569e51d9d488fe07569038e6620b432&
14:52:16 <_zephyris> Lol
14:52:35 <_zephyris> Changing currency increases the height of the cheat/sandbox window(!)
15:06:30 *** nielsm has joined #openttd
15:13:59 <peter1138[d]> Probably this one <https://github.com/OpenTTD/OpenTTD/pull/11924>
15:26:12 <peter1138[d]> Well.
15:40:45 <xarick> Depot::GetIfValid does not exist ๐Ÿ˜
15:41:19 <xarick> or does it?
15:42:09 <xarick> ah, it exists
15:44:03 *** Wormnest has joined #openttd
15:58:04 <andythenorth> we can stop the OS/2 build https://arstechnica.com/gadgets/2024/01/after-32-years-one-of-the-nets-oldest-software-archives-is-shutting-down/
16:15:33 <merni> Hm, there is also a feature "In order to prevent cheating or abuse (just not paying interest by not taking a loan we make companies pay interest on negative cash as well"
16:15:59 <merni> So... with infinite money companies are paying tons of interest just from having a negative balance?
16:16:09 <merni> also needs fixing
16:18:46 <merni> yup looks like that is really the case
16:19:03 <xarick> touch one thing, break 500
16:19:37 <merni> Not broken
16:19:52 <locosage> do you have a loan with infinite money?
16:20:04 <merni> You can
16:20:25 <locosage> well, if you do it's now wonder you'll pay interest
16:20:31 <merni> But the code treats having negative money as something to charge interest, apart from loan
16:20:41 <merni> Even if you repay the entire loan, if you have negative cash balance you pay interest
16:21:01 <merni> https://cdn.discordapp.com/attachments/1008473233844097104/1202287433019052072/image.png?ex=65cce86d&is=65ba736d&hm=0a2e0372a63312d15630fbe3ba64c2bdba33014d1a7d9f83fc2d9d7d13d119d8&
16:21:02 <locosage> oh, interesting
16:21:13 <merni> one of those features I guess very few people think about
16:21:20 <peter1138[d]> Never knew :p
16:21:33 <merni> https://github.com/OpenTTD/OpenTTD/blob/232151788ddf45b55db0f2ea0322e732ddbd31ce/src/economy.cpp#L844
16:21:42 <locosage> now I suddenly understand why I had ridiculous negative balance in some tests
16:21:44 <peter1138[d]> That doesn't look like a PR ๐Ÿ˜‰
16:21:51 <merni> No, that's the existing code
16:21:54 <xarick> it's supposed to work like that
16:22:03 <merni> The changing is happening right now
16:22:19 <merni> xarick: Yes, but the fact that neither dp nor peter knew about it is... interesting
16:22:21 <peter1138[d]> xarick: Not with Infinite Money enabled though ๐Ÿ™‚
16:22:27 <merni> Yeah
16:22:48 <locosage> that's kind of useless cheating though
16:23:05 <xarick> but in the background, hidden somewhere, it's still doing its thing ๐Ÿ™‚
16:23:15 <xarick> and this is one of the things it does
16:23:16 <locosage> sure you can avoid some interest by going negative but you can also not do anything
16:23:23 <merni> Yeah idk what kind of "cheating" this is... in normal mode you cannot do any construction/purchases if your balance is negative
16:23:35 <merni> so what is the advantage in doing that
16:23:38 <merni> anyway
16:24:49 <peter1138[d]> It's interest on your overdraft, effectly.
16:24:52 <merni> yeah
16:25:18 <merni> but you cannot do anything except spend on running costs etc when overdrawn, anyway
16:25:51 <xarick> not sure how you make the balance sheet reflect what it would be had you not enabled infinite money...
16:26:52 <merni> It already does
16:27:15 <locosage> if it takes interest on negative money anyway why even charge for the current loan
16:27:34 <locosage> just take interest on the difference and save players the hassle of having to borrow and repay constantly
16:28:50 <merni> I want to change as few mechanics as possibel
16:29:09 <merni> so right now what I am doing is removing the interest-on-negative-cash if infinite money is on
16:31:04 *** HerzogDeXtEr has joined #openttd
16:32:07 <xarick> set loan to 0 when infinite money is on?
16:32:23 <xarick> but negative cash still going to pay interest
16:32:29 <locosage> wth is that interest code
16:32:34 <merni> That is an alternative approach, but the setting can be toggled during a game so would be complicated
16:32:46 <merni> toggling on and off infinite money would make the loan wipe itself out?
16:32:49 <locosage> in calculates cumulative from the start of the year just to subtract and get one month
16:33:29 <merni> There are reasons in the comments. Don't know if they are actually valid :)
16:33:54 <merni> It's an interesting way to avoid rounding errors
16:34:10 <xarick> it's valid, it's what makes 200000000 loan on AIs bankrupt them
16:34:25 <xarick> they loan so much and can't pay back
16:34:36 <merni> That's not what dp is talking about
16:34:45 <xarick> not enough profits to overcome the interest
16:34:48 <merni> they are talking about the rather unusual implementation of the interest code
16:35:01 <merni> which calculates the interest for the whole year in order to find the monthly interest
16:35:49 <locosage> merni: oh
16:36:00 <locosage> that fixes what, 1 pound/month of an error? xD
16:36:13 <merni> That kind of stuff may be more common in banks etc
16:36:20 <merni> where 1 pound actually matters
16:36:36 <locosage> freaking realism xD
16:36:38 <merni> it's nice that the money code in openttd has that much integrity
16:37:10 <locosage> cargo payments aren't nearly that exact :p
16:37:28 <locosage> it does all kinds of integer calculations with like 5 units a a time
16:37:55 <locosage> though surprisingly doesn't amount to too much error
16:38:02 <locosage> it was like 1% or smth last time I checked
16:40:32 <locosage> also, what's funny about loan code it that it reduces possible error from 1 pound/month to 1 pound/year
16:40:35 <locosage> so not even 0
16:41:53 <_jgr_> Having the result be deterministic across all machines is more important than it being theoretically perfect in terms of accuracy
16:42:33 <_jgr_> A stray quid here or there really doesn't matter
16:51:25 <DorpsGek> [OpenTTD/OpenTTD] merni-ns opened pull request #11939: Fix #11938: Check infinite money setting in cases where it was missed https://github.com/OpenTTD/OpenTTD/pull/11939
16:52:18 <merni> crap, trailing whitespace in comment again
16:53:18 <DorpsGek> [OpenTTD/OpenTTD] merni-ns updated pull request #11939: Fix #11938: Check infinite money setting in cases where it was missed https://github.com/OpenTTD/OpenTTD/pull/11939
16:53:19 <_jgr_> It's probably worth getting your editor to auto-remove trailing whitespace on save, saves a lot of manual bother
16:53:27 <merni> I am using `vim` :p
16:53:54 <merni> Should probably use vs code but I am doing all openttd related stuff in WSL since it's easier than installing and setting up MSVC
16:54:13 <locosage> pretty sure you can make vim do that
16:54:21 <merni> hm maybe
16:54:24 <locosage> not sure if you can do that without writing some lisp though xD
16:54:30 <merni> rip
16:54:50 <_jgr_> Isn't lisp an Emacs thing?
16:55:02 <locosage> hm... maybe
16:55:19 <locosage> I remember I stop using it because I didn't want to learn lisp
16:55:25 <locosage> I don't remember which one that was xD
16:55:37 <talltyler> Not sure what youโ€™re using to commit, but `git gui` highlights trailing whitespace dark red, pretty hard to miss when looking over code to be committed.
16:55:50 <merni> I am just using git commit
16:56:32 <merni> anyway it doesn't matter, just a quick extra push once in a while
16:56:54 <merni> also happened to spot a missing space after a multiplication (which was also there in the earlier code) :p
17:03:34 <xarick> this infinite money ordeal is gonna trigger more edge cases, I'm fairly certain
17:04:07 <xarick> this is just the beginning imo
17:04:13 <_jgr_> I can't imagine that those players who actually want AIs are going to be using it much
17:04:29 <_jgr_> I wouldn't worry yourself
17:05:08 <merni> you are free to think so. as it happens I have now searched through all the instances of `Company::money` being accessed (which is afaik the only way to access a company's money without taking account of this setting). Sure, I could have missed some things, but I don't think there are a great many
17:05:24 <merni> The nice thing is the vast majority of "things that cost money" are handled as commands
17:05:37 <merni> only a few check money outside that
17:06:28 <merni> Indeed, I am about 99.9% sure I would have caught all three of the things I changed in the latest PR, if github's search showed them (or if I had not trusted that github's search would be comprehensive)
17:07:39 <xarick> I recall towns doing terraform commands used to compare costs
17:07:47 <_jgr_> One thing I do for things like that is to add a [[deprecated]] tag and recompile
17:07:48 <xarick> to decide whether to perform the action
17:07:58 <merni> xarick: Yep, rubidium already spotted that in the original PR and it was fixed
17:08:00 <_jgr_> The compiler will helpfully point out every use site
17:08:13 <merni> that was when I realised first that some commands directly read money
17:08:32 <merni> _jgr_: Thanks for the tip
17:24:46 <xarick> I need to summon Kuhnovic <https://github.com/OpenTTD/OpenTTD/compare/master...SamuXarick:OpenTTD:high-level-pathfinder-passes-patches-with-no-water-as-origin>
17:24:58 <xarick> tentative fix
17:25:35 <xarick> not sure I need to include depot_base
17:26:39 <xarick> I do
17:28:03 *** Wolf01 has joined #openttd
17:29:52 <xarick> I'm threading on muddy grounds, that DestinationID does not inspire confidence
17:31:42 <xarick> oops, wrong place for the assert
17:40:16 <xarick> based on the fact that when a depot is demolished, it is immediately removed from the orders, I do the check in order, starting from depot, which doesn't share the same pool as stations/waypoints
17:44:50 <xarick> there is yet a problem ๐Ÿ˜ฆ dest_id could have the value of a valid depot and of a valid station/waypoint simultaneously
17:45:52 <kuhnovic> Sounds like you still have some work to do? ๐Ÿ˜†
17:46:26 <kuhnovic> What is the problem you are trying to fix? Is there a problem at all?
17:47:22 <xarick> it's complicated! there could be that nerd that could pursuit in making this code fail (me) by placing a depot in place of v->dest_tile and that depot matching the same id as of the station that v->dest_tile refers to
17:47:54 <xarick> then it would assume the tile is a depot and won't check for the docking tiles
17:48:03 <xarick> at least it has water
17:48:08 <xarick> but... still wrong
17:50:50 <kuhnovic> That sounds contrived...
18:01:58 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #11939: Fix #11938: Check infinite money setting in cases where it was missed https://github.com/OpenTTD/OpenTTD/pull/11939#pullrequestreview-1854480637
18:03:09 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #11936: Fix #9697: don't extend the Online Players window too wide on opening https://github.com/OpenTTD/OpenTTD/pull/11936#pullrequestreview-1854482753
18:03:12 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain merged pull request #11936: Fix #9697: don't extend the Online Players window too wide on opening https://github.com/OpenTTD/OpenTTD/pull/11936
18:03:15 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain closed issue #9697: [Bug]: Long server name sometimes forces Online Players window to be very wide https://github.com/OpenTTD/OpenTTD/issues/9697
18:10:28 <merni> talltyler: , I am thinking some more about timetable export to JSON. How would you suggest a way to represent timetable start dates in JSON, generalised between traditional and wall-clock mode?
18:12:16 <DorpsGek> [OpenTTD/OpenTTD] ldpl opened pull request #11940: Fix: Display rank correcly with more than 15 companies in a league table https://github.com/OpenTTD/OpenTTD/pull/11940
18:19:13 <merni> Also, what are `OT_LOADING` and `OT_LEAVESTATION` for?
18:19:52 <_glx_> vehicle state
18:20:10 <merni> ah, so they are not actually orders?
18:22:22 <_glx_> this->current_order is special
18:22:34 <merni> all right thanks
18:22:45 <merni> looks like those can be ignored for the purpose of exporting anyway
18:23:44 *** gelignite has joined #openttd
18:24:26 <Eddi|zuHause> effectively they are substeps of an order. during the order you go to the place, load there, and finish loading, before continuing with the next order
18:32:20 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #11940: Fix: Display rank correcly with more than 15 companies in a league table https://github.com/OpenTTD/OpenTTD/pull/11940#pullrequestreview-1854548439
18:34:49 <DorpsGek> [OpenTTD/OpenTTD] eints-sync[bot] pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/bbae16574afbb538483db916fc2113e6020aacfa
18:34:49 <talltyler> merni: Timetable start dates now use TimerGameTick::counter, so it's the same regardless of the timetable mode. But vanilla OpenTTD doesn't really have a concept of a daily schedule like JGRPP wallclock mode.
18:34:50 <DorpsGek> - Update: Translations from eints (by translators)
18:35:25 <talltyler> I've thought about implementing some sort of cyclic period and a form of Scheduled Dispatch, but am not sure what form it would take
18:36:23 <talltyler> (wall clock in JGRPP is a completely different concept than wallclock timekeeping units in vanilla)
18:36:41 <talltyler> I play on JGRPP servers and love me some Scheduled Dispatch ๐Ÿ™‚
18:36:43 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 approved pull request #11931: Change: make -dnet=9 give traces of the details of the network protocol https://github.com/OpenTTD/OpenTTD/pull/11931#pullrequestreview-1854556252
18:36:46 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain merged pull request #11931: Change: make -dnet=9 give traces of the details of the network protocol https://github.com/OpenTTD/OpenTTD/pull/11931
18:37:45 <_jgr_> The wallclock in my branch is just cosmetic, in that it doesn't by itself affect timetabling at all
18:38:05 <talltyler> Is it not the basis for Scheduled Dispatch departure times?
18:38:44 <_jgr_> Timetables still use tick-based units
18:39:40 <_jgr_> These are just turned into HH:MM times for display purposes
18:40:45 <_jgr_> So I don't think that wallclock mode in vanilla (in the sense of having the economy and calendar run at different speeds) would be any problem for that
18:46:14 <talltyler> Yep. But adding a third clock that shows hours and minutes of some arbitrary length is a hard no for me. It would have to use one of the two existing clocks in vanilla OpenTTD.
18:46:34 <talltyler> So like SD, but the duration of the timetable is in real minutes
18:46:50 <talltyler> The only trouble is, that's not displayed anywhere
18:47:06 <talltyler> So good luck timing meets or diagnosing timetable problems ๐Ÿ™‚
18:47:25 <_jgr_> Real-life minutes are too large a unit for OpenTTD timetables really
18:48:06 <talltyler> Well yes, the timetable would have to be in seconds
18:48:34 <talltyler> (as it currently is)
18:51:49 <_jgr_> The wallclock timetabling in vanilla only shows relative values anyway?
18:54:49 <_jgr_> I suppose I'll need to come up with something for this when I merge the wallclock stuff, which shouldn't be too far away
18:55:19 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 updated pull request #11878: Add: public key authentication to the admin connection https://github.com/OpenTTD/OpenTTD/pull/11878
18:55:22 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 updated pull request #11818: Codechange: use std::source_location over __FILE__/__LINE__ all over the code https://github.com/OpenTTD/OpenTTD/pull/11818
19:00:19 <talltyler> _jgr_: Yes, it shows seconds relative to the current moment. The only way I could figure out how to do it without a fixed-point reference like a calendar date.
19:00:46 <talltyler> I'll be curious to see what you come up with (and happy to help workshop ideas, if you want)
19:02:37 <_jgr_> Well, my current plan is for time in minutes (which is what people usually use for SD) to work identically in traditional calendar mode and the new wallclock mode
19:02:49 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 commented on pull request #11818: Codechange: use std::source_location over __FILE__/__LINE__ all over the code https://github.com/OpenTTD/OpenTTD/pull/11818#issuecomment-1919747047
19:06:06 <_jgr_> The easy solution is to just disable the scheduled dispatch button or show it in minutes anyway if we only have relative units, but I may well think of something by then
19:06:46 <talltyler> Those make sense to me ๐Ÿ™‚
19:11:51 <DorpsGek> [OpenTTD/OpenTTD] michicc merged pull request #11939: Fix #11938: Check infinite money setting in cases where it was missed https://github.com/OpenTTD/OpenTTD/pull/11939
19:11:54 <DorpsGek> [OpenTTD/OpenTTD] michicc closed issue #11938: [Bug]: Cannot fund towns while using infinate money https://github.com/OpenTTD/OpenTTD/issues/11938
19:26:19 <DorpsGek> [OpenTTD/OpenTTD] ldpl commented on pull request #11940: Fix: Display rank correcly with more than 15 companies in a league table https://github.com/OpenTTD/OpenTTD/pull/11940#issuecomment-1919783245
19:37:08 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler approved pull request #11940: Fix: Display rank correctly with more than 15 companies in a league table https://github.com/OpenTTD/OpenTTD/pull/11940#pullrequestreview-1854678364
20:11:07 <xarick> I'm unable to come up with a feasible solution for 11862
20:13:32 <andythenorth> was it lunch though?
20:13:34 <andythenorth> peter1138[d]
20:14:54 <xarick> for me, something needs to be done about the existence of "DestinationID" a massive conversion perhaps to turn them into actual StationID / DepotID
20:15:07 <xarick> remove the uncertainty around them
20:18:57 <xarick> WaypointID oh... also
20:19:31 <DorpsGek> [OpenTTD/OpenTTD] frosch123 opened pull request #11941: Replace old non-standard attributes with C++17/20 standard attributes. https://github.com/OpenTTD/OpenTTD/pull/11941
20:20:33 <andythenorth> should I pull upstream and build? ๐Ÿ˜›
20:20:42 <andythenorth> many changes I expect
20:21:02 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #11937: Fix: Initialize random seed earlier in new game process. https://github.com/OpenTTD/OpenTTD/pull/11937#pullrequestreview-1854756872
20:21:31 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain updated pull request #11913: Fix #8253: don't use INVALID_DATAPOINT for a valid value https://github.com/OpenTTD/OpenTTD/pull/11913
20:21:41 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain updated pull request #11915: Fix: allow rendering graphs with values over 2**31 / 10 https://github.com/OpenTTD/OpenTTD/pull/11915
20:21:50 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain updated pull request #11916: Change: only open story-book in center when a GS does it https://github.com/OpenTTD/OpenTTD/pull/11916
20:24:48 <frosch123> meh, clang fails
20:24:59 <truebrain> fails HARD ๐Ÿ˜›
20:25:10 *** nielsm has quit IRC (Ping timeout: 480 seconds)
20:25:27 <truebrain> it is always some compiler isn't it?
20:29:23 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on pull request #11932: Change: Show speed before destination in vehicle status bar https://github.com/OpenTTD/OpenTTD/pull/11932#pullrequestreview-1854774951
20:32:29 <truebrain> I am looking into this AI settings stuff, and what a weird mess .. so there is a thing called "settings_profile", which in-code allows easy/medium/high/custom, but in-game you can only select the first three. What ever you pick, you can still change all values. But this "settings_profile" also isn't show with the AI settings, where I would kinda expect it to be
20:33:01 <truebrain> it defaults to EASY, but if you load an older game, it is set to MEDIUM
20:34:17 <truebrain> then there is SCRIPTCONFIG_RANDOM, which the comment says it only works when "settings_profile" is set to custom, but in reality it is applied always, and basically ignores "settings_profile" completely
20:34:24 <truebrain> this (no longer) makes any sense
20:35:37 <frosch123> last time i checked almost no AI used the profiles, so maybe they should just get binned
20:36:10 <truebrain> only 80% of the users leaves it on default; but do they understand what it does
20:36:34 <truebrain> but yeah, I am also very tempted to bin the whole lot
20:37:08 <xarick> what would the default be based upon?
20:37:20 <truebrain> let's see how many AIs set what values ..
20:37:32 <xarick> many
20:38:08 <truebrain> didn't we have this "settings_profile" in the AI window at some point? Or otherwise: why isn't it there? They are strongly correlated, I guess
20:39:30 <xarick> SCRIPTCONFIG_RANDOM is applied upon RandomAIs
20:40:26 <xarick> or when setting up an AI when already in a game
20:41:42 <frosch123> ottd once had difficulty settings
20:42:00 <frosch123> AIs got the same difficulty setting value, thus the weird "CUSTOM"
20:42:11 <truebrain> I remember that part
20:42:14 <frosch123> then we removed difficulty settings, and for comaptibility added the AI difficulty setting
20:42:18 <truebrain> nightmares ๐Ÿ˜›
20:42:34 <truebrain> frosch123: any idea why it wasn't just removed from AIs?
20:42:51 <xarick> it is a requirement in the info.nut for any setting you add
20:42:53 <Eddi|zuHause> i never played anything other than "custom" difficulty because number of AIs was a difficulty setting
20:43:24 <frosch123> truebrain: only to divide the pitchforks
20:43:34 <truebrain> fair answer
20:43:38 <frosch123> only deal with difficulty settings fans, avoid the AI people
20:44:03 <frosch123> i think i checked usage only way later
20:44:11 <truebrain> okay, I see that there it was introduced that you couldn't select "custom" anymore ๐Ÿ™‚
20:45:00 <frosch123> for the highscore it is the other way around :p hs.dat still contains 4 highscores, but only the "custom" one is used :p
20:46:43 <truebrain> amount of AIs using `AICONFIG_RANDOM`: 0
20:46:59 <truebrain> a few do use the older `CONFIG_RANDOM`
20:47:08 <truebrain> "a few": 1 AI
20:47:27 <truebrain> so it is fair to say that the RANDOM flag never caught on
20:47:29 <frosch123> replace it with "return 4"?
20:47:37 <truebrain> fair dice roll baby
20:48:09 <truebrain> that really is kinda unexpected, honestly, that so few use that flag
20:48:20 <truebrain> either it was never understood, or because it acts weird, nobody wanted to use it ๐Ÿ˜›
20:48:29 <truebrain> or my grepping fails, ofc
20:48:51 <truebrain> let's check GSes too
20:49:26 <frosch123> i had the impression AI settings are mostly for AI debugging
20:49:49 <truebrain> owh owh, there are 2 GSes that use it too!
20:49:54 <truebrain> WE HAVE 3 USERS!
20:50:02 <andythenorth> upstream built, wonder what changed ๐Ÿ˜›
20:50:07 <truebrain> fake news
20:50:12 <truebrain> 2 of thosers users have it in a comment
20:50:22 <truebrain> so we are back to 1 user
20:50:27 <truebrain> that makes it easy ๐Ÿ™‚
20:50:32 <xarick> ๐Ÿ˜ฆ
20:50:51 <talltyler> andythenorth: Nothing, vanilla OpenTTD is where PRs go to die ๐Ÿ˜›
20:50:57 <andythenorth> oh I am no longer a cheater
20:51:14 <talltyler> No more road vehicles?
20:51:37 <andythenorth> 'sandbox options'
20:51:58 <frosch123> truebrain: who is it? :p
20:52:01 <locosage> sandbox vehicles
20:52:06 <truebrain> the sad face gave it away, not?
20:52:35 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1202355775092293672/image.png?ex=65cd2813&is=65bab313&hm=ca3903d0c407a2123b2dadf74491ff09397ac1881813304322983ffc36d44b7d&
20:52:35 <andythenorth> oo
20:52:41 <andythenorth> icons
20:52:46 <frosch123> lol, hidden behind "show message"
20:52:53 <andythenorth> shall I do a Youtube 'reacts' video?
20:52:57 <truebrain> touche
20:53:16 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1202355945410396290/image.png?ex=65cd283c&is=65bab33c&hm=39cc45496f090ce4d7e2194a329a9b62201c788c3e9218c48e979bbe4a57141a&
20:53:16 <andythenorth> what no icons?
20:53:21 <truebrain> `4c444146/LuDiAI_AfterFix` uses it, as only AI
20:53:46 <xarick> sounds very familiar
20:54:09 <frosch123> andythenorth: what about coal and coke?
20:54:25 <michi_cc[d]> Hmm, would it be stupid to make `DestinationID` a proper `std::variant`? It's a type that is saved, so either the type index has to be saved as well, or reconstructed on load.
20:55:11 <frosch123> are all the ids distinct types?
20:56:35 <michi_cc[d]> They aren't, but variants are allowed to contain the same type more than once. You do have to use `in_place_index/in_place_type` in some spots then though.
20:56:38 <frosch123> if they are just uint16_t, i don't think std::variant would be that helpful
20:56:56 <_jgr_> The type selector is the order type
20:57:15 <_jgr_> Having a second type selector creates an opportunity for inconsistencies
20:57:40 <frosch123> they i would prefer a tuple or small struct, variant visit is complicated enough, using an enum for indexing seems worse
20:58:37 <frosch123> we also have `NewsReferenceType`
20:59:01 <michi_cc[d]> `SourceID`too.
20:59:42 <frosch123> funny, `SourceType` is declared in `cargo_type.h`
21:00:49 <bigyihsuan> andythenorth: what industry grf is this
21:01:37 <xarick> CONFIG_RANDOM is the old nomenclature?
21:01:45 <xarick> need to fix that
21:02:33 <xarick> or just stop using random, if the direction this is going it to eliminate it from scripts
21:03:13 <xarick> seems to spare a lot of trouble
21:03:13 <andythenorth> bigyihsuan: FIRS innit
21:03:35 <bigyihsuan> andythenorth: new firs version?
21:03:57 <andythenorth> unfinished
21:03:58 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1202358638501691503/firs.grf?ex=65cd2abe&is=65bab5be&hm=c013c6869e0138231689f0f07934578ff80714b13c991ae02bb51bd9b60b7467&
21:04:22 <bigyihsuan> andythenorth: ah, no wonder
21:05:05 <andythenorth> it plays ok, missing industry sprites though
21:05:36 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
21:05:56 <truebrain> hmmm ... how do I add a compat entry for this ...
21:06:41 <andythenorth> new ship pathfinder eh
21:06:50 <andythenorth> ships are going places in my savegame, seems to work
21:07:05 <truebrain> ship it!
21:08:06 <truebrain> okay, compatibility API doesn't trigger for AIInfo ๐Ÿ˜„ Which makes sense .. as it contains the info to know what compatibility API should be loaded
21:09:26 <xarick> where did you find AICONFIG_RANDOM was the more recent name?
21:09:27 <frosch123> funny, clang treats [[noreturn]] and [[gnu::noreturn]] differently
21:09:40 <xarick> documentation doesn't have this
21:10:55 <xarick> ah, found them https://docs.openttd.org/gs-api/classGSInfo
21:13:52 <xarick> that still doesn't say AICONFIG_RANDOM <https://docs.openttd.org/ai-api/classAIInfo>
21:19:44 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain opened pull request #11942: Remove: [Script] CONFIG_RANDOM from AddSetting flags https://github.com/OpenTTD/OpenTTD/pull/11942
21:20:51 <xarick> RIP
21:22:16 <truebrain> hmm .. where does the documentation get that "Miscellaneous flags for AI settings." line from ..
21:22:52 <truebrain> found it ... my grepping sucks ๐Ÿ˜„
21:23:25 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain updated pull request #11942: Remove: [Script] CONFIG_RANDOM from AddSetting flags https://github.com/OpenTTD/OpenTTD/pull/11942
21:23:32 <truebrain> yet another description of that flag in the docs .. lolz
21:23:36 <truebrain> what a flag ... what a flag ๐Ÿ™‚
21:23:40 <talltyler> `SetDParam(9,` is a lot of params... ๐Ÿ‘€
21:23:47 <truebrain> wth? 9?!
21:24:13 <talltyler> `DrawOrderString()` has 8 already, I am adding one more...
21:24:19 *** gelignite has quit IRC (Quit: Stay safe!)
21:24:28 <truebrain> are you okay? ๐Ÿ˜„
21:25:05 <talltyler> I built a working autoseparation patch in the last four days, so... sort of ๐Ÿ™‚
21:25:33 <talltyler> Should have a PR today
21:25:42 <andythenorth> oh a new font ๐Ÿ˜ฎ
21:25:47 <talltyler> Gotta sneak in before feature freeze ๐Ÿ˜„
21:26:03 <truebrain> it really is okay if it doesn't go in 14.0
21:26:08 <truebrain> it really is okay if it is in 15.0 ๐Ÿ™‚
21:26:30 <talltyler> But I waaaant to play with it ๐Ÿ˜›
21:26:39 <truebrain> yes. And there is always this next thing.
21:26:45 <truebrain> But focusing on fixing bugs is also actually worth it ๐Ÿ˜‰
21:26:55 <talltyler> Just one more PR bro, then I'm done, I promise
21:26:56 <frosch123> talltyler: pah, GetAircraftEngineInfoString used 13 :p
21:27:03 <talltyler> Yikes
21:27:05 <frosch123> /me is a topper
21:27:17 <andythenorth> agonising over new font vs sprite font
21:27:18 <andythenorth> choices
21:28:25 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain closed issue #10341: [Bug]: AI/GS settings randomization issues https://github.com/OpenTTD/OpenTTD/issues/10341
21:28:28 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on issue #10341: [Bug]: AI/GS settings randomization issues https://github.com/OpenTTD/OpenTTD/issues/10341
21:30:06 <_jgr_> andythenorth: The new font grows on you quite quickly, I found
21:30:23 <andythenorth> it's fundamentally more legible
21:30:30 <truebrain> can't believe only after 20 years we add it ๐Ÿ˜„
21:30:37 <andythenorth> it just lacks the crips appearance
21:30:43 <andythenorth> it's a bit smushed on my screen
21:30:47 <talltyler> https://cdn.discordapp.com/attachments/1008473233844097104/1202365386637713428/space.png?ex=65cd3107&is=65babc07&hm=c0407c8c93b20ec2ae579980c2d830c7ae6125fd4da05c6fe54f9109e9fe88b9&
21:30:47 <talltyler> Hmm, where are the extra spaces coming from? There are some `STR_EMPTY` in between, but that's an empty string, not a space
21:31:09 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1202365477670617098/image.png?ex=65cd311c&is=65babc1c&hm=80a1e518beb49da944f5157f898427535f4d1f1e1d98b2d0b148a9f12daeaba7&
21:31:15 <talltyler> (in order 1 between `Depot` and `(auto-separate)`
21:31:49 <andythenorth> https://cdn.discordapp.com/attachments/1008473233844097104/1202365648349708289/image.png?ex=65cd3145&is=65babc45&hm=b4bd10185922cf5313f47851d39b2583713196e0d8d312c1e549518da767bbef&
21:31:49 <andythenorth> wow yes, this might be crisp, but ultimately that much ALL CAPS on a fixed grid is very hard to read ๐Ÿ™‚
21:31:56 <talltyler> Oh, I'm stupid, disregard
21:32:05 <truebrain> sorry, you were saying?
21:32:49 <andythenorth> why would I set refresh rate to 240hz?
21:32:57 * andythenorth me small brain
21:33:12 <talltyler> `STR_ORDER_TEXT` is `{STRING4} {STRING2} {STRING} {STRING}`, but the second-to-last string is only ever used if an airplane's next order is out of range...so I get both spaces
21:33:23 <talltyler> Hmm, how to solve in a not-ugly way ๐Ÿ™‚
21:33:24 <truebrain> spacy
21:33:35 <locosage> andythenorth: extra smooth mouse ;)
21:33:40 <truebrain> {STRING_ADD_SPACE_ONLY_IF_FOLLOW_STRING_HAS_VALUE}
21:34:02 <truebrain> or `{STRING4}{STRING}{STRING2}{STRING}{STRING}{STRING}{STRING}`, and more `SetDParam` to set the right string to a space when it is needed
21:34:05 <truebrain> trolololol
21:34:10 <talltyler> We should delete airplane range, it's a bad feature ๐Ÿ˜›
21:34:17 <frosch123> talltyler: i had the same problem with STR_ENGINE_PREVIEW_TEXT3 / STR_ENGINE_PREVIEW_TEXT4
21:34:34 <frosch123> and added those two variants with different amount of substrings
21:34:43 <frosch123> just the param counting is *complicated*
21:34:44 <talltyler> Ah, string duplication might be the way
21:36:08 <talltyler> Or... Move the aircraft warning last and let it get extra spaces, and not care because nobody ever sees it ๐Ÿ˜›
21:36:23 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick commented on issue #10341: [Bug]: AI/GS settings randomization issues https://github.com/OpenTTD/OpenTTD/issues/10341
21:38:15 <DorpsGek> [OpenTTD/OpenTTD] frosch123 approved pull request #11942: Remove: [Script] CONFIG_RANDOM from AddSetting flags https://github.com/OpenTTD/OpenTTD/pull/11942#pullrequestreview-1854889831
21:39:00 <andythenorth> talltyler: what even for is?
21:39:10 <truebrain> `ScriptConfig::Change` is another really weird duck, but with peter's change to random stuff, it should be okay to just not touch that one
21:39:35 <xarick> TrueBrain... why don't you even consider my PR as a fix
21:39:44 <xarick> you're not trying
21:39:48 <_jgr_> andythenorth: It's to encourage using more of the airplane set
21:39:49 <xarick> just hurrying things up
21:40:01 <_jgr_> Big aircraft for long routes, small aircraft for short routes, etc
21:40:08 <xarick> but fine... I can live without script random
21:40:22 <talltyler> https://cdn.discordapp.com/attachments/1008473233844097104/1202367798697791498/loooooong.png?ex=65cd3346&is=65babe46&hm=47e590d4edbd38e8265fb7aaa389e6f399f8aba4c57156fcd62be1d516df31a5&
21:40:22 <talltyler> You may not like it, but this is what good UI design looks like
21:40:42 <talltyler> Double space on order 2, I can live with it ๐Ÿ™‚
21:40:47 <truebrain> xarick: You are free in your interpertation on the world; doesn't make it a reality however
21:41:23 <xarick> I made the most descriptive issue I could about the issue, and then... for being disimssed
21:41:30 <xarick> thanks
21:42:20 <_jgr_> You can apply for a refund??
21:42:48 <_jgr_> I don't think anyone owes you such things
21:43:20 <truebrain> It is also factual not true. That tickets, from what we can deduce, has two things in there: `start_date` and `CONFIG_RANDOM`. The first is fixed, for the second you already had a ticket open
21:43:26 <truebrain> so you were duplicating tickets at that point
21:43:44 <truebrain> if you consider that "dismissing", sure, feel free to read it like that
21:44:34 <xarick> okay...
21:45:15 <xarick> at least it will be gone
21:45:34 <xarick> just not the way I expected
21:47:33 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #11942: Remove: [Script] CONFIG_RANDOM from AddSetting flags https://github.com/OpenTTD/OpenTTD/pull/11942#pullrequestreview-1854909307
21:47:42 <truebrain> right, what was I actually doing ... `settings_profile`!
21:48:33 <truebrain> _glx_: hmm .. I agree leaving a comment is good, but I guess it doesn't need to mention what it was about?
21:48:45 <truebrain> just that there is a hole/
21:50:54 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain updated pull request #11942: Remove: [Script] CONFIG_RANDOM from AddSetting flags https://github.com/OpenTTD/OpenTTD/pull/11942
21:50:55 <truebrain> like this?
21:50:57 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain dismissed a review for pull request #11942: Remove: [Script] CONFIG_RANDOM from AddSetting flags https://github.com/OpenTTD/OpenTTD/pull/11942#pullrequestreview-1854889831
21:51:29 <peter1138[d]> Hi
21:51:37 <peter1138[d]> I came back.
21:51:37 <truebrain> hello sir
21:51:41 <truebrain> you survived?
21:51:46 <peter1138[d]> Just about.
21:51:54 <truebrain> how many km? (guessing here, but it is mostly that)
21:51:58 <locosage> https://cdn.discordapp.com/attachments/1008473233844097104/1202370716759240744/image.png?ex=65cd35fd&is=65bac0fd&hm=e2f5cb027e2d57e2216b21dbef46b0c867b5efaaaf62f4bcd6f5926cc4912769&
21:51:58 <locosage> talltyler: looking at this got a random idea for the range warning
21:52:10 <peter1138[d]> 39km
21:52:17 <peter1138[d]> Rain and wind :
21:52:19 <peter1138[d]> :/
21:52:31 <truebrain> ๐Ÿ˜ฆ
21:52:33 <truebrain> but you survived!
21:52:40 <DorpsGek> [OpenTTD/OpenTTD] glx22 approved pull request #11942: Remove: [Script] CONFIG_RANDOM from AddSetting flags https://github.com/OpenTTD/OpenTTD/pull/11942#pullrequestreview-1854917733
21:52:58 <truebrain> tnx _glx_ ; never sure with these comments what is actually useful ๐Ÿ™‚
21:53:28 <_glx_> it's just so we don't wonder later why it jumps from 0 to 2
21:53:37 <truebrain> absolutely
21:54:09 <locosage> https://cdn.discordapp.com/attachments/1008473233844097104/1202371265826918441/image.png?ex=65cd3680&is=65bac180&hm=be1a1cebfce1be1bdc77200e08cf64e63d667beff334dfa52549142c8eadafa3&
21:54:09 <locosage> locosage: actually, one distance would be enough
21:54:42 <xarick> I'm surprised random_deviation stays...
21:54:52 <xarick> oh well, whatever... your game
21:55:57 <_glx_> random deviation works
21:56:08 <truebrain> and it has nothing to do with `CONFIG_RANDOM`
21:56:20 <truebrain> well, it has the word "random" in there, that is about where the simularity ends
21:57:14 <_glx_> and with peter's fix it should apply more consistently
21:57:29 <truebrain> and be, you know, random ๐Ÿ˜„
21:58:08 <truebrain> still weird what `ScriptConfig::Change` is doing, but hopefully not as broken anymore as it was ๐Ÿ™‚
21:59:28 <andythenorth> did we make a 'clone vehicle' button?
21:59:34 <andythenorth> maybe I dreamed that
21:59:43 <truebrain> it is called CTRL
21:59:48 <truebrain> MacOS users won't know it
22:00:04 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #11937: Fix: Initialize random seed earlier in new game process. https://github.com/OpenTTD/OpenTTD/pull/11937#pullrequestreview-1854928028
22:00:27 <andythenorth> you mean ^
22:00:41 <andythenorth> pointy hat key
22:00:54 <truebrain> _glx_: that would kinda solve the whole RandomDeviation mess, as then it can also be removed from `Change()` I think
22:00:59 <truebrain> but maybe not for #11937 however
22:01:45 <_glx_> ah yes it's only for the constructor
22:01:54 *** jinks has quit IRC (Quit: ZNC - http://znc.in)
22:01:58 <_glx_> yeah not for this PR I agree
22:02:12 *** jinks has joined #openttd
22:02:19 <truebrain> okay ... I want to grep with `grep` for a regex with newlines in it
22:02:23 <truebrain> and I fail, hard ๐Ÿ˜›
22:02:39 <_glx_> regex and newlines
22:02:43 <_glx_> always fun
22:03:05 <truebrain> almost tempted to just read file by file .. hmm
22:03:24 <peter1138[d]> Such tired. Maybe early night.
22:03:34 <truebrain> zzzzz
22:08:25 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:09:51 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:10:05 <andythenorth> it's not that early ๐Ÿ™‚
22:10:14 <andythenorth> when I was being sensible 10pm was a default bedtime
22:11:09 <peter1138[d]> I did 5am the other day
22:13:15 *** urdh has quit IRC (Quit: Boom!)
22:14:41 <truebrain> finally .... `cat $i | tr '\n' ' ' | grep -o -P "AddSetting\s*\(\s*{([^}]*)}\s*\)" | tr '\t' ' ' | tr '\r' ' ' | sed 's/ //g'`
22:14:50 <truebrain> if you have a problem and try to solve it with a regex ... you have 615 problems
22:15:05 <truebrain> anyway, 24921 `AddSetting` entries in all the AIs / GSes ever uploaded to BaNaNaS
22:16:25 <truebrain> some AIs actually give meaning to the easy/medium/hard
22:16:30 <truebrain> many others don't
22:17:59 *** urdh has joined #openttd
22:19:17 <truebrain> `easy_value=1,medium_value=1,hard_value=1,custom_value=1,min_value=0,max_value=64000,flags=0`
22:19:18 <truebrain> lol
22:19:27 <truebrain> long range (0, 64000), defaults to 1 ๐Ÿ˜„
22:22:27 <peter1138[d]> Well
22:24:40 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain merged pull request #11942: Remove: [Script] CONFIG_RANDOM from AddSetting flags https://github.com/OpenTTD/OpenTTD/pull/11942
22:24:43 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain closed pull request #11914: Fix: AI/GS settings with the flag SCRIPTCONFIG_RANDOM could be altered after loading from a savegame. https://github.com/OpenTTD/OpenTTD/pull/11914
22:24:46 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain closed issue #9540: [Bug]: AI/GS settings with the flag SCRIPTCONFIG_RANDOM are re-randomized after loading from a savegame https://github.com/OpenTTD/OpenTTD/issues/9540
22:25:20 <xarick> and it's gone
22:26:18 <truebrain> okay, of the 24921 cases, 17225 have all easy/medium/hard values the same, and 7695 have different values
22:26:38 <truebrain> so it seems most AI authors actually do fill in some values for easy/medium/hard
22:27:02 <truebrain> (and yes, those doing the math, 1 case is an empty `AddSettings`, value-wise)
22:27:09 <_glx_> https://github.com/OpenTTD/OpenTTD/compare/master...glx22:OpenTTD:random_deviation_start
22:27:24 <_glx_> this should work
22:27:57 <truebrain> the only problem I would have with that, is that the value I see before creating a new game is not the value I am going to get after the AI actually started
22:28:02 <truebrain> this might be surprising to people
22:28:23 <_glx_> but you can edit the config while the game is running too
22:28:33 <truebrain> that doesn't invalidate the surprise ๐Ÿ™‚
22:29:02 <truebrain> not saying your work is wrong btw, as it might be a step in the right direction. But I think we might want to add something to the GUI to indicate the values are still going to be modified when the AI starts, or something
22:29:23 <truebrain> it is just a bit weird, that I start a new game with the best configuration for the AI that I want, but as soon as it starts, it is like: NAH BRO
22:29:40 <truebrain> but nothing was telling me that would happen
22:30:12 <truebrain> also, GameScript can also have random_deviation, I think?
22:30:15 <_glx_> in current state, you set the config before starting game, random deviation is applied, then the AI starts
22:30:26 <truebrain> not saying the current situation is any better ๐Ÿ˜„
22:30:42 <truebrain> it is just a bit weird, from a user point of view
22:30:48 <_glx_> GS starts with mapgen
22:31:04 <truebrain> yes, but the `AddRandomDeviation` is now never executed on a GS?
22:31:13 <truebrain> was done by `ScriptConfig`
22:31:29 <peter1138[d]> Have I broke it?
22:31:32 <truebrain> no
22:31:58 <_glx_> ah yes in my mind peter's PR is applied ๐Ÿ™‚
22:32:18 <_glx_> so GS have random deviation before mapgen starts
22:32:49 <truebrain> with your commit, peter's PR isn't actually needed anymore, if you would also add the GS to it ๐Ÿ™‚
22:32:56 <truebrain> I still like peter's PR btw
22:33:03 <truebrain> but that is just because where randomizer is initialized now feels so random
22:33:20 <_glx_> hmm I can add a param to Game::StartNew
22:33:33 <truebrain> or just do it when starting a game
22:33:37 <truebrain> as you say, that is when GS is started ๐Ÿ™‚
22:33:59 <_glx_> yeah but it's just Game::StartNew();
22:34:11 <truebrain> so no param needed ๐Ÿ˜›
22:34:25 <truebrain> `StartScripts` from loading
22:34:28 <_glx_> on load it's also the same thing
22:34:30 <truebrain> ugh, nevermind, you know this better than I do ๐Ÿ™‚
22:34:51 <_glx_> and you don't want deviation on load
22:34:55 <truebrain> anyway, back to the surprise for the user .. what I am a bit doubtful about, is when to do the actual randomness
22:35:04 <truebrain> you can argue that it should be done when you select an AI to be on a slot
22:35:11 <truebrain> and you can argue it should be done when the AI starts
22:35:25 <truebrain> both have their usage
22:35:49 <truebrain> but for now, what maybe is sufficient, if we just add a (i) at the end of a setting that is getting a random deviation
22:36:03 <truebrain> so when configuring a setting I can see that my value might not actually be the value that it will be when the AI starts
22:36:17 <_glx_> yeah that should be doable
22:36:31 <truebrain> we never really assigned a purpose to random_deviation, as, what it actually is
22:36:42 <truebrain> the intentions where that if more of the same AI start, you get different behaviour from them
22:36:49 <truebrain> but that doesn't really say when it should be applied
22:38:03 <truebrain> so either doing it on AI start or when configuring .. that really depends how you look at it. But given we have Random AIs, it is just far simpler to do it on AI start, and gives a consistent use .. yeah, okay
22:38:07 <truebrain> that seems best ๐Ÿ™‚
22:38:14 <truebrain> (at least, without reworking the whole darn system :D)
22:38:36 <truebrain> also another reason to just remove the `settings_profile` .. when it is being applied is completely unclear, with the same argumentation
22:38:50 <xarick> keep it the way it is, and merge peter's pr, I tested it, and works
22:39:59 <truebrain> lol, `settings_profile` is funny .. as long as you don't manually change a value, it changes with the settings_profile
22:40:21 <xarick> that's expected behaviour
22:40:25 <xarick> not a bug
22:40:35 <_glx_> with peter's PR I think you configure scripts, you start game, settings are randomised
22:40:42 <truebrain> yeah, this is just totally unclear behaviour
22:41:00 <peter1138[d]> Well, with the change to when AddRandomDeviation is called, the random seed stuff doesn't need to be set up so early.
22:41:24 <peter1138[d]> Could be done after the rest of the init, removing the seed checks.
22:41:25 <truebrain> also no way to revert back to default, as with the game settings ๐Ÿ˜„ Hihi ๐Ÿ™‚
22:41:32 <truebrain> peter1138[d]: that sounds sane
22:42:00 <peter1138[d]> I... think I should sleep first though ๐Ÿ˜ฎ
22:42:07 <truebrain> go sleep!
22:44:40 <xarick> _glx_: if you set a value different than default from the main menu, it won't deviate.
22:45:15 <xarick> if you really want to use the default value and not deviate it, i think you can manually enter the default value via query text
22:45:33 <xarick> that should store it in the AnchorSettings thingy
22:45:49 <_glx_> with peter's PR it should deviate
22:46:51 <xarick> hmm, no way ๐Ÿ˜
22:47:22 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain opened issue #11943: [Bug]: when AI settings are applied is unclear to the user https://github.com/OpenTTD/OpenTTD/issues/11943
22:47:37 <truebrain> okay, wrote down some words of what I see happening; just to have it written down ๐Ÿ™‚
22:49:46 <wensimehrp> This might be a dumb question, but how do I use eints running in docker?
22:49:48 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on issue #11943: [Bug]: when AI settings are applied is unclear to the user https://github.com/OpenTTD/OpenTTD/issues/11943
22:51:14 <_glx_> "random_deviation If this property has a nonzero value, then the actual value of the setting in game will be randomized in the range [user_configured_value - random_deviation, user_configured_value + random_deviation] (inclusive). random_deviation sign is ignored and the value is clamped in the range [0, MAX(int32_t)] (inclusive)"
22:51:25 <_glx_> we never say when the deviation happens ๐Ÿ™‚
22:51:49 <truebrain> yup; like I mentioned earlier, that is a bit the crux of this issue
22:51:57 <truebrain> that we never actually documented our intentions here ๐Ÿ˜„
22:51:58 <_glx_> so my change is "fine"
22:52:05 <truebrain> wensimehrp: I would ask: why would you want to? ๐Ÿ™‚
22:52:06 <_glx_> and makes sense
22:52:21 <_glx_> just need to add some info in the GUI
22:52:24 <truebrain> it is the most solid solution within our codebase, is how I would phrase it
22:52:33 <truebrain> whether it makes sense ... I leave that to others ๐Ÿ˜›
22:52:44 <wensimehrp> just to try to translate some local projects using eints
22:52:47 <truebrain> but having it applied when an AI starts, is a very clear moment in time
22:53:16 <truebrain> wensimehrp: ah; well, good luck. Eints is a beast, and hard to get running. But there is information about it in the readme etc .. but it is really a bit figuring it out yourself
22:53:38 <truebrain> there are some people in here that might be able to help, but those are far and few apart
22:53:46 <truebrain> (I always need help to get it running locally)
22:53:58 <xarick> waiting for TrueBrain to stumble upon Arastais shennanigans
22:54:20 <xarick> it will be a good day
22:54:22 <truebrain> _glx_: maybe we should also update the documentation to just read: this is always applied when an AI starts, or something of those words
22:54:39 <truebrain> just to put down once and for all when it is being applied ๐Ÿ˜„
22:55:03 <_glx_> yeah, but I'm in the GUI now ๐Ÿ˜‰
22:55:14 <_glx_> not the better part
22:55:24 <truebrain> good luck my friend .. good luck ๐Ÿ˜„
22:56:28 <wensimehrp> I cannot launch it through 0.0.0.0:8000 and 127.0.0.1:8000
22:56:51 <wensimehrp> Is it a network problem or something else?
22:57:24 <truebrain> xarick: I am not a big fan of this passive aggressive stance. I suggest you take that somewhere else, because it is not promoting any healthy conversation in here.
22:57:24 <truebrain> Either way, I have no issues with the work done by Arastais; the only thing it did, is highlight some oddities in our system
22:57:32 <truebrain> wensimehrp: did you tell docker to port forward those ports?
23:01:45 <_glx_> hmm CONFIG_INGAME description is misleading "This setting can be changed while the AI is running. "
23:02:00 <_glx_> actually in can only be changed from main menu
23:02:33 <xarick> it's the inverse
23:02:37 <_glx_> well non CONFIG_INGAME ones can only be changed from main menu
23:02:48 <_glx_> yeah I typed too fast
23:02:52 <truebrain> so it is `CONFIG_ALSO_INGAME`? ๐Ÿ˜„
23:03:02 <xarick> it makes it changeable ingame if the flag is set
23:03:25 <xarick> and the script is running
23:03:29 <_glx_> but I would expect non started AI to be editable
23:04:03 <truebrain> yeah; I guess that is underlying a bit of the issue with the current GUI .. it is unclear if you are preparing the configuration, or watching the active configuration
23:04:09 <peter1138[d]> Eww, iconvg looks like a hideous format.
23:04:17 <truebrain> GO GET SLEEP ffs ๐Ÿ˜›
23:04:22 <truebrain> ๐Ÿ˜„
23:04:26 <truebrain> wtf is iconvg?
23:05:01 <_glx_> xarick: it doesn't care if the script is running or not
23:05:19 <truebrain> maybe the lock icon can help out here
23:05:26 <truebrain> show a lock on AIs that are running, and their settings
23:05:31 <truebrain> indicating they cannot be modified anymore
23:05:33 <truebrain> "time's up!"
23:05:40 <_glx_> no that's already visible
23:05:47 <truebrain> greyed out?
23:05:48 <_glx_> the lines are disabled
23:05:53 <_glx_> yeah
23:05:54 <truebrain> yeah, but not on the AI overview itself
23:06:05 <peter1138[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1202389370540130314/image.png?ex=65cd475d&is=65bad25d&hm=33d06c98c7b00e58d0c40db6018e59e9baa3fe24b1b9406124795bd1db596eef&
23:06:05 <peter1138[d]> Here's a big SVG lock icon for you ๐Ÿ˜„
23:06:07 <truebrain> only on the settings page itself, right?
23:06:18 <truebrain> peter1138[d]: thank you; I will store it in my pocket now.
23:06:58 <truebrain> anyway, lots of small improvements we can do to these GUIs to make a bit more clear what happens when ๐Ÿ˜„
23:07:06 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
23:07:16 <xarick> I wanted to give ideas, but... I know how that goes
23:07:28 <truebrain> curious what you cook up _glx_ ๐Ÿ™‚ But your current commit might be worth PRing either way
23:07:34 <truebrain> the GUI stuff can come later ๐Ÿ™‚
23:07:48 <_glx_> yeah GUI needs more work anyway
23:08:02 <truebrain> maybe update some docs with your commit to indicate when random_deviation is applied
23:08:07 <truebrain> just to put that question to rest ๐Ÿ˜„
23:08:19 <truebrain> anyway, I am also off to bed
23:09:48 *** jinks has quit IRC (Quit: ZNC - http://znc.in)
23:10:20 *** jinks has joined #openttd
23:17:01 <xarick> Am I the only only that feels extremelly unconfortable when TrueBrain is around...
23:17:42 <emperorjake> talltyler: Vanilla autoseparation? <a:eyesshaking:799065156193615872>
23:17:51 <talltyler> Sure is
23:17:58 <talltyler> I'm writing the PR now
23:18:08 <talltyler> Will need some help testing and trying to break it ๐Ÿ™‚
23:18:49 <emperorjake> This is probably the most important thing I miss from JGRPP
23:19:01 <emperorjake> might actually make vanilla playable again ๐Ÿ˜…
23:19:57 <Eddi|zuHause> xarick: yes.
23:20:28 <_glx_> oh of course there are 2 config window, and I was looking at GS one, so yeah when looking at the other one CONFIG_INGAME is properly handled
23:21:22 <emperorjake> Oooh I see 10606 got merged as well, I tried to test it against the latest master but couldn't get it to compile
23:23:01 <emperorjake> I did test it but it not in combination with the new time slow feature
23:24:03 *** jinks has quit IRC (Quit: ZNC - http://znc.in)
23:24:31 *** jinks has joined #openttd
23:25:06 <xarick> glx, you're up for a good surprise in the scenario editor
23:26:21 <xarick> GS specifically
23:29:08 *** tokai|noir has joined #openttd
23:29:08 *** ChanServ sets mode: +v tokai|noir
23:29:29 <xarick> entering scenario from main menu vs loading scenario from the editor, there's the peculiar situation of the GS running vs not running
23:29:33 <peter1138[d]> Don't spoil it
23:30:23 <xarick> which as you may expect affects how editable are
23:31:46 <reldred> xarick: Are you still just trying to passive aggressively pick fights with everyone? You were picking fights with 2TallTyler last night before I went to bed and here you're slagging off TrueBrain. Wind your neck in.
23:32:57 <xarick> I did nothing to 2TallTyler
23:35:55 *** tokai has quit IRC (Ping timeout: 480 seconds)
23:47:57 <_glx_> oh the GUI is a mess, I already knew that ๐Ÿ™‚
23:56:38 <xarick> I did some work before on the AI/GS gui, but... it's just one big commit. I dealt with most of the issues with settings editability, not sure if it's going to be of help
23:56:41 <xarick> glx
23:57:54 <xarick> and it's old now... is in need of a rebase
23:59:44 <xarick> too many changes happened after to the ai/gs i can't even properly rebase it anymore