IRC logs for #openttd on OFTC at 2024-08-16
            
02:14:59 *** D-HUND has joined #openttd
02:18:19 *** debdog has quit IRC (Ping timeout: 480 seconds)
02:51:45 *** gnu_jj has joined #openttd
02:54:54 *** gnu_jj_ has quit IRC (Ping timeout: 480 seconds)
03:42:35 *** Flygon has joined #openttd
04:29:32 *** keikoz has joined #openttd
04:42:57 <DorpsGek> [OpenTTD/OpenTTD] eints-sync[bot] pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/73cb7cd7df8613fa9700cca5164d50b9e9caa1a8
04:42:58 <DorpsGek> - Update: Translations from eints (by translators)
05:53:09 *** SigHunter_ has joined #openttd
05:55:41 *** SigHunter has quit IRC (Ping timeout: 480 seconds)
05:57:48 *** SigHunter_ has quit IRC (Remote host closed the connection)
05:58:49 *** SigHunter has joined #openttd
06:15:00 *** Wolf01 has joined #openttd
07:08:19 <peter1138> locosage: grf-py/grf/sprites.py:52 seems like it might be wrong. image vs img
07:41:03 <locosage> Yeah, ty
07:41:14 <locosage> I'll fix it when I get to pc
13:58:28 *** HerzogDeXtEr has joined #openttd
14:17:32 *** keikoz has quit IRC ()
14:20:08 *** keikoz has joined #openttd
14:42:50 *** miloje357 has joined #openttd
14:54:09 *** miloje357 has quit IRC (Quit: Page closed)
15:45:29 *** Ox7C5 has quit IRC (Ping timeout: 480 seconds)
16:09:42 *** APTX_ has joined #openttd
16:11:00 *** APTX has quit IRC (Ping timeout: 480 seconds)
16:29:31 *** PietroBR has joined #openttd
16:34:37 <PietroBR> Feature suggestion: 'Load cargo (ignore own transfers)' for when, for example, you want a train to transfer cargo to a station and load other transferred cargo that's in that station, ignoring what it transferred.
16:38:53 <_pruple> sounds like you want to turn on cargodist
16:44:23 <PietroBR> How can I do that?
16:49:54 <_pruple> settings > environment > cargo distribution, change the distribution modes
16:58:21 <PietroBR> Alright, now what do I do to have cargo going back and forth? I've tried setting the busses in both towns to transfer only TO the station, and the train connecting the towns to transfer at both stations, but that didn't work
16:59:04 <_pruple> if cargodist is on you don't need transfer orders, it all happens semi-magically
17:00:40 *** emperorjake has joined #openttd
17:00:40 <emperorjake> /cargodist
17:00:44 *** D-HUND is now known as debdog
17:01:03 <emperorjake> don't know how well that translates into IRC 🙂
17:01:42 <PietroBR> Oh this feature is gonna revolutionize my networks
17:01:46 <PietroBR> Thank you
17:11:11 *** PietroBR has quit IRC (Quit: Going offline, see ya! (www.adiirc.com))
17:27:31 *** gelignite has joined #openttd
17:41:07 *** Heiki has joined #openttd
18:35:55 <DorpsGek> [OpenTTD/OpenTTD] PikkaBird opened issue #12900: [Bug]: ctrl-building an airport with tile gaps does not open the "join station" window if an existing station is inside the airport footprint https://github.com/OpenTTD/OpenTTD/issues/12900
19:00:26 *** Tirili has joined #openttd
19:01:59 <_glx_> That's a funny one
19:05:54 <_pruple> I aim to amuse 🙂
19:10:32 <_glx_> the hole in this position also has nice effect for AIs, as it's the airport location, but it's not an airport tile
19:10:49 <_pruple> 😄
19:12:53 <_glx_> I think the search for adjacent stations exclude the airport rectangle
19:20:23 <_pruple> _glx_: I don't think most/any AIs understand newgrf airports anyway
19:20:55 <_glx_> vanilla helistation is already an issue for them, as northern tile is a hangar
19:22:49 *** Flygon has quit IRC (Read error: Connection reset by peer)
19:28:53 <peter1138> The script API for airports is pretty broken.
20:20:07 <verzide68> i was hoping i could search on how road placement works, but after i saw 2632 lines... that's not happening.
20:20:42 <talltyler> Town growth is a bit of a mess 🙂
20:22:57 <verzide68> i can't even find the scripts i need, the whole game is a mess
20:23:08 <verzide68> i type road in and it shows 30 different things
20:23:34 <gwyd4016> It's a complex game
20:23:59 <verzide68> my brain is too small for it i guess
20:25:21 <gwyd4016> Mine certainly is
20:26:37 <talltyler> What are you trying to do? I can point you to the right file 🙂
20:26:52 <verzide68> i'm not even sure anymore
20:28:22 <verzide68> i was trying to make something like the road placement in ttd
20:28:59 <verzide68> i can't figure out how roadbits work at all
20:29:41 <verzide68> mostly because i'm too sleepy to read and comprehend it
20:39:52 <talltyler> Player-built roads or town-built roads?
20:42:24 <peter1138> What does "trying to make" mean?
20:46:16 <locosage> there are worse parts in openttd code than town growth xD
20:47:51 <verzide68> talltyler: player built
20:49:38 <verzide68> peter1138: meaning i'm trying to remake it in c# at least part of it, no reason to I've just been wanting to do it for a while
20:51:15 <peter1138> Okay, then step 1 is probably to completely ignore any code OpenTTD does, because it's all stuck with legacies and limitations...
20:51:42 <verzide68> problem is I have no idea how to do it
20:52:20 <verzide68> trust me i've tried like 3 times
20:52:34 <verzide68> i can get single type placement to work
20:52:46 <verzide68> but nothing else
20:53:44 <verzide68> since you have these weird things where if you drag over a straight road facing the other direction it turns into a crossroad, how am i supposed to code that in for every single road type?
20:55:12 <verzide68> if i try to do that i'd make 64 different if statements with their own checks
20:57:30 <peter1138> What are you calling a "road type" here?
20:57:43 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
20:57:50 <verzide68> the 16 different options for a road tile including removing it
20:57:52 <locosage> roadbits combination I guess
20:59:06 <peter1138> Bitmasks are useful.
20:59:45 <peter1138> (Well, useful if you actually want to limit yourself to OpenTTD's road system style)
21:00:11 <locosage> <https://pastebin.com/3KcZ5ehv>
21:00:22 <locosage> from my js townsim
21:00:51 <peter1138> Ah yes, very clear :p
21:02:09 <locosage> well, js isn't the clearest language :p
21:02:28 <locosage> especially when you write it thinking python xD
21:03:06 <verzide68> locosage: i don't understand anything xD
21:03:58 <verzide68> this.modified = true; i wonder what the hell this does
21:04:05 <locosage> well, basically it just loops tiles of the road and adds road bits xD
21:04:32 <verzide68> dx and dy is this math or what
21:04:46 <locosage> modified is irrelevant for road building, it just marks road layout as modified in the ui
21:06:23 <verzide68> i'm falling asleep so i'll look at it tmr when i can actually understand
21:06:44 <peter1138> So in OpenTTD there are 16 possible combinations of road pieces on one tile.
21:06:54 <peter1138> (Not 64)
21:07:03 <verzide68> verzide68: .
21:07:56 <verzide68> peter1138: not sure how i decided that number but i'd still need to check every single tile it goes over if i do with what i know
21:07:57 <peter1138> Each road piece is represented by 1 bit in the RoadBits value.
21:08:37 <peter1138> There are only 4 different roads leading away from the centre of the tile.
21:08:42 <peter1138> NW, NE, SE and SW.
21:09:27 <peter1138> If the bit for NW is set then it's a road that joins to the next tile in that direction.
21:09:54 <peter1138> if NW and NE are set then you have a curve joining the NW and NE sides.
21:10:11 <peter1138> if NW and SE are set, you have a straight piece from NW to NE.
21:10:26 <peter1138> 3 bits gives you a T junction, and all 4 bits set gives you a crossroads.
21:10:48 <peter1138> To set the state of these bits you don't need to do any math, you just need to bit-wise set or clear individual bits.
21:11:45 <peter1138> to build a long road from NW to NE spanning several tiles, you just need to take the current road piece information, set the bits for NW and NE, and write it back.
21:12:04 <peter1138> Er, NW to SE
21:14:10 <peter1138> You don't need to test all sorts of combinations, you just need to set the appropriate bits. If it's already set then nothing changes.
21:14:32 <peter1138> Now, whether you should do it this way is another matter.
21:16:16 <verzide68> the goal is to make the same road management system so i don't see why not
21:16:50 <peter1138> There are of course other things to consider when you get down to it.
21:17:13 <peter1138> Slopes
21:17:21 <peter1138> Railway track
21:17:25 <verzide68> i decided not to do that ...
21:17:35 <verzide68> it's too complicated if i can't even do a simple road
21:18:09 <verzide68> why does a road have to be the hard part, i've spent like 5h on just that
21:19:16 <verzide68> granted it's probably my coding skill is just awful
21:21:20 <verzide68> alright thanks for the much needed help, I have to go get some sleep, goodnight.
21:22:09 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:45:27 *** tokai|noir has joined #openttd
21:45:27 *** ChanServ sets mode: +v tokai|noir
21:52:19 *** tokai has quit IRC (Ping timeout: 480 seconds)
21:52:20 <DorpsGek> [OpenTTD/OpenTTD] audigex commented on discussion #12886: Push-pull: What if trains could back up? https://github.com/OpenTTD/OpenTTD/discussions/12886
22:10:54 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:27:54 *** gelignite has quit IRC (Quit: Stay safe!)