IRC logs for #openttd on OFTC at 2018-08-26
            
00:04:39 *** Wormnest has quit IRC
00:05:05 <Wolf01> 'night
00:05:07 *** Wolf01 has quit IRC
00:09:31 *** APTX_ has quit IRC
00:10:07 *** APTX_ has joined #openttd
00:13:31 *** cHawk has quit IRC
00:17:41 <Samu> once again i'm editing the stationadjacent code... this is so hard
00:20:11 *** cHawk has joined #openttd
00:21:48 *** Thedarkb1-T60 has joined #openttd
00:47:56 *** frosch123 has quit IRC
00:54:19 *** Thedarkb1-T60 has quit IRC
01:08:23 *** nielsm has quit IRC
01:22:39 *** nielsm has joined #openttd
01:26:48 *** synchris has quit IRC
01:29:55 *** Thedarkb1-T60 has joined #openttd
02:24:45 *** chomwitt has joined #openttd
02:37:20 *** Samu has quit IRC
02:59:51 *** Progman has quit IRC
03:04:00 *** HeyCitizen has quit IRC
03:05:04 *** HeyCitizen has joined #openttd
03:09:24 *** HeyCitizen_ has joined #openttd
03:13:08 *** HeyCitizen has quit IRC
03:16:15 *** Thedarkb1-T60 has quit IRC
03:21:03 <Eddi|zuHause> so, some program was setting Tab as a "global" hotkey?
03:21:53 <Eddi|zuHause> as in, one programmer somewhere sat down and was thinking "oh, Tab isn't really used by anyone, i can safely grab that and reserve that for me"?
03:42:52 *** glx has quit IRC
03:50:41 *** cboyd_ has quit IRC
04:08:25 *** Flygon has joined #openttd
04:15:43 *** chomwitt has quit IRC
04:53:37 *** wodencafe has joined #openttd
04:54:39 *** wodencafe has quit IRC
04:54:56 *** wodencafe has joined #openttd
05:54:27 *** Supercheese has joined #openttd
05:59:40 *** haudrauf has quit IRC
06:00:39 *** haudrauf has joined #openttd
06:24:29 *** Supercheese has quit IRC
06:24:51 *** Supercheese has joined #openttd
06:32:10 *** Supercheese has quit IRC
06:32:31 *** Supercheese has joined #openttd
08:04:33 *** nielsm has quit IRC
08:19:23 *** Supercheese has quit IRC
09:44:50 *** HerzogDeXtEr has joined #openttd
09:51:38 *** andythenorth has joined #openttd
09:54:21 *** gelignite has joined #openttd
09:55:14 *** andythenorth has quit IRC
10:05:04 <peter1138> Eddi|zuHause, well, no, I'd bound it as a push-to-talk key. No indication that it would be stealing the keypress.
11:01:26 *** andythenorth has joined #openttd
11:01:27 <andythenorth> moin
11:14:10 <andythenorth> so more NARS Horse puzzles
11:14:19 *** Progman has joined #openttd
11:15:05 <andythenorth> irl US trains now have lower max speed than in 1950s/60s
11:15:29 <andythenorth> this is inconvient for game progression :p
11:36:29 *** Wormnest has joined #openttd
11:39:27 *** andythenorth_ has joined #openttd
11:40:45 *** andythenorth has quit IRC
11:52:59 *** Samu has joined #openttd
11:53:17 <peter1138> Well, I sacked off bike riding due to the rain.
11:53:23 <peter1138> Wimpy cyclist :S
12:06:19 <andythenorth_> rain?
12:06:36 <andythenorth_> it is 28 degrees and solid blue sky here :p
12:06:55 *** frosch123 has joined #openttd
12:09:21 *** andythenorth_ has quit IRC
12:09:59 *** andythenorth_ has joined #openttd
12:12:19 <Samu> "excessive cpu usage in valuator function" - the bane of most AIs
12:14:58 *** andythenorth_ has quit IRC
12:17:13 <Samu> can't you change the way evaluators work?
12:17:45 <Samu> in openttd itself
12:24:00 *** Gja has joined #openttd
12:24:36 <Samu> instead of killing the script, can't you suspend
12:24:55 <Samu> and let it continue on the next ... uh... tick?
12:29:28 <Samu> frosch123: says you are the responsible for the cpu evaluator
12:29:34 <Samu> can't you improve it?
12:48:32 *** Gja has quit IRC
12:49:14 *** synchris has joined #openttd
12:53:53 *** gnu_jj_ has joined #openttd
12:53:53 *** gnu_jj has quit IRC
13:00:58 *** andythenorth has joined #openttd
13:01:08 <LordAro> peter1138: wimp
13:04:02 *** Wacko1976 has joined #openttd
13:07:17 *** andythenorth has quit IRC
13:07:54 <planetmaker> weakly interacting massive particle... hm :P
13:09:07 *** Wolf01 has joined #openttd
13:09:17 <Wolf01> o/
13:27:22 *** andythenorth has joined #openttd
13:27:25 <andythenorth> cabbages
13:29:28 <Samu> it appears all the code that use Valuate could be coded without using the Valuate functions
13:29:54 <Samu> Isn't it?
13:30:22 <Samu> so why is it available for us?
13:30:32 <Samu> or am I wrong?
13:40:50 *** andythenorth has quit IRC
13:47:27 *** andythenorth has joined #openttd
13:50:01 *** andythenorth has quit IRC
13:52:57 *** Wacko1976 has quit IRC
13:55:29 *** andythenorth has joined #openttd
14:00:28 *** nielsm has joined #openttd
14:04:23 *** Gja has joined #openttd
14:04:56 *** andythenorth has quit IRC
14:16:18 *** andythenorth has joined #openttd
14:27:53 *** keoz has joined #openttd
14:34:13 *** Wacko1976 has joined #openttd
15:00:07 *** keoz has quit IRC
15:08:42 *** Gja has quit IRC
15:46:20 *** Happpy has joined #openttd
15:46:38 *** Happpy has left #openttd
16:05:47 *** andythenorth has joined #openttd
16:06:18 <andythenorth> US railroads are very inconsiderate for game design
16:06:35 <andythenorth> iconic engines with lifespan of only 15 years
16:06:53 <andythenorth> bad for progression :)
16:17:40 *** Happpy has joined #openttd
16:17:52 *** Happpy has left #openttd
16:20:06 *** andythenorth has quit IRC
16:29:49 *** sim-al2 has joined #openttd
17:10:32 *** TrueBrain has quit IRC
17:17:10 *** andythenorth has joined #openttd
17:19:51 *** andythenorth has quit IRC
17:47:20 *** haudrauf has quit IRC
17:48:18 *** haudrauf has joined #openttd
17:49:58 *** andythenorth has joined #openttd
17:52:42 *** andythenorth has joined #openttd
17:52:44 <andythenorth> o/
17:53:15 <LordAro> is it?
17:53:24 <Eddi|zuHause> bright stars burn out faster
17:55:19 <Eddi|zuHause> anyway, US rail history is easy: pioneer age, golden age, decline age and we-have-plans-for-hispeed-rail-but-they're-not-going-anywhere age
17:55:57 <andythenorth> so 4 generations :p
17:56:28 <andythenorth> how long is golden age? :p
17:57:30 <Eddi|zuHause> dunno, 1880-1940?
17:57:42 <Wolf01> I'd say until privatization
18:00:03 <andythenorth> apart from bankruptcy periods, US railroads are always private :)
18:00:10 <andythenorth> except Amtrak
18:00:41 <Wolf01> Oh, US, I read UK :P
18:01:09 <Eddi|zuHause> foundation of Amtrak is already way into the decline age
18:01:37 <Wolf01> WTF, it's cold, I wanted cold, but not so cold :S 19°C
18:02:12 <LordAro> cold here too
18:03:58 <Eddi|zuHause> typical human reaction "it's hot, i want cold" -> "it's cold, get the hot back"
18:04:49 <andythenorth> i am happy at 28deg with light breeze tbh
18:05:06 <andythenorth> which is fortunate, as that is the current weather
18:05:55 <Eddi|zuHause> it's closer to 19°C than 28°C here, but i don't have exact numbers
18:06:43 *** Supercheese has joined #openttd
18:06:58 *** snail_UES_ has joined #openttd
18:17:06 <Wolf01> 25-28°C was the ideal temperature, it was ~37°C 2 days ago
18:17:31 <Wolf01> BTW, out for dinner :P
18:17:52 *** andythenorth has quit IRC
18:21:40 <Eddi|zuHause> one would assume room temperature (21°C) was the ideal temperature
18:25:42 <Samu> @calc UINT_32
18:25:42 <DorpsGek> Samu: Error: There's really no reason why you should have underscores or brackets in your mathematical expression. Please remove them.
18:25:55 <Samu> @calc MAX_INT
18:25:55 <DorpsGek> Samu: Error: There's really no reason why you should have underscores or brackets in your mathematical expression. Please remove them.
18:25:57 <Samu> :(
18:26:39 *** gelignite has quit IRC
18:27:39 <Samu> have to change everything into square distances
18:30:57 *** andythenorth has joined #openttd
18:31:18 *** Flygon has quit IRC
18:32:47 <andythenorth> hmm
18:33:17 <planetmaker> @calc 2**31
18:33:17 <DorpsGek> planetmaker: 2147483648
18:34:25 <andythenorth> amtrak pax trains are ridiculously slow :p
18:35:00 <Eddi|zuHause> planetmaker: how do you not know this number by heart?
18:38:20 *** andythenorth_ has joined #openttd
18:38:38 *** andythenorth has quit IRC
18:42:35 *** andythenorth_ has quit IRC
18:44:09 <planetmaker> it's sufficient to know it till... 4096 ;)
18:48:56 <Eddi|zuHause> in what world? :p
18:49:37 <Eddi|zuHause> 2147483647 is even a mersenne prime
18:51:45 <planetmaker> that's too rational ;)
18:52:09 <planetmaker> for odd numbers I prefer the irrational ;)
18:55:15 <Samu> can I do this? while (AIController.Sleep(1)) {
18:55:21 <Eddi|zuHause> spoiler alert: odd numbers are never irrational :ü
18:55:24 <Eddi|zuHause> :p
18:55:26 *** andythenorth_ has joined #openttd
18:55:51 <Samu> what does AIController.Sleep(1) returns?
18:56:39 <Samu> /* static */ void ScriptController::Sleep(int ticks)
18:56:44 <Samu> void is always a true?
18:57:27 <LordAro> void is nothing
18:57:31 <LordAro> it has no return value
18:57:48 <Samu> what will happen in this? while (AIController.Sleep(1))
18:57:51 *** andythenorth_ has quit IRC
18:57:52 <LordAro> i'd be very surprised if it worked at all
18:58:11 <Samu> it works on the GSController side
18:58:12 <LordAro> at the very least i'd expect "null" to be falsey
18:59:25 <Samu> seems to be working on AIController too
18:59:32 <Samu> the stuff inside while is executed
18:59:53 <LordAro> weird
19:01:44 <Samu> yeah, it fast forwards faster too
19:02:05 *** KouDy has quit IRC
19:09:44 <Samu> I found a bug
19:10:06 <Samu> the maximum distance of engines that don't have a max range specified should not be 0
19:10:18 <Samu> engine_list.Valuate(AIEngine.GetMaximumOrderDistance);
19:10:24 <Samu> engine_list.KeepAboveValue(dist);
19:10:45 <Samu> aircraft in this case
19:11:07 <Samu> i dunno how to report a bug anymore, so plz someone fix it
19:12:30 <Samu> it's script_vehicle.cpp
19:12:38 <Samu> line 446
19:15:17 <Samu> or maybe not
19:15:27 <Samu> script_engine.cpp line 254
19:16:00 <Samu> yeah, that's the one
19:16:14 <Samu> return ::Engine::Get(engine_id)->GetRange() * ::Engine::Get(engine_id)->GetRange();
19:20:40 *** andythenorth_ has joined #openttd
19:21:06 <andythenorth_> oof
19:21:22 <andythenorth_> NARS Horse roster is going to be huge :p
19:21:39 <andythenorth_> so much drawing I will have to do
19:23:32 <Samu> andythenorth_: can you report my bug? :(
19:23:54 <andythenorth_> ?
19:24:51 <Samu> i just mentioned it
19:25:44 <andythenorth_> OTOH
19:26:01 <andythenorth_> not sure NARS Horse has 4/8 wagons
19:26:20 <andythenorth_> US tends to long wagons, so that cuts down drawing
19:26:37 <peter1138> Why would andythenorth_ report a bug he hasn't seen because he only just joined the channel?
19:27:15 <andythenorth_> because mystery reasons?
19:28:13 <Samu> oh, sorry, i saw him start talking
19:32:53 *** TrueBrain has joined #openttd
19:33:33 <andythenorth_> uh oh
19:33:37 <Wormnest> I would say not a bug but working as intended
19:33:39 <andythenorth_> it’s TB
19:34:08 <Samu> intended bugs :(
19:35:05 <Wormnest> It´s not a bug
19:35:27 <Samu> but why not? I can't use the KeepAbove correctly :(
19:35:34 <Samu> KeepAboveValue
19:35:52 <Samu> because it got a 0
19:36:28 <Wormnest> So what should it answer, there is no maximum distance so 0 seems the best answer
19:36:52 <Samu> MapSize
19:36:58 <Samu> best result
19:37:30 <Samu> it's a DistanceSquare
19:39:36 <Wormnest> But they can fly a lot farther than that in theory since they don´t have a max distance
19:40:02 <Samu> :(
19:40:17 <Wormnest> Just filter out the ones without a max distance
19:40:33 *** Stimrol has joined #openttd
19:41:08 <Wormnest> or make a valuator function that checks for 0 and replaces that with a random very large number
19:42:16 <peter1138> ^ this
19:42:45 <Samu> I'm testing this
19:42:48 <Samu> return ::Engine::Get(engine_id)->GetRange() * ::Engine::Get(engine_id)->GetRange() == 0 ? UINT16_MAX : ::Engine::Get(engine_id)->GetRange() * ::Engine::Get(engine_id)->GetRange();
19:43:03 <Samu> in openttd code
19:44:12 <Wormnest> Why not keep it simple and add a small function to your ai
19:44:59 <LordAro> Samu: use a variable so you don't have to repeat Engine::Get every time
19:45:07 <Samu> because the problem is not there :(
19:45:16 <LordAro> or GetRange even
19:45:47 <Samu> I tried, but it complained about a default being there
19:46:05 <Samu> it's inside a switch
19:46:17 *** andythenorth_ has quit IRC
19:46:38 <LordAro> "it complained about a default being there"
19:46:42 <LordAro> oh
19:46:57 *** KouDy has joined #openttd
19:46:57 <LordAro> yeah, if you declare a variable inside a case statement you need to wrap the whole case inside {}
19:47:09 <LordAro> e.g. case foo: { int i = ...; }
19:47:14 <Samu> ah
19:47:18 <Samu> ok, will do
19:47:20 *** andythenorth_ has joined #openttd
19:48:51 <peter1138> andythenorth_, have you considered not leaving and rejoining every few minutes?
19:49:55 *** andythenorth_ has quit IRC
19:50:40 <peter1138> I'll take that as a no.
19:50:54 <LordAro> lol
19:52:57 <Samu> uint16 range = ::Engine::Get(engine_id)->GetRange() * ::Engine::Get(engine_id)->GetRange(); return range == 0 ? UINT16_MAX : range;
19:53:06 <Samu> in 2 lines
19:53:57 <LordAro> much better, right? :)
19:54:09 <LordAro> i'd probably add another variable
19:54:14 <Samu> yes, i didn't know about the brackets
19:54:31 *** KouDy has quit IRC
19:55:23 <Samu> Sampson U52 maximum distance is 65536
19:55:37 <Samu> looks like uin16 is too short
19:55:45 <Samu> gonna try uint_32
19:56:38 <Samu> or whatever the max squirrel accepts, which I dunno
20:00:01 <Samu> @calc 4096*4096
20:00:01 <DorpsGek> Samu: 16777216
20:00:43 <Samu> Sampson U52 maximum distance is -1 :(
20:00:48 <Samu> bah i fail
20:02:34 *** Supercheese has quit IRC
20:02:55 *** Supercheese has joined #openttd
20:03:06 <Samu> what is the highest number that squirrel likes?
20:06:01 *** tokai|noir has joined #openttd
20:06:01 *** ChanServ sets mode: +v tokai|noir
20:06:48 <peter1138> Tried INT32_MAX?
20:07:03 <Samu> Sampson U52 maximum distance is 2147483647
20:07:12 <Samu> yes, tried that
20:07:13 <Samu> just now
20:07:16 <Samu> it works
20:11:57 <Samu> return range == 0 ? INT32_MAX : range;
20:12:01 <Samu> will it be fixed?
20:13:01 *** tokai has quit IRC
20:13:41 <Samu> or is it "not a bug" :(
20:14:17 <Samu> having to work around the problem in the AI side is boring :(
20:14:23 <LordAro> what's the problem?
20:14:48 <Samu> coding to evade a bug
20:18:15 <LordAro> The maximum distance between two orders for this vehicle or 0 if the distance is unlimited."
20:18:23 <LordAro> i'd definitely say not a bug, i'm afraid
20:18:32 <LordAro> just make your own function that wraps it
20:24:31 <Samu> not sure how to do it
20:24:40 <Samu> im trying something, but it's not working
20:28:13 <Samu> ah, i think i did it
20:33:25 <Samu> https://paste.openttdcoop.org/pjfxbqdcs
20:33:27 <Samu> ugly
20:33:50 *** Vlowszx has joined #openttd
20:34:18 <Samu> lines 26-33 shouldn't exist if openttd core was fixed :(
20:34:22 <Samu> code*
20:34:57 <LordAro> i was thinking more of a function that wraps AIEngine.GetMaximumOrderDistance
20:35:48 <Samu> forgot the keepabovevalue in there
20:36:03 <LordAro> i.e. function foo(...) { local bar = GetMaximum...(); return bar == 0 ? INT_MAX : bar; }
20:36:14 *** Gja has joined #openttd
20:37:25 *** mindlesstux has quit IRC
20:44:01 <peter1138> LordAro, programmer vs ... whatever samu is doing.
20:44:51 <LordAro> we've all flailed at some point
20:45:22 <Samu> :)
20:45:46 <Samu> you mean a custom-made valuator function
20:46:25 *** glx has joined #openttd
20:46:25 *** ChanServ sets mode: +v glx
20:46:30 <Samu> gonna try
20:47:43 <Samu> yeah this isn't working
20:48:09 <Samu> parameter 1 has an invalid type 'function'; expected 'integer'
20:48:39 <LordAro> you're probably doing something wrong :p
20:55:11 <Samu> https://paste.openttdcoop.org/po9qykj5r
20:55:14 <Samu> gonna test
20:55:28 <Samu> fails already damn it
20:55:58 <LordAro> does function::WriteAI::GetMaximumOrderDistance look right to you?
20:56:28 <LordAro> do please try to think about what you're doing before asking
20:56:32 <LordAro> it saves everyone time
20:57:17 <Samu> oh, i see
20:57:45 <LordAro> (also, actually run it and read the error message)
20:58:19 <Samu> function WrightAI::GetMaximumOrderDistance(engineId) {
20:58:24 <Samu> without ::
20:58:28 <LordAro> better :)
20:58:30 <Samu> works now, thx
20:59:35 <Samu> the error was about some 'IDENTIFIER' thing
21:00:09 <LordAro> mm, those can be a bit obscure sometimes, but they're generally syntax related
21:06:19 <Samu> https://noai.openttd.org/api/trunk/classAIEngine.html#a0d3c115704bfc200432f4908df8b6ff "or 0 if the distance is unlimited"... boooo
21:06:25 <Samu> oh well
21:06:30 <Samu> i guess it's not gonna be fixed
21:07:57 <LordAro> literally already quoted and said that :p
21:19:29 <peter1138> -ENOBUG
21:25:08 *** frosch123 has quit IRC
21:28:38 <Samu> why's the ai now building helicopters for large airports... :( bah i failed somewhere
21:34:30 <Samu> fixed :)
21:34:35 <Eddi|zuHause> <LordAro> we've all flailed at some point <-- but it takes a real master to continue flailing for years
21:48:12 <Wolf01> Is there a steam service somewhere which tells you what to play?
21:50:46 <LordAro> i think there is something that will select a random game from your library
21:50:49 <LordAro> i've no idea where
21:55:10 <peter1138> heh
21:55:52 <Wolf01> Nice, there are some games with good discount, I could buy even those to add more to the indecision roulette
22:03:29 <peter1138> Indeed
22:03:39 <peter1138> And pick up some more Humble Bundles...
22:03:48 <Samu> now that I'm working with DistanceSquare instead of DistanceManhattan... I dunno what to do about min_air_distance and max_air_distace :(
22:03:59 <Wolf01> Nah, I have enough of the horror titles :P
22:04:12 <Wolf01> I'll pass this bundle
22:04:40 *** Gja has quit IRC
22:21:53 *** sim-al2 has quit IRC
22:37:31 *** KouDy has joined #openttd
22:49:12 <Samu> how do I get squareroot in squirrel?
22:55:35 <peter1138> Do you need it?
22:55:56 <peter1138> Or can you just compare against a square number?
22:59:01 <Samu> i want to calculate the optimal number of aircraft for a route of 'squared distance'
22:59:47 <LordAro> instead of doing x < sqrt(y), it's often easier to do x * x < y
23:00:06 <Samu> i have the location of both airports, I have the squared distance, now I need to know how many aircraft this route needs
23:01:05 <Samu> with distance manhattan it was easier
23:03:41 <Samu> i think i found a way, brb
23:04:57 <Samu> actually, no :(
23:16:14 *** andythenorth has joined #openttd
23:16:30 <andythenorth> peter1138 I need a bouncer :(
23:16:52 <andythenorth> I can’t run one on my phone probs
23:17:34 <andythenorth> unrelated, since when are articulated vehicles reversible? https://www.tt-forums.net/viewtopic.php?f=26&t=68616&start=240#p1212198
23:18:02 <LordAro> i hear some ottdcoop people run a bouncer
23:18:32 <andythenorth> I googld it
23:18:50 <andythenorth> didn’t find a clear answer
23:21:06 *** andythenorth has quit IRC
23:21:46 *** andythenorth has joined #openttd
23:21:54 <andythenorth> 3 minutes is not long for network timeout :x
23:23:57 <Samu> think i'm gonna use 2 distances... :(
23:24:16 <Samu> 2 distance types for every route :(
23:25:59 *** andythenorth has quit IRC
23:35:28 *** snail_UES_ has quit IRC
23:44:21 *** synchris has quit IRC
23:51:49 *** HerzogDeXtEr has quit IRC