IRC logs for #openttd on OFTC at 2026-02-10
⏴ go to previous day
00:51:35 *** eilonlipton5365 has quit IRC (Quit: User went offline on Discord a while ago)
01:38:11 *** MinchinWeb[m] has quit IRC (Read error: Connection reset by peer)
01:38:28 *** MinchinWeb[m] has joined #openttd
02:52:25 *** Wormnest has quit IRC (Quit: Leaving)
04:05:00 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
04:05:01 *** WormnestAndroid has joined #openttd
04:05:13 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
04:05:14 *** WormnestAndroid has joined #openttd
04:05:20 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
04:05:21 *** WormnestAndroid has joined #openttd
04:09:29 *** TinoDid|znc has joined #openttd
04:09:36 *** FLHerne_ has joined #openttd
04:10:41 *** urdh_ has quit IRC (Read error: Connection reset by peer)
04:10:41 *** TinoDidriksen has quit IRC (Write error: connection closed)
04:10:51 *** FLHerne has quit IRC (Read error: Connection reset by peer)
04:11:41 *** dihedral has quit IRC (Ping timeout: 480 seconds)
04:14:01 *** f_ has quit IRC (Ping timeout: 480 seconds)
04:18:41 *** Webster has quit IRC (Ping timeout: 480 seconds)
04:25:33 *** Zathras_11 has joined #openttd
04:25:44 *** Zathras_1 has joined #openttd
04:29:05 *** Zathras_4 has quit IRC (Ping timeout: 480 seconds)
04:29:10 *** Zathras_7 has quit IRC (Ping timeout: 480 seconds)
05:14:56 <DorpsGek> - Update: Translations from eints (by translators)
07:06:35 *** MinchinWeb[m] has quit IRC (Remote host closed the connection)
07:06:35 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
07:06:47 *** WormnestAndroid has joined #openttd
07:07:00 *** MinchinWeb[m] has joined #openttd
07:24:07 *** Smedles has joined #openttd
07:25:37 *** Smedles_ has joined #openttd
07:25:51 *** Smedles__ has quit IRC (Read error: Connection reset by peer)
07:31:46 *** Smedles__ has joined #openttd
07:32:46 *** Smedles___ has joined #openttd
07:32:57 *** Smedles has quit IRC (Ping timeout: 480 seconds)
07:34:56 *** Smedles_ has quit IRC (Ping timeout: 480 seconds)
07:40:06 *** Smedles__ has quit IRC (Ping timeout: 480 seconds)
07:45:25 <hazardaj_nombroj> translation question: would it be okay to come up with shorter synonyms for terms in the minimap legend, so that the map window doesn't get to be so wide? (apparently its width is determined by maximum length of legend items and changes based on language)
07:47:31 <hazardaj_nombroj> like, if there's one word that could describe both helipads and airports
08:31:33 <keimfrei> One questions to the Modding-DEVs
08:31:33 <keimfrei> This is a very old 2CC train modification 10-12 years old. A special feature is, for example, the animated coupling rod of the 4-8-8-4 Bigboy. Does anyone know of a newer mod version with animated steam locomotives? The Bigboy absolutely must be included.
08:32:11 <LordAro> hazardaj_nombroj: i see no issue with that. only thing to watch out for is if the string is shared by anything else (but practically those should be changed anyway)
08:34:35 <hazardaj_nombroj> to be fair, some of that is the game's fault, like regardless of localization helipads are treated as a kind of airport
08:35:06 <LordAro> eh, real life's fault
08:35:21 <LordAro> all (commercial) helipads will be treated fairly similar to airports
08:39:28 <belajalilija> keimfrei: You need Discord channel #add-on-development
08:52:34 <peter1138> I hear they're expanding the age verification to everywhere.
09:05:53 <emperorjake> keimfrei: Did you try the 2cc yrains in NML? It's a much more modern recode of the old 2cc set and most engines have animated rods. Also, most GRF devs hang out on Discord channel #add-on-development
09:07:48 <belajalilija> peter1138: Looks like it yeah, i didn’t notice it until quite recently, if you’re not looking at nsfw stuff you probably won’t either
09:14:03 *** Flygon has quit IRC (Remote host closed the connection)
09:21:28 <keimfrei> ok i will reposte it 🙂
10:47:15 <peter1138> `for (const TileIndex &tile : st->train_station) if (st->TileBelongsToRailStation(tile)) ++area;`
10:47:21 <peter1138> Does that meet our coding standards?
10:47:45 <peter1138> If it was just one "nesting", perhaps.
10:47:55 <LordAro> no nesting allowed :)
10:53:44 <Rubidium> not having even tried it, but: `area = std::ranges::count_if(st->train_station, st::TileBelongsToRailStation);` (after all, it's a range-based for loop... so isn't the thing you're passing implicitly a range?)
11:11:50 *** MinchinWeb[m] has quit IRC (Ping timeout: 480 seconds)
11:12:05 *** MinchinWeb[m] has joined #openttd
11:25:44 <xarick> oh, i found a "maybe-not-a-bug" about AddRectangle
11:29:02 <xarick> WrightAI is attempting to Add a rectangle:
11:29:02 <xarick> `list.AddRectangle(tile - AIMap.GetTileIndex(15, 15), tile + AIMap.GetTileIndex(15, 15));`
11:29:26 <xarick> tile is the tile at the center of the town
11:29:39 <xarick> tile + (15, 15) goes outside the map
11:30:01 <xarick> precondition fails, but the script keeps running, i dunno with what tiles
11:34:05 <xarick> oh, it gets these tiles:
11:34:52 <xarick> should be getting a rectangle covering the town with the arrow
11:35:43 <xarick> precondition didn't fail I guess
11:39:58 <peter1138> If that's the intended way to add to a tile index, it's never going to work :/
11:45:39 <peter1138> Hmm, is TileIndex somehow a thing inside scripts, or is it an SQInteger?
11:49:40 <peter1138> Yeah, just SQIntegers.
11:50:26 <peter1138> So the script has to manually check that tile is more than 15 tiles from the edge before adding 15, 15.
12:30:15 <xarick> for each successful route built, wrightai waits less time to build the next
12:30:35 <xarick> if it fails, it waits more
12:31:39 <xarick> this.delay_build_airport_route can become 0
12:31:52 <xarick> he starts spamming routes at that point :)
12:37:35 *** TinoDid|znc is now known as TinoDidriksen
13:44:02 <xarick> small advertisement campaigns don't work?
13:46:53 <xarick> am i using the wrong distance?
13:56:45 <xarick> oh, it's maybe a bug in my AI
14:07:35 <xarick> yep, it was a me problem, fixed it
14:22:18 *** sofiedotcafe has joined #openttd
14:22:18 <sofiedotcafe> how is the id in the mod file name generated?
14:22:23 <sofiedotcafe> or is this taken from the api?
14:24:17 <sofiedotcafe> for example, take
14:24:17 <sofiedotcafe> "content_type": 3,
14:24:17 <sofiedotcafe> "content_id": 10884238,
14:24:17 <sofiedotcafe> "filesize": 72774,
14:24:18 <sofiedotcafe> "name": "AdmiralAI",
14:24:18 <sofiedotcafe> "version": "25",
14:24:20 <sofiedotcafe> "description": "AdmiralAI is an AI that tries to implement as many features from the API as possible. Currently it supports trains, road vehicles (including trams) and planes. One of the main goals is to make an AI that is fun to play against. I've tried to do this by making it play varied (using several types of transport).",
14:24:22 <sofiedotcafe> "unique_id": 1280132161,
14:24:22 <sofiedotcafe> "md5": "4ccd92fb8f8f01045145be99a28e14a6",
14:24:28 <sofiedotcafe> ``` This is from the bananas TCP api
14:24:30 <sofiedotcafe> The file name is
14:24:32 <sofiedotcafe> `41444d4c-AdmiralAI-25.tar`
14:24:39 <sofiedotcafe> Where does 41444d4c come from?
14:25:03 <sofiedotcafe> or is it from the http api
14:28:22 <rito12_51026> Rubidium: > error: ‘st’ is not a class, namespace, or enumeration
14:28:22 <rito12_51026> But if I use lambda it fails too:
14:28:22 <rito12_51026> > /usr/include/c++/12/bits/ranges_algo.h:331:7: note: template argument deduction/substitution failed:
14:28:22 <rito12_51026> > /usr/include/c++/12/bits/ranges_algo.h:331:7: note: constraints not satisfied
14:28:22 <rito12_51026> > In file included from /usr/include/c++/12/bits/ranges_algobase.h:39,
14:28:24 <rito12_51026> > from /usr/include/c++/12/bits/ranges_algo.h:35:
14:28:24 <rito12_51026> > /usr/include/c++/12/bits/ranges_base.h: In substitution of ‘template<class _Range, class _Proj, class _Pred> requires (input_range<_Range>) && (indirect_unary_predicate<_Pred, std::projected<decltype(std::ranges::__cust_access::__begin((declval<_Container&>)())), _Proj> >) constexpr std::ranges::range_difference_t<_Range> std::ranges::__count_if_fn::operator()(_Range&&, _Pred, _Proj) const
14:28:26 <rito12_51026> [with _Range = const OrthogonalTileArea&; _Proj = std::identity; _Pred = StationResolverObject::ResolveReal(const RealSpriteGroup&) const::<lambda(auto:73)>]’:
14:28:26 <rito12_51026> > /home/cyprian/openTTD/OpenTTD_SourceCode/src/newgrf_station.cpp:543:33: required from here
14:28:28 <rito12_51026> > /usr/include/c++/12/bits/ranges_base.h:583:13: required for the satisfaction of ‘range<_Tp>’ [with _Tp = const OrthogonalTileArea&]
14:28:28 <rito12_51026> > /usr/include/c++/12/bits/ranges_base.h:661:13: required for the satisfaction of ‘input_range<_Range>’ [with _Range = const OrthogonalTileArea&]
14:28:30 <rito12_51026> > /usr/include/c++/12/bits/ranges_base.h:583:21: in requirements with ‘_Tp& __t’ [with _Tp = const OrthogonalTileArea&]
14:28:30 <rito12_51026> > /usr/include/c++/12/bits/ranges_base.h:585:22: note: the required expression ‘std::ranges::__cust::begin(__t)’ is invalid
14:28:32 <rito12_51026> > 585 | ranges::begin(__t);
14:28:32 <rito12_51026> > | ~~~~~~~~~~~~~^~~~~
14:28:32 <sofiedotcafe> LordAro: ah, its in the url
14:28:34 <rito12_51026> > /usr/include/c++/12/bits/ranges_base.h:586:20: note: the required expression ‘std::ranges::__cust::end(__t)’ is invalid
14:28:34 <rito12_51026> > 586 | ranges::end(__t);
14:28:36 <rito12_51026> > | ~~~~~~~~~~~^~~~~
14:29:04 <sofiedotcafe> I think its partial
14:29:44 <peter1138> rito12_51026, should be BaseStation:: not st::
14:30:11 <peter1138> But I wouldn't be surprised if the tile iterator doesn't do everything correctly enough to be used with std::ranges.
14:30:22 <LordAro> gotta love template errors being pasted into chat
14:30:29 <Rubidium> sofiedotcafe: the 41444d4c is the hex representation of the shortname of that AI, which is in info.nut
14:30:34 <peter1138> Discord users be Discord users.
14:31:06 <LordAro> Rubidium: ah yeah, that's obviously ascii
14:39:18 <Rubidium> though if you're talking about content_id... I'd suggest considering it 'randomly allocated'
14:39:41 <rito12_51026> peter1138: but it is non static function, I have to use either std::bind or lambda, don't I?
14:40:03 <peter1138> I wouldn't worry about it and just use the range-for :)
14:40:41 <peter1138> std::ranges::count_if() is good if it doesn't need a big investment of supporting code.
14:41:19 *** toktik has quit IRC (Remote host closed the connection)
14:46:54 <rito12_51026> LordAro: Does markdown work with IRC?
14:48:01 <talltyler> Nah use a pastebin or GitHub gist to host the code, and link to it
15:03:03 *** toktik has quit IRC (Remote host closed the connection)
15:15:23 *** toktik has quit IRC (Remote host closed the connection)
17:08:52 <xarick> I have a tile_list which contains the best tile spots for airports on each town, and their cargo acceptance as value.
17:08:52 <xarick> I then valuate the distance square to the tile of the other town and keep only the tiles within an interval.
17:08:52 <xarick> However, I need to restore their cargo acceptance after that. How to do this?
17:09:54 <xarick> using KeepList/RemoveList/AddList/etc...
17:27:44 *** Extrems has quit IRC (Ping timeout: 480 seconds)
17:35:24 *** Extrems has joined #openttd
17:49:40 *** Wormnest has joined #openttd
17:54:56 <_glx_> clone the original list, iterate over it, do the test and remove from original if needed
17:55:22 <_glx_> no need to use AddList, Valuate or anything
17:57:16 <_glx_> `AITileList()` + `AddList()` is clone
17:58:15 <Zathras_11> question: should it be possible for a road vehicle to transport cargo in one direction then get refitted and pick up passengers? and if that doesn't work, is it worth a bug report (if that does not exist yet)?
17:58:58 <_glx_> passengers and cargo don't use the same stations
17:59:17 <Zathras_11> I am aware of that
17:59:59 <_glx_> and I don't think any road vehicle can refit to both passengers and cargo
18:00:09 <Zathras_11> I am tryig to add a passenger station into the orders list _after_ it has been refitted.
18:00:40 <mmtunligit> yeah i think if its classed as a truck it just cant go to bus stations
18:01:05 <Zathras_11> it does refit perfectly from food to passengers and back. just adding a passenger station does not work
18:04:38 <mmtunligit> yeah thatd require a patch to change, and will likely generate lots of discussion
18:05:34 <Zathras_11> well, since the tram tracks are visable by default maybe it is worth a trial?
18:07:22 <Zathras_11> sorry, I am not a coder
18:08:37 <LordAro> you're free to raise an issue, though i would think it just as likely to be "fixed" by disallowing such conversions in the first place
18:10:02 <mmtunligit> yeah to me it seems like an oversight in grf spec
18:10:19 <mmtunligit> "no one would ever do this so we never disallowed it"
18:10:36 <dwfreed> yeah, it doesn't seem practical IRL
18:10:46 <Zathras_11> and then comes that stupid dog along and does it
18:11:17 <mmtunligit> i wish you could set truck stops as waypoints for busses (and vice versa) but if it ever bothers me enough ill just do it myself
18:11:18 <Zathras_11> oh, switched my nick from that dog related name
18:12:48 <Zathras_11> hmm, I'll try mail instead....
18:13:22 <Zathras_11> .oO( there must be a way to make cargo trams generate profit somehow )
18:18:55 <andythenorth[d]> cargo trams make money
18:20:34 <Zathras_11> andythenorth[d]: any suggestion for what GRF to use there?
18:21:22 <Zathras_11> right now we're using 2CC Tram Set and 2CC Cargo Trams
18:22:19 <talltyler> Road Hog is quite nice 🙂
18:22:39 <talltyler> Mop’s Generic Road Vehicles is another one I use every game
18:23:47 <Zathras_11> ok, will have a look at them, thanks!
18:25:44 <Zathras_11> in Mop's description it says "...taking advantage of NRT." what does NRT stand for?
18:27:01 <mmtunligit> i think its basically just talking about how the electric vehicles require electrified roads but ive never used that so im not sure
18:30:23 <mmtunligit> i cant think of anything else NRT would stand for in a road vehicle set
18:30:43 <mmtunligit> and i know Mop has non-tram overhead electrified vehicles
18:31:18 <Zathras_11> thanks for your input!
18:45:01 <rito12_51026> _glx_: In PolRoad there is one and I'm able to create working order list where it goes to the depot, refits there to passengers and then go to bus stops, then to the depot again, refits to mail and goes to the truck stops, but when it is refited to cargo then it complains about stations that only have a bus stop and when refited to passengers complains about stations that only have a truck stop.
18:48:26 <mmtunligit> probably because of depot refit instead of refiting at stations working differently but idk if thats how it works or not
18:48:28 <Zathras_11> rito12_51026: that is exactly what happens here as well. well put
18:57:16 <rito12_51026> mmtunligit: refiting at stations works as well, just have to refit the vehicle at the previous station
21:52:38 <mmtunligit> im working on the unit tests for the endian buffer, and im trying to write a test for the encoded strings, but i cant understand the output of the encoded string. when i copy its value from the debugger and convert to hex, the first character is E001 which i cant make heads or tails of as to what the expected output should look like since that doesnt fit in uint8_t
21:53:24 <peter1138> You might have heard of utf-8.
21:53:53 *** gelignite has joined #openttd
22:18:16 *** Flygon has quit IRC (Read error: Connection reset by peer)
22:43:21 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
23:07:52 <_glx_> mmtunligit: `StringControlCode` can help to decipher
23:08:53 <_glx_> E001 is SCC_ENCODED_INTERNAL, which makes sense if it's an encoded string 🙂
23:22:31 <peter1138> orudge, I just found copies of Jingle 1 and Jingle 2 for Zernebok radio...
23:48:56 <xarick> how do i get the days a vehicle takes when traversing a distance at a speed?
continue to next day ⏵