IRC logs for #openttd on OFTC at 2019-10-04
            
00:11:50 *** nielsm has joined #openttd
00:24:30 *** DecapitatedO has joined #openttd
00:34:51 *** Thedarkb1-X40 has joined #openttd
00:35:32 *** Wolf01 has quit IRC
00:37:44 *** DecapitatedO has quit IRC
00:47:55 *** arikover has quit IRC
02:05:44 *** DorpsGek_III has quit IRC
02:05:50 *** Pikka has joined #openttd
02:09:25 *** HerzogDeXtEr has quit IRC
02:27:27 *** Thedarkb1-X40 has quit IRC
03:03:10 <Pikka> hmmmmmmmmmmm
03:03:23 <Pikka> who, if anyone, is maintaining grfcodec these days? ;)
03:04:47 <glx> well it's on github
03:05:26 <Pikka> oh, it is too :)
03:15:34 *** Flygon has joined #openttd
03:16:24 *** glx_ has joined #openttd
03:16:24 *** glx is now known as Guest4070
03:16:24 *** glx_ is now known as glx
03:22:56 *** Guest4070 has quit IRC
04:25:01 *** glx has quit IRC
05:47:09 *** Wormnest__ has quit IRC
05:55:20 *** Soni has quit IRC
05:57:02 *** Soni has joined #openttd
06:33:23 *** sla_ro|master has joined #openttd
07:29:32 <Pikka> css for industry window extra text!
07:54:05 *** cHawk- has quit IRC
08:08:08 *** nielsm has quit IRC
08:14:11 *** cHawk has joined #openttd
08:38:23 *** andythenorth has joined #openttd
08:38:25 <andythenorth> yo
08:40:25 <andythenorth> Pikka industries done? :)
08:40:56 <Pikka> pretty much!
08:41:15 <andythenorth> copy-paste
08:41:20 <andythenorth> are there chickens?
08:41:26 <Pikka> I got a first placeholder in and set up the extra window text, so...
08:41:41 <Pikka> no chickens. Vegetarian newgrf!
08:41:55 <andythenorth> 0F 0C 00 0A 10 FF FF
08:43:01 <andythenorth> did a thing https://www.tt-forums.net/viewtopic.php?f=26&t=41607&p=1225818#p1225818
08:43:06 <andythenorth> I don't like gaps in industries
08:43:25 <andythenorth> but I need a lot of separate stations
08:43:54 <Pikka> \2<< 1a 20 \d16 \2+ ... nfo's come a long way ;)
08:44:20 <Pikka> fancy
08:44:33 <andythenorth> add a constant pre-processor and you can also use real words :P
08:44:49 <Pikka> that's crazy talk :)
08:44:56 <andythenorth> HEQS
08:46:37 <andythenorth> really don't like industry gaps though, looks like 2 separate industries :P
08:46:49 <andythenorth> oof
08:47:51 <Pikka> true
08:47:59 <Pikka> especially if you cluster similar industries sometimes
08:48:16 <andythenorth> which I do :P
08:48:57 * andythenorth deletes that code
08:49:02 <andythenorth> no gaps
09:08:01 <Pikka> https://i.imgur.com/Wj9Pols.png
09:08:32 <Pikka> so, industries have mini gs-like "goals" to increase production (or in some cases do other things), is good?
09:09:44 *** HerzogDeXtEr has joined #openttd
09:11:05 <Pikka> along with the limited resources and more complicated feedback chains, trying to make building routes a little less fire-and-forget. Stockpile limits are gone, though, no-one liked those. ;)
09:23:48 <andythenorth> I did the first few games
09:24:04 <andythenorth> it's interesting for a bit to have to find another destination
09:24:39 <andythenorth> it does wear out though :)
09:24:54 <andythenorth> let me know how the level up mechanic goes :)
09:25:00 <andythenorth> been considering it for FIRS
09:30:37 <Pikka> I will. Particularly for gses like silicon valley, I thought it would be nice to have some production increase mechanics other than just expanding the network, innit.
09:31:32 <Pikka> and feedback loops... coalmine feeds powerplant, powerplant powers factory, goods boost coal production, etc
09:34:10 <andythenorth> you doing town registers?
09:34:34 <Pikka> that's the plan. Seems to work well for the houses :)
09:36:09 <andythenorth> such register
09:36:19 <Pikka> wow
09:36:30 <andythenorth> maybe one day FIRS Electricity Edition
09:36:39 * andythenorth got distracted by 16 cargo industries
09:37:01 <andythenorth> very cargoflow
09:37:04 <andythenorth> such in-out
09:37:10 <Pikka> yes
09:37:16 <Pikka> and totally doable in NFO as it turns out
09:37:25 <Pikka> even though grfcodec doesn't like it :)
09:38:11 <andythenorth> is it angry?
09:38:16 <andythenorth> 16 cargos was tested with it :)
09:39:04 <Pikka> it just doesn't know about the properties, or the production callback version. Or anything since 2016 :)
09:44:48 <andythenorth> containers have gone big in straya
09:44:51 <andythenorth> forums says
09:46:21 <Pikka> ew, containers
09:47:32 <andythenorth> I should do more
09:47:48 <Pikka> are they fun to do?
09:49:51 <andythenorth> err
09:49:54 <andythenorth> for a bit yes
09:51:07 <andythenorth> the code makes 300 types of container from 33 templates
09:51:15 <andythenorth> quite lolz
09:55:41 *** WormnestAndroid has quit IRC
10:00:59 *** WormnestAndroid has joined #openttd
10:11:21 <andythenorth> oof, bigger station catchments?
10:11:31 <andythenorth> can't get enough stations around industries
10:11:43 *** Samu has joined #openttd
10:17:00 <Pikka> one for each cargo?
10:17:36 <andythenorth> pretty much
10:19:07 <andythenorth> https://dev.openttdcoop.org/attachments/download/9502/station_catchment_2.png
10:19:34 <andythenorth> one dropoff for all cargos, but pickup needs split
10:19:46 <andythenorth> for routing, cdist and station cargo display reasons
10:21:03 <andythenorth> oh that screenshot has a problem
10:21:06 <andythenorth> no zellepins
10:37:34 *** andythenorth has quit IRC
10:55:09 *** WormnestAndroid has quit IRC
11:01:08 *** andythenorth has joined #openttd
11:08:31 <Pikka> yes
11:09:21 *** WormnestAndroid has joined #openttd
11:20:59 *** Arveen has quit IRC
11:26:45 *** Etua has joined #openttd
11:39:31 *** Samu has quit IRC
11:57:21 *** tokai|noir has joined #openttd
11:57:21 *** ChanServ sets mode: +v tokai|noir
12:04:01 *** tokai has quit IRC
12:07:32 *** Pikka has quit IRC
12:12:39 *** Arveen has joined #openttd
14:30:54 *** Etua has quit IRC
15:23:11 *** nielsm has joined #openttd
15:35:41 <supermop_work> hello
15:37:07 <andythenorth> yo
15:42:08 <nielsm> yollo
15:56:40 <andythenorth> nielsm: was it you who suggested making smaller block layouts for industries, and repeating them in different configurations? o_O
15:56:58 <nielsm> yes
15:57:14 <andythenorth> I'm going to try it compile-side in newgrf
15:57:59 <andythenorth> I can make an (x, y) tile transposer for sub-layouts
15:58:01 <nielsm> generating a large number of layouts from smaller elements?
15:58:04 <andythenorth> yes
15:58:08 <nielsm> yeah might be interesting
15:58:14 <andythenorth> probably negatively affects compile time
15:58:18 <andythenorth> but I think it's interesting
15:58:36 <nielsm> I don't think ottd is tested with industries with a large number of layouts
16:03:29 * andythenorth considers
16:03:32 <andythenorth> 4 coast directions
16:03:39 <andythenorth> 4 layouts for each
16:03:46 <andythenorth> not too bad
16:12:12 <peter1138> Was it lunch?
16:12:25 <peter1138> Was it NewGRF docks?
16:12:32 <peter1138> Or some kinda of state machine.
16:44:05 *** Wormnest__ has joined #openttd
16:48:39 *** Flygon has quit IRC
16:53:40 <andythenorth> well
16:53:48 <andythenorth> there was lunch
16:53:55 <andythenorth> docks on flat ground would be nice
16:54:01 <andythenorth> docks on water maybe also
16:54:18 * andythenorth considers the canal hack for that though
16:54:40 <andythenorth> maybe I'm ass backwards
16:54:48 <andythenorth> the dock's always on water, no?
16:54:49 <andythenorth> silly andythenorth
16:59:50 <peter1138> Don't be silly.
17:00:25 <andythenorth> I should go back to GDPR and stuff
17:00:33 <andythenorth> :P
17:00:49 *** Samu has joined #openttd
17:14:30 *** Etua has joined #openttd
17:14:56 *** Progman has joined #openttd
17:25:27 *** Etua has quit IRC
17:32:32 *** Etua has joined #openttd
17:32:40 *** frosch123 has joined #openttd
17:32:45 *** Etua has quit IRC
17:47:01 <nielsm> andythenorth: https://wiki.openttd.org/User:Nielsmh/Industry_procedural_layouts
17:47:10 <nielsm> there's something I wrote just now
18:02:40 <andythenorth> nielsm: looks interesting, I am about to go afk
18:03:39 <andythenorth> BIAB :)
18:03:40 *** andythenorth has left #openttd
19:17:52 *** Kitrana has joined #openttd
19:20:37 <Kitrana> so question about station ratings. it says it the percentage is rating/255 does that mean that if your station rating is 255 that you are getting 1% of the cargo?
19:23:12 <_dp_> Kitrana, 255 is 100%
19:26:12 <nielsm> one percent is 0.01
19:26:20 <nielsm> hundred percent is 1.00
19:26:34 <Kitrana> thanks
19:42:44 *** glx has joined #openttd
19:42:44 *** ChanServ sets mode: +v glx
19:45:47 *** DorpsGek_III has joined #openttd
19:45:48 <DorpsGek_III> [OpenTTD/OpenTTD] DorpsGek pushed 1 commits to master https://git.io/JecxB
19:45:49 <DorpsGek_III> - Update: Translations from eints (by translators)
19:51:50 *** Wolf01 has joined #openttd
20:03:28 *** gelignite has joined #openttd
20:10:31 <nielsm> okay let's see how much this explodes
20:10:37 *** andythenorth has joined #openttd
20:12:05 <andythenorth> nielsm: the distance between sub-layouts is delegated to OpenTTD? o_O
20:12:19 <nielsm> maybe
20:13:37 <nielsm> hmm https://0x0.st/zwbk.png
20:14:20 <andythenorth> on the one hand I feel this can already be done in newgrf spec
20:14:33 <andythenorth> especially if I write a python layout generator
20:14:36 <andythenorth> on the other hand
20:15:05 <andythenorth> it's a lot of work for every industry, and FIRS has 88 industries
20:15:18 <andythenorth> and not every newgrf author can write a layout generator
20:15:47 <andythenorth> and compile time
20:16:01 <nielsm> and resulting bloat
20:16:29 <andythenorth> possibly this approach would even reduce current layout definitions
20:17:35 <andythenorth> related https://www.tt-forums.net/viewtopic.php?f=26&t=41607&start=4460#p1225818
20:17:58 <andythenorth> I'm trying to figure out bigger industries, because https://dev.openttdcoop.org/attachments/download/9502/station_catchment_2.png
20:18:13 <andythenorth> with 4 or 5 output cargos, I need 4 or 5 pickup stations :D
20:18:31 <nielsm> heh
20:19:42 <nielsm> yeah if e.g. a port like that had the main building on a shoreline, and then a bunch of auxillary buildings on the land behind it, it'd be easier to catch with more stations
20:20:15 <andythenorth> yes
20:20:32 <andythenorth> I tried that though, something is problematic with having buildings on water and on land
20:20:37 <andythenorth> I can't get it to build at all
20:20:52 <andythenorth> I didn't read the spec properly for 'build on water' yet :P
20:21:32 <andythenorth> prop 1A bit 2
20:21:54 <nielsm> right now I'm trying to "clean up" the industry tile layout code to use C++ containers instead of raw pointers and implicit arrays
20:22:02 <andythenorth> housekeeping :)
20:22:11 * andythenorth explores industry_cmd.cpp
20:22:23 <andythenorth> I've spent more time in that file than all the rest of openttd src combined :P
20:22:25 <nielsm> seems to "almost work", except I got a memory allocator bugcheck error on exit
20:22:37 <nielsm> so something might have attempted to free() memory belonging to a std::vector
20:24:29 <andythenorth> L1438, seems that if industry sets water check, tile needs to be flat and water
20:24:29 <nielsm> now to test whether it can load and place some FIRS, ECS, or other industries :D
20:24:37 <andythenorth> wonder how I'm doing coast slopes :P
20:25:34 <andythenorth> heh, not sure I'll ever learn to read C++ fluidly :)
20:25:58 <nielsm> line 1453
20:26:33 <Eddi|zuHause> coast slopes are tiles that are water and not flat
20:26:42 <andythenorth> yes
20:26:58 <andythenorth> ok so if the industry water flag is set, non-water tiles aren't possible
20:27:04 <Eddi|zuHause> well, they could be river slopes
20:27:18 <andythenorth> hah there is a FIRS bug someone showed me with that
20:27:23 <andythenorth> can't remember the case
20:27:42 <andythenorth> but there's a configuration with a lake behind a coast, that causes ports to be build facing inland
20:27:43 <Eddi|zuHause> there's a water class you probably can check
20:27:51 <nielsm> this does not look like a map with FIRS... https://0x0.st/zwbC.jpg
20:28:04 <andythenorth> that is not a recent FIRS :)
20:28:30 <nielsm> every industry is an iron ore mine
20:28:51 <nielsm> it does actually have the FIRS logic, it's just there are no other industry types built
20:29:00 <Eddi|zuHause> clustering going overboard?
20:30:34 <nielsm> nope, just every other industry type fails with no reason
20:30:43 <nielsm> "cannot construct this industry here..." and nothing more
20:31:56 *** microman has joined #openttd
20:33:22 *** m1cr0m4n has quit IRC
20:35:09 *** Kitrana has quit IRC
20:35:43 *** Kitrana has joined #openttd
20:37:14 <nielsm> okay looks like most industry types get zero layouts, so I made an oops in the newgrf parsing code
20:41:06 *** Kitrana1 has joined #openttd
20:41:27 <nielsm> aaaahhhhh
20:41:31 <nielsm> silly mistake
20:43:27 <nielsm> was validating the layouts wrong so every layout got rejected
20:43:46 *** Kitrana has quit IRC
20:45:09 *** Kitrana has joined #openttd
20:45:23 <nielsm> and I know what's going wrong with the memory allocators
20:47:06 <DorpsGek_III> [OpenTTD/OpenTTD] LordAro updated pull request #7726: Prepare for 1.10.0-beta1 release https://git.io/fjjht
20:49:48 <nielsm> LordAro: merge conflicts in known-bugs.txt
20:50:01 <LordAro> but i rebased onto master...
20:50:17 <nielsm> you left merge conflict text in
20:50:19 <Eddi|zuHause> you didn't properly update master?
20:50:30 <LordAro> oh
20:50:31 <LordAro> lol.
20:50:37 <LordAro> it only told me about changelog!
20:50:53 <LordAro> CONFLICT (content): Merge conflict in known-bugs.txt
20:50:54 <LordAro> oh wait
20:50:58 <LordAro> i just didn't read it
20:51:44 *** Kitrana2 has joined #openttd
20:52:11 *** Kitrana1 has quit IRC
20:52:32 <DorpsGek_III> [OpenTTD/OpenTTD] LordAro updated pull request #7726: Prepare for 1.10.0-beta1 release https://git.io/fjjht
20:55:11 <DorpsGek_III> [OpenTTD/OpenTTD] LordAro updated pull request #7726: Prepare for 1.10.0-beta1 release https://git.io/fjjht
20:56:34 *** Kitrana has quit IRC
21:04:14 <nielsm> inline auto _Unfancy(_Ptrty _Ptr) { // converts from a fancy pointer to a plain pointer
21:04:16 <Kitrana2> what exactly does current useage in vehicle lists mean?
21:04:38 <nielsm> Kitrana2: average full-ness out of total capacity
21:04:46 <nielsm> cargo capacity
21:05:35 <Kitrana2> ah
21:05:45 <Kitrana2> i can;t ever seem to get mine above 50 for boats
21:06:09 <nielsm> if they're going full one way and empty the other, about 50% usage sounds right
21:06:56 <Kitrana2> thanks
21:18:15 <nielsm> ugh all this memset and memcpy is making std containers unhappy
21:18:58 <nielsm> this looks much more like it yes: https://0x0.st/zwcA.jpg
21:20:59 <andythenorth> such a retro FIRS :)
21:21:05 <andythenorth> also \o/
21:21:19 <nielsm> gotta start with something simple!
21:23:32 <nielsm> now let's try with ECS
21:23:46 <nielsm> :( https://0x0.st/zwca.png
21:25:01 <glx> ECS has many silly requirements
21:25:14 <glx> worse being tourist centers
21:25:21 <glx> *worst
21:25:33 <nielsm> yeah I see some bauxite mines here that fit to specific slopes
21:31:11 <andythenorth> there was an idea about industries terraforming specific slope configurations
21:31:15 <andythenorth> but I think it's overkill :)
21:37:19 *** WormnestAndroid has quit IRC
21:37:49 *** WormnestAndroid has joined #openttd
21:39:17 <LordAro> nielsm: that does not seem like a nice function
21:46:23 <nielsm> microsoft STL is not very nice
21:48:11 <DorpsGek_III> [OpenTTD/OpenTTD] nielsmh opened pull request #7759: Codechange: Use std::vector for industry tile layouts https://git.io/Jecjs
21:51:48 <glx> haha I like the last sentence :)
21:54:42 <nielsm> it seems ECS agricultural is the one causing problems
21:56:06 <nielsm> but may/may not relate to the missing industry name in "failed to place" errors
21:58:46 <glx> some newgrf can provide incorrect string args, we added checks for some of them but it's hard to be complete
22:09:46 <glx> maybe similar to https://github.com/OpenTTD/OpenTTD/pull/7419 but for industries name
22:10:31 <nielsm> it happens even with default industries
22:10:40 <nielsm> e.g. forests on arctic maps without snow
22:12:29 *** Wormnest__ has quit IRC
22:21:35 <nielsm> okay the (undefined string) problem seems to be probably not related to my changes
22:22:01 <glx> launched msvc to try :)
22:22:03 <nielsm> since with the arctic forest, I can trace it first formats the string correct twice, then a third time does it wrong
22:22:27 <nielsm> and I'm not sure I understand why it needs to format the same string three times or more for a single use
22:22:42 <glx> just need arctic with no snow ?
22:22:58 <nielsm> yeah arctic and not hilly
22:23:38 <glx> I think one of the format call is to determine the string size
22:23:57 <glx> there's one for the actual drawing too
22:24:36 <DorpsGek_III> [OpenTTD/OpenTTD] nielsmh updated pull request #7759: Codechange: Use std::vector for industry tile layouts https://git.io/Jecjs
22:25:33 <glx> I should clean my newgrf dir someday, starting openttd is so slow
22:25:48 <nielsm> yep same bug in master
22:25:52 <nielsm> (undefined string)
22:25:57 <nielsm> haha yes
22:28:22 <glx> yeah (undefined string) without crash
22:29:49 <Eddi|zuHause> "also works [...] when it doesn't crash". tautologies are being tautological today.
22:30:25 <nielsm> Eddi|zuHause: it could produce errors that are not crash errors
22:30:29 <nielsm> or other incorrect behaviour
22:32:54 <DorpsGek_III> [OpenTTD/OpenTTD] nielsmh commented on pull request #7759: Codechange: Use std::vector for industry tile layouts https://git.io/JeCe8
22:33:00 *** sla_ro|master has quit IRC
22:58:37 <glx> in the console the error message is correct
22:59:41 <glx> the param disparition seems to happen at error_gui.cpp:423
23:01:17 <glx> hmm a recent change happened it this file IIRC
23:03:04 <glx> anyway ErrorMessageData::ErrorMessageData(const ErrorMessageData &data) feels really wrong
23:04:36 <LordAro> looks like a copy constructor to me
23:05:00 <glx> yes but parameters are not properly copied
23:05:04 <LordAro> ah
23:05:20 <LordAro> i plead ignorance
23:05:33 <glx> not your fault
23:05:51 <glx> if (this->strings[i] != nullptr) {
23:05:51 <glx> this->strings[i] = stredup(this->strings[i]);
23:05:51 <glx> this->decode_params[i] = (size_t)this->strings[i];
23:05:51 <glx> }
23:06:01 <glx> I think I found it :)
23:06:14 <LordAro> ah
23:06:15 <LordAro> lol
23:06:22 <Eddi|zuHause> uh, what?
23:08:45 <glx> let's try with a little codechange
23:20:00 <glx> hmm seems it's finaly related to your change LordAro
23:22:23 <LordAro> it did seem familiar
23:24:09 *** WormnestAndroid has quit IRC
23:24:13 *** WormnestAndroid has joined #openttd
23:25:50 <DorpsGek_III> [OpenTTD/OpenTTD] glx22 opened pull request #7760: Fix 71a3e8346: decode_params need to be copied too https://git.io/JeCvZ
23:26:03 <glx> was easy :)
23:27:05 <LordAro> glx: shouldn't the line in the loop be removed as well?
23:27:18 <glx> no because it updates the pointer
23:27:23 <glx> in the arg list
23:27:36 <LordAro> oh i see
23:27:52 <glx> I first misunderstood that part too :)
23:28:35 <LordAro> it's a bit weird
23:28:42 <LordAro> maybe a comment :)
23:29:10 <glx> the string system is weird ;)
23:29:19 <LordAro> very much so
23:30:15 <glx> but raw strings are stored in strings[] and accessed as decode_params
23:30:24 <nielsm> glx, perhaps use MemCpyT<> instead?
23:30:26 <glx> like other params
23:30:37 <nielsm> or even just assign it in the initializer list?
23:31:52 <glx> hmm looks like this has been discussed in the previous commit too :)
23:31:57 <nielsm> since it's an array and not a pointer, this->decode_params = data.decode_params; ought to work I think
23:32:14 *** WormnestAndroid has quit IRC
23:33:52 *** WormnestAndroid has joined #openttd
23:40:08 <DorpsGek_III> [OpenTTD/OpenTTD] LordAro approved pull request #7760: Fix 71a3e8346: decode_params need to be copied too https://git.io/JeCvK
23:40:41 <glx> nielsm: would be nice if it worked, but it doesn't
23:41:10 <nielsm> :(
23:41:13 <glx> it's a C-style array
23:42:19 <DorpsGek_III> [OpenTTD/OpenTTD] glx22 merged pull request #7760: Fix 71a3e8346: decode_params need to be copied too https://git.io/JeCvZ
23:42:52 <glx> now you can test in your branch :)
23:45:50 <nielsm> fixes (hides?) the ecs agr vector crash too
23:46:14 <nielsm> I should run with extra grf debugging enabled to see if that callback failure logs something else somewhere
23:46:22 <LordAro> error: no match for 'operator<' (operand types are 'std::_Rb_tree_const_iterator<unsigned int>' and 'std::set<unsigned int>::iterator' {aka 'std::_Rb_tree_const_iterator<unsigned int>'})
23:46:29 <LordAro> i love C++
23:46:30 <LordAro> *twitches*
23:47:46 * andythenorth must to sleep :P
23:47:47 <andythenorth> bye
23:47:48 *** andythenorth has quit IRC
23:49:14 <DorpsGek_III> [OpenTTD/OpenTTD] nielsmh updated pull request #7759: Codechange: Use std::vector for industry tile layouts https://git.io/Jecjs
23:49:34 <glx> maybe ECS agr vector generates a custom error message, and as params were not passed...
23:50:16 <nielsm> maybe yes
23:50:29 <nielsm> it was crashing on attempting to utf8 decode a nullptr
23:50:51 <DorpsGek_III> [OpenTTD/OpenTTD] nielsmh commented on pull request #7759: Codechange: Use std::vector for industry tile layouts https://git.io/JeCvy
23:55:25 *** firewire1394 has joined #openttd
23:56:22 <nielsm> sometimes I want a !< operator
23:56:50 <glx> >=
23:56:53 <nielsm> just a different way of spelling >= but sometimes expressing the bounds check better
23:57:22 <nielsm> if (i !< lengthof(thing)) ...
23:57:46 <nielsm> if (!(i < lengthof(thing))) ...
23:59:08 <DorpsGek_III> [OpenTTD/OpenTTD] nielsmh commented on pull request #7759: Codechange: Use std::vector for industry tile layouts https://git.io/JeCvd