Config
Log for #openttd on 26th September 2016:
Times are UTC Toggle Colours
00:05:47  *** JezK_ has joined #openttd
00:16:23  *** Pulec has quit IRC
00:19:24  <Samu> somebody please test these for me https://www.tt-forums.net/viewtopic.php?f=33&t=72691&p=1177085#p1177085
00:19:32  <Samu> and tell me what you think
00:22:03  <Samu> reply there on the topic, I'm off to bed now, cyas goodnight
00:22:13  *** Samu has quit IRC
00:26:08  *** Fujk has joined #openttd
00:26:38  <Fujk> on the server2 modpack, which mod is overwriting the snow limit setting? In vanilla I can set it but with the mods on, my setting doesn't matter
00:30:33  <Fujk> Seems to be opengfx landscape
01:04:20  *** glx has quit IRC
01:12:28  *** Fujk has quit IRC
01:31:36  *** JezK_ has quit IRC
01:39:30  *** JezK_ has joined #openttd
01:48:04  *** Supercheese has joined #openttd
02:03:11  *** JezK_ has quit IRC
02:11:11  *** JezK_ has joined #openttd
02:55:31  *** qwebirc73763 has joined #openttd
02:55:46  <qwebirc73763> ok, guys? we have an issue
02:56:06  <qwebirc73763>  are any administrators/ people with the ability to remove a version from the site around?
02:56:47  <qwebirc73763> i thorught it was a false-positive with my Server's virus scanner, but apparently the lastest version (at the LEAST the windows .exe download) is compromised, appears to be a trojan
02:57:05  <qwebirc73763>  according to my sysadmin, it ISNT a false positive, as his machien threw up the following:
02:57:05  <qwebirc73763>  ClamAV     Win.Trojan.Onion-11     20160925 Zillya     Trojan.Onion.Win32.1331     20160924
02:59:20  <qwebirc73763> the detection is the the .exe download for openttd 1.6.1
02:59:26  <qwebirc73763> could a few of you guys please check this?
03:01:32  <qwebirc73763> according to my sysadmin the .zip isnt compromised
03:06:58  <qwebirc73763> erm.. anyone actually online? dont want to sound like a twat, and i know false positives DO happen, but he was VERY sure this was a genuine detection?
03:07:39  <sim-al2> Things take a little while on this channel
03:08:00  <sim-al2> Especially a fairly major report like that
03:08:12  <qwebirc73763> https://www.virustotal.com/en/file/34c75feac87774c548fa718cb1231775f897b79f37491d7a19ec342edd285cef/analysis/1474858434/
03:08:29  <qwebirc73763> fair enough! i just wanted to ensure it was noticed >.>
03:16:34  *** supermop has joined #openttd
03:21:58  <qwebirc73763> test
03:22:07  <sim-al2> hi
03:22:31  *** supermop_ has quit IRC
03:22:38  <sim-al2> Consider the time right now
03:22:51  <sim-al2> It's late on the US east coast, 11pm
03:23:03  <sim-al2> But still early morning in Europe, on a weekday
03:23:30  <sim-al2> That said, I'm sure this will be seen soon
03:34:45  <qwebirc73763> hope so!
03:35:01  <qwebirc73763> ive got two people on my case aobut being unable to update the server >.>
04:51:15  *** keoz has joined #openttd
05:59:07  *** ConductorCat has quit IRC
06:10:42  *** ConductorCat has joined #openttd
06:17:14  *** keoz has quit IRC
06:42:57  *** sim-al2 is now known as Guest141
06:42:58  *** sim-al2 has joined #openttd
06:46:10  *** keoz has joined #openttd
06:49:02  *** Guest141 has quit IRC
07:11:22  *** sla_ro|master has joined #openttd
07:22:39  *** Mavy has joined #openttd
07:39:51  *** Mavy_ has joined #openttd
07:39:51  *** Mavy has quit IRC
07:44:10  *** keoz has quit IRC
07:58:27  *** Stimrol has quit IRC
07:59:36  *** Stimrol has joined #openttd
08:15:37  *** tycoondemon2 has quit IRC
08:18:40  <qwebirc73763> test
08:23:41  *** JezK_ has quit IRC
08:31:27  *** Biolunar has joined #openttd
08:37:25  *** JacobD88 has joined #openttd
09:05:42  *** Supercheese has quit IRC
09:10:44  *** Smedles has quit IRC
09:12:50  *** Wolf01 has joined #openttd
09:13:24  <Wolf01> o/
09:15:28  *** Smedles has joined #openttd
09:42:21  *** tycoondemon has joined #openttd
10:20:18  *** Flygon has quit IRC
10:20:34  *** Flygon has joined #openttd
10:29:24  *** Flygon_ has joined #openttd
10:36:02  *** Flygon has quit IRC
10:49:19  *** Flygon_ has quit IRC
10:50:58  *** Flygon has joined #openttd
11:37:46  *** Fujk has joined #openttd
11:38:14  <Fujk> is it possible to put newgrfs in the openttd directory somewhere instead of in My Documents?
11:40:05  <V453000> yeah
11:40:30  <V453000> I think you just copy your openttd.cfg into the openttd directory
11:40:35  <V453000> and it will make it "portable"
11:40:43  <V453000> - everything is within the folder
11:41:13  *** Lejving has joined #openttd
11:43:35  <Fujk> nice thanks
11:43:44  <V453000> yw
12:04:38  *** sla_ro|master has quit IRC
12:24:11  <Wolf01> \o/ sorted all the uncategorized games on my steam library
12:49:39  <V453000> \o/ wrote my first python script
12:49:43  <V453000> world is going to burn soon
12:50:25  <goodger> doombringer.pyc
12:54:41  *** nilez has quit IRC
12:55:11  *** nilez has joined #openttd
12:56:09  <V453000> goodger: well it is called RenamingAndCropping, but it is just a camouflage name, the actual purpose is doombringing indeed
12:56:38  <goodger> you just need a touchofhate.pyc and you're set
13:09:16  *** Samu has joined #openttd
13:14:17  <Eddi|zuHause> V453000: wouldn't be the first program that does something completely different than what it's called :p
13:16:31  <V453000> haha
13:17:20  <Samu> hi
13:17:43  <Samu> i'm trying to code the auto-lock a bit differently
13:18:42  <Samu> did anyone tried it?
13:19:06  <Samu> I see 2 downloads :(
13:19:15  <Samu> https://www.tt-forums.net/viewtopic.php?p=1177085#p1177085
13:25:23  *** Gja has joined #openttd
13:30:56  *** Lejving has quit IRC
13:50:53  <supermop> good morning
14:16:42  *** Alberth has joined #openttd
14:16:42  *** ChanServ sets mode: +o Alberth
14:25:52  <Alberth> moin
14:26:59  <V453000> yo
14:42:24  *** ToBeFree has quit IRC
15:11:21  *** sla_ro|master has joined #openttd
15:13:45  *** keoz has joined #openttd
15:17:55  *** Flygon has quit IRC
15:19:57  *** ToBeFree has joined #openttd
15:38:45  *** Lejving has joined #openttd
15:45:55  *** TheMask96 has quit IRC
15:51:43  *** TheMask96 has joined #openttd
15:55:07  <Samu> The auto-lock code done in another manner: https://paste.openttdcoop.org/pjtgnjoan
15:55:22  <Samu> i am wondering if i can avoid repetition
15:55:57  <Samu> it repeats at lines 86-89 and 95-98
15:59:51  <Alberth> you have the execution in the tile area loop together with the test?
16:00:04  <Alberth> that looks like a bad idea
16:00:37  <Alberth> you want a partial build lock when it fails a test somewhere in the middle of the iteraions?
16:05:24  <Alberth> line 68 doesn't seem needed?   rem is  always >= 0   ?
16:06:06  <Samu> it can be rem = -1
16:06:37  <Samu> rem = -1 can be defined before entering the loop
16:07:42  <Alberth> right, I see that now
16:08:19  <Alberth> doing the EXEC case after the complete test succeeded is a good idea at least
16:08:53  <Alberth> and then you can earlier do   if (rem < 0) continue;
16:09:25  <Alberth> wc == WATER_CLASS_CANAL   <-- you do that test quite often too, maybe test for that earlier?
16:11:33  <Samu> it's complicated, I'm dealing with 3 water classes
16:11:34  <Alberth> line 66, the "else" is not needed, since the "then" before jumps back to the loop
16:12:32  <Alberth> I don't see any trivial ways to improve at least
16:14:03  <Alberth> you can move some code though, line 51  slope_next doesn't seem needed immediately, maybe you can move it closer to first use?
16:14:54  <Samu> placing RIVER or SEA in single line mode shall not try to build lock
16:15:13  <Samu> must needs to check if the tile is clear
16:15:43  <Alberth> IsInclinedSlope(slope)  <- line 69, is that needed, it got shot down at line 53 already?
16:17:26  <Samu> line 53 ensures that the slope is either flat or inclined, i thnk
16:17:48  <Samu> or am i seeing it wrong?
16:18:44  <Fujk> is it possible to refit one car, so a train can hold two different cargo with two cars? I can only seem to refit the entire train
16:19:13  <Samu> line 69 wants to ensure the tile is not the flat one
16:23:05  <Samu> [17:00] <@Alberth> you want a partial build lock when it fails a test somewhere in the middle of the iteraions
16:23:08  <Samu> what does this mean?
16:24:02  <Samu> ah, build up to a point where it succeeds?
16:24:10  <Samu> and stop building the part it fails?
16:25:06  <Samu> i'd like to have that, similar to how roads and rails are built
16:25:15  <Samu> but i don't know how to do it
16:26:22  <Samu> currently if it fails at some point, nothing is ever built
16:29:22  <Samu> slope_next is first used at line 63, ok i can move that
16:34:19  <Alberth> Fujk:  in the refit window you can select a wagon, or a part of the train
16:35:53  <Alberth> Samu: basically while you test, you change the command such that you'll only build the part that works
16:36:12  <Alberth> that also means you give a cost that fits what you build
16:36:51  <Alberth> if you also have EXEC, in the next loop you perform the modified command, which will completely work, since you modified it
16:37:59  <Alberth> you can even do it in 3 steps, first change the command to the part that works, then do the test and cost estimation, and if you have EXEC, the third step is to actually build it
16:40:52  <Alberth> Samu: line 69 wants to ensure the tile is not the flat one  <-- ah, you're correct there, misread line 53
16:48:38  <Wolf01> Is it possible to identify a tree type?
16:49:03  <Wolf01> Between 0x00 and 0x0C
16:52:00  *** qwebirc73763 has quit IRC
16:53:03  *** glx has joined #openttd
16:53:03  *** ChanServ sets mode: +v glx
17:01:05  <Samu> i see a way to put the bool water outside
17:07:39  <Wolf01> Also, how do I add a setting?
17:07:50  <Wolf01> Looks like automated now
17:09:39  <Samu> speaking of setting
17:09:56  <Samu> i wonder if permanent rivers could be a game setting
17:10:46  <Samu> some ppl might not like the idea of permanent rivers
17:11:20  <Samu> allow it to be disabled or enabled through a setting
17:13:00  <Alberth> Wolf01: setting specifications are in src/table/*.ini  files
17:18:50  <Alberth> tree_gui.cpp suggests there are more trees in-between   this->tree_to_plant = (TreeType)(this->base + widget - WID_BT_TYPE_11);
17:20:09  <Wolf01> Yup, but I would like to know if a tree is a deciduous or an evergreen one
17:20:35  <Alberth> static TreeType GetRandomTreeType(TileIndex tile, uint seed)  does it too  tree_cmd.cpp
17:20:36  <Wolf01> And since I think trees can have avery kind of graphic they want, they could differ from set to set
17:20:47  <Alberth> that seems likely indeed
17:21:01  <Wolf01> So I'll plant artic trees as evergreen ones
17:21:25  <Wolf01> The main problem is that I found a case where if I return TREE_INVALID it plants cactus
17:22:15  <Wolf01> Also, do I need to do some saveload - after load preparation for new settings?
17:22:55  <Alberth> GRFspecs also say nothing about trees
17:23:15  <Eddi|zuHause> no, afterload is only if you change a setting, not if you add new ones
17:23:37  <Alberth> you'll get the default value I would expect
17:23:52  <Eddi|zuHause> yeah
17:24:46  <Wolf01> That's because I get strange values as default, I put 0..16 with 16 and 8 as defaults for my settings, the value should be SLE_UINT8 but in the interface I get a date
17:25:07  <Wolf01> And the game crashes
17:25:29  <Eddi|zuHause> you also need to change settings_gui stuff
17:25:40  <Eddi|zuHause> to add your setting to the list
17:25:47  <Wolf01> Yeah, done that
17:25:50  <Eddi|zuHause> and have a properly formatted string
17:26:05  <Eddi|zuHause> gtg
17:26:09  <Wolf01> genworld->Add(new SettingEntry("game_creation.evergreen_min_height"));
17:29:16  <Wolf01> Now I get "valuables" and "mail"
17:31:11  <Wolf01> Btw, the result is pleasing
17:31:46  <Wolf01> Maybe too "exact" I should give a bit of randomness
17:40:12  *** frosch123 has joined #openttd
17:40:57  <Wolf01> Quak
17:44:11  *** aard has joined #openttd
17:46:03  <Wolf01> https://1drv.ms/i/s!AgUFeOGLNNfVhcgfYqGlZdsBI7EZYw what do you think?
17:46:34  <frosch123> moi
17:47:32  <Samu> which trees should i look at?
17:47:32  <Wolf01> Dinner, bbl
17:47:45  <Wolf01> The whole screen?
17:48:27  <Samu> i see similar trees around the mountain, but not anywhere else
17:49:58  *** gelignite has joined #openttd
17:50:24  <frosch123> is that terraform without clearing trees?
17:52:04  <Samu> min height for evergreen trees, i thnk
17:55:01  *** Arveen has joined #openttd
18:00:46  *** Progman has joined #openttd
18:02:22  *** HerzogDeXtEr has joined #openttd
18:10:14  <Samu> https://paste.openttdcoop.org/pb70f60wf - slight improvements
18:12:09  <Samu> bool water is not repeated
18:12:19  *** Mavy_ has quit IRC
18:12:22  <Samu> some extra comments
18:12:50  <Samu> and a int tile_delta just before building lock
18:13:31  *** Mavy has joined #openttd
18:16:56  <Wolf01> <Samu> min height for evergreen trees, i thnk <- that, also "no trees above x height"
18:17:53  <Wolf01> Btw is more "min trees for arctic trees"
18:17:55  <Wolf01> :P
18:18:03  <Wolf01> *min height
18:18:37  <Wolf01> And a bit of randomness of the height
18:18:56  <Wolf01> So it's not a straight line
18:21:30  <Samu> hey, while you're on the matter of trees
18:21:50  <Samu> there's a strange tree growth behaviour on desert tileset, on coastal tiles
18:22:00  <Samu> they spawn too often there
18:22:15  <Wolf01> Usually trees spawn near water
18:22:26  <Samu> oh, okay then
18:22:54  <Wolf01> It's not that they grow too often there, is that they can't grow often enough anywhere else
18:23:45  <Samu> sec, i make a screnshot
18:24:15  <Wolf01> Mmmh, settings don't work, maybe I'm stupid enough
18:25:57  <Wolf01> At least now I got "undefined string" and the right widgets to select numbers
18:26:09  <Samu> http://imgur.com/a/uhwl1 - i generated a random scenario without trees, then fast forwarded for a bit and trees start spawning. the growth towards the north coast is different than the growth at the south coast.
18:26:35  <Wolf01> It looks realistic to me
18:27:03  <Wolf01> Maybe more trees along rivers would be cool
18:27:24  <Samu> don't you find odd that the north coast gets trees and the south doesn't?
18:28:00  <Wolf01> Different latitude?
18:28:53  *** andythenorth has joined #openttd
18:28:55  <andythenorth> o/
18:29:06  <Wolf01> Btw, I find strange that I don't see any cactus
18:29:08  <Wolf01> o/
18:29:44  *** keoz has quit IRC
18:30:51  *** JacobD88 has quit IRC
18:48:29  <andythenorth> cat cat
18:51:14  *** FLHerne has joined #openttd
18:57:08  <Wolf01> Should evergreen trees height be clamped to snow line height?
19:04:07  <Wolf01> I really don't get the settings
19:04:39  <V453000> andythenorth: fear my shit
19:04:44  <V453000> coded my first python script today
19:04:58  * andythenorth much fear
19:06:50  <Fujk> is there a mod that reduces tree spawning? both options spawn way too many
19:07:18  <Wolf01> No, but you can make them invisible
19:12:41  <andythenorth> V453000: eh, BRIX http://www.railpictures.net/photo/590553/
19:12:51  <andythenorth> Czech also even
19:13:02  <V453000> heh
19:13:03  <V453000> noep
19:13:25  <andythenorth> front looks badass
19:15:31  <Wolf01> Grrrrr.... how does this thing works?
19:16:30  *** aard has quit IRC
19:16:30  <V453000> yarr andythenorth
19:17:20  *** luca768 has quit IRC
19:21:05  <Samu> hmm MakeLock, will bring it back
19:24:33  <Wolf01> Alberth, do you know how this settings stuff works?
19:25:04  <Alberth> somewhat, I wrote the generator :p
19:25:21  <Alberth> but it got modified afterwards :p
19:25:50  <Wolf01> It still prints "(undefined string)"
19:26:14  <Alberth> iirc it has help strings etc
19:26:16  <Wolf01> An if I click on it I get a "17" as value instead of 24
19:26:23  * andythenorth puzzles over cdist
19:26:37  <Alberth> did you run the generator after modifying?
19:26:46  <Alberth> should run by itself though
19:26:51  <andythenorth> I have transfer stations, to which I’ve added new destinations
19:27:03  <Wolf01> It should run automatically, I can see the modified values on settings.h
19:27:14  <andythenorth> and it would be nice if cargo was allocated to those destinations
19:27:15  <Alberth> ok, so that works
19:27:29  <Alberth> andythenorth: further away than the others?
19:27:35  <andythenorth> closer
19:27:47  <andythenorth> but distance effect is 0% anyway
19:27:57  <Wolf01> https://paste.openttdcoop.org/p5ytag0br these are the 2 settings I added
19:28:09  <Alberth> hmm, maybe that's the problem andy :p
19:28:10  <andythenorth> maybe the graph is being calculated too aggressively
19:28:27  <Alberth> but computation takes time, and then new cargo must arrive there, before you see the effect
19:29:04  <Alberth> strings are also in the language files?
19:29:13  <Wolf01> Yup
19:29:13  <Alberth> they have been rebuilt too?
19:29:16  <Wolf01> Yes
19:29:18  <Wolf01> I see them
19:29:30  <andythenorth> ran a vehicle over the route, that seemed to trigger a recalculation
19:29:40  <andythenorth> unless it was a coincidence
19:29:56  <andythenorth> afaik, with distance effect 0%, the demand is levelled over all valid destinations
19:30:10  <andythenorth> so cargo should be split 50% to each (there are 2)
19:31:10  <andythenorth> I have both recalculation props set to default
19:31:41  <Alberth> Wolf01: you can have a look at the generated code, but that likely works too, as stuff compiles
19:31:57  <Alberth> afaik "(undefined string)" is a runtime thingie
19:32:20  <Alberth> perhaps put a break point there, and see what it's doing at that time?
19:32:36  <Wolf01> I found some particular threatment for other values, but mine is just numeric
19:32:50  <Alberth> ie maybe it does some weird calculation that you messed up now
19:32:56  <Wolf01> Maybe I have the wrong string, I put {STRING2}
19:33:19  <Alberth> that eats 2 arguments, iirc
19:33:32  <Samu> static inline void MakeLock(TileIndex t, Owner lock_owner, Owner canal_owner_lower, Owner canal_owner_upper, Owner canal_owner_middle, DiagDirection d, WaterClass wc_lower, WaterClass wc_upper, WaterClass wc_middle)
19:33:37  <Samu> too big
19:33:46  <andythenorth> game appears to recalculate link graph within 1 game month or less
19:34:06  <Wolf01> I copied from "river_amount" which is the setting just above mine
19:34:17  <Alberth> Samu: make a struct
19:34:38  *** Chaoticly has joined #openttd
19:34:51  <andythenorth> ha ha
19:34:58  <andythenorth> FIRS builds petrol stations next to roads
19:35:03  <andythenorth> but also next to tram tracks :P
19:35:09  <sim-al2> yep
19:35:22  <sim-al2> Dem gas trams would be happy
19:35:31  <andythenorth> $someone should fix that
19:35:36  <Samu> currently canal_owner_middle is the same as lock_owner, since it's not possible to build "canal"  on slopes
19:35:43  <sim-al2> Seems like a fire hazard for steamers though 0.o
19:35:59  <sim-al2> *explosion sounds*
19:36:12  <Samu> unless someone hacks
19:36:54  <Alberth> Wolf01: they all do it, so that seems fine, maybe it uses the wrong sub-string or so?
19:37:02  <Wolf01> Could be
19:37:17  <Samu> static inline void MakeLock(TileIndex t, Owner lo, Owner co_lower, Owner co_upper, DiagDirection d, WaterClass wc_lower, WaterClass wc_upper, WaterClass wc_middle)
19:37:17  <Wolf01> But I don't know where I should change
19:37:37  <Wolf01> Other settings seem only have the world generation gui in common
19:37:39  <Alberth> set a break point on undefined string, that should give you a stack trace
19:39:19  <Alberth> strings.cpp  lines  220 and 263 look promising
19:39:40  <Alberth> but I didn't check context
19:40:27  <Alberth> or maybe even on painting the widget, but that's a bit tricky perhaps
19:45:11  *** Arveen has quit IRC
19:48:19  <Samu> my lock https://paste.openttdcoop.org/pfyqwplu1
19:48:35  <Samu> original lock https://hg.openttd.org/trunk.hg/file/d1ee3e5330e5/src/water_map.h#l440
19:49:43  <Samu> water_map.h also has the canal owner stuff
19:49:50  <Samu> dunno if i post that
19:50:51  <Samu> oops, description is missing something
19:51:43  <Samu> https://paste.openttdcoop.org/pqyyrmave better
19:52:31  <Samu> MakeLockTile(t, lo, lo, LOCK_PART_MIDDLE, d, wc_middle);
19:52:36  <Samu> lo lo lo
19:53:20  <Wolf01> Ok, min=1, max=32, default=0x00000018, str_val=0
19:54:42  <Wolf01> It looks normal
19:55:39  <Wolf01> Default not really normal, it should be 24
19:55:43  <Samu> MakeLock(tile, _current_company, oc_lower, oc_upper, dir, wc_lower, wc_upper, wc_middle);
19:55:50  <Samu> not too big as I expected
19:56:12  <Samu> this means I don't need oc_middle for anything
19:56:15  <Samu> time to remove
20:01:08  <Samu> question, why is there a DoBuildLock and a CmdBuildLock? why not combine both in CmdBuildLock?
20:01:42  <Alberth> Wolf01:  0x18 == 24
20:02:14  <Wolf01> Oh, yes, hex
20:02:22  <Alberth> Samu: likely DoBuild gets used elsewhere
20:03:05  <Samu> DoBuildLock depends on CmdBuildLock as far as I understand
20:03:35  <Alberth> you've looked 100% longer at that code than I have :)
20:03:40  <Wolf01> Still wrong value, read from "int32 value = (int32)ReadValue(var, sd->save.conv);" is 17
20:04:15  <Alberth> hmm, incremented savegame number?
20:04:19  <Wolf01> Yes
20:04:33  <Samu> feels like DoBuildLock is the continuation of CmdBuildLock, was split into 2 functions, but why? :(
20:04:46  <Wolf01> Nothing in openttd.cfg
20:04:59  <Samu> brb searching
20:05:14  <Wolf01> I'm on title menu, so it might be the title game
20:05:17  <Alberth> you need a successful exit for openttd.cfg update
20:06:05  <Samu> Find all "DoBuildLock", Find Results 1, Entire Solution, ""   D:\OpenTTD\trunk\src\water_cmd.cpp(361):static CommandCost DoBuildLock(TileIndex tile, DiagDirection dir, DoCommandFlag flags)   D:\OpenTTD\trunk\src\water_cmd.cpp(553):	return DoBuildLock(tile, dir, flags);   Matching lines: 2    Matching files: 1    Total files searched: 1052
20:06:09  <Wolf01> Also, 17 is a good value, it can go from 1 to 32
20:07:14  <Samu> i'm gonna move DoBuildLock into CmdBuildLock, then get rid of DoBuildLock, see what happens
20:07:51  <Wolf01> I think the "ResolveVariableAddress returns the wrong variable
20:09:25  <Alberth> :o newgrf stuff?
20:09:49  <Alberth> did some refactoring there, but can't say I understand what it does
20:10:12  *** Chaoticly has left #openttd
20:10:32  <Alberth> although it would open the option to add nifty new features :p
20:12:55  <Alberth> hmm, typing "git" when you mean "hg" isn't a good thing :p
20:13:19  <Wolf01> I really can't understand, it looks right until DrawString()
20:13:50  <Wolf01> I'm debugging on the DrawSetting
20:14:22  <Alberth> so it might be STRING2  after all?
20:14:35  <Wolf01> It's the same in "snow_line_height"
20:14:42  <Wolf01> But there it works
20:15:17  <Alberth> sorry, I have no idea either
20:15:54  <Samu> it works! can compile
20:16:01  <Wolf01> strval   = STR_JUST_INT
20:16:08  <Wolf01> Maybe it will do the trick?
20:16:52  <Wolf01> Yup, it does
20:17:14  <Wolf01> I can't understand the wrong default values
20:17:35  <Wolf01> Should be 24 and 16, I got 17 and 10
20:17:51  <Wolf01> Are they hex?
20:19:27  <andythenorth> bah
20:19:37  <andythenorth> my Sam plan doesn’t survive first gameplay test :P
20:21:25  <Samu> I killed a function and the game still compiles :)
20:21:38  <Samu> RIP DoBuildLock
20:23:51  <Samu> i also killed MakeLock the other day, but now I brought it back, makes more sense to have it
20:24:01  <Samu> for reading purposes
20:25:28  <andythenorth> 240t and 576t ships work fine
20:25:46  <andythenorth> but I want more 100t types - tanker, reefer etc, not just a generic multi-purpose 100t freighter
20:26:04  <andythenorth> especially for secondary or tertiary cargos, which are available in smaller amounts than primary
20:26:13  <peter1138> hmm
20:26:23  <peter1138> should i dust off my dev environment?
20:26:39  <andythenorth> you’re going to make ship newgrf? o_O :P
20:27:41  <Alberth> nah, just add more patches to the collection :)
20:28:18  * andythenorth made a patch once
20:28:57  <andythenorth> :o I have not done a single BB goal in this game
20:29:00  <andythenorth> the shame
20:31:52  <Alberth> it's a record :)
20:32:05  <Alberth> you can't do worse any more either :)
20:33:37  *** sla_ro|master has quit IRC
20:33:39  <andythenorth> I made my own routes
20:33:52  *** smoke_fumus has joined #openttd
20:34:16  <Wolf01> Ok, saving the setting works, so I don't really know were the wrong value came from
20:34:53  <Wolf01> Now, I look to generate more look alike trees in patches
20:37:16  <andythenorth> ach
20:37:20  <andythenorth> my game needs multi-docks
20:37:26  <Alberth> good night
20:37:30  <andythenorth> bye Alberth :)
20:37:32  <Wolf01> nn Alberth
20:37:35  *** Alberth has left #openttd
20:38:15  <Wolf01> Did you see the new leaked technic sets?
20:39:19  <Samu> changing variable names again, making their naming more consistent with the rest of the code
20:39:33  <Samu> static inline void MakeLock(TileIndex t, Owner o, Owner oc_lower, Owner oc_upper, DiagDirection d, WaterClass wc_lower, WaterClass wc_upper, WaterClass wc_middle)
20:40:47  <peter1138> hmm right can't be arsed
20:42:43  <Samu> there is no MakeShipDepotTile
20:42:49  <Samu> only a MakeShipDepot
20:42:59  <Samu> code isn't consistent :(
20:43:08  <Samu> the style or whatever u call it
20:44:57  <andythenorth> peter1138: well you could :)
20:45:07  <andythenorth> Wolf01: yes, not much to say about them
20:45:10  <andythenorth> 'lego'
20:45:32  <Wolf01> The Ripsaw imitation looks cool
20:45:58  <Wolf01> The BMW bike... another licensed set which will coost too much
20:46:13  <andythenorth> I have a technic bike, unlikely to ever buy another
20:46:25  * andythenorth should take more lego sets apart
20:46:33  <andythenorth> boring leaving them built up
20:46:57  <Samu> https://hg.openttd.org/trunk.hg/file/d1ee3e5330e5/src/water_map.h#l418 - check it out, there's MakeLockTile and MakeLock, but then for ship depot there's only a MakeShipDepot, the style is different
20:47:11  <Wolf01> You should always buy 2 bikes, so you can have more tyres
20:47:45  <andythenorth> rip saw looks interesting, playability depends on performance
20:48:41  *** frosch123 has quit IRC
20:48:57  <andythenorth> I built a simple track vehicle with 2 M motors, that was quite fun
20:56:49  <Samu> interesting, aqueducts don't need canal owner
20:57:01  <Samu> it always belong to the same company
21:03:37  <andythenorth> bye
21:03:38  *** andythenorth has quit IRC
21:03:41  <Samu> oh, right, object tiles and industry tiles, brb
21:05:52  <Samu> static inline void MakeIndustry(TileIndex t, Owner oc, IndustryID index, IndustryGfx gfx, uint8 random, WaterClass wc)
21:06:09  <Samu> industries have canal owners
21:06:50  <Eddi|zuHause> <Wolf01> https://1drv.ms/i/s!AgUFeOGLNNfVhcgfYqGlZdsBI7EZYw what do you think? <-- maybe make one or two heightlevels where trees don't get into the final growth stages, so they'll be "dwarf" trees?
21:07:17  <Wolf01> That could be nice too
21:07:49  <Wolf01> Do you have any suggestion about finding the nearest tile with a tree?
21:08:00  <Eddi|zuHause> other than a circular search?
21:08:03  <Wolf01> I'm looking at CircularTileSearc
21:08:06  <Wolf01> h
21:08:21  <Eddi|zuHause> never really looked at that
21:09:25  <supermop> Eddi|zuHause: the dwarf tree look would be more convincing if there wasn't bright green grass on every mountain peak then
21:09:27  <Wolf01> It's used to launch a callback which does something on the found tile
21:09:58  <Wolf01> My callback only does "return IsValidTile(t) && IsTileType(t, MP_TREES);"
21:10:25  <Eddi|zuHause> that doesn't sound right
21:10:42  <Wolf01> It's the opposite of what I want to do
21:11:26  <Wolf01> I have a tile on which I need to plant a tree on, and I want to search if a tile in a radius of 2 has a tree, so I'll use that tree type
21:13:34  <Samu> distancemanhattan :p
21:14:49  <Eddi|zuHause> you can use *user_data to store the found tile
21:15:24  <Wolf01> Oh, nice, I was using a static global variable
21:15:44  <Eddi|zuHause> or the tree type of that tile
21:16:45  <Samu> gonna increase the height of bridges over locks, someone requested it to be higher
21:17:11  <Wolf01> Me
21:17:42  <Samu> ah, are you going to draw the vehicles correctly on the bridge?
21:17:44  <Eddi|zuHause> well, in compiler construction you learn to think in passing around such references and second-order functions through algorithms
21:18:16  <Eddi|zuHause> that's how CETS works, as well :)
21:18:39  *** Mavy has quit IRC
21:18:49  <Eddi|zuHause> supermop: bright green grass needs to be solved separately
21:19:12  <Wolf01> TreeType found_tree = *(TreeType*)user_data; <- this really is nonsense for me, without copying from another piece of code I wouldn't have done that
21:19:16  <supermop> if we want to get pedantic, grass should be its own type of tree
21:19:18  <Eddi|zuHause> supermop: you could technically use the arctic grass, but the problem is, there are no transition tiles
21:19:36  <supermop> shouldbe be solid grassy meadows under a dense forest
21:19:39  *** Mavy has joined #openttd
21:19:46  <supermop> * should not be
21:19:54  <Eddi|zuHause> supermop: alternatively, you could turn all tiles above the tree line into rocks
21:20:18  <Wolf01> That's another step, but for the terrain generator
21:20:32  <Eddi|zuHause> supermop: well, forests use an incomplete grass, could use that same grass if there is more than one tree on the tile
21:20:46  <supermop> but then its natural that towns be more upset about loss of mature trees than of young grass
21:21:25  <supermop> Eddi|zuHause: well in alpine areas you may get open vegetated meadows above the treeline
21:22:12  <Eddi|zuHause> supermop: those are tiny details that you can probably ignore at this stage of development
21:22:13  <supermop> but yeah many mountains will have sparse or no herbaceous vegetation near the peaks
21:23:18  <Wolf01> Uh, CircularTileSearch is non clamped on map O_o
21:23:56  <Wolf01> Wait... I used IsValidTile
21:24:15  <Wolf01> Why does it crash with tile > MapSize?
21:24:27  <supermop> Eddi|zuHause: if there is a sparse grass tile, why not use that everywhere, and then have patches of more grassy grass grow to form prairies or meadows
21:25:23  <Eddi|zuHause> Wolf01: because it IsValidTile does not check for map dimensions, only for VOID tiles at the map edge
21:25:56  <supermop> bare rock may be better though - if a steep mountain supports no trees, it is unlikely to support much soil for grass
21:25:59  <Wolf01> No, it checks for map dimmension -> return tile < MapSize() && !IsTileType(tile, MP_VOID);
21:26:41  <Eddi|zuHause> Wolf01: hm, then i don't know
21:27:19  <Eddi|zuHause> the circular search should also try to avoid going over the edge
21:28:05  <Wolf01> TileHeight asserts
21:29:38  <Wolf01> I would like to know the stack...
21:30:03  <Eddi|zuHause> use the debugger?
21:30:30  <Wolf01> I'm using the debugger
21:30:47  <Eddi|zuHause> the debugger should show you the stack
21:32:30  <Wolf01> GetRandomTreeType which calls the TileHeight
21:33:18  <Wolf01> I think the CircularTileSearch modifies the tile
21:34:50  <Wolf01> https://paste.openttdcoop.org/p528iusnc
21:42:39  <Wolf01> Shouldn't the CircularTileSearch make a copy of tile?
21:42:54  <Eddi|zuHause> why do you pass &tile in there?
21:42:56  <Wolf01> It reuses the same variable to store the new tile
21:43:08  <Wolf01> It's the starting tile
21:44:05  <Eddi|zuHause> yeah, you need to make the copy
21:44:52  <Eddi|zuHause> Tile t = tile; and then pass &t
21:44:54  <Wolf01> Ok, I did now, but why *I* need to make the copy, shouldn't be the function?
21:45:05  <Eddi|zuHause> that would be inefficient
21:45:46  <Wolf01> Also, user_data is not changed back
21:46:02  <Wolf01> Should I change it back like the cast I did before?
21:46:02  <Eddi|zuHause>  * @param tile to start the search from. Upon completion, it will return the tile matching the search.
21:46:30  <Wolf01> Ok, so I could just return the check
21:47:05  <Eddi|zuHause> pro tip: read the documentation of the function you're trying to use :p
21:47:54  <Eddi|zuHause> (also, you need to perform a "is valid tile" check on that result, in case no tree was found)
21:47:57  <Wolf01> Eh, intellisense didn't return anything, so I assumed there was none, usually I read that
21:48:30  <Eddi|zuHause> it's on the definition of the function in map.cpp, not on the declaration in map_func.h
21:51:07  <Wolf01> Mmmm, I expected more patches of similar trees, but there's already an improvement
21:55:35  <Samu> if ((GetLockPart(tile) == LOCK_PART_MIDDLE || GetLockPart(tile == LOCK_PART_UPPER) && GetTileMaxZ(tile) + 1) || GetLockPart(tile) == LOCK_PART_LOWER && GetTileMaxZ(tile) + 2 > z_start) return_cmd_error(STR_ERROR_BRIDGE_TOO_LOW_FOR_TERRAIN);
21:55:56  <Samu> big line, hopefully it does what i want
21:57:45  <Samu> oops
21:57:49  <Samu> if (IsLock(tile) && ((GetLockPart(tile) == LOCK_PART_MIDDLE || GetLockPart(tile == LOCK_PART_UPPER) && GetTileMaxZ(tile) + 1) || GetLockPart(tile) == LOCK_PART_LOWER && GetTileMaxZ(tile) + 2 > z_start)) return_cmd_error(STR_ERROR_BRIDGE_TOO_LOW_FOR_TERRAIN);
21:57:52  <Samu> fixed
21:59:17  <Wolf01> http://imgur.com/a/bVCbi
21:59:26  <Wolf01> What do you think?
21:59:52  *** Supercheese has joined #openttd
22:01:02  *** gelignite has quit IRC
22:05:16  <Eddi|zuHause> no opinion so far
22:05:54  <Wolf01> I have a 32MB screenshot of a whole map if you wany
22:06:00  <Wolf01> *wnat
22:06:02  <Wolf01> *want
22:06:43  <Wolf01> It is really cool
22:07:25  *** Progman has quit IRC
22:08:06  <Eddi|zuHause> a before/after comparison would be nice
22:08:26  <Wolf01> Last image is original
22:08:37  <Wolf01> There's a title
22:09:28  <Eddi|zuHause> then the page layout is weird
22:09:43  <Wolf01> Yup, I'll rearrange the images now
22:10:50  <Eddi|zuHause> anyway, i think i like the 8 tile version best
22:11:50  <Wolf01> Refresh the page
22:12:01  <Wolf01> I loaded some images of a generated map
22:13:29  *** HerzogDeXtEr has quit IRC
22:18:10  <Wolf01> Added a 16 tiles radius image
22:18:27  <Wolf01> There you can really see the patches of trees
22:19:24  <supermop> Wolf01: cool
22:26:32  *** urdh has quit IRC
22:30:46  <supermop> is the effect just to have trees prefer to grow with their same species?
22:30:53  <Wolf01> Yes
22:31:40  <supermop> but there isn't anything to saw make oaks not grow on high mountains
22:31:40  <Wolf01> Manual planting is not affected
22:31:57  <Wolf01> There is that too, but the height is low
22:32:12  <supermop> with pines at high elevation and deciduous trees at low elevation
22:32:38  <Wolf01> Yes, it's there
22:35:42  <Wolf01> With a 32x radius is wonderful, but it can really slow down a bit
22:36:20  <supermop> cool
22:36:28  <supermop> ok off to home
22:39:41  <Wolf01> Made it customizable from settings
22:40:21  <Wolf01> 0 (original) up to 32
22:40:43  <Wolf01> By steps of 4, maybe 8 fits it best?
22:41:34  *** urdh has joined #openttd
22:43:05  <Eddi|zuHause> the distinction between tree types for heghts might get tricky with newgrf trees
22:43:38  <Wolf01> As now I just loaded temperate tree below evergreen height and arctic trees above
22:44:10  <Eddi|zuHause> that might work
22:44:51  <Eddi|zuHause> but you might give newgrfs more control
22:45:59  <Wolf01> I might... but I don't know how to do
22:46:16  <Wolf01> I like to do patches like this one, the "one day patches"
22:55:56  <Wolf01> There's just a little problem with temperate trees on arctic, they won't be covered in snow
22:56:12  <Wolf01> So I think I'll clamp the values to the snowline
22:56:26  <Eddi|zuHause> hehe :)
22:56:51  <Eddi|zuHause> i wouldn't mess with the snow line
22:57:06  <Wolf01> Nah, I won't touch it, just read the value
22:58:12  <Eddi|zuHause> i mean, the snowline should have no effect in temperate whatsoever
22:58:21  <Samu> gonana try a case/switch
22:58:31  <Eddi|zuHause> snowline and treeline should be completely independent things
22:59:00  <Eddi|zuHause> (especially with the snowline varying through the seasons)
22:59:21  <Wolf01> And if you load the "snow on temperate" grf?
22:59:34  <Wolf01> Or that's arctic only?
22:59:35  <Eddi|zuHause> that does nothing in openttd
23:00:18  <Wolf01> Really?
23:00:21  <Eddi|zuHause> the closest you get to "snow in temperate" is loading the temperate grass in snowy climate
23:00:33  <Wolf01> Ok, maybe I did that
23:01:12  <Wolf01> Yup, totally dis that
23:01:16  <Wolf01> *did
23:02:41  <Wolf01> https://paste.openttdcoop.org/pqo1srqxj I did this, but I get strange results for the variable snow line... like "now it's 5... now it's 251"
23:03:33  *** FLHerne has quit IRC
23:03:33  <Wolf01> The no_trees_height could be as is and not related to the snowlone
23:03:43  <Samu> darn, locks are already so limiting, are you sure you want bridge height raised?
23:03:43  *** Gja has quit IRC
23:03:47  <Samu> Wolf01:
23:03:56  <Wolf01> Yup
23:03:59  <Eddi|zuHause> you could use the max snow line instead of the current snow line
23:04:24  <Wolf01> Not the min snow line?
23:04:35  <Eddi|zuHause> no.
23:04:36  <Wolf01> Wait, min is in summer?
23:04:44  <Samu> that yup is for me?
23:04:44  <Eddi|zuHause> min is summer, max is winter
23:04:48  <Wolf01> Ok
23:04:52  <Samu> sorry for interrupting
23:04:52  <Wolf01> Yes Sacro
23:04:54  <Eddi|zuHause> err no
23:04:56  <Wolf01> *samu
23:04:57  <Eddi|zuHause> other way around
23:05:03  <Eddi|zuHause> min is winter, max is summer
23:05:06  <Samu> alright then
23:05:11  <Wolf01> Ok, then it's min
23:05:18  <Eddi|zuHause> if it's still snowy in the summer, no trees will grow there
23:05:49  <Eddi|zuHause> (btw this will conflict with the rather silly forest limitation for arctic climate)
23:06:23  *** FLHerne has joined #openttd
23:06:38  *** tycoondemon has quit IRC
23:06:40  *** FLHerne has quit IRC
23:06:57  *** Biolunar has quit IRC
23:07:04  <Wolf01> Bah, just don't configure the "no trees" too low
23:10:50  *** tycoondemon has joined #openttd
23:11:21  <Wolf01> Oh, shit, my 2 patches conflict, raising the radius make the no trees ineffective
23:13:14  <Wolf01> Meh... PantTreesOnTile doesn't use the GetRandomTreeType
23:13:36  <Wolf01> I should move the checks there
23:14:05  <Wolf01> Or in CanPlantTreesOnTile for the no trees height
23:14:26  <Wolf01> No, that will assert
23:16:07  <Wolf01> But I don't want to limit the manual placement
23:16:38  <Eddi|zuHause> i'm assuming you're teddy-bear-programming and don't actually expect me to answer you
23:17:12  <Wolf01> No, but now yes: should I limit also the manual planting?
23:18:42  <Eddi|zuHause> yes, except in the scenario editor
23:19:13  <Wolf01> Ok, I need to put down a lot of notes on what to do
23:19:16  <Eddi|zuHause> also, you should probably extend the tree gui to show which trees can be planted where
23:19:27  <Wolf01> Yes
23:19:58  <Wolf01> And grf trees support
23:22:10  <Wolf01> Ok, there's only one assert, I could split that in 2 functions, one for the assert and one for the height
23:23:33  <Samu> Wolf01: http://imgur.com/a/YIzY8 - really limits the options on hilly terrain
23:23:53  <Wolf01> Looks right now
23:24:25  <Wolf01> Test if it glitches with ships
23:24:49  <Samu> ok
23:29:25  <Samu> yes
23:31:48  *** tokai|noir has joined #openttd
23:31:49  *** ChanServ sets mode: +v tokai|noir
23:32:04  <Samu> it's less prevalent but still happens
23:32:12  <Samu> those lamp posts
23:34:18  <Samu> bridge pilars
23:34:35  <Wolf01> Those would glitch even without the lock
23:34:42  <Samu> even the lock structure
23:36:47  <Samu> what can be done about it?
23:37:19  <Samu> part of the lock structure and lamp posts resurfaces over the bridge
23:37:37  <glx> you can't do anything about it
23:38:33  <Samu> but at least the ship below does not show anymore
23:38:41  <Samu> at least in this test
23:38:47  *** tokai has quit IRC
23:39:38  <Wolf01> That's really good
23:40:50  <Samu> gonna try with road vehicles or trains now
23:47:18  <Samu> only the lower tile is glitch-free apparently
23:48:41  <Wolf01> No problem, at least the ship does not pass through bridges now
23:49:09  <Wolf01> And I think I'll go to bed
23:49:12  <Wolf01> 'night
23:49:15  *** Wolf01 has quit IRC
23:51:38  <Samu> hmm I dunno, I wanted it to be glitch free, but not at the cost of raising the bridge height. I don't like the limitation it imposes for water construction
23:59:00  <Samu> anyway I'm gonna post it

Powered by YARRSTE version: svn-trunk