Log for #openttd on 21st December 2018:
Times are UTC Toggle Colours
00:20:06  <Samu> what about trams, how the bridge named?
00:24:03  *** chomwitt has quit IRC
00:24:45  <Samu> "Note: The speed is in OpenTTD's internal speed unit. This is mph / 1.6, which is roughly km/h. To get km/h multiply this number by 1.00584. "
00:25:12  <Samu> it's not 1.00584
00:25:23  <Samu> it's ((1 * 10 * 103) >> 6) / 16
00:25:39  <Samu> @calc ((1 * 10 * 103) >> 6) / 16
00:25:39  <DorpsGek> Samu: Error: Something in there wasn't a valid number.
00:26:18  <Samu> @calc ((1 * 10 * 103) / 64) / 16
00:26:18  <DorpsGek> Samu: 1.005859375
00:27:18  *** Fuco has quit IRC
00:59:32  *** Wormnest_ has quit IRC
01:01:50  *** k-man has quit IRC
01:02:31  *** k-man has joined #openttd
01:17:22  <Samu> aqueduct bridges are named Wooden rail bridges too
01:18:41  <LordAro> Samu: sounds like you have some issues to file
01:22:06  *** m1cr0man has joined #openttd
01:22:09  *** HerzogDeXtEr1 has quit IRC
01:30:09  <Samu> GetBridgeSpec->transport_name is only road and rail, doesn't include water?
01:39:58  <Samu> (undefined string)
01:40:05  <Samu> is the name I get for aqueducts atm
01:51:04  *** Progman has quit IRC
02:27:29  <Samu> looks like #include "table/strings.h" solves my issue
03:26:32  *** Samu has quit IRC
03:51:48  *** glx has quit IRC
04:14:44  *** Mahjong2 has joined #openttd
04:22:04  *** Mahjong1 has quit IRC
06:39:41  *** Wacko1976 has joined #openttd
07:47:47  *** Mahjong has joined #openttd
07:52:04  *** Mahjong2 has quit IRC
08:08:06  *** tokai|noir has joined #openttd
08:08:06  *** ChanServ sets mode: +v tokai|noir
08:14:39  *** tokai has quit IRC
08:31:51  *** andythenorth has joined #openttd
08:34:44  <dihedral> Good morning
08:35:02  <andythenorth> moin
09:29:28  *** Progman has joined #openttd
09:44:15  <andythenorth> so in nml, what is 'shorten_vehicle' ?
09:44:41  <andythenorth>
09:53:39  <Flygon> It's the counterpart to 'scomo_vehicle', the bus that traverses Queensland.
09:53:43  <Flygon> (Sorry. Awful. I know.)
10:34:05  *** Alberth has joined #openttd
10:34:05  *** ChanServ sets mode: +o Alberth
10:34:20  <Alberth> moin
10:35:30  <LordAro> an Alberth !
10:35:41  <Alberth> hai!
10:36:23  <Alberth> how is?
10:38:04  <andythenorth> lo Alberth :)
10:41:45  <Alberth> You saw ?
10:42:04  <Alberth> quite useful pictures to add to firs docs perhaps
10:42:35  <andythenorth> could use it's own page
10:42:41  <andythenorth> its *
10:43:05  <Alberth> note sure why the cursor tile is outside the industry building, seems a bit weird?
10:43:10  <Alberth> *not
10:43:19  <andythenorth> there are water tiles
10:43:23  <andythenorth> to ensure clearance
10:43:36  <Alberth> oh right, makes sense
10:43:58  <andythenorth> sometimes I wonder about some kind of industry layout preview
10:44:14  <Alberth> I was wondering about that too currently :)
10:44:50  <Alberth> in the place-object code somewhere
10:45:17  <Alberth> I once messed in reorganizing that, not sure if it ever got committed
10:46:55  <LordAro> Alberth: am good, christmassing it up. you?
10:48:00  <Alberth> quite good, burning free days from work before the year ends :)
10:48:46  <Alberth> not quite in christmas mood, but that's usual the case
10:49:56  <Alberth> and warm temperatures, and only a single morning some snow doesn't help
10:50:45  <Alberth> I wrote some docs about the servers, TB is likely busy?
10:51:28  <Alberth>
10:51:32  <andythenorth> I am slightly christmasy
10:51:37  <andythenorth> but not as much as I wanted
10:51:55  <Alberth> more jingle bells music needed :)
10:52:03  <Alberth> busy with the end of the year I guess
10:53:06  <andythenorth> not really
10:53:15  <andythenorth> :)
10:53:43  <andythenorth> I keep trying to achieve OpenTTD things as I have a day or two spare, and find I'm blocked :)
10:54:09  <Alberth> :o
10:55:02  <andythenorth> the problem with improving things is that lots gets broken :)
10:55:04  <Alberth> tanks are calling?
10:55:18  <andythenorth> not on a Friday, games are full of drunks
10:55:40  <Alberth> oh, yes, improving is always a disaster
10:56:01  * andythenorth wonders which nml repo we're using now
10:56:05  <andythenorth> as there are two
10:57:07  <Alberth> the openttd github one and the devzone one?
10:57:08  <andythenorth> presumably this one is deprecated
10:57:19  <Alberth> yes, I'd assume that too
10:57:29  <andythenorth> in favour of
10:58:07  <Alberth> would seem useful
10:59:03  <andythenorth> oh the issues aren't moved
11:00:00  * andythenorth adds a news item
11:01:01  <andythenorth>
11:02:00  <andythenorth> I guess the intent is to script moving the issues
11:02:14  <Alberth> +1 for the news
11:02:42  <Alberth> script would be useful, assuming more devzone stuff will be moved?
11:02:53  <andythenorth> that was frosch's plan
11:03:06  <andythenorth> ha, all I was trying to do was write a test case for a possible bug
11:03:13  <andythenorth> but of course, bureaucracy
11:03:26  <Alberth> :D
11:03:29  <andythenorth>
11:04:41  <Alberth> great!
11:08:01  <planetmaker> moin
11:09:14  <planetmaker> good point about those news, andythenorth !
11:09:37  <planetmaker> And yes, more of that stuff should be moved. At best probably all...
11:09:51  <planetmaker> would make some things a lot easier
11:14:38  <planetmaker> grfcodec ... would want to get moved, too
11:14:54  <planetmaker> and OpenGFX, I'd think
11:16:25  *** Fuco has joined #openttd
11:39:45  *** andythenorth has quit IRC
11:40:00  *** andythenorth has joined #openttd
11:41:08  <Alberth> andy: industry preview may be tricky, currently, it's only drawn after placement, so the newgrf can query the specific tiles
11:41:42  <andythenorth> pre-composed sprite has been suggested
11:41:53  <andythenorth> all that's needed is the tile layout, similar to airports
11:42:02  <planetmaker> basically like bridges have a sprite in the selection menu?
11:42:11  <planetmaker> or airports view pre-view?
11:42:13  <andythenorth> but I never thought of a way to cycle through the layouts
11:42:21  <Alberth> for all orientations, ie adapting to height diferences etc?
11:42:29  <andythenorth> all we really need to know is 'valid location or not?'
11:42:34  <planetmaker> that sounds too complicated, @Alberth
11:42:42  <Alberth> it does
11:42:51  <andythenorth> 'yup or nope'
11:42:52  <andythenorth> is enough
11:42:53  <planetmaker> airports are simpler in their view.... just a fixed choice of layouts. Easy to draw
11:44:52  <Alberth> a list of available configurations, and possibly some code deciding yes/no would be most useful
11:45:45  <Alberth> already "would it be buildable here" is not available :(
11:46:32  <planetmaker> it would simply mean to run the building code on the current cursor location
11:46:33  <Alberth> we need a newnewgrf :p
11:46:38  <planetmaker> could possibly be automated
11:46:39  <andythenorth> planetmaker: any idea what 'shorten_vehicle' is? o_O
11:46:40  <andythenorth>
11:46:56  <planetmaker> andythenorth, yes. lengths different than 8/8
11:47:57  <planetmaker> I thought you use it already a lot? :)
11:48:26  <andythenorth> it's not in the docs :)
11:48:27  <planetmaker> it's the vehicle-length callback
11:48:41  <Alberth> nah, the generator eons ago written by andy does :)
11:49:29  <andythenorth> oh it changed in 0.3
11:49:40  <planetmaker> ah, yes. Called 'length' now
11:50:34  <andythenorth> planetmaker: I found a clue :P
11:51:02  <planetmaker> :)
11:51:33  <planetmaker> so... where is shorten_vehicle used still? :D
11:51:39  <andythenorth> example
11:51:41  <andythenorth> I'll fix
11:51:43  <planetmaker> ty
11:51:43  <andythenorth> and do a PR
11:51:59  <andythenorth> then I can try and replicate the broken sprite stack issue
11:52:03  <andythenorth> one thing at a time :P
11:52:38  *** Lejving has quit IRC
11:57:24  <andythenorth>
11:57:40  <andythenorth> looks like I can approve my own work, that's....interesting :)
11:57:53  * andythenorth hasn't approved it
12:15:05  * planetmaker approves
12:16:48  <Eddi|zuHause> i'm getting some annoying freezes in TF, i don't remember those from before... :/
12:17:25  <andythenorth> thanks pm
12:21:09  <planetmaker> hm, I guess I get again a notice from frosch that I abandoned all commit message styles now with NML :P
12:21:29  <planetmaker> it should get the commit message hook like OpenTTD
12:25:29  * andythenorth tries to remember how to make a train in nml :P
12:25:35  <andythenorth> been a long time since I did this
12:28:20  *** Lejving has joined #openttd
12:29:04  * andythenorth finds a bunch of 'new' nml properties
12:29:11  <andythenorth> 'extra_weight_per_wagon' eh? o_O
12:29:17  <andythenorth> and something about powered wagons
12:30:44  <andythenorth> so many possibilities :P
12:38:37  <planetmaker> <-- moderately basic example ;)
12:39:14  <andythenorth> I am really bad at nml :P
12:57:46  *** HerzogDeXtEr has joined #openttd
13:11:23  <andythenorth> ha ha
13:11:27  <andythenorth> the bug must be in Horse
13:13:22  *** Alberth has left #openttd
13:16:00  <andythenorth>
13:40:52  <planetmaker> andythenorth, feel free to ignore my comment and merge it nonetheless :)
14:02:05  *** Flygon has quit IRC
14:02:18  *** sla_ro|master has joined #openttd
14:16:54  <andythenorth> done
14:33:53  *** chomwitt has joined #openttd
14:37:44  *** Samu has joined #openttd
14:42:29  *** lugo has joined #openttd
14:50:22  *** Gja has joined #openttd
14:54:19  <andythenorth> oof
14:54:19  <andythenorth> I have spent hours now trying to figure out why sprite stack doesn't work for articulated vehicles in Iron Horse
14:54:19  <andythenorth> it works in the nml test case
14:54:39  <Eddi|zuHause> it'll be a trivial typo somewhere
14:54:47  <Eddi|zuHause> or compiling the wrong codebase
14:55:39  <andythenorth> that's what I expected
14:56:41  <andythenorth> or testing the wrong grf :P
14:56:41  <andythenorth> it works for non-articulated vehicles
14:56:41  <andythenorth> it works for units of articulated vehicles which have a different ID to lead vehicle
14:56:41  <andythenorth> but it doesn't work for lead unit of an articulated vehicle, or any other unit sharing that ID
14:56:41  <andythenorth> the extra layers are simply not drawn
14:56:49  * andythenorth wonders if register 100 is blitzed by something else
14:57:10  <andythenorth> I'm still favouring type, but it's all the same template
14:57:14  <andythenorth> typo * lol
14:58:38  <andythenorth> I wondered if nml was writing the flag wrong
14:58:43  <andythenorth> but it seems to be correct
14:59:31  <Eddi|zuHause> * andythenorth wonders if register 100 is blitzed by something else <-- nml internal usage? i think we had such a case before
15:00:00  <andythenorth> I am trying to isolate it
15:00:07  <Eddi|zuHause> you could try looking at the nfo output
15:02:58  <andythenorth> I did :)
15:03:10  <andythenorth> the action 0 props look correct, but reading the varaction 2 is :(
15:03:45  <andythenorth> hmm, FORWARD_SELF(0) is in the non-working graphics chain
15:03:45  <andythenorth> but not the working one
15:03:45  <andythenorth> interesting
15:03:45  <andythenorth> let's remove that
15:04:31  <Eddi|zuHause> that sounds right
15:04:39  <andythenorth> ha ha
15:04:41  <andythenorth>             # cannot rely on returning FORWARD_SELF(0), it causes register 0x100 to be read and cleared, where 0x100 is needed for graphics layers
15:04:48  <andythenorth> life
15:04:54  <Eddi|zuHause> allowed values are 1-15 if you want to keep 0x100
15:05:20  <andythenorth> I have read nfo output, nml src, openttd src, I made an nml test case
15:05:22  <andythenorth> and I read nearly all my own src
15:05:36  <andythenorth> and then I find that I've solved this before :P
15:05:38  <andythenorth> always the last place you look
15:06:16  <Eddi|zuHause> well, as soon as you said 100, i thought of exactly that...
15:06:37  <andythenorth> thanks
15:06:54  <andythenorth> I found it by diffing working + non-working nml
15:07:06  <andythenorth> now I have to figure out how to fix it :P
15:07:53  <Eddi|zuHause> i don't know anything about the layer stuff
15:08:33  <andythenorth> FORWARD_SELF(x)...Uses register 0x100 if x is not a constant expression between 1 and 15
15:08:40  <andythenorth> so I just don't set x=0
15:08:47  <andythenorth> that's solvable
15:08:52  <andythenorth> docs ftw
15:09:24  <Eddi|zuHause> yes, x=0 means "use value of 0x100"
15:13:32  <andythenorth> fixed thanks
15:13:36  <andythenorth> one step closer to done
15:14:29  <andythenorth> merge NRT next? :P
15:21:19  *** andythenorth is now known as Guest719
15:21:19  *** andythenorth has joined #openttd
15:22:33  *** Guest719 has quit IRC
15:22:55  <Eddi|zuHause> how does merging NRT progress horse?
15:23:16  <andythenorth> sometimes projects need a break
15:23:33  <andythenorth> and people doing them need less overall to-do list
15:23:49  <andythenorth> and fewer shells with unresolved merge conflicts in them :P
15:24:50  * andythenorth could just close the shells and all the browser tabs
15:24:52  <andythenorth> might be best
15:35:01  *** jinks has quit IRC
15:35:02  *** quiznilo has quit IRC
15:35:05  *** Samu has quit IRC
15:35:34  *** quiznilo has joined #openttd
15:38:06  *** jinks has joined #openttd
15:39:19  *** Samu has joined #openttd
15:50:00  <Samu> forgot how to create a brach :(
15:50:23  <Samu> do i make the changes first, then create a branch, or do I branch first, then i make the changes in it?
15:51:48  <andythenorth> doesn't matter, but usually make the branch first
15:51:49  <andythenorth> to avoid error
15:53:09  <Samu> then i did it wrong :(
15:54:26  <Samu> one other thing, how do i make the old APIs compatible to the updated changes?
15:54:45  <Samu> "compatibility mode in effect" thingy
15:55:47  <Samu> from this: static char *GetName(BridgeID bridge_id)
15:55:50  <Samu> to this: static char *GetName(BridgeID bridge_id, ScriptVehicle::VehicleType vehicle_type);
16:09:52  *** Zuu has joined #openttd
16:11:02  <andythenorth> oh hi Zuu :)
16:11:13  <Zuu> Hello all and andythenorth :-)
16:11:21  <Samu> Zuu: are you the API expert?
16:11:33  <andythenorth> give him a minute
16:11:36  <Zuu> Not are, maybe was.
16:11:40  <andythenorth> he's been away for ages
16:11:48  <andythenorth> don't drive him away instantly with questions :P
16:11:54  <Zuu> :-D
16:12:12  <Samu> I tried to use zuu pathfinder in superlib, i failed :(
16:12:30  <Samu> so i went with copy pasting from roadpathfinder
16:13:42  <Samu> oh, cluelessplus has air support but it's not enabled by default, why's that?
16:14:10  <Zuu> I'd say you can use superlib pathfinder if you need a high level path finder or if it does the things the way you like it by default. But if you have other opinions or what to dig deep into details, you better probably roll your own pathfinder based on the plain pathfinder library.
16:14:59  <Zuu> I didn't get around to truely balance out air support in clueless plus. Aircraft tend to be more expansive while clueless logic work better with swarms of cheaper vehicles.
16:17:36  <Samu> compat_1.8.nut, 1.7, 1.6, etc.. do they belong to bin/ folder only, or are they generated from somewhere in src into the bin folder?
16:18:27  <Zuu> Yes keep them in the installation directory tree and don't put them in content_download or other shared places.
16:19:08  <Samu> hmm, so for the function I'm editing, i have to change all those from 0.7 to 1.8, isn't it? I'm not sure how to go at it
16:19:10  <Zuu> The compat files are provided by OpenTTD and correspond to a specific release/nightly version which is why they should not me copied/moved to shared folders.
16:20:01  <Zuu> You shall never edit the compat files yourself as a script author. Only if you write a patch (or pull request), you want to make changes in them.
16:20:07  <Samu> I'm trying to create a pull request, which changes AIBridge.GetName from taking 1 paramenter, to 2 parameters
16:20:10  <Samu> yes, i am doing it
16:21:10  <Zuu> In that case, when OpenTTD loads an AI or GS it looks which OpenTTD version it is made for and then it will load the compat file that relates to that version.
16:21:52  <Zuu> Eg. if I have an AI that is declared to work for 1.2, compat_1.2.nut is loaded. (and I think it is loaded before, but those details is beyond what I remember)
16:22:23  <Samu> I see, so i gotta add them all the way down to 0.7
16:22:41  <Zuu> Yep if 0.7 had AIBridge.GetName it has to be in each file down to 0.7 I think.
16:23:38  <Zuu> Because I don't think they are layerd ontop of each other, but you can probably open the files and see if it looks like they are being layered ontop or not. Or just grep for "compat_" in OpenTTD source code to figure that out.
16:23:56  <Samu> i dunno how to make the conversion code
16:24:44  <Samu> i wanna take the old AIBridge.GetName(blabla) and make it call the new AIBridge.GetName(blabla, 0)
16:26:44  <Samu> not sure how to use the <- thingy
16:26:49  <Zuu> I think something along the lines of this:
16:26:50  <Zuu> _AIBridge_GetName <- AIBridge.GetName;
16:26:50  <Zuu> AIBridge.GetName <- functionb(blabla) {
16:26:50  <Zuu> 	_AIBridge_GetName(blabla, 0);
16:26:50  <Zuu> }
16:29:16  <Zuu> You can look it AIAI and myAPIpatch.nut for lots of API override magic :-)
16:30:43  <Zuu> Using AIBridge.GetName_ <- ... may be better to avoid conflicting with AI/GS namespaces.
16:31:17  <Zuu> But have a look in the existing compat files and chances are there is some convention already set on how to name it in the compat files?
16:32:25  <Zuu> In compat_1.2.nut it looks like it put the underscore first. So I'd go with that.
16:40:51  <Samu> AIBridge._GetName <- AIBridge.GetName; AIBridge.GetName <- function(bridge_id) { 	return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL); }
16:41:20  <Zuu> Looks good.
16:41:41  <Samu> let me test
16:47:29  <Samu> AIVehicle.VT_RAIL must also exist in 0.7 right?
16:48:01  <Zuu> I beleive so as rail was supported originally.
16:48:04  <Samu> hmm maybe not
16:48:18  <Samu> not sure now :(
16:48:20  <Zuu> You could see if any API accept it and was available in 0.7
16:48:54  <Zuu> But that's not the point.
16:49:14  <Zuu> The compat file is run by OpenTTD 1.9 which has AIVehicle.VT_RAIL.
16:49:54  <Samu> ah, nice, so in the case of GS, I have to use GSVehicle.VT_RAIL. probably
16:50:03  <Zuu> Yep
16:50:27  <Samu> boring, gotta eddit 15 or so compat.nut files
16:51:05  <Zuu> The new compat file you create should only be used by OpenTTD 1.9 and not older versions of OpenTTD. Because that would break as they don't know the second parameter. (which is why you shouldn't move compat files to shared folders)
16:51:58  <Zuu> Assuming it can go on the end you could do cat new_text.txt >> compat_0.7.nut etc.
16:52:26  <Zuu> Or do some clever find replace on the file ending symobology or similar.
16:53:57  <Samu> i'll do manually
16:58:23  <Samu> GSBridge._GetName <- GSBridge.GetName; GSBridge.GetName <- function(bridge_id) { 	return GSBridge._GetName(bridge_id, GSVehicle.VT_RAIL); }
17:02:28  <Samu> commit message, hmm
17:02:34  <Samu> Fix? Change?
17:05:07  <Samu> I'll go with Change
17:06:56  <Samu> Change: AI/GS ScriptBridge::GetName takes one extra parameter to refer the vehicle type
17:06:58  <Samu> good?
17:08:12  <Samu> im uploading
17:14:22  <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick opened pull request #6988: Change: AI/GS ScriptBridge::GetName takes one extra parameter to refer the vehicle type
17:14:23  <andythenorth> ok so afaict wiki docs are all updated for
17:14:25  <andythenorth> which is good
17:14:36  <Samu> posted
17:14:58  <Samu> already advertised here, heh
17:15:37  <andythenorth> but the docs might need expanded :P
17:15:40  <Samu> i didnt' test the compat modes other than AI 1.4
17:15:50  <Samu> hope it works
17:18:26  *** frosch123 has joined #openttd
17:18:54  <andythenorth> quak
17:19:23  <frosch123> moo
17:20:57  <andythenorth> frosch123 nml's use of 0x100 rolled me again :P
17:21:01  <andythenorth> great story
17:21:10  *** nielsm has joined #openttd
17:22:21  <andythenorth> so industry props 25-28 are supported by commits here
17:22:28  <andythenorth> I'll make a test case for those
17:22:47  <Samu> if failed
17:22:51  <andythenorth> I don't see any support there for vars 69-6F
17:24:35  <Samu>  error: cannot initialize return object of type 'char *' with an rvalue of type 'bool'
17:24:46  <Samu> what is this
17:24:47  <andythenorth> hmm, looks like nml still has a .hgignore :)
17:24:48  <Samu> :(
17:25:10  <Samu>
17:27:18  <Samu> visual studio never errors me in these parts, why the other compilers hate it ? :(
17:29:15  <Samu> error: cannot convert 'bool' to 'char*' in return
17:30:52  <nielsm> the "false" in EnforcePrecondition(false, morestuffhere) is the return value for the containing function
17:31:19  <nielsm> (I discovered this in 10 seconds by hovering over the use of EnforcePrecondition in visual studio to see the macro expansion)
17:31:34  <nielsm> and your ScriptBridge::GetName function has a return type of char*
17:31:34  <Samu> yeah, but you're a pro
17:31:46  <nielsm> so obviously the type is wrong
17:32:33  <nielsm> visual c++ might accept false because it can convert to integer 0, and integer 0 converts to nullptr which is a valid value for char*
17:32:59  *** Alberth has joined #openttd
17:32:59  *** ChanServ sets mode: +o Alberth
17:33:16  <nielsm> and it's probably a bug that visual c++ accepts it
17:34:01  <Samu> hmm if I don't use EnforcePreCondition, what do I do?
17:34:11  <nielsm> there's nothing wrong with using EnforcePrecondition
17:34:23  <nielsm> but you need to figure out what you want the function to return when the precondition fails
17:34:44  <Samu> well, default it to VT_RAIL then
17:34:50  <Samu> as it used to be
17:35:07  <Samu> ideally it should error
17:35:08  <nielsm> you can't return false from a function that's declared to return a string, so you need to return an empty string or a nullptr or a string indicating an error
17:40:50  <Samu> ah
17:40:51  <Samu> EnforcePreconditionEncodedText
17:41:13  <Samu> StrEmpty(string)
17:41:30  <nielsm> no
17:41:37  <nielsm> why do you think that would be correct at all?
17:41:52  <nielsm> EnforcePrecondition is the correct thing to use, but you're using it wrong
17:42:48  <Samu> how to i make it error out with precondition failed?
17:43:13  <nielsm> EnforcePreconditionEncodedText checks if a string type parameter is missing or empty and produces an error if it is, but you are not checking a string type parameter so it's incorrect
17:44:05  <nielsm> what do you think the boxed part of this definition does?
17:44:53  <Samu> ah ithink i know
17:44:55  <Samu> EnforcePrecondition(NULL, vehicle_type == ScriptVehicle::VT_ROAD || vehicle_type == ScriptVehicle::VT_RAIL || vehicle_type == ScriptVehicle::VT_WATER);
17:45:18  <Samu> return NULL, much like the other above
17:46:56  <Samu> i don't see any enforce precondition with a NULL anywhere, it's awlays with a false
17:47:08  <Samu> i'm failing convention
17:47:11  <nielsm> that's because all the other functions return bool
17:47:54  <nielsm> in script_goal.cpp you'll find some that return GOAL_INVALID rather than false
17:54:32  <andythenorth> can I just approve this PR?
17:54:47  * andythenorth really wants to get the 16 industry support into nml
17:54:54  <andythenorth> and $stuff gets in the way :)
17:55:06  <nielsm> yeah let's do that
17:55:30  <andythenorth> :)
17:55:33  *** sla_ro|master has quit IRC
17:56:15  <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick updated pull request #6988: Change: AI/GS ScriptBridge::GetName takes one extra parameter to refer the vehicle type
17:56:33  <Samu> hmm, forgot how to rebase stuff
17:56:46  <andythenorth> thanks
17:57:00  <andythenorth> dorpsgek doesn't know about the nml repo :P
17:57:08  <andythenorth> should I fix dorpsgek?
17:57:33  <Samu> ok, the NULL is there, so i guess I rebased this correctly, let's hope now the commit-dude likes it
17:58:28  <andythenorth>
17:58:29  <andythenorth> again
18:00:37  <andythenorth> nielsm: can you remember where we got to with your nml patches? o_O
18:00:42  <andythenorth> my notes locally aren't great :P
18:00:48  <andythenorth> I think I tested all of them
18:01:54  <nielsm> uh, I think three properties implemented, one half-implemented (the input-output production rates one), and nothing done for callbacks or properties
18:02:00  <nielsm> is what I did at least
18:02:24  <andythenorth> I am going to assume all your patches are good :P
18:02:31  <andythenorth> and rebase to them in my branch
18:02:52  <nielsm> I think I might have syntax checked them, and nothing else :)
18:04:09  <andythenorth> I'm sure I tested and ran them
18:04:20  <andythenorth> and I need to write test cases against them so eh :)
18:06:58  <nielsm> I can help implement it, but I don't know the first thing about NML coding or what would be idiomatic ways to express the new things
18:07:23  <andythenorth> well planetmaker is here too :D
18:07:31  <nielsm> a target "want this to parse and generate this NFO" would be great to have
18:09:27  *** Fuco has quit IRC
18:14:13  <Samu> well it failed
18:17:10  <Samu>
18:17:20  <Samu> regression test fail because... why?
18:17:28  <Samu> wrong number of parameters
18:19:06  <Samu> print("    GetName():          " + AIBridge.GetName(i));
18:19:08  <Samu> i see
18:19:18  <Samu> what is the API version used for the regression test?
18:19:27  <nielsm> the latest
18:19:33  <Samu> ah, that's why it failed
18:19:41  <nielsm> I assime
18:19:43  <nielsm> assume
18:20:26  <Samu> how am I handling this peculiar situation  :(
18:20:37  <nielsm> although I hope there are tests for all api versions
18:20:45  <Samu> there are 3 names now
18:20:48  <Samu> per bridge
18:21:02  <nielsm> well you update the test so it still tests the function in full
18:21:18  <nielsm> or at least tests is sufficiently
18:22:06  <Samu> print("    GetName():          " + AIBridge.GetName(i, AIVehicle.VT_RAIL));
18:22:20  <Samu> this should equal the name of the file it's comparing to
18:22:30  <Samu> but there's also 2 other names now
18:22:37  <Samu> and im not testing it
18:22:46  <Samu> or, rather, the regression is not testing them
18:24:43  <Samu> if i make the regression test them, the results will differ yet, i have to also edit the results :(
18:24:53  <Samu> i'm unsure what's the best thing to do
18:31:55  <andythenorth> oops
18:32:00  <andythenorth> I need a recent build of ottd
18:32:04  <andythenorth> I'd better unbreak mine :(
18:34:11  <andythenorth> oof build is broken again
18:34:27  <andythenorth> src/ai/../rail_type.h:53:6: note: forward declaration of 'RailTypes'
18:34:28  <andythenorth> enum RailTypes : uint64 {
18:35:02  <andythenorth> oh I need to patch
18:35:05  * andythenorth forgot
18:35:39  <Samu> I'm going with the "tests it sufficiently" theory
18:37:42  <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick updated pull request #6988: Change: AI/GS ScriptBridge::GetName takes one extra parameter to refer the vehicle type
18:37:51  <Samu> inb4 another fail
18:38:03  *** Alberth has left #openttd
18:42:39  <andythenorth> wow FIRS code is bonkers
18:42:41  * andythenorth looking at it
18:42:43  <andythenorth> best not to
18:42:47  <andythenorth> soooooo much code
18:44:13  <Eddi|zuHause> the trick is to do the same thing with less code
18:45:45  <Samu> there's still a lack of distinction between road and tram for bridges
18:45:53  <Samu> namewise
18:46:19  <Samu> a tram bridge is still named as a road bridge
18:47:29  *** Eddi|zuHause has quit IRC
18:48:01  *** Eddi|zuHause has joined #openttd
18:50:07  <andythenorth> ok I have an nml industry with prop 25 and 26 working, and the tile acceptance
18:50:13  <andythenorth> but the prod multiplier baffles me :)
18:50:20  <andythenorth> I think we got stuck on the format for that?
18:51:22  <andythenorth> specifically prop 28
18:51:29  <andythenorth>
18:53:28  <andythenorth> nielsm: ^ what's the intended property format there? o_O
18:53:38  <andythenorth> I can at least make the test case use it :)
18:56:09  <peter1138> What was thet opensource github clone?
18:57:32  <peter1138> I think nielsm mentioned it.
18:57:53  <andythenorth> gitlab?
18:57:59  <andythenorth> gitea?
18:58:06  <peter1138> Nope
18:58:36  <andythenorth> dunno
18:58:56  <peter1138> Had CI and CF abilities.
18:59:07  <peter1138> Some hosted thing for open source projects
18:59:17  <Xaroth> gitlab has a  CI thing
18:59:24  <peter1138> Sure but it wasn't gitlab
19:01:59  <Samu> it passed!
19:02:37  *** Fuco has joined #openttd
19:03:36  *** gelignite has joined #openttd
19:05:31  <Samu> one simple fix, required 24 files to be changed... annoying
19:05:37  <Samu> but it's done now
19:09:58  <andythenorth> he found azure pipelines
19:10:02  <andythenorth> but that's different :P
19:10:54  <nielsm> andythenorth, the NFO format of the property?
19:10:55  <Samu> oh, the comment needs fixing too, lol
19:10:58  <Samu> my bad
19:11:35  <Samu> nevermind, it doesn't
19:11:41  <Samu> it's fine
19:12:23  <nielsm> andythenorth, does this answer your question?
19:13:43  <nielsm> okay the second line comment is wrong, it's 5 props ;)
19:15:48  <andythenorth> it's in the wiki too
19:16:16  <andythenorth> I'm just puzzled by what the nml format is :)
19:16:31  <andythenorth> I think this is where we got stuck last time
19:17:29  <nielsm> what would you like the NML format to be?
19:17:34  <andythenorth> I don't know :)
19:17:51  <andythenorth> I'll just implement the test case as whatever is already doen
19:17:53  <andythenorth> done *
19:18:05  <nielsm> probably an array of arrays is the most sensible way to do it
19:18:19  <andythenorth> this is the replacement for props 1C-1E, which are stupid anyway :)
19:18:45  <andythenorth> if I read the python correctly, it expects an arrray of arrays
19:19:56  <andythenorth> oh I got a 'nope' :)
19:20:02  <andythenorth> nmlc ERROR: "example_industry.nml", line 40: Input multiplier must be an array with a multiple of 3 values
19:20:15  <andythenorth>         input_multiplier: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]];
19:20:20  <andythenorth> I have 4 in / 4 out
19:21:33  <nielsm> so bad validation
19:22:44  <andythenorth>
19:22:51  <andythenorth> or I'm doing it wrong?
19:23:52  <nielsm> ahh, no that's for the old format
19:24:26  <nielsm> which was [input-cargo-slot, output-cargo-slot, multiplier] sequences
19:25:09  <nielsm> (those are "local" slots i.e. the order of input or output cargo types defined on the industry)
19:26:39  <andythenorth> so we need to update the nml patch for prop 28? o_O
19:26:47  <nielsm> yes
19:29:36  <andythenorth> I'll write a test case for prop 27 meanwhile
19:34:55  <andythenorth> prop27 works
19:35:57  <andythenorth> is IND_FLAG_LONG_CARGO_TYPE_LISTS needed if CBs aren't used?
19:36:11  <andythenorth> seems not to be needed for action 0 props
19:38:52  <nielsm> I think it's only required for those yes
19:40:31  * andythenorth wonders if we can just not support prop 28 in nml :P
19:40:40  <andythenorth> currently though, only the first cargo is produce
19:40:43  <andythenorth> produced *
19:41:53  <andythenorth> should we change the default so it divides evenly over all output cargos?
19:42:45  <andythenorth> oh max out is capping to 3 for some reason
19:43:14  <andythenorth> what the hell is moreindustriesperclimate?
19:43:25  <andythenorth> Eddi|zuHause: ^ any idea? o_O
19:43:45  <nielsm> sounds like a ttdpatch thing
19:43:51  <Eddi|zuHause> sounds like an ancient ttdpatch option
19:43:52  <andythenorth> adds paper to temperate
19:43:52  <nielsm> probably no longer relevant
19:44:00  <andythenorth> I was trying to use that in my test case :P
19:44:01  <andythenorth> oof
19:44:31  <Eddi|zuHause> openttd most likely hardcodes these to always apply
19:45:05  <andythenorth> ok, the output cargos are fine, as long as author doesn't do stupid things
19:45:24  <andythenorth> ah the 'requires' in fund menu is interesting
19:45:43  <Zuu> Samu: edit 24 files to add an API. That is like what updating the API is. It is rewarding when it allow script authors to make new cool stuff, but the actual work is mostly binding different parts togeather which can be fun sometimes but also lot of small edits here and there. :-)
19:46:13  <andythenorth>
19:46:37  <nielsm> haha
19:46:43  <andythenorth> string handling :)
19:46:43  <nielsm> looks like something was missed
19:47:25  *** gelignite has quit IRC
19:47:52  <Zuu> Some new fancy goals? :-)
19:50:23  <Eddi|zuHause> <-- how about that goal?
19:51:55  <Samu> made a typo in the comments
19:52:14  <Samu> "Other changes." should be "Other changes:"
19:52:19  <Samu> . vs :
19:53:46  <Samu> do i fix it? or it's not needed?
19:59:30  <nielsm> if you're changing the file anyway, go ahead
20:00:03  <Samu> ok
20:00:15  <Samu> giving more work to your servers
20:00:19  <Samu> over a typo
20:05:01  <DorpsGek_II> [OpenTTD/OpenTTD] SamuXarick updated pull request #6988: Change: AI/GS ScriptBridge::GetName takes one extra parameter to refer the vehicle type
20:07:34  <andythenorth> so 64 cargos, 16 in/out at industries, 64 railtypes, NRT
20:07:42  <andythenorth> so are we shipping 2.0 in April?
20:08:28  <nielsm> I think the version number is secretly the release year
20:10:37  <andythenorth> so 2.0 in 16 months time?
20:27:20  <andythenorth> nielsm: so I've got this so far...
20:40:24  <nielsm> yeah
20:40:26  <Zuu> Wow 16 cargoes in/out to industries. :-)
20:41:03  <nielsm> maybe format the input multipliers across multiple lines as a matrix
20:41:36  <nielsm> clarifying that each row represents one input cargo, and each column is the amount of output
20:41:41  <Zuu> Are we still only having 2 companies transporting away from an industry, or is that per cargo?
20:42:08  <nielsm> I don't know, that hasn't changed
20:42:23  <nielsm> but I think it's determined per cargo which station gets it
20:42:34  <nielsm> * which stations get it
20:43:02  <Zuu> If it is per cargo, I think it is fine or at least no worse than before.
20:43:36  <Zuu> Is there any NewGRF planning to have any monster industries with that many cargoes?
20:44:40  <Zuu> nielsm: I like the matrix format and how it corresponds with an OD matrix. :-)
20:45:39  <andythenorth> Zuu: I'm not planning to have 16 in / 16 out
20:45:41  <nielsm> andythenorth has indicated working on a FIRS version with more cargoes
20:46:08  <andythenorth> unless station walking is used, it's ~impossible to get 16 cargos out with trains / RVs / planes
20:46:15  <andythenorth> only ships can do it
20:46:16  <nielsm> yeah using the full 16 in or 16 out won't be fun to play with, probably
20:46:19  <andythenorth> everything else will block
20:46:32  <Zuu> But you could have many in or many out.
20:46:40  <andythenorth> many in is easiest
20:46:43  <nielsm> the thought was that you may as well set the limit higher than someone will realistically want to use
20:46:45  <andythenorth> dropoff stations rarely block
20:47:02  <andythenorth> also could do a huge industry (many tiles) :P
20:47:13  <andythenorth> then more stations fit
20:47:18  <Zuu> 16x16 is that maximum size of industries?
20:47:26  <andythenorth> not sure :)
20:47:33  <andythenorth> never pushed it that
20:47:33  <andythenorth> far
20:47:35  <Zuu> IIRC there is some maximum in tiles.
20:47:42  <andythenorth> game can't build them if they're too big
20:47:45  <nielsm> I don't think industries actually have a maximum size
20:47:45  <andythenorth> no suitable locations
20:47:54  <nielsm> right that's one limitation :P
20:47:58  <andythenorth> there will be a town or transmitter or uneven ground
20:48:10  <andythenorth> so how do we change prop 28 then?
20:48:22  <andythenorth> I have failed to grok this entirely :)
20:48:39  <nielsm> I had an idea for making a feature where the newgrf industry supplies multiple possible sub-buildings and the game picks a random number of those sub-buildings and place separately, near the main building
20:48:58  <andythenorth> there's a variant of that using objects
20:49:00  <andythenorth> as an idea
20:49:06  <andythenorth> fields and stuff
20:49:15  <andythenorth> 'outbuildings'
20:49:20  <andythenorth> 'satellite locations'
20:49:25  <nielsm> objects won't accept cargo and produce stuff, will they?
20:49:28  <andythenorth> nope
20:49:33  <nielsm> exactly
20:49:41  <andythenorth> there is an idea that everything gets redone as objects, including stations
20:49:48  <andythenorth> but eh, smells of OneBigIdea
20:57:26  *** Wormnest has joined #openttd
20:58:43  <andythenorth> nielsm: shall we ignore prop 28?
20:58:44  <andythenorth> :P
20:58:46  <andythenorth> and do the cbs?
21:01:25  <nielsm> working on 28 atm
21:02:33  <andythenorth> ok :)
21:11:41  <Zuu> Oh.. I crashed openttd on worldgen (last nightly from Is there any dumpfile I should rescue?
21:11:54  <Zuu> (on windows)
21:12:25  <nielsm> no new nightlies have been released for a long time, so it might not be relevant any longer
21:13:08  <nielsm> unless TrueBrain suddenly set it up again :)
21:13:11  <Zuu> Ah ok. Everyone compiles on their own?
21:13:44  <nielsm> it just hasn't been set up after the move to github and other changes to infrastructure
21:14:21  <Zuu> No blame, just been away for years so I don't know exactly how it is set up now.
21:15:15  <nielsm> if you dare to use random links from me, you can try one of these:
21:15:17  <nielsm>
21:15:29  <nielsm>
21:16:06  <nielsm> I set up an experimental build a few days ago, and we're probably going ahead with using ms azure devops cloud for future nightlies
21:24:38  <Zuu> Thanks.
21:25:05  <nielsm> actually, those pipelines should also output the PDB files now that you mention it
21:25:12  <nielsm> so thanks, will have to note that somewhere
21:25:47  <Zuu> By the way the 7z file is missing the readme and COPYING file.
21:26:09  <nielsm> that too
21:26:19  <Zuu> and probably changelog.txt should be included too.
21:26:23  <nielsm> I just made it do a simple pack up of the bin folder
21:26:50  <nielsm> well, something would have to update the changelog.txt automatically then :P because it's certainly not being maintained manually right now
21:28:14  <Zuu> I think it used to be compiled before a release possible by parsing the svn log. But I never did that part and does not know exacly how it was caried out.
21:28:48  <andythenorth> defer to github?
21:28:48  <andythenorth> :P
21:29:31  <nielsm> one problem of automated changelog generating is that you might end up with a bunch of small "fix mistake in previous commit" non-changes
21:29:43  <nielsm> unless you're careful to filter those out some way or other
21:30:18  <Zuu> I think there was manual work involved.
21:30:52  <nielsm> there was also one recent case of a change being reverted entirely, an improvement to the blitter performance, that turned out to cause bugs in sprite sorting
21:30:55  <Zuu> Hmm 512x256 map and FIRS 0.3 is giving me 1 industry of each. :-)
21:32:47  * nielsm tries running make in nml
21:33:09  <nielsm> up to test 32 without errors
21:33:28  <nielsm> ls
21:39:30  * Zuu makes all sorts of noob mistakes like forgetting to refit vehicles.
21:40:09  <Zuu> We should have a CTRL-feature to refit all vehicles in the depot :-)
21:40:45  <nielsm> andythenorth: I pushed to my indcargonum branch of nml
21:41:49  <Zuu> But most noticable, if I've filtered vehicles on sand cargo, why doesn't it refit to sand automatically? (I know I ask for code work.. :-p )
21:42:26  <nielsm> yes, that's also one of my small gripes
21:42:51  <andythenorth> cool :)
21:42:55  <andythenorth> I'll pull in a minute
21:42:59  <Zuu> Is it that some NewGRFs have multiple cargoes and eye candy refits that blocks it?
21:43:01  <andythenorth> Zuu: just use station refits
21:43:23  <nielsm> hmm, "gripes: Pinching and spasmodic pain in the intestines."
21:43:35  <nielsm> good thing that's not the only definition
21:44:11  <Zuu> Oo station refits. I don't remember that feature.
21:51:01  <Samu> who can implement timetables for AIs?
21:51:03  <Samu> zuu?
21:51:46  <Samu> plz not me
21:52:07  <Zuu> Nah, I won't dig that deep into code. I might sew a bit but not code.
21:55:07  <Zuu> Also, I think AIs are not that limited by not having timetables. They can do vehicle micro management on a lever humans cannot do.
21:55:09  <Samu> other stuff I'd like the AIs to be able to do was to get the refited cargo capacity of an engine, rather than a vehicle
21:55:14  <andythenorth> oh I have to build nml :P
21:55:18  <andythenorth> forgot
21:56:05  <Samu> right now i need to buy the vehicle, refit it to the cargo to retrieve its capacity, that means wasting money :(
21:56:17  <Samu> bad for planning mode
21:56:22  <Zuu> I think that may be related to the nml/nfo spec
21:56:25  <andythenorth> nielsm: prop 28 works
21:56:38  <andythenorth> I assume we squash most of these commits at the end?
21:56:44  *** Gja has quit IRC
21:56:52  <nielsm> yeah
21:57:07  <andythenorth> so what else did we get new?
21:57:10  <andythenorth> some vars?
21:57:13  <Zuu> If it has not been improved, NewGRFs can display one thing on the veihcel purchase list (text) and provide other props when the vehicle is built.
21:57:55  <andythenorth> they can
21:57:56  <Samu> when i have to manage 300+ routes, my ai is slow
21:57:59  <andythenorth> ideally they wouldn't
21:58:02  <andythenorth> but eh, mail
21:58:31  <Samu> can't micromanage that many vehicles
21:59:00  <Zuu> Yes for scaling up timetables for AIs could help.
21:59:30  <andythenorth> ok so vars need named :P
21:59:33  <Zuu> But then you would only set the wait time on stations right, not actually make a full timetable?
21:59:49  <andythenorth> and they have to be given a parameter
21:59:59  <Zuu> With slack and ability for schedules to recover from disturbances and delays.
22:00:32  <andythenorth> not sure about naming
22:00:32  <Samu> i was looking for a way to maintain a 50% cargo rating on the stations
22:00:50  <andythenorth> if we have produced_this_month_1 and produced_this_month_2 in old spec
22:00:56  <andythenorth> is the new spec just produced_this_month?
22:01:22  <andythenorth> with the cargo in the 60+X param?
22:01:26  <Zuu> CluelessPlus toggles its routes between full load on/off depending on station rating. Which is  a bit more micro management than you can expect humans to do.
22:01:34  *** glx has joined #openttd
22:01:34  *** ChanServ sets mode: +v glx
22:01:53  <andythenorth> hmm
22:01:55  <Samu> i thought of timetables to force buses 5-6 days waiting at a loading bay
22:02:03  <andythenorth> does the 60+ param really do this?  "The 60+x parameter specifies the cargo type as index into the cargo translation table."
22:02:42  <andythenorth> that suggests knowing the cargo index in the CTT
22:02:47  <andythenorth> which is not commonly known
22:02:53  <Samu> my main problem is actually with mail
22:03:16  <Eddi|zuHause> uhm what? you have full control over your CTT
22:03:21  <Samu> its hard to make a profit in desert/ice landscape
22:04:17  <andythenorth> Eddi|zuHause: am I misreading it?
22:04:30  <andythenorth> it's very rare to rely on the position of a cargo in the CTT
22:04:46  <andythenorth> nml abstracts that
22:05:06  <andythenorth> maybe there's an nml built-in that handles it
22:05:11  <Zuu> Samu: Then choose other cargo than mail? Or implement timetables. :-p
22:05:36  <Eddi|zuHause> nml automatically translates cargo labels into CTT entry positions
22:05:55  <andythenorth> usually with industry stuff, it's 'check cargos 1..3' in the industry scope, rather than looking up global cargos in the CTT
22:05:59  <andythenorth> probably doesn't matter
22:06:20  <andythenorth> I am just curious if the docs are accurate
22:06:33  <andythenorth> this means I can query an industry for a cargo it doesn't accept or produce?
22:07:01  <Eddi|zuHause> i can't say i have enough context to judge that
22:07:17  <andythenorth> I am looking for the commit
22:07:21  <Samu> clueless plus
22:07:37  <Samu> let me check my notes
22:07:50  <Eddi|zuHause> i don't even have a clue what var you're talking about
22:07:56  <andythenorth>
22:08:01  <andythenorth> var 69-6F
22:08:25  <Eddi|zuHause> industries? industrytiles? whatever?
22:08:41  <andythenorth> industries
22:08:47  <andythenorth> commit tells more than I can
22:08:50  <Samu> ah, its not cluelessplus i got an issue with. it's roadai using superlib
22:08:50  <Eddi|zuHause> a var number is meaningless without the feature
22:09:37  <andythenorth> it does look like it's CTT index
22:09:57  <Samu> roadai authoer updated library versions to the latest superlib and has since been a failure of an AI. i wonder what the 500 loops warning mean
22:10:02  <Samu> author
22:10:50  <andythenorth> I wonder about naming the nml vars same as the ottd vars
22:10:53  <andythenorth> seems ok
22:12:23  <Zuu> Samu: superlib pf/builder will try X loops from A to B and then abort and search from B to A.
22:12:36  <Samu> SuperLib: Timed out to find path. Used 500 of 500 loops.
22:12:48  <Zuu> X is choosen so that it if A or B is on a small island it should figure that out sooner than later.
22:13:33  <Zuu> But the drawback is that path searches take a bit longer time to perform unless they are very short.
22:13:50  <Samu> ever since this is displayed, RoadAI has been failing to build more than 1 or 2 routes :(
22:14:00  <Samu> it's severely handicapped
22:14:02  *** Fuco has quit IRC
22:14:11  <Samu> it didn't use to be like this with older library version
22:14:17  <Zuu> Is RoadAI your AI?
22:14:19  <Samu> i dunno if it's actually the issue
22:14:20  <Samu> nop
22:14:36  <Samu> it's 11runner
22:14:54  <Samu> SynTrans, on the other hand, does fine
22:15:01  <Samu> seems to be using an older lib
22:15:06  <Samu> same author
22:16:36  <Zuu> Well there is a fix in version 40 for RoadPathFinder not returning as documented, and also a fix for timeout not working.
22:17:02  <nielsm> good night
22:17:03  <Zuu> Inside the tar there is a changelog.txt detailing what changes between the versions.
22:17:51  *** sla_ro|master has joined #openttd
22:19:59  <Samu> import("util.superlib","SuperLib",40);
22:20:16  <Samu> RoadAI-5 imports version 40
22:20:33  <Samu> how would i get older RoadAI's now from bananas?
22:21:46  <Samu> syntrans imports superlib 36
22:21:53  <Samu> but also imports road pathfinder 4
22:22:46  <Zuu> Not all AIs use SuperLib to pathfind. The one in SuperLib is quite opiniated and if you don't like my opinions, you are better of using pathfinder 4.
22:23:31  <Samu> must find out what was RoadAI using on older versions, if it was SuperLib or something else
22:25:03  *** nielsm has quit IRC
22:25:44  *** andythenorth has left #openttd
22:26:00  <Zuu> Not sure if you can obtain older versions of AIs on the web. I think you can get it as a dependency via openttd.exe.
22:26:52  <Zuu> I mean if you download a scenario that depend on an older version of RoadAI, you get that older version assuming they set up the dependencies correctly upon uploading the scenario.
22:28:09  <Zuu> I thnk your best bet is too look for a VCS.
22:28:10  <Samu> - according to, superlib 39 on RoadAI 4
22:28:35  <Samu> that image shows 500 road vehicles
22:29:36  <Samu> hmm
22:29:46  <Samu> gonna trust the forum and download that tar
22:29:48  <Zuu> Well SuperLib 40 has this change "- RoadPathFinder::FindPath and ::GetFindPathError was not responding as
22:29:48  <Zuu> documented
22:29:48  <Zuu> " which I assume could break AIs if they expect the undocumented behaviour.
22:30:27  <Samu> let me try 39 on roadAI 5
22:30:29  <Samu> brb
22:32:04  <Samu> wow, that was it
22:32:12  <Samu> it's building !
22:32:35  <Samu> it was the change from 39 to 40 that broke it
22:32:56  <Samu> gonna post brb
22:37:37  <Zuu> I made a quick comparison of RoadAI 4 and 5:
22:38:04  <Samu> if you wanna say something there
22:39:10  <Samu> so RoadAI prefers the unexpected behaviour :p
22:39:20  <Samu> already with 740 road vehicles
22:39:30  <Zuu> :-p
22:40:14  <Zuu> But a grep on the code shows that it doesn't call the mentioned methods directly but rather using the high level road builder.
22:42:40  *** sla_ro|master has quit IRC
22:44:46  *** Zuu has quit IRC
22:45:05  *** Zuu has joined #openttd
22:45:30  <Zuu> Here you can find all commits from version 39 to 40 of SuperLib:
22:57:11  *** Fuco has joined #openttd
23:01:49  <Samu> 	if(result!=RoadBuilder.CONNECT_SUCCEEDED) return false;
23:02:32  <Zuu> I notice that I init RoadBuilder with max_loops = 5000 in CluelessPlus while RoadAI have it at 500.
23:03:53  <Zuu> Among the things that 40 fixes compared to 39 is "Fix: Road pathfinder doas not timeout (yorg)" (commit log)
23:04:43  *** Wormnest has quit IRC
23:05:04  <Zuu> So with SuperLib 40, I'd say raise max_loops in call to RoadBuilder.Init(). The default value in SuperLib is 4000.
23:06:51  <Samu> gonna try 5000
23:06:56  <Samu> and import 40 this time
23:07:02  <Zuu> But I also found a silly tihng in CluelessPlus code in conjuction with SuperLib. If PF fails it will try again. RoadAI doesn't do this because it doesn't manually call the pathfinder and relies on ConnectTiles to call it.
23:07:09  *** Flygon has joined #openttd
23:08:40  <Samu> rb.Init(newStation,newStation2);
23:09:14  <Samu> where is the 500?
23:09:18  <Zuu> pathfinder.Init(point1,point2,false,500); <-- RoadAI 5
23:09:32  <Zuu> In network.nut
23:09:59  <Samu> oh i found this in main.nut
23:10:04  <Samu> yeah, network.nut
23:10:07  <Samu> let's edit
23:10:48  <Zuu> rb.Init() in main.nut is commented out.
23:12:23  <Samu> oh i see, couldn't tell
23:12:25  *** frosch123 has quit IRC
23:12:32  <Samu> dont have a nice editor for this
23:14:24  <Samu> if i dont put a number there, what happens? defaults to 5000?
23:14:35  <Samu> or never stops finding?
23:14:42  <Samu> or ... hmm :(
23:14:53  *** Chrill has joined #openttd
23:19:28  <Samu> nvm i found it
23:19:29  <Samu> function Init(tile1, tile2, repair_existing = false, max_loops = 4000, forbidden_tiles = []);
23:19:35  <Samu> 4000
23:19:49  <Zuu> SuperLib is not TypeScript or so with fancy IDE docs. You have to open the SuperLib tar and read the docs there as you probably just did. :-)
23:19:59  *** Wacko1976 has quit IRC
23:20:50  <Zuu> I use vim to edit .nut files with a squirrel syntax file I found so I get colors at least.
23:21:22  <Zuu> But these days perhaps Visual Studio Code have something useful for squirrel?
23:24:38  <Samu> with 5000 it's doing alright
23:27:32  *** lugo has quit IRC
23:29:20  <Samu> must do a battle of RoadAIs
23:29:46  <Samu> RoadAI v5 with SuperLib 39 vs RoadAI v5 with SuperLib 40 and 5000 loops
23:30:50  <Samu> 5000 may be too much? gonna leave it at default
23:32:34  <Zuu> I don't know. I don't remember why I have 4000 as default in the library but then 5000 in clueless plus. :-)
23:33:14  <Zuu> Maybe I did some playing around after publishing the library or I just had some reason for it.
23:34:09  *** Compu has joined #openttd
23:38:58  <Samu> superlib 39 is winning
23:39:01  <Samu> atm
23:40:09  <Samu> superlib 40 catches up
23:40:17  <Samu> well this just started, gonna wait 10 mins or so
23:40:55  <Zuu> Did you start all at the same time using startai and did you use more than just two AIs?
23:41:31  *** Progman has quit IRC
23:41:51  <Samu> startai with the main.nut and network.nut edited in one way, then edited the files, and then startai again
23:42:12  <Samu> they're in the same map
23:42:50  <Samu> superlib 40 with default loops is winning
23:43:04  <Samu> map has many water, so i guess timing out is helpful
23:43:30  <Samu> not sure what 39 do? doesn't timeout?
23:43:47  <Zuu> 39 doesn't time out. It is one of the things that 40 fixes.
23:44:02  <Zuu> Which is why the low limit of 500 in RoadAI-4 is not a problem.
23:44:03  <Samu> ah, took 2 years to get a Failed to find path
23:45:03  <Samu>
23:47:39  <Zuu> Yep that is what 40 fixes :-)
23:48:34  <Samu> they started building in the same places for their network
23:48:43  <Zuu> I diged a bit and found it will use 100 loops to find out if one of the points is an island and then start over from the other end.
23:48:46  <Samu> there's many water around
23:49:10  <Zuu> This 100 is hard coded into the library and cannot be configured by the AI.
23:49:42  <Zuu> But you can of course roll your own if you don't like it.
23:54:44  *** Wacko1976 has joined #openttd
23:57:40  <Samu>
23:57:54  <Samu> green is 39
23:58:08  <Samu> red is 40 with default loops
23:59:52  <Samu> the log of SuperLib 40 showing up

Powered by YARRSTE version: svn-trunk