IRC logs for #openttd on OFTC at 2025-02-17
โด go to previous day
01:36:43 *** reldred has joined #openttd
01:41:53 *** toktik has quit IRC (Remote host closed the connection)
02:50:47 <johnfranklin> SpongeBob SquarePants
03:12:37 *** Wormnest has quit IRC (Quit: Leaving)
03:19:50 *** Flygon has quit IRC (Remote host closed the connection)
03:48:34 *** D-HUND has quit IRC (Ping timeout: 480 seconds)
04:43:36 <DorpsGek> - Update: Translations from eints (by translators)
07:22:37 <truebrain> The survey failed to render, seems there is a report with a version that is unexpected. Will check it out tonight ๐
07:41:09 *** asymptotically2 has quit IRC (Remote host closed the connection)
07:42:45 *** asymptotically2 has joined #openttd
08:38:23 <peter1138> Hmm, looks like eints didn't fix up those translations, it removed them :S
10:06:49 *** kuka_lie has joined #openttd
10:07:56 <andythenorth> โAbove snowlineโ badge
10:12:58 *** fairyflossy has joined #openttd
10:37:07 <xarick> who's an ai_sl / game_sl expert here?
10:37:44 <DorpsGek> LordAro: Don't ask to ask, just ask
10:37:58 <LordAro> (i know you don't get the response, but still)
11:01:39 <xarick> do I need to add something to _ai_company_sl_compat
11:01:40 <peter1138> Urgh, case-sensitivity biting me :(
11:22:05 <xarick> the selected script version does not persist after relaunching openttd
11:23:12 <xarick> is this about loading from openttd.cfg?
11:24:31 <peter1138> AAAHogEx = disable_veh_aircraft=1,disable_veh_roadveh=1,disable_veh_ship=1,disable_veh_tram=1
11:24:38 <peter1138> No version information is retained.
11:25:19 <peter1138> 54454D07|CDC3E1EA3EE9F674539A002CECEB4761|temporal8_real_bus_32_bpp-1.1/real_bus_1_1.grf = 0
11:25:49 <peter1138> Conversely for NewGRFs, you get GRF ID, md5sum, and the path and filename.
11:27:23 <_glx_> Hmm I remember config using name.version =
11:30:16 <_glx_> But not storing the version in config makes sense, since forcing version via CTRL in gui is a special case
11:33:19 <peter1138> Maybe it does. I didn't pick a specific version.
11:34:26 <xarick> I'm trying to add a force_exact_match into somewhere config
11:34:48 <peter1138> Yeah, no, it doesn't seem to.
11:36:41 <xarick> loading old saves is apparently setting force_exact_match to true... should be false
11:38:41 <peter1138> Is true your current value for that setting?
11:39:54 <_glx_> Settings are stored on the save, if you add a new setting it will use default value I think
11:40:33 <peter1138> Current vs default.
11:40:50 <peter1138> Doesn't look like scripts were ever saved with anything other than name.
11:41:10 <peter1138> Unless the version was included as part of the name.
11:42:45 <xarick> Free all current data, should also set the thing to false, i guess, let's test
11:47:23 <xarick> something in the address checking is returning 1
11:48:24 <_glx_> AI and GS chunks store name and version
11:52:48 <xarick> oh, it's not initialized to anything ๐ฆ
11:53:00 <xarick> when pulling the config
11:53:22 <xarick> and that anything becomes true for some random reason
11:54:29 <xarick> AIConfig::GetConfig(c, AIConfig::SSS_FORCE_GAME)->Change(std::nullopt);
11:59:02 <_glx_> It reads data from the save
12:00:02 <xarick> it looks correct, it's an old save, it doesn't have force_exact_match
12:00:17 <xarick> but still turns it to 1 ?
12:01:04 <_glx_> It should stay to the set value
12:03:27 <xarick> oh, there's another after
12:04:26 <xarick> aha! found the culprit, this is wrong
12:07:46 <xarick> now it's loading the config from Company::ai_config
12:08:08 <xarick> force_exact_match over there is true ๐ฆ
12:09:59 <xarick> ah, but then it changes the config it just loaded
12:10:04 <xarick> lol, walking in circles
12:11:10 <xarick> config->force_exact_match becomes equal to the value of _ai_saveload_force_exact_match which is false
12:11:20 <xarick> okay, so what was wrong again? I'm confused
12:12:14 <xarick> it's working... why did I see it as not working?
12:17:06 <_glx_> When loading it uses exact match first, then latest version, then random
12:20:09 <xarick> saveload.cpp line 874, it's trying to load a bool value of false as 1
12:21:50 <xarick> oh, it was saved as true?
12:22:06 <xarick> i better re-do the save
12:53:10 <andythenorth> Are badges in jgrpp yet? ๐
12:54:02 <peter1138> They're not fully in vanilla yet, so that would seem a bit premature.
12:54:40 <LordAro> what about EncodedString and all the strongtype stuff? :p
13:03:50 <peter1138> That's not fully in vanilla yet, os that would seem a bit premature.
13:15:54 *** simonmb6044 has joined #openttd
13:15:54 <simonmb6044> andythenorth: what even are badges in the context of OpenTTD?
14:00:30 <FLHerne> standard way to add flags and other symbols to vehicles in the purchase list, instead of grfs embedding them in the vehicle sprite in inconsistent ways
14:05:41 <xarick> is it even possible to not have a script but still match the name?
14:07:06 <xarick> oh, is it looking for a dummyai
14:13:11 <peter1138> It's not looking for a dummy ai, it's looking to see the name that was saved in the savegame doesn't contain that string.
14:22:25 <_glx_> I think this code only runs when loading a save from before SLV_AI_LOCAL_CONFIG
14:23:13 <_glx_> when running and non running shared the same space
14:33:13 <_glx_> yup 2 steps, config then active
14:34:16 <xarick> this part is becoming complex
14:34:24 <xarick> more than it already was
14:37:29 <_glx_> but current code already handles exact match
14:40:27 <_glx_> or it's supposed to do that
14:43:42 <_glx_> ah no it's the latest compatible, then latest, then random
15:01:37 <johnfranklin> Hello, there is another problem toward bananas uploading. Some user just mass uploaded many "abandoned" newgrfs but it is highly unlikely (althought yet to be proven) they were the author, or they were permitted by the author.
15:01:50 <johnfranklin> The problematic username is "MonsterhunterIndonesia"
15:02:12 <LordAro> this channel is not the place for this
15:02:23 <johnfranklin> abuse@openttd.org?
15:02:50 <LordAro> ideally from the authors
15:02:55 <LordAro> (but as you say, abandoned)
15:11:43 <xarick> something's missing yet
15:12:06 <xarick> i configure a slot with this->show_all set to false
15:12:48 <xarick> but when the game starts, this->force_exact_match is somehow true
15:13:13 <xarick> true (205) meaning it's not even initialized
15:15:02 <peter1138> johnfranklin, do you represent the copyright holder?
15:16:14 <xarick> first AAAHogEx was v90 and force_exact_match false. in the folder there's v91 which is compatible with v90
15:16:31 <xarick> when i load back the same, i expected it to switch to v91
15:17:13 <xarick> somewhere between configuring the slot and starting a new game changes the value of force_exact_match to uninitialized
15:17:43 <xarick> saving seems fine, it's just that it's already wrong
15:46:43 *** gelignite has joined #openttd
15:50:02 <xarick> ah, `ScriptConfig::ScriptConfig(const ScriptConfig *config)` I'm onto something
15:50:15 <xarick> this is the initializer
16:18:55 *** virtualrandomnumber has joined #openttd
16:19:49 *** virtualrandomnumber has quit IRC ()
16:51:21 <_glx_> and that confirms we should have extra validation everywhere ๐
16:56:30 <peter1138> Ah, `sq_pushstring` uses `const std::string &`
16:58:29 <Rubidium> though sq_pushstring can be made std::string_view as well I guess
16:58:53 <Rubidium> the std::string version does not do much more than calling the char* version
16:59:07 <Rubidium> with .data() and .size()
16:59:49 <peter1138> Why is it std::optional?
17:01:41 <_glx_> because template <> struct Return<std::optional<std::string>> is the safe way to pass strings to squirrel
17:02:16 <_glx_> and I used the existing GetClassName to to _typeof
17:03:33 <peter1138> That has the side-effect of copying the strings around :(
17:04:20 <peter1138> Probably a not huge issue but if it can be avoided...
17:06:07 <_glx_> hmm can affect performance since it will happen every time a non static function is called (for ScriptLists for instance)
17:07:18 <Rubidium> could add a Return<std::optional<std::string_view>> as well, but then you need to be sure about the validity of the view after the function returns
17:08:21 <peter1138> Ultimately sq_pushstring will be making a copy of string anyway.
17:08:44 <peter1138> But a std::string_view version of Param Get() would be a problem.
17:09:07 <peter1138> I'm not sure on all the interaction going on here.
17:11:30 <xarick> i remember there was a company that would set it's name to some gibberish after some patch
17:12:00 <xarick> I think it was actually called null
17:12:21 <xarick> it never called that before
17:13:32 <xarick> trying to remember which AI it was...
17:17:54 <_glx_> oh I could do it in a different way
17:21:28 <xarick> may I suggest something?
17:22:25 <xarick> if it's naming stuff that also has a default name by omission, can you make a distinction between null and empty string? making empty string to revert back to the default name, and null to cancel?
17:49:23 *** HerzogDeXtEr has joined #openttd
17:51:03 <xarick> why there's a difference?
18:01:15 <peter1138> Right, test badge of nearby tile, right?
18:08:59 <xarick> need to do one more thing
18:09:32 <xarick> persisting configs between openttd runs
18:11:39 <_glx_> no string copy this time
18:15:24 <_glx_> xarick: because we still load AI's `is_random` from old save, but ignore it for any GS (it was useless anyway)
18:19:25 <xarick> oh, .ini files are also versioned
18:22:09 <peter1138> Hmm, this is a bit more complicated.
18:44:05 <peter1138> How many registers can I use? :D
18:48:20 <truebrain> right, survey failed to generate .. let's find out who did something bad!
18:48:53 *** ChanServ sets mode: +v tokai
18:49:08 <truebrain> Windows did ... lol
18:49:36 <truebrain> `Windows 6.1.7601 (Service Pack 1, v.721)`
18:49:46 <truebrain> `v.721` .. wtf is that dot doing there?
18:50:24 <peter1138> I'm surprised you parse that, tbh.
18:50:41 <truebrain> knowing whether it is Windows 10 or Windows 11 is very useful ๐
18:50:46 <truebrain> and Windows internal versions are dogshit
18:50:59 <peter1138> 110 lines, checking for badges on different tile types :S
18:51:11 <truebrain> `10.0.x` till `10.0.22000` is Windows 10, otherwise Windows 11 .. I mean .. who does that?!
18:52:56 <truebrain> dogshit, is what their version numbering is ๐
18:53:02 <Rubidium> so after more than a year someone with Windows 7 finally used OpenTTD?
18:53:06 <truebrain> "how to annoy people in 2 easy steps" ๐
18:53:13 <truebrain> no, we have Win7 users
18:53:17 <truebrain> just not with this SP1 variant
18:53:49 <truebrain> 2.9% played on Windows 7 in 2024Q4
18:54:06 <truebrain> it is more popular than Windows 8 .. with 0.5%
18:54:44 <Rubidium> well, I'd reckon it's not the final SP1... I only found a reference to v.721 being a release candidate. Like... how?!? Running a release candidate service pack of something that's out of support for years
18:55:07 <truebrain> we still have that one person that asks for a WinXP build every year
18:55:54 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
18:57:19 <Rubidium> well, I can imagine staying on an old operating system. Though running a release candidate (so you're actively testing the 'latest') and an old operating system are a bit juxtaposed
18:59:22 <DorpsGek> - Add: summary for week 07 of 2025 (by OpenTTD Survey)
18:59:35 <peter1138[d]> Hmm, maybe a new tile func?
19:00:06 <peter1138> What badges does a void tile have?
19:00:27 <truebrain> "pretty to fly over"
19:00:36 <truebrain> "endless nothingness"
19:01:58 <LordAro> "accurate representation of <insert person here>'s heart"
19:02:14 <truebrain> who has hurt you today?
19:03:03 <LordAro> people who can't answer a question properly
19:03:38 <LordAro> "you need to go via channels for this very direct question because i'm too busy to respond"
19:05:11 <LordAro> "you checked out this computer 2 years ago, only you can answer this question"
19:06:06 <truebrain> so it was that kind of a day ...
19:06:36 <LordAro> i'm not taking it personally because this guy genuinely is busy beyond anything reasonable, but that's someone else's mismangement problem, nothing to do with me
19:07:38 <truebrain> you should email your manager exactly that ๐
19:07:54 <LordAro> i have suitably whined about it, yes
19:11:05 <truebrain> mentally, that is ๐
19:11:44 <LordAro> i also got my bike (mostly) fixed today, which is always nice
19:11:59 <truebrain> mostly ... so it is still missing two tiers? ๐
19:12:10 <LordAro> front mech needs replacing
19:12:31 <LordAro> i had no idea what you meant :p
19:12:35 *** michi_cc has joined #openttd
19:12:35 <michi_cc> We could release beta2 now, just to up the quota of "nice" reports ๐คฃ
19:12:39 <truebrain> hand faster than brain, or something
19:13:21 <truebrain> michi_cc: at least the changelog is one big "Codechange" ๐
19:15:16 <truebrain> (this will not get old)
19:15:48 <peter1138> I should see about adding those default badgers.
19:15:59 <truebrain> it is funny to me how we finally got ride of flags in multiplayer, only to get them back in badges ๐
19:16:28 <truebrain> flags are cool ๐
19:16:29 <peter1138> Yeah, but those flags were used to represent language.
19:16:37 <peter1138> Also they were about 6 pixels tall.
19:16:44 <truebrain> which was terrible, using flags for languages
19:18:31 <peter1138> Should nearby tile badge tests be limited to same feature?
19:18:40 <peter1138> House can only test house.
19:19:29 <peter1138> Nah, of course not, I've over-engineered it.
19:19:44 <wensimehrp> wow, nearby tile badge tests
19:20:16 <truebrain> this will not be ... "mis"used at all ๐
19:20:38 <truebrain> Game of Life via badges when?
19:21:54 <wensimehrp> ^^ inter-grf information exchange
19:21:54 <wensimehrp> Is the nearby tile badge test limited into the scope of a single grf?
19:24:03 <talltyler> truebrain: Hey, I wrote at least one feature since beta1, house placement and protection ๐
19:24:17 <truebrain> like I said: `Codechange`
19:24:35 <talltyler> I suppose I did change the code ๐ค
19:25:02 <wensimehrp> I'll close my PR then ๐
19:25:08 <talltyler> New job title: Codechanger
19:25:21 <truebrain> I had a discussion today with a colleague why `add:` is just a weird prefix ... so many code "adds" stuff .. not really descriptive. `fix`, `feat`, all fine .. but `add` .. semantic commit messages ftw!
19:25:27 <peter1138> 19:21 < wensimehrp> Is the nearby tile badge test limited into the scope of a single grf?
19:25:30 <peter1138> I was answering that.
19:26:01 <talltyler> Yeah, we seem to use Add as halfway between Change and Feature, which doesnโt make that much sense
19:26:21 <wensimehrp> yeah, and NO means that e.g. station tiles can do inter-grf information exchange, right?
19:27:06 <truebrain> talltyler: It doesn't, but we got used to it. But if you start a new project ... ๐
19:27:11 <peter1138> Not really. They can only see what badges something else has. But badges don't change at runtime, so you can't really communicate that way.
19:27:43 <wensimehrp> I thought IDs don't change at runtime as well
19:28:38 <truebrain> it is annoying ๐
19:28:55 <peter1138> If I knew what I'm supposed to know, that'd be helpful.
19:35:29 <wensimehrp> peter1138: I'm a bit confused by this point. The intention of PR #12880 was to give station tiles the ability to detect station IDs that are defined by other GRFs, so that station tiles defined by multiple GRFs could share information and change correspondingly. As you said, _the nearby tile badge test is NOT limited to the scope of a single GRF_, which overlaps the goal of #12880. Then you said
19:35:29 <wensimehrp> > ...badges don't change at runtime.
19:35:29 <wensimehrp> Which is true since badges are properties? But IDs also don't change at runtime. If tiles can communicate with each other using IDs, why cannot they use badges? Or are you referrring to something like vehicle variable `0x61`?
19:35:50 <wensimehrp> I think I overlooked something
19:36:48 <peter1138> Yes, you seem to be under some assumption that nearby tile badge tests are anything to do with station IDs at all.
19:37:19 <michi_cc> IDs are unique, badges aren't. To test for example for a passenger-type platform, you'd have to hardcode all possible IDs insted of just testing for one badge that is defined by multiple station (tiles).
19:37:39 <peter1138> "Does the tile at -1, -1 have badge X" is not specific to stations.
19:38:04 <peter1138> And while it is information that can be used to decide things, it is not "communication with each other"
19:41:51 *** gwyd4016 has joined #openttd
19:41:52 <gwyd4016> What do we mean by communicate is an important point
19:48:42 <peter1138> He has eyes set on Pool's ZeroedMemoryAllocator :-)
19:49:27 <Rubidium> well... Pool doesn't use that one
19:50:27 <peter1138> Ah no, Pool is calloc.
19:52:30 *** _zephyris has joined #openttd
19:52:30 <_zephyris> Can we have a default badger badge?
20:08:00 *** benjaminv has quit IRC (Quit: Gateway shutdown)
20:09:19 *** benjaminv has joined #openttd
20:10:21 <peter1138> `auto *cee = c->old_economy.begin();`
20:10:27 <peter1138> Probably don't want the * there :-)
20:10:52 <peter1138> (I was in the wrong bit of github which doesn't let you comment, sorry)
20:19:37 *** benjaminv has joined #openttd
20:20:03 *** virtualrandomnumber has joined #openttd
20:27:04 <andythenorth> We could instrument the vehicle badger performance ๐
20:27:17 <andythenorth> The Horse forks uses the var
20:31:42 <peter1138> There is a profiler somewhere isn't there?>
20:33:23 <peter1138> Also, count of badges in an area? Hmm.
20:34:44 <xarick> dummyAI trying api 1.15?
20:45:15 <_glx_> xarick: 1.15 doesn't exist
20:46:40 <_glx_> and dummy doesn't set any api version
20:47:50 <peter1138> = default not quite the same?
20:51:09 <peter1138> Oh because pools are naughty, and index is set by the allocator, before the constructor.
20:52:20 <xarick> nice, it is persisting
20:52:22 <peter1138> I've been wondering before if we could somehow ditch the magic and do something like `EngineRenew *renew = EngineRenewPool::New();`
20:52:45 <peter1138> Of course all the new/delete would need to be replaced :S
20:52:47 <frosch123> When will we replace all the new with a varadic create method?
20:52:58 <peter1138> It's not just me then?
20:53:16 <frosch123> Lol, yeah, too slow typing on mobile
20:55:04 <frosch123> But yes, "index" as first argument of private constructor. Then a public static "New"/"Create" forwarding its args
20:58:40 <Rubidium> New/Create can also just store the new id in the pool, and the PoolItem constructor could read that. Might be less cumbersome to implement.
21:00:15 <frosch123> Adds global state though
21:05:00 <Rubidium> well... technically that state already exists, this would work: this->index = Tpool->first_free - 1;
21:05:01 <peter1138> Wouldn't something like ::Create(x, y, z) just forward to EngineRenew(index, x, y, z) : PoolItem(index), ... {}
21:06:55 <Rubidium> yeah, though s/PoolItem/EngineRenewPool::PoolItem<&_enginerenew_pool>/
21:07:26 <peter1138> I was simplifying :)
21:07:54 <xarick> > [2025-02-17 21:06:57] dbg: [script:0] The GameScript by the name '.2' was no longer found, and removed from the list.
21:11:45 <xarick> oh, it actually saved with that name... that's horriful
21:15:23 *** virtualrandomnumber has quit IRC (Quit: virtualrandomnumber)
21:16:35 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
21:22:03 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:36:26 <_glx_> (and after testing it doesn't show the warning)
21:36:41 <_glx_> I guess next step is changelog and release
21:37:34 <peter1138> I guess it'll stop people wondering about the warning, but... OpenGFX 2...
21:44:16 <xarick> I was expecting "League Tables".2
21:44:23 <xarick> but i guess that's also fine
21:44:44 <_glx_> "League Tables".2 would be invalid
21:45:05 <xarick> oh, so that's the way it's supposed to be
21:48:21 <xarick> `int v = std::atoi(ver.c_str());`
21:48:28 <xarick> is this the correct one?
21:48:41 <xarick> will not format the version number, I hope
21:49:44 <_glx_> ver is pointing to after the `.` I guess
21:51:18 <_glx_> so yes v will be 2 for "League Tables.2"
21:51:37 <xarick> what about those numbers as big as 453536
21:51:57 <_glx_> read about std::atoi ๐
21:52:37 <xarick> there was a stoi too, i was not sure
21:53:53 <peter1138> All those symbols everywhere must get quite tiring...
21:56:07 <_glx_> they are barely visible in night mode ๐
21:57:04 *** kuka_lie has quit IRC (Quit: Lost terminal)
22:01:11 <peter1138> Wtf, the plane crashed and ended up upside down.
22:05:43 *** tokai has quit IRC (Remote host closed the connection)
22:06:30 *** ChanServ sets mode: +v tokai
22:08:17 <xarick> must update pr description
22:20:38 *** gelignite has quit IRC (Quit: Stay safe!)
22:21:20 <xarick> that ai_sl and game_sl part is very ugly, might need help there
22:24:10 <_glx_> and you removed the latest compatible for not forced
22:25:05 <_glx_> ah no, but it's impossible to read the flow
22:26:56 <xarick> oops, small bug in settings.cpp
22:30:05 <xarick> waiting for codeql report
22:40:54 <_glx_> not compiled and not tested
22:44:27 <_glx_> might need some adaptation in Debug lines
22:45:26 <_glx_> to conditionally display "forcing "
22:47:01 <_glx_> "..., {}version...", <force> ? "forcing " : "",...
22:47:05 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
23:04:12 <xarick> smart skipping one of the checks
23:08:34 *** keikoz has quit IRC (Ping timeout: 480 seconds)
23:27:54 <xarick> found one other bug ๐
23:37:18 <xarick> names are being moved into the wrong slots ๐ฆ
23:44:48 <xarick> is intended that reading openttd.cfg configs on slot 3 gets moved to slot 2 if the config on slot 2 doesn't exist?
23:45:11 <xarick> unexpected nice feature, I guess
23:47:29 <xarick> anyway, I'm off to bed, kinda late already
continue to next day โต