IRC logs for #openttd on OFTC at 2023-02-11
β΄ go to previous day
00:05:08 *** sla_ro|master has quit IRC ()
02:36:32 *** Wormnest has quit IRC (Quit: Leaving)
03:05:34 *** tokai|noir has joined #openttd
03:05:34 *** ChanServ sets mode: +v tokai|noir
03:09:13 *** tokai has quit IRC (Ping timeout: 480 seconds)
04:05:52 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
04:14:33 *** TROILUS4 has joined #openttd
04:14:35 *** TROILUS has quit IRC (Remote host closed the connection)
04:14:36 *** TROILUS4 is now known as TROILUS
04:40:10 *** Flygon has quit IRC (Read error: Connection reset by peer)
08:43:51 <DorpsGek> [OpenTTD/OpenTTD] rubidium42 merged pull request #10459: Fix: [Script] Use Money instead of int32 for presenting the value of a company to AIs and show buy company dialog window even when playing in the AI company https://github.com/OpenTTD/OpenTTD/pull/10459
09:29:11 *** sla_ro|master has joined #openttd
10:57:09 <TrueBrain> nice solution with #10466 glx[d] π
11:28:23 <andythenorth> Hmm GS Loot Boxes
11:28:45 <andythenorth> Use game money, random chance of something fun
11:29:01 <andythenorth> Wonder when that trips gambling laws?
11:31:07 <andythenorth> Industry prospecting is also gambling eh π
11:33:15 <TrueBrain> I am randomly scanning NewGRF to get some metadata out of it .. basically I am now looking how often a feature is used in one of the actions .. so I have one here: industries: 40, cargoes: 49, and .. trains: 1
11:33:26 <TrueBrain> now I wonder what this trains one is .. π
11:38:00 <TrueBrain> lot of them have one action0/2/3 that is for the feature trains .. hmm .. how to find out what that is about π
11:39:49 <osswix> andythenorth: If it has no effect on anything outside the game, it usually is 100% not breaking gambling laws.
11:40:24 <osswix> When actual money gets involved most gambling laws just require transparancy (table of % chances etc) to comply.
11:56:17 *** HerzogDeXtEr has joined #openttd
12:04:16 *** sla_ro|master has quit IRC ()
12:06:39 <Samu> why can't i build in debug mode
12:08:40 <Samu> can only build in release mode, what's happening
12:16:10 *** TROILUS9 has joined #openttd
12:16:20 *** TROILUS has quit IRC (Read error: Connection reset by peer)
12:16:20 *** TROILUS9 is now known as TROILUS
12:25:49 <Samu> loader for zlib is not available?
12:28:24 <glx[d]> No it fails to write pdb
12:28:45 <Samu> i deleved cmake cache or whatever
12:29:30 <Samu> alright, i can build again, nice
12:31:03 <Samu> I still have to manually enter x64-windows-static on VCPKG_TARGET_TRIPLET
12:35:53 <frosch> TrueBrain: how are you scanning them? going by the usual pitfalls, you may have accounted a recolor or sound sprite as train?
12:36:09 <TrueBrain> your `newgrf.py`, and checking the Feature byte in action 0/2/3
12:37:02 <frosch> no idea then, obviously my code is without bugs π
12:37:08 <TrueBrain> `if action == 0x00 or action == 0x03 or action == 0x04: self.features[Feature(feat)] += 1`
12:37:56 <TrueBrain> what would be a good way to find out what those are .. often just a single one .. sometimes a bit more .. hmm
12:38:45 <frosch> dump the whole action to console
12:39:33 <frosch> the "feature" is not important when defining Dxxx strings, so maybe nml just sets it to zero
12:39:44 <frosch> or some other grf author
12:40:04 <frosch> so, we can probably refine the feature counting π
12:40:06 <TrueBrain> `04 00 FF 08 00 "<D0>Production efficiency per " "unit of Wheat: ...`
12:40:15 <TrueBrain> doesn't feel like a train-related string, no π
12:40:44 <frosch> ok, i'll try to fix it π
12:41:05 <TrueBrain> okay, ignoring action 4 is a lot cleaner indeed π
12:41:17 <TrueBrain> nah, nothing you have to do, I am just fiddling with your code π
12:41:26 <TrueBrain> we don't do anything with features atm; and I am wondering if we can
12:41:40 <TrueBrain> basically, I was wondering if we can automatically put NewGRFs in a certain category
12:41:50 <TrueBrain> so the website could show those, instead of the massive list of NewGRFs it currently does
12:42:43 <TrueBrain> some GRFs are just annoying: `TRAINS=116, ROAD_VEHICLES=88, SHIPS=11, AIRCRAFT=41, INDUSTRIES=10`
12:42:47 <TrueBrain> like .. what are you? π
12:44:08 <TrueBrain> `INDUSTRIES=31, HOUSES=25, TRAINS=105, ROAD_VEHICLES=387, SHIPS=49, AIRCRAFT=49, ROADTYPES=7, RAILTYPES=6, CANALS=6`
12:44:14 <TrueBrain> the everything-in-a-single-grf
12:44:38 <frosch> i think there is some feature-request-issue about assigning labels according to content, like scenario size and newgrf feature, etc.
12:44:52 <frosch> but ofc. having something more detailed than labels also works
12:45:27 <TrueBrain> well, they are still labels π
12:45:40 <TrueBrain> I am just filtering them a bit, see how that works
12:46:00 <TrueBrain> but yeah, scenario sizes is also a good one
12:46:18 <TrueBrain> so if a GRF contains trains and railtypes .. is it enough to classify that as a Train GRF?
12:46:23 <TrueBrain> or are both pieces of information important?
12:46:55 <glx[d]> Railtype might be important if you want to mix grfs
12:47:14 <TrueBrain> not talking about if they are compatible, but for a classification to show on the website
12:47:23 <glx[d]> But often train grf may define railtype just in case
12:47:39 <glx[d]> Like fallback if none is loaded
12:47:42 <TrueBrain> so are you ever going to look for a GRF that has railtypes (not a specific one, just in general, if they have one)
12:48:29 <frosch> i think it's reasonable to show "railtype" if only railtypes are included
12:48:43 <frosch> but if "trains" are included, it should suppress "railtypes"
12:48:55 <frosch> because they are probably just support types, compaitibilty checks etc
12:49:12 <TrueBrain> I am doing the same with cargoes btw .. if you have industries, the cargoes is not the important bit I am assuming
12:49:16 <frosch> you don't play with nuts, just to get the yeti signals
12:49:37 <glx[d]> Yeah cargo is part of the industry
12:49:58 <frosch> there are rare cases where newgrf just alter cargos, without industries
12:50:02 <frosch> but industries usually imply cargos
12:51:46 <TrueBrain> `ROAD_VEHICLES=32, TRAINS=33`
12:51:49 <TrueBrain> what category does that make?
12:52:27 <frosch> it's hard to distinguish busses, trucks and trams
12:52:42 <frosch> one could also muddy them into "vehicles"
12:52:56 <TrueBrain> `RAILTYPES=4, TOWNNAMES=33` .. lol, wuth? Now I wonder what that GRF actually does ...
12:53:19 <TrueBrain> it actually defines rail-types
12:53:24 <TrueBrain> RAIL, ELRL, MONO and MGLV
12:53:36 <TrueBrain> someone used a template π
12:53:40 <frosch> probably someone copy&pasted some nml header
12:54:46 <glx[d]> Seems townname counter doesn't filter on final definition
12:56:13 <TrueBrain> also a handful of GRFs that don't use any action 0/2/3 at all .. curious if we can classify them π
12:56:31 <TrueBrain> `ROAD_VEHICLES=299, TRAINS=9` .. hmm ... grfcodec, where are you
12:57:27 <frosch> heqs has mostly rv, and a few gimmick trains
12:58:48 <frosch> not sure whether you intend to use the numbers after the "=". it's okay to use them in some heuristic for classification, but better don't display them π
12:59:00 <frosch> they will be mostly wrong and/or conditional, so people only ask questions and report bugs
12:59:20 <TrueBrain> like in this case .. the amount of RV related info is way higher than the amount of train related info
12:59:26 <TrueBrain> so I classify this as RV GRF
13:00:50 <TrueBrain> I was thinking about just picking the highest value .. but that doesn't always seems right
13:01:52 <glx[d]> And you can have more than one action0 for a given item
13:02:39 <TrueBrain> `AIRCRAFT=539, AIRPORTS=3` .. hmm ... both are kinda nice to know
13:02:53 <TrueBrain> or do I just classify this as "air" related NewGRF
13:03:37 <frosch> it probably messes with noise factors and some balancing crap
13:05:11 <TrueBrain> do I want to split road and tram, or just one category "road"
13:05:32 <andythenorth> Bar chart showing entity counts π¦
13:06:12 <andythenorth> βThis grf is mostly about trainsβ
13:06:30 <TrueBrain> `HOUSES=417, INDUSTRIES=4, BRIDGES=77` .. hmmmmmmmm
13:06:35 <TrueBrain> is it a house? is it a bridge?
13:07:02 <andythenorth> Some kind of town set?
13:07:14 <TrueBrain> Town, that is a good name, tnx π
13:07:39 <frosch> it's likely ECS houses, which wanted to do houses accepting special cargos, but because houses close randomly, they were reimplemented as industries, but look like houses
13:07:55 <TrueBrain> `AIRCRAFT=35, TRAINS=47` .. hmmmm
13:08:17 <TrueBrain> some versions do some train-stuff, some do some industries stuff
13:08:22 <TrueBrain> over versions that heavily changed π
13:09:10 <frosch> maybe it stops newgrf authors doing stupid things, when bananas misclassifies their grf, and players ask them :p
13:09:45 <TrueBrain> `INDUSTRIES=354, OBJECTS=786`
13:10:00 *** Brickblock1 has joined #openttd
13:10:31 <TrueBrain> and with something like `STATIONS=364, OBJECTS=2`?
13:10:31 <glx[d]> Probably industries plus cosmetic to put around
13:10:41 <frosch> if andy changes firs to add the same tiles as industires, objects and stations, it should be blamed as such
13:10:56 <TrueBrain> and where is the balance .. how much does `OBJECTS` have to be versus the other for it to classify as both? π
13:11:11 <frosch> sounds like an AI topic :p
13:11:34 <TrueBrain> especially as these are actions, not actual existing object-count or something
13:12:06 <frosch> we can also read the id of the item
13:12:37 <frosch> you can have both "multiple action0 to modify the same thing", and "one action0 modifying multiple things"
13:13:16 <frosch> i can make "features" a Dict[Feature, Set[ItemID]]
13:13:37 <TrueBrain> for action0, sure. But how about action2?
13:13:59 <frosch> don't count action2 π
13:14:12 <frosch> action3 is the same as action0, it goes both ways
13:14:56 <TrueBrain> so okay, don't count action2 .. let's see what that returns first π
13:15:05 <TrueBrain> owh, it already wasn't counted ..
13:15:12 <TrueBrain> I am sure it was there .. it isn't π Lol
13:15:44 <frosch> ok, i was wondering why your numbers were so low, when counting action2 :p
13:17:07 <TrueBrain> yeah .. not sure what I am smocking π
13:17:26 <Brickblock1> What about grfs without a feature?
13:17:43 <TrueBrain> not sure yet π There are not -that- many
13:17:58 <TrueBrain> doing a full pass now, to get some statistics .. takes like 15 minutes
13:19:08 <frosch> Brickblock1: just label them "crypto miner"
13:19:53 <Brickblock1> then even less peopele would download my flower grf : (
13:21:06 <TrueBrain> `CANALS=3, OBJECTS=3, TOWNNAMES=30` .. this feels so weird .. lol
13:21:11 <frosch> TrueBrain: now that i see it, Feature.SOUND_EFFECTS is an orthogonal flag. "has sound effects" like "has 32bpp graphics"
13:21:28 <TrueBrain> yeah, it is a dict, so it acts like flags
13:21:41 <frosch> yeah, townnames with anything else combined are weird π
13:22:08 <frosch> TrueBrain: i mean like "has_32bpp" and "has_zoomin"
13:22:19 <TrueBrain> yeah, I almost changed has_32bpp into a feature π
13:22:25 <frosch> they are both interesting to show on bananas, but they do not affect the heursitics for content classification
13:22:26 <TrueBrain> just because it is easier to process π
13:22:41 <LordAro> TrueBrain: nono, has_no_32bpp is the feature :p
13:22:52 <TrueBrain> but if a NewGRF does nothing but add 32bpp sprites, that is also its category π
13:23:51 <frosch> adding a "landscape" or "gui graphics" category is possible, but harder
13:24:10 *** Samu has quit IRC (Ping timeout: 480 seconds)
13:24:16 <TrueBrain> well, we have a massive database to program against, that makes things a bit easier π
13:24:27 <TrueBrain> `ROAD_VEHICLES=2, AIRCRAFT=85` .. some entries are just so weird
13:27:44 <TrueBrain> I know of 4522 NewGRFs .. 667 of them I could not yet classify
13:27:56 <TrueBrain> most of them because they lack features, others because of ROADTYPES/TRAMTYPES
13:28:01 <TrueBrain> just a handful of "just weird"
13:28:06 <TrueBrain> so that is not too bad for a first pass
13:29:37 <glx[d]> No features could be action0A only grf
13:30:33 <glx[d]> Or action05, anyway just sprite replacers
13:30:41 <TrueBrain> `HOUSES=25, ROAD_VEHICLES=387, SHIPS=49, AIRCRAFT=49, CANALS=6` .. I have no heuristic for this π
13:31:22 <TrueBrain> Wasteland, in this case
13:31:54 <glx[d]> So all in one to be sure look matches
13:31:55 <Brickblock1> Could make anything with more then n be its own category
13:34:39 <andythenorth> βOtherβ :widdle_goblin:
13:34:49 <TrueBrain> okay, when I limit it to action0, and count the ids (as that is easy code :P), it becomes a bit easier π
13:34:58 <TrueBrain> but not doing action3 might be unwise π
13:36:06 <TrueBrain> and I suck at reading the id, as a lot of NewGRFs are now invalid π I will wait for frosch π
13:36:44 <Brickblock1> I believe this one only has 1 action3 but many action0s
13:38:26 <andythenorth> frosch: has a grftopia spec that extends this
13:39:28 <TrueBrain> frosch: guess if we make sound-effect into a flag, townnames could be a flag too. As we don't care about any features you might have added if you add townnames, so to say π
13:39:38 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
13:40:47 *** virtualrandomnumber has joined #openttd
13:41:16 *** virtualrandomnumber has quit IRC ()
13:41:47 <TrueBrain> I kinda want to remove "tags" from BaNaNaS .. it is widely misused, and doesn't actually serve it purpose, it seems ..
13:41:50 <TrueBrain> does anyone ever use it?
13:42:39 <TrueBrain> no, they fill it in
13:42:41 <TrueBrain> because it is there
13:42:45 <TrueBrain> but do they actually use it? π
13:43:00 <TrueBrain> you cannot search on it on the website .. neither in-game I think?
13:43:05 <andythenorth> I am never sure if it aids searching in game
13:44:04 <TrueBrain> owh, it does seem to search on it in-game
13:44:43 <TrueBrain> it is so missing its goal ..
13:47:31 <andythenorth> Hmm GS loot boxes then
13:47:55 <andythenorth> 20% chance of a new train?
13:48:14 <andythenorth> Shame I canβt animate that π€ͺ
13:48:55 <andythenorth> Oh how about sprites in story pages? π
13:50:11 <andythenorth> Then I could make tic-tac-toe where GS plays as opponent
13:50:42 <andythenorth> Nah tic tac toe would better as objects on map
13:51:28 <andythenorth> "I'm sorry Dave, I'm afraid I can't do that."
13:53:21 <TrueBrain> okay, picking up on action5/A resolve a lot of the "don't know what this GRF is about" π Let's see how many are left now ..
14:03:02 <TrueBrain> 367 unclassified .. less than 10%
14:10:58 <frosch> i am +1 to removing tags, and/or making them auto-computed and not editable by authors
14:11:40 *** Samu_ has quit IRC (Ping timeout: 480 seconds)
14:23:56 <Brickblock1> I would keep them since it makes searching easier but having other tags which can't be whatever the author wants is probably also a good idea
14:33:16 <TrueBrain> right, now I just need an approval for #10448 π
14:33:35 <TrueBrain> tnx Rubidium, for the feedback and thinking along π WinHttp is .. a bit weird π
15:15:52 <frosch> hmm, black has nothing to reformat, suspicious
15:16:00 <frosch> how to I test this then?
15:16:30 <TrueBrain> make a small Python script that opens a grf file and feed it to the NewGRF class
15:16:56 <TrueBrain> `newgrf = NewGRF(); with open("..") as fp: newgrf.read(fp)`
15:22:19 <frosch> hmm, no dorpsgek in bananas-api
15:26:47 <TrueBrain> `s, e, f` .... please don't! π
15:26:54 <TrueBrain> we stopped doing that non-sense years ago already π
15:27:54 <TrueBrain> well, I am happy you wrote this, as I wouldn't have come close to that diff π
15:28:18 <TrueBrain> and clearly you never ran this ..
15:28:24 <TrueBrain> "mostly untested" -> "not tested at all" π
15:28:42 <TrueBrain> `efaultdict(set())` -> `efaultdict(set)` π
15:29:15 <TrueBrain> and a lot of NewGRF files are now invalid π¦
15:29:33 <frosch> yeah, i just got to that message π
15:30:00 <TrueBrain> action 4 is a bit broken π
15:30:13 <TrueBrain> `feat` is never set
15:31:17 <frosch> ok, i'll work on version2 π
15:31:58 <TrueBrain> still sometimes it breaks on existing NewGRFs, but we can fix that π Mostly it works now π
15:32:10 <TrueBrain> `ROAD_VEHICLES=368, TRAINS=4, SPRITES=8031, SPRITES_32BPP=8000, SPRITES_ZOOMIN=8000`
15:32:52 <frosch> hmm, i still can't parse firs, are you better at fixing my code than me? :p
15:33:07 <TrueBrain> I am not trying 1 specific GRF
15:33:11 <TrueBrain> I just feed it EVERYTHING .. some fail
15:33:35 *** WormnestAndroid has joined #openttd
15:34:55 <TrueBrain> `ROAD_VEHICLES=371, TRAINS=4` lot better to spot what Timber's GRFs are doing now π Nice π
15:35:11 <TrueBrain> `LANDSCAPE=126, INDUSTRIES=26` also new choices are introduced π
15:35:57 <frosch> it's still broken, but less obvious π
15:36:39 <TrueBrain> I'm the problem it is me
15:36:48 <TrueBrain> (nobody else has this trigger now? :P)
15:37:09 <glx[d]> hmm the more I convert generic numbers to SQInteger, the more I think all typedef (like EngineID) should also be SQInteger in the API, with special clamping returning INVALID_XXX for out of range values
15:37:58 <frosch> that makes the docs harder to read
15:38:15 <frosch> though you can ofc "using EngineID=SQInteger"
15:38:59 <glx[d]> `EngineID engine_id` or `SQInteger engine_id` is not really different in the doc
15:39:16 <TrueBrain> `ROAD_VEHICLES=131, GUI=224` .. what do those GRFs do with GUI, I wonder? Is that just a road-vehicle GUI element or something?
15:40:40 <frosch> ok, bad example, the third param is actually an id :p
15:41:02 <TrueBrain> you found a bug! π
15:41:07 <glx[d]> yes it's an id with a special handling
15:42:20 <glx[d]> and in this case only the first param would be clamped and maybe changed to INVALID_VEHICLE
15:43:34 <TrueBrain> if you make everything an `SQInteger`, you lose a bit of context; I do not think that helps the docs. Naming things what they are always helps, so `EngineID` is more clear than `SQInteger`. Having to deduce it based on the name is annoying, I think
15:43:57 <TrueBrain> we did more of those tricks in the docs to make the docs more clear
15:44:41 <glx[d]> then the convert function should do a proper clamping instead a simple cast
15:45:02 <TrueBrain> frosch: : ~500 out of the 4500 NewGRFs fail to pass, to give you a statistic; so it is not terrible π
15:45:45 <TrueBrain> `GUI=2, LANDSCAPE=30, TOWNNAMES=1` .. hmm .. how does townname count π
15:45:51 <frosch> really, what kind of software do you sell? :p
15:46:17 <frosch> 2 gui sprites, 30 landscape sprites, 1 townname generator
15:46:22 <TrueBrain> were you selling your PR? π
15:46:29 <glx[d]> only 0x80 IDs are important for townnames
15:46:32 <frosch> sprites amounts are probably larger than others
15:46:40 <glx[d]> if I remember the spec
15:46:49 <TrueBrain> ah, generators, okay, that makes more sense
15:46:50 <frosch> glx[d]: yes, the PR checks that
15:46:55 <TrueBrain> I somehow expected town-names, but ofc that is impossible
15:47:21 <TrueBrain> okay, I have to look into what makes a GUI a GUI sprite, as those numbers are just a bit weird
15:47:34 <TrueBrain> first some shopping etc etc
15:49:32 <frosch> like: i excluded vehicles and industries from landscape/gui, but added houses to landscape, for arbitrary reasons π
15:57:02 <frosch> TrueBrain: with that update, i am now interested in what grf fail exactly π
16:00:03 *** Samu__ has quit IRC (Quit: Leaving)
16:02:34 <glx[d]> emscripten version ugrade ?
16:04:46 <glx[d]> yup upgrade merge on 2022-12-29 so probably it
16:08:21 <Samu> savegames are lzma stuff, right? must be it
16:09:07 <TrueBrain> frosch: let's see ... at least less crash π
16:09:34 <TrueBrain> AuzTrains (47470603) crash
16:09:52 <TrueBrain> Apache Helicopter (44440a02) crash
16:10:05 <TrueBrain> and more, but .. the list isn't small π
16:13:15 <TrueBrain> action3 parser is the issue
16:14:13 *** TROILUS has quit IRC (Read error: Connection reset by peer)
16:14:25 *** TROILUS has joined #openttd
16:15:01 <TrueBrain> ` If this value has bit 7 set (i.e. 80 added), it is a wagon override`
16:15:04 <TrueBrain> you missed that part π
16:15:14 <TrueBrain> `for _ in range(num_ids & 0x7F):`
16:15:24 <TrueBrain> or `num_ids = reader.uint8() & 0x7F`
16:17:26 <TrueBrain> still gives issues with some GRFs .. let's check ...
16:17:39 <TrueBrain> 2cc Trainset (27711002) crash
16:18:54 *** TROILUS has quit IRC (Read error: Connection reset by peer)
16:18:59 <TrueBrain> `num_ids` can be zero
16:19:13 *** TROILUS has joined #openttd
16:19:45 <TrueBrain> I don't know why, or why this GRF does that, as it makes no sense, but that is what is happening π
16:21:37 *** TROILUS9 has joined #openttd
16:22:16 *** TROILUS has quit IRC (Read error: Connection reset by peer)
16:22:17 *** TROILUS9 is now known as TROILUS
16:26:46 <TrueBrain> is the only GRF that does that, so that were the last few issues
16:39:51 <frosch> ok, i think i fixed those
16:40:06 <frosch> i also revisited the spritenumbers, and excluded houses from landscape
16:41:39 *** Wormnest has joined #openttd
16:42:00 <TrueBrain> you did not fix 27711002 π¦
16:42:23 <TrueBrain> reading `first_id` fails
16:42:28 <TrueBrain> not some Python logic following π
16:45:34 <frosch> that newgrf is not even on bananas :p i found it in coop legacy pack 7.3
16:45:55 <TrueBrain> it once was, at least π Sorry, I just grabbed the whole archive π
16:45:59 <frosch> "2cc-set beta 28th dec 2008 - finally bugfree?" π
16:46:12 <frosch> it's as good as my PR description
16:46:26 <TrueBrain> well, it is not wrong what they did
16:47:17 <frosch> my copy does not trigger any issue
16:47:24 <frosch> but ok, i'll move the "if"
16:47:33 <frosch> only for this grf π
16:47:44 <glx[d]> samu: autosave works fine for me with both
16:47:57 <TrueBrain> there is one more GRF that crashes, but that was already the case with the current code .. so what-ever π
16:49:55 <TrueBrain> Windy Font (30f1fce0)
16:51:17 <glx[d]> possible, I use firefox
16:52:11 <TrueBrain> okay, out of the 4522 GRFs, only 77 have no features (at all) now .. so that is not bad π
16:57:48 <TrueBrain> Action 14 seems weird in that GRF
16:57:56 *** GeorgeVB has joined #openttd
16:57:56 <GeorgeVB> May I post a feature request here?
16:58:06 <TrueBrain> it enters a C, but when it gets out of the C, there isn't a type_id=0 entry
16:59:17 <TrueBrain> yeah, okay, the action 14 chain is not closed properly. So this indeed is not a valid GRF in that sense. No clue how it got uploaded, but what-ever π
16:59:39 <GeorgeVB> I'm not sure if this the right chat, but I can't find a better one.
17:00:22 <frosch> grfcodec decodes it happily
17:00:38 <TrueBrain> but does that actually mean anything? π
17:00:43 <TrueBrain> action 14 is of course a weird one
17:01:01 <TrueBrain> but the C chain is terminated, but the root-level chain is not
17:01:02 <glx[d]> edge is fine too for me samu
17:04:55 <TrueBrain> ` 66 * 5 0A 01 01 00 00` <- this means that it replaces GUI sprite 1, right?
17:06:32 <TrueBrain> which is the cursor, right?
17:06:43 *** Samu has quit IRC (Read error: Connection reset by peer)
17:08:24 <TrueBrain> some sets do some weird stuff with the GUI sprites π
17:09:15 <TrueBrain> how to tell in an NFO with what they are being replaced? So many look ... fake
17:09:32 <Samu> my new system is starting to have issues
17:09:48 <Samu> by new, i mean bought ~3 years ago
17:10:20 <frosch> TrueBrain: it replaces 90 sprites starting at 3, so mostly font sprites
17:10:26 <Samu> and i mean windows , not openttd
17:10:28 <frosch> it should be classified as "gui"
17:10:45 <TrueBrain> frosch: huh? Even your code returns me it only replaces sprite 0
17:10:51 <TrueBrain> took me a while before I realised I can now request that info π
17:11:01 <frosch> oh, sorry, i thought we were still at windyfont :p
17:11:07 <TrueBrain> ah, no, random other GRF
17:11:32 <glx[d]> yeah the quoted actA definitely replaces the cursor
17:11:32 <frosch> so, yes, it only replaces the main mouse cursor
17:11:49 <TrueBrain> weird weird GRFs we have π
17:12:02 <Samu> how do i get a crash log glx[d] ?
17:12:30 <Samu> well then i dunno how i can debug this
17:12:33 <glx[d]> they are almost impossible to debug I think
17:13:12 <frosch> TrueBrain: ok, i won't fix that windygrf
17:13:29 <frosch> i would have to ignore all errors in pseudosprites, and i prefer the validation instead
17:13:50 <TrueBrain> `TRAINS=103, LANDSCAPE=12` <- landscape important? Does it depend on the numbers?
17:14:26 <frosch> i think you need to divide sprite amount by 6 to make them somwhat compareable
17:14:38 <frosch> and multiply townnames by 1000? :p
17:14:58 <glx[d]> or is lanscape not meaning what I think it means
17:15:16 <TrueBrain> was hoping frosch could guide us there, as I am wondering the same π
17:15:41 <TrueBrain> `TRAINS=138, LANDSCAPE=290` also exists, for example
17:15:50 <TrueBrain> I think it is still a train set π
17:15:53 <frosch> nuts replaces signal graphics
17:16:00 <frosch> i think i count those as landscape
17:16:24 <TrueBrain> but would the set as a whole be a train set, or a landscape set?
17:16:54 <frosch> i think both "gui" and "landscape" are less important than the other categories
17:17:16 <glx[d]> and sometimes configurable
17:18:45 *** sla_ro|master has joined #openttd
17:18:49 <TrueBrain> `GUI=1, LANDSCAPE=208, SIGNALS=1`
17:18:53 <TrueBrain> curious what this is .. lets see
17:19:56 <frosch> "SIGNALS" is jgrpp only
17:21:19 <frosch> so, signal icon in gui, 208 old-style signals, 1 jgrpp signal hook?
17:21:59 <TrueBrain> can we tune LANDSCAPE to be SIGNALS too?
17:22:33 <frosch> GeorgeVB: i am pretty sure cargo-to-be-loaded is already reserved for the train when the unloading starts. so changing capacity during loading would break fifo loading, cargodist, and many things more
17:23:01 <TrueBrain> 495 failed classification .. I didn't add any heuristics yet, just plain old: this wins of that
17:23:20 <frosch> TrueBrain: line 135-150 list some categories
17:23:24 <frosch> which ones do you want to separate?
17:23:35 <frosch> fonts, faces, rail, road, signals, ...?
17:23:47 <TrueBrain> I think the more specific we are, the better chance we classify correctly
17:24:06 <TrueBrain> so yeah, as many as you can, I would say π
17:24:31 <frosch> ok, i'll think about it during dinner :p
17:24:40 <TrueBrain> yeah, and I am off for the night; so more tomorrow π
17:25:47 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
17:27:11 <TrueBrain> `INDUSTRIES=3, TRAINS=2`
17:27:16 <TrueBrain> can't wait to find out what those are π
17:30:31 *** TROILUS has quit IRC (Read error: Connection reset by peer)
17:30:32 *** TROILUS6 has joined #openttd
17:30:34 *** TROILUS6 is now known as TROILUS
17:32:48 *** TROILUS3 has joined #openttd
17:34:55 *** TROILUS has quit IRC (Read error: Connection reset by peer)
17:34:55 *** TROILUS3 is now known as TROILUS
17:40:35 <GeorgeVB> frosch: Any idea how to make change it in a safe way? It is rather frustrating to have the same capacity for 2 * 20-th containers and 20+40-th containers.
17:42:21 <Gwyd> You can't really change capacities outside of depots afaik, the game gets very unhappy
17:42:51 <Gwyd> You could have the different graphics for different loading states, so different % loaded wagons get different combos of containers
17:43:47 <GeorgeVB> Yes, currently I can't. My question is about finding a way to make it possible in some cases
17:44:35 <GeorgeVB> No, 2 * 20-th containers are not a loading state for 20+40-th containers
17:45:29 <GeorgeVB> same as a lorry is not a loading state for excavator
17:46:34 <Gwyd> We're talking about container flat wagons right?
17:47:37 <GeorgeVB> We are talking about flatbeds. Container flatbed is one of the types of flatbeds.
17:49:23 <Samu> C:\Users\Ricardo Soares\AppData\Local\Microsoft\Edge\User Data\Default\IndexedDB\https_preview.openttd.org_0.indexeddb.leveldb\
17:49:49 <Samu> it stores stuff there, with very weird filenames
17:50:27 <Samu> i deleted those folders, let's see if it crashes from fresh
17:52:24 <Samu> autosave or manual save, it crashes :(
17:52:29 <GeorgeVB> Gwyd: As you can see, there are 20+20-th containers graphics on the second platform and 20+40 on the first.
17:52:29 <GeorgeVB> But I can't make them to have 66 and 99 units capacity, because the game would crash.
17:53:41 <Gwyd> You can make a flatbed wagon show a 2*20' if it has 33..66 units loaded, then 20'+40' for 67..99 units loaded
17:54:08 <Samu> I don't know how else I can help with this crash
17:55:07 *** TROILUS has quit IRC (Read error: Connection reset by peer)
17:55:23 *** TROILUS has joined #openttd
17:55:50 <Samu> is the stuff that comes from bananas compressed with lzma?
17:55:50 <GeorgeVB> Gwyd: It would look rather strange, if I first put 2*20-ft containers, than remove them and place 20+40-ft containers
17:59:07 <Samu> downloaded an update for opengfx
17:59:19 <Samu> it's really only happening when saving
18:10:56 <Gwyd> GeorgeVB: So then you can probably code it so that the sprite doesn't change while loading/unloading
18:18:50 <GeorgeVB> Yes, that is done already. My problem is that I have the same capacity for 2 * 20-ft containers and 20+40-ft containers
18:19:57 <petern> Are you trying to randomize capacity?
18:20:18 <petern> Damn, that seems like a gameplay misfeature if any.
18:21:04 <GeorgeVB> Well, and what should I do if have different graphics?
18:24:29 <GeorgeVB> Currently I specify the lowest capacity for all the views of a cargo. But, imho, it would be nice if graphics for "large cargo" would provide larger capacity, and graphics for "small cargo" would provide smaller capacity.
18:25:48 <Gwyd> Less than a third load, use 1x20', between a third and two thirds loaded use 1x40' or 2x20' graphics, over two thirds loaded use 40'+20'. Have the graphics frozen while loading/unloading. A fully loaded container train would use all the space and not have half loaded wagons realistically
18:29:42 <GeorgeVB> replacing first 20-ft container with 40-ft container while loading sound even more unrealistic.
18:30:28 <Gwyd> Which is why you freeze the graphics while loading
18:30:51 <Gwyd> When loading from 0 just keep unloaded graphics while loading
18:31:09 <Gwyd> When unloading keep the same number of containers until the train departs
18:32:41 <Gwyd> Animation triggers can probably help you here I think
18:36:14 <GeorgeVB> I don't understand your idea. In case there are gaps (different containers), the capacity should be different, but it is impossible.
18:36:14 <GeorgeVB> If you suggest to disallow 2 * 20-ft configuration on 60-ft flatbeds, then it is just reducing the variety and attractiveness
18:45:05 <DorpsGek> - Update: Translations from eints (by translators)
20:03:33 <andythenorth> Containers can be heavy or light
20:04:06 <andythenorth> They generally load by volume on low density cargos, and weight on, e.g. steel coils
20:05:05 <andythenorth> I wouldnβt worry about it π
20:14:52 <Samu> why is the title "footer" :(
20:23:04 <glx[d]> else it uses the same value as the last call
20:24:13 *** wallabra has joined #openttd
20:24:23 <wallabra> there is probably a way to make logic gates in openttd
20:24:24 <Samu> no suitable conversion from...
20:24:35 <Samu> std::string to const char *
20:24:57 <glx[d]> replace () with {} like the other args
20:25:18 <JGR> You need to change the type of encoded_title to std::string instead
20:25:42 <glx[d]> and the type too as pointed
20:25:52 <glx[d]> use auto like other params
20:26:40 <wallabra> i was thinking a data line / data bus could be whether a railway is "occupied" (train pointing at it so it's darker so other trains don't path into it)
20:26:48 <wallabra> except i don't think that's controllable or automatable really
20:26:56 <wallabra> iirc you can't have a train flip on orders
20:27:01 <Samu> nope, doesn't work, now it's erroring on EnforcePreconditionText
20:28:07 <wallabra> flip flops are easy, just a station and whether it has cargo... or two, one for 0 and one for 1, if you want orders to activate when therei s cargo on 0
20:28:33 <glx[d]> I can see that yes, anyway it should be copied at some point (and before any other call to GetEncodedText() because the buffer is shared)
20:28:36 <JGR> The static buffer in GetEncodedText is a bit of a footgun
20:30:24 <glx[d]> like all text related stuff in openttd π
20:31:03 <wallabra> wtf people have done logic gates in openttd
20:31:18 <JGR> The OTTD2FS/FS2OTTD functions used to do that but were converted to std::string, might be worth doing the same here?
20:31:26 <glx[d]> yes with presignals wallabra
20:31:40 <JGR> wallabra: Search for "OpenTTDCoop"
20:31:56 <wallabra> so cursed, i love it
20:32:13 <wallabra> also i'm aware of openttdcoop sorta
20:32:52 <wallabra> huh i wasn't too far off
20:33:00 <glx[d]> you're lucky this part is still accessible
20:34:55 <glx[d]> hmm GetDecodedText() could indeed use the other GetString()
20:38:22 <Samu> copied this from somewhere else
20:38:24 <Samu> auto *encoded_title_ptr = title->GetEncodedText();
20:38:24 <Samu> EnforcePreconditionEncodedText(LEAGUE_TABLE_INVALID, encoded_title_ptr);
20:38:24 <Samu> std::string encoded_title = encoded_title_ptr;
20:38:54 <glx[d]> yes that's a valid solution
20:40:04 <glx[d]> but the safest solution would be to remove the use of a buffer π
20:48:51 <wallabra> just cram in a borrow checker :D
20:53:02 *** wallabra has quit IRC (Quit: Page closed)
20:53:05 <glx[d]> ok I see how I can upgrade Text
21:31:11 <Xarick> this doesn't quite work as I had hoped
21:32:09 <Samu> i thought the company ID would be the element
21:32:45 <Samu> i can have the same company via multiple League Table Elements, that's sad :(
21:35:06 <Xarick> this is bad, I have to babysit the table
21:41:23 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:13:24 *** nielsm has quit IRC (Ping timeout: 480 seconds)
22:23:45 *** Samu has quit IRC (Ping timeout: 480 seconds)
22:28:53 <frosch> TrueBrain: some of the mouse-pointer and font-sprite classifications were wrong. they also trigger if newgrf add sprites via GRM and use action6 to write the actual spritenumber
22:29:28 <glx[d]> oh the good old and nasty GRM
22:30:11 <glx[d]> newgrf can request memory allocation for their sprites
22:30:32 <glx[d]> or something like that
22:36:00 <frosch> sometimes newgrf have to allocate spriteids in global scope
22:36:15 <frosch> they then call some kind of malloc, which gives them the first free spriteid
22:37:05 <frosch> you then use that spriteid and write it into the actionA using action6
22:37:27 <frosch> but if you just statically read the newgrf without executing, you will most likely get a zero as first sprite
22:38:19 <glx[d]> that's an example π
22:38:19 <TrueBrain> So we ignore action A after action 6 for classification?
22:40:32 <frosch> also added tons of new sprite categories
22:42:21 <Samu_> I don't understand the league table
22:42:22 <TrueBrain> Cool! Will give it a try tomorrow π
22:42:34 <Samu_> it only keeps the best score ?
22:42:55 <Samu_> when I update the score to a lower value, it's rejected...
22:43:07 <Samu_> or i just dont understand when this is updated
22:44:23 <Samu_> nope, it updates when adding a lower score too
22:44:44 <Samu_> but it's not at a fixed interval, i dont get it
23:00:19 <Samu_> nevermind, i found the issue, it's my code, I'm stupid
23:04:24 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
23:08:11 <Xarick> just ported my company value from a goal script into a league table successfully
23:08:54 <Xarick> much less code required, thx to the ranking and sorting being done by openttd itself
23:09:20 <Xarick> but I still need to keep track of league table elements
23:09:38 <Xarick> which is kinda something I was hope I wouldn't have to
23:11:12 *** Samu_ has quit IRC (Quit: Leaving)
23:15:16 <frosch> hmm, we could also scan AI and GS, check which API methods they use, and label them accordingly
23:26:34 <TrueBrain> One step at the time π
23:28:03 <frosch> it's doable, validate.py already finds all the nuts, and there are already parses which check for ai/gs script/library
23:29:01 <frosch> for base-graphics i can only think of "32bpp" and "zoom-in" labels, for base-sound and music there is nothing :p
23:31:22 *** sla_ro|master has quit IRC ()
23:48:51 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
continue to next day β΅