IRC logs for #openttd on OFTC at 2023-12-15
โด go to previous day
00:03:33 *** greeter has quit IRC (Ping timeout: 480 seconds)
00:03:47 *** greeter has joined #openttd
00:18:45 *** wallabra has quit IRC (Ping timeout: 480 seconds)
00:21:25 <peter1138> At least regression works, everything must be fine right :D
00:25:31 <peter1138> Adding day/month/year stuff to the economy-date stuff seems wrong.
00:26:33 <peter1138> (I guess compatibility)
00:26:44 <peter1138> ((Although you mispelled it compatability))
00:28:16 *** wallabra has joined #openttd
00:29:39 <peter1138> Something about your API changes is wrong.
00:29:46 <peter1138> (But I'm assuming we know that :D)
00:31:28 <_glx_> looks like you need a rebase first (the GUI is weird)
00:33:56 <peter1138> [squirrel] Failed to compile 'compat_13.nut'
00:35:48 <peter1138> dbg: [script] [18] [S] Your script made an error: the index 'GSDate' does not exist
00:35:57 <peter1138> dbg: [script] [18] [S] *FUNCTION [main()] /home/petern/src/openttd/build/game/compat_13.nut line [13]
00:37:34 <talltyler> Are you getting the script to load, or is that from the OpenTTD crash log?
00:37:45 <_glx_> ok yeah it's the compatibility scripts, and some incorrect handling of that
00:38:15 <_glx_> engine is deleted but we don't check and assume compatibility scripts are always fine
00:38:18 <peter1138> There's no error handling in case of compatibility failing.
00:39:00 <talltyler> What does โEngine is deletedโ mean?
00:42:32 <_glx_> ScriptInstance::Died() is called when there's an error, which deletes this->engine
00:43:17 <_glx_> so the this->engine->LoadScript(main_script) happening after, without any safety check, crashes
00:43:30 <_glx_> because this->engine is nullptr
00:45:31 <peter1138> Hmm, the comment could be placed better.
00:46:49 <peter1138> There we go. It's not obvious when it applies.
00:47:31 <_glx_> could also use this->IsDead()
00:52:06 <peter1138> Oh instead of checking for nullptr. Hmm.
00:52:50 <peter1138> No, IsDead() does not work.
00:53:14 <peter1138> My test didn't die, the exception was because squirrel just uses exceptions :D
00:56:03 <peter1138> Yeah, IsDead() works when you break the correct comaptibility script :)
00:56:11 <peter1138> I think that's clearer than == nullptr, tbh.
00:57:32 <_glx_> yeah the call itself documents what we are testing for
00:59:13 *** Tirili has quit IRC (Quit: Leaving)
00:59:56 <_glx_> when not crashing it's more helpful ๐
01:00:36 <_glx_> (yeah I still use the not rebased code)
01:02:41 <talltyler> Still not sure what Iโm missing, but it helps eliminate other possibilities
01:02:55 <talltyler> It fails to load the compat file altogether?
01:05:06 <_glx_> GSDate::DATE_INVALID and GSDate::IsValidDate are from 1.4
01:06:09 <_glx_> but the problem here is GSDate itself which doesn't exist at all
01:07:02 <talltyler> Hmm, Iโm not sure I understand
01:07:17 <talltyler> Even though I removed it, I need a placeholder for the GS to find?
01:08:56 <_glx_> I think you can do ` GSDate <- GSDateEconomy;` (at least seems to work in my test)
01:11:36 <_glx_> `GSDate.DATE_INVALID <- GSDateEconomy.DATE_INVALID;` says redefine DATE_INVALID slot of GSDate table
01:11:51 <_glx_> but the table doesn't exist
01:13:43 <talltyler> Oh interesting, I can just rename the whole class in the compat file?
01:15:52 <_glx_> it's not a rename, you just create a new GSDate table, and the content is the other table
01:21:56 <_glx_> tested with bee reward, the values seem to decrease correctly when I fast forward
01:23:19 <peter1138> Surprised nothing has reinitialized windows at that point.
01:23:25 <peter1138> (That would fix the bevels)
01:23:48 <_glx_> nah I'm on the broken GUI version
01:23:58 <peter1138> Yes, that's what I mean.
01:24:16 <_glx_> and I know what to not click ๐
01:24:20 <peter1138> It unbreaks if there's a window reinitialization.
01:24:40 <peter1138> "set newgrf_developer_tools 1" will do it :)
01:25:51 <talltyler> Ah, I got a hard crash after fast-forwarding for a bit
01:27:18 <_glx_> starting an AI it seems
01:27:36 <_glx_> "openttd 7FF79F1F12EC Squirrel::LoadScript + 28 (C:\\Users\\tyler\\Documents\\GitHub\\OpenTTD\\src\\script\\squirrel.cpp:733)",
01:28:08 <peter1138> AI compat this time? ;)
01:29:17 <talltyler> Oh, I didn't fix AI ๐
01:29:47 <_glx_> but yeah a rebase would prevent further crashes in this area
01:31:01 <talltyler> Okay, let's wait for the fixed version to build, then I will test both GS and AI to ensure they work
01:31:10 <talltyler> GS was working perfectly though ๐
01:31:38 <peter1138> Nice, we should merge the perfectly working GS as well ;)
01:32:22 <_glx_> GS I used to test were not perfectly working (but not because of dates)
01:32:43 <talltyler> RenewedVillageGrowth is quite a nice GS
01:32:55 <_glx_> most GS don't like the enforced string format
01:35:13 <_glx_> many authors (and the doc is not very good on this point probably) often don't understand STRINGx stuff
01:36:54 <talltyler> Thank you Peter and _glx_ for your help โค๏ธ
01:37:10 <_glx_> thanks for the bug finding ๐
01:38:21 <_glx_> 3 script bugs fixed today
01:39:27 <talltyler> (forgot a line in the changelog ๐ )
01:39:39 <talltyler> Now it's time to watch Godzilla and not look at code until tomorrow ๐
01:55:53 <_glx_> you forgot ai_changelog too ๐
02:21:27 <talltyler> Ah, thanks. I will do that tomorrow.
02:45:02 *** Wormnest has quit IRC (Quit: Leaving)
03:56:55 *** D-HUND has quit IRC (Ping timeout: 480 seconds)
07:55:18 <locosage> is there som command to see what newgrfs are loaded on the server?
07:56:05 <locosage> with exact file names
08:10:40 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
08:32:08 <merni> does seem to be quite similar yeah
08:33:33 <merni> nice that they also thought of the same solution
08:51:13 *** urdh has quit IRC (Quit: Boom!)
09:58:42 <Rubidium> locosage: fromt the server, or from the client? If it's the latter then definitely not, and I wouldn't be that inclined to even implement that as it could leak (private) path information
10:03:00 <locosage> from client there is rcon anyway
10:07:06 <Rubidium> I would consider rcon "from the server"
10:23:29 <xarick> holy smokes, Path of Exile Content.ggpk is already 40 GB in size
10:24:46 <xarick> 38,4 GB (41ย 277ย 144ย 072 bytes)
10:44:05 <peter1138> And I worry about a few MB of audio files ;D
10:44:56 <peter1138> Encrypted rcon channel yet?
11:01:48 <DorpsGek> LordAro: 9.846153846153847
11:02:50 <Rubidium> well, it works on bytes not on letters ;D
11:02:51 <peter1138> But what are you checking?
11:15:05 <truebrain> peter1138: Encrypted admin port is in JGRPP .. copy/paste?
11:15:59 <peter1138> LOL. Of course it is.
11:16:26 <peter1138> openttd:// openttds:// :D
11:16:40 <xarick> how do I get the coordinates of the first valid tile for each map corner? ๐ฎ
11:17:04 <peter1138> `ci/woodpecker/pr/woodpecker Pipeline was successful` whoop :D
11:20:15 <peter1138> 1, 1 -> GetMapSizeX() - 2, GetMapSizeY() - 2
11:20:50 <peter1138> Assuming freeform_edges, and who plays without that.
11:21:20 <peter1138> (If it's not freeform_edges, then 0, 0 (but the max is the same))
11:27:34 <peter1138> The max cordinate is always 2 less, it does not depend on freeform edges.
11:33:52 <xarick> I'm hinking whether I had considered the impossibility to build roads on the first edge coordinate, but i guess I didn't
11:34:02 <_jgr_> truebrain: The admin port is unchanged in my branch, it should only be used from the same box anyway
11:34:19 <truebrain> owh, what port was it? You encrypted one of them ๐
11:36:43 <_jgr_> It's rcon and non-company password packets
11:37:28 <_jgr_> In the usual game socket
11:37:44 <xarick> with freeform, we can place roads at tile 1, 1 and 1022, 1022
11:43:21 <xarick> okay, without freeform edges, we're only able to build roads at tile 1, 1 and 1021, 1021
11:43:31 <xarick> what did I do in the code?
11:44:41 *** gelignite has joined #openttd
11:45:28 <peter1138> You asked for valid tiles.
11:46:17 <peter1138> Valid tiles go from without freeform edges, valid tiles go from 0, 0 to 1022, 1022. With freeform edges, valid tiles go from 1, 1 to 1022, 1022.
11:47:25 <peter1138> However, without freeform edges, you can't do anything to the edge tiles.
11:47:29 <peter1138> They are valid tiles that you can't change.
11:48:03 <peter1138> So your algorithm is fine for what you want, but it isn't the same as valid tiles.
11:48:47 <xarick> this should be what I wanted :p
11:48:47 <xarick> ` this._min_x = max(1, min(source_x, goal_x) - this._search_range);
11:48:47 <xarick> this._min_y = max(1, min(source_y, goal_y) - this._search_range);`
11:49:04 <xarick> and that min_freeform is useless, kinda
11:52:37 <xarick> local max_freeform = (AIMap.IsValidTile(0) ? 0 : 1) == 0 ? 3 : 2; must simplify this
11:55:31 <xarick> local max_freeform = AIMap.IsValidTile(0) ? 2 : 3;
11:56:20 *** ahyangyi has quit IRC (Quit: User went offline on Discord a while ago)
12:03:31 <xarick> alright, fixed locally
12:06:38 *** thelounge345 has quit IRC (Ping timeout: 480 seconds)
12:12:26 <xarick> if the tile 0 is valid, that means freeform is disabled, and if freeform is disabled, i have 1 less coordinate to place roads at the bottom corner, which means I wanna subtract 3 to MaxSizeX.
12:19:58 *** thelounge345 has joined #openttd
12:29:33 <xarick> is it possible for GS's to have access to fast forward button?
12:29:51 <xarick> I was looking for precise control of it
12:34:07 <peter1138> "Fast-forward until 1995"
12:37:31 <LordAro> is this where xarick finally discovers null video drivers and the tick count?
12:52:14 <peter1138> Unlikely, he can't see the signs :)
13:18:07 <_glx_> another winner of the "glx will ignore the translator access request"
13:19:35 <_glx_> hmm maybe the bot could handle that
13:20:52 <peter1138> Did you delete it or did they realise?
13:26:02 <peter1138> Hmm, RouterOS upgrade time?
13:35:12 <peter1138> Although I admire a home router having MPLS... I've never found a use for it :)
13:54:32 <LordAro> not trying hard enough
14:04:23 <xarick> I think you made a mistake, not sure
14:05:06 <xarick> at ai_core.cpp line 330, WC_SCRIPT_LIST is not the same as WC_SCRIPT_DEBUG, unless you really mean that
14:06:35 *** nielsm has quit IRC (Ping timeout: 480 seconds)
14:07:46 <_glx_> but to me it looks like old code was wrong
14:08:26 <_glx_> yeah the change is incorrect
14:08:46 <xarick> i don't know how to use the review feature
14:08:56 <xarick> i commented, it says it's posted, but then it's not
14:10:58 <_glx_> ah vcpkg fixed the breakpad issue
14:11:40 <peter1138> I guess I had search for WC_SCRIPT_DEBUG and saw the "0, 1" looked the same to my old eyes...
14:12:59 <_glx_> otherwise the setdirty following invalidate would have been useless ๐
14:15:15 *** thelounge345 has quit IRC (Read error: Connection reset by peer)
14:15:34 *** thelounge345 has joined #openttd
14:17:43 <peter1138> Many windows update state when painting.
14:17:53 <peter1138> (That is something to fix another day...)
14:26:14 <_glx_> most likely using the wrong function
14:26:43 *** gelignite has quit IRC (Quit: Stay safe!)
14:32:53 <_glx_> ah no, it's correct, it's the stupid coding style
14:34:00 <_glx_> I forgot to look at the parenthesis colours
14:35:06 <peter1138> Anything worth a new release? :D
14:36:05 <_glx_> I'd like to get rid of all this va_list stuff
14:36:35 <xarick> suddenly the list is filled with 0's ... what am I doing wrong
14:37:20 <_glx_> if a 0 is in the list, you somehow put it there
14:37:47 <xarick> distance = 0, it's incorrect, but why
14:38:09 <xarick> the lower the nosie, the higher shuld the distance be
14:48:45 <xarick> not enough distances were tested, maybe?
14:49:12 <xarick> map is small, 64x64, only 64+64 distances are tested
14:51:22 <xarick> i'd rather have it say 128 than 0
14:52:19 <xarick> wait... no, 128 would also be incorrect
14:52:57 <xarick> it's just impossible to reach those low noise levels due to map size
14:57:26 <xarick> that 0 must come from somewhere
15:00:55 <xarick> because I'm pretty sure, those lists didn't even got a noise that low to be added
15:01:12 <xarick> so yeah, the 2nd part of the code is where stuff fails
15:13:32 <xarick> why u no crash? I expected a crash
15:13:48 <xarick> when using noise_levels.GetValue(noise) on a noise that doesn't exist in the list
15:28:50 <xarick> `for (local distance = 0; noise_levels.Count() != _noisiest_airport_noise; distance++) {`
15:29:44 <xarick> it's possibly wrong, maybe
15:32:32 <xarick> noise 1 is that special noise that is always the minimum garanteed
15:44:32 *** Wormnest has joined #openttd
16:13:32 *** esselfe has quit IRC (Ping timeout: 480 seconds)
17:16:30 *** Hanicef has joined #openttd
17:29:13 <_glx_> I tried to convert mysprintf from variadic function to variadic template, but it means moving it to header and then that implies to drag more stuff to the header
17:30:19 <_glx_> yeah now gcc is not happy
17:38:43 <_glx_> Fmt could work, but they nforenum uses custom control codes
17:41:53 *** HerzogDeXtEr has joined #openttd
17:46:58 <Wolf01> Heh, some train love on FFF
17:47:38 <Wolf01> Factorio transport tycoon :P
17:56:47 <xarick> peter1138[d]: Now the debug needs word-wrap or a horizontal scrollbar ๐
17:58:23 <_glx_> word-wrap might be easy, but usually the result is not very easy to read
18:07:12 <_glx_> oh indeed word-wrap is super easy to do
18:11:06 <peter1138> Scroll position probably needs more work than that.
18:13:26 <_glx_> because the text is drawn in the box and the excedent is just croped
18:13:44 <peter1138> It's not hard, just tedious.
18:14:03 <peter1138> Textfile window does it.
18:16:39 <xarick> meanwhile, I'm benchmarking my functions
18:18:45 <xarick> dont even know if they produce the same results
18:27:17 <xarick> oh, right... they order the tiles differently, nevermind, can't compare the order. But I can still compare if they both have added the same tiles.
18:32:16 <_glx_> scroll position might be expensive too if the script outputs very often
18:35:50 <_glx_> oh I think we have a bug in TextfileWindow
18:37:19 <_glx_> before enabling "Wrap text"
18:37:39 <_glx_> after enabling "Wrap text"
18:38:03 <_glx_> After a small resizing of the window
18:38:16 <DorpsGek> - Update: Translations from eints (by translators)
18:38:29 <_glx_> looks like some refreshing is missing
18:38:36 <peter1138> Interesting. It did work :)
18:41:55 <peter1138> Hmm, when ReflowContent() is called, this->lines is empty.
18:42:16 <xarick> oops! different numbers
18:42:52 <_glx_> but this->line is filled on window creation
18:43:18 <peter1138> It's filled when resizing, but not when toggling WRAPTEXT. Huh./
18:51:11 <peter1138> Okay, it's invalidating the text file window, which causes it to reload the file.
18:52:24 <peter1138> I wonder what broke this.
18:52:38 <peter1138> I'm pretty sure it never used to clear and reload the file.
18:53:28 <_glx_> yeah and it loads the text after the reinit and reflow
18:53:38 <_glx_> and never calls reflow again
18:55:27 <peter1138> I think it may be due to the document/manuals stuff.
18:56:33 <_glx_> changes in LoadTextfile
19:02:41 *** fiddeldibu[m] has quit IRC (Quit: Client limit exceeded: 20000)
19:11:52 <peter1138> malloc_consolidate(): invalid chunk size
19:18:40 *** frosch123 has joined #openttd
19:18:40 <frosch123> andythenorth: fun fact: in factorio you can now assign liveries to stations, and trains will use the livery of their current destination
19:19:01 <peter1138> JGRPP probably already has it.
19:19:39 <frosch123> next thing would be livery groups for stations?
19:35:14 <peter1138> livery industry flat docks
19:39:13 <andythenorth> I thought you had a patch for that?
20:00:54 *** ufo-piloot_ has quit IRC ()
20:34:16 <xarick> don't you guys get scared you're doing too many changes at once? how would you test things properly?
20:47:55 <locosage> with your change piss off enough people so they thoroughly comb through looking for errors
20:49:50 <talltyler> Or Andy complains enough about CargoDist being broken that we investigate if it really is
20:50:23 <locosage> isn't it even more broken now? xD
21:17:24 <andythenorth> it's perfect in my build
21:24:52 *** kuhnovic has quit IRC (Quit: User went offline on Discord a while ago)
22:23:05 *** moll has quit IRC (Ping timeout: 480 seconds)
22:25:54 <xarick> it's a massive project
22:29:31 <xarick> maybe it's just too much for me to deal with atm
22:29:42 <xarick> but economy date, calendar date... hmm :\
22:46:10 *** Hanicef has quit IRC (Quit: leaving)
23:00:00 *** keikoz has quit IRC (Ping timeout: 480 seconds)
23:00:54 <Eddi|zuHause> well, this whole daylength thing has been brewing for like 20 years now
23:16:56 <talltyler> 20 economy years? ๐
23:17:28 <talltyler> Itโs not confusing to me because Iโve been putting part-time-job-hours into it for almost a year now
23:18:12 <talltyler> We are in the final stretch though, after months and months of fixing tech debt and preparing
23:19:10 <Eddi|zuHause> yes, and half a dozen examples of "how not to do it" that came before you.
23:20:42 <talltyler> At least two of those were mine
23:20:50 <talltyler> Maybe three, I canโt remember honestly
23:21:07 <talltyler> I did โgroundhog yearโ and โtechnology timeโ
23:21:22 <talltyler> The latter of which is the mirror-image of my current approach
23:47:07 <xarick> is this piece of code gonna work as I think? `(_noisiest_airport_width > _noisiest_airport_height ? w : h) = abs(_noisiest_airport_width - _noisiest_airport_height);`
23:53:11 <xarick> > ` if (_noisiest_airport_width != _noisiest_airport_height) {
23:53:11 <xarick> > local diff = abs(_noisiest_airport_width - _noisiest_airport_height);
23:53:11 <xarick> > if (_noisiest_airport_width > _noisiest_airport_height) {
23:53:26 <_glx_> of course it won't work
23:53:57 <xarick> how do I make it prettier? smarter!
23:54:26 <_glx_> you can't, only ways is this one
23:57:00 <xarick> > ` local diff = abs(_noisiest_airport_width - _noisiest_airport_height);
23:57:00 <xarick> > if (_noisiest_airport_width > _noisiest_airport_height) {
23:57:04 <xarick> > slightly more smarter
continue to next day โต