IRC logs for #openttd on OFTC at 2019-08-18
            
00:10:17 *** Progman has quit IRC
00:11:22 *** murr4y has joined #openttd
00:11:36 *** snail_UES_ has quit IRC
00:16:18 *** Wolf01 has quit IRC
00:18:55 <Samu> I found a bug in my AI that, for some reason, went unnoticed for several versions already
00:19:41 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 opened pull request #7701: Fix #7188: check the validity of command callback for scripts https://git.io/fjFqb
00:22:04 <Samu> it was about checking the distance between my station and a competitor's station
00:22:23 <Samu> it should be twice the station coverage
00:22:55 <Samu> the bug was only using once the station coverage
00:24:37 <Samu> this is a big change, for the matter of fact
00:25:21 <Samu> wondering how this gonna pan out
00:25:22 *** y2kboy23 has quit IRC
00:43:42 *** y2kboy23 has joined #openttd
00:45:37 *** Samu has quit IRC
00:54:26 *** sim-al2 has quit IRC
01:01:48 *** arikover has quit IRC
01:41:54 *** Miko0000 has joined #openttd
01:49:54 <Miko0000> umm It's version 1.9.2 x64 but i can't do the installation setup, when i asked to enter the (gfx) file location and i typed the location in the input box and press next,but it is still asking me for the file location, can anyone help me?
01:57:39 <Miko0000> and it is windows 10
01:59:23 <glx> windows or DOS TTD files ?
02:02:51 *** y2kboy23 has quit IRC
02:03:07 <glx> you can just tell the installer to download opengfx
02:05:39 *** y2kboy23 has joined #openttd
02:15:32 <Miko0000> Oh okay thanks
02:16:15 *** jinks has joined #openttd
02:17:23 <glx> if you go on the download way check the sound and music lines too
02:17:47 <glx> and uncheck TTD CD
02:19:59 *** jinks_ has joined #openttd
02:19:59 *** jinks has quit IRC
02:20:03 *** jinks_ is now known as jinks
02:32:15 *** Miko0000 has quit IRC
03:10:37 *** WormnestAndroid has quit IRC
03:11:22 *** WormnestAndroid has joined #openttd
03:34:40 *** sla_ro|master has quit IRC
03:35:01 *** Flygon has joined #openttd
04:32:51 *** debdog has joined #openttd
04:35:58 *** glx has quit IRC
04:36:14 *** D-HUND has quit IRC
04:40:55 *** Wormnest has joined #openttd
05:34:46 *** Wormnest has quit IRC
05:47:20 *** WormnestAndroid has quit IRC
05:49:03 *** WormnestAndroid has joined #openttd
07:17:17 *** Wormnest has joined #openttd
07:46:02 *** nielsm has joined #openttd
07:59:52 *** snail_UES_ has joined #openttd
08:09:56 *** Wormnest has quit IRC
08:14:57 *** sla_ro|master has joined #openttd
09:06:01 *** Wolf01 has joined #openttd
09:26:12 *** snail_UES_ has quit IRC
10:08:29 *** Samu has joined #openttd
10:08:39 <Samu> hi
10:16:12 <Samu> testing my AI being friendly
10:16:31 <Samu> wondering if it bankrupts for being too friendly
10:22:48 <Samu> EpicTrans is really.... lame
10:23:05 <Samu> builds wood bridges everywhere, and bankrupts all the time
10:23:16 <Samu> then builds more wood bridges
10:23:37 <Samu> and the other AIs make use of the bridges in pathfinding
10:23:57 <Samu> oh well, just another trial against AIs
10:37:32 *** WormnestAndroid has quit IRC
10:37:44 *** WormnestAndroid has joined #openttd
10:43:55 <Samu> terron bug https://www.tt-forums.net/viewtopic.php?f=65&t=54639&p=1224490#p1224490
10:59:21 *** gelignite has joined #openttd
11:28:20 *** Progman has joined #openttd
11:35:24 *** frosch123 has joined #openttd
12:03:01 *** arikover has joined #openttd
12:20:53 <Samu> this.cost = this.Cost(this);
12:21:00 <Samu> help! english me on that
12:27:05 <Samu> https://github.com/SamuXarick/LuDiAI-AfterFix/blob/master/RoadPathfinder.nut#L49
12:27:13 <Samu> what's happening here, it's confusing
12:28:49 <Samu> there is no this.Cost
12:29:05 <Samu> or is it?
13:27:32 <Wolf01> For me it's confusing how the Road.Cost works... but I'm lacking knowledge of the language syntax
13:33:40 <Samu> those _set and _get functions
13:34:03 <Samu> i dont call them directly, but they seem to be called
13:50:40 <nielsm> http://squirrel-lang.org/doc/squirrel2.pdf <- page 33 and 34 describe the _set and _get metamethods
14:40:16 *** snail_UES_ has joined #openttd
14:48:17 *** gelignite has quit IRC
15:18:13 *** snail_UES_ has quit IRC
15:26:05 *** Wolf01 is now known as Guest313
15:26:07 *** Wolf01 has joined #openttd
15:27:19 <Wolf01> It's funny that I have ups protected network and then the line goes out because a power outage in the entire town... with the old dsl it didn't happen
15:28:05 *** Guest313 has quit IRC
16:02:49 <Eddi|zuHause> i suppose it's hard to power distributed network hubs through fibreglass...
16:19:23 *** DrSegfault has joined #openttd
16:20:29 <DrSegfault> hey, I've played on one map for 7 years and now there's no space left to build anything new. can I somehow extend the map size now?
16:20:38 <Eddi|zuHause> no
16:21:04 <DrSegfault> :-((
16:22:04 <nielsm> long answer: it would be extremely difficult to expand the map size every single object on the map needs to have its coordinates updated, and all references to coordinates would also need to be updated
16:22:31 <DrSegfault> nielsm: I meant mostly appending stuff at the sides, keeping the old coords
16:22:53 <nielsm> yes that's the thing, tiles have an index, not a coordinate
16:23:03 <DrSegfault> ahh
16:23:18 <nielsm> you could extend in the Y direction, but extending in the X direction would need remapping everything
16:25:26 <DrSegfault> doesn't sound like that's doable with a few minutes of scripting...
16:25:52 <nielsm> nope, too many places need changing, and it would most definitely confuse any AI or GS being used
16:43:56 *** Flygon has quit IRC
16:58:41 *** sla_ro|master has quit IRC
17:03:56 *** Wormnest has joined #openttd
17:43:41 *** Samu has quit IRC
18:17:27 *** Samu has joined #openttd
18:17:44 <Samu> somebody turned off the computer
18:17:49 <Samu> fml
18:26:29 <Samu> Redirect Left is annoying
18:27:46 <Samu> I won't fix it myself, it's not like I have access to upload for him
18:27:56 <Samu> or them
18:29:02 <Samu> "thread is dead", orly? maybe because nobody reported bugs...
18:29:46 <LordAro> try not to monologue, Samu
18:32:27 <Samu> https://www.tt-forums.net/viewtopic.php?f=65&t=54639&start=60#p1224506
18:37:51 <Samu> trans ai was also dead, then this year he started fixing stuff
18:43:02 *** Eddi|zuHause2 has joined #openttd
18:47:46 *** Eddi|zuHause has quit IRC
18:54:41 <Wolf01> bbl
18:55:27 <argoneus> do you guys still play ttd
18:56:52 <Samu> ya
18:57:37 <argoneus> any train sets you'd recommend for FIRS
18:57:43 <argoneus> extreme
18:57:55 <argoneus> last I played NUTS was all the hype
18:58:36 *** Wolf01 is now known as Guest324
18:58:38 *** Wolf01 has joined #openttd
19:01:03 <Samu> what is the name of a line going from 2 opposite verices of a rectangle?
19:01:17 <Samu> english:(
19:02:09 <LordAro> diagonal
19:02:56 <Samu> rectangle has 4 points, A B C D. A C and B D are opposite. the line that starts at A and ends in C is called...
19:02:59 <Samu> diagonal
19:03:08 *** Guest324 has quit IRC
19:03:39 <arikover> argoneus: I would say Iron Horse.
19:03:56 <Samu> iron horse line
19:05:28 <argoneus> that looks cute
19:08:46 <peter1139> LordAro, nice work
19:09:53 <LordAro> peter1139: everything hurts
19:09:59 <peter1139> I bet
19:10:36 <LordAro> but thanks :)
19:11:36 <Samu> my geometric skills aka math suck
19:12:40 <Samu> dont know what to call the variable
19:12:44 <Samu> _search_area_radius
19:13:08 <Samu> _extend_diagonal_area
19:14:09 <Samu> _max_search_area_limit
19:14:57 <Samu> _search_area_limit
19:15:18 <Samu> _limit_search_area
19:16:36 <peter1139> Use them all interchangably.
19:18:52 *** gelignite has joined #openttd
19:18:52 <Samu> given 2 tiles A and B, draw a rectangle starting on A, ending on B, to generate tiles C and D
19:19:33 *** Eddi|zuHause2 is now known as Eddi|zuHause
19:20:07 <Samu> then using those points, get the _min_x, _min_y, _max_x, _max_y
19:21:06 <LordAro> Samu: go away and think about it, instead of live streaming your thought process here
19:21:19 <Samu> :(
19:25:15 <peter1139> LordAro, I wimped out. It started spitting as I was leaving but I went out anyway, but after an hour I was soaked :/
19:25:30 <peter1139> Should've at least found the waterproof socks/overshoes.
19:26:42 <LordAro> heh
19:26:54 <LordAro> no issues with the weather here, other than the wind
19:29:21 *** Thedarkb-X40 has quit IRC
19:31:20 *** Thedarkb-X40 has joined #openttd
19:44:14 *** Eddi|zuHause has quit IRC
19:50:00 *** andythenorth_ has joined #openttd
19:51:53 *** andythen_ has joined #openttd
19:52:11 <andythen_> argoneus: Iron Horse 2
19:52:22 <andythen_> There’s a beta on bananas
19:52:49 <argoneus> what's the difference from 1?
19:53:06 *** andythenorth_ has quit IRC
19:53:55 <andythen_> “Everything” :)
19:54:09 <andythen_> Also needs the Termite track grf
19:55:12 <argoneus> oh
19:55:18 <argoneus> I was trying to find a list of trains or sth
19:58:07 <_moep_> hey community! where can i change, that i buy new vehicles, when they are too old?
19:59:41 *** Eddi|zuHause has joined #openttd
20:00:18 <andythen_> argoneus: there used to be online docs for Iron Horse listing all trains, but they’re gone (for now)
20:00:45 <andythen_> One day I’ll figure out how to provide them :)
20:00:55 <Eddi|zuHause> maybe andynow_ could fix them?
20:01:19 <andythen_> Surfeit of nicks?
20:01:30 <andythen_> Multiple devices :p
20:01:43 <Eddi|zuHause> first world problems?
20:01:48 <andythen_> Very
20:03:34 * andythen_ dinner
20:03:43 *** andythen_ has quit IRC
20:07:00 <Samu> im trying to limit the pathfinder search from https://imgur.com/DEWepqV to https://imgur.com/QnDM9Ee
20:07:27 <Samu> i take the coordinates of the 2 stations and compute a rectangle
20:08:01 <Samu> i can increase the size of the rectangle by that value i put there _max_search_area_limit
20:08:42 <Samu> now I just need a decent variable name and to describe it, help
20:10:57 <Wolf01> "x"
20:11:21 <Samu> https://imgur.com/xjBwDqV here's with a value of 3
20:11:45 <Samu> https://imgur.com/QnDM9Ee here's with a value of 1
20:12:03 <Samu> https://imgur.com/DEWepqV here's with a value of 0 - unrestricted search
20:12:30 <Samu> now english what I just did for me plz
20:42:09 <Samu> ~back, and no english
20:43:00 <Samu> "x" is a bad name
20:50:04 <Samu> _max_search_area_offset ?
20:50:25 <Samu> _search_offset
20:58:04 <LordAro> it doesn't matter that much
20:58:21 <LordAro> if it's disastrously wrong, someone else can suggest something better
20:59:58 <Samu> _max_search_offset = null; ///< The maximum offset of the rectangle area the pathfinder is limited to. Uses source and target tiles as reference points for the rectangle. If 0, the search is unrestricted and not confined to any area.
21:00:13 <Samu> well, then :(
21:00:57 <Samu> how's this english
21:07:19 <Arveen> do cacti die when you just place them somewhere in the desert ?
21:07:56 <Arveen> ^ sub tropical map
21:12:19 <nielsm> Samu: _search_range
21:13:40 <nielsm> "Range to search aroud source and destination, in either coordinate. 0 indicates unlimited."
21:15:59 *** glx has joined #openttd
21:15:59 *** ChanServ sets mode: +v glx
21:20:03 <Samu> cool, nielsm thx, appreciated
21:29:28 <Samu> erm, it's not quite around source and dest only
21:29:48 <Samu> those are only 2 points
21:31:25 <Samu> hard to sumarize it, I suppose
21:55:17 *** andythenorth_ has joined #openttd
21:55:43 <andythenorth_> US trains have some realism chaallenges
21:56:16 <andythenorth_> Lots of the big shiny stuff only had 15 year service lives
21:56:46 <andythenorth_> It gets worn out by intense use, or superceded by new technology
21:56:48 *** frosch123 has quit IRC
21:57:29 <andythenorth_> Gameplay is better with generations around 30 years :p
22:00:51 <andythenorth_> Union Pacific went through ~7 generations of high-end locomotive 1930-1970 :p
22:01:45 <milek7> 30 years is too short, here 50+ locos are still used ;P
22:04:05 *** andythenorth_ has quit IRC
22:13:09 *** andythenorth_ has joined #openttd
22:14:28 <andythenorth_> New trains every 10 years? o_O
22:19:19 *** andythenorth_ has quit IRC
22:20:45 <Samu> on a 64x64 map, freeform off makes playable area 63x63 ?
22:20:55 <Samu> freeform on makes 62x62?
22:22:05 <Samu> i thought the entire 64x64 was available with freeform off
22:22:17 <Samu> is it really only 63x63?
22:25:49 <nielsm> 62x62
22:26:06 <nielsm> the outer ring of tiles is special
22:26:41 <nielsm> edge tiles that can't be used for anything except detecting you're at the edge
22:29:18 <Samu> uhm, counting from 0 to 62 is 63
22:29:51 <nielsm> both row 0 and row 63 are guard tiles
22:29:58 <nielsm> (I forget the proper word)
22:31:46 <Samu> row 63 isn't water
22:31:51 <Samu> it's black
22:31:56 <Samu> but row 0 is water
22:32:24 <LordAro> void tiles
22:32:44 <LordAro> and iirc yes, they're only in certain directions
22:32:48 <LordAro> can't remember why
22:32:51 * LordAro looks at peter1139
22:33:19 *** gelignite has quit IRC
22:36:13 <Samu> interesting
22:38:20 <Samu> this means there's actually more road buildable area with freeform on
22:38:39 <Samu> even though the playable area of the map is shorter
22:38:47 <Samu> smaller
22:40:01 <Samu> 63x63 = can build road from 1 to 61
22:40:33 <Samu> 62x62 = can build road from 1 to 62
22:44:09 <peter1139> Void tile changes were nothing to do with me.
22:44:37 <LordAro> oh i know, but i can't remember the details about the reasons why things are the way that they are
22:47:30 <Samu> local freeform = AIMap.IsValidTile(0) ? 0 : 1;
22:47:59 <Samu> if it's valid, freeform is disabled, min_x and min_y is 0
22:48:07 <nielsm> the void tiles on the bottom edges are needed so the map edge can be raised/lowered
22:48:08 <michi_cc> SE and SW map edges always had void tiles to simplify coding wrap-around. As tile slope depends on the surround tile heights, freeform as void all around because you can't assume tile height 0 anymore.
22:48:10 <Samu> else min_x and min_y is 1
22:48:19 *** Arveen has quit IRC
22:58:34 <Samu> https://paste.openttdcoop.org/pmfujrgil
22:58:40 <Samu> any way to simplify this ?
23:10:34 <Samu> oh, the other function
23:11:18 <Samu> https://paste.openttdcoop.org/prqsbwaty
23:11:34 <LordAro> Samu: probably not without sacrificing readability
23:11:56 <LordAro> the this._min/max_x/y conditionals look a bit odd
23:12:08 <LordAro> certainly need some extra parens
23:12:39 <LordAro> but the false term being N_x - (N_x - this._search_range) is odd
23:17:29 <Samu> hmm, but it works already :(
23:17:39 <Samu> ok, parenthesis
23:18:25 <LordAro> Samu: not saying it doesn't work, but it's a lot of code for what's just this._search_range
23:19:56 <Samu> this._min_x = (N_x - this._search_range) < min_freeform ? min_freeform : N_x - this._search_range;
23:24:06 <LordAro> oh, i see
23:24:15 <LordAro> that's very different than what i assumed it was being
23:24:21 <LordAro> (hence, parens)
23:25:09 <LordAro> sounds like you want max(min_freeform, N_x - this._search_range); though
23:25:46 <Samu> is there a max function in squirrel
23:25:53 <LordAro> i imagine so
23:26:00 <LordAro> you can make one if not
23:30:32 <Samu> looks like there is
23:37:49 <Samu> https://github.com/OpenTTD/OpenTTD/blob/7c8e7c6b6e16d4a26259a676db32d8776b99817e/src/script/squirrel_std.cpp#L24
23:50:17 *** WormnestAndroid has quit IRC
23:51:07 *** WormnestAndroid has joined #openttd
23:58:20 <Samu> https://paste.openttdcoop.org/p1x8xmqgt
23:58:23 <Samu> smaller