IRC logs for #openttd on OFTC at 2022-06-21
⏴ go to previous day
02:34:25 *** Wormnest has quit IRC (Quit: Leaving)
02:35:41 *** Joel has quit IRC (Ping timeout: 480 seconds)
02:37:15 *** debdog has quit IRC (Ping timeout: 480 seconds)
02:40:38 *** Tirili has quit IRC (Quit: Leaving)
03:57:16 *** Smedles has joined #openttd
05:09:27 *** andythenorth has joined #openttd
06:46:02 *** D-HUND is now known as debdog
06:56:44 *** sla_ro|master has joined #openttd
07:34:32 *** esselfe has quit IRC (Quit: rebooting)
07:40:37 *** esselfe has joined #openttd
08:16:57 *** andythenorth_ has joined #openttd
08:23:40 *** andythenorth has quit IRC (Ping timeout: 480 seconds)
09:00:15 *** Samu_ has quit IRC (Quit: Leaving)
09:26:28 <FLHerne> Joel: probably have each name end in {STRING}, have STR_COST and STR_COST_CAN_T_AFFORD, sub one or the other in as appropriate
09:27:07 <FLHerne> not sure if using red for things the player can't afford fits any existing UI convention though
09:27:13 <FLHerne> not that it's particularly consistent
09:27:24 <FLHerne> it mostly just uses red to highlight costs in general
09:30:25 <Joel> So do you think having the option greyed out is sufficient by itself, and just keep the cost colouring the same as always?
09:33:55 <FLHerne> I can't go looking at the existing UIs right now, maybe later
09:37:26 *** Montana_ has joined #openttd
09:58:18 *** Montana_ has quit IRC (Remote host closed the connection)
09:58:26 *** Montana_ has joined #openttd
10:34:59 <Samu> i'm trying to understand the vehicle length issue
10:35:33 <Samu> do you know any newgrf that changes vehicle lengths
11:13:35 *** andythenorth_ has quit IRC (Quit: andythenorth_)
12:05:10 <peter1138> Samu, which bit are you not understanding?
12:12:29 <Samu> was wondering why isn't it possible to get length of an engine, before i buy it
12:13:57 <Samu> i tried to look into the code, and i see newgrf callback stuffs on vehichle lengths, and i gave up
12:19:45 *** wallabra_ has quit IRC (Ping timeout: 480 seconds)
12:22:02 <Samu> really want to try avoid building depots to build test vehicles just to get their length
12:28:21 *** Etua has quit IRC (Quit: Etua)
12:29:28 <glx> length is an engine property overridable by vehicle CB36
12:30:42 <Joel> glx: Just seen what you said about disabling in settings, fixing that now. I can't for the life of me figure out the pushing and popping colours.
12:31:37 <peter1138> Can you query other CB36-variable properties in the AI side?
12:31:38 <FLHerne> Samu: because it's a callback, length can in principle change depending on what else is in the train
12:32:11 <FLHerne> I think UKRS2's autotrains probably demonstrate that
12:32:33 <FLHerne> maybe it's in UKRS2+ actualy
12:33:01 <glx> Joel: yes the push/pop use looks correct
12:34:06 <FLHerne> but if you place pannier tank - clerestory carriage - clerestory carriage, it'll change to (visually) autocoach - pannier tank - autocoach
12:34:53 <FLHerne> where the leading vehicle is actually still the tank engine, but with its length and appearance changed to that of an autocoach
12:36:09 <glx> there's also some trams using liveries for 3 or 4 parts (but still are actually 4 parts with a 0 length one) IIRC
12:38:43 <peter1138> Engine power can also be changed by varaction, but you are able to query for engine power from AI-land.
12:40:25 <Samu> i see it in-game, wondering what happens in code
12:45:28 <peter1138> It's not shown in-game, so...
12:45:49 *** sla_ro|master has quit IRC ()
12:48:20 <glx> indeed AI only get info also available to players
12:50:38 <glx> and a player knows the lenght visually in the depot (similar to AIVehicle.GetLength())
13:25:43 <glx> Joel: your removed some info from the advertising descriptions
13:26:29 <Joel> Crap again, yep on moment
13:30:44 <Samu> funny, when i attach the 3rd piece, the clerestory carriage to pannier tank - clerestory carriage, the first one changes size from 5 to 7
13:32:01 *** virtualrandomnumber has joined #openttd
13:32:21 *** virtualrandomnumber has quit IRC (Remote host closed the connection)
13:34:09 <Samu> now i expect the 2nd piece to change from 7 to 5 let's see
14:07:06 <glx> Joel: the deduplication seems to work fine in the preview
14:11:09 <Joel__> glx: Perfect! Not sure why, but I'll take it
14:17:36 *** Joel has quit IRC (Ping timeout: 480 seconds)
14:24:55 *** sla_ro|master has joined #openttd
14:36:27 <FLHerne> Samu: yes, that's what I said
14:40:59 <glx> might be a bigger change, but caching available actions could simplify a lot
14:54:53 <Joel__> It could be a bigger change, but I think it is the right way to do it. I was unaware of that event handler so I'll do some research into that and implement
14:56:57 <glx> of course enabled state determination won't change
14:58:45 <glx> but could use HasBit(cached_value, i) in the loop instead of bitand at the end
15:00:49 <Joel__> Yes that would fix the nump issue, but if the nump value is useless and I remove it, would a bitand of the cached mask and the available actions be faster then repeated calls to HasBit?
15:01:10 <glx> DrawActions could also use it
15:01:30 <glx> without nump anding is better
15:02:42 <glx> but for DrawActions one HasBit is clearly better than 4 FindLastBit
15:12:41 <Samu> anyone familiar with UKRS2+? does Electrostar with High-Speed Carriage make sense?
15:12:48 <Samu> for transporting passengers
15:13:44 <FLHerne> Samu: most UKRS2 multiple units allow you to add carriages to vary the formation length
15:14:07 <FLHerne> in real life there are Electrostars with 3, 4 or 5 cars
15:19:35 <FLHerne> related to length, I think the '60s diesel multiple unit trailers are shorter than the normal version of the standard carriage
15:20:06 <FLHerne> Eurostar trailers are definitely shorter than a normal high-speed carriage
15:26:54 *** andythenorth has joined #openttd
15:36:39 <Samu> so my functions that try to get the best possible engine/wagons for transporting passengers was electrostar and 4 high-speed carriages
15:37:03 <Samu> platform length is 3 tiles
15:37:45 *** gelignite has joined #openttd
15:41:03 <Samu> with 4 passenger carriages
15:51:15 *** Joel__ has quit IRC (Ping timeout: 480 seconds)
15:54:46 <peter1138> When you make an AI that choses consists based on how cool they look let me know :D
16:08:18 *** Montana_ has quit IRC (Quit: Leaving)
16:10:58 <Samu> wow, these rules make it so annoying
16:11:41 <Samu> can only haul Mail Carriages
16:12:14 <Samu> this makes it so complex for AI creators
16:12:47 <glx> you can't know without trying to attach I think
16:14:14 <Samu> so i need more logic to determine what pulls what
16:14:17 <nielsm> it would kind of make sense for train grf's to supply some kind of "suggested consists" for each engine
16:14:41 <Samu> like force test attaching
16:15:02 <nielsm> probably with some kind of basic rules for n-m repeats of wagons in the consist and possibly classes of wagons
16:15:08 <glx> there's engine var 18, but I don't know if it's well supported
16:15:21 <nielsm> but that ofc won't solve the issue of all the existing newgrfs
16:16:16 <nielsm> the alternative would be to have the AI have a database of specific newgrf's and vehicles it knows how to use
16:16:33 <nielsm> and only try to invent its own consists for things not in the database
16:16:49 <glx> probably easier yes, since AI can read newgrf IDs
16:20:14 <glx> oh for fun you could also have dbset, and the "MORE" overlay and start/stop callback
16:20:39 <glx> attach more wagons until allowed to start
16:21:12 *** joel has quit IRC (Remote host closed the connection)
16:21:17 <glx> in conjonction with the can attach callback IIRC
16:35:19 *** Smedles has joined #openttd
16:36:18 *** andythenorth_ has joined #openttd
16:40:57 <FLHerne> at least UKRS2 doesn't force AIs to use brake vans
16:43:05 *** andythenorth has quit IRC (Ping timeout: 480 seconds)
16:43:30 *** Joel__ has quit IRC (Ping timeout: 480 seconds)
16:45:37 <andythenorth_> we should do grf 2.0
16:46:05 * andythenorth_ may be doing narrow-minded thinking here :P
17:05:52 <FLHerne> I like most of the things UKRS2 does with it
17:06:24 <FLHerne> Some way to make it more discoverable without blindly trying to place everything would be nice
17:09:57 <TrueBrain> Ha, I am eligible for a free GitHub Copilot account .. guess OpenTTD helped there :p
17:24:13 *** Wormnest has joined #openttd
17:36:37 <andythenorth_> Horse IDs: now up to 9040
17:36:47 <andythenorth_> gonna hit the articulated vehicle cap :P
17:36:57 <andythenorth_> they go up in increments of 10
17:44:35 <Eddi|zuHause> articulated cap is 16k
17:47:34 <andythenorth_> 2 more rosters of similar or large size
17:47:49 <andythenorth_> the compile knows which vehicles are articulated :P
17:48:19 <andythenorth_> I could just do `id = 65535 - id` for non-articulated vehicles
17:48:27 <andythenorth_> I'm sure that isn't fragile or weird :P
18:16:08 <Samu> im brute force testing if all wagon types can attach to all engine types, it's so slow
18:16:47 <Samu> getting all tests done, that is, and im not even testing all cargo types, just pass and mail
18:17:39 <andythenorth_> Iron Horse has 675 wagons and 152 engines :)
18:18:15 <andythenorth_> and can refit with FIRS to 48 cargos
18:24:47 *** Wormnest_ has joined #openttd
18:24:56 *** Wormnest has quit IRC (Read error: Connection reset by peer)
18:39:31 *** Wormnest_ has quit IRC (Read error: Connection reset by peer)
18:39:45 *** Wormnest_ has joined #openttd
18:43:36 <Samu> in the meanwhile, the best mail engine/wagon combo is NER EF1 with 6 Mail Carriages, on UKRS2+
18:47:31 <DorpsGek> - Update: Translations from eints (by translators)
18:57:13 <Samu> Iron Horse 2, best passenger combo is Driver Trailer with 5 * Railcar Trailer
18:57:30 <Samu> and took 6 years to come up with that
18:58:49 <andythenorth_> tha is a lolz combination
18:59:04 <andythenorth_> what are the criteria? :P
18:59:36 <Samu> platform lenght is 3 tiles only
18:59:59 <andythenorth_> is it optimising for running cost?
19:00:19 <Samu> it assumes max speed and assumes max load
19:01:13 <Samu> ah, i don't get that into account
19:01:24 <Samu> i just don't know how to
19:05:49 *** esselfe has quit IRC (Remote host closed the connection)
19:07:36 <Samu> Driving Van Trailer with 4x Sliding Wall Van (Twin), 316 Mail Capacity
19:10:09 <Samu> hmm this capacity seems off
19:11:21 <Samu> capacity is 66, but i assume this is an articulated part
19:11:51 <Samu> openttd doesn't even get capacities right
19:12:30 <glx> capacities for engines are hard
19:13:04 <glx> may depend on cargo type too
19:15:38 <Samu> i used AIEngine.GetCapacity, if im not mistaken, my code is already so complex because of these shortcomings
19:16:35 <Samu> oh i see, it got the capacity for the default cargo which is goods
19:16:55 <Samu> 66 for goods, 132 for mail
19:17:03 <Samu> i wanted the refited capacity
19:17:05 <glx> should be simpler to check the newgrf list and use predefined consist types
19:19:13 <Samu> really wanted to avoid doing force build tests.. :(
19:25:37 <Samu> pff, imagine building a temporary airport to get capacities of aircraft... oh jesus :(
19:30:49 *** ChanServ sets mode: +v tokai
19:37:40 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
19:42:13 *** wallabra has joined #openttd
19:48:09 <Samu> alright, got capacity right now
19:48:25 <Samu> Driving Van Trailer with 4x Sliding Wall Van (Twin), 580 Mail Capacity
19:50:31 <Samu> that's a lot for a 3 tile sized train
20:06:04 *** gelignite has quit IRC (Quit: Stay safe!)
20:07:20 *** Smedles has joined #openttd
20:08:42 *** Flygon has quit IRC (Read error: Connection reset by peer)
20:31:14 <Samu> how do I compute time in days needed to reach maximum possible speed given weight, max tractive effort and power? what's the math involved in this, I'm noob
20:39:00 *** esselfe has joined #openttd
20:48:08 <Samu> weight is the weight when empty t.t :(
20:48:28 <Samu> I'm more interested in weight when full
20:51:00 *** nielsm has quit IRC (Ping timeout: 480 seconds)
20:51:48 *** HerzogDeXtEr1 has quit IRC (Read error: Connection reset by peer)
21:19:09 <Samu> well well, wagons have no power
21:19:25 <andythenorth_> so I missed that prop 25 can be set by cb 36
21:21:09 <Samu> andythenorth_, do wagons have power? AI API says no, but just want to confirm
21:21:31 <andythenorth_> mostly no, because they're wagons
21:21:42 <andythenorth_> and one definition of 'wagon' in OpenTTD is 'no power'
21:21:49 <andythenorth_> but that's changeable with cb36
21:22:32 <andythenorth_> and also there's a 'powered wagons' concept in grf
21:23:11 <andythenorth_> Samu also for calculations, read the vehicle physics in ground_vehicle.cpp, then work backwards to get the days
21:30:54 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
21:31:29 *** agneli has quit IRC (Remote host closed the connection)
22:04:51 *** Samu has quit IRC (Quit: Leaving)
22:11:28 *** sla_ro|master has quit IRC ()
22:38:02 *** andythenorth_ has quit IRC (Quit: andythenorth_)
22:55:05 *** wallabra has quit IRC (Ping timeout: 480 seconds)
continue to next day ⏵