Config
Log for #openttd on 22nd February 2019:
Times are UTC Toggle Colours
00:02:14  *** tokai has joined #openttd
00:02:14  *** ChanServ sets mode: +v tokai
00:08:46  <peter1138> Ok, RV path cache working.
00:09:24  *** tokai|noir has quit IRC
00:12:22  <peter1138> 19-20fps in Wentbourne.
00:14:45  <peter1138> Oh of course, that's with the group vehicle ticks too.
00:28:12  <glx> big improvement it seems
00:28:45  <Eddi|zuHause> is there a slow gear on the tractor? i can't get up any slopes like this :/
00:29:10  <drac_boy> tractor? john deere? :)
00:29:22  <Eddi|zuHause> who?
00:32:17  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN opened pull request #7261: Add: Road vehicle path cache. https://git.io/fhFw4
00:32:53  <peter1138> glx, screenshot of the framerate window in there :)
00:33:13  <peter1138> So only 2-3fps improvement with the rv path cache.
00:33:23  <peter1138> Probably still worthwhile.
00:33:46  <peter1138> The group-vehicle-ticks path is still a massive win for me.
00:33:50  <peter1138> *patch
00:34:37  <DorpsGek_II> [OpenTTD/OpenTTD] nikolas commented on pull request #7254: Codechange: introduce a few unit tests https://git.io/fhFw0
00:34:43  <glx> even if 2-3fps seems small it's important I think
00: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.
00:35:38  <peter1138> 2-3 fps is small, but actually it's a 33% improvement.
00:35:53  <peter1138> (in that savegame)
00:36:12  <glx> yes on heavy games it's important
00:36:20  <peter1138> Any savegame with large cities with grid-pattern layouts would see an improvement, I think.
00:36:29  <peter1138> Er, as long as RVs are used :-)
00:36:51  <glx> they are often used as feeders
00:36:51  <peter1138> grid = lots of mostly equal paths, and lots of pathfinding on every junction.
00:37:08  <peter1138> I set the limit to 8 segments, which means it'll cache the result of 8 junctions.
00:37:33  <peter1138> Or maybe 7, there's a > 1 in there. Hmm.
00:39:55  <DorpsGek_II> [OpenTTD/OpenTTD] glx22 commented on pull request #7254: Codechange: introduce a few unit tests https://git.io/fhFwa
00:45:51  <Samu> im a terrible boolean
00:46:21  <Samu> https://paste.openttdcoop.org/ptsdqblf6 will this work? :o
00:47:14  *** Flygon has joined #openttd
00:47:35  *** drac_boy has left #openttd
00:50:02  <Samu> suddenly pink transports goods, let's see what happens
00:50:18  <peter1138> Samu, " } else { if { " -> " } else if { "
00:53:26  <peter1138> st1/st2 implies whatever it is is still only the first 2 stations.
00:53:36  <peter1138> s/first/best/
00:54:02  <Samu> bad stuff happens, i failed
00:54:11  <Samu> only pink should be allowed to get cargo
00:54:40  <Samu> orange is getting some :|
00:54:57  <Samu> pink is the one delivering wood
00:55:13  <Samu> should have priority to transport goods
00:55:36  <DorpsGek_II> [OpenTTD/OpenTTD] James103 commented on issue #7255: Crashlog truncated with many news messages https://git.io/fhFwD
01:00:56  *** Thedarkb-T60 has joined #openttd
01: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
01:17:33  <peter1138> ^ kinda ruins Samu's "start all AIs on the first tick" stuff, but...
01:32:35  <glx> they will still start in about the same tick
01: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
01:33:10  <peter1138> About.
01:33:25  <peter1138> If competitor_speed is max, then no change.
01:35:23  <glx> worst case is 15 ticks difference, but still in the same day
01:37:26  <glx> eh of course, different tick may have different random
01:41:00  <glx> hmm GetWagonAge() one is weird, but maybe related to random too
01:44:08  <glx> hmm or different day
01:47:04  <glx> yes different day
01:54:19  <Samu> i fail at bools :(
01:54:41  <Eddi|zuHause> old and busted: trying to drive the rover train but only managing to flail around wildly
01:54:59  <Eddi|zuHause> new hotness: using the winch to drag the rover train, really flailing around wildly
02:20:34  *** snail_UES_ has joined #openttd
02:53:04  *** glx has quit IRC
03:06:57  <Samu> https://paste.openttdcoop.org/pzk83sgm1
03:07:13  <Samu> testing it seems to be doing well, but not 100% sure yet
03:08:15  <Samu> it's a complex network of cargo, hard to follow
03:08:34  <Samu> there are 6 stations around the industry
03:08:57  <Samu> it's a sawmill. 4 stations receive wood
03:09:15  <Samu> 3 of those stations receive it from pink
03:09:24  <Samu> 1 of those receive it from orange
03:09:54  <Samu> then, 3 of the stations around the industry load goods
03:10:15  <Samu> 1 from pink, 1 from orange and 1 from green
03:11:31  <Samu> pink can load goods because it's also pink that delivers wood
03:11:50  <Samu> but pink can't load goods when orange delivers wood
03:12:06  <Samu> because orange also delivers it
03:12:45  <Samu> orange, on the other hand can load goods because it's also orange that delivers wood
03:13:07  <Samu> but orange can't load goods when pink delivers wood
03:13:12  <Samu> because pink also delivers it
03:13:24  <Samu> green can never load goods in any case
03:13:32  <Samu> becase it never delivers any wood
03:14:59  <Samu> but !!!
03:15:28  <Samu> if pink doesn't transport goods
03:15:53  <Samu> both orange and green may load goods even when it's pink delivering wood
03:16:46  <Samu> does all of this make any sense?
03:19:19  <Samu> perhaps my explanation is confusing :|
03:21:33  <Samu> this appears to be working, but I still need to test multiple stations of the same owners
03:21:36  <Samu> loading goods
03:21:47  <Samu> will do that tomorrow
03:22:04  *** Samu has quit IRC
04:32:32  *** Wormnest has joined #openttd
04:35:09  *** Wormnest has quit IRC
06:39:18  *** FLHerne has quit IRC
06:40:02  *** FLHerne has joined #openttd
06:50:35  <peter1138> I added "make regression" to the end of .git/hooks/pre-commit, should be useful :-)
06: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
07:01:19  *** snail_UES_ has quit IRC
07:20:24  <peter1138> Hmm, okay, not so good, it tries to compile when rebasing.
07:32:48  *** andythenorth has joined #openttd
07:36:45  *** debdog has joined #openttd
08:14:59  <peter1138> Morning.
08:15:23  <peter1138> andythenorth, I squashed nrt-block down a bit last night.
08:15:52  <andythenorth> awesome
08:15:54  <andythenorth> 1.9?
08:19:16  <LordAro> i feel it's a little on the late side to be in 1.9
08:19:17  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #7235: Change: Non-rectangular sparse station catchment area https://git.io/fh5s1
08:19:21  <peter1138> Aww :p
08:19:33  <LordAro> better to have a whole year of testing for 1.10
08:19:39  <peter1138> Just removed the catchment visualization.
08:19:48  <peter1138> LordAro, I'll be honest, I think another whole YEAR is way too much
08:19:53  <peter1138> It's only a gasme.
08:19:57  <peter1138> And also a game.
08:20:21  <peter1138> We can have point-releases, or release 1.10 a couple of months later.
08:20:39  <peter1138> Releasing only on April 1st is a stupid tradition.
08:21:18  <peter1138> +471 −116
08:21:21  <LordAro> ¯\_(ツ)_/¯
08:21:23  <peter1138> Station catchment got big :o
08:21:27  <peter1138> No, seriously.
08:21:51  <peter1138> We've had people developing NRT NewGRFs for longer than a year already.
08:22:09  <peter1138> supermop_work____ is about ready to give up on it.
08:22:23  <LordAro> just my opinion, i don't mind either way
08:22:50  <peter1138> I accept maybe too late for 1.9
08:22:59  <peter1138> I don't accept a whole +1 year for 1.10
08:23:28  <peter1138> ffs now non-rect fails :(
08:23:39  <peter1138> fuck it
08:23:45  <peter1138> must've had a bad rebase :(
08:28:10  <peter1138> h
08:28:25  <peter1138> Station::RecomputeIndustriesNearForAll();
08:28:28  <peter1138> :/
08:28:35  <peter1138> Ah, it was in the visualization commit ... sigh
08:30:21  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #7235: Change: Non-rectangular sparse station catchment area https://git.io/fh5s1
08:33:23  <andythenorth> too late for 1.9
08:33:26  <andythenorth> so 1.9.x
08:33:33  <andythenorth> or 1.10 in September
08:34:11  <andythenorth> or we put a bleeding edge release track, in between stable and nightlies
08:35:56  <LordAro> shouldn't be in 1.9.x (x>=1)
08:36:05  <LordAro> screw it, put it in 1.9
08:36:27  <andythenorth> forgiveness > permission
08:36:34  <LordAro> heh
08:36:38  <andythenorth> it doesn't regularly assert, and it hasn't munched my savegames
08:36:51  <andythenorth> and if the commits were cleaned up, the nml support is 99% or 100% there
08:36:53  <LordAro> "regularly"
08:37:24  <peter1138> It'll get a lot of testing if it's included in 1.9 :p
08:37:39  <andythenorth> our insistence that the major digit of semver never changes :P
08:37:42  <andythenorth> is weird
08:37:56  <LordAro> if we get up to 1.9.5, then i'll complain :p
08:38:01  <andythenorth> we're never going to bump it, because we insist the API never breaks
08:38:22  <andythenorth> so the 1 of 1.y.z is daft, just noise
08:38:29  <LordAro> ¯\_(ツ)_/¯
08:38:50  <LordAro> could be all Linus, and just bump the major version when he feels like it
08:39:30  *** debdog has quit IRC
09:08:00  *** debdog has joined #openttd
09:13:58  <andythenorth> BBL eh
09:14:08  *** andythenorth has left #openttd
09:14:53  *** m3henry has joined #openttd
09:21:31  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #7235: Change: Non-rectangular sparse station catchment area https://git.io/fh5s1
09:34:53  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7178: Add AI and GS to framerate window https://git.io/fhFXZ
10:30:36  <DorpsGek_II> [OpenTTD/OpenTTD] nirasa1957 opened issue #7263: Programmable signals doesn't works https://git.io/fhF1u
10:31:25  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on issue #7263: Programmable signals doesn't works https://git.io/fhF1z
10:31:30  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN closed issue #7263: Programmable signals doesn't works https://git.io/fhF1u
10: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
10:41:15  *** debdog has quit IRC
10: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"?
10:47:46  <Eddi|zuHause> which is preposterous, of course. even without resorting to binary, you can count to like 60 with two hands
11:29:14  *** debdog has joined #openttd
11:42:44  *** andythenorth has joined #openttd
11:43:26  <peter1138> Hm, is there a gui version of tig? :S
11:43:52  <peter1138> It's one of those text UIs where one wrong keypress loses all the state...
11:44:44  <peter1138> cursor keys change the selected commit
11:44:54  <Eddi|zuHause> i feel like i heard about tig before, but then completely forgot about it
11:44:55  <peter1138> pgup/pgdown can be used to scroll the commit diff
11:45:11  <andythenorth> yo
11:45:13  <peter1138> i keep trying to use cursor keys to scroll the commit diff, as is logical
11:45:24  <peter1138> it even has some kinda of window focus, but that has no bearing on it
11:46:55  <peter1138> I liked my old version of gitg, that had a stash viewer.
11:56:00  <Eddi|zuHause> i'd like a gui as intuitive as tortoisehg...
12:00:05  <peter1138> Is tortoisegit a thing?
12:03:06  <Eddi|zuHause> it exists, but i found it horrible and unintuitive, like everything about git
12:19:49  *** Thedarkb-T60 has quit IRC
12:25:36  <peter1138> Heh
12:25:44  <peter1138> git makes sense when you ignore other vcs ;)
12:31:07  <Eddi|zuHause> you could say that about any religion
12:31:25  <peter1138> git isn't faith, it's science :)
12:34:15  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN opened pull request #7264: Fix: Resorting file list did not update filtered rows. https://git.io/fhFDK
12:35:11  <Eddi|zuHause> no it's not. it's a set of arbitrary rules put up by more or less a single person
12:35:51  <Eddi|zuHause> also, maths is the only true religion
13:09:56  *** snail_UES_ has joined #openttd
13:15:53  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #7235: Change: Non-rectangular sparse station catchment area https://git.io/fh5s1
13:16:12  *** Flygon has quit IRC
13:17:12  <andythenorth> git is very divisive
13:17:30  <andythenorth> I find it really intuitive and easy to use, probably because I don't understand it
13:20:21  <peter1138> Heh
13:21:06  <m3henry> I found http://think-like-a-git.net/sections/experimenting-with-git/references-make-commits-reachable.html to have the best explanation
13:30:07  *** snail_UES_ has quit IRC
13:40:52  *** synchris has joined #openttd
13:48:04  *** Samu has joined #openttd
13:49:42  <peter1138> Samu-samu
13:49:45  <Samu> hi
13:50:52  <peter1138> Samu, it's called "logic", by the way.
13:51:01  <peter1138> 01:54 < Samu> i fail at bools :(
13:52:03  <Samu> ah
13:52:29  <Samu> i actually failed at logic classes
13:52:37  <peter1138> :-)
13:52:54  <Samu> working as intended
13:53:23  <andythenorth> I avoided logic in my philosophy degree
13:53:31  <andythenorth> it was a specific set of modules
13:53:48  <andythenorth> wasn't much to do with bools
13:54:03  <andythenorth> much more to do with this http://www.philosophy-index.com/logic/symbolic/
13:54:34  <andythenorth> bools are level 0 in that
14:06:44  <peter1138> Boolean logic, I suppose.
14:09:25  <Samu> https://paste.openttdcoop.org/pzk83sgm1 just tested stations of the same owner, it's doing fine
14:12:23  <peter1138> Same as last night.
14:12:29  <Samu> yes
14:12:36  <peter1138> 00:50 <@peter1138> Samu, " } else { if { " -> " } else if { "
14:12:48  <Samu> it's the same code
14:12:56  <peter1138> kk
14:13:07  <Samu> ah, that
14:14:47  *** nielsm has joined #openttd
14:15:32  *** octernion has joined #openttd
14:18:48  <Samu> it works! that's all that matters to me
14:18:57  <Samu> I have no idea why everything works
14:19:12  <Samu> but it's doing good
14:19:33  <Samu> now the else ifs that you request
14:21:09  <peter1138> It just stops it being massively indented for no rason.
14:21:12  <peter1138> *reason
14:21:35  <Samu> https://paste.openttdcoop.org/pzkhn4386
14:22:40  <Samu> oh, haven't tested owner_none stations
14:22:49  <Samu> there is no easy way to test this
14:23:02  <Samu> I need water industries that produce secondary cargo
14:23:14  <Samu> firs doesn't have it
14:23:43  <Samu> or if it does... plz tell me
14:24:05  <Samu> andythenorth,
14:25:11  <Samu> speaking of firs...
14:25:17  <Samu> they're newgrfs
14:25:26  <Samu> i have absolutely no idea if this works for newgrf industries
14:25:30  <Samu> time to test anyway
14:30:56  *** supermop_work has joined #openttd
14:32:54  <andythenorth> samu: there are no FIRS water industries producing secondary cargos
14:33:04  <andythenorth> not aware of any industry set doing that, it's highly unusual
14:33:05  <andythenorth> :)
14:33:23  <Samu> dredging site accepts engineering supplies, I wonder if that's equivalent
14:35:17  <andythenorth> no
14:35:25  <andythenorth> well, depends what you're trying to do
14:35:36  <andythenorth> newgrf industry production is non-trivial
14:36:35  *** supermop_work_ has joined #openttd
14:37:36  *** supermop_work____ has quit IRC
14:37:55  <Samu> favouring companies that deliver the main product to have station priority transporting the transformed product
14:39:00  <supermop_work_> andythenorth: vietnamese floating village?
14:39:31  <Samu> company 1 delivers wood to sawmill, company 1 stations get priority when transporting goods from the sawmill
14:39:49  <Samu> something like this
14:39:51  <andythenorth> supermop_work_: more water industries are sought
14:41:56  <Samu> but then firs has these weird industries that already produce cargo without needing to deliver the main product
14:42:14  <Samu> coal mine already produces coal, but still accepts engineering supplies
14:42:28  *** supermop_work has quit IRC
14:43:07  <Samu> if i deliver engineering supplies, what would happen to coal production
14:43:23  <Samu> who to prioritize that coal to
14: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
14:47:30  <andythenorth> you prioritise to whoever has the highest rating
14:47:43  <andythenorth> is that not working right?
14:48:13  <Samu> i'm segmentating the production
14:48:27  <Samu> wonder what happens to those engineering supplies, must test
14:52:50  <Samu> it's not a rating system
14:53:15  <Samu> it's working with cargo amounts
14:53:22  <Samu> not cargo rating
14:53:33  <andythenorth> why not just read the code? o_O
14:53:50  <Samu> because i'm breaking the code
14:53:57  <andythenorth> and what do you mean, it's not working with cargo rating?
14:54:24  <andythenorth> cargo is distributed to stations based on station ratings
14:54:27  <Samu> okay, it is, but that's only in the end of the chain
14:54:41  <Samu> there's something happening in.between that I'm messing with
14:54:50  <andythenorth> ok I can't help with that :)
14:55:05  <andythenorth> if you want to highlight me with pings, pls actually have a question
14:55:13  <andythenorth> I'm at work, these random pings are interrupting
14:55:22  <andythenorth> I have to usually quit the channel because of them
14:55:24  *** andythenorth has left #openttd
15:00:46  <Samu> ah snap
15:00:51  <Samu> firs ruin it
15:01:31  <Samu> these engineering supplies aren't directly transformed into coal
15:01:36  <Samu> i wonder why
15:02:27  <peter1138> Why would they?
15:02:48  <nielsm> yes that's the way it works
15:02:54  <peter1138> Engineering supplies are like the tools needed by the industry to do its work.
15:03:28  <peter1138> They should increase its efficiency maybe, or they just provide somewhere to dump a cargo type.
15:04:22  *** sla_ro|master has joined #openttd
15:04:37  <nielsm> they increase the production rate for a period of time
15:13:11  *** Gja has joined #openttd
15: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?
15:15:55  <nielsm> except for OWNER_DEITY signs, those are frozen (outside editor)
15:16:41  <nielsm> okay well, the comment for CmdRenameSign says so
15:16:51  <nielsm> "Ownership of signs has no meaning/effect whatsoever except for eyecandy"
15:23:46  *** Thedarkb-X40 has joined #openttd
15:24:38  <DorpsGek_II> [OpenTTD/OpenTTD] Eddi-z commented on pull request #7235: Change: Non-rectangular sparse station catchment area https://git.io/fhFHF
15:25:58  <Samu> IndustryProductionCallback is failing me, or i fail at understanding what it's supposed to be doing
15:30:31  *** octernion has quit IRC
15:31:34  *** octernion has joined #openttd
15:31:36  *** octernion has quit IRC
15:41:19  *** octernion has joined #openttd
15:42:06  <nielsm> the production callback is a complicated beast to understand
15:43:48  <Samu> just found a bug/typo
15:43:58  <Samu> in my own code, fixed it, let's see now what changes
15:46:03  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7235: Change: Non-rectangular sparse station catchment area https://git.io/fhFQ2
15:47:54  <Samu> num_adjusts = 7
15:48:06  <Samu> 7 adjustments, and i have no idea what exactly
15:49:21  <Samu> 0x40
15:49:25  <Samu> 0x41 now
15:50:29  <Samu> ah, the 3 cargo types
15:50:40  <Samu> but i thought there's 16 now
15:50:55  *** octernion has joined #openttd
15:51:12  <Samu> don't newgrf industries support 16 cargos?
15:51:49  <peter1138> Yes, but original vars are still required.
15:52:15  <nielsm> old newgrfs still need to work
15:52:26  <Samu> firs is old?
15:52:29  <nielsm> yes
15:52:37  *** Wormnest has joined #openttd
15:52:38  <Samu> i just downloaded an update, but it's old
15:52:40  <Samu> ok
15:52:57  <nielsm> it isn't using the new properties and callbacks
15:53:02  <nielsm> so it's old
15:53:08  <peter1138> Age-wise it is old.
15:53:23  <peter1138> And it probably still needs to support 1.8
16:03:27  <Samu> this whole 0x40, 0x41, 0x42 may need to be done in a different way, still not quite sure
16:04:12  <Samu> each cargo has 16 owners
16:04:37  <Samu> currently i get the cargo sum of all 16 and return a single value
16:05:08  <Samu> but maybe I need to return the value per owner
16:05:32  <Samu> and since this is newgrf stuff, i have absolutely no idea what needs to be done
16: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
16:08:58  <Samu> too chinese, too abstract
16:09:26  <peter1138> 40/41/42 are there for compatibility.
16:09:31  <peter1138> They can't be changed.
16:10:19  <Samu> i may need to turn 40/41/42 into 40[owner], 41[owner], 42[owner]
16:10:21  <peter1138> The replacement variable is 0x69, which takes a parameter.
16:10:24  <Samu> something liek that
16:10:31  <peter1138> You can't change those variables.
16:10:33  <nielsm> you cannot change 40/41/42
16:10:40  <nielsm> they need to keep working exactly as they have always done
16:10:53  <nielsm> otherwise you won't be able to use any existing industry newgrf
16:11:29  <Samu> how do i pass the owner around?
16:11:50  <nielsm> how indeed
16:11:54  <nielsm> that's an open question
16:12:05  <Samu> there's always a owner now
16:12:12  <peter1138> You probably don't want to.
16:12:19  <Samu> or just the total sum
16:12:25  <peter1138> The industry doesn't have an owner.
16:12:28  *** HerzogDeXtEr has joined #openttd
16:13:09  <peter1138> Industry varactions are not run in the context of a user.
16: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
16:13:50  <nielsm> if you change the rules, you're going to get every newgrf industry author angry at you for breaking their work
16:14:19  <nielsm> for that reason YOU NEED TO keep a compatible mode, where newgrf industries keep working as they did without your patch
16:14:30  <nielsm> even if the player has enabled your new rules in the settings
16:14:50  <nielsm> if the industry is not designed to work with the new rules, it must not use the new rules
16:14:58  <Samu> hmm, for compatibility purposes, openttd still sets owners now
16:14:59  <nielsm> that's the curse of backwards compatibility
16:15:53  <Samu> i am company 1 and deliver wood to sawmill
16:16:05  <Samu> incoming cargo acceptance [wood][company1]
16:16:06  <nielsm> you don't need to explain
16:16:34  <peter1138> Yeah but not all callbacks have a company.
16: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
16:16:54  <peter1138> These variables are also used for things like graphical variations. There's no owner there.
16:16:54  <nielsm> and keep the old rules
16: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
16:18:55  <peter1138> Smooth economy was around long before we had any cargo callbacks.
16:19:48  <Eddi|zuHause> that is true, but there was never any effort to bring the two approaches together
16:20:11  <Samu> i guess for "compatibility purposes" the sum of all wood will suffice
16:20:34  <Eddi|zuHause> using prod callback just silently disabled smooth economy
16:21:10  <nielsm> Eddi|zuHause well there is the monthly production rate change callback
16:21:33  <nielsm> where the industry can decide to change production either by original or by smooth rules, or by its own rules
16:24:09  <nielsm> when are we converting the base industries to newgrf?
16:25:20  <peter1138> We're not.
16:25:23  <Samu> PersistentStorage
16:25:24  <nielsm> :)
16:25:30  <Samu> what's a PersistentStorage :|
16:25:33  <Eddi|zuHause> i don't think we can
16:25:46  <nielsm> Samu, a way for a newgrf to store data
16:26:03  <Eddi|zuHause> because that means we drop the default values for existing newgrfs
16:26:04  <Samu> ah, i see, just a weird name
16: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
16:27:46  <nielsm> it's persistent storage as opposed to temporary storage which only exists during one callback chain execution and is then discarded
16:30:39  *** Thedarkb-T60 has joined #openttd
16:32:00  <nielsm> woah, my ViewportSignKdtree stuff compiles!
16:32:36  <nielsm> now to see how hard it crashes :P
16:32:54  <peter1138> :D
16:33:28  <Samu> so it's storing engineering supplies in the persistent storage
16:33:38  <Samu> hmm
16:33:45  <nielsm> maybe? I don't know
16:33:47  <nielsm> just guessing
16:34:02  <Samu> current production gung-ho
16:34:20  <Samu> well, this indeed doesn't need to know which company made the delivery
16:34:26  <Samu> the total sum is fine
16:34:44  *** Gja has quit IRC
16:35:04  <Samu> however, this production is then... benefiting everyone equally
16:35:12  <Samu> hmm hmm... .huuumm.....
16:37:13  <Samu> are scrap yards supposed to produce this much ?
16:37:29  <Samu> 1700 tonnes a month
16:37:55  <Samu> i need to compare this with base master
16:37:57  <Samu> brb
16:41:50  <Samu> nop
16:42:08  <Samu> 300 tonnes a month on master, 1500 on mine, something's wrong
16:43:55  <peter1138> Samu, I think you're going too low-level.
16:45:35  <nielsm> okay, can load the title game without crashing now
16:45:43  <peter1138> That's useful.
16:46:03  * peter1138 ponders some food before going home.
16:46:04  <peter1138> OR...
16:46:16  <peter1138> Go home on an empty stomach and fill it with b33r.
16:46:36  <peter1138> Hmm, only one bottle iirc. Could do wine.
16:46:53  <SpComb> fill bottle with wine
16:47:20  <peter1138> It's already in a bottle.
16:47:25  <peter1138> Fill peter1138 with wine.
16:47:32  <peter1138> Then show me all your PRs.
16:47:59  <nielsm> and can generate a new game as well!
16:48:01  <peter1138> Although I seem to have flooded the PR view :/
16:54:18  <Eddi|zuHause> i heard drinking alcohol on empty stomach is particularly effective
16:58:02  <nnyby> happy friday:p
17:00:04  <Samu> 26 adjustments holy crap, triggering industries is complex!
17:00:05  *** acklen has quit IRC
17:02:05  <Samu> 24
17:02:10  <Samu> still, a lot
17:04:23  *** acklen has joined #openttd
17:04:29  <nielsm> Samu, consider that it will be AT LEAST as much change as this: https://github.com/OpenTTD/OpenTTD/pull/6867/commits/eea6cce4d7ea913b37e77e02bff705bbbedf1f89
17:06:52  <Samu> wow
17:06:54  <Samu> :(
17: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
17: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
17:14:46  <Samu> suffixes?
17:21:19  <Samu> I think I understand where the problem may come from
17:27:38  <Samu> cases: 0x8D, 0x8C, 0x8B, 0x8A, 0x6D variable 0x69, 0x6F variable 0x6F
17:28:00  <Samu> now in english if anyone knows how these are used
17:28:50  <nielsm> https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Industries
17:30:22  * peter1138 is back
17:31:57  <Samu> so all this stuff is new for 1.9
17:32:02  <peter1138> Yes.
17:32:03  <Samu> it didn't exist before
17:32:08  <peter1138> Correct.
17:32:29  <peter1138> Because there was only 3-in/2-out or whatever.
17:32:39  <Samu> and now I'm breaking it
17:32:41  <Samu> :o
17:35:19  <Samu> 0x69 0x69 i meant
17:35:23  <Samu> failed at reading this
17:36:10  <Samu> 0x6F 0x6F
17:36:42  <Samu> 6A 6B 6C 6D 6E aren't touched
17:39:16  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN requested changes for pull request #7178: Add AI and GS to framerate window https://git.io/fhF56
17:40:54  *** m3henry has quit IRC
17:41:06  <Samu> for some reason, the breakpoints don't reach any of these
17:41:12  <Samu> firs
17:41:15  <Samu> doesn't use them
17:42:01  <Samu> which means, the problem is elsewhere
17:46:56  <peter1138> Genius.
17:48:08  <Samu> oops, I can't use lengthof(i->produced_cargo_waiting)
17:48:11  <Samu> anymore
17:48:54  <Samu> or can I?
17:49:02  <peter1138> Hmm, how best to do station catchment visualisation...
17:50:04  <nielsm> it would be cool if the combined catchment popped up when hovering the build tool adjacent to an existing station
17:50:14  <peter1138> That's what I'm thinking
17:50:20  <nielsm> but that doesn't solve ctrl-combining
17:50:31  <nielsm> nor if you want to view of an already built without adding more parts
17:50:49  <peter1138> Well, when using ctrl you can hover over the station in the "Join station" window.
17:51:13  <peter1138> The already existing view is easy, that was part of my debug visualization.
17:51:31  <Eddi|zuHause> i think it should just be a button in the station window
17:51:40  <Eddi|zuHause> show/hide catchment area
17:51:58  <Samu> can I replace lengthof(i->produced_cargo_waiting) with INDUSTRY_NUM_OUTPUTS?
17:52:08  <Samu> or am I doing it wrong?
17:52:09  <peter1138> Exactly. That's okay for viewing existing.
17: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
17:54:06  <Eddi|zuHause> that should cover most use cases, depending on whether you want or don't want overlapping areas and stuff
17:54:54  *** Progman has joined #openttd
17:57:09  <peter1138> Hmm, I only allowed 1 station at a time, but yeah, could have a list.
17:58:16  <peter1138> I also did it for town and industries, which is possibly more useful.
17:58:21  <peter1138> But not everything is covered by a town.
18:00:03  <peter1138> Hmm.
18:01:08  <Eddi|zuHause> ... and then there was this tile highlighting patch where you could overlay two separate layers
18:01:20  <peter1138> Yes
18:01:21  <Samu> https://github.com/OpenTTD/OpenTTD/blob/master/src/industry_cmd.cpp#L1136 how is this working?
18:01:53  <Eddi|zuHause> i never actually used it, but i imagine that gui was a bit overloaded
18:01:56  <peter1138> What do you mean how?
18:02:49  <Samu> what is it doing
18:03:11  <peter1138> It's adding production_rate to produced_cargo_waiting and limiting the result to 65535.
18: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
18:04:14  <Samu> hmm, production_rate, how to solve this
18:04:24  <Eddi|zuHause> read from right to left, mostly
18:04:47  <Eddi|zuHause> (well, technically, from inside out)
18:06:17  <Samu> i wonder if repeating production_rate 16 times is correct
18:06:32  <Samu> must experiment anyway
18:06:46  <peter1138> Well, isn't that once per possible cargo type?
18:07:14  <peter1138> Ahhhh gotta love the original music :D
18:07:19  <peter1138> nielsm is a star.
18:07:55  <peter1138> I suppose timidity worked, but it was such a kludge.
18:08:08  <Samu> 			for (Owner owner = COMPANY_FIRST; owner <= MAX_COMPANIES; owner++) {
18:08:08  <Samu> 				i->produced_cargo_waiting[j][owner] = min(0xffff, i->produced_cargo_waiting[j][owner] + i->production_rate[j]);
18:08:08  <Samu> 			}
18: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
18:08:20  <peter1138> Oh.
18:08:24  <peter1138> That definitely sounds wrong.
18:08:26  <Samu> I think this is gonna be a problem
18:08:52  <Samu> the production rate is for the total sum
18:08:53  <peter1138> Surely you on't want to increase cargo waiting depending on the company's rating?
18:09:07  <peter1138> s/on't/only/g
18:09:36  <Eddi|zuHause> surely you want also production_rate[j][owner]?
18:10:07  <peter1138> I actually think he wants none of that because I don't think it makes any sense.
18:10:27  <Eddi|zuHause> well, different definitions of "want" :p
18:10:39  <Samu> don't know what I want yet
18: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.
18:10:55  <peter1138> Then you can share out the goods produced relative to the %age.
18:13:16  <peter1138> Hmm, thinking of an alternative to #7262
18:13:33  <Samu> yep, this is not what I want, reverting
18: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?
18:16:36  <peter1138> Yes, there is.
18:16:43  <peter1138> It's called... pre-push.
18:17:15  <Samu> it works fine for the basic industries
18:17:33  <Samu> then enters newgrf stuff, and everything fails
18:19:51  <Samu> i still dont get how production gets so inflated
18:19:58  <Samu> when i deliver engineering supplies
18:20:04  <peter1138> Well if you were adding it 16 times...
18:20:28  <Samu> I reverted it, and it's not from here
18:20:39  <Samu> must be somewhere else
18:21:37  <Samu> looking at https://github.com/OpenTTD/OpenTTD/blob/master/src/newgrf_industries.cpp#L610 atm
18:24:24  <Samu> hmm
18:27:51  <Samu> it's probably here :|
18:31:14  *** glx has joined #openttd
18:31:14  *** ChanServ sets mode: +v glx
18:31:58  <peter1138> Hmm, maybe I just put it on the Land Area Information tool.
18:32:15  <peter1138> Select tile -> highlight catchment.
18:33:18  *** andythenorth has joined #openttd
18:34:21  <andythenorth> o/
18:34:53  <Samu> alright, it's not so inflated now, but there's still no match
18:37:36  <supermop_work_> hi andy
18:40:05  <Samu> https://imgur.com/3HQzGfx
18:40:07  <Samu> no match
18:40:17  <Samu> not as inflated, but still wrong
18:40:39  <andythenorth> supermop_work_: screenshots, or it didn't happen :P
18:41:25  <Samu> as long as I don't deliver engineering supplies, the production matches
18:41:43  <Samu> if I deliver engineering supplies, they do different :(
18:41:47  <Samu> should do equal
18:43:23  <Samu> what am i missing, what am i doing wrong
18:44:23  *** gelignite has joined #openttd
18:50:22  *** frosch123 has joined #openttd
18:52:41  <andythenorth> what is the question?
18:54:32  <frosch123> to be or not to be
18:55:31  <andythenorth> apparently
18:55:51  <Eddi|zuHause> it's not 42.
18:56:24  <nielsm> sigh https://0x0.st/ziho.png
18:57:00  <Eddi|zuHause> stop violating your invariant!
18:57:07  <andythenorth> samu: I really fail to understand what your trying to make happen
18:58:20  <Samu> wanna do what happens on st2 servers
18: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
18:58:56  <andythenorth> well
18:59:00  <andythenorth> that's not going to work :)
18:59:03  <Samu> secondary cargo can only be transported by the company that delivered primary cargo
18:59:10  <andythenorth> it's a meaningless objective
18:59:19  <nielsm> even nicer: https://0x0.st/zih8.png
18:59:26  <Eddi|zuHause> that argument has never stopped anyone, ever :p
18:59:28  <andythenorth> (meainingless in the context of openttd)
19:00:11  <andythenorth> cargo should be distributed based on station rating
19:00:16  <andythenorth> is that not already implemented?
19:00:29  <Eddi|zuHause> nielsm: stop going out of bounds, too! :p
19: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
19:01:36  <nielsm> so oops
19:02:19  <Samu> https://imgur.com/BGBWW7B they match!
19:02:24  <Samu> but I'm kinda cheating
19:02:29  <nielsm> I should get some food before continuing this quest
19:03:21  <Samu> i'm moving cargo from the deliverer into the free for all pool
19:03:41  <Samu> because newgrfs
19:05:01  <Samu> which in turn means everyone would benefit
19:05:09  <Samu> i guess for this type of cargo, that is okay
19:05:19  <Samu> the industry produces for all
19:05:25  <Samu> have to ask ST2
19:06:04  <peter1138> nielsm, Can you do the vscroll thing please? ;)
19:06:30  <peter1138> Hmm, or actually am I able to push to the PR?
19:07:08  <Samu> ST2, u there!? in FIRS, what do you consider Scrap Metal/Engineering Supplies relationship?
19:07:23  *** octernion has quit IRC
19:07:46  <Samu> who's allowed to transport Scrap Metal if engineering supplies are also delivered there?
19:08:41  <Samu> never been in a FIRS server :|
19:08:54  <peter1138> Huh?
19:08:59  <peter1138> Anyone? Cargo is not owned.
19:09:31  <Samu> server rules
19:09:55  <Samu> but since engineering supplies is a different kind of specimen
19:10:10  <Samu> I don't know how the rule is enforced for this case
19:14:21  <andythenorth> you'll have to special case by specific industries in specific newgrfs if you want to do this
19:19:08  <Samu> bah, i need to install 1.8.0 to enter a firs server
19:19:10  <Samu> brb
19:23:50  <Samu> st2 is away :/
19:25:24  <Eddi|zuHause> nielsm: so you didn't invalidate the cache on new game?
19:25:59  <nielsm> Eddi|zuHause: rather I do it too late
19:27:10  <nielsm> peter1138: you're welcome to push to my pr branch
19:27:22  <peter1138> :-)
19:27:40  <Eddi|zuHause> i think i saw a checkbox like "developers can write to my PR"
19:28:51  <zuzak> i think that's just "can edit the PR text"
19:28:58  <nielsm> yeah it's on by default
19:29:25  <nielsm> nope it is in fact pushing to the branch
19:29:39  <nielsm> I've done it once or twice
19:30:35  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #7178: Add AI and GS to framerate window https://git.io/fhSMz
19: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? :)
19: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
19:36:39  <Samu> pretty much, they're valuables?
19:36:43  <Samu> i see
19:41:01  <peter1138> Hmm, I wonder if I can approve it now? :p
19:41:21  <peter1138> nielsm, yeah, go for 2 commits.
19:42:42  <peter1138> Hmm, so, staiton catchment... land query tool or button on station windows...
19:42:58  <peter1138> I'm fine with catchment for only 1 station being visible at a time
19:43:34  <peter1138> The town visualization is really useful
19:43:42  <peter1138> but the industry one is pretty odd, it's either in or not in.
19:47:07  <andythenorth> samu: what's a primary cargo?
19:47:11  <andythenorth> what's a secondary cargo?
19:50:30  <peter1138> Hmm, accepts is wrong :/
19:54:06  <peter1138> Oh... Strange, I never updated GetAcceptanceAroundTiles()
19:55:56  <Samu> i dont get firs, it changes the way stuff normally works
19:57:08  <peter1138> Yes, that's the point.
19:58:00  <andythenorth> I don't know how to explain
19:58:03  <andythenorth> where do we start?
19:58:09  <andythenorth> OpenTTD has a content API
19:58:23  <andythenorth> it allows modification of substantial parts of the game
19:59:24  * andythenorth amends that
19:59:31  <andythenorth> OpenTTD has multiple content APIs
20:06:24  <glx> newgrf can change stuff, GS can change stuff
20:07:30  *** octernion has joined #openttd
20:09:06  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #7235: Change: Non-rectangular sparse station catchment area https://git.io/fh5s1
20:22:57  *** gelignite has quit IRC
20:27:09  <peter1138> Hmm.
20:27:22  <peter1138> Yeah, acceptance looks good now.
20:27:54  <peter1138> Now matches the catchment, instead of the rectangle.
20:28:56  <nielsm> well it works if I load a game... sort of https://0x0.st/zih5.jpg
20:29:09  <peter1138> Hrm
20:30:34  <nielsm> I think it has to do with partial redraw :/
20:30:53  <nielsm> it checks some rectangle and decides, nope don't need to draw any signs here
20:31:03  <nielsm> then paints landscape over some existing signs that ought to be where
20:31:04  <peter1138> Ah, you need to extend your bounds.
20:31:07  <nielsm> yeah
20:32:11  <peter1138> Where should I put the view catchment button? These windows are kinda crowded :/
20:33:20  *** sla_ro|master has quit IRC
20:34:16  <nielsm> uh hm, how about merging location/rename buttons to a dropdown, then adding a toggle in place of rename?
20:35:18  <peter1138> Wondering about making a small icon but I can't think of anything that would scream out "catchment / coverage area"
20:35:45  <nielsm> https://0x0.st/zihF.mp4  ugh
20:36:29  <peter1138> Yup, classic.
20:37:57  <nielsm> just for the performance check, let me try a release build, and that 50k stations save
20:38:00  <nielsm> that should stress it
20:38:09  <peter1138> :D
20:39:40  <nielsm> https://0x0.st/ziFz.png  <- that's a bad stack :(
20:39:46  *** octernion has quit IRC
20: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
20:41:39  <Eddi|zuHause> but i can't find it
20:42:08  *** octernion has joined #openttd
20:52:39  <nielsm> I think I figured this one out, it's a stack overflow
20:52:51  *** gnu_jj_ has joined #openttd
20:53:02  <nielsm> building a tree based on coordinates, while all coordinates are zero
20:53:17  <nielsm> meaning it's impossible to balance at all
20:53:32  <nielsm> it becomes a linked list down the right branch
20:53:45  <nielsm> and with 50k+ elements that overflows the recursion :)
20:54:53  *** frosch123 has quit IRC
21:00:24  *** gnu_jj has quit IRC
21:00:28  <peter1138> Hmm
21:03:02  *** andythenorth has quit IRC
21:03:17  *** andythenorth has joined #openttd
21:03:58  <peter1138> Oh!
21:05:07  <nielsm> I should probably just use the entire viewport space for querying potential signs, rather than the pixel area being updated
21:05:30  <nielsm> assuming this fixes the stack ovberflowing
21:07:22  <nielsm> hm yeah it looks like it's busy doing the industries near thing now
21:07:40  <nielsm> which is further than it got before
21:08:05  <andythenorth> ok so consensus is achieved when people stop objecting
21:08:14  <andythenorth> and no-one's objecting https://github.com/OpenTTD/OpenTTD/pull/7147
21:08:22  <andythenorth> can we jam it into 1.9.0?
21:08:51  <peter1138> After ... 2 days?
21:08:53  <nielsm> that's a crude term
21:11:40  <nielsm> hah yeah this is an improvement
21:12:22  <nielsm> on master, panning around the landscape at halfway zoomed out is 40 ms/frame most of the time
21:12:39  <nielsm> with k-d tree for signs it peaks at 6 ms/frame
21:12:59  <nielsm> (but more commonly 3-4 ms)
21: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
21: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
21:13:54  <nielsm> https://0x0.st/ziFc.jpg
21:14:03  <nielsm> https://0x0.st/ziFT.png
21:14:56  <peter1138> Is it faster because you're not drawing the whole sign? :p
21:15:04  <nielsm> I don't think that's it :P
21: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
21:16:23  *** Wolf01 has joined #openttd
21:16:25  * LordAro wonders if peter1138's PR count has exceeded Samu's
21:17:05  <Wolf01> o/
21:17:09  <peter1138> Nope, 12 vs 16.
21:18:10  <LordAro> heh
21:18:58  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7000: Some NewGRF variables concerning railtypes https://git.io/fhFbA
21: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
21:30:00  <nielsm> okay yeah problem here is I need a heuristic for the widest possible a sign can be
21:31:44  <DorpsGek_II> [OpenTTD/OpenTTD] LordAro approved pull request #7264: Fix: Resorting file list did not update filtered rows. https://git.io/fhFNk
21:31:50  <DorpsGek_II> [OpenTTD/OpenTTD] LordAro merged pull request #7264: Fix: Resorting file list did not update filtered rows. https://git.io/fhFDK
21: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
21: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
21:35:43  <DorpsGek_II> [OpenTTD/OpenTTD] LordAro commented on pull request #7261: Add: Road vehicle path cache. https://git.io/fhFNY
21:38:03  *** octernion has quit IRC
21:44:29  <DorpsGek_II> [OpenTTD/OpenTTD] Eddi-z commented on pull request #7000: Some NewGRF variables concerning railtypes https://git.io/fhFN8
21:46:12  <Samu> IndustryProductionSpriteGroup
21:46:21  <Samu> I got a feeling I need to edit this
21:47:46  <Samu> subtract_input and add_output
21: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
21:49:13  <Samu> I'm kinda lost
21:49:43  <Samu> at this point I'm pretty much giving up
21:50:18  <Samu> I fail at explaining what I want to achieve, and newgrfs make it too abstract
21:51:02  <andythenorth> they do that :P
21:51:26  <nielsm> start by programming some newgrf industries yourself, using nml or whatever, to understand what goes on from that end
21:51:52  <nielsm> not necessarily to make anything anyone would ever play with, but for the same of learning about the system
21:52:03  <nielsm> for the sake of *
21:54:46  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh updated pull request #7250: K-d tree data structure for spatial lookups https://git.io/fhd4b
21:56:11  *** synchris has quit IRC
21:56:29  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7250: K-d tree data structure for spatial lookups https://git.io/fhFN2
22:00:24  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7261: Add: Road vehicle path cache. https://git.io/fhFNa
22:02:38  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7261: Add: Road vehicle path cache. https://git.io/fhFNw
22:04:29  <nielsm> https://dev.azure.com/openttd/OpenTTD/_build/results?buildId=1367&view=logs  <-- peculiar, regressions fail on some builds but not all
22:05:50  <DorpsGek_II> [OpenTTD/OpenTTD] LordAro commented on pull request #7261: Add: Road vehicle path cache. https://git.io/fhFNX
22:08:26  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7250: K-d tree data structure for spatial lookups https://git.io/fhFND
22:09:58  <Samu> a fatal NewGRF error has occurred ;(
22:14:20  <peter1138> Hmm
22:15:56  *** supermop_work has joined #openttd
22:16:08  <Samu> the end!
22:20:17  <peter1138> https://gist.github.com/PeterN/922c34309e437920c5af0cc56708bd12
22:20:23  <peter1138> ^ LordAro is that... actually better? :/
22:22:01  <LordAro> maybe `if (steps > 1 && steps <= YAPF...) { ... } steps--;` ?
22:22:06  *** supermop_work_ has quit IRC
22:22:30  <LordAro> except steps-- inside the if
22:22:32  <peter1138> No because then it won't decrement if it's higher than the constant.
22:22:45  <peter1138> Oh, after.
22:23:19  <LordAro> i guess i'm suggesting the logic could be reorganised, rather than just the code
22:23:28  <LordAro> though i don't have ideas of how that could be
22:26:13  <peter1138> steps--; if (steps > 0 && steps < YAPF..) { .. }
22:26:38  <peter1138> Hmm.
22:26:40  <peter1138> Actually.
22:27:09  <peter1138> steps > 0 is never necessary
22:27:28  <peter1138> if (--steps < YAPF_ROADVEH_PATH_CACHE_SEGMENTS)
22:27:31  <peter1138> Is that ok?
22:27:44  <LordAro> i guess
22:27:45  <peter1138> Or just
22:27:54  <peter1138> steps--; if (steps < YAPF..) { .. }
22:27:55  <LordAro> still not a fan of my if statements having side effects
22:28:50  <peter1138> Oh, hmm, might've had the printf in the wrong place.
22:29:38  <peter1138> Yeah, > 0 is necessary.
22:30:05  <peter1138> It should never go below 0 (ignore that it's unit)
22:30:10  <peter1138> ... uint
22:31:03  <peter1138> It doesn't add the last step because that's the track that's returned from the pathfinder.
22:31:32  <peter1138> Maybe we need a path cache for aircraft...
22:32:37  *** Flygon has joined #openttd
22:34:47  <peter1138> Wentbourne still works :-)
22:35:00  <LordAro> peter1138: surely aircraft pathing is trivial?
22:35:01  <Samu> pushed!
22:35:16  <peter1138> LordAro, it was a joke. There isn't any.
22:35:28  <LordAro> :p
22:36:29  <Samu> https://github.com/SamuXarick/OpenTTD/commit/c0a5ba6f9f080dcb7d261682d0e18cc31e33a512 - if anyone wants to peak at my experimentations
22:36:41  <Samu> i can't advance it further :|
22:36:54  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #7261: Add: Road vehicle path cache. https://git.io/fhFw4
22:37:23  <peter1138> You're still trying to have separate cargo waiting for each company...
22:39:02  <Samu> it was working for vanilla industries
22:39:16  <Samu> but then newgrf got in the way... and RIP
22:40:38  <peter1138> 18:10 <@peter1138> What you probably want to do is store a value per company which
22:40:42  <peter1138>                    represents the %age of goods supplied by that company.
22:40:44  <peter1138> 18:10 <@peter1138> Then you can share out the goods produced relative to the %age.
22:40:47  <peter1138> I don't know if I mentioned that.
22:41:04  <peter1138> Might be a path worth trying, 4.5 hours ago.
22:46:29  <Samu> isn't that what I've done?
22:46:39  <Samu> not a percentage though
22:47:20  <nielsm> I had not heard this term before https://en.wikipedia.org/wiki/Elvis_operator
22:47:40  <peter1138> No, you seem to be messing about by splitting up the whole of the industry chain by company
22: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
22:48:47  <peter1138> ^^
22:49:00  <nielsm> industries buy cargo from industries, companies are paid for doing the logistics of getting it from A to B
22:49:03  <peter1138> It's definitely not the company's cargo.
22:49:35  <peter1138> It is reasonable, though, to share out that cargo (when moving goods to stations) based on ratings.
22:49:40  <peter1138> Which is already done.
22:49:40  <nielsm> (and if you want a game with better simulation of industries having deals with other industries, play simutrans)
22:49:55  <peter1138> So I think you really just want to be fiddling with the rating algorithms.
22:50:44  <peter1138> nielsm, simutrans smells though :(
22:50:56  <Samu> dont know what simultrans is
22:51:05  <Samu> another game?
22:51:22  <nielsm> yes, it's a proper clean slate transport tycoon-like
22:51:37  <nielsm> written from the ground up
22:51:49  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN commented on pull request #7261: Add: Road vehicle path cache. https://git.io/fhFA4
22:52:07  <nielsm> (rather than being based on disassembly and reverse engineering of an original game which ottd is)
22:52:18  <peter1138> I started out playing Simutrans before I got into OpenTTD.
22:52:25  <peter1138> It's probably improved a bit since then.
22:52:34  <peter1138> Then again I tried it last year and it was still horrible.
22:53:25  <_dp_> this whole cargo topic was brought up by mp gameplay needs not some industry simulation whatever
22: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
22:55:56  <nielsm> and keep the base game unchanged
22:56:09  <_dp_> nielsm, passing the problem to newgrf authors is not a solution :p
22: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.
22:56:50  <_dp_> nielsm, also sharing logic part of a game mode, newgrfs shouldn't deal with it
22:57:02  <_dp_> nielsm, GS could though if only it didn't suck
22:58:03  <andythenorth> it does though
22:58:15  <andythenorth> because newgrf
22:58:21  <andythenorth> GS is crippled forever
22:58:43  <_dp_> nerf newgrfs! xD
22:59:53  <_dp_> actually it's not only because of newgfs
23:00:45  <peter1138> GS could be improved if there was someone interested in writing a GS _and_ improving the API.
23:00:57  <_dp_> like newgrfs have nothing to do with GS not being able to do reliable callbacks
23:01:52  <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #7261: Add: Road vehicle path cache. https://git.io/fhFw4
23:01:54  <_dp_> peter1138, it's not just api, GS engine has to change as well
23:02:09  <peter1138> Okay. What needs to change?
23:02:28  <_dp_> peter1138, 1 command / tick
23:03:14  <_dp_> peter1138, and if we talk about callbacks any execution delay in general + operation limit I guess
23:03:39  <peter1138> Ok, that's because there's a delay in how commands are sent :/
23:04:13  <_dp_> peter1138, yeah, I know why :)
23:04:44  <peter1138> network_command.cpp:157
23:04:50  <_dp_> peter1138, doesn't change that it needs to go :p
23:05:38  <_dp_> I was actually thinking to patch citymania servers to get rid of that delay
23:05:46  <_dp_> but then I got rid of GS altogether
23:05:50  <peter1138> I'm thinking that delay should not apply to GS.
23:06:22  <peter1138> I don't know if it actually solves anything though.
23:06:38  <peter1138> It's not going to make the GS be executed again.
23:07:31  <peter1138> The command system kinda works like syscalls on a co-operative multitasking system (e.g. old RISC OS)
23:07:54  <peter1138> Except there is the max opcodes thing as well :)
23:08:16  <andythenorth> bring back RISC OS :P
23:08:21  <andythenorth> and a three-button mouse
23:08:51  <peter1138> Can we speed up the CI? :/
23:09:34  <LordAro> not without giving MS large sums of money
23:10:09  <peter1138> Not sure if it's possible to execute commands on the server and then queue it to send to the clients.
23:11:24  <_dp_> peter1138, should be fine as long as order stays the same
23:11:47  <peter1138> Yes, I was thinking in terms of already-queued commands, dunno though.
23:12:06  <peter1138> Not just the same order, they have to be on the same tick.
23:12:22  <peter1138> Why the heck am I listening to Enigma?
23:13:08  <andythenorth> sadeness
23:13:30  <peter1138> heh
23:13:37  * andythenorth should bed
23:13:44  <peter1138> No.
23:13:46  <andythenorth> watching a documentary about Dre though
23:14:13  <_dp_> peter1138, yeah, I basically consider tick change to be another command
23:19:41  *** Progman has quit IRC
23:23:14  *** Wolf01 has quit IRC
23:26:15  *** nielsm has quit IRC
23:36:16  *** andythenorth has quit IRC
23:37:08  *** supermop_work_ has joined #openttd
23:38:00  *** supermop_work__ has joined #openttd
23:44:16  *** supermop_work has quit IRC
23:45:11  *** supermop_work_ has quit IRC
23:48:44  <peter1138> Ooh. Vivecraft for 1.13.2

Powered by YARRSTE version: svn-trunk