IRC logs for #openttd on OFTC at 2025-02-24
β΄ go to previous day
00:26:10 <peter1138> Well, or just setting the colour paramater in DrawString :)
01:04:26 <wensimehrp> so I guess we're back on the flags problem
01:05:18 <wensimehrp> worse case this game would be censored because of the addition of flags
01:06:00 <_glx_> many grf already use flags
01:06:10 <wensimehrp> grfs are not official content
01:06:16 <peter1138> They don't mean "flag problem"
01:06:25 <brickblock19280> It wasn't when it used flags earlier lol
01:06:28 <peter1138> They mean "We think Taiwan doesn't exist"
01:06:55 <peter1138> (Which is absolutely fine, the flag does exist.)
01:06:59 <_glx_> when many things are made in taiwan ?
01:07:49 <wensimehrp> peter1138: not that the island don't exist but it is not a country
01:08:01 <_glx_> for me it's just like the gulf of america, a non issue
01:08:10 <peter1138> Europe isn't a country. There's a flag for it.
01:08:52 <wensimehrp> so the consequence of adding that flag is the gfw or some other thing bans openttd
01:09:18 <wensimehrp> the officials don't give a fuck about other flags
01:09:36 <brickblock19280> I do see a point in renaming it from flags to regions as it matches the language used for bananas
01:09:37 <peter1138> Draw flags for La-la land, Tinky-Winky land, Dipsy land, Po land (hah) then we can also include the teletubbies.
01:10:19 <wensimehrp> just that ROC flag. could be included for historical flag, just that when it's displayed with the name taiwan it is not appropriate
01:13:26 <peter1138> Feel free to translate it.
01:18:25 <peter1138> brickblock19280, regions are more abstract, and flags are literally just flags.
01:19:00 <peter1138> We can do a Region class though.
01:19:11 <brickblock19280> Fair but flags have separate names from that of what they represent
01:22:26 <brickblock19280> Name callback and user location variable /j
01:22:51 <peter1138> Well anyway, now there is a PR to provide such feedback, suggestsions, etc.
01:23:24 <peter1138> Hmm, what's wrong with this keyboard.
01:37:53 <belajalilija> of mainland china is upset by the flag of taiwan they could use this flag instead
01:38:28 <belajalilija> then they can both have the same flag π₯°
01:40:57 <wensimehrp> belajalilija: that's before '49
01:41:56 <wensimehrp> the censorship policies are absolutely dumb
01:41:57 <belajalilija> they can do it again inshallah π₯°
01:54:06 <brickblock19280> peter1138: Given this would it not make sense to not associate text with them Taiwan certainly isn't the only case where the same flag is used with a different scope, the flag of Europe for example often refers to the eu, but sometimes Europe as a whole, similarly Denmark-Norway share their flag with the modern day Danish one
01:55:17 <wensimehrp> I'm fine with flags and no text
01:56:02 <brickblock19280> A newgrf could then simply specify what the flag refers to if deamed important
02:50:13 <johnfranklin> This is why I oppose adding anything about βbadges featureβ to China Set. It cannot be βneutralβ.
03:32:29 *** Wormnest has quit IRC (Quit: Leaving)
03:40:59 *** debdog has quit IRC (Ping timeout: 480 seconds)
04:43:24 <DorpsGek> - Update: Translations from eints (by translators)
07:03:08 <LordAro> peter1138: warned you :p
07:03:12 *** akimoto has joined #openttd
07:03:50 <LordAro> that said, not clear if anyone actually has problems with it, or is second guessing potential problems
07:04:41 *** akimoto has quit IRC (Remote host closed the connection)
07:16:14 <DorpsGek> - Add: summary for week 08 of 2025 (by OpenTTD Survey)
07:47:50 <peter1138> What do you mean, warned you?
07:49:01 <peter1138> All I saw is a "some people" say that "some people" will not like i.t
07:49:10 <peter1138> So it is clear to me that they do actually mean themselves.
07:50:22 <peter1138> That, to me, is unacceptable.
08:48:37 <wensimehrp> peter1138: can badges be a callback? or they are just properties?
09:03:03 <peter1138> The list of badges assigned to a thing is fixed.
09:18:22 <peter1138> <TargetFrameworks>net8.0;net9.0</TargetFrameworks>
09:18:23 <peter1138> <TargetFrameworks>net9.0;net9.0</TargetFrameworks>
09:18:27 <peter1138> Well, that's irritating.
09:18:34 <peter1138> Oh, first is a -, second is a +
09:18:56 <peter1138> That looks like someone botched a dependency update.
09:29:23 <_zephyris> peter1138[d]: 13x10px I think, unless you can get away wuth 12x9px... The upstream curation to 4:3 looks good.
09:29:50 <peter1138> 1x1 would be easy to scale :D
09:30:22 <peter1138> I'll try with 13x10 later. Need to create the overlay in that size :)
09:33:24 <_zephyris> Hm, need some scaled overlays too, the 1px dither/pattern upscaled on the 2x zoom sprites isn't pretty
09:33:46 <_zephyris> Anyway, coffee, work.
09:34:28 <peter1138> I intended it to be just doubled up.
09:51:30 <andythenorth> if badges were a callback there's a lot more to go wrong
09:51:39 <andythenorth> because e.g. other callbacks are reading them
09:51:56 <andythenorth> so if they're mutable that could get messy
10:02:05 <_zephyris> Gets more stylistic, how shiny you'd like it
10:08:24 <peter1138> Need a 4x one if we're doing this.
10:08:39 <peter1138> And also there's a 10x10 overlay.
10:24:15 <_zephyris> The icons could use some love in general
10:24:24 <_zephyris> Could always just ogfx2 it π
10:25:39 <_zephyris> Carefully designed SVG rendered without anti-aliasing
10:36:27 <peter1138> I carefully designed the SVG to be rendered with anti-aliasing, because at the small sizes, not antialiasing is bad.
10:37:09 <_zephyris> Sorry, didn't mean to bash your work
10:37:38 <_zephyris> It's a stylistic thing - you can make very ottd-style icons by imposing that constraing on yourself
10:38:17 <peter1138> Oh, it's not that :)
10:39:49 <peter1138> I came from looking at all the existing decorations that people have used.
10:40:15 <peter1138> Squeezing non-antialiased flags into a tiny area results in a very... interpretative design.
10:40:42 <peter1138> Some of the other decorations are also quite rudimentary, pixel-wise.
10:41:05 <_zephyris> For the flags most likely want aa
10:41:40 <peter1138> Given the small size, and the fact that it is decoupled from the actual vehicle sprites, I decided to go with rendered SVG with AA to get more detail in.
10:41:56 <_zephyris> Welllll, arguably the background/field should be not aa and any emblazoned design should be aa, but meh
10:42:43 <peter1138> No, it doesn't work.
10:44:14 <peter1138> I am of course open to improvements, I just don't think completely avoiding AA should be a design goal.
10:45:50 <peter1138> Of course, just my opinion.
11:01:02 <_zephyris> I mean it like hinting for fonts. If it's designed to work without aa, then with aa you'll get sharper edges, less aliasing, etc. etc.
11:02:02 <_zephyris> Well, discord can't cope, but I hope you see what I mean.
11:03:04 <ahyangyi> Is there any way to get font-hinting-like effects on regular svg?
11:09:54 <xarick> if it becomes part of baseset I will use it
11:10:30 <ahyangyi> Anything blue (and not water-like) makes me wonder if it's actually company colour
11:32:24 <_zephyris> ahyangyi: Two parts - hinting (in the svg file), and using the hints (during rendering). There is an svg font standard, I wonder if it's in there.
11:32:38 <_zephyris> ahyangyi: This is CC, random CC!
11:39:22 <peter1138> First was not at 100%, whoops.
11:40:13 <peter1138> So on mine the dots could be improved, maybe ever so slightly larger.
11:48:57 <_glx_> They only have a dedicated constructor, not an issue being saved then loaded as List
11:50:43 <peter1138> Once you have a list is there anything that says that list is StationIDs, or IndustryIDs, or whatever?
11:52:23 <_glx_> Originally the object type, but it's instance anyway
11:52:47 <_glx_> And nothing prevents adding anything else in the list anyway
11:54:51 <_zephyris> peter1138: Try drawing on a 1x zoom 1px grid, for (small) icons, hitting the grid perfectly is often better than correct isometric/correct perspective/etc.
11:54:59 <_glx_> Station list and industry list only differ in the constructor (used to auto fill them)
11:55:30 <peter1138> _zephyris, I'm aware, with the caveat that sometimes you need to be at 1/2 a pixel.
11:56:15 <_glx_> Only tile lists were an issue because they have extra functions
12:02:32 <peter1138> This is something like why some C++ evangelists prefer free functions (e.g. std::begin() over class methods (e.g. .begin())
12:12:54 <xarick> fantastic job, glx! it works!
12:16:55 <xarick> haven't tested the sorter types
12:17:01 <xarick> but i suspect it works
12:25:24 <peter1138> A free function would be something like `ScriptTileList.AddRectangle(GSList, TileIndex, TileIndex);`, so incompatible API wise, but means you really would only need to store a list as a list.
12:31:56 <xarick> oh, apparently it didn't set the sorters correctly,
12:32:28 <xarick> with less garbage in the tests
12:34:11 <xarick> oh oops, lunch time, sorry, will test this later
12:40:54 <_zephyris> Diesel can vs smoke?
12:42:14 <peter1138> What do you all the end of a Doom map that has 1 Spider Mastermind, 18 Cyberdemons and 25 Archviles all in a small room?
12:42:40 <peter1138> _zephyris, smoke is traditional.
12:56:07 <andythenorth> I shouldn't post picture of my lunch, eh?
13:12:21 *** kuka_lie has joined #openttd
13:13:23 <xarick> wondering if it's the foreach...
13:42:00 <peter1138> The loading code looks weird.
13:55:22 <Artea> peter1138: run in circles with iddqd
13:55:43 <peter1138> No room to run in circles.
13:56:45 <Artea> like last difficult of F.E.A.R. "this is for masoquist"
13:58:14 <Artea> I guess 22 ~ 25 mins = 1 day in OTTD is too much
14:00:20 <Artea> entered when was 3 mins up
14:00:37 <Artea> around 4 "playing around"
14:02:03 <Artea> at least got a viewer with 11 yr account
14:03:17 <peter1138> 1 day is 2 seconds normally, so 22 minutes is... Nah.
14:04:06 <Artea> but since I was lazy to SSH and nano it
14:04:15 <Artea> just run via *shell via ZNC
14:05:09 <Artea> the industries and towns look randomly good
14:06:22 <Artea> so the bogus is exactly the calendar, is v15 coming soon ?
14:07:14 *** D-HUND is now known as debdog
14:08:09 <Artea> it's ok, last time I had server was 10.x and dropped when was going for 11.x
14:09:35 <Artea> I need find fix for Slaughterfest 2012 @ ZDaemon ;)
14:10:05 <Artea> map27 crashes when spawns Reverants like no tomorrow
14:17:32 <peter1138> I was playing "Necromantic Thirst" (RC2, maybe there's a proper release now), map 25.
14:17:54 <peter1138> This map has 8000+ enemies and in some places my FPS dropped to 3.
14:18:20 <peter1138> The rest of wad is fairly normal, but this one just goes flat out bonkers.
14:18:30 <peter1138> Archies all over the place.
14:18:59 <peter1138> Though I did manage to cheese it and let 3000 enemies in-fight for a while.
14:22:57 <xarick> tabs and spaces mixed together
14:23:43 <Artea> Krawa from SDA @ ZDaemon told me the right number to use on sf2012
14:23:57 <LordAro> xarick: we're not interested in codestyle of 3rdparty code
14:23:57 <Artea> but I think isn't just that the issue, my VPS only have 2GB RAM
14:24:47 <peter1138> I prefer to play Doom on my computer, not a server where I can't see it.
14:25:23 <Artea> well, you can, I just use my VPS for dedicated servers
14:25:30 <Artea> like ZDaemon and OpenTTD
14:26:26 <peter1138> I don't play OpenTTD on a server either.
14:26:47 <Artea> if you have 2nd monitor, you can SSH and see it
14:26:59 <Artea> of course this is only for MP "purposes"
14:27:10 <Artea> SP doesn't make that much sense
14:27:37 <Artea> I only play sf2012 in server because I let it up and connect in random times
14:28:08 <Artea> and password to be solo map finisher, usually others go on and breaks the feeling of do solo
14:28:26 <Artea> SDA server have 2 lifes, I use only 1
14:28:51 <peter1138> dsda-doom doesn't have options for 'heap' as far I can see.
14:29:39 <Artea> try zdoomgl, they are recently updating
14:30:03 <peter1138> dsda-doom is current.
14:30:25 <xarick> saved data seems incomplete?
14:30:55 <xarick> where is the sort stuff saved?
14:31:07 *** Flygon has quit IRC (Remote host closed the connection)
14:36:51 <xarick> difficult to follow...
14:39:04 <Artea> can't say without proper look of commands for dsda-doom
14:45:24 <xarick> `return sq_throwerror(v,"invalid param type");`
14:46:36 <xarick> sq_throwerror is SQBool?
14:48:43 <xarick> so it doesn't crash...
14:53:02 *** audigex has joined #openttd
14:57:05 <audigex> Discord channel #add-on-development: is leaking
15:01:16 <xarick> in other words... it crashed but failed to crash
15:09:07 <andythenorth> at least I didn't post a picture of my lunch
15:22:01 <peter1138> _zephyris, the shading on the 2cc badge was deliberately inverted for the second colour so that it is still visible when both primary and secondary colours are the same.
15:24:25 <peter1138> Borders on the dice are too thick I think.
15:32:18 <_zephyris> Hmm, there's a stylistic thing here too.. Baseset generally doesnt outline icons, right?
15:34:12 *** sosmakaroni has joined #openttd
15:34:12 <sosmakaroni> Just an idea, wouldn't it be better to display the company color instead of just a plain color? This is how we solved it in the Hungarian set.
15:46:11 <_zephyris> Well, 2CC flipped here.
15:46:36 <_zephyris> sosmakaroni: ie. you're using the two recolourable palette entries? That's what's being done here too.
15:46:55 <_zephyris> Anyway, if there's an icon stylistic thing then that's a baseset problem I can think about.
15:48:26 <peter1138> I think there isn't really enough space to try outlining everything.
15:49:02 <sosmakaroni> _zephyris: Then I worded it poorly. π So, to somehow indicate that it is the company color, not just any color.
15:49:55 <xarick> throws from sqapi and catches on saveload.cpp?
15:50:33 <peter1138> _zephyris, original baseset icons are inconsistent with border.
15:50:54 <peter1138> But those that do are much larger, 20x20 pixels.
15:51:10 <peter1138> Default cargo icons, for instance, are not outlined.
15:51:28 <_zephyris> On the subject of which... does cola reuse the water icon?
15:54:16 <peter1138> static const SpriteID SPR_CARGO_WATER = 4310; // shared between desert and toyland ( SPR_CARGO_COLA )
15:54:20 <peter1138> static const SpriteID SPR_CARGO_COLA = 4310; // shared between desert and toyland ( SPR_CARGO_WATER )
15:54:46 <peter1138> static const SpriteID SPR_CARGO_NOTHING = SPR_ASCII_SPACE; // Placeholder for void cargo slots.
15:54:54 <peter1138> That's quite bad :)
15:58:43 <_zephyris> Hah, glad I'm not going crazy
15:59:06 <_zephyris> I did a dogfooding toyland game last night, couldn't work out what was going on there...
15:59:44 <_zephyris> Borderless. I tried making the dice bigger, but it messed with the neat alignment of the pips.
16:00:08 <_zephyris> Well, I can fix it in the extra newgrf
16:00:44 <peter1138> See, the border on my die basically there for constrast, rather than to be a solid border around it.
16:01:47 <peter1138> sosmakaroni, the implication is that if it has the blob of a single (or dual) colour, then it is company colour.
16:02:07 <peter1138> sosmakaroni, if it is some arbitrary colour, then nothing is needed, as you can see the colour in the preview image.
16:02:41 <peter1138> Of course, arguably 1cc is be the default and doesn't need an icon either.
16:03:04 <peter1138> But 2cc was traditionally highlighted because until you have different primary and secondary colours, it's not obvious.
16:09:40 <xarick> where do i check the original code at
16:21:31 <xarick> instead of return, it's throw
16:23:42 <xarick> but then it crashes openttd
16:24:46 <xarick> i just know there's an error which is silently ignored...
16:24:57 <xarick> and the vm continues as nothing happened
16:38:19 <peter1138> 10:41 < _zephyris> Welllll, arguably the background/field should be not aa and any emblazoned design should be aa, but meh
16:39:59 <peter1138> IIRC, I went with 15x10 because it allowed 3 vertical bars to fit nicely. But yeah, that stretches the 4:3 designs.
16:40:40 <peter1138> 16x12 keeps 4:3 and allows 2, 3 or 4 horizontal bars, and 2 or 4 (but not 3) vertical bars.
16:43:23 <_zephyris> The advantage of 12 wide is that it's a superior highly composite number
16:44:57 <_zephyris> I see that 9 tall is a pain though.
16:51:45 <frosch123> Did we have a `enum class` vs `enum struct` code style discussion?
16:51:45 <frosch123> (I just learned that the latter exists)
16:59:05 <peter1138> Apparently there are no differences.
16:59:39 <peter1138> We've been doing enum class.
16:59:58 <Rubidium_> though... isn't enum class really misleading since everything's public? :D
17:15:17 *** HerzogDeXtEr has joined #openttd
17:18:16 <frosch123> C++ as usual. Maybe nfo is not that bad :p
17:45:52 <Artea> if I put "autosave_interval = 0" it disables it ?
17:46:24 <Artea> or is "threaded_saves = false" ?
17:50:00 <Artea> peter1138: wanna make you slap my face ? minutes_per_calendar_year = 20160
18:01:27 <Artea> that was without inflation, with inflation is 10080 ;)
18:01:45 <Artea> not sure why I put this numbers
18:13:42 *** gelignite has joined #openttd
18:38:44 *** Wormnest has joined #openttd
18:49:35 *** tokai|noir has joined #openttd
18:49:35 *** ChanServ sets mode: +v tokai|noir
18:56:30 *** tokai has quit IRC (Ping timeout: 480 seconds)
19:00:49 <_glx_> xarick: Indeed GetRealInstance code is wrong, I forgot to enclose in SQ_SUCCEEDED
19:03:46 *** propvp has quit IRC (Quit: User went offline on Discord a while ago)
19:17:18 <johnfranklin> It is included in the source code
19:25:04 <andythenorth> python @dataclass
19:25:09 <talltyler> The user does not see the source code π
19:25:14 <andythenorth> can't keep up with how much stuff python has now
19:25:47 <talltyler> And the contributor can be a big boy/girl/person and deal with it π
19:26:08 <johnfranklin> but it would be downloadable from openttd.org; might be a problem
19:27:18 <michi_cc> And yet unless you poke around with grfcodec -d, you're still now going to see it.
19:33:26 <andythenorth> I would have skipped the argument
19:33:43 <Artea> congrats on all the work since ever
19:33:48 <andythenorth> flags fucntion to unite and divide
19:34:12 <andythenorth> dealing with them in a pixel train game is...lol
19:34:13 <Artea> also, who got the idea of transfers, just saw passageners from 3 different towns going to other town
19:34:25 <Artea> that was fabulous to see
19:36:06 <Artea> and for now, current on srv2 which have inflation and didn't felt it
19:36:58 <Artea> and a guest enjoying it
19:38:06 <_zephyris> All about maybe 20-30 pixels?
19:38:25 <_zephyris> Add geolocation to newgrfs.
19:39:19 <_zephyris> Or just remove both flags, if your country wants to ban a flag then no flag for you either.
19:41:16 <brickblock19280> Remove all flags not universally recognized and make the pr useless/j
19:41:59 <johnfranklin> Removing both is okay
19:42:50 <LordAro> johnfranklin: i'm not sure you've noticed, but you have no support for your position
19:43:20 <LordAro> (specifically the whole removing flags thing, but probably for your actual viewpoint too)
19:44:52 <andythenorth> "GPT: explain 'snatching defeat from the jaws of victory' as pertains to adding features in open source projects"
19:44:56 <andythenorth> oh, no GPT here? π
19:47:28 <talltyler> For what it's worth, I quite like badges and wish more GRF authors would weigh in with suggestions to add or improve it for their usecases, rather than trying to poke holes in a spec that Peter has repeatedly asked for input about π
19:48:18 <brickblock19280> Testing if a consist has a particular badge and the inverse would be great
19:49:18 <brickblock19280> Pretty sure that could make it possible for perfect grf side reversing behavior
19:49:50 <brickblock19280> But it's useful for way more than that which really ought to be it's own gameside thing
19:50:10 <talltyler> I am curious to see how we can filter the buy list by badges, in the future. The `role/` filter in particular would be helpful for the casual players I game with to choose locos without asking me for a recommendation every time π
19:50:36 <peter1138> Yea, I have a PR to help.
19:50:43 <peter1138> But not finished yet.
19:51:01 <talltyler> No worries, just trying to move the conversation forward instead of going in circles π
19:51:06 <peter1138> Because these things turn into side-quests.
19:51:19 <peter1138> Badges are action 3/2/1, so do support varactions.
19:51:48 <talltyler> Speaking of side quests, some of the `power/` icons in your badges docs are broken images.
19:51:53 <brickblock19280> What happens with icons if multiple badges share the same class?
19:52:29 <peter1138> talltyler, ah, I need to make sure I do a clean rebuild for docs to work properly
19:53:08 <peter1138> multiple badges sharing a class: for the purchase list, only the first badge icon listed on that item in each class is displayed.
19:53:21 <brickblock19280> The voltage icons also don't follow any preestablised colouring scheme
19:53:24 <peter1138> For text, they are concatenated together.
19:53:40 <peter1138> Quite, they are out of date because I didn't do a clean rebuild.
19:54:45 <peter1138> So there is a standard varaction variable for current date, current climate. Badge icons can vary by current date.
19:55:10 <peter1138> And there is a badge-specific variable for the introduction date, so badge icons can also vary by that.
19:55:26 <andythenorth> am I going to badge anything in Horse except trains?
19:55:45 <andythenorth> [organising my python] π
19:55:48 <peter1138> Might also add a custom recolour callback.
19:56:10 <andythenorth> what do railtype badges even do?
19:56:35 <peter1138> Not a whole lot. They can be automatically copied to trains of that type.
19:56:55 <peter1138> They do show in the drop down list.
19:56:59 <belajalilija> talltyler: I like it as i hear i can request additions
19:57:18 <belajalilija> brickblock19280: This summoned me
19:57:35 <talltyler> Reversing should be a core feature, not a GRF hack π
19:58:06 <talltyler> (I say this with no disrespect to GRF authors, I've done some bizarre GRF hacks in my industry sets π )
19:58:09 <belajalilija> talltyler: Weβre already prepared
19:58:58 <talltyler> Can a vehicle change badges over time, or just change the sprite of a given badge?
19:59:28 <peter1138> The badge itself can change its sprite.
19:59:47 <peter1138> Vehicles don't actually have badges, the underlying engine type does.
19:59:57 <frosch123> andythenorth: databases are awesome. In particular with the dacite package for deserialisation with type checking
20:00:11 <talltyler> Er, right, Engine is what I mean π
20:00:34 <brickblock19280> How should voltage badges be handled? Currently there is no way of showing combined voltages which means I would currently create a new badge and then add the others after it to have compatibility with code checking the varkables
20:00:44 <brickblock19280> That is quite cumbersome tho
20:00:46 <peter1138> If vehicles had badges, and then it was a callback to assign them to the vehicle, then... I'm sure lots could be done.
20:00:58 <peter1138> But also it wouldn't work in the purchase list. Just like cargo subtype liveries.
20:01:07 <peter1138> brickblock19280, IMHO, not.
20:01:16 <peter1138> Voltages add very little.
20:01:17 <talltyler> I don't think vehicles should have badges, just engines. I used the wrong term earlier.
20:01:35 <frosch123> Badges should be static, no callback
20:01:40 <peter1138> talltyler, I know, I was just clarifying. And also explaining why it's not callback driven.
20:02:08 <brickblock19280> They are implemented by sets so need some convention in order to be worthwhile implementing
20:02:25 <talltyler> By combined voltages, do you mean a multi-voltage vehicle like a Thalys PBKA?
20:03:32 <peter1138> Personally I would just include the various voltages as separate badges, and let the UI deal with it.
20:03:37 <brickblock19280> Here there is quite a difference between the need to have an icon and a text/code
20:03:55 <belajalilija> peter1138: What if a vehicle runs on 4 voltages?
20:04:10 <peter1138> Then it can have four voltage badges.
20:04:20 <belajalilija> Thatβd be messy
20:04:21 <talltyler> But only one is shown, correct?
20:04:38 <belajalilija> 4 voltage badges
20:04:50 <peter1138> Only the first one is displayed as an icon. The text is displayed though.
20:04:50 <brickblock19280> Makes the most sense too
20:04:58 <peter1138> Having it separate means you can filter for it as well.
20:05:08 <belajalilija> peter1138: Okay this works
20:05:09 <talltyler> Actually, what if badges were static but there were a way to choose which icon was shown in the purchase list? That would handle the "variable company logo" usecase, I think.
20:05:28 <talltyler> I don't know exactly what that looks like, though π
20:05:32 <peter1138> talltyler, yes, that's done by listing the one you want to display first :)
20:05:36 <brickblock19280> peter1138: That is a regression in usability
20:05:48 *** gelignite has quit IRC (Read error: Connection reset by peer)
20:06:19 <brickblock19280> Only showing one of the 4 voltages in the list entry
20:06:31 <andythenorth> how many people have actually got badges in their grfs?
20:06:37 <andythenorth> [asking for a friend]
20:06:57 *** gelignite has joined #openttd
20:07:21 <peter1138> I would either go for a generic "power/electric" first, and then the different voltages (because if it's mixed voltage, guess what, it doesn't really matter) or ... you could define a single shared badge that combines them all, but then also list the individual voltage badges as well.
20:07:27 <brickblock19280> We do have it embedded in the sprites currently and the lack of appropriate sprites for this is a current blocker
20:07:47 <Rubidium_> shouldn't the PBKA have 5 badges? "Multi-voltage" and then all specific voltages?
20:07:49 <brickblock19280> peter1138: That is what I was thinking too
20:08:18 <brickblock19280> We could have icons be independent from badges and show up when the right badges are present
20:08:37 <talltyler> Hmm, if the Engine has badges for multiple voltages but you don't have a railtype GRF installed (and therefore only have ELRL), do the voltage badges still show up?
20:08:50 <talltyler> (Probably yes, but "should they?")
20:08:55 <belajalilija> talltyler: Currently yes
20:09:03 <brickblock19280> I think that's fine
20:09:11 <brickblock19280> Could be dealt with but why
20:09:24 <brickblock19280> Just query the railtype availability
20:09:26 *** kuka_lie has quit IRC (Quit: Lost terminal)
20:09:58 <talltyler> Sorry, not trying to poke holes, just thinking about Andy's earlier question "why do railtypes have badges?" π
20:09:59 <peter1138> If you assign a badge to the railtype with the copy flag, and then set the engine to that railtype, the badge will be copied to the engine.
20:10:19 <peter1138> If the railtype doesn't exist, then it won't be set on a railtype, and the engine won't have that badge. But then also the railtype won't exist, so...
20:10:24 <brickblock19280> I'm not sure I like that tbh
20:10:36 <andythenorth> don't set the copy flag then π
20:10:51 <talltyler> That sounds ideal, smart design π
20:11:01 <brickblock19280> It is out of control for the vehicle gtg tho isn't it?
20:11:14 <andythenorth> railtypes control vehicles already
20:11:19 <andythenorth> it's entirely consistent
20:11:33 <peter1138> Okay, well we're obviously at cross purposes, because 1 second I see you asking for one thing, then I suggest a way, and you don't want that thing after all.
20:11:37 <brickblock19280> Might as well not bother with badges on the trains then
20:12:37 <brickblock19280> But I like that it makes the icon be able to show it related to the tracks loaded but only if it is preferred over the vehicle which could be incorrect in other cases
20:12:40 <andythenorth> sometimes I wonder if we could have done it differently
20:12:47 <andythenorth> OpenTTD 2 never happened π
20:13:02 <andythenorth> but "power" is this recurring lol
20:13:06 <talltyler> For trains wouldn't you set generic diesel/electric/steam labels on the engine, and the specific voltage on the railtype?
20:13:10 <andythenorth> power, and ground, the 2 big lolz
20:13:42 <talltyler> I dunno, I think badges make this all make sense
20:13:55 <peter1138> Sometimes I just think I'm stupid because I can't figure out what the problem is.
20:13:56 <andythenorth> yeah my comment was unrelated to badges π
20:14:25 <peter1138> So far badges are both good and bad and people are going to both use them and not bother.
20:14:37 <andythenorth> I have fallen in the 'but why so many railtypes just for electrification` π
20:14:41 <talltyler> I think the "not bother" comment was "put the badges on the railtypes" not "don't use badges"
20:14:53 <andythenorth> and also 'why so many railtypes just for ground sprite'
20:15:08 <brickblock19280> That then changed to not putting them on the trains and back again
20:15:35 <andythenorth> oof I was doing badges
20:15:39 <brickblock19280> BGT without all the extra stuff would be nice
20:15:40 <andythenorth> now I refactored all of Horse
20:15:51 <andythenorth> now it's very broken
20:15:53 <peter1138> Ahhh, I just realised I need to completely whipe the existing images first, because it doesn't create them.
20:16:02 <brickblock19280> Basically just ground and road underlay
20:17:49 <brickblock19280> Are vehicle badges preferred over railtype ones for the icon?
20:18:44 <brickblock19280> It would be nice if railtype badges could be drawn in the drop down list as they currently that info is implemented with incredibly long strings
20:19:42 <andythenorth> we're at the point where railtypes need a palette
20:19:45 <andythenorth> like stations or such
20:19:51 <andythenorth> [from what I've seen]
20:20:52 <peter1138> TBH railtype badges are a bit of a "why not just add the property everywhere" thing, so I've not put a huge amount of thought into where things should be.
20:21:41 <peter1138> rail vehicles can't query the badges of the tile they are currently on... although.... maybe they could...
20:22:45 <andythenorth> you know what I'm thinking now
20:23:49 <andythenorth> whistle boards eh
20:24:10 <andythenorth> hmm....could vehicles turn on headlights in tunnels?
20:24:24 <andythenorth> can we add a lighting effects layer / feature?
20:24:27 <talltyler> I think engines being able to inherit badges from railtypes is hidden genius, if you didnβt plan that as a main feature π
20:24:33 <andythenorth> considering floodlights on industries
20:25:38 <geertop> andythenorth: I heard some br trains trains whistle sometimes. Idk when it triggers. I thought it was just a part of the soundtrack.
20:26:20 <brickblock19280> peter1138: I feel like that would further confuse checks for if a tile is powering a vehicle without much of an advantage
20:26:30 <talltyler> Would railtypes ever have more than one badge? Said badge could be used in place of the railtype icon in the dropdown, which is typically not that useful or already shows a voltage indication to pretend to be a badge
20:26:34 <andythenorth> I have horrible ideas about axle load
20:26:43 <talltyler> Keep those to yourself π
20:27:06 <peter1138> brickblock19280, not really. NewGRFs never have to check that because it's something the game does.
20:27:34 <brickblock19280> They do if the voltage or something changes the power
20:27:35 <peter1138> I believe a varactions already exist to let you know if you are powered or not.
20:27:55 <talltyler> Badges per tile sounds ripe for abuse. Imagine whistle posts implemented as a railtype π
20:28:00 <brickblock19280> Yeah and people might use the badge check instead of that which I think is worse
20:28:08 <peter1138> Yeah, I mean, that already happens, badges aren't involved at all.
20:28:44 <andythenorth> "people might do X" has been used quite often to block grf spec features
20:28:50 <frosch123> peter1138: I wondered whether it needs three copy flags: "copy to equivalent track types only" and "copy to all compatible"/"powered"
20:29:04 <andythenorth> I like badges, they're simple, widely available
20:29:09 <talltyler> True, I retract my argument
20:29:12 <andythenorth> they're static action 0, so deterministic
20:29:18 <andythenorth> and they're arbitrary
20:29:23 <peter1138> Yeah, I didn't really think about compatible/powered when I implemented Copy.
20:29:25 <andythenorth> they solve a lot of problems
20:29:57 <peter1138> talltyler, objects, houses, industries and industrytiles have badges. That is by definition per tile :)
20:30:06 <talltyler> I will freely admit that Iβm feeling a bit closed-minded today π₯²
20:30:46 <frosch123> Not sure whether there is a usecase for compatible/powered,maybe only equivalent makes sense
20:34:40 * andythenorth back to refactoring Horse
20:35:07 <xarick> _glx_: is opening a can of worms π
20:35:27 <_glx_> no it was a bug in my code
20:35:42 <xarick> now you're going to get a crash in saveload.cpp
20:36:02 <xarick> and an (undefined string)
20:36:36 <_glx_> easier to fix when there's a crash
20:37:01 <andythenorth> 3000 refactoring sentries
20:37:23 <_glx_> GetRealInstance was allowed to convert garbage into an objec
20:43:20 <peter1138> Maybe I should refactor instead of Doom.
20:48:32 <andythenorth> I am refactoring instead of Blitz
20:49:11 <Rubidium_> maybe try blitz-refactoring?
20:50:44 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
20:52:49 <_zephyris> andythenorth: Totally possible, if you feel like a sidequest. In the `spritelayout`, set add a `childsprite` with `recolour_mode: RECOLOUR_TRANSPARENT`, and point to a custom recolour sprite `palette: <custom recoluor>`. Then you'll need to provide a custom recolour sprite which shifts colours brighter and/or yellower - I'd try mapping to `3C..45` (yellows) or a general lighten like the inverse of
20:52:49 <_zephyris> `PALETTE_TRANSPARENT`.
20:53:16 <andythenorth> I was going to say we need a way to turn them off
20:53:23 <andythenorth> but GS storybook can do it
20:53:30 <andythenorth> this might be a valid sidequest
20:53:38 <_zephyris> but you want your effects layer π
20:53:43 <andythenorth> did you see my GS Zeppelin bomber?
20:53:53 <_zephyris> hah, no, sounds amazing
20:56:07 <andythenorth> we under-use what OpenTTD can actually do π
21:02:59 <peter1138> Hmm, figured it out. I was wondering why a different badge with exactly the same settings is being documented properly, but this other isn't.
21:03:53 <peter1138> Anywa, it's not working precisely because it's the same settings, with the same fingerprint, so my code is not being called :s
21:10:54 <belajalilija> Iβm certainly interested in using the badges but probably not for power if thatβs possible unless we can request every possible combination brickblock19280
21:11:40 <brickblock19280> We can make every combination and just use the default ones underneath for compatibility with other sets which might want to know
21:12:02 <brickblock19280> It does man having more text tho
21:12:31 <brickblock19280> We probably want to do that to keep the correct colours anyway
21:13:56 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:25:26 <LordAro> andythenorth: how are you controlling where it goes?
21:25:27 <_glx_> xarick: ok it's actually another bug in GetRealInstance
21:29:30 <andythenorth> LordAro: I patched locally so GS can skip orders on a named vehicle
21:29:45 <andythenorth> then there are 4 airports in the orders, 1 for each compass point
21:30:10 <andythenorth> GS can do lots of stuff, but squirrel 2 is shit
21:30:25 <andythenorth> and there's clear eye-roll about GS extension π
21:30:37 <andythenorth> it's nearly really really good though
21:31:15 <andythenorth> the zeppelin is very laggy, but it predates AsyncMode
21:39:05 *** gelignite has quit IRC (Quit: Stay safe!)
21:54:51 *** akimoto has joined #openttd
22:02:04 <wensimehrp> _zephyris: imo 12x12 is too small to inlcude text or comany logos. I was using 16x16
22:12:26 *** akimoto has quit IRC (Remote host closed the connection)
22:17:16 <peter1138> Badges are 12 pixels tall to fit into standard purchase list line height.
22:19:05 <_zephyris> A present: JR logo in 11x5 px
22:20:36 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:27:09 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
22:30:26 <xarick> `static std::array<unsigned int, MAX_COMPANIES> max_opcodes = {0};` this looks ugly, but as long as it does what I think it does... fine
22:31:43 <wensimehrp> peter1138: makes sense then
22:32:14 <xarick> explicitly initialize all stuff!!!
22:32:28 <peter1138> xarick, it doesn't.
22:32:47 <xarick> π¦ what the 0 does then?
22:32:57 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:34:07 <peter1138> It sets the first element of the array to 0.
22:43:15 <xarick> dont know how to do this properly
22:46:51 <xarick> `uint AI::max_opcodes[MAX_COMPANIES];` original code
22:47:03 <peter1138> Just leave out the 0.
22:47:17 <xarick> I tried, but it won't compile due to LINK stuff
22:47:25 <peter1138> `std::array<uint, MAX_COMPANIES> max_opcodes{};`
22:47:43 <peter1138> (And don't start using `unsigned int`)
22:49:53 <xarick> 'AI::max_opcodes': a static data member with an in-class initializer must have non-volatile const integral type or be specified as 'inline'
22:53:38 <peter1138> It means you're trying to declare and define it in the header file.
22:54:30 <peter1138> So in the class, declare it as `std::array<uint, MAX_COMPANIES> max_opcodes;`
22:54:53 <peter1138> Then in the implementation, do `/* static */ std::array<uint, MAX_COMPANIES> AI::max_opcodes{};`
22:56:50 <xarick> oh, it's in 2 places...
22:57:37 <xarick> it's funny, I coded this...
23:11:33 <peter1138> Investing in "AI" is a bit like investing in NFTs and cryptocurrencies.
23:15:37 <frosch123> At least job offers stopped asking for blockchain skills
continue to next day β΅