IRC logs for #openttd on OFTC at 2024-01-29
โด go to previous day
00:12:02 <_glx_> CompanyID and OwnerID are compatible but not the same, so a cast is needed
00:22:32 <talltyler> I refuse to say how many times I've seen this bug and failed to report it ๐
00:25:10 <_glx_> but we don't check annotations ๐
00:31:17 <_glx_> (the biggest issue with nml, lack of reviewers)
00:54:29 <peter1138[d]> talltyler: please test, I haven't.
00:57:25 <peter1138[d]> Okay, I have tested it now, heh.
00:58:37 <peter1138[d]> (That'll be someone's space bar sure)
00:59:49 <peter1138[d]> Fixed title, can fix commit in merge ๐
01:00:27 <peter1138[d]> At least regression never tests NewGRF so that won't break.
01:07:37 *** tokai|noir has joined #openttd
01:07:38 *** ChanServ sets mode: +v tokai|noir
01:13:37 <peter1138[d]> Lots of nope ๐
01:14:20 *** tokai has quit IRC (Ping timeout: 480 seconds)
01:52:55 <talltyler> Thanks for the quick fix ๐
01:53:34 <_glx_> hmm I need to rewrite the workflows ๐ฆ
03:30:14 *** debdog has quit IRC (Ping timeout: 480 seconds)
04:48:18 *** D-HUND is now known as debdog
05:53:03 <emperorjake> truebrain: I don't have GOG on my Mac but apart from that everything seems to be in order ๐
06:13:50 *** keikoz has quit IRC (Ping timeout: 480 seconds)
06:42:15 <truebrain> emperorjake: Thank you! That looks fine ๐
06:42:36 <truebrain> Well, no, GOG should have initialized
06:42:42 <truebrain> Even if you don't have it
06:42:47 <truebrain> What was the error?
06:46:59 <emperorjake> Looks like a familiar problem
06:47:29 <truebrain> Odd, it should want to load libGalaxy64.dylib
06:47:37 <truebrain> Where did the 64 go to ...
06:47:51 <truebrain> Mind making that manual change (rename) and see if it works then?
06:51:17 <emperorjake> Now it's saying invalid signature
06:52:21 <truebrain> Ah, yes, filenames are validated too
06:52:28 <truebrain> Okay .. interesting issue ..
06:52:48 <truebrain> We link against Galaxy64, but it wants to load Galaxyn..
06:53:43 <truebrain> Guess we rename it after extracting SDK, and see how that goes
06:53:57 <truebrain> Not today! Tnx for testing ๐
08:05:27 <peter1138[d]> Me: turns off alarm to have a little lie-in.
08:05:34 <peter1138[d]> Me: wakes up before alarm anyway.
08:11:10 <locosage> oh, I have 7 open prs... time to remember how to write C++ again...
09:00:19 <_zephyris> Well, that works. Good stuff! ๐
09:19:15 *** murr4y has quit IRC (Ping timeout: 480 seconds)
09:32:10 <peter1138[d]> Anyone want to fix NPF for ships?
09:32:26 <peter1138[d]> ```==3196640== Uninitialised value was created by a stack allocation
09:32:26 <peter1138[d]> ==3196640== at 0x94BCD0: CheckReverseShip(Ship const*, Trackdir*) (src/ship_cmd.cpp:375)```
09:32:42 <LordAro> probably not too difficult?
09:32:47 <peter1138[d]> ```==3196640== Conditional jump or move depends on uninitialised value(s)
09:32:47 <peter1138[d]> ==3196640== at 0x94A30F: TrackDirectionToTrackdir (src/track_func.h:500)
09:32:47 <peter1138[d]> ==3196640== by 0x94A30F: Ship::GetVehicleTrackdir() const (src/ship_cmd.cpp:306)
09:32:47 <peter1138[d]> ==3196640== by 0x6B5F50: NPFShipChooseTrack(Ship const*, bool&) (src/pathfinder/npf/npf.cpp:1194)```
09:33:55 <peter1138[d]> That was a large commit.
09:38:22 <peter1138[d]> > upstream connect error or disconnect/reset before headers. reset reason: overflow
09:38:26 <peter1138[d]> Guess what that is?
09:51:18 <peter1138[d]> Why did you cross out the checklist?
09:52:09 <locosage> coz I checked it and none of it apply
09:52:23 <LordAro> we have this same argument at work
09:52:27 <peter1138[d]> That's the job of reviewers...
09:52:28 <LordAro> it's for the reviewer to check, not you
09:53:30 <LordAro> with the greatest respect, i don't think you get to make that determination
09:54:23 <LordAro> i perfectly happily agree that most of the time it's completely irrelevant
09:54:26 <peter1138[d]> And it's more work for you to cross it off. So don't bother do it any more please ๐
09:54:46 <peter1138[d]> (Anyway the PR itself seems fine)
09:56:29 <peter1138[d]> I've run out of coffee. Should I put another pot on, or use a lazy packet-cappuccino?
09:56:48 <locosage> considering I've been doing that for ages reviewers sure do that list often ๐
09:57:06 <peter1138[d]> I've noticed other times too, yes.
10:01:21 <Eddi|zuHause> i don't drink coffee, but anything "lazy" i can subscribe to
10:06:34 <locosage> eh, what just happened...
10:07:57 <dwfreed> locosage: when you force pushed, the new branch head does not differ from the base branch
10:09:01 <dwfreed> since there's no more commits in the branch that need to be merged, the PR auto-closes
10:10:47 <peter1138[d]> I just remembered I have a cafetiรจre... so coffee it is ๐
10:20:19 <locosage> oh, I got lost in diffs...
10:20:41 <locosage> well, that's "helpful", how do I undo it all that now...
10:21:30 <dwfreed> just push your changes to the branch
10:21:38 <dwfreed> then you can re-open the PR
10:24:19 <locosage> yeah, except I messed up and now have divergent master...
10:25:26 <locosage> how do I just pull the branch disregarding all changes?
10:26:14 <LordAro> fetch & reset --hard origin/foo
10:38:33 <xarick> #10490 good first issue - good for newcomers
10:38:33 <xarick> ... but it's actually controversial
10:41:55 <peter1138[d]> Are you fixing it then?
10:42:19 <peter1138[d]> (Check for owner and check for loading)
10:42:53 <peter1138[d]> The specific purpose of the check is to avoid lots of pathfinder calls all at once. That might not even be necessary now.
10:44:12 <peter1138[d]> But leaving it in is probably more expected now.
10:46:26 <xarick> I'd like my AIs to work, but that's an extreme bias opinion
10:58:27 <xarick> 10156 is another controversial one, but there's only me complaining.
11:00:08 <xarick> 10379 - gonna check it out if it's still the case now, without start_date
11:03:36 <peter1138[d]> I can tell you now it is possible.
11:13:57 <xarick> OnTick_Companies code is vastly different
11:14:02 <xarick> than what it used tobe
11:19:24 <peter1138[d]> In multiplayer I managed to have 15 AI companies, when the limit was 14.
11:22:36 <xarick> 15? but how? dont you take 1 company for humans?
11:26:21 <peter1138[d]> Then I wasn't watching, but I assume my company went bust at some point.
11:26:37 <peter1138[d]> Or more likely was autocleaned, it didn't take very long.
11:28:45 <peter1138[d]> Actually it's possible that an AI went bust, and a new AI was started but as company 1.
11:29:21 <peter1138[d]> So that the AIs were from 1 to 15 but one slot in the middle was empty. Possible. I didn't check that well enough.
11:34:26 <merni> rubidium42viaGitHub: Ah, crap. I knew there would be something I hadn't tested
11:39:50 <xarick> I can't seem to reproduce the issue
11:41:44 <xarick> maybe I'm using different defaults...
11:45:13 <xarick> nop, can't reproduce... that's interesting
11:46:27 <xarick> default openttdcfg looks awful
11:46:51 <xarick> oh, it uses hw accel even
11:47:21 <xarick> from in-game screenshot
11:48:13 <LordAro> is that your broken HDR again?
11:49:10 <peter1138[d]> I think he means OpenTTD Sans at 1.25x scale (or close to) looks bad.
11:49:30 <xarick> yes, looks a bit on the blurry side
11:49:44 <xarick> and those squares around tilesets so big
11:50:05 <peter1138[d]> Well, that's because the images don't scale but the buttons do.
11:50:36 <peter1138[d]> I happen to have a patch for this...
11:52:06 <peter1138[d]> OpenTTD Sans would need lots of hinting to make it not blurry at 1.25x, and some truetype renderers may ignore hinting. Maybe it's possible in bulk but I'm not sure.
11:53:23 <peter1138[d]> I do wonder if Auto-detect size should be based on window size rather than Windows' DPI setting.
11:53:36 <peter1138[d]> Pitchforks though.
11:54:30 <peter1138[d]> OpenTTD uses that directly these days, it's not necessarily useful.
11:55:19 <xarick> I tried virtual super resolution and found out I would need a 200% dpi to be able to read anything
11:55:42 <xarick> don't have a real 4k monitor
11:55:57 <peter1138[d]> Yes... that's what higher resolutions do...
11:56:10 <peter1138[d]> If you have a 40" 4K screen you might not need it ๐
11:56:10 <reldred> windows scaling is disgusting
11:57:52 <peter1138[d]> An SVG version of this would be nice ๐
11:59:33 <peter1138[d]> A 4x bitmap version of it might be enough, they scale down to fractional sizes a bit better.
11:59:56 *** maxshpuntozavr has joined #openttd
11:59:56 <maxshpuntozavr> peter1138[d]: miami
12:03:53 <peter1138[d]> Fractional widget sizes... hmm.
12:14:21 <xarick> I don't understand why I can't reproduce more than 5 admiral ais in multiplayer, given that it's still queueing multiple start ai commands
12:14:39 <xarick> did you change the network queueing somehow?
12:21:26 <xarick> for some weird reason unknown to me
12:24:47 <xarick> ah, I see what TrueBrain did
12:25:02 <xarick> he removed the 1 tick delay between commands
12:26:05 <xarick> he indirectly solved #10379 by doing so, and also the removal of start_date helps with that
12:26:18 <peter1138[d]> Yeah I think I must have imagined this.
12:26:51 <xarick> he queues starting of companies one after another, without a tick interval that used to be there
12:27:06 <peter1138[d]> Although AI settings does show "Random AI" for the first slot.
12:27:07 <xarick> that tick was sufficient to have admiralai queue its own commands there
12:28:12 <xarick> but without that waiting tick, it "solves" the problem. And without start_date = 0 in the next set of companies, this should not occur any longer, only at the start of a game
12:38:12 <locosage> fyi #11920 will create conflicts for #9637 if merged before it
12:38:33 <locosage> nothing I can't solve if I'm around ofc
12:39:07 <_zephyris> peter1138[d]: It is already hinted, but the scaling to 1.25x is going to be pretty terrible no matter what. Plenty of 1x on pixel boundary lines will end up exactly half-way between pixel boundaries, therefore unhintable/uncorrectable. It's an inherent tradeoff, to make it look pixel perfect at 1x it needs to stick strongly to the pixel outlines, which degrades the performance at non-integer
12:39:53 <locosage> ah, it'll also conflict the other way around one needs to be fixed anyway
12:41:24 <peter1138[d]> 11920 is obvious, 9637 affects users spacebars.
12:42:30 <talltyler> peter1138[d]: It does, but is well-supported in the PR comments, which gives the pitchforks multiple targets ๐
12:42:30 <_glx_> Oh didn't see the messages
12:42:52 <locosage> np, I'll update #9637 once I'm done with num hidden
12:47:45 <merni> Okay so `GetAvailableMoneyForCommand` feels like it belongs rather in `company_cmd.cpp` than in `command.cpp`, as the other functions regarding "the amount of money a company has for the command" are in the former
12:48:20 <talltyler> DP: To enforce deity mode, don't you want `EnforceDeityMode(false);` ?
12:49:08 <talltyler> (edited for those on IRC ๐ )
12:49:43 <talltyler> `false` is deity mode?
12:50:31 <locosage> i'll take a look later
12:51:13 <locosage> trying to remember wth was I even doing in #10538 rn xD
12:51:28 <_glx_> `false` is the return value in case of error
12:51:55 <talltyler> `@param returnval The value to return on failure.`
12:52:20 <talltyler> Ah, because the function is a bool
12:52:46 <_glx_> It also sets error status
12:54:18 <peter1138[d]> That is quite confusing ๐
12:56:12 <_glx_> Similar to `EnforcePrecondition`
12:57:01 <talltyler> I expect those to read like unit tests, where you pass the expected result as a parameter ๐
12:57:23 <talltyler> But no, I should read the documentation better ๐
12:57:45 <peter1138[d]> Or asserts, yeah.
12:58:38 <merni> Is there any reason for a comment to begin with `/*!` rather than `/**` ? Four of them in `command.cpp` do
12:58:56 <peter1138[d]> Not really, it's just a different doxygen style.
12:59:16 <_glx_> Command.cpp is very old
12:59:27 <peter1138[d]> 2007, so predates review.
13:00:14 <peter1138[d]> Hmm, should I separate LRU the viewport and interface sprite caches?
13:00:29 <merni> All right then I will change it in the bit I'm changing to avoid commit checker possibly yelling at me
13:01:08 <peter1138[d]> I don't think it will, but if you fancy doing so you can change them all in one go ๐
13:01:20 <merni> Sure, that's also possible
13:01:47 <talltyler> They also show up in `json.hpp`, which should probably be left alone because it's not ours
13:01:58 <peter1138[d]> I'm always amused by CODINGSTYLE.md using the old widget description stuff ๐
13:02:15 <talltyler> (unless that's the point of including it in our repo, so we can maintain our own copy)
13:02:15 <peter1138[d]> Ah yeah, if you do don't touch 3rdparty ๐
13:02:22 <_glx_> It only does for ` #if` vs `# if`
13:02:33 <merni> peter1138[d]: I am only changing in command.cpp (for now)
13:05:04 <peter1138[d]> God the old widget list was annoying. Dimensions specified as `left, right, top, bottom` instead of the more logical `left, top, width, height`. Irrelevant now ๐
13:08:18 *** cptm1100 has joined #openttd
13:08:18 <cptm1100> hello guys, can you please add a way to build a metro system in openttd?
13:16:22 <merni> cptm1100: That would be extremely difficult due to limitations of the design of this 20-year-old game based on a 30-year-old game :p
13:16:47 <merni> you can do so-called metro systems using some newgrfs though
13:36:35 *** r24309 has quit IRC (Quit: User went offline on Discord a while ago)
13:44:33 <xarick> without anti-alias is not ok
13:45:27 <peter1138[d]> Set your scale to 1x and ignore it :p
13:50:06 <locosage> talltyler: I think I addressed everything in #10538 now
13:51:13 <locosage> also #10004 is not waiting on author
13:51:19 <locosage> or, at least author is not aware :p
14:08:03 <xarick> tried to rebase... baam, 30 conflicts
14:10:27 <xarick> not the start_date, mind you, I actually like that it's gone
14:12:17 <xarick> this is what we have now ๐ฆ
14:15:09 <xarick> where am I gonna put the start AI button
14:17:54 <xarick> I still don't appreciate the idea of grayed out slots
14:32:20 <xarick> AAAHogEx is on version 60 already ๐
14:41:33 <peter1138[d]> xarick: Sometimes it's easier to rewrite with the old patch as a reference.
14:42:12 <peter1138[d]> xarick: What's the problem with them?
14:43:02 <peter1138[d]> The problem is freedom? That doesn't make any sense.
14:43:56 <xarick> without being limited by the max no competitors
14:44:04 <talltyler> Oops, made an infinite while loop ๐
14:44:22 <xarick> and then i could just click start ai
14:44:39 <peter1138[d]> Do you mean the problem is you can't configure an AI until you increase the maximum number of AIs?
14:44:40 <xarick> on my version there's a start / stop ai
14:44:55 <peter1138[d]> ^ That is the sort of reason I expect rather than "freedom"
14:45:10 <xarick> and started ais are also grayed out ๐
14:45:15 <xarick> means i can't stop them
14:45:37 <xarick> i cant check their settings, at least from this window
14:45:58 <peter1138[d]> Well, you know what to do.
14:46:45 <xarick> freedom to start, stop configure move, etc... configs at will
14:47:22 <xarick> there are certain limitations
14:47:48 <xarick> I took great care of dealing with such freedom
14:48:27 <peter1138[d]> Obviously not enough because you can't do that in master.
14:50:50 <xarick> i could have all 15 AI parameter windows opened at once
14:53:12 <peter1138[d]> Hmm, if you increase the number of AIs, when do they start... starting?
14:53:39 <peter1138[d]> Does interval have to be higher than 0?
14:53:59 <xarick> if it was 0, it would start immediately
14:54:04 <xarick> as soon as you increased
14:54:09 <peter1138[d]> It is 0, but it doesn't.
14:54:40 <peter1138[d]> I increased it to 1 and an AI started.
14:54:43 <xarick> maybe there's a countdown yet on the old version
14:55:30 <xarick> when there's no more slots, it used to add 365 days countdown before next try
14:55:46 <peter1138[d]> That might not be the correct viewport location ๐ฎ
14:57:13 <peter1138[d]> Anyway, improvements welcome to AI settings. Just don't try to do too much in one go, and explain your reasons better than "freedom"...
15:03:10 <merni> Why are the random names so funny
15:03:33 <peter1138[d]> I don't even know what's funny about that one ๐ฎ
15:03:41 <merni> Idk it just sounds funny to me
15:05:08 <merni> The town names like "Slunfingfield" and "Tondford" (both actual examples I've had) also sound funny to me
15:05:30 <merni> maybe I just find british names funny?
15:08:45 <xarick> is it just me or random deviation did not occur
15:10:50 <peter1138[d]> Dunno, never heard of it. But this code is terrible.
15:11:06 <peter1138[d]> Magic numbers all over the place.
15:12:02 <merni> Hum. Let's see if I added extra whitespace again
15:17:23 <xarick> holy moly... randomizer returns 5 3 times in a row
15:17:45 <xarick> it did actually added random deviation, and turned out to be the exact value as default
15:18:06 <LordAro> randomness is often unintuative
15:20:30 <xarick> there were recent changes to randomizer, I wonder if it's broken
15:20:44 <merni> That codechange just about doubled the size of the PR
15:27:11 *** Wormnest has joined #openttd
15:34:37 <merni> GS directly reads `Company::Get(company)->money`...
15:36:40 <merni> and it does `EnforcePrecondition(false, (loan - GetLoanAmount() + GetBankBalance(COMPANY_SELF)) >= 0);`
15:37:00 <merni> So, AI/GS will not be able to use this mode at present...?
15:38:27 <merni> xarick: , could you write me a test AI that tries to run itself out of money? say by buying 50 trains
15:44:06 *** keikoz has quit IRC (Ping timeout: 480 seconds)
15:49:57 <merni> Bah, vehicle renewal also checks money directly
15:50:11 <merni> `if (needed_money > c->money) return false;`
15:50:52 <merni> *twice* in the same function, too
15:58:58 <talltyler> That could be refactored to a function call pretty easily, no?
15:59:17 <merni> Just those location do not use that function for whatever reason
15:59:40 <talltyler> You could probably search `c->money` to find potential issues
15:59:51 <merni> Those two are the only real issues
16:00:13 <merni> Apart from that there are instances of writing to c->money for various purposes but that doesn't matter here
16:00:59 <merni> Regarding AI I wonder if this feature *should* be extended to AI or not
16:01:25 <merni> Some AI might go crazy and build rails over the entire map or something
16:04:30 <_jgr_> It doesn't really make sense to have AI in a sandbox environment at all
16:05:13 <merni> But... it is a possibility so has to be handled either one way or the other
16:06:02 <_jgr_> If players can do stuff for "free" then there doesn't seem a reason to exempt AI "players" from that?
16:06:35 <_jgr_> If users choose to enable AIs that build rubbish it's their own problem, after all
16:07:50 <_glx_> if money is infinite it's for everything, AI included
16:15:26 <talltyler> A valid usecase would be town cars, which usually depend on a toy library to avoid bankruptcy already
16:21:12 <xarick> i have a gs that buys 1 million vehicles
16:21:18 <xarick> but he gives money to itself
16:21:33 <peter1138[d]> Quantitive Easing.
16:24:24 <xarick> should it take loan too?
16:24:39 <xarick> waste money from max loan?
16:26:20 <merni> Hm, do I need to worry about overflow here? I was thinking of using the other function which returns `INT64_MAX` in case of infinite money, but here there is something added to that and it would probably overflow. (Which it could theoretically do already?) Maybe a clamp is needed...
16:26:20 <merni> Btw, the only place where GS/AI checks the money directly is in `ScriptCompany::SetLoanAmount` (in other places it seems to go through the regular commands/company functions) so that should not actually affect the functionality already.
16:26:58 <merni> xarick: Either way is fine there, I can always set the max loan to a very low value
16:29:20 <_jgr_> merni: The Money type is supposed to handle overflows by saturating, so it should be fine
16:30:34 <merni> I guess that's why the other function was already safely returning INT64_MAX when called without a valid company
16:38:51 <merni> I don't know if it would work for GS...do GS spend money?
16:40:10 <_jgr_> GSs can spend money and do other things on behalf of other companies
16:40:29 <_jgr_> Though in practice this functionality is rarely (if ever) actually used
16:52:52 <merni> > dbg: [misc] [squirrel] Failed to compile '/home/user/.local/share/openttd/ai/dummyaigs/info.nut'
16:52:52 <merni> > dbg: [script] [18] [S] Your script made an error: assertion failed
16:52:52 <merni> > dbg: [script] [18] [S]
16:52:52 <merni> > dbg: [script] [18] [S] *FUNCTION [Start()] /home/user/.local/share/openttd/game/dummyaigs/main.nut line [561]
16:52:52 <merni> And then a bunch of stuff
16:54:04 <merni> But it did buy 500 lorries and drove me way into negative money so at least that bit works :)
16:54:08 <merni> That's all I needed really
16:56:31 <xarick> ah, thats the heliport issue
16:56:45 <xarick> start the game in 1950 or so, before heliports
16:56:58 <merni> No need, the bit that needed to work worked :)
17:00:30 <merni> OK, so I need to generalise `GetAvailableMoneyForCommand` so that it works for any company, not just the current one. Is it better to add a required parameter and change all the existing callers (there are only five) or to add a default parameter?
17:00:50 <merni> If the latter, what's a safe value to use as a default for CompanyID?
17:01:39 <_jgr_> Why does it need to be avialble for companies other than the current one?
17:02:06 <merni> Well, so I can use it and not duplicate the check in two other places that don't use the current company
17:02:38 <_jgr_> Change GetAvailableMoneyForCommand so that it calls your parameterised function with _current_company as the parameter
17:02:41 <merni> It literally just returns Company::Get(company)->money (or INT64_MAX in case of infinite money or invalid companies)
17:03:46 <merni> _jgr_: Hm. At that point why not just rename it as `GetAvailableMoney` with a required parameter? There is no specific logic that goes on there anyway that wouldn't be applicable in other context... it just accesses the money
17:05:58 <_jgr_> I suppose, probably one for the reviews to issue their decree on
17:11:50 <merni> I guess the question is, is there any context in which "money which can be used to execute a command" is different from "money" in general? Right now, it is not, but is there any point in retaining that distinction?
17:20:00 <_jgr_> The cases where that is necessarily generally just temporarily modify the money value, or have special casing like company bankruptcy
17:20:21 <_jgr_> I was thinking more from the point of GetAvailableMoneyForCommand implicitly ensuring that the correct company ID is used for command scope
17:21:19 <merni> Passing `_current_company` is surely not that hard :)
17:25:49 <merni> _jgr_: I guess this is not that hard... and `SubtractMoneyFromCompany` already follows the same pattern
17:26:53 <_jgr_> It's not a big problem either way really
17:42:49 <merni> the `index` of a `Company` is the same as the `CompanyID`, right?
17:44:19 <frosch123> yes, but if you use GerCompanyIfValid you can also handle spectator and other weirdnesses
17:44:40 <frosch123> i.e. not all companyids are valid companies
17:44:44 <merni> Well, the `Company` is already got from `Company::Get`, I just need to get back the ID
17:44:59 <frosch123> ah yes, then company::index
17:53:47 <merni> `error: cannot convert โScriptCompany::CompanyIDโ to โCompanyIDโ {aka โOwnerโ}`
17:54:42 <merni> would it work with a cast?
17:54:55 <_glx_> yeah there are casts everywhere in the API ๐
17:57:03 <_glx_> API redefines many enums as it's the easiest way to auto import them into squirrel VM
17:57:32 <_glx_> just needs to parse the headers to generate the imports
18:21:54 <xarick> ais with infinite money
18:22:22 <xarick> not sure what will happen with checking for costs
18:22:35 <merni> Since it has to be a separate PR, I'll deal with cleaning up the `/*!` comments if/when this one is merged, because I want to avoid doing another rebase if at all possible :p
18:22:44 <merni> xarick: Costs should be unaffected
18:23:01 <merni> Idk what in the API returns costs but the only change in the script API is `GetBankBalance`
18:23:12 <xarick> ais test the cost of a command
18:23:26 <xarick> then they usually check if they have that money
18:23:38 <xarick> oh, getbankbalance returns a big value now?
18:24:47 <xarick> what about repaying loan?
18:25:17 <xarick> i'm not sure what to expect there
18:25:31 <xarick> if i pay 10000, it doesn't take me 10000? what happens
18:25:40 <merni> I expect that the loan can still be repaid, as the balance is internally still tracked
18:25:56 <merni> Just that the money balance value exposed in the API will still be INT64_MAX
18:26:34 <xarick> eh... okay probably works weirdly
18:26:54 <merni> LC-ZorgviaGitHub: > This doesn't seem like a good solution to me. Someone who wants to build freely and not worry about the lack of cash (sometimes that includes me) rather doesn't want to see constantly increasing debt.
18:26:54 <merni> I think someone has not tried the preview...
18:27:29 <LordAro> i could suggest that it means your description needs updating
18:27:38 <truebrain> screenshots help ๐
18:29:28 <truebrain> today in the game: can I add new depots ...
18:29:30 <merni> Yes, I will add them tomorrow
18:29:43 <truebrain> no Steam integration for Steam
18:29:58 <truebrain> /me requeues this task for tomorrow
18:31:26 <merni> Hm, why is interest rate fixed as minimum 2%?
18:31:34 <merni> is there a technical reason?
18:31:56 <truebrain> *childish mode*: because someone programmed it like that; that is the technical reason ๐
18:32:11 <xarick> AI competition with infinite money should be interesting
18:32:15 *** gelignite has joined #openttd
18:32:26 <xarick> i can at least use a GS that doesn't feed them money
18:32:50 <_jgr_> merni: Likely because the cost inflation rate is 1% more than the income inflation rate
18:33:59 <_jgr_> Hmm, actually that shouldn't be too much of a problem
18:34:44 <DorpsGek> - Update: Translations from eints (by translators)
18:37:45 <locosage> merni: because it was like that in the original game most likely
18:40:32 <frosch123> which is a weird mechanic in itself ๐
18:41:06 <merni> Ok, but it already checks for max(0, rate-1), so even if the "interest rate" setting is set to zero that should still work, right?
18:41:08 <peter1138[d]> Higher interest rates are easier.
18:41:43 <talltyler> xarick: The widget is the unloading behavior dropdown.
18:42:03 <locosage> with min 2 and max 4 interest rate is pretty much irrelevant either way
18:42:31 <talltyler> But also what is anyone supposed to do with a random screenshot of code you donโt like? Screenshots in chat are not a code review.
18:43:19 <talltyler> `OUFB_TRANSFER` is the parameter that is passed for toggle behavior if the dropdown isnโt opened.
18:43:20 <frosch123> talltyler: is it "rage bait"?
18:44:12 <merni> locosage: I will look at doing another PR to improve the range if possible tomorrow... time for zzzz now
18:44:25 <truebrain> hmm ... `Money / Money` acts a bit odd .. it has a silent 32bit cast ๐
18:44:31 <truebrain> I shoulds top looking at this code ๐
18:45:23 <truebrain> looks better than this large number
18:45:29 <peter1138[d]> payment rates are 1 percentage point below everything else.
18:46:15 <peter1138[d]> If inflation 2%, then payment rate inflation is 1%
18:46:40 <frosch123> truebrain: i like how EU4 adds SI prefixes to all money amounts
18:46:42 <peter1138[d]> if it's 4% then pr inflation is 3%
18:46:49 <merni> sure, but if inflation is 0 then payment rate inflation is -1 which is capped to 0 so neither would change
18:46:54 <truebrain> frosch123: I was mostly annoyed we do `k` and `M`, then stop
18:47:05 <peter1138[d]> Well, inflation is never 0 ๐
18:47:08 <merni> Oh, is that Tera-credits
18:47:19 <merni> peter1138[d]: Now it isn't... but can it be?
18:47:30 <peter1138[d]> Anyway, inflation is a difficult setting.
18:47:57 <frosch123> truebrain: lol, i did not know we had that option
18:48:09 <truebrain> it is forced upon you
18:48:11 <peter1138[d]> Going lower than 2% would make profit more and more difficult.
18:48:16 <belajalilija> peter1138[d]: Why not have it so everything gets more expensive but the prices are the same relative
18:48:41 <locosage> peter1138[d]: lol, yeah, you'd think it's economy setting but, no, has nothing to do with economy, it's just difficult to understand what it does xD
18:48:41 <peter1138[d]> Going higher than 4% makes profit track costs closer and closer (but never quite the same)
18:49:03 <peter1138[d]> You can do that, it's called "turn off inflatiohn"
18:49:23 <merni> peter1138[d]: ๐คท it is for players to decide what they want, the limit of 2-4 % doesn't really make sense to me. We can maybe add a warning to the helptext about that
18:49:50 <merni> we do have other settings that make it hard to make profits as well...
18:49:58 <frosch123> truebrain: it's used in about 3 strings, everything else uses CURRENCY_LONG
18:50:01 <_jgr_> It's there mainly for historical reasons, it's fine to just leave it be
18:50:03 <peter1138[d]> If you go to 1%, then costs will rise, but payment rates will be fixed.
18:50:04 <frosch123> no wonder i never noticed
18:50:20 <locosage> imo just hardcode inflation at 3% or smth and make interest rate only an interest rate, without side effects
18:50:57 <locosage> that's pretty much the same thing
18:51:00 <frosch123> merni: i think inflation is disabled by default, because every single player has their own opinion how it should work
18:51:07 <locosage> interest rate doesn't make much difference for the inflation either way
18:51:13 <merni> peter1138[d]: Kind of like Indian Railways with its passenger fares now... they are not raised for many years because the government thinks it will be unpopular :p
18:51:32 <merni> "Political Interference In Transport Tycoon"
18:51:37 <truebrain> frosch123: that still doesn't make it a setting ๐
18:51:41 <locosage> 2% is technically slightly "harder" but difference is tiny if you do the math
18:51:54 <peter1138[d]> Most places should use the truncated currency.
18:51:58 <truebrain> there, a fix nobody asked for \o/
18:52:07 <peter1138[d]> Finance window is stupidly wide with CURRENCY_LONG
18:52:10 <frosch123> truebrain: true, i just default to "if i do not know it, it must have been a PR in the past year"
18:52:17 <truebrain> peter1138[d]: same as the toolbar
18:52:28 <frosch123> either way, you definitely should add more prefixes than k and M ๐
18:52:33 <truebrain> frosch123: this code assumed a 32bit Money, so you can imagine how old it is ๐
18:52:43 <truebrain> frosch123: psst, they are postfixes ๐
18:52:52 <frosch123> for bytes it goes up to Exa
18:53:12 <merni> How does it work with prefix currencies? Does it show something like โน 400 G?
18:53:16 <truebrain> hmm .. I could go to `P` ...
18:53:22 <frosch123> i don't know this shit
18:54:09 <merni> The only context where SI prefixes beyond kilo are commonly used really, is in computing
18:54:18 <xarick> This comment has been minimized. ouch
18:54:25 <truebrain> peter1138[d]: there was already the `k`, so your system failed me
18:55:03 <merni> > They see because opening the finance window is not difficult. ;) And then the sight of the constantly increasing debt will be quite unpleasant.
18:55:03 <merni> so... we have to prevent players from opening windows to upset themselves?
18:55:10 <_jgr_> merni: They're commonly used with physical quantities
18:55:15 <merni> what is this guy on about
18:55:19 <truebrain> if we do Millions, Billions etc, it needs to be translatable, which is another nightmare ๐
18:55:38 <truebrain> (a billion in Dutch is not the same as a billion in English, as example)
18:55:44 <merni> _jgr_: Yes but the average ottd player is not going to be doing the kind of science/engineering type work that uses those
18:55:52 <merni> truebrain: Well, yes...
18:55:58 <frosch123> on corporate slides there exist both patterns. people with science degree use kโฌ, people with economics degree use Tโฌ
18:56:01 <merni> Indian languages want lakhs and crores too...
18:56:15 <frosch123> we should go for science
18:56:18 <truebrain> so I just extended that what was there, which was `k` and `M`
18:56:21 <truebrain> which sounds SI to me ๐
18:56:34 <merni> I have seek 100k or whatever in general contexts
18:56:48 <peter1138[d]> Yes, k as thousand is normal in money terms.
18:56:49 <merni> beyond that 100m for million (though here it is more likely to be in terms of L and Cr)
18:56:52 <peter1138[d]> M means Million.
18:56:59 <peter1138[d]> It does not mean "mega"
18:57:17 <truebrain> agree to disagree on that ๐
18:57:31 <peter1138[d]> G is totally wrong for money.
18:57:36 <truebrain> you cannot tell me how I read `M` ๐
18:57:54 <locosage> pretty sure I've asked here what's the best way to write 1000 000 000 at some point
18:58:02 <locosage> ended up doing 1000M xD
18:58:08 <frosch123> "G" is the only non-translatable option. otherwise you would need "Mio." and "Mrd."
18:58:18 <_jgr_> locosage: 1e9, obviously ๐
18:58:26 <merni> Why is non-translateable good, though?
18:58:32 <locosage> floating point danger :p
18:58:39 <merni> There is a whole elaborate system for translations
18:58:40 <truebrain> anyway, long day peter1138[d] , so I am just having a bit of fun with how confusing some simple letters are ๐
18:59:05 <truebrain> I really always assumed they were kilo and mega; I play too many clicker games
18:59:08 <truebrain> where that is very common ๐
18:59:35 <merni> locosage: I would write something like 100,00,00,000 (technically 1,00,00,00,000 may be more correct but nobody uses "arab" as meaning 100 crore in practical use)
19:00:31 <truebrain> but Billion etc is very problematic for many other languages, and I guess M already was, but .. if you read it as mega, it is fine
19:00:35 <truebrain> so I guess we were just a bit lucky there
19:01:13 <merni> truebrain: You could just make STR_10^9 and STR_10^12 or whatever and languages can translate them as they wish
19:01:59 <xarick> let me check how GS's do it
19:02:14 <merni> Also, asking again since there is no preview... how does this work for currencies where the symbol is at the left?
19:02:19 <truebrain> merni: in Dutch there aren't really one letter solutions for these kind of things
19:02:21 <merni> (including the existing k and M)
19:02:28 <_glx_> in french M is for million, can't remember what is used for milliard (billion)
19:02:34 <truebrain> merni: start any OpenTTD, and find out
19:02:39 <truebrain> you can do that without preview, I am sure ๐
19:02:46 <merni> truebrain: Write "Mio." or whatever is also not an issue, will still be shorter than 000000
19:02:52 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
19:03:09 <truebrain> but this is how OpenTTD goes .. you make one small change, to find out the current stuff is already .... weird, and BOOM ๐
19:03:32 <_glx_> but anyone used to computers should know G and T ๐
19:04:06 <merni> Okay so โน 3,960 M. That works as 3,960 million, but โน 3,960 G is just not readable IMO
19:04:15 <peter1138[d]> Anyone used to money should know k, M, B, and T.
19:04:30 <merni> peter1138[d]: Not in India :p
19:04:31 <truebrain> peter1138[d]: Only in English countries ๐
19:04:38 <peter1138[d]> (And yes, UK billion used to be 1,000,000,000,000, but we switched to 1,000,000,000.
19:04:56 <merni> Yeah in Europe at least you agree which exponents are named, if not what to name them
19:05:02 <truebrain> meh, `k` and `M` existed in r1, can't even tell which language-of-origin-author wrote it ๐
19:05:14 <_jgr_> _glx_: They may not recognise it as that in the wrong context though
19:05:18 <merni> India and China/Japan have completely different systems, though these days westernisation means ottd's target audience can probably get it
19:05:23 <peter1138[d]> Probably Chris Sawyer.
19:05:35 <truebrain> not an unreasonable thought
19:05:39 <frosch123> truebrain: there is an obvious way to find out: we need some hyper inflation so the real world needs to agree on how to call Gโฌ, when it is needed in daily life
19:05:55 <truebrain> I can't access the language system in this part of the code, so no `STR_` tricks at this level ๐ฆ
19:06:12 <merni> frosch123: well, they would just denominate 1 new euro = 10000000000000000 euros or whatver :p
19:06:15 <truebrain> frosch123: We all agree! But between each other disagree ๐
19:06:45 <truebrain> peter1138[d]: really? So it used to be the same as other Europe contries ... so why change?! ๐
19:07:06 <truebrain> "miljoen" and "miljard" are rather confusing words
19:07:10 <truebrain> so I don't disagree with the move
19:07:13 <merni> UK thinks they are midway between France and America sometimes
19:07:28 <truebrain> I could do `k`, `M`, `kM` and `MM` ๐
19:07:34 <peter1138[d]> Because "1,000,000,000,000" was considered ludicrous.
19:07:52 <peter1138[d]> Turns out that 20-30 years later...
19:07:55 <merni> and now we talk about "trillion" dollars :p
19:08:17 <peter1138[d]> Also US was always 1,000,000,000. That's the main reason, convergence.
19:10:02 <truebrain> but okay, to summarize: we have an interational incorrect mention of `k`/`M`, which can only be considered correct if you consider them SI. We have a (very strong) opinion SI units should not be used for money, so we kinda should make it translatable I guess?
19:11:10 <frosch123> and i cab't figure out how it is done for ยฅ
19:13:08 <peter1138[d]> Possible it is in TTD...
19:14:10 <peter1138[d]> Not a lot of choice.
19:14:22 <truebrain> so it was added by OpenTTD .. well .. before r1
19:14:49 <peter1138[d]> Or TTD does it makes on ยฃ value and ignores currency conversion ๐
19:14:52 <frosch123> ottd 0.1 source only has {CURRENCY}, and every currency option has its own formatting function
19:15:16 <peter1138[d]> I don't have any big TTD games.
19:15:38 <truebrain> owh, I can access the string-system, just with temporary parameters
19:15:39 <peter1138[d]> frosch123: Sounds about right ๐
19:15:40 <frosch123> ah, found your reason for "why only k and M" :p money used to be int32
19:15:48 <truebrain> okay, so this is solvable in a proper way
19:15:58 <truebrain> frosch123: I said that, it is in the PR, and I mentioned that
19:16:06 <truebrain> I feel ignored now ๐
19:16:57 <frosch123> bodies often ignore their brain
19:17:11 <truebrain> it is pinky, pinky, pinky and the brain brain brain
19:21:08 <frosch123> ISO4217 specifies to put a NBSP between number and currency, but no prefixes so far :/
19:22:23 <truebrain> are there languages that would put the multiplier before the number
19:22:29 <truebrain> so "mega 1,000,313"
19:23:19 <frosch123> ISO4217 says that languages decide whether to write "EUR{NBSP}500" or "500{NBSP}EUR", and that the order is not a property of the currency
19:23:43 <truebrain> and how did we implement it? As property of the currency! ๐
19:23:46 <frosch123> i am still looking for k and M
19:24:33 <truebrain> the tricky part with prefix vs postfix, is where in our code the `-` is added
19:25:28 <truebrain> owh, code calls it suffix, not postfix
19:26:25 <peter1138[d]> > Abbreviating โmillionโ and โbillionโ. Do not use abbreviations like mio, bio, k, mill. The letters โmโ and โbnโ can be used for sums of money to avoid frequent repetitions of million, billion; this applies particularly in tables where space is limited. The abbreviation is preceded by a hard space:
19:26:25 <peter1138[d]> > โฌ230 000 m, $370 000 bn, ยฃ490 bn
19:26:36 <frosch123> apparently people write "-$ 10"
19:26:41 <peter1138[d]> > Billion. โBillionโ is used to designate a thousand million (and not a million million) and โtrillionโ a million million. Note that the words โmillionโ, โbillionโ and โtrillionโ can be combined with figures: 3 000 million.
19:26:57 <truebrain> so it is `bn`, not `B`?
19:27:07 <truebrain> (for `english.txt`)
19:27:50 <peter1138[d]> This is just a style guideline used by EU publications.
19:28:05 <peter1138[d]> But yes, I'd be happy with bn.
19:28:38 <truebrain> it is funny, all this because Giga and Billion don't have the same starting letter ๐
19:28:56 <frosch123> internet says UK vs US:
19:29:25 <frosch123> so apparently UK uses a lowercase "m"
19:29:28 <truebrain> well, `english_US.txt` can do their thing ๐
19:30:38 <frosch123> hah, so ottd does use SI :p it uses lowercase "k" and uppercase "M", which matches SI, but neither UK nor US
19:30:53 <truebrain> /me makes a MWHAHAHAHA sound in silent ๐
19:33:59 <frosch123> the NBSP usage is even more complicated. it's "EUR 30", "30 EUR" and "30 โฌ", but "โฌ30" without space
19:34:24 <peter1138[d]> Which mentions the abbreviations.
19:35:18 <truebrain> I was like: WTF, WHY DID MY CODE BREAK?! But I removed the the other fix commits
19:35:24 <truebrain> (as they are their own PR)
19:35:29 <truebrain> fml .. took longer than I want to admit
19:37:04 <truebrain> but can I assume it is a suffix? ๐
19:37:12 <_zephyris> peter1138[d]: Any reason OTTD doesn't display currency symbol previews? Might be a bit nicer than the three letter ISO codes.
19:38:48 <frosch123> truebrain: yes, peters page gives examples: โฌ230 000 m, $370 000 bn, ยฃ490 bn
19:38:50 *** dojando has joined #openttd
19:38:50 <dojando> LC-ZorgviaGitHub: I DO use unload all a lot too. Mostly for asthetic / realism purposes for my passenger trains who have a scheduled depot order for maintanance. Then the train will go to "Station-X" with empty all -> Depot maintain -> "Station-X" with loading and then continue on the regular line again. Because there would never be passangers transported while maintaining a train.
19:39:33 <truebrain> frosch123: doesn't mean all languages do that ๐
19:40:22 <peter1138[d]> It's also only some document style guidelines...
19:41:15 <truebrain> well, codewise it is really tricky to make the prefix/suffix a choice, so I went with suffix
19:41:16 <frosch123> well, the other page lists "10 m EUR" and "10 bn GBP", but no examples with โฌ or ยฃ
19:41:21 <truebrain> first language that complains, we can take it from there ๐
19:41:37 <frosch123> so, basically the m and bn are always suffix
19:41:38 <truebrain> it is at least an improvement from the current situation no matter what ๐
19:41:45 <frosch123> but i am not sure about the space after
19:42:15 <peter1138[d]> _zephyris: It used to be mixed, some currencies by code, some by symbol. And it was consistent by language either. And of course, some of those symbols prevented lots of truetype fonts from being usable because they were quite obscure.
19:44:25 <truebrain> frosch123: space is part of the translation
19:44:31 <frosch123> truebrain: can i excite you for c++14: "Optional single quotes (') may be inserted between the digits as a separator; they are ignored when determining the value of the literal. "
19:44:37 <truebrain> as long as there isn't a language like Hindi or Chinese or whatever that does weird stuff with the location ๐
19:44:58 <frosch123> i don't want to review "1000000000"
19:45:34 <peter1138[d]> There is at least one language that does 1'00'00'000...
19:45:44 <truebrain> trust me, it doesn't get better with `'`
19:48:21 <_zephyris> peter1138[d]: Hmm, but (most) are covered by the sprite font and ttf fonts now... Would be nicer to use `โบ` and fall back to `TL` for Turkish Lira etc.
19:48:55 <frosch123> hmm, large integer literals used to require a "ull" postfix, is that no longer the case?
19:49:02 <peter1138[d]> But it still might prevent someone using the font they want to. We don't fallback individual glyphs.
19:49:38 <truebrain> frosch123: I was as surprised as you, but I double checked .. clang at least reports it really is a long
19:49:49 <truebrain> so I assumed that was a C++20 thingy, or any before
19:51:34 <frosch123> such old habbits ๐
19:51:36 <_zephyris> peter1138[d]: Yeah, but. Why bother providing nice sprite font glyphs then not use them? The default sprite and ttf both support it, so use it! (this argument works for latin languages for the sprite, and all european for the ttf, languages which we know _require_ a fallback font would be a more logical exception)
19:51:50 <peter1138[d]> You still see it when you select the currency.
19:51:59 <truebrain> frosch123: wuth? LOL! Okay .... that is much older than I expected ๐
19:52:40 <frosch123> apparently "ull" is even c++, so it was non-standard before
19:54:18 <peter1138[d]> I guess it's doable now.
19:54:39 <peter1138[d]> The main thing is it is NOT in the string files, so the glyph searcher doesn't find a problem even if they don't exist...
19:55:27 <_zephyris> peter1138[d]: Ah OK. But a few don't use the right symbols... I think that's what threw me off. eg. French Franc `โฃ` -> `FF`
19:56:28 <truebrain> would it actually help anyone to see those icons in that list? I mean .. it is just a blob of pixels at this point ๐
19:57:30 <_zephyris> truebrain: Oi. Lovingly handcrafted blobs of pixels ๐
19:57:51 <_zephyris> Ah, it's just a few, just a shame I jumped on franc and ruble for testing. Maybe just โฃ โฝ โพ
19:57:52 <truebrain> it worked for TTD as the list is small
19:57:59 <truebrain> but for a list this long, it is just ..... blobby
19:58:36 <truebrain> in other words ... `Remove: language XXX` ๐
19:58:47 <truebrain> language.. currency ... tomato tomato
19:59:42 <_zephyris> Yeah, fair. I'm not too fussed about the list actually.
19:59:54 <peter1138[d]> "โฃ" was never used.
19:59:55 <_zephyris> I was a bit mixed up and not using symbols in the list and some currencies not using their unicode/correct symbols.
20:00:20 <peter1138[d]> > An F-with-bar or Fr ligature (โฃ) is available as a Unicode currency symbol character but was never adopted and has never been officially used.
20:00:36 <peter1138[d]> It should just be F.
20:00:41 <truebrain> did I brake DorpsGek with my title? ๐
20:00:47 <peter1138[d]> "Fr" is fine too.
20:01:06 <_zephyris> Yeah. I'd just picked up that `FF` looked wrong.
20:03:03 <_zephyris> Hmm. `โฝ` `โพ` and `โบ` all look like (more) recent unicode additions, I guess they're not in the sprite font.
20:05:24 <truebrain> Simplified Chinese seems to do `USD 1,000 ็ฑณ` for `1,000 m`
20:06:15 <truebrain> which translates back to `rice`
20:06:22 <truebrain> owh, translators, you are briliant ๐
20:06:44 <wensimehrp> ็ฑณ does means rice
20:07:30 <truebrain> funny how the translators do translate it sometimes with a single letter, but most of the time you see a very long strong coming back ๐
20:07:37 <truebrain> I am very curious how translators are going to translate these entries ๐
20:07:51 <wensimehrp> But "metre" is a new word and (not like Japanese haha) we need a character to represent the unit
20:07:56 <truebrain> (and whether they take less space than the original)
20:08:36 <frosch123> pretty sure they take less space, otherwise they would not be used in real life
20:08:50 <truebrain> I assume as much too ๐
20:09:10 <wensimehrp> well, when it comes to m3 it is a different story
20:09:16 <truebrain> Seems DuckDuckGo is English UK ๐
20:09:40 <wensimehrp> Chinese translation for m3 is ็ซๆน็ฑณ, which takes more space than the original
20:09:52 <truebrain> we talk about currency here wensimehrp ๐
20:10:21 <peter1138[d]> Soooo.... left or right?
20:10:24 <truebrain> `โฌ 1,000 biliwn` <- Welsh ๐
20:10:54 <truebrain> peter1138[d]: that questionmark ... but I guess that is not the part you wanted an opinion about?
20:11:01 <_zephyris> peter1138[d]: Left ๐
20:11:15 <_zephyris> No 1.75x `X` icon yet?
20:11:17 <peter1138[d]> Nope. That's "I didn't bother removing the incompatible NewGRF"
20:11:34 <peter1138[d]> It's svg in the left image.
20:11:37 <truebrain> Left bottom is touching the border, which annoys me greatly
20:11:46 <peter1138[d]> It's... svg in the right image too, but master doesn't know about svg ๐
20:12:09 <truebrain> but yeah, scale EVERYTHING
20:12:11 <peter1138[d]> They all touch the border.
20:12:30 <peter1138[d]> They don't overlap the border though.
20:13:02 <truebrain> just a pixel-line of grey would be more suiting for the eye, but ..... not the question here, I assume ๐
20:13:13 <_zephyris> IMO if a user wants a larger GUI then they want all GUI elements larger - they want it larger for a reason, and could use 2x if they're pixel purists.
20:13:28 <rau117> peter1138[d]: It looks completely like the initial problem with cargo icons โ currency symbol is too far from its name, maybe, just like cargo icons, move it to the left?
20:13:29 <frosch123> peter1138[d]: can you also scale the padding?
20:13:40 <frosch123> the left side looks weird, if the icon touches the button bevel
20:13:50 <peter1138[d]> frosch123: It is, but we can't draw 1.75x wide pixels.
20:14:10 <_zephyris> Touching the bottom border is 1x vanilla
20:14:22 <truebrain> it also annoys me there, no worries ๐
20:15:02 <locosage> rau117: except in this case symbols don't really matter
20:15:13 <peter1138[d]> Actually TTD itself is one-scaled-pixel UP from the bottom.
20:15:19 <peter1138[d]> But left & right touch.
20:15:39 <peter1138[d]> Either way, that's kinda separate to scaling the sprites ๐
20:15:59 <peter1138[d]> rau117: It was just a quick test to show the symbols in game.
20:17:49 <_zephyris> truebrain: And presumably annoys you in station and waypoint buttons too. Interestingly there is a border for object buttons...
20:17:58 <peter1138[d]> NewGRFs can do all sorts of weird things too.
20:18:09 <truebrain> _zephyris: I complained about it a few times, but nobody listened ๐
20:18:15 <peter1138[d]> _zephyris: Yeah, objects are fubar...
20:19:09 <peter1138[d]> Totally vanilla though.
20:19:32 <locosage> two ruble currencies are just lolz
20:19:32 <peter1138[d]> We made it higher for some reason, I probably broke it at some point ๐
20:19:45 <locosage> there is russian ruble that is called "new russian ruble"
20:20:04 <locosage> and old russian ruble that is called "russian ruble" with the exchange rate of a new russian ruble xD
20:20:17 <truebrain> LordAro: in other news, today I killed my (work) laptop by plugging in an USB-C cable to charge it. Turns out, there is a short in the cable, and these laptops are not protected against that. RIP laptop. And mostly: RIP data on laptop ๐ฆ
20:21:09 <peter1138[d]> _zephyris: In my WIP patch that unifies the picker windows, all that object spacing is gone.
20:24:59 <_zephyris> peter1138[d]: But, I do agree that a 1px padding would be nice...
20:31:25 <xarick> this is unfair... crashes 3 days into
20:39:51 <peter1138[d]> Story-book popping up on a new game is a pain when testing things...
20:40:04 <truebrain> what GS does that? I tried to find one, failed ๐
20:40:13 <peter1138[d]> Open toolbar, select tool, BLAM, big popup and your tool is removed.
20:40:36 <peter1138[d]> Renewed Village Growth at least
20:41:13 <truebrain> yippie, tnx; means I actually tested if the GS flow was working. I was adding nots to the `centered` to test it ๐
20:42:37 <peter1138[d]> I need a viewport GetBounds and GUI GetBounds ๐ฎ
20:43:42 <truebrain> owh, I thought error messages tried to find a free space to pop up
20:43:45 <truebrain> but they are always in a corner?
20:44:06 <truebrain> now I find it even more annoying
20:47:11 <truebrain> `AddressSanitizer: stack-buffer-overflow on address`
20:48:46 <peter1138[d]> We should switch to std::variant<> there, but apparently we told Rubidium not to.
20:49:12 <truebrain> we also say we don't like the mix of h / hpp ๐
20:49:45 <truebrain> but `CopyOutDParam` makes a copy of the string
20:49:48 <truebrain> so I wonder why this breaks
20:49:56 <truebrain> more importantly, can I reproduce it
20:50:18 *** gelignite has quit IRC (Quit: Stay safe!)
20:51:34 <peter1138[d]> Because it's not always a string.
20:51:44 <_glx_> it fails during the copy of invalid parameters
20:51:46 <peter1138[d]> It depends one what SetDParam() have been used before.
20:51:55 <peter1138[d]> I have some patches... somewhere.
20:52:54 <truebrain> but why do I have such a hard time reproducing it ๐
20:53:22 <_glx_> it depends on the previous string
20:54:05 <peter1138[d]> Something went wrong here ๐
20:54:17 <_glx_> and the previous string must have used SetDParamStr
20:54:46 <peter1138[d]> Yeah, that was it, a SetDParamStr where the pointed-to-string no longer exists.
20:55:53 <peter1138[d]> I had a few ideas on it, but then got sidetracked again.
20:55:54 <_glx_> and as CopyOut copies all params
20:56:19 <_glx_> even the ones it won't use
20:56:25 <peter1138[d]> Most robust was using their own parameters instead of copying to/from the global parameters.
20:56:45 <_jgr_> Even easier to just remove the non-owning string mode
20:56:50 <peter1138[d]> Otherwise you can work around it but it relies on all callers doing it.
20:57:06 <_glx_> something similar to ScriptText
20:57:21 <truebrain> it makes testing errors really annoying, as it randomly crashes ๐
20:57:24 <_glx_> it has the string id and it's params
20:59:56 <truebrain> I cannot reproduce it reliably, but I have it often enough to not be able to test my current work ๐
21:00:44 <_glx_> when I looked to SetDParamStr, newgrf errors where the most probable cause
21:02:04 <_glx_> (for the bug report we had)
21:02:22 <truebrain> but okay .. I don't understand this code, so I will leave it alone
21:02:27 <truebrain> might make a bug report in a bit ๐
21:08:02 <truebrain> If you can leave your analysis in that ticket _glx_ , that would be appreciated ๐
21:11:39 <truebrain> peter1138[d]: you do know you just added an empty reply, right? *trolololol* ๐
21:16:52 <truebrain> peter1138[d]: did I introduce that bug? Or was it old? ๐
21:17:24 <truebrain> just curious; not that is matters ๐
21:17:42 <peter1138[d]> this->line_height = std::max(this->box.height, this->icon.height);
21:17:46 <peter1138[d]> Yeah, you broke it ๐
21:18:05 <truebrain> ha; too much removing of code ๐ Nice!
21:18:13 <peter1138[d]> Hmm, in fact, this->icon.height should probably be there still, really.
21:18:23 <truebrain> I removed the `icon`, not?
21:18:44 <peter1138[d]> That's the company-colour blob.
21:19:26 <truebrain> okay, simple fix from your PR; guess you are already pusing that ๐
21:19:51 <truebrain> hmmm ... 11923 tells me it cancelled one task, and it is not telling me which
21:20:12 <truebrain> ah, MacOS job got cancelled
21:20:30 <peter1138[d]> Yeah, I'm just compiling 478 files again cos I switched branches ๐
21:21:25 <peter1138[d]> Still, at least everything is centred within the giant line height ๐
21:21:40 <_glx_> I'm happy with fast compilation now, it used to be very slow ๐
21:22:16 <peter1138[d]> I never thought I'd consider by 4.4GHz six-core CPU slow...
21:22:20 <_glx_> not so happy by the cost ๐
21:22:51 <_glx_> (I was on FX-6100 before)
21:23:25 <xarick> someone pls convince me I need to buy a ryzen 9 5950x
21:24:54 <truebrain> for some reason talltyler also made a PR that claims to fix #11910, but does something totally different? ๐
21:25:01 <_glx_> xarick: going to ryzen 5 7600X was expensive enough for me
21:25:55 <_glx_> and not a planned change
21:27:33 <peter1138[d]> Possibly misunderstand the task
21:28:05 <truebrain> even the first bullet in the PR says it fixes what I fixed in #11925
21:28:08 <_glx_> hehe #11912 fixes the content ๐
21:28:09 <truebrain> it doesn't even look like it ๐
21:28:14 <talltyler> Found the wrong `dump_cmds`
21:28:26 <truebrain> this confuses me greatly ๐
21:28:37 <truebrain> but, it is a good fix
21:28:40 <truebrain> so .. we have that going for us
21:29:09 <xarick> hmm.... approaching my budget
21:29:34 <_glx_> I hope you already have a compatible MB
21:29:50 <peter1138[d]> AM5 is the current socket isn't it?
21:29:51 <_glx_> don't forget to update BIOS
21:30:20 <_glx_> but AM5 is expensive too
21:30:23 <peter1138[d]> Hmm, I guess I can delete my scale-on-the-fly fractional scaling patch.
21:30:33 <truebrain> talltyler: and it is just funny, how I was bitching about the desync stuff, and still we missed more than a few cases ๐
21:30:37 <truebrain> silly grep ... I suck at it ๐
21:31:03 <_glx_> MB+DDR5+CPU is a lot more than AM4 CPU only if you already have AM5 MB
21:31:27 <xarick> i am undecided on my next upgrade, it's either cpu or gpu
21:31:50 <xarick> already upgraded from 16 gb ram to 32
21:32:19 <xarick> depends on how good of a game poe 2 will be
21:32:25 <truebrain> talltyler: I really like the 2h 0m solution for savegames; it looks nice ๐
21:33:24 <talltyler> Edited to remove mention of an issue that doesnโt fix (but I pushed before editing PR title)
21:33:57 <talltyler> It doesnโt dismiss your review, but still needs to run CI? Laaame
21:34:59 <truebrain> funny, I just fix that by changing the squash title of the commit ๐
21:36:01 <talltyler> Then itโs wrong in the PR thoughโฆ thought I could be sneaky and do it right
21:36:47 <truebrain> huh? I just change the title of the PR, and click squash and remove those letters ..
21:37:09 <truebrain> the commit messages in the PR itself are not really relevant, if that is what you worry about ๐
21:37:28 <truebrain> but as I find it really annoying that every commit you push is also mentioned in the PR, I never put PR numbers in my commits, and fix them in via Squash ๐
21:37:34 <peter1138[d]> Hmm, in the surveys, we have map_x and map_y separately, is there a total map size too?
21:37:39 <truebrain> as I push a lot of times .........
21:38:01 <truebrain> peter1138[d]: not currently; can be fixed, ofc
21:39:40 <peter1138[d]> JGRPP uses play... smaller maps???
21:40:25 <truebrain> in general what I would like to do btw, is allow for correlations to be found
21:40:31 <truebrain> and I guess this is one of those correlations more than a new field
21:40:45 <truebrain> I also want to know: do players on an NxM map also have setting X enabled, for example
21:41:46 <_jgr_> peter1138[d]: I did a WIP patch for that ๐
21:42:02 <peter1138[d]> The stats are weird.
21:42:07 <_zephyris> Yes. Love it. Really fun challenge!
21:42:13 <peter1138[d]> 29.9% players have map_y = 10
21:42:22 <peter1138[d]> 2.0% players have map_x = 10
21:43:00 <_jgr_> truebrain: It was in the context of some joke at the time, I forget now
21:43:29 <xarick> ```/** Maximum number of operations allowed for valuating a list. */
21:43:29 <xarick> static const SQInteger MAX_VALUATE_OPS = INT64_MAX;```
21:44:22 <truebrain> by some definition of "fix"
21:45:02 <_glx_> but if you change the `500000` with `1000000` it should be similar to what it was before
21:45:02 <truebrain> "the alarm get going off, so I removed the batteries" kinda "fixed"
21:45:11 <_jgr_> xarick: Now you'll just get some godawful integer overflow bug instead
21:45:28 <peter1138[d]> _glx_: Is there some extra overhead it in now?
21:45:38 <peter1138[d]> Or just counted differently more likely...
21:48:35 <_glx_> now it counts inside the VM, while before it was just a check inside the loop after the call
21:48:49 <_glx_> was `if (ScriptController::GetOpsTillSuspend() < -1000000) {`
21:49:21 <_glx_> so between 1000000 and 1000000+allowed opcodes
21:49:53 <_glx_> depending on when the Valuate happened
21:49:57 <xarick> it's august now, 8 months survival
21:51:30 <xarick> i should test more than just hog
21:52:05 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:56:15 <xarick> League table auto-resizes too often ๐
21:58:51 <xarick> guess I'm not using it the expected way
22:01:09 <truebrain> owh, right, gog-galaxy was acting up .. hmm
22:02:29 <truebrain> so I compile against `libGalaxy64.dylib`, but when opening, it looks for `libGalaxy.dylib`
22:02:32 <truebrain> how does that make sense?
22:02:48 <_glx_> maybe it does in macos world ๐
22:03:38 <truebrain> and ofc no Mac access, so .... let's try some things?
22:04:05 <_glx_> could it be universal build weird stuff ?
22:04:36 <truebrain> @rpath/libGalaxy64.dylib
22:04:36 <truebrain> @rpath/libGalaxy.dylib
22:04:44 <truebrain> is inside the dylib
22:05:14 <_glx_> the idea of universal build is nice, but the usage from dev POV is not
22:05:37 <truebrain> not without a Mac to anaylize the files ๐
22:07:40 <xarick> that's a weird company name
22:07:46 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:10:03 <truebrain> no actual way to test this without setting up all the secrets again on my fork, which is a very annoying job ..
22:10:24 <truebrain> guess I just have to ask mister MacOS to test my PR, checking if that works ๐
22:11:02 <truebrain> at least it compiles ๐
22:12:17 <xarick> AICompany.SetName("Failed " + this.name);
22:12:23 <_glx_> truebrain: if only it was enough for macos stuff
22:13:21 <_glx_> something in the AI code
22:15:01 <xarick> I don't remember the whole null 0x000 being printed before
22:15:35 <xarick> it's MpAI that does this when failing to build 2 airports
22:19:45 <truebrain> emperorjake: a request for you that takes a bit more effort .. so only if you have time, and are willing. Would you be willing to build your own OpenTTD with `-DOPTION_ALLOW_INVALID_SIGNATURE=ON`, and after that, see if the plugin from below works. It will also give a MacOS warning, as these are neither signed with a valid key for OpenTTD nor signed with a valid key for MacOS.
22:19:45 <truebrain> I think that it might work; if so, it is finally the last of this series to test ๐
22:19:57 <truebrain> Also: `CP***ck: - p***ck***ge: bundles/gog-g***l***xy-soci***l-test5-m***cos-univers***l.dmg gener***ted.` .. best string EVAH ๐
22:24:49 <xarick> seems that AICompany.SetName("Failed " + this.name); fails to set the name in 13.4
22:24:57 <xarick> but not in current master
22:25:37 <xarick> it keeps the other name which is set before
22:26:06 <xarick> ``` /* Rename the company.*/
22:26:06 <xarick> if (!AICompany.SetName("mpAI")) {
22:26:06 <xarick> while (!AICompany.SetName("mpAI #" + i)) {
22:52:08 <peter1138[d]> "nobody knows what I'm talking about" probably means your description is lacking.
22:54:19 <truebrain> So yeah, the interface is extremely easy ๐
22:54:54 <locosage> peter1138[d]: if you mean 10003 whole description is in 9903, 10003 is just a tiny fix
22:55:16 <_jgr_> truebrain: Sounds great ๐
22:55:25 <truebrain> Wait, my ticket didn't get zorged by zorg? \o/ quick, merge!
22:56:46 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
23:00:47 <peter1138[d]> > Maybe it's even better than before.
23:01:12 <peter1138[d]> Implies that the default assumption is that is isn't better than before...
23:03:22 <xarick> 10152 and 8895 are both ... terrible merges ๐ฆ
23:04:20 <truebrain> Marvin entered the chat again
23:04:37 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
23:06:13 <xarick> I could agree with making the settings editable from the scenario editor
23:07:20 *** ChanServ sets mode: +v tokai
23:08:17 <xarick> it wasn't tested properly, there are more places in code that would need handling to make the settings actually editable
23:09:38 <xarick> and it risks breaking scripts foremost
23:11:14 <xarick> it feels like a punch in the stomach for those who designed that functionality before them
23:11:31 <xarick> oh well, I'm off to bed
23:13:46 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
23:28:40 *** tokai|noir has joined #openttd
23:28:40 *** ChanServ sets mode: +v tokai|noir
23:35:25 *** tokai has quit IRC (Ping timeout: 480 seconds)
23:39:05 *** Wormnest has joined #openttd
23:43:55 <emperorjake> I think it would be a good idea if towns did build houses around road endings if towns can build roads is disabled
23:57:20 <Eddi|zuHause> because then players trying to connect to the town must dismantle buildings first
continue to next day โต