Times are UTC Toggle Colours
00:05:13 *** sla_ro|master has quit IRC 00:31:13 *** spnda has quit IRC 01:07:31 *** FLHerne has quit IRC 01:22:21 *** gelignite has quit IRC 01:24:38 *** Wuzzy has quit IRC 01:44:13 *** glx has quit IRC 02:13:04 *** HerzogDeXtEr has quit IRC 02:26:07 *** Wuzzy has joined #openttd 02:32:32 *** Wormnest has quit IRC 02:59:53 *** Flygon has joined #openttd 03:15:45 *** didac has joined #openttd 03:32:18 *** Wuzzy has quit IRC 03:43:19 *** debdog has joined #openttd 03:46:39 *** D-HUND has quit IRC 05:13:47 *** snail_UES_ has quit IRC 06:28:49 *** didac has quit IRC 06:53:18 <NGC3982> 62 grfs is the limit on multiplayer? 07:03:55 *** WormnestAndroid has quit IRC 07:04:12 *** WormnestAndroid has joined #openttd 07:12:18 *** nielsm has joined #openttd 07:41:35 *** Wolf01 has joined #openttd 08:07:06 *** andythenorth has joined #openttd 08:23:22 *** jottyfan has joined #openttd 08:52:18 *** Progman has joined #openttd 09:37:19 *** HerzogDeXtEr has joined #openttd 09:37:42 *** Samu has joined #openttd 09:38:58 *** andythenorth has quit IRC 09:39:02 *** Artea has joined #openttd 09:45:07 *** sla_ro|master has joined #openttd 09:47:34 *** iSoSyS has joined #openttd 10:25:22 *** andythenorth has joined #openttd 10:30:33 *** jottyfan has quit IRC 10:33:24 *** andythenorth has quit IRC 10:53:58 *** sla_ro|master2 has joined #openttd 11:00:01 *** sla_ro|master has quit IRC 11:00:22 *** sla_ro|master has joined #openttd 11:02:04 *** sla_ro|master2 has quit IRC 11:17:39 *** FLHerne has joined #openttd 11:28:33 *** gelignite has joined #openttd 11:47:38 <DorpsGek> [OpenTTD/OpenTTD] J0anJosep updated pull request #8480: Multitile depots https://git.io/JL5Hh 11:50:20 <nielsm> https://www.tt-forums.net/viewtopic.php?p=1242789#p1242789 so, is there any reason other than "nobody configured it" for strgen.exe no longer being offered as a separate download? 11:51:41 <nielsm> presumably useful if you want to start a new translation and want to try the strings in the game without having to wait for eints and nightly build 12:01:38 <FLHerne> Used to be at https://www.openttd.org/downloads/strgen-releases/ but it's gone 12:01:57 <FLHerne> Was there in December 2019...isn't that *after* the new wobsite? 12:02:07 <LordAro> i think we decided it wasn't worth it 12:02:14 <LordAro> adding a new language requires modifying OTTD anyway 12:06:32 *** schmidt_fu[m] has left #openttd 12:25:43 *** frosch123 has joined #openttd 12:33:02 <frosch123> i should measure how often my ipv6 is broken 12:33:20 <frosch123> or i should make ottd deal better with it 12:38:52 *** gelignite has quit IRC 12:43:06 *** FLHerne has quit IRC 12:44:18 *** FLHerne has joined #openttd 12:48:01 <frosch123> nielsm: afaik the numerical stringids are compiled both into strgen and openttd 12:48:16 <frosch123> so the output of strgen only works with ottd of the same revision 12:48:38 <frosch123> which is too much of a support hassle with people who cannot compile themself 12:54:16 <nielsm> no that doesn't make sense, then you wouldn't be able to build strgen to parse the english.txt file for the string constants 12:55:00 *** andythenorth has joined #openttd 12:55:03 <frosch123> "table/strings.h" is generated from english.txt 12:55:06 <frosch123> and compiled into openttd 12:55:45 <frosch123> you would have to change ottd to use strings as keys instead of integers 12:56:04 <frosch123> but then you could as well drop strgen and let ottd compile then language files on start, like it does for gamescripts 12:56:05 <nielsm> yes the string constant id's are compiled into openttd, but not into strgen 12:56:13 <nielsm> strgen generated table/strings.h 12:56:44 <frosch123> so, what is the key in the compiled language then? 12:56:45 <nielsm> if table/strings.h was required to build strgen then you'd have a chicken and egg problem 12:57:12 <frosch123> we had reports for years, that everything breaks when people mix ottd binaries with language packs from different versions 12:57:22 <nielsm> I'm not questioning that 12:57:52 <frosch123> nielsm: openttd is compiled with strings.h, and strgen generated language packs that are tied to it 12:58:29 <frosch123> so, both openttd and strgen are only compatible if they use the same english.txt 12:58:52 <frosch123> both rely on the order of strings in english.txt 12:59:13 <frosch123> inserting a new string, or deleting another, makes strgen and openttd incompatible 12:59:33 <nielsm> this is not a question of adding strings 12:59:37 <nielsm> this is a question of adding a language 12:59:45 <frosch123> sorry, i don't follow 13:00:16 <frosch123> well, sorry, we are dicussing different things then 13:00:23 <nielsm> a person wants a copy of strgen to make their own language pack for a known version of openttd, or possibly work on translations without depending on eints and nightly builds 13:00:34 <frosch123> i thought the subject was to supply bundles with strgen 13:00:37 <nielsm> and does not want to set up a complete build environment for the entire game 13:01:42 <nielsm> if you have strgen and the language source files then you can build language files for the version of openttd the language source files belong to without having the rest of the openttd source code 13:03:22 <frosch123> so you shifting the problem to people downloading the correct english.txt that matches their openttd binary 13:04:06 <nielsm> yes you would obviously need that 13:05:49 <nielsm> and by the way I'm pretty sure lots of sanity checks are made for the language files before they are loaded, you'd have to be crafty to make a language file that doesn't match the game version but still loads 13:32:32 *** azulcosta has joined #openttd 13:32:55 <azulcosta> wow, so many people here... hello. 13:33:20 <frosch123> yes, about 5 13:33:39 <azulcosta> is it possible to change the font size of the industry minimap subtitles ? 13:34:03 <TrueBrain> lol @ frosch123 ; you win a cookie today :) 13:34:58 <frosch123> azulcosta: https://wiki.openttd.org/en/Archive/Community/FAQ%20troubleshooting#my-user-interface-is-too-small-to-read-my-font-is-unreadable-or-faulty 13:38:13 *** spnda has joined #openttd 13:38:28 <azulcosta> thanks, froch123 13:49:00 *** azulcosta has quit IRC 14:11:51 <Wolf01> https://www.youtube.com/watch?v=UPWgJ6-iHM0 so... I always thought it was only a demo, instead it was commercial! 14:40:46 *** glx has joined #openttd 14:40:46 *** ChanServ sets mode: +v glx 15:06:41 *** Wormnest has joined #openttd 15:29:46 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler opened pull request #8879: Feature: Configurable rainforest line height https://git.io/JmdT0 15:34:24 *** snail_UES_ has joined #openttd 15:58:34 *** Flygon has quit IRC 16:01:56 <DorpsGek> [OpenTTD/eints] frosch123 opened pull request #37: Fix #36: translated texts should be displayed and edited according to their ltr/rtl text direction. https://git.io/Jmd3s 16:04:29 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler opened pull request #8880: Feature: Press ctrl to build diagonal rivers in Scenario Editor https://git.io/Jmd3N 16:20:10 <DorpsGek> [OpenTTD/eints] TrueBrain approved pull request #37: Fix #36: translated texts should be displayed and edited according to their ltr/rtl text direction. https://git.io/Jmdcg 16:24:47 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler updated pull request #8879: Feature: Configurable rainforest line height https://git.io/JmdT0 16:38:00 <DorpsGek> [OpenTTD/eints] frosch123 merged pull request #37: Fix #36: translated texts should be displayed and edited according to their ltr/rtl text direction. https://git.io/Jmd3s 16:38:08 <DorpsGek> [OpenTTD/eints] frosch123 closed issue #36: Writing from right to left (Arabic) https://git.io/JmXrA 16:51:08 <DorpsGek> [OpenTTD/eints] frosch123 created new tag: openttd-github-1.1.2 https://git.io/JmdRF 16:56:32 <DorpsGek> [OpenTTD/eints] frosch123 commented on issue #36: Writing from right to left (Arabic) https://git.io/JmXrA 17:09:54 <DorpsGek> [OpenTTD/eints] AviationGamerX commented on issue #36: Writing from right to left (Arabic) https://git.io/JmXrA 17:29:36 <DorpsGek> [OpenTTD/OpenTTD] frosch123 opened pull request #8881: Fix: warning: comparison of integer expressions of different signedness. https://git.io/Jmdwd 17:30:26 <frosch123> ^^ high value contribution 17:33:31 <TrueBrain> are there any other kind? 17:33:47 <frosch123> not on my chaine 17:33:54 <frosch123> *machine 17:34:11 <DorpsGek> [OpenTTD/OpenTTD] michicc opened pull request #8882: Fix f0f96e31: [OpenGL] Signed/unsigned warning. https://git.io/Jmdr5 17:34:30 <frosch123> lol 17:34:44 <michi_cc> Eh, I look away for five monitues :P 17:35:21 <TrueBrain> you two are cute :) 17:35:37 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain approved pull request #8881: Fix: warning: comparison of integer expressions of different signedness. https://git.io/Jmdol 17:35:40 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain approved pull request #8882: Fix f0f96e31: [OpenGL] Signed/unsigned warning. https://git.io/Jmdo8 17:35:42 <TrueBrain> fight it out :P 17:35:43 <michi_cc> Yours should be through CI earlier, so.. 17:35:58 <TrueBrain> michi_cc's commit message is better :P 17:36:01 <TrueBrain> well, no 17:36:05 <TrueBrain> combination of both is :P 17:36:07 <TrueBrain> MWHAHAHA :D 17:36:23 <michi_cc> TrueBrain: Pick one and do a squash then :) 17:36:41 <TrueBrain> I like that you reference the commit, but I like the message more that frosch123 made :P 17:36:48 <TrueBrain> nahhhhh, I leave it up to you two who gets the credits :D 17:37:01 <TrueBrain> this is just hilarious, what are the odds :) 17:38:30 <frosch123> when is the livestream test? 17:38:41 <frosch123> we can rock-paper-scissor it 17:38:50 <TrueBrain> haha :) 17:38:55 <DorpsGek> [OpenTTD/OpenTTD] michicc merged pull request #8881: Fix f0f96e31: [OpenGL] warning: comparison of integer expressions of different signedness. https://git.io/Jmdwd 17:39:02 <TrueBrain> hahaha :D 17:39:08 <glx> lol 17:39:26 <DorpsGek> [OpenTTD/OpenTTD] michicc closed pull request #8882: Fix f0f96e31: [OpenGL] Signed/unsigned warning. https://git.io/Jmdr5 17:39:37 <TrueBrain> I love that you took the trouble of also editing the PR title michi_cc :D 17:39:58 <TrueBrain> frosch123: btw, time in 90 minutes or so to test if your OBS is still behaving etc? 17:40:05 <michi_cc> GitHub did that automatically (or maybe that's the Refined GitHub plugin, don't know really). 17:40:22 <TrueBrain> it normally doesn't, as far as I am aware :P 17:40:27 <frosch123> TrueBrain: sure, then i play widelands now :) 17:40:33 <TrueBrain> owh boy ... 17:40:52 <michi_cc> I'm blaming Refined GitHub then. 17:43:03 <frosch123> well, now i'll use that PR as example, how to write good PR descriptions :p 17:48:24 *** didac has joined #openttd 17:53:54 *** Gustavo6046_ has joined #openttd 17:53:54 *** Gustavo6046 has quit IRC 17:53:55 *** Gustavo6046_ is now known as Gustavo6046 18:10:27 <DorpsGek> [OpenTTD/OpenTTD] DorpsGek pushed 1 commits to master https://git.io/JmdMR 18:10:28 <DorpsGek> - Update: Translations from eints (by translators) 18:11:51 <DorpsGek> [OpenTTD/OpenTTD] perezdidac updated pull request #8794: Feature: Show rail/road/tram NewGRF name in Land Area Information window https://git.io/JthCX 18:12:19 <DorpsGek> [OpenTTD/OpenTTD] perezdidac commented on pull request #8794: Feature: Show rail/road/tram NewGRF name in Land Area Information window https://git.io/JmdMH 18:14:44 <DorpsGek> [OpenTTD/OpenTTD] perezdidac updated pull request #8794: Feature: Show rail/road/tram NewGRF name in Land Area Information window https://git.io/JthCX 18:36:40 *** qwebirc32886 has joined #openttd 18:41:00 *** qwebirc32886 has quit IRC 18:46:31 <TrueBrain> I deployed a new wiki version for OpenTTD; now with "edit summary" support 18:46:49 <TrueBrain> maybe that combats a bit of those silly commit comments people have been doing 18:48:15 <frosch123> oi, you got a contributor \o/ 18:48:31 <TrueBrain> yup; helped him deploy it this last week for his own wiki 18:48:39 <TrueBrain> so there are now 2 users of TrueWiki :P 18:51:02 <frosch123> i considered adding a note to all "archive" pages: this page is archived, it's either historic, or it's content was considered trash. why are you editing this? 18:51:24 <TrueBrain> STOP EDITING ARCHIVE 18:51:24 <TrueBrain> :P 19:01:44 <TrueBrain> frosch123: time to test your OBS setup with your new webcam? :D 19:04:28 *** Wormnest has quit IRC 19:05:37 *** WormnestAndroid has quit IRC 19:06:00 *** WormnestAndroid has joined #openttd 19:11:30 *** gelignite has joined #openttd 19:28:55 <DorpsGek> [OpenTTD/OpenTTD] LordAro commented on pull request #8880: Feature: Press ctrl to build diagonal rivers in Scenario Editor https://git.io/JmdpT 19:29:39 <LordAro> TrueBrain: commit comments? 19:29:50 <TrueBrain> yeah .... so people made an edit 19:29:54 <TrueBrain> went to the GitHub history 19:30:01 <TrueBrain> and wrote at the commit a comment what the change was about 19:30:06 <TrueBrain> like anyone will ever find that anywhere 19:30:11 <LordAro> ...i see 19:31:36 *** Wormnest has joined #openttd 19:34:44 <_dp_> ffs C++, why uint8_t is still a freaking character type... >:) 19:37:35 <TrueBrain> LordAro: people do weird shit :P 19:42:37 *** WormnestAndroid has quit IRC 19:42:50 *** WormnestAndroid has joined #openttd 19:51:51 *** HerzogDeXtEr has quit IRC 19:52:19 <frosch123> can anyone still resize the openttd window? 19:52:34 <frosch123> currently i crashes for me 19:52:36 <frosch123> but i 19:52:44 *** jottyfan has joined #openttd 19:52:47 <frosch123> can't remember whether it also did that before obs messed everything up :p 19:53:11 <TrueBrain> Linux non-OpenGL works :P 19:53:46 <TrueBrain> Windows OpenGL works too 19:53:51 <TrueBrain> but neither are useful to you, I guess :D 19:53:59 <frosch123> well, i'll retry tomorrow 19:54:07 <frosch123> maybe my video memory is fragmented 19:54:13 <TrueBrain> defrag! 19:54:15 <frosch123> openttd has all kinds of issues noe 19:54:46 <TrueBrain> let me start a Linux Vm real quick, just to see if the maximize issue happens :) 19:55:23 <frosch123> dmesg shows a lot of issues from the graphics card 19:55:32 <frosch123> it probably works fine after reboot :) 19:56:24 <TrueBrain> not so nice OBS can cause that .. 19:57:12 <frosch123> maybe it was widelands :) 19:57:19 <TrueBrain> :D 19:57:22 <frosch123> it detected that openttd was running as well, and said boo 19:57:23 <TrueBrain> which runs at 24fps .. 19:57:32 <TrueBrain> which game runs <60fps in 2021?! :P 19:57:46 <frosch123> the autosave is funny in widelands 19:57:58 <frosch123> it blocks the game, but afterwards it catches up to real-time 19:58:11 <TrueBrain> nasty 19:58:24 <frosch123> so the game does not pause, but rather lags, during saving 19:58:39 <TrueBrain> guess someone should make a PR for it 19:58:42 <frosch123> stuff jumping positions 19:59:18 *** jottyfan has quit IRC 19:59:33 <TrueBrain> scaling issue I can reproduce by maximizing and returning and maximizing and returning again 19:59:36 <TrueBrain> now I can play OpenTTD topdown 20:00:12 <TrueBrain> and now it crashed 20:00:21 <frosch123> ah, so it's not just me :) 20:00:22 <TrueBrain> so yeah, SDL driver doesn't propagate correctly resizes to OpenGL 20:00:59 <TrueBrain> no, it is not :) 20:01:04 <TrueBrain> OpenGL only issue 20:01:20 <TrueBrain> guess I didn't find all the right places to call AllocateBackend stuff :) 20:01:34 <TrueBrain> feel free to debug and fix it :P I don't have OpenGL on Linux in an easy-to-work-with setup :) 20:01:44 <frosch123> according to my backtrace, it looks more like a race condition 20:02:01 <frosch123> AllocateBackingStore is on the stack 20:02:35 <TrueBrain> hmm .. it should only be called from the main thread, while the game-thread is not running 20:04:37 <frosch123> hmm, yes, i was wrong 20:04:58 <TrueBrain> https://github.com/OpenTTD/OpenTTD/blob/master/src/video/sdl2_v.cpp#L505 <- should be triggered on window resize 20:05:16 <TrueBrain> should be calling https://github.com/OpenTTD/OpenTTD/blob/master/src/video/sdl2_opengl_v.cpp#L123 somewhere in the chain 20:05:28 <TrueBrain> if I would guess, either one of the two is not working 20:05:29 <frosch123> https://dpaste.org/ZQqj <- anyway, i'll check again tomorrow 20:05:36 <frosch123> i don't trust obs :p 20:06:02 <TrueBrain> it might be that SDL hasn't resized the OpenGL context yet 20:06:10 <TrueBrain> I can see something racy like that happening too 20:06:37 <TrueBrain> might also be why it did work on Windows (SDL OpenGL) 20:07:16 <michi_cc> I can reproduce that on Windows for OpenGL, but only ever on resizing smaller. 20:08:47 <michi_cc> Don't really see why, though, as OpenGL Resize gets all the proper values. 20:10:23 <TrueBrain> yeah, smaller is the issue 20:10:37 <TrueBrain> which makes a bit sense; bigger wouldn't cause buffer issues, I guess 20:11:20 *** dwfreed has quit IRC 20:16:17 *** dwfreed has joined #openttd 20:34:57 <DorpsGek> [OpenTTD/team] arnaullv opened issue #164: [ca_ES] Translator access request https://git.io/JmFI9 20:40:54 *** Smedles_ has quit IRC 20:47:15 <michi_cc> Okay, #8877 was an exceptionally well reviewed PR :P 20:47:27 <DorpsGek> [OpenTTD/OpenTTD] michicc opened pull request #8883: Fix f0f96e31: [OpenGL] Broken window resizing. https://git.io/JmFtb 20:48:22 <DorpsGek> [OpenTTD/OpenTTD] michicc commented on pull request #8877: Fix #8871: [OpenGL] Initialize all buffers after resize and clear back buffer. https://git.io/JmFqk 20:49:07 <frosch123> excellent branch name 20:49:49 <michi_cc> Note to self: after any OpenGL change, always use -d driver=9 and watch for the nVidia debug output. Luckily, the nVidia driver debug messages are good. 20:51:20 <glx> not the first PR with multiple follow ups 20:52:01 <glx> but it's hard to think about all possible cases 20:53:22 <frosch123> seems to fix all the issues i had today :) 20:57:40 *** jottyfan has joined #openttd 20:58:21 <frosch123> i have no idea how it fixes stuff, and how it got broken by 8877 :) 20:58:35 <DorpsGek> [OpenTTD/OpenTTD] frosch123 approved pull request #8883: Fix f0f96e31: [OpenGL] Broken window resizing. https://git.io/JmFm5 21:01:58 <frosch123> dbg: [driver] OpenGL: Error (high) - GL_INVALID_OPERATION error generated. Cannot access buffer data. <- master shows that, PR fixes it 21:17:20 <supermop_Home> ugh ran out of switches again 21:17:57 <supermop_Home> although the line mentioned in the error is not a switch... 21:20:20 <andythenorth> hmm why do I keep looking on ebay? 21:20:28 <andythenorth> I have spent all my money until payday 21:22:26 <frosch123> do you want to leak your wish list on the stream? 21:25:31 <andythenorth> hmm 21:25:33 <andythenorth> no! 21:25:37 <andythenorth> people might bid against me! 21:26:59 <DorpsGek> [OpenTTD/OpenTTD] michicc merged pull request #8883: Fix f0f96e31: [OpenGL] Broken window resizing. https://git.io/JmFtb 21:32:40 <supermop_Home> if nmlc gives me this error but it just points to some callback section for a truck, should i assume it still means too many switches? 21:32:50 <supermop_Home> "Unable to allocate ID for [random]switch, sprite set/layout/group or produce-block. Try reducing the number of such blocks." 21:34:10 <frosch123> callbacks are also switches 21:34:28 <andythenorth> it's rare to run out 21:34:34 <andythenorth> I've only done it a couple of times 21:34:49 <frosch123> we could add graphviz to draw the active switches 21:35:04 <frosch123> but graphs with 256 edges tend to be unreadable :) 21:36:16 <andythenorth> filter out the ones with lower switch counts :P 21:38:00 <spnda> This is interesting.... bananas server returned 500: "Server got itself in trouble" 21:38:26 <frosch123> supermop_Home: anyway, 256 active switches is a lot. it only happens if switches stay active very long 21:38:44 <frosch123> when you define everything at the beginning of the nml file, and only use it at the end 21:39:01 <Xaroth> spnda: maybe stop breaking it then? :P 21:39:16 <andythenorth> if I define 256 procedures, do I game over myself? 21:39:18 <supermop_Home> frosch123 i am sure i have more than 256, but maybe what you mention is an issue? 21:39:21 <frosch123> Xaroth: does tb forward sentry reports to you? 21:39:31 <Xaroth> nop[ 21:39:32 <spnda> Xaroth: I wish I knew what would cause this tho lol 21:39:46 <supermop_Home> i can try to move more to nearer their use... 21:39:50 <andythenorth> oof found a nasty FIRS bug 21:40:10 <frosch123> supermop_Home: it's not the total amount of switches in the grf. it's the amount of "active switches". a switch is "active" from its definition until its last usage 21:40:14 <andythenorth> the N tile height isn't always reliable 21:40:14 <supermop_Home> i have no idea how many switches are in this file but i would have guessed more like 2000 21:40:25 <frosch123> so the problem is the distance between defintion and usage 21:40:36 <frosch123> and how much stuff happens inbetween 21:40:50 <supermop_Home> i see 21:41:45 <supermop_Home> my file is about 45000 lines, Road vehicles take from about 0 to 35000 21:41:53 <supermop_Home> all the trams are the rest, 21:42:12 <frosch123> for example: if you define graphics 500 vehicles first, and then later put all the items for the 500 vehicles, you will have 500 active switches 21:42:18 <supermop_Home> so there might be some truck switches at like line 100 used on line 30000 21:42:35 <frosch123> if you alternate sprites and items, you only have 1 active thing at a time 21:42:52 <andythenorth> FIRS thinks these 4 tiles have same height https://user-images.githubusercontent.com/1780327/111921772-54586380-8a8e-11eb-9e54-bc1e60da0142.png 21:43:14 <spnda> Can someone maybe access the bananas api console? Idk why it returns status 500. 21:43:20 <supermop_Home> well i do all truck graphics then all truck items, then all bus graphics, then all bus items, etc 21:43:42 <supermop_Home> so hopefully that helps a little, except the truck section is soo huge 21:43:57 <andythenorth> wonder if I have a bug here https://github.com/andythenorth/firs/blob/master/src/templates/location_check_macros_tile.pynml#L182 21:44:10 <supermop_Home> i will try to split it up (all flat trucks graphics and items, then all box trucks, etc) 21:44:22 <andythenorth> that ternary is horrible 21:44:37 <FLHerne> supermop_Home: Can you upload a copy of the non-working version somewhere? 21:44:41 <andythenorth> and this should be converted to procedures :P 21:44:42 <Xaroth> spnda: what are you sending? 21:45:17 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler updated pull request #8880: Feature: Press ctrl to build diagonal rivers in Scenario Editor https://git.io/Jmd3N 21:45:24 <FLHerne> Automatically moving switches later when possible was on my things-to-look-at list after andy hit it 21:45:39 <FLHerne> Not sure I'll be able to very soon though 21:45:54 <FLHerne> But a not-working example would be nice 21:46:11 <spnda> Xaroth: I'm trying to GitHub authenticate with the BaNaNaS API programmatically. It's api.bananas.openttd.org/user/authorize roughly based on what's here: https://github.com/OpenTTD/bananas-frontend-cli/blob/master/bananas_cli/authentication.py#L103 21:46:49 <spnda> After getting the redirect and listening for it the redirect, using that data for api.bananas.openttd.org/user/token returns status code 500 with "Server got itself in trouble" 21:46:55 <supermop_Home> frosch123 i think my problem is this week i was adding new purchase sprites with little icons.... the icons are defined right up at the top of the file, and then used all the way through to the end 21:47:36 <glx> <FLHerne> Automatically moving switches later when possible was on my things-to-look-at list after andy hit it <-- yeah reordering should be an nmlc feature, but it's not an easy task 21:48:12 <supermop_Home> each purchase sprite is a stack - Purchase sprite of the vehicle (switch changing livery based on year), then sprite of the icon (switch changing eg a Diesel symbol to a battery after 2050 etc) 21:48:23 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #8880: Feature: Press ctrl to build diagonal rivers in Scenario Editor https://git.io/JmFn0 21:50:39 <glx> supermop_Home: hmm each icon eats an ID, and they are active till the end of the file it seems 21:50:52 <supermop_Home> yeah 21:51:25 <supermop_Home> glx first i did just the trams, and it compiled fine, even though they are all the way at the bottom of the file 21:51:35 <supermop_Home> (there are only like 4 icons) 21:51:56 <supermop_Home> but then when i did all the trucks, i ran out 21:52:30 <supermop_Home> i could define the icons again separately later for trams? 21:54:04 <supermop_Home> i also have a ton of switches for like, capacity of flatbed trucks, that get defined up top, then later get used first for the diesel trucks, then for the trolley trucks (afater all other diesel trucks) then for dual mode, etc 21:54:50 <supermop_Home> so i could put all the flatbed trucks regardless of power type immediately after the capacity switches to save IDs? 21:55:19 <glx> reordering often helps yes 21:56:04 <supermop_Home> however i have a similar situation for power and running cost of each type of truck, (all diesel, then all trolley, etc) 21:56:39 <supermop_Home> so moving the order will instead make some of the trolley trucks further away from their power switches 21:56:48 <supermop_Home> hmm 21:57:16 <supermop_Home> but there are many more cargo related switched than power i think, so it should still be a net positive to reorder 21:58:15 <glx> in some cases it may be better to duplicate stuff too 21:58:26 <frosch123> after a successful compile nml will print some statistics 21:58:44 <frosch123> it will also print how many varaction2 ids it used, so you can check the effect of your reordering 22:05:43 <andythenorth> supermop_Home are they named switches for power, capacity etc? 22:05:50 <supermop_Home> yes 22:05:51 <andythenorth> i.e. per vehicle 22:05:56 <andythenorth> or are they procedures? 22:07:08 <supermop_Home> uh more like per type of vehicle (4th generation trolley trucks all share the same power switch, 4th generation flatbed trucks share the same capacity and cargo graphics switch regardless of the truck power type) 22:07:18 <supermop_Home> procedures? 22:07:30 <andythenorth> procedures require a recent nmlc 22:07:42 <andythenorth> hard to explain neatly 22:07:47 <andythenorth> and $someone needs to write the docs :P 22:07:56 <supermop_Home> like what does a procedure do? 22:08:03 <supermop_Home> not sure that i am using it 22:08:23 <supermop_Home> the most procedural thing i have is the sprite stack compositing 22:08:28 <andythenorth> so in the switch block, where you normally read a variable 22:08:34 <supermop_Home> but that's been around since like 2017 22:08:39 <andythenorth> you can instead call a switch, e.g. check_for _red_things() 22:08:48 <supermop_Home> uh 22:08:56 <LordAro> spnda: the server returning a 500 is alwaya a bug with the server (i.e. you've crashed it in some way) 22:08:56 <andythenorth> and it returns a value, or it can also stuff things into temp storage along the way 22:09:20 <LordAro> i imagine TrueBrain will appear at some point and complain about being sent exception emails 22:09:28 <spnda> LordAro: Ik ye, I'm looking to see what I might've done wrong 22:09:36 <andythenorth> and you can pass paramers to a procedure, e.g. make_sandwich(ham, eggs) 22:09:45 <spnda> Yeah, I wanted to ask but hes playing Dota 2 22:09:55 <LordAro> heh 22:09:57 <supermop_Home> i have switches that check something, and then return like 0: switch2, 1: switch3, 2: switchY etc 22:09:58 * andythenorth trialling explaining procedures :P 22:10:09 <andythenorth> yeah no this is different 22:10:30 <supermop_Home> i am pretty sure i am not doing that as i had no idea it was even a thing in nml? 22:10:41 <andythenorth> yeah, you wouldn't do it by accident :) 22:10:47 <andythenorth> it may not solve the current case 22:10:48 <supermop_Home> should i do it 22:10:50 <supermop_Home> ? 22:10:55 <andythenorth> but it really aids code reduction 22:11:03 <supermop_Home> i love making big procedural messes 22:11:15 <supermop_Home> i'm sure 22:11:33 <supermop_Home> my code is so long and i feel like it really shouldn't be.... 22:11:58 <andythenorth> it's hard to explain the use cases 22:12:01 <andythenorth> but e.g. https://github.com/andythenorth/iron-horse/blob/master/src/templates/procedures_alternative_var_random_bits.pynml 22:12:19 <supermop_Home> do i need to actually learn python first? 22:12:22 <andythenorth> no 22:12:37 <andythenorth> I can call switch_alternative_var_random_bits(1, 1) or similar instead of random_bits() 22:12:47 *** WormnestAndroid has quit IRC 22:12:56 *** WormnestAndroid has joined #openttd 22:12:57 <supermop_Home> my wife seemed to make an expression of disgust watching me work on my code a bit yesterday 22:13:27 <supermop_Home> i'm sure it looks like watching a caveman try to make torchon or something 22:13:45 <andythenorth> h 22:13:45 <supermop_Home> hmmm 22:13:47 <andythenorth> ha 22:13:58 <andythenorth> well procedures may be irrelevant to your current case 22:14:12 <glx> <supermop_Home> i have switches that check something, and then return like 0: switch2, 1: switch3, 2: switchY etc <-- only the last switch counts in the active ones (if switch2..switchY are not reused elsewhere) 22:14:16 <andythenorth> but globally shared switches is a sign in my experience 22:15:47 <supermop_Home> glx unfortunately switch2 and switchY might get used 100 more times in my case 22:16:07 <supermop_Home> hmm andythenorth i should look into it 22:16:18 <supermop_Home> i should probably reorder it a bit too? 22:16:40 <supermop_Home> so its not like 9000 lines of spritegroup definitions then all the trucks 22:17:06 <glx> if they are reused you may want to factorise so they are used less 22:17:24 <supermop_Home> how do you mean? 22:17:31 <supermop_Home> i'm pretty dumb 22:18:47 <glx> as I understand it, switch2 and switchY are kind of generic in your code 22:19:30 <glx> so you should check how they are used and see how each usage differ 22:19:37 <supermop_Home> usually, yes i guess? 22:19:55 *** Samu has quit IRC 22:20:07 <supermop_Home> its more like i have a switch for a composite sprite 22:20:13 <andythenorth> can someone make a varact2 graph visualiser before the livestream? :P 22:20:28 <andythenorth> then we could find out who wins in different categories (trains, industries, etc) 22:20:51 <supermop_Home> and 0: is the rigid truck body, same across all trucks of this generation 22:21:18 <supermop_Home> 1: is the bed of the truck (eg flat bed or box), same across all trucks of this type 22:21:40 <frosch123> andythenorth: sure, i'll make a quiz. i show the graph, you have to guess the grf 22:21:48 <supermop_Home> and 2: is like the pantograph etc if the truck has one, same across all trolley trucks 22:21:54 <frosch123> note the usage of "graph" and "grf" :p 22:22:16 <spnda> what kind of graph? 22:22:50 <supermop_Home> or here is one: 22:22:51 <frosch123> a graph, not a pot 22:22:54 <frosch123> *plot 22:22:59 <frosch123> https://en.wikipedia.org/wiki/Graph_(discrete_mathematics) 22:23:11 <glx> hmm maybe all 0 could go in a procedure with generation as parameter 22:23:26 <spnda> frosch123: huh that's new to me, but what would it show? 22:23:43 <supermop_Home> "length: switch_length_s_trailer;" where that switch sets the cab as length 3 and the trailer as length 6, same for every truck that has a short trailer 22:23:54 <frosch123> spnda: action123 is a graph 22:24:12 <supermop_Home> regardless if the truck has 1 or many trailers, 22:25:03 *** nielsm has quit IRC 22:25:19 <andythenorth> frosch123 good quiz :) 22:26:03 <andythenorth> we could ask the audience, is a newgrf a DAG? 22:26:27 <frosch123> hmm, i guess it doesn't work on "whole grf" level 22:26:32 <frosch123> i have to pick a single industry or vehicle 22:26:43 <andythenorth> is an action 0 the start of a DAG? 22:27:07 <glx> so instead of using explicit body switch, you do it indirectly via the procedure, and reduce id count 22:27:11 <frosch123> 3 is the root, 2 or 1 is the leaf 22:27:15 <supermop_Home> huh 22:27:20 <frosch123> va2/ra2 are the nodes 22:27:25 <andythenorth> I forgot how 3 is associated to 0 22:27:28 <supermop_Home> things like that would certainly help 22:27:28 <andythenorth> too long since I did it 22:27:51 <andythenorth> supermop_Home I have loads of procedure examples, but they're all...complicated :( 22:28:00 <andythenorth> but they made my vehicle code much much simpler 22:28:04 <supermop_Home> andythenorth my grf id overly complicated 22:28:08 <andythenorth> and much faster to compile 22:28:10 <glx> andythenorth: please don't show your loop unroll ;) 22:28:12 <supermop_Home> *is 22:28:19 <andythenorth> glx saving it for the livestream :P 22:28:30 <andythenorth> we could also profile how slow it makes OpenTTD 22:33:47 *** frosch123 has quit IRC 22:35:02 <supermop_Home> glx also common is a switch for items by position in consist 22:36:06 <supermop_Home> where 0: is the cab/tractor of the truck (so same for all trucks of same generation) and 1: is the trailer, same for all trucks of this category 22:37:10 <supermop_Home> so only one truck has a switch that calls 0: SwitchA and 1: SwitchX 22:37:38 <supermop_Home> many other trucks also SwitchA or SwitchX 22:38:23 <supermop_Home> maybe 0: SwitchA and 1:SwitchZ, or 0: SwitchB and 1: SwitchX 22:38:43 <supermop_Home> so its very combinatorial 22:39:18 <andythenorth> that isn't necessarily a problem 22:39:22 <andythenorth> depends on the exact usage 22:40:44 *** sla_ro|master has quit IRC 22:41:10 <glx> but you can use the same switch for all 0: cases, same for 1: and let it determine what to do based on parameters or temp storage 22:41:22 *** WormnestAndroid has quit IRC 22:41:30 <supermop_Home> huh 22:41:30 *** WormnestAndroid has joined #openttd 22:41:39 <supermop_Home> that could be helpful 22:42:28 <glx> that way all your 0: switchs are referenced only by the common caller and removed from active list 22:46:13 <andythenorth> there are 2 or 3 strategies you can use 22:46:34 <andythenorth> common switches with temp storage 22:46:47 <andythenorth> procedures which return a meaningful value 22:47:03 <andythenorth> procedures which put values in temp storage 22:47:35 <andythenorth> I almost never use a common switch, I tend to favour procedures 22:48:00 <andythenorth> it's because I learnt nfo first, and keeping track of 'global' varact 2 IDs was a PITA 22:48:24 <andythenorth> old habits die hard etc 22:48:31 <supermop_Home> makes sense 22:49:55 <andythenorth> https://github.com/andythenorth/iron-horse/blob/master/src/templates/vehicle_with_visible_cargo.pynml#L46 is a simple example 22:50:13 <andythenorth> that handles loading states for a complicated vehicle with cargo sprites and a roof hatch 22:50:47 <andythenorth> the actual cargo state calculation is done in a procedure, which returns a value 0..7 22:51:00 <supermop_Home> that's a pretty common situation in my RVs 22:52:15 <glx> the main work in nfo/nml is to work around limitations in a smart way ;) 22:52:34 <andythenorth> oof that shows up here :) https://github.com/andythenorth/iron-horse/blob/master/src/templates/vehicle_with_visible_cargo.pynml#L14 22:52:40 <andythenorth> 'notes to self' 23:16:53 <andythenorth> self -> bed 23:16:55 *** andythenorth has quit IRC 23:29:09 *** spnda has quit IRC 23:36:25 *** Wolf01 has quit IRC 23:40:54 *** gelignite has quit IRC