IRC logs for #openttd on OFTC at 2019-10-04
⏴ go to previous day
00:24:30 *** DecapitatedO has joined #openttd
00:34:51 *** Thedarkb1-X40 has joined #openttd
03:03:23 <Pikka> who, if anyone, is maintaining grfcodec these days? ;)
03:16:24 *** glx is now known as Guest4070
06:33:23 *** sla_ro|master has joined #openttd
07:29:32 <Pikka> css for industry window extra text!
08:38:23 *** andythenorth has joined #openttd
08:40:25 <andythenorth> Pikka industries done? :)
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: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:33 <andythenorth> add a constant pre-processor and you can also use real words :P
08:46:37 <andythenorth> really don't like industry gaps though, looks like 2 separate industries :P
08:47:59 <Pikka> especially if you cluster similar industries sometimes
08:48:57 * andythenorth deletes that code
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:30 <andythenorth> maybe one day FIRS Electricity Edition
09:36:39 * andythenorth got distracted by 16 cargo industries
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: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:47:32 <andythenorth> I should do more
09:51:07 <andythenorth> the code makes 300 types of container from 33 templates
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: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:55:09 *** WormnestAndroid has quit IRC
11:01:08 *** andythenorth has joined #openttd
11:09:21 *** WormnestAndroid has joined #openttd
11:57:21 *** tokai|noir has joined #openttd
11:57:21 *** ChanServ sets mode: +v tokai|noir
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: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: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:32 <andythenorth> 4 coast directions
16:03:39 <andythenorth> 4 layouts for each
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: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
17:00:25 <andythenorth> I should go back to GDPR and stuff
17:14:56 *** Progman has joined #openttd
17:32:40 *** frosch123 has joined #openttd
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: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:26:20 <nielsm> hundred percent is 1.00
19:45:47 *** DorpsGek_III has joined #openttd
19:45:49 <DorpsGek_III> - Update: Translations from eints (by translators)
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: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:29 <andythenorth> possibly this approach would even reduce current layout definitions
20:18:13 <andythenorth> with 4 or 5 output cargos, I need 4 or 5 pickup stations :D
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: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: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: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:26:33 <Eddi|zuHause> coast slopes are tiles that are water and not flat
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: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: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:43:27 <nielsm> was validating the layouts wrong so every layout got rejected
20:45:09 *** Kitrana has joined #openttd
20:45:23 <nielsm> and I know what's going wrong with the memory allocators
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:37 <LordAro> it only told me about changelog!
20:50:53 <LordAro> CONFLICT (content): Merge conflict in known-bugs.txt
20:50:58 <LordAro> i just didn't read it
20:51:44 *** Kitrana2 has joined #openttd
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: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:18:15 <nielsm> ugh all this memset and memcpy is making std containers unhappy
21:20:59 <andythenorth> such a retro FIRS :)
21:21:19 <nielsm> gotta start with something simple!
21:23:32 <nielsm> now let's try with ECS
21:25:01 <glx> ECS has many silly requirements
21:25:14 <glx> worse being tourist centers
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:10:31 <nielsm> it happens even with default industries
22:10:40 <nielsm> e.g. forests on arctic maps without snow
22:21:35 <nielsm> okay the (undefined string) problem seems to be probably not related to my changes
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: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: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: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: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: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: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:52 <glx> I first misunderstood that part too :)
23:29:10 <glx> the string system is weird ;)
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: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: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:47:46 * andythenorth must to sleep :P
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: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: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
continue to next day ⏵