IRC logs for #openttd on OFTC at 2024-10-02
โด go to previous day
00:38:58 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
00:55:29 *** Wormnest has joined #openttd
01:00:45 *** Wormnest has quit IRC (Quit: Leaving)
01:19:54 <wensimehrp> andythenorth: what's `st`? Status?
01:19:54 <wensimehrp> git: 'st' is not a git command. See 'git --help'.
01:19:54 <wensimehrp> The most similar commands are
01:37:17 <mnhebi> peter1138: damn dude, have some mercy. ๐
01:37:33 <mnhebi> Junior devs gotta start somewhere :D
02:02:22 *** herms61 has quit IRC (Quit: bye)
02:03:10 *** herms61 has joined #openttd
02:13:44 *** gnu_jj_ has quit IRC (Ping timeout: 480 seconds)
02:24:44 *** D-HUND has quit IRC (Ping timeout: 480 seconds)
02:47:32 *** Flygon has quit IRC (Read error: Connection reset by peer)
04:41:34 *** blathijs has quit IRC (Ping timeout: 480 seconds)
04:45:40 *** blathijs has joined #openttd
04:45:40 *** ChanServ sets mode: +o blathijs
05:25:38 *** keikoz has quit IRC (Ping timeout: 480 seconds)
06:33:31 <andythenorth> hmm, this repo that had 250k redundant PNGs in it....should I prune my repo history?
07:11:53 <wensimehrp> git pull --depth 1
07:19:05 <johnfranklin> ++++++++++[>+++++++++++>++++++++++>++++++<<<-]>--.+++++++++.-------.>-.+++++.>+++
07:51:11 *** nielsm has quit IRC (Remote host closed the connection)
08:16:42 *** mindlesstux has joined #openttd
08:36:30 <xarick> bad news... I got an assert
08:41:16 <xarick> aha @glx, got the crash
08:42:54 <xarick> right after I clicked OK of the previous Error window
08:47:33 <johnfranklin> WTF, goodnotes thought the โcoslogxโ function diagram as an instruction to erase the x axis
08:48:02 <johnfranklin> After screenshot, the diagram would be gone along with the x axis
08:51:39 *** nielsm has quit IRC (Ping timeout: 480 seconds)
09:26:46 <truebrain> Wauw, #12973 contains a lot of totally irrelevant noise
09:27:01 <truebrain> The bug itself is pretty trivial; the ticket is not ๐
09:28:48 <xarick> what does the game do when 1 minute between autosaves is insufficient?
09:29:02 <xarick> imagine saving takes 1 minute and half
09:29:15 <LordAro> truebrain: title is taken directly from that forum thread that peter linked yesterday
09:29:46 <truebrain> Yeah, it makes a simple ticket a lot more difficult
09:30:12 <truebrain> Either way, a simple oversight on our part, not removing the scoreboard exception thingy
09:31:43 <LordAro> i thought it was intentional
09:31:57 <LordAro> in so much as the highscore table is completely meaningless anyway
09:32:24 <LordAro> but using sandbox options meaning that you don't appear on the highscore table is perfectly reasonable to me
09:46:50 <peter1138> Was more going to be done with the sandbox changes?
09:47:54 <peter1138> I got the impression that it was all going to be merged into settings at some point, which is why we added new sandboxy type stuff (infinite money) as settings instead.
09:52:45 <truebrain> Someone had a plan with it. But it seems it stranded after the initial bump ๐
09:53:02 <truebrain> Either way, used some editorial powers to make the bug report more readable ๐
09:54:12 <truebrain> Now we can discuss whether it is wanted behaviour in the ticket ๐ ๐
10:10:23 <peter1138> Is that Someoneโข? ๐
10:13:26 <peter1138> Also the distinction between GM_NORMAL and GM_EDITOR gets a bit blurred.
10:42:48 <xarick> 70000 ships autoservice -> no issues found, there are some false positives though, with some ships never servicing
10:43:46 <xarick> but that's due to their current path choice not having a depot within the max_penalty
10:44:39 <xarick> 70000 service at nearest depot order -> we have an assert ๐ฆ
10:45:33 <xarick> how am I going to debug this... it only happens after 1 year game time
10:46:00 <xarick> waiting 1 year with a debug build is gonna take forever!
10:48:58 <peter1138> Use a smaller savegame.
10:56:38 <xarick> i have an idea that might work, savegame 1 day before it happens
10:56:40 *** HerzogDeXtEr has joined #openttd
11:36:00 <xarick> okay, another case of hlpf vs llpf disagreeing
11:36:07 <xarick> pff these are so difficult to solve
11:44:17 *** aviationgamerx has joined #openttd
11:44:17 <aviationgamerx> Alright, I did some stuff, max loan setting change, I changed code in different places but it seems this is the only place that is getting messed up in the difficulty_settings.ini file
11:44:17 <aviationgamerx> What does it mean `difficulity` undefined? how do I make it reccognize the `difficulty` as it did in `var = difficulty.max_loan_percentage`?
11:44:17 <aviationgamerx> And what about the other errors, I don't quite understand them?
11:44:19 <aviationgamerx> If there is a place I should be posting questions like these instead of here in like a forum or something tell me where, otherwise I guess this is the only place, thanks in advance
11:46:13 <LordAro> the full variable is _settings_game.difficulty
11:46:19 <LordAro> i imagine the ini is prepending that
11:47:02 <LordAro> the other errors probably follow from the first
11:47:16 <LordAro> in C/C++ you should always fix the first error before worrying about the others
11:48:26 <_glx_> Like a missing `;` could cause a huge amount of errors after it ๐
11:53:37 <kuhnovic> A missing const is also a good way to get lots of fun errors, especially when templates are involved
12:09:53 <aviationgamerx> LordAro: I automatically did that lol, I didn't even bother trying to understand them
12:10:06 <aviationgamerx> _glx_: or writing difficulity instead of difficulty
12:11:08 <aviationgamerx> LordAro: alr thanks will try it
12:25:22 *** akimoto has joined #openttd
12:26:15 <aviationgamerx> LordAro: welp they weren't related to the same error
12:26:27 <aviationgamerx> does it have to do with the flags
12:34:04 <LordAro> hmm, no, probably not flags
12:37:01 <aviationgamerx> seems like not
12:40:29 <LordAro> you might be able to work something out from looking at the generated code, but i'm not sure looking at those errors
12:40:40 <LordAro> i don't get VS errors
13:31:57 <aviationgamerx> the generated code shows the problem is with this line
13:37:51 <LordAro> are those callback functions supposed to return boolean?
13:38:23 <LordAro> it looks like it's supposed to be a IntSettingDesc, does that match the constructor?
13:39:46 <aviationgamerx> I am not sure what it means, I don't see any constructors
13:41:26 <aviationgamerx> is there supposed to be a constructor with the same parameters somewhere that is missing?
13:41:40 <xarick> My investigative work...
13:42:25 <xarick> the problem is llpf to intermediate_destination ๐ฆ
13:43:43 <_glx_> it's expected to get 2 different depot for hlpf only and llpf only
13:44:23 <LordAro> aviationgamerx: settings_internal.h:173
13:44:54 <LordAro> critically, the PostChangeCallback is a void function
13:45:17 *** akimoto has quit IRC (Ping timeout: 480 seconds)
13:46:53 <_glx_> hlpf will return the one in yellow circle, while llpf will return the other one
13:48:08 <xarick> intermediate_destination should be false, as the 5th region is the destination
13:48:38 <xarick> let's see if I can solve this without breaking it
13:49:24 <xarick> i think i can't without changing something fundamental
13:54:01 <xarick> maybe I don't need to do anything at all...
13:54:14 <aviationgamerx> LordAro: oh so I don't need to return anything
13:54:42 <xarick> this call is from the order, so there's no limit to the cost of the path
13:55:36 <xarick> it would be nice if the path results matched, but in this case... it doesn't matter
13:55:47 <xarick> I'm being too assertive for no reason
13:57:17 <xarick> ship will still end up going to the depot I specified
14:10:59 <aviationgamerx> LordAro: but even without the return it doesn't seem to fix it
14:13:31 <xarick> I can try and do something about it... instead of getting only the first 5 regions, the first 6. If there are 5 or more regions in the path, also check if it is the last and set intermediate_destination if it isn't.
14:14:03 <xarick> terrible englsih typos
14:15:11 <xarick> i might end up in a cat and mouse cycle though
14:19:06 <xarick> what if the llpf finds a depot in a place where it results in 6 regions...
14:25:29 <_glx_> in the screenshot ship and circled depot are in the same region, but there's not path inside the region
14:29:56 <peter1138> Where does the water region patch fit in there?
14:30:03 <talltyler> Why are you doing the conversion of the old setting value in the setting callback?
14:31:39 <aviationgamerx> talltyler: well I tried switching it to a percentage, but make it still change the value after changing the percentage
14:35:09 <xarick> I wish there was a delete all groups button
14:35:24 <xarick> need to stop all ships, but one
14:37:08 <aviationgamerx> since the setting changes the value directly, making it into percentage meant making a new variable that carries the percentage, at least that was one way to do it
14:37:08 <aviationgamerx> and the main max_loan variable has to change as well, so I made it change after the percentage changes
14:39:00 <aviationgamerx> talltyler: unless you mean the currency conversion
14:40:18 <aviationgamerx> I think I put it because the currency automatically converted with the currency flag
14:40:36 <aviationgamerx> which I removed since it's working with percentage
14:40:48 <aviationgamerx> so I had to make it converted in here
14:41:56 <aviationgamerx> problem is now is the intializer list thing, I am struggling to understand it
14:42:47 <johnfranklin> These days I havenโt seen andriydohniak
14:52:40 <xarick> wish i could make the debugger draw the two paths...
15:04:14 <xarick> first call hlpf wanted the depot pointed by the red arrow, llpf decided the depot pointed by green arrow
15:04:43 <xarick> second call hlpf pointed to green arrow, llpf however picked the intermediate path
15:04:56 <xarick> with is the path on the right, leading to nowhere
15:05:41 <xarick> oh, forgot to circle depot in green
15:07:18 <kuhnovic> And that's why a depot should be chosen _and the ship should stick to it_
15:07:35 <xarick> in this case, it's fine
15:07:52 <xarick> it's a order from the order list
15:08:00 <peter1138> Deal with that outside the pathfinder.
15:08:15 <kuhnovic> I can explain it all one more time, but I'm not going to, because you're going to implement something random anyway that has nothing to do with it
15:30:18 <xarick> // DEBUG_clearDrawInstructions();
15:32:12 <xarick> ```assert(track == track2 ||
15:32:12 <xarick> (track == INVALID_TRACKDIR && best_origin_dir == reverse_dir) ||
15:32:12 <xarick> (forward_dirs == forward_dirs2 && max_penalty == 0));```
15:37:10 <xarick> not sure this is correct, must think
15:49:14 <aviationgamerx> LordAro: ohhhhhhhhhhhh
15:49:38 <aviationgamerx> post_cb is not supposed to take `[](auto &new_value)`
15:49:51 <aviationgamerx> it only allows `[](auto)`
15:49:59 <aviationgamerx> it actually ran
15:50:27 <aviationgamerx> that was the paramater causing the error all along
15:53:12 <aviationgamerx> alr first succeful run, check
15:53:12 <aviationgamerx> first "that's not supposed to happen", check
16:57:56 <xarick> running new set of tests
17:02:42 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
17:03:43 *** HerzogDeXtEr has joined #openttd
17:07:06 <xarick> I'm finally dealing with the track that comes after checkshipreverse
17:15:23 <aviationgamerx> is there a way to make this line run while the game is opening
17:16:10 <aviationgamerx> or run right after the main setting is loaded
17:17:01 <aviationgamerx> it seems to stay 0 at intilization and even when changing the main setting
17:17:38 <LordAro> there is the concept of "ini file version", i think you probably need something in there
17:18:10 <LordAro> see IFV_AUTOSAVE_RENAME for something similar
17:26:15 <talltyler> I have not looked at the code, but keeping the old setting, adding a new one, and tying the two together seems to be the wrong way to go
17:27:50 <talltyler> In my mind, you need one setting that holds the percent, and then a helper function that calculates the actual money equivalent to be used everywhere that needs said money equivalent.
17:29:03 <_glx_> yeah allowing to set both percent and value is asking for trouble
17:29:37 <aviationgamerx> LordAro: I am not sure how that works or ties with the problem
17:29:37 <talltyler> This involves some saveload conversion to get the old outdated setting and calculate the new setting value, but Iโm pretty sure I did it wrong with service intervals so donโt look at me for help with that ๐
17:30:36 <_glx_> service interval is not the best example as it was holding 2 types of values before you added another one
17:32:49 <aviationgamerx> talltyler: I removed the option of value, the variable is still there, but you can only change the percentage, the post_cb part is what was supposed to take the value and convert it, and I didn't want to mess with whatever calculations happen in the whole code using difficulty.max_loan
17:33:27 <aviationgamerx> it looks like how I want it to look but it doesn't seem to be changing anything with diffculty.max_loan
17:35:59 <talltyler> I would replace `difficulty.max_loan` with a `GetMaxLoan()` helper function that does the math
17:37:08 <aviationgamerx> talltyler: that's actually a good idea, never thought of it
17:37:38 <aviationgamerx> hope it does work tho
17:37:49 <talltyler> Oh, it already exists, because dP recently added company-specific max loans that can be controlled by GSโฆ
17:38:14 <aviationgamerx> then GetMaxLoanFromPercentage()?
17:38:39 <talltyler> But that uses `company->max_loan`, so yeah, you shouldnโt have to worry about it
17:38:48 <talltyler> As long as your function names donโt conflict
18:07:48 <aviationgamerx> is there a problem if I add the function here? or is there supposed to be a place for functions like these
18:31:27 <talltyler> Inside the structure would be a weird place ๐
18:34:06 <aviationgamerx> xarick: will worry about that later lol
18:34:46 <talltyler> Comments are misaligned now, donโt worry about it ๐
18:34:59 <aviationgamerx> talltyler: weird or illegal? It does seem like the best place for it
18:35:29 <talltyler> We stopped caring about alignment because it was making diffs huge, and then did some batch renaming that misaligned things all over the codebase
18:35:52 <talltyler> Definitely donโt put it in the struct
18:37:11 <xarick> what do I want to test now?
18:37:49 <aviationgamerx> talltyler: alr
18:37:56 <talltyler> `company_base.h` seems like a suitable place to me, for now anyway. You can always move it later ๐
18:46:52 <aviationgamerx> talltyler: wherever I put I am gonna have to include currency.h
18:48:49 <aviationgamerx> not sure why I would place it in here specifically but I will go with it
18:53:09 <aviationgamerx> what is up with all the 1000 here?
18:53:36 <aviationgamerx> something about a new game saving mechanic, not sure what it means
18:54:28 <aviationgamerx> it multiplies what exactly with a 1000? and why
19:01:18 <_glx_> Old setting used to omit final 000
19:21:42 <aviationgamerx> 240 errors all in different .obj files
19:32:19 <aviationgamerx> what does this mean
19:32:59 <aviationgamerx> what have I done to make it all blow up like that
19:33:12 <xarick> making a wild guess: missing include somewhere
19:33:44 *** nielsm has quit IRC (Ping timeout: 480 seconds)
19:35:32 <xarick> or static vs inline or whatever
19:35:56 <bigyihsuan> aviationgamerx: only ever `#include` header files `.h`, if you include `.cpp` files it gives you those errors
19:37:30 <xarick> I have 2 issues yet...
19:38:14 <xarick> a nearest depot order after a buoy order is issuing a forward and backward search
19:38:28 <xarick> should only issue a forward search
19:39:14 <aviationgamerx> bigyihsuan: does the same rule apply if I implement a function in a .h file?
19:39:29 <aviationgamerx> because there is no .cpp includes
19:41:45 <xarick> manually sending ship to depot is also issuing a forward and backward search. Either only issue forward search, or issue both ways but add a big cost for the reverse path
19:43:04 *** ChanServ sets mode: +v tokai
19:47:35 <xarick> i prefer the 2nd option
19:49:53 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
19:57:43 <xarick> there is a depot behind the ship, but when the search is forward looking only, it returns no depot ๐
20:00:25 <aviationgamerx> bigyihsuan: thankfully all I had to do was make the function inline
20:04:11 <aviationgamerx> ok need confirmation on this
20:05:24 <aviationgamerx> do I make the percentage interval in 10%, 50% or 100%?
20:05:24 <aviationgamerx> 100 -> 110 -> 120 -> 130
20:05:24 <aviationgamerx> 100 -> 150 -> 200 -> 250
20:05:24 <aviationgamerx> 100 -> 200 -> 300 -> 400
20:13:45 <aviationgamerx> as of right now it seems to be always rounding down to the last 100%
20:15:11 <aviationgamerx> it is currently working well that way
20:15:21 <aviationgamerx> but it means less customization
20:15:43 <aviationgamerx> I will wait for you guys to reply and finally finish this thing
20:26:48 <talltyler> Interval is just what the buttons do, you can always click the value to enter a custom value
20:29:32 <aviationgamerx> talltyler: oh, but the code sitll automatically rounds to the last 100% anyway
20:29:56 <aviationgamerx> if you enter any value between 100 and 200 it will still be 100
20:32:06 <aviationgamerx> should I make it that it accepts any whole percentage?
20:32:56 <aviationgamerx> 112% would 336000 normally, as right now it goes down to 300000 anyway
20:43:57 <aviationgamerx> although I am unsure what is making it always round to these values
21:01:11 <aviationgamerx> alr I will treat it as 100%
21:01:59 <aviationgamerx> if anyone liked to change it in the future, they can make a whole other story for it
21:02:06 <aviationgamerx> thanks for the help everyone
21:02:24 <aviationgamerx> I shall finalize this thing
21:06:10 <soylent_cow[m]> this is probably a stupid question, sorry, but when i query service intervals with setting, they appear completely unrelated to what's in config, and yet the config values seem to work just fine.
21:06:37 <soylent_cow[m]> and the question is, am i missing something?
21:13:20 *** Wormnest has joined #openttd
21:34:11 <xarick> the code is that, i still didn't document the stuff, I'm bad at that
21:34:28 <xarick> but it's functional, I'd like kuhnovic to take a look
21:34:41 <xarick> I will document tomorrow
21:50:08 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:02:14 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:15:29 <aviationgamerx> it has been done
22:32:41 <talltyler> Congratulations! Now comes the hard part, where we help you make it work with loading old savegames and meet code standards. Iโll be honest, youโve got some work ahead of you. ๐
22:32:58 <talltyler> But we will guide you through it. ๐
22:36:18 <aviationgamerx> talltyler: alright, I am with you guys till it's fully done
continue to next day โต