Config
Log for #openttd on 4th August 2021:
Times are UTC Toggle Colours
00:55:55  *** riis has joined #openttd
01:52:45  *** Gustavo6046 has quit IRC
01:53:08  *** Gustavo6046 has joined #openttd
01:56:18  *** Wormnest has quit IRC
02:07:00  *** debdog has joined #openttd
02:10:24  *** D-HUND has quit IRC
02:33:47  *** snail_UES_ has quit IRC
02:40:49  *** glx has quit IRC
03:28:08  *** tokai|noir has joined #openttd
03:28:08  *** ChanServ sets mode: +v tokai|noir
03:34:36  *** tokai has quit IRC
04:17:50  *** riis has quit IRC
04:30:30  *** tokai has joined #openttd
04:30:30  *** ChanServ sets mode: +v tokai
04:37:06  *** tokai|noir has quit IRC
04:41:43  *** Flygon has joined #openttd
05:01:25  *** sla_ro|master has joined #openttd
09:33:57  *** Markk has quit IRC
09:37:00  *** Markk has joined #openttd
09:48:13  *** nielsm has joined #openttd
09:48:55  *** Samu has joined #openttd
09:54:04  <Samu> hi
09:54:20  <Samu> is there a way to get the number of vehicles in a group?
09:55:48  <Samu> AIGroup.GetNumEngines doesn't seem to be it
10:06:15  <Samu> there's AIVehicleList_Group
10:06:34  <Samu> then Count
10:06:40  <Samu> but that's inneffective
10:06:53  <Samu> inefficient
11:26:13  <Samu> im inventing a function
11:28:20  <Samu> https://pastebin.com/A3XwvrKE
11:28:29  <Samu> help me with english description plz
11:28:43  <Samu> is that english good?
12:26:45  <Samu> now my goal is
12:28:02  <Samu> compare 'AIVehicleList_Group(group_id).Count()' versus 'AIGroup.GetNumVehicles(group_id)' in terms of performance degradation
12:31:35  <Samu> one iterates all groups, the other iterates all vehicles
12:32:02  <Samu> in normal usage, there's less groups than vehicles
12:36:42  *** glx has joined #openttd
12:36:42  *** ChanServ sets mode: +v glx
12:37:53  <glx> Samu: don't forget `AIGroup.GetNumVehicles(group_id)` must be enclosed in an engine loop to achieve the same result
12:39:20  <glx> but my guess is AIGroup should iterate way less items than AIVehicleList_Group
12:41:39  <glx> engine count per group is cached
12:42:57  *** roadt_ has joined #openttd
12:45:00  *** snail_UES_ has joined #openttd
12:47:00  *** ioangogo has quit IRC
12:47:03  *** ioangogo has joined #openttd
12:48:05  <Samu> just testing now, it's faster!
12:48:17  <Samu> peak of 11 ms vs peak of 32 ms
12:48:22  *** ioangogo has quit IRC
12:49:45  <Samu> not sure how many groups there are
12:49:52  <Samu> but there's 10k vehicles atm
12:50:00  *** roadt__ has quit IRC
12:51:27  <Samu> 239 road routes + 1362 water routes, so that's about 1500 groups
12:51:28  *** ioangogo has joined #openttd
12:51:32  <Samu> 1600
12:53:46  <Samu> engine loop?
12:53:51  <Samu> what do youmean
12:54:20  <glx> I was thinking of GetGroupNumEngines
12:54:55  <glx> anyway counts are cached in groups (because GUI)
12:56:02  <Samu> if i actually need to know which vehicles are in a group then... i can only resort to using AIVehicleList_Group :(
12:57:05  <Samu> it doesn't cache the actual vehicles that are in the group, just a counter
12:57:50  <glx> oh and the GetGroupNum functions include sub groups
12:58:47  <Samu> I see, but for my case, I'm fine
12:58:54  <Samu> i dont use sub groups
12:59:04  <glx> while ScriptVehicleList_Group() doesn't
13:07:51  <Samu> im not sure if group stuff goes into GS
13:08:00  <Samu> GSGroup
13:11:34  *** snail_UES_ has quit IRC
13:11:52  <Samu> where do I see this
13:28:16  <Samu> there's no easy way to tell this
13:28:56  <Samu> im under the impression this won't be available for GS'es
13:29:01  <Samu> but unsure
13:44:41  <glx> in source you can check the @api marker in function comments
13:45:41  <glx> group stuff is ai only
13:59:30  <DorpsGek> [OpenTTD/OpenTTD] SamuXarick opened pull request #9462: Add: [AI] Get the number of vehicles in a given group https://git.io/JRJxr
13:59:58  <Samu> oh, i didnt create a ... regression test thing, is it needed?
14:01:05  *** WormnestAndroid has quit IRC
14:01:18  *** WormnestAndroid has joined #openttd
14:02:47  <Samu> oops typo
14:04:45  <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #9462: Add: [AI] Get the number of vehicles in a given group https://git.io/JRJxr
14:07:57  <Samu> the derriere test
14:08:00  <Samu> 		while(true) {
14:08:00  <Samu> 			AIGroup.GetNumVehicles(m_sentToDepotRoadGroup[1], AIVehicle.VT_ROAD);
14:08:00  <Samu> 		}
14:10:08  <Samu> 35.95 ms
14:10:36  <Samu> and now...
14:10:38  <Samu> 		while(true) {
14:10:38  <Samu> 			AIVehicleList_Group(m_sentToDepotRoadGroup[1]).Count();
14:10:38  <Samu> 		}
14:11:34  <Samu> holy crap, it's horrible
14:12:34  <Samu> 3,179.86 ms
14:20:45  *** virtualrandomnumber has joined #openttd
14:40:59  <DorpsGek> [OpenTTD/nml] ZvikaZ opened issue #229: Not enough random bits for the town name generation (40 needed, 32 available) https://git.io/JRUIc
14:42:33  <DorpsGek> [OpenTTD/nml] FLHerne commented on issue #229: Not enough random bits for the town name generation (40 needed, 32 available) https://git.io/JRUIc
14:48:12  <DorpsGek> [OpenTTD/nml] ZvikaZ commented on issue #229: Not enough random bits for the town name generation (40 needed, 32 available) https://git.io/JRUIc
14:48:40  <LordAro> we really should do a new nml release
14:48:44  <LordAro> what was holding it up?
14:49:33  <glx> https://github.com/OpenTTD/nml/pull/193
14:50:31  <glx> #224 could go into it too, and I need to check #228
14:50:55  <FLHerne> There's also the thing about opt warnings being annoying and not disableable
14:51:05  <FLHerne> unless I missed a fix for that
14:51:13  <glx> ah yes the warnings
14:51:17  <FLHerne> (without -q suppressing *all* warnings)
14:51:40  <FLHerne> 228 looks ok to me
14:52:35  <DorpsGek> [OpenTTD/nml] glx22 approved pull request #228: Fix: define PY_SSIZE_T_CLEAN in _lz77.c https://git.io/JRUqi
14:52:54  <glx> indeed it follows what the doc says
14:54:26  <glx> anyway the warnings are just annoying ;)
15:50:33  *** Wormnest has joined #openttd
15:58:31  *** Progman has joined #openttd
16:06:09  *** Strom has quit IRC
16:07:44  *** Strom has joined #openttd
16:08:07  *** andythenorth has joined #openttd
16:10:16  * andythenorth plays solitaire
16:14:55  <Samu> all that remains atm is dealing with AIVehicleList_Station for aircraft
16:15:08  *** virtualrandomnumber has quit IRC
16:15:13  <Samu> and it won't be easy
16:16:16  <Samu> I don't even know where to start
16:16:36  <Samu> the aircraft portion of the code is coded very different than that or road and ship
16:17:31  <Samu> in the long run, what i need is a re-write of it
16:19:48  <Samu> I got myself into a mess
16:41:08  <TrueBrain> I blame andythenorth
16:41:57  <andythenorth> same
16:43:01  <TrueBrain> complete and utter lack of motivation
16:43:14  <TrueBrain> IT IS ALL YOUR FAULT
16:43:18  <TrueBrain> no clue why btw
16:43:22  <TrueBrain> just easier to blame someone else
16:43:27  <andythenorth> yes
16:50:03  <andythenorth> it's holiday time
16:50:10  <TrueBrain> it is? How nice!
16:50:10  * andythenorth not producing anything
16:50:18  <TrueBrain> are you going to add stuff to TrueGRF now?
16:50:40  <andythenorth> I am testing how to play solitaire
16:52:56  <TrueBrain> found any bugs?
16:53:01  <andythenorth> not yet
16:55:32  <TrueBrain> keep trying
17:01:59  * andythenorth tries
17:02:13  <andythenorth> I could do some grf
17:02:36  <andythenorth> but the grf I want to do involves working around the spec, not with it :P
17:02:44  <andythenorth> so it's not interesting today
17:02:51  *** HerzogDeXtEr has joined #openttd
17:04:17  <TrueBrain> no no, not make stuff with .. add stuff to :P
17:10:43  *** virtualrandomnumber has joined #openttd
17:10:49  *** iSoSyS has joined #openttd
17:32:12  *** andythenorth has quit IRC
17:33:45  <glx> https://github.com/OpenTTD/OpenTTD/compare/master...glx22:script_events2 <-- second try, with autodetection
17:35:52  *** andythenorth has joined #openttd
17:37:20  *** iSoSyS has quit IRC
17:45:47  <Timberwolf> I wonder what the top 5/10 OpenTTD myths are.
17:46:02  <Timberwolf> "Path signals use more CPU than block signals" has to be a contender.
17:46:46  <TrueBrain> glx: much better :D just the function names could use some love ;) this will confuse someone :p
17:47:22  <glx> the hardest part was to find where to plug in the compiler
17:48:24  <glx> and it also fix the "events are pushed to dead scripts" issue
17:52:56  <andythenorth> "goods grow towns"
17:55:49  <Timberwolf> Hah. That one is a fun one, I thought that they did for many years.
17:56:01  <Timberwolf> Confusing because the act of unloading cargo does of course grow the town.
18:02:40  *** Flygon has quit IRC
18:29:59  *** tokai|noir has joined #openttd
18:29:59  *** ChanServ sets mode: +v tokai|noir
18:33:47  <nielsm> I'm not sure why, but I had the idea for the longest time that oil rig passengers could only be served by heli and oil rig oil only by ship (the latter only until I discovered filling in the sea)
18:36:28  <FLHerne> I think there's an option for that
18:36:55  <Timberwolf> I have fond memories of one of our multiplayer UK map games, in which the North Sea received a land reclamation project that would make the Netherlands go, "hang on, isn't that a bit ambitious?"
18:37:01  *** tokai has quit IRC
18:37:39  <FLHerne> "Company stations can serve industries with attached neutral stations"
18:37:46  <FLHerne> I think it's quite recent though
18:38:07  <FLHerne> but it makes filling in the sea not work
18:38:22  <Timberwolf> Oh yes, that's... a 1.11 change or something, isn't it?
18:40:03  <Timberwolf> I miss my world of remote oil rigs, nothing around but sea and a massive 6-track roll-on, roll-off train station.
18:41:02  <FLHerne> hah
18:41:08  <FLHerne> It's still on by default
18:49:10  *** gelignite has joined #openttd
18:50:23  <nielsm> yeah that option was made specifically to nerf oil rigs a bit
18:58:26  * andythenorth plays more solitaire
18:58:27  <andythenorth> oof
18:58:30  <andythenorth> I think I played enough
19:00:12  <DorpsGek> [OpenTTD/OpenTTD] DorpsGek pushed 1 commits to master https://git.io/JRUA8
19:00:13  <DorpsGek>   - Update: Translations from eints (by translators)
19:03:49  <andythenorth> ok naming things is hard
19:04:04  <andythenorth> I'm going to make it so towns only do grow if certain cargos are delivered
19:04:21  <andythenorth> and also industries might increase production if the town is happy
19:04:45  <andythenorth> how do I explain town 'happiness'
19:05:03  <andythenorth> without totally embedding capitalist consumer materialism? :P
19:08:49  <andythenorth> 'town satisfaction'?
19:08:53  <andythenorth> 'town happiness'?
19:08:59  <andythenorth> 'town prosperity'?
19:09:58  <Timberwolf> This was my problem with the more advanced settings in Villages Is Villages.
19:10:00  <Samu> i have a function sized 500 lines :(
19:10:06  <Samu> i'm so lost
19:10:18  <Timberwolf> It is impossible to make a video game economic model without also making some kind of political statement.
19:10:46  <andythenorth> I already reworked FIRS to not make lolz of Belgian colonialism :P
19:11:10  <andythenorth> there are parts of the playerbase that would see it as an aspiration, not a warning :P
19:12:59  <andythenorth> anyway
19:13:03  <andythenorth> I need words
19:13:41  <andythenorth> Prospects for long-term growth at this industry: depends on town prosperity.  See the Newspaper Office industry in this town for details.
19:13:46  <andythenorth> or something
19:14:00  <andythenorth> 'prospects' probably confuses players
19:14:31  <andythenorth> 'outlook' ?  'potential'?
19:14:34  <andythenorth> 'chances'?
19:15:04  <andythenorth> it's very complicated :(
19:15:19  <andythenorth> industry A will increase production if town is happy
19:15:26  <andythenorth> town is made happy by delivering cargo to industry B
19:15:42  <andythenorth> the only way to find out if the town is happy is to check industry C
19:16:45  <andythenorth> there isn't room in the industry window to explain this at industry A
19:16:49  <andythenorth> nor at B
19:16:57  <andythenorth> and grf can't put any text in town window
19:17:16  <andythenorth> did I ever mention that the design of the newgrf economy sucks? :P
19:17:46  <andythenorth> anyone looking from the outside would just think it was thrown together with no plan, no care, no real idea ;)
19:22:07  <andythenorth> I blame TrueBrain
19:22:55  <andythenorth> hmm have I got town name in scope in text callbacks?
19:22:57  * andythenorth looks
20:07:35  <andythenorth> hmm no town name var :o
20:07:44  <andythenorth> 80+ ? :P
20:08:29  <andythenorth> hmm 84? Town name (text ID)
20:08:39  <andythenorth> or 86? 	Town name parts (for randomly-generated names), bitcoded (no exact information yet)
20:20:58  *** esselfe has quit IRC
20:35:27  *** gelignite has quit IRC
20:54:40  *** Progman has quit IRC
21:03:30  *** Samu has quit IRC
21:11:04  *** sla_ro|master has quit IRC
21:20:05  *** jottyfan has joined #openttd
21:20:37  *** jottyfan has quit IRC
21:42:40  *** nielsm has quit IRC
21:58:29  *** HerzogDeXtEr has quit IRC
22:06:44  *** andythenorth has quit IRC
22:45:16  *** virtualrandomnumber has quit IRC

Powered by YARRSTE version: svn-trunk