IRC logs for #openttd on OFTC at 2019-02-22
⏴ go to previous day
00:02:11 <LordAro> #7259 sounds like it might be a window ticks thing?
00:03:27 <Eddi|zuHause> no, it's not a "hide this cargo" feature
00:03:58 <Eddi|zuHause> but not an "exclude" filter, just a "don't include" filter
00:04:30 <Eddi|zuHause> if you select "mail", it still shows passengers on stations that have mail
00:06:54 <DorpsGek_II> [OpenTTD/OpenTTD] Eddi-z commented on issue #7259: Waiting cargo show cargo that should be hidden https://git.io/fhFah
00:09:29 <Samu> do u guys have savegames where multiple companies are transporting goods or steel from the same industry?
00:11:09 <LordAro> perhaps a tooltip could be improved?
00:15:46 <DorpsGek_II> [OpenTTD/OpenTTD] SylvainDevidal commented on issue #7259: Waiting cargo show cargo that should be hidden https://git.io/fhFVO
00:15:47 <DorpsGek_II> [OpenTTD/OpenTTD] SylvainDevidal closed issue #7259: Waiting cargo show cargo that should be hidden https://git.io/fhFa9
00:19:01 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro approved pull request #7252: Fix #7159, e934f09: Waiting time at red one-way signals was too short. https://git.io/fhFVs
00:19:07 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro merged pull request #7252: Fix #7159, e934f09: Waiting time at red one-way signals was too short. https://git.io/fhd6W
00:19:15 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro closed issue #7159: Reverse at signal timeouts occur unexpectedly quickly, affects title game https://git.io/fhSIt
00:26:46 <Samu> is this good english Feature: Favour company which delivers primary cargo to an industry by prioritizing stations of that company at receiving the transformed cargo
00:27:14 <Samu> Feature: Favour company which delivers primary cargo to an industry by prioritizing stations of that company when receiving the transformed cargo
00:29:53 <Samu> i have many questions about my implementation
00:30:16 <Samu> i have no idea about newgrf_industries how they work
00:30:27 <Samu> i dont know how to perform savegame conversion
00:31:37 <DorpsGek_II> [OpenTTD/OpenTTD] James103 commented on pull request #6965: Add: Option for population-linear town cargo generation https://git.io/fhFVV
00:42:45 <Samu> btw, I'm reusing MAX_COMPANIES as OWNER_NONE
00:43:10 *** drac_boy has joined #openttd
00:44:53 <drac_boy> hi there..was just thinking a bit about in-game maths and had to ask for a second opinion .. would loosely loaded versus sacks-loaded open wagons (or mineral wagons for any uk-eng people here) basically really come to the same total cargo tonnage? my reasoning was that although the sacks would induce a bit more air space the fact that it can be stacked a bit higher than the wagonbody's rim neglects this
00:45:07 <drac_boy> oh sorry I didn't think I would type so much in one go :-s heh
00:45:58 <Samu> what have you done to holding left click on a scrollbar...
00:46:50 <LordAro> ooh, did peter1138 break it?
00:47:55 <Samu> not on the scrollbar, my bad
00:48:05 <peter1138> Who even clicks on them? :o
00:48:57 <peter1138> /* If cursor hasn't moved, there is nothing to do. */
00:49:01 <peter1138> That needs to be moved.
00:52:30 <LordAro> holding down left click on the scrollbar itself also only moves it once
00:52:52 <peter1138> Oh right, same fix.
00:55:37 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN opened pull request #7260: Fix #7227: Don't apply mouse-hasn't-moved test to scrollbars. https://git.io/fhFwL
00:56:46 <Samu> i meant the arrow buttons
00:57:09 <peter1138> The buttons are part of the scrollbars.
01:02:14 *** ChanServ sets mode: +v tokai
01:08:46 <peter1138> Ok, RV path cache working.
01:12:22 <peter1138> 19-20fps in Wentbourne.
01:14:45 <peter1138> Oh of course, that's with the group vehicle ticks too.
01:28:45 <Eddi|zuHause> is there a slow gear on the tractor? i can't get up any slopes like this :/
01:29:10 <drac_boy> tractor? john deere? :)
01:32:53 <peter1138> glx, screenshot of the framerate window in there :)
01:33:13 <peter1138> So only 2-3fps improvement with the rv path cache.
01:33:23 <peter1138> Probably still worthwhile.
01:33:46 <peter1138> The group-vehicle-ticks path is still a massive win for me.
01:34:37 <DorpsGek_II> [OpenTTD/OpenTTD] nikolas commented on pull request #7254: Codechange: introduce a few unit tests https://git.io/fhFw0
01:34:43 <glx> even if 2-3fps seems small it's important I think
01:34:47 <peter1138> I tried not saving the path cache in the savegame, it works but takes quite a long time for performance to pick up again, and you need to synchronize when to clear the caches on all clients.
01:35:38 <peter1138> 2-3 fps is small, but actually it's a 33% improvement.
01:36:12 <glx> yes on heavy games it's important
01:36:20 <peter1138> Any savegame with large cities with grid-pattern layouts would see an improvement, I think.
01:36:29 <peter1138> Er, as long as RVs are used :-)
01:36:51 <glx> they are often used as feeders
01:36:51 <peter1138> grid = lots of mostly equal paths, and lots of pathfinding on every junction.
01:37:08 <peter1138> I set the limit to 8 segments, which means it'll cache the result of 8 junctions.
01:37:33 <peter1138> Or maybe 7, there's a > 1 in there. Hmm.
01:50:02 <Samu> suddenly pink transports goods, let's see what happens
01:50:18 <peter1138> Samu, " } else { if { " -> " } else if { "
01:53:26 <peter1138> st1/st2 implies whatever it is is still only the first 2 stations.
01:54:01 <Samu> bad stuff happens, i failed
01:54:11 <Samu> only pink should be allowed to get cargo
01:54:40 <Samu> orange is getting some :|
01:54:57 <Samu> pink is the one delivering wood
01:55:13 <Samu> should have priority to transport goods
02:00:56 *** Thedarkb-T60 has joined #openttd
02:16:58 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN opened pull request #7262: Change: Smooth AI CPU usage by spreading out AI ticks in relation to competitor speed. https://git.io/fhFwN
02:17:33 <peter1138> ^ kinda ruins Samu's "start all AIs on the first tick" stuff, but...
02:32:35 <glx> they will still start in about the same tick
02:33:09 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7262: Change: Smooth AI CPU usage by spreading out AI ticks in relation to competitor speed. https://git.io/fhFrO
02:33:25 <peter1138> If competitor_speed is max, then no change.
02:35:23 <glx> worst case is 15 ticks difference, but still in the same day
02:37:26 <glx> eh of course, different tick may have different random
02:41:00 <glx> hmm GetWagonAge() one is weird, but maybe related to random too
02:54:41 <Eddi|zuHause> old and busted: trying to drive the rover train but only managing to flail around wildly
02:54:59 <Eddi|zuHause> new hotness: using the winch to drag the rover train, really flailing around wildly
03:20:34 *** snail_UES_ has joined #openttd
04:07:13 <Samu> testing it seems to be doing well, but not 100% sure yet
04:08:15 <Samu> it's a complex network of cargo, hard to follow
04:08:34 <Samu> there are 6 stations around the industry
04:08:57 <Samu> it's a sawmill. 4 stations receive wood
04:09:15 <Samu> 3 of those stations receive it from pink
04:09:24 <Samu> 1 of those receive it from orange
04:09:54 <Samu> then, 3 of the stations around the industry load goods
04:10:15 <Samu> 1 from pink, 1 from orange and 1 from green
04:11:31 <Samu> pink can load goods because it's also pink that delivers wood
04:11:50 <Samu> but pink can't load goods when orange delivers wood
04:12:06 <Samu> because orange also delivers it
04:12:45 <Samu> orange, on the other hand can load goods because it's also orange that delivers wood
04:13:07 <Samu> but orange can't load goods when pink delivers wood
04:13:12 <Samu> because pink also delivers it
04:13:24 <Samu> green can never load goods in any case
04:13:32 <Samu> becase it never delivers any wood
04:15:28 <Samu> if pink doesn't transport goods
04:15:53 <Samu> both orange and green may load goods even when it's pink delivering wood
04:16:46 <Samu> does all of this make any sense?
04:19:19 <Samu> perhaps my explanation is confusing :|
04:21:33 <Samu> this appears to be working, but I still need to test multiple stations of the same owners
05:32:32 *** Wormnest has joined #openttd
07:40:02 *** FLHerne has joined #openttd
07:50:35 <peter1138> I added "make regression" to the end of .git/hooks/pre-commit, should be useful :-)
07:59:23 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #7262: Change: Smooth AI CPU usage by spreading out AI ticks in relation to competitor speed. https://git.io/fhFwN
08:20:24 <peter1138> Hmm, okay, not so good, it tries to compile when rebasing.
08:32:48 *** andythenorth has joined #openttd
09:15:23 <peter1138> andythenorth, I squashed nrt-block down a bit last night.
09:19:16 <LordAro> i feel it's a little on the late side to be in 1.9
09:19:16 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #7235: Change: Non-rectangular sparse station catchment area https://git.io/fh5s1
09:19:33 <LordAro> better to have a whole year of testing for 1.10
09:19:39 <peter1138> Just removed the catchment visualization.
09:19:48 <peter1138> LordAro, I'll be honest, I think another whole YEAR is way too much
09:20:21 <peter1138> We can have point-releases, or release 1.10 a couple of months later.
09:20:39 <peter1138> Releasing only on April 1st is a stupid tradition.
09:21:23 <peter1138> Station catchment got big :o
09:21:50 <peter1138> We've had people developing NRT NewGRFs for longer than a year already.
09:22:08 <peter1138> supermop_work____ is about ready to give up on it.
09:22:23 <LordAro> just my opinion, i don't mind either way
09:22:50 <peter1138> I accept maybe too late for 1.9
09:22:59 <peter1138> I don't accept a whole +1 year for 1.10
09:23:28 <peter1138> ffs now non-rect fails :(
09:23:45 <peter1138> must've had a bad rebase :(
09:28:25 <peter1138> Station::RecomputeIndustriesNearForAll();
09:28:35 <peter1138> Ah, it was in the visualization commit ... sigh
09:30:21 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #7235: Change: Non-rectangular sparse station catchment area https://git.io/fh5s1
09:33:23 <andythenorth> too late for 1.9
09:33:33 <andythenorth> or 1.10 in September
09:34:11 <andythenorth> or we put a bleeding edge release track, in between stable and nightlies
09:35:56 <LordAro> shouldn't be in 1.9.x (x>=1)
09:36:05 <LordAro> screw it, put it in 1.9
09:36:27 <andythenorth> forgiveness > permission
09:36:38 <andythenorth> it doesn't regularly assert, and it hasn't munched my savegames
09:36:51 <andythenorth> and if the commits were cleaned up, the nml support is 99% or 100% there
09:37:24 <peter1138> It'll get a lot of testing if it's included in 1.9 :p
09:37:39 <andythenorth> our insistence that the major digit of semver never changes :P
09:37:56 <LordAro> if we get up to 1.9.5, then i'll complain :p
09:38:01 <andythenorth> we're never going to bump it, because we insist the API never breaks
09:38:22 <andythenorth> so the 1 of 1.y.z is daft, just noise
09:38:50 <LordAro> could be all Linus, and just bump the major version when he feels like it
10:14:08 *** andythenorth has left #openttd
10:14:53 *** m3henry has joined #openttd
10:21:31 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #7235: Change: Non-rectangular sparse station catchment area https://git.io/fh5s1
11:37:46 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7225: Add: Various AI/GS functions that may be useful. https://git.io/fhF1K
11:46:38 <Eddi|zuHause> <LordAro> could be all Linus, and just bump the major version when he feels like it <- didn't he say "i don't have enough fingers to count to 21"?
11:47:46 <Eddi|zuHause> which is preposterous, of course. even without resorting to binary, you can count to like 60 with two hands
12:42:44 *** andythenorth has joined #openttd
12:43:26 <peter1138> Hm, is there a gui version of tig? :S
12:43:52 <peter1138> It's one of those text UIs where one wrong keypress loses all the state...
12:44:44 <peter1138> cursor keys change the selected commit
12:44:54 <Eddi|zuHause> i feel like i heard about tig before, but then completely forgot about it
12:44:55 <peter1138> pgup/pgdown can be used to scroll the commit diff
12:45:13 <peter1138> i keep trying to use cursor keys to scroll the commit diff, as is logical
12:45:24 <peter1138> it even has some kinda of window focus, but that has no bearing on it
12:46:55 <peter1138> I liked my old version of gitg, that had a stash viewer.
12:56:00 <Eddi|zuHause> i'd like a gui as intuitive as tortoisehg...
13:00:05 <peter1138> Is tortoisegit a thing?
13:03:06 <Eddi|zuHause> it exists, but i found it horrible and unintuitive, like everything about git
13:25:44 <peter1138> git makes sense when you ignore other vcs ;)
13:31:07 <Eddi|zuHause> you could say that about any religion
13:31:25 <peter1138> git isn't faith, it's science :)
13:34:15 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN opened pull request #7264: Fix: Resorting file list did not update filtered rows. https://git.io/fhFDK
13:35:11 <Eddi|zuHause> no it's not. it's a set of arbitrary rules put up by more or less a single person
13:35:51 <Eddi|zuHause> also, maths is the only true religion
14:09:56 *** snail_UES_ has joined #openttd
14:15:53 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #7235: Change: Non-rectangular sparse station catchment area https://git.io/fh5s1
14:17:12 <andythenorth> git is very divisive
14:17:30 <andythenorth> I find it really intuitive and easy to use, probably because I don't understand it
14:40:52 *** synchris has joined #openttd
14:50:52 <peter1138> Samu, it's called "logic", by the way.
14:51:01 <peter1138> 01:54 < Samu> i fail at bools :(
14:52:29 <Samu> i actually failed at logic classes
14:53:23 <andythenorth> I avoided logic in my philosophy degree
14:53:31 <andythenorth> it was a specific set of modules
14:53:48 <andythenorth> wasn't much to do with bools
14:54:34 <andythenorth> bools are level 0 in that
15:06:44 <peter1138> Boolean logic, I suppose.
15:12:23 <peter1138> Same as last night.
15:12:36 <peter1138> 00:50 <@peter1138> Samu, " } else { if { " -> " } else if { "
15:15:32 *** octernion has joined #openttd
15:18:48 <Samu> it works! that's all that matters to me
15:18:57 <Samu> I have no idea why everything works
15:19:33 <Samu> now the else ifs that you request
15:21:09 <peter1138> It just stops it being massively indented for no rason.
15:22:40 <Samu> oh, haven't tested owner_none stations
15:22:49 <Samu> there is no easy way to test this
15:23:02 <Samu> I need water industries that produce secondary cargo
15:23:43 <Samu> or if it does... plz tell me
15:25:26 <Samu> i have absolutely no idea if this works for newgrf industries
15:30:56 *** supermop_work has joined #openttd
15:32:54 <andythenorth> samu: there are no FIRS water industries producing secondary cargos
15:33:04 <andythenorth> not aware of any industry set doing that, it's highly unusual
15:33:23 <Samu> dredging site accepts engineering supplies, I wonder if that's equivalent
15:35:25 <andythenorth> well, depends what you're trying to do
15:35:36 <andythenorth> newgrf industry production is non-trivial
15:36:35 *** supermop_work_ has joined #openttd
15:37:36 *** supermop_work____ has quit IRC
15:37:55 <Samu> favouring companies that deliver the main product to have station priority transporting the transformed product
15:39:00 <supermop_work_> andythenorth: vietnamese floating village?
15:39:31 <Samu> company 1 delivers wood to sawmill, company 1 stations get priority when transporting goods from the sawmill
15:39:51 <andythenorth> supermop_work_: more water industries are sought
15:41:56 <Samu> but then firs has these weird industries that already produce cargo without needing to deliver the main product
15:42:14 <Samu> coal mine already produces coal, but still accepts engineering supplies
15:43:08 <Samu> if i deliver engineering supplies, what would happen to coal production
15:43:23 <Samu> who to prioritize that coal to
15:46:36 <nielsm> yes that's not something you can answer in general, and that's why I proposed yesterday that per-company industry ratings needs additional variables/callback flags for newgrf industries
15:47:30 <andythenorth> you prioritise to whoever has the highest rating
15:47:43 <andythenorth> is that not working right?
15:48:13 <Samu> i'm segmentating the production
15:48:27 <Samu> wonder what happens to those engineering supplies, must test
15:52:50 <Samu> it's not a rating system
15:53:15 <Samu> it's working with cargo amounts
15:53:33 <andythenorth> why not just read the code? o_O
15:53:50 <Samu> because i'm breaking the code
15:53:57 <andythenorth> and what do you mean, it's not working with cargo rating?
15:54:24 <andythenorth> cargo is distributed to stations based on station ratings
15:54:27 <Samu> okay, it is, but that's only in the end of the chain
15:54:41 <Samu> there's something happening in.between that I'm messing with
15:54:50 <andythenorth> ok I can't help with that :)
15:55:05 <andythenorth> if you want to highlight me with pings, pls actually have a question
15:55:13 <andythenorth> I'm at work, these random pings are interrupting
15:55:22 <andythenorth> I have to usually quit the channel because of them
15:55:24 *** andythenorth has left #openttd
16:01:31 <Samu> these engineering supplies aren't directly transformed into coal
16:02:48 <nielsm> yes that's the way it works
16:02:54 <peter1138> Engineering supplies are like the tools needed by the industry to do its work.
16:03:28 <peter1138> They should increase its efficiency maybe, or they just provide somewhere to dump a cargo type.
16:04:22 *** sla_ro|master has joined #openttd
16:04:37 <nielsm> they increase the production rate for a period of time
16:15:31 <nielsm> say, as far as I can tell, you can change someone else's sign, and then it becomes your sign, is that intentional?
16:15:55 <nielsm> except for OWNER_DEITY signs, those are frozen (outside editor)
16:16:41 <nielsm> okay well, the comment for CmdRenameSign says so
16:16:51 <nielsm> "Ownership of signs has no meaning/effect whatsoever except for eyecandy"
16:23:46 *** Thedarkb-X40 has joined #openttd
16:24:38 <DorpsGek_II> [OpenTTD/OpenTTD] Eddi-z commented on pull request #7235: Change: Non-rectangular sparse station catchment area https://git.io/fhFHF
16:25:58 <Samu> IndustryProductionCallback is failing me, or i fail at understanding what it's supposed to be doing
16:31:34 *** octernion has joined #openttd
16:41:18 *** octernion has joined #openttd
16:42:06 <nielsm> the production callback is a complicated beast to understand
16:43:58 <Samu> in my own code, fixed it, let's see now what changes
16:46:03 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7235: Change: Non-rectangular sparse station catchment area https://git.io/fhFQ2
16:48:06 <Samu> 7 adjustments, and i have no idea what exactly
16:50:40 <Samu> but i thought there's 16 now
16:50:55 *** octernion has joined #openttd
16:51:12 <Samu> don't newgrf industries support 16 cargos?
16:51:49 <peter1138> Yes, but original vars are still required.
16:52:15 <nielsm> old newgrfs still need to work
16:52:37 *** Wormnest has joined #openttd
16:52:38 <Samu> i just downloaded an update, but it's old
16:52:57 <nielsm> it isn't using the new properties and callbacks
16:53:08 <peter1138> Age-wise it is old.
16:53:23 <peter1138> And it probably still needs to support 1.8
17:03:27 <Samu> this whole 0x40, 0x41, 0x42 may need to be done in a different way, still not quite sure
17:04:12 <Samu> each cargo has 16 owners
17:04:37 <Samu> currently i get the cargo sum of all 16 and return a single value
17:05:09 <Samu> but maybe I need to return the value per owner
17:05:32 <Samu> and since this is newgrf stuff, i have absolutely no idea what needs to be done
17:06:34 <nielsm> that's why I suggest the best course of action (initially) is to do nothing, and preserve the original behaviour al all respects, when an industry uses production callbacks
17:08:58 <Samu> too chinese, too abstract
17:09:26 <peter1138> 40/41/42 are there for compatibility.
17:09:31 <peter1138> They can't be changed.
17:10:19 <Samu> i may need to turn 40/41/42 into 40[owner], 41[owner], 42[owner]
17:10:21 <peter1138> The replacement variable is 0x69, which takes a parameter.
17:10:31 <peter1138> You can't change those variables.
17:10:33 <nielsm> you cannot change 40/41/42
17:10:40 <nielsm> they need to keep working exactly as they have always done
17:10:53 <nielsm> otherwise you won't be able to use any existing industry newgrf
17:11:29 <Samu> how do i pass the owner around?
17:11:54 <nielsm> that's an open question
17:12:05 <Samu> there's always a owner now
17:12:12 <peter1138> You probably don't want to.
17:12:25 <peter1138> The industry doesn't have an owner.
17:12:28 *** HerzogDeXtEr has joined #openttd
17:13:09 <peter1138> Industry varactions are not run in the context of a user.
17:13:27 <nielsm> when a newgrf industry has production callbacks, the core game is no longer setting the rules for how goods is accepted and produced by the industry is, the newgrf author is making the rules
17:13:50 <nielsm> if you change the rules, you're going to get every newgrf industry author angry at you for breaking their work
17:14:19 <nielsm> for that reason YOU NEED TO keep a compatible mode, where newgrf industries keep working as they did without your patch
17:14:30 <nielsm> even if the player has enabled your new rules in the settings
17:14:50 <nielsm> if the industry is not designed to work with the new rules, it must not use the new rules
17:14:58 <Samu> hmm, for compatibility purposes, openttd still sets owners now
17:14:59 <nielsm> that's the curse of backwards compatibility
17:15:53 <Samu> i am company 1 and deliver wood to sawmill
17:16:05 <Samu> incoming cargo acceptance [wood][company1]
17:16:06 <nielsm> you don't need to explain
17:16:34 <peter1138> Yeah but not all callbacks have a company.
17:16:52 <nielsm> the compatibility with existing newgrf industries is why I keep telling you that you should first make a version of your patch where newgrf industries with production callbacks are not affected at all
17:16:54 <peter1138> These variables are also used for things like graphical variations. There's no owner there.
17:16:54 <nielsm> and keep the old rules
17:17:23 <Eddi|zuHause> <nielsm> when a newgrf industry has production callbacks, the core game is no longer setting the rules for how goods is accepted and produced by the industry is, the newgrf author is making the rules <-- that's basically why "smooth economy" never really caught on
17:18:55 <peter1138> Smooth economy was around long before we had any cargo callbacks.
17:19:48 <Eddi|zuHause> that is true, but there was never any effort to bring the two approaches together
17:20:11 <Samu> i guess for "compatibility purposes" the sum of all wood will suffice
17:20:34 <Eddi|zuHause> using prod callback just silently disabled smooth economy
17:21:10 <nielsm> Eddi|zuHause well there is the monthly production rate change callback
17:21:33 <nielsm> where the industry can decide to change production either by original or by smooth rules, or by its own rules
17:24:09 <nielsm> when are we converting the base industries to newgrf?
17:25:30 <Samu> what's a PersistentStorage :|
17:25:33 <Eddi|zuHause> i don't think we can
17:25:46 <nielsm> Samu, a way for a newgrf to store data
17:26:03 <Eddi|zuHause> because that means we drop the default values for existing newgrfs
17:26:04 <Samu> ah, i see, just a weird name
17:26:54 <nielsm> for example FIRS industries likely use a persisteng storage slot to store how many days/production ticks/whatever it has left of high production rate resulting from delivery of engineering supplies
17:27:46 <nielsm> it's persistent storage as opposed to temporary storage which only exists during one callback chain execution and is then discarded
17:30:39 *** Thedarkb-T60 has joined #openttd
17:32:00 <nielsm> woah, my ViewportSignKdtree stuff compiles!
17:32:36 <nielsm> now to see how hard it crashes :P
17:33:28 <Samu> so it's storing engineering supplies in the persistent storage
17:34:02 <Samu> current production gung-ho
17:34:20 <Samu> well, this indeed doesn't need to know which company made the delivery
17:35:04 <Samu> however, this production is then... benefiting everyone equally
17:37:13 <Samu> are scrap yards supposed to produce this much ?
17:37:55 <Samu> i need to compare this with base master
17:42:08 <Samu> 300 tonnes a month on master, 1500 on mine, something's wrong
17:43:55 <peter1138> Samu, I think you're going too low-level.
17:45:35 <nielsm> okay, can load the title game without crashing now
17:46:03 * peter1138 ponders some food before going home.
17:46:15 <peter1138> Go home on an empty stomach and fill it with b33r.
17:46:36 <peter1138> Hmm, only one bottle iirc. Could do wine.
17:47:20 <peter1138> It's already in a bottle.
17:47:25 <peter1138> Fill peter1138 with wine.
17:47:32 <peter1138> Then show me all your PRs.
17:47:59 <nielsm> and can generate a new game as well!
17:48:01 <peter1138> Although I seem to have flooded the PR view :/
17:54:17 <Eddi|zuHause> i heard drinking alcohol on empty stomach is particularly effective
18:00:04 <Samu> 26 adjustments holy crap, triggering industries is complex!
18:08:10 <nielsm> and that took a huge amount of research and learning how to make industry newgrfs on my part to get (hopefully) right
18:10:47 <DorpsGek_II> [OpenTTD/OpenTTD] JGRennison commented on pull request #7081: Change: [Linkgraph] Pause the game when linkgraph jobs lag (#6470) https://git.io/fhF5t
18:21:19 <Samu> I think I understand where the problem may come from
18:27:38 <Samu> cases: 0x8D, 0x8C, 0x8B, 0x8A, 0x6D variable 0x69, 0x6F variable 0x6F
18:28:00 <Samu> now in english if anyone knows how these are used
18:31:57 <Samu> so all this stuff is new for 1.9
18:32:29 <peter1138> Because there was only 3-in/2-out or whatever.
18:36:42 <Samu> 6A 6B 6C 6D 6E aren't touched
18:39:16 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN requested changes for pull request #7178: Add AI and GS to framerate window https://git.io/fhF56
18:41:06 <Samu> for some reason, the breakpoints don't reach any of these
18:42:01 <Samu> which means, the problem is elsewhere
18:48:08 <Samu> oops, I can't use lengthof(i->produced_cargo_waiting)
18:49:02 <peter1138> Hmm, how best to do station catchment visualisation...
18:50:04 <nielsm> it would be cool if the combined catchment popped up when hovering the build tool adjacent to an existing station
18:50:14 <peter1138> That's what I'm thinking
18:50:20 <nielsm> but that doesn't solve ctrl-combining
18:50:31 <nielsm> nor if you want to view of an already built without adding more parts
18:50:49 <peter1138> Well, when using ctrl you can hover over the station in the "Join station" window.
18:51:13 <peter1138> The already existing view is easy, that was part of my debug visualization.
18:51:31 <Eddi|zuHause> i think it should just be a button in the station window
18:51:40 <Eddi|zuHause> show/hide catchment area
18:51:58 <Samu> can I replace lengthof(i->produced_cargo_waiting) with INDUSTRY_NUM_OUTPUTS?
18:52:09 <peter1138> Exactly. That's okay for viewing existing.
18:52:39 <Eddi|zuHause> you can have one or more of those open while building a station, and you can have the existing switch in the station construction window
18:54:06 <Eddi|zuHause> that should cover most use cases, depending on whether you want or don't want overlapping areas and stuff
18:54:54 *** Progman has joined #openttd
18:57:09 <peter1138> Hmm, I only allowed 1 station at a time, but yeah, could have a list.
18:58:16 <peter1138> I also did it for town and industries, which is possibly more useful.
18:58:21 <peter1138> But not everything is covered by a town.
19:01:08 <Eddi|zuHause> ... and then there was this tile highlighting patch where you could overlay two separate layers
19:01:53 <Eddi|zuHause> i never actually used it, but i imagine that gui was a bit overloaded
19:01:56 <peter1138> What do you mean how?
19:03:11 <peter1138> It's adding production_rate to produced_cargo_waiting and limiting the result to 65535.
19:04:12 <Eddi|zuHause> it does 3 things: 1) it takes the existing waiting and adds the production amount, 2) it applies a hard cap of 0xFFFF, and 3) it assigns the new value to the waiting amount
19:04:14 <Samu> hmm, production_rate, how to solve this
19:04:24 <Eddi|zuHause> read from right to left, mostly
19:04:47 <Eddi|zuHause> (well, technically, from inside out)
19:06:17 <Samu> i wonder if repeating production_rate 16 times is correct
19:06:45 <peter1138> Well, isn't that once per possible cargo type?
19:07:14 <peter1138> Ahhhh gotta love the original music :D
19:07:55 <peter1138> I suppose timidity worked, but it was such a kludge.
19:08:08 <Samu> for (Owner owner = COMPANY_FIRST; owner <= MAX_COMPANIES; owner++) {
19:08:08 <Samu> i->produced_cargo_waiting[j][owner] = min(0xffff, i->produced_cargo_waiting[j][owner] + i->production_rate[j]);
19:08:20 <Eddi|zuHause> i wonder if i still have a TTO backup somewhere. i definitely lost the original install disk, and my backup copies were already a bit corrupted back then
19:08:24 <peter1138> That definitely sounds wrong.
19:08:26 <Samu> I think this is gonna be a problem
19:08:52 <Samu> the production rate is for the total sum
19:08:53 <peter1138> Surely you on't want to increase cargo waiting depending on the company's rating?
19:09:36 <Eddi|zuHause> surely you want also production_rate[j][owner]?
19:10:07 <peter1138> I actually think he wants none of that because I don't think it makes any sense.
19:10:27 <Eddi|zuHause> well, different definitions of "want" :p
19:10:39 <Samu> don't know what I want yet
19:10:43 <peter1138> What you probably want to do is store a value per company which represents the %age of goods supplied by that company.
19:10:55 <peter1138> Then you can share out the goods produced relative to the %age.
19:13:16 <peter1138> Hmm, thinking of an alternative to #7262
19:13:33 <Samu> yep, this is not what I want, reverting
19:15:32 <Eddi|zuHause> i was just having a random thought: you tried yesterday to have regression on a pre-commit-hook, and that failed because commits are done all over the place (rebase). is there maybe a pre-push-hook?
19:16:43 <peter1138> It's called... pre-push.
19:17:15 <Samu> it works fine for the basic industries
19:17:33 <Samu> then enters newgrf stuff, and everything fails
19:19:51 <Samu> i still dont get how production gets so inflated
19:19:58 <Samu> when i deliver engineering supplies
19:20:04 <peter1138> Well if you were adding it 16 times...
19:20:28 <Samu> I reverted it, and it's not from here
19:31:58 <peter1138> Hmm, maybe I just put it on the Land Area Information tool.
19:32:15 <peter1138> Select tile -> highlight catchment.
19:33:18 *** andythenorth has joined #openttd
19:34:53 <Samu> alright, it's not so inflated now, but there's still no match
19:40:17 <Samu> not as inflated, but still wrong
19:40:39 <andythenorth> supermop_work_: screenshots, or it didn't happen :P
19:41:25 <Samu> as long as I don't deliver engineering supplies, the production matches
19:41:43 <Samu> if I deliver engineering supplies, they do different :(
19:43:23 <Samu> what am i missing, what am i doing wrong
19:44:23 *** gelignite has joined #openttd
19:50:22 *** frosch123 has joined #openttd
19:52:41 <andythenorth> what is the question?
19:57:00 <Eddi|zuHause> stop violating your invariant!
19:57:07 <andythenorth> samu: I really fail to understand what your trying to make happen
19:58:20 <Samu> wanna do what happens on st2 servers
19:58:39 <nielsm> andythenorth: the end goal is to have each industry keep track of which company delivered how much cargo and distribute production to companies' stations based on how the ratio, something like that
19:59:00 <andythenorth> that's not going to work :)
19:59:03 <Samu> secondary cargo can only be transported by the company that delivered primary cargo
19:59:10 <andythenorth> it's a meaningless objective
19:59:26 <Eddi|zuHause> that argument has never stopped anyone, ever :p
19:59:28 <andythenorth> (meainingless in the context of openttd)
20:00:11 <andythenorth> cargo should be distributed based on station rating
20:00:16 <andythenorth> is that not already implemented?
20:00:29 <Eddi|zuHause> nielsm: stop going out of bounds, too! :p
20:01:35 <nielsm> Eddi|zuHause it seems I may have tried to draw the sign for a station that was destroyed when the title game was unloaded, but that station was not removed from the index tree
20:02:29 <nielsm> I should get some food before continuing this quest
20:03:21 <Samu> i'm moving cargo from the deliverer into the free for all pool
20:05:01 <Samu> which in turn means everyone would benefit
20:05:09 <Samu> i guess for this type of cargo, that is okay
20:05:19 <Samu> the industry produces for all
20:06:04 <peter1138> nielsm, Can you do the vscroll thing please? ;)
20:06:30 <peter1138> Hmm, or actually am I able to push to the PR?
20:07:08 <Samu> ST2, u there!? in FIRS, what do you consider Scrap Metal/Engineering Supplies relationship?
20:07:46 <Samu> who's allowed to transport Scrap Metal if engineering supplies are also delivered there?
20:08:41 <Samu> never been in a FIRS server :|
20:08:59 <peter1138> Anyone? Cargo is not owned.
20:09:55 <Samu> but since engineering supplies is a different kind of specimen
20:10:10 <Samu> I don't know how the rule is enforced for this case
20:14:21 <andythenorth> you'll have to special case by specific industries in specific newgrfs if you want to do this
20:19:08 <Samu> bah, i need to install 1.8.0 to enter a firs server
20:25:24 <Eddi|zuHause> nielsm: so you didn't invalidate the cache on new game?
20:25:59 <nielsm> Eddi|zuHause: rather I do it too late
20:27:10 <nielsm> peter1138: you're welcome to push to my pr branch
20:27:40 <Eddi|zuHause> i think i saw a checkbox like "developers can write to my PR"
20:28:51 <zuzak> i think that's just "can edit the PR text"
20:28:58 <nielsm> yeah it's on by default
20:29:25 <nielsm> nope it is in fact pushing to the branch
20:29:39 <nielsm> I've done it once or twice
20:35:12 <nielsm> peter1138: then the question is just, split into a "make scrollable" and a "add ai/gs" commit, or just squash it all? :)
20:35:53 <Samu> engineering supplies can also be a secondary cargo and a primary cargo at the same time, hmm uhm... im utterly confised now
20:36:39 <Samu> pretty much, they're valuables?
20:41:01 <peter1138> Hmm, I wonder if I can approve it now? :p
20:41:21 <peter1138> nielsm, yeah, go for 2 commits.
20:42:42 <peter1138> Hmm, so, staiton catchment... land query tool or button on station windows...
20:42:58 <peter1138> I'm fine with catchment for only 1 station being visible at a time
20:43:34 <peter1138> The town visualization is really useful
20:43:42 <peter1138> but the industry one is pretty odd, it's either in or not in.
20:47:07 <andythenorth> samu: what's a primary cargo?
20:47:11 <andythenorth> what's a secondary cargo?
20:50:30 <peter1138> Hmm, accepts is wrong :/
20:54:06 <peter1138> Oh... Strange, I never updated GetAcceptanceAroundTiles()
20:55:56 <Samu> i dont get firs, it changes the way stuff normally works
20:57:08 <peter1138> Yes, that's the point.
20:58:00 <andythenorth> I don't know how to explain
20:58:03 <andythenorth> where do we start?
20:58:09 <andythenorth> OpenTTD has a content API
20:58:23 <andythenorth> it allows modification of substantial parts of the game
20:59:31 <andythenorth> OpenTTD has multiple content APIs
21:06:24 <glx> newgrf can change stuff, GS can change stuff
21:07:30 *** octernion has joined #openttd
21:09:06 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #7235: Change: Non-rectangular sparse station catchment area https://git.io/fh5s1
21:27:22 <peter1138> Yeah, acceptance looks good now.
21:27:54 <peter1138> Now matches the catchment, instead of the rectangle.
21:30:34 <nielsm> I think it has to do with partial redraw :/
21:30:53 <nielsm> it checks some rectangle and decides, nope don't need to draw any signs here
21:31:03 <nielsm> then paints landscape over some existing signs that ought to be where
21:31:04 <peter1138> Ah, you need to extend your bounds.
21:32:11 <peter1138> Where should I put the view catchment button? These windows are kinda crowded :/
21:34:16 <nielsm> uh hm, how about merging location/rename buttons to a dropdown, then adding a toggle in place of rename?
21:35:18 <peter1138> Wondering about making a small icon but I can't think of anything that would scream out "catchment / coverage area"
21:37:57 <nielsm> just for the performance check, let me try a release build, and that 50k stations save
21:41:35 <Eddi|zuHause> i could have sworn i saw a TF station mod where you could split a platform into 2 and have a switch inbetween
21:41:39 <Eddi|zuHause> but i can't find it
21:42:08 *** octernion has joined #openttd
21:52:39 <nielsm> I think I figured this one out, it's a stack overflow
21:52:51 *** gnu_jj_ has joined #openttd
21:53:02 <nielsm> building a tree based on coordinates, while all coordinates are zero
21:53:17 <nielsm> meaning it's impossible to balance at all
21:53:32 <nielsm> it becomes a linked list down the right branch
21:53:45 <nielsm> and with 50k+ elements that overflows the recursion :)
22:03:17 *** andythenorth has joined #openttd
22:05:07 <nielsm> I should probably just use the entire viewport space for querying potential signs, rather than the pixel area being updated
22:05:30 <nielsm> assuming this fixes the stack ovberflowing
22:07:22 <nielsm> hm yeah it looks like it's busy doing the industries near thing now
22:07:40 <nielsm> which is further than it got before
22:08:05 <andythenorth> ok so consensus is achieved when people stop objecting
22:08:22 <andythenorth> can we jam it into 1.9.0?
22:11:40 <nielsm> hah yeah this is an improvement
22:12:22 <nielsm> on master, panning around the landscape at halfway zoomed out is 40 ms/frame most of the time
22:12:39 <nielsm> with k-d tree for signs it peaks at 6 ms/frame
22:12:59 <nielsm> (but more commonly 3-4 ms)
22:13:01 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN closed pull request #7049: Fix #6599: Can still click on buy button in vehicle selection window even if no vehicle is selected https://git.io/fhnEu
22:13:03 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7049: Fix #6599: Can still click on buy button in vehicle selection window even if no vehicle is selected https://git.io/fhFbH
22:14:56 <peter1138> Is it faster because you're not drawing the whole sign? :p
22:15:04 <nielsm> I don't think that's it :P
22:15:33 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN dismissed a review for pull request #7178: Add AI and GS to framerate window https://git.io/fhF56
22:16:25 * LordAro wonders if peter1138's PR count has exceeded Samu's
22:18:58 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7000: Some NewGRF variables concerning railtypes https://git.io/fhFbA
22:23:12 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7262: Change: Smooth AI CPU usage by spreading out AI ticks in relation to competitor speed. https://git.io/fhFbh
22:30:00 <nielsm> okay yeah problem here is I need a heuristic for the widest possible a sign can be
22:31:44 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro approved pull request #7264: Fix: Resorting file list did not update filtered rows. https://git.io/fhFNk
22:31:50 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro merged pull request #7264: Fix: Resorting file list did not update filtered rows. https://git.io/fhFDK
22:32:10 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro approved pull request #7260: Fix #7227: Don't apply mouse-hasn't-moved test to scrollbars. https://git.io/fhFNI
22:32:15 <DorpsGek_II> [OpenTTD/OpenTTD] LordAro merged pull request #7260: Fix #7227: Don't apply mouse-hasn't-moved test to scrollbars. https://git.io/fhFwL
22:44:30 <DorpsGek_II> [OpenTTD/OpenTTD] Eddi-z commented on pull request #7000: Some NewGRF variables concerning railtypes https://git.io/fhFN8
22:46:12 <Samu> IndustryProductionSpriteGroup
22:46:21 <Samu> I got a feeling I need to edit this
22:47:46 <Samu> subtract_input and add_output
22:48:00 <nielsm> Samu: it will be much less work to not change the game rules at all, but instead provide a few extra variables (and maybe storage) to newgrf industries to allow them to change the rules in more flexible ways
22:49:43 <Samu> at this point I'm pretty much giving up
22:50:18 <Samu> I fail at explaining what I want to achieve, and newgrfs make it too abstract
22:51:26 <nielsm> start by programming some newgrf industries yourself, using nml or whatever, to understand what goes on from that end
22:51:52 <nielsm> not necessarily to make anything anyone would ever play with, but for the same of learning about the system
22:54:47 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh updated pull request #7250: K-d tree data structure for spatial lookups https://git.io/fhd4b
22:56:29 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7250: K-d tree data structure for spatial lookups https://git.io/fhFN2
23:08:26 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7250: K-d tree data structure for spatial lookups https://git.io/fhFND
23:09:58 <Samu> a fatal NewGRF error has occurred ;(
23:15:56 *** supermop_work has joined #openttd
23:20:23 <peter1138> ^ LordAro is that... actually better? :/
23:22:01 <LordAro> maybe `if (steps > 1 && steps <= YAPF...) { ... } steps--;` ?
23:22:06 *** supermop_work_ has quit IRC
23:22:30 <LordAro> except steps-- inside the if
23:22:32 <peter1138> No because then it won't decrement if it's higher than the constant.
23:23:19 <LordAro> i guess i'm suggesting the logic could be reorganised, rather than just the code
23:23:28 <LordAro> though i don't have ideas of how that could be
23:26:13 <peter1138> steps--; if (steps > 0 && steps < YAPF..) { .. }
23:27:09 <peter1138> steps > 0 is never necessary
23:27:28 <peter1138> if (--steps < YAPF_ROADVEH_PATH_CACHE_SEGMENTS)
23:27:54 <peter1138> steps--; if (steps < YAPF..) { .. }
23:27:55 <LordAro> still not a fan of my if statements having side effects
23:28:50 <peter1138> Oh, hmm, might've had the printf in the wrong place.
23:29:38 <peter1138> Yeah, > 0 is necessary.
23:30:05 <peter1138> It should never go below 0 (ignore that it's unit)
23:31:03 <peter1138> It doesn't add the last step because that's the track that's returned from the pathfinder.
23:31:32 <peter1138> Maybe we need a path cache for aircraft...
23:34:47 <peter1138> Wentbourne still works :-)
23:35:00 <LordAro> peter1138: surely aircraft pathing is trivial?
23:35:16 <peter1138> LordAro, it was a joke. There isn't any.
23:36:41 <Samu> i can't advance it further :|
23:37:23 <peter1138> You're still trying to have separate cargo waiting for each company...
23:39:02 <Samu> it was working for vanilla industries
23:39:16 <Samu> but then newgrf got in the way... and RIP
23:40:38 <peter1138> 18:10 <@peter1138> What you probably want to do is store a value per company which
23:40:42 <peter1138> represents the %age of goods supplied by that company.
23:40:44 <peter1138> 18:10 <@peter1138> Then you can share out the goods produced relative to the %age.
23:40:47 <peter1138> I don't know if I mentioned that.
23:41:04 <peter1138> Might be a path worth trying, 4.5 hours ago.
23:46:29 <Samu> isn't that what I've done?
23:47:40 <peter1138> No, you seem to be messing about by splitting up the whole of the industry chain by company
23:48:37 <nielsm> keep in mind that conceptually, the player companies in TT are not buying and selling cargo, they are paid to transport it
23:49:00 <nielsm> industries buy cargo from industries, companies are paid for doing the logistics of getting it from A to B
23:49:03 <peter1138> It's definitely not the company's cargo.
23:49:35 <peter1138> It is reasonable, though, to share out that cargo (when moving goods to stations) based on ratings.
23:49:40 <peter1138> Which is already done.
23:49:40 <nielsm> (and if you want a game with better simulation of industries having deals with other industries, play simutrans)
23:49:55 <peter1138> So I think you really just want to be fiddling with the rating algorithms.
23:50:44 <peter1138> nielsm, simutrans smells though :(
23:50:56 <Samu> dont know what simultrans is
23:51:22 <nielsm> yes, it's a proper clean slate transport tycoon-like
23:51:37 <nielsm> written from the ground up
23:52:07 <nielsm> (rather than being based on disassembly and reverse engineering of an original game which ottd is)
23:52:18 <peter1138> I started out playing Simutrans before I got into OpenTTD.
23:52:25 <peter1138> It's probably improved a bit since then.
23:52:34 <peter1138> Then again I tried it last year and it was still horrible.
23:53:25 <_dp_> this whole cargo topic was brought up by mp gameplay needs not some industry simulation whatever
23:55:41 <nielsm> I think it would be a better solution to provide extra tools to newgrf authors, to let them implement special rules for sharing/distribution of cargo among companies
23:55:56 <nielsm> and keep the base game unchanged
23:56:09 <_dp_> nielsm, passing the problem to newgrf authors is not a solution :p
23:56:45 <peter1138> nielsm, I think you've lost sight of what Samu was trying to achieve, because of the way he's been trying to go about it.
23:56:50 <_dp_> nielsm, also sharing logic part of a game mode, newgrfs shouldn't deal with it
23:57:02 <_dp_> nielsm, GS could though if only it didn't suck
23:58:21 <andythenorth> GS is crippled forever
23:59:53 <_dp_> actually it's not only because of newgfs
continue to next day ⏵