IRC logs for #openttd on OFTC at 2025-06-25
β΄ go to previous day
00:05:14 <reldred> layout selector widget?
00:05:58 <reldred> Could just call it 'layout 1, layout 2, layout 3' or something as a default fallback then introduce a property later to give them a name.
00:09:25 <peter1138[d]> Well. It's kinda meant to be random, But actually that's chosen by the client anyway.
00:20:31 <reldred> I mean if people want it to be properly random they'll use prospect, but I think if people are manually building an industry they're either not going to be bothered that it's not random anymore or they'll appreciate they can select and place with a degree of precision. At the moment people are either doing a lot of save scumming or cheating in money and magic bulldozer til they get it right.
00:23:37 *** WormnestAndroid has quit IRC (Remote host closed the connection)
00:23:57 *** WormnestAndroid has joined #openttd
00:35:13 <talltyler> Implementing a new station rating algorithm really needs debugging tools to see how each part of the calculation factors into the total rating. New sidequest unlocked: a tooltip for the station window showing how that rating was achieved.
00:35:25 <talltyler> This code is ancient and messy π¦
00:36:01 <talltyler> OpenTTD Episode V: The Tech Debt Strikes Back
00:36:42 <reldred> time to make OpenTTD2 with blackjack and hookers
00:38:20 <talltyler> Thatβs called Train Fever/Transport Fever 1/2/3/Mashinky/Voxel Tycoon/undoubtedly more Iβm forgetting
00:39:02 <talltyler> Iβm not sure a clean slate is necessarily the answer, OpenTTD has so much momentum and institutional history that youβd struggle to replicate with a new game
00:41:00 <talltyler> For anyone curious, I've written the code for the new algorithm, but I want to test and balance it before I make a PR. π
00:42:27 <talltyler> Oh, JGRPP already has a station rating tooltip π
00:45:48 <reldred> talltyler: yeah but none of them are openttd
00:46:09 <talltyler> Indeed they are not π
00:47:33 <_jgr_> Citymania has one as well, probably it looks nicer than the one in my branch
00:50:50 <reldred> Nah to me, what would I call OpenTTD2? I'd probably say, an excuse to rewrite big chunks of the game with no illusion of keeping backwards compatibility of save files and such. Like a big map rewrite, big change to how vehicle movement works or some other daft grand plan, etc. It's still OpenTTD but it's the opportunity to draw a line in the sand and then take a big ole jump over it.
00:52:49 *** firepup650 has joined #openttd
00:52:54 <reldred> Anyways, just my dumb musings
00:54:31 <wensimehrp> OpenTTD2: Tears of the Kingdom
00:55:30 <wensimehrp> find "newgrf" "grf" replace "mod"
00:55:57 <wensimehrp> CJK formatting integration and latin-cjk spacing
01:05:23 *** firepup650 has quit IRC (Quit: Going down with the ship)
01:12:07 *** firepup650 has joined #openttd
01:12:31 *** firepup650 has joined #openttd
01:12:59 *** firepup650 has joined #openttd
01:15:26 *** firepup650 has joined #openttd
01:16:46 *** firepup650 has joined #openttd
01:17:59 *** firepup650 has joined #openttd
01:20:53 *** firepup650 has joined #openttd
01:27:18 <peter1138[d]> Yup, source code is available.
01:59:12 *** Wormnest has quit IRC (Quit: Leaving)
02:07:45 *** Flygon has quit IRC (Read error: Connection reset by peer)
02:22:46 *** gnu_jj_ has joined #openttd
02:26:21 *** gnu_jj has quit IRC (Ping timeout: 480 seconds)
02:38:15 *** akimoto has quit IRC (Remote host closed the connection)
03:45:19 *** WormnestAndroid has quit IRC (Remote host closed the connection)
03:45:22 *** WormnestAndroid has joined #openttd
03:51:58 *** dh1 has quit IRC (Ping timeout: 480 seconds)
04:18:16 *** ipravd has quit IRC (Quit: WeeChat 4.3.1)
04:19:26 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
04:19:27 *** WormnestAndroid has joined #openttd
04:19:31 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
04:19:33 *** WormnestAndroid has joined #openttd
04:19:43 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
04:22:28 *** WormnestAndroid has joined #openttd
04:42:51 <DorpsGek> - Update: Translations from eints (by translators)
05:08:10 *** keikoz has quit IRC (Ping timeout: 480 seconds)
05:09:58 <locosage> _jgr_: Iirc one that was PRed into jgrpp originated from my code in cmclient
05:10:21 <locosage> So they're about the same
05:28:59 <locosage> The trickiest part about rating tooltip is calculating penalty from stations down the line
05:29:48 <locosage> I even have some doubts openttd itself is doing it right
05:30:01 <locosage> But never got to investigate
05:30:34 <locosage> May be dependant on station IDs and tick cycle
05:41:36 <pickpacket> reldred: re-write in rust π€ͺ
05:42:26 <reldred> pickpacket: Oh no no no not getting dragged into that mess π€£
05:42:57 <pickpacket> but but MEMORY SAFE!! π
05:44:02 <pickpacket> oh, I know! Re-write the GUI for Electron!
05:44:29 * pickpacket has aaaaaall the bright ideas today
05:44:54 <reldred> that should come through on irc
05:45:03 <reldred> it's a cat smacking another cat on the head.
05:45:47 <pickpacket> I got the link. I have previews disabled in thelounge, otherwise it would even load it inline
05:46:21 <pickpacket> Does anyone here remember SimCopter?
06:01:20 <locosage> I just had the brightest idea. Since part of the player base hate block signal and other part hates path why not just remove them all? π€
06:01:47 <pickpacket> locosage: I'm all for it. Can't see how that could possibly backfire in any way
06:02:15 <wensimehrp> then we will use a timetable-based system to avoid collisions
06:03:33 <pickpacket> could we just introduce a new type of signal that randomises between being a block or path signal every few ticks? Then everyone gets what they want
06:04:15 <pickpacket> and then remove the old ones
06:05:01 <locosage> Nah, random is bad, make them procedural
06:05:25 <locosage> Each time is assigned a signal type pseudo randomly
06:07:07 <locosage> Can't be changed, use it or find another route
06:07:42 <locosage> Somehow I'm starting to feel the may actually be an interesting game mode π€£
06:08:08 <locosage> For the April 1st event if nothing else π
06:09:25 <pickpacket> locosage: definitely not for anything else π
06:20:08 <pickpacket> andythenorth: how? π€ Why would FIRS -- an industry mod -- break a vehicle mod?
06:25:22 <andythenorth> I stopped conforming to some conventions that some other grfs relied on, instead of conforming to the expected spec
06:41:29 <andythenorth> pickpacket: Cargos being in specific order
06:55:09 *** debdog has quit IRC (autokilled: This host violated network policy. Mail support@oftc.net if you think this is in error. (2025-06-25 06:55:09))
07:20:34 <squirejames> truebrain: Rebel, Rebel, your GRFs are a mess π
07:37:42 <pickpacket> andythenorth: now???
08:02:49 <LordAro> time is an illusion, lunch time doubly so
08:12:42 <pickpacket> LordAro: tea time is the only real time. All time is tea time
08:15:44 <peter1138[d]> I think I need to hook in... another... place to check highlight / command status.
08:46:31 *** mindlesstux has joined #openttd
08:52:34 *** mindlesstux has joined #openttd
09:00:15 <peter1138[d]> Uh oh, trying to use a printer.
09:05:19 <peter1138[d]> Ah, it's fucked.
09:39:53 <kuhnovic> Humanity has invented steam engines, put people on the moon, harnessed the power of the atom. But somehow building a working printer is beyond our capabilities...
09:51:51 <peter1138[d]> This one hasn't been used for a few years.
09:52:01 <peter1138[d]> So of course, it's managed to spew toner everywhere.
09:53:47 <kuhnovic> So it is a laser printer. There was hope for a brief moment.
10:09:14 <peter1138[d]> When they're working, they generally work better.
10:15:37 *** cmcaine has joined #openttd
10:15:37 <cmcaine> Using `mold` as the linker and `ninja` instead of `make` has sped up my openttd builds a bit.
10:15:37 <cmcaine> cmake ../.. -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja -DCMAKE_CXX_FLAGS="-fuse-ld-mold"
10:23:33 <reldred> Things generally work until they stop working, then they donβt usually work too well.
10:24:12 <reldred> Sometimes truly I inspire myself
10:45:43 <peter1138[d]> Yeah, but inkjets work fine, as designed... and you still get shit like smudged ink.
11:13:39 <peter1138[d]> Any idea what viewport.cpp:3467 is doing?
11:57:24 *** akimoto has joined #openttd
12:30:50 *** keikoz has quit IRC (Ping timeout: 480 seconds)
12:44:11 *** keoz has quit IRC (Ping timeout: 480 seconds)
12:56:30 *** keikoz has quit IRC (Ping timeout: 480 seconds)
13:03:05 *** keoz has quit IRC (Ping timeout: 480 seconds)
13:24:14 <peter1138[d]> Well, that is not exactly readable.
13:27:26 <peter1138[d]> :3453. Despite my efforts to get to the line number is master, it was affected by something else.
13:30:24 <locosage> peter1138[d]: yeah, that's why I did overlay
13:31:02 <talltyler> I very much like the idea though, much nicer than the big red error windows π
13:32:16 <locosage> yeah, windows are annoying as heck
13:33:38 <peter1138[d]> Currently it's just a TextEffect, so a bit less customizable.
13:34:24 <locosage> is that after click effect or before?
13:34:43 <peter1138[d]> Hmm, there's a TransparentRect option, maybe that'll do.
13:36:03 <locosage> I had to write my own window class though may have copied some of it from network chat
13:37:20 <peter1138[d]> Slightly better but not hugely.
13:38:28 *** keikoz has quit IRC (Read error: Connection reset by peer)
13:56:56 *** toktik is now known as Guest18733
14:01:27 <pickpacket> peter1138[d]: what's that symbol on the yellow arrow?
14:02:35 *** Guest18733 has quit IRC (Ping timeout: 480 seconds)
14:04:15 <peter1138[d]> This feature kinda exploded from a comment about how to place the Port in FIRS π
14:07:02 <peter1138[d]> Completely obvious where to place it π
14:07:35 <peter1138[d]> Probably not as fancy as things available in other patch packs.
14:22:12 <talltyler> Interesting, so no preview but it does a test of the build callback?
14:22:39 <talltyler> Er, a test of each tile layout to ensure at least one is valid?
14:43:58 <peter1138[d]> No, nothing as manual. It does a test of issuing the command.
14:44:51 <peter1138[d]> So for any regular build/remove command, it should get exactly the same state.
14:47:00 <talltyler> That's sort of what I meant but couldn't find the right words, I guess π
14:47:12 <talltyler> Looks like a useful feature.
14:47:57 <peter1138[d]> Hmm, actually for industry funding it is not quite right, I guess I need to move the InteractiveRandom() part of it to the point where you click on the Fund button, instead of when clicking to build.
14:48:18 <peter1138[d]> Doesn't matter hugely as the command cycles through available layouts anyway.
14:52:53 <peter1138[d]> talltyler: So doing a preview requires way more knowledge of what the command is going to do, and for NewGRFs you can run into the problem that things may need to exist before callbacks work.
14:54:52 <peter1138[d]> For industries, as the UI doesn't know which layout will be successful, I just prescan all layouts for the industry to get the largest dimension. The actual layout will probably be smaller though.
14:56:30 <peter1138[d]> I don't know if JGRPP has in-viewport previews.
14:58:06 <peter1138[d]> Anyway, there's a bit of a conflict, because red tile highlight is currently used to mean that a removal command will be issued.
15:23:07 <locosage> I ended up doing some magic to run newgrfs stuff on non-existing objects
15:23:58 *** gelignite has joined #openttd
15:26:58 <locosage> ui could just do a layout selector tbh, that random thing isn't very useful
15:27:04 <locosage> and quite a pita for previews
15:27:10 <locosage> though I did manage to make it work
15:28:06 <andythenorth> I *could* just make the port build anywere
15:28:13 <andythenorth> and not require water or coast
15:28:38 <locosage> it's hardly a solution for industry placement in general
15:28:58 <andythenorth> maybe industry placement is a bad thing
15:30:00 <locosage> works almost perfectly in cmclient :P
15:30:15 *** keikoz1 has joined #openttd
15:30:42 <locosage> only thing that is still a bit meh is area highlight
15:30:46 <locosage> where industry can't be placed
15:31:15 *** keikoz has quit IRC (Ping timeout: 480 seconds)
15:31:24 <peter1138[d]> andythenorth: It works fine with the bit of visual feedback in my branch.
15:32:24 <peter1138[d]> Allowing the player to choose a layout would make the area a bit better (but not exactly, due to holes), but also... I dunno.
15:32:47 <andythenorth> I'm potato on layouts
15:33:02 <andythenorth> I like random π
15:33:06 <peter1138[d]> Requires the client to retry with different layouts. I assume AI/GS can fund industries, so their API needs to stay the same.
15:35:03 <peter1138[d]> Problem with make the client choose a layout is the number is meaningless unless you can see what the layout will look like.
15:36:11 *** greeter has quit IRC (Ping timeout: 480 seconds)
15:36:14 <peter1138[d]> And for industries that use callbacks to determine what to draw on each tile (i.e. everything forked from FIRS), that gets painful.
15:36:55 *** keoz has quit IRC (Ping timeout: 480 seconds)
15:37:40 <peter1138[d]> Authors like to invoke edge-cases π
15:38:02 <andythenorth> build them all in a copy of the map, screenshot them, mask out the ground π
15:38:09 <andythenorth> like airports, but run time
15:38:39 <andythenorth> obvs, it would have to account for things like snowline and desert and coast behaviour π
15:39:24 <locosage> it can use a real map, industry objects are the one that need faking
15:40:39 *** greeter has joined #openttd
15:41:14 <locosage> don't remember what I did for nearby vars though
15:41:50 <_glx_> peter1138[d]: API is really simple, you give industrytype and tile
15:44:31 <_glx_> and the API tries a random layout
15:45:57 <locosage> but it will cycle and try another layout if that one fails
15:46:31 <_glx_> yeah I think it's the initial layout
15:46:36 <locosage> oh, btw, and iirc it's not building the requested layout first, it builds the next one xD
15:46:49 <locosage> there was some erroneous +1 somewhere
15:47:13 <_glx_> doesn't really matter as it looks random π
15:47:47 <peter1138[d]> Not erroneous, it just increments before it tries instead of after.
15:47:58 <locosage> well, it's kinda important for preserving compatibility
15:48:01 <peter1138[d]> It's... one way of doing it.
15:48:29 <locosage> well, yeah, but for gs all layouts end up cycled by one
15:48:35 <locosage> pretty weird if you ask me :p
15:49:42 <_glx_> scripts don't care about layouts, they have no idea about layout existence
15:50:44 <locosage> it's not impossible for script to rely on certain order of vanilla layouts
15:51:02 <locosage> not sure if simple cb does that but it could
15:51:38 <peter1138[d]> It can because it doesn't get to chose the layout.
15:53:34 <locosage> ah, right, it's randomized before the command
15:54:27 <peter1138[d]> Funding industries is weird anyway.
15:55:43 <peter1138[d]> Hmm, original TTD uses a 4x4 tile highlight.
15:56:16 <locosage> doesn't make any more sense than 1x1
15:58:13 <peter1138[d]> I don't have s savegame with enough cash to actually see what it builds.
15:58:33 <locosage> ctrl+alt+c to the rescue ;)
15:59:14 <locosage> oh, in original game though
16:01:24 <locosage> wonder if I still have my original saves somewhere...
16:12:18 <peter1138[d]> I guess this makes placing water towers a bit easier.
16:12:36 *** Wormnest has joined #openttd
16:18:16 *** keikoz1 has quit IRC (Ping timeout: 480 seconds)
16:33:40 *** keikoz has quit IRC (Ping timeout: 480 seconds)
17:30:17 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
17:30:20 *** WormnestAndroid has joined #openttd
19:59:08 *** toktik has quit IRC (Remote host closed the connection)
20:46:12 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
21:31:05 *** keoz has quit IRC (Ping timeout: 480 seconds)
21:46:48 *** ChanServ sets mode: +v tokai
21:54:00 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
22:33:14 <locosage> ugh, all these c++ standards and they still haven't fixed covariant return types for smart pointers?
22:36:58 <dwfreed> those are certainly words
22:38:38 <locosage> they're googleable :p
22:39:30 <locosage> there are some solutions but they way more stuff than raw pointers
22:47:35 *** guru3_ has quit IRC (Ping timeout: 480 seconds)
23:06:29 *** dh1 has quit IRC (Ping timeout: 480 seconds)
23:20:04 *** Wormnest has quit IRC (Read error: Connection reset by peer)
continue to next day β΅