IRC logs for #openttd on OFTC at 2019-03-15
            
00:02:13 *** HerzogDeXtEr1 has quit IRC
00:25:29 *** Progman has quit IRC
00:39:36 *** supermop_work_ has quit IRC
00:41:43 *** drac_boy has left #openttd
00:51:43 *** Thedarkb-T60 has joined #openttd
01:02:59 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN updated pull request #6811: Feature: Add NotRoadTypes (NRT) https://git.io/vhlfg
01:13:04 *** Wormnest_ has joined #openttd
01:14:01 *** Wormnest has quit IRC
01:15:45 *** Wormnest has joined #openttd
01:22:31 *** Wormnest_ has quit IRC
01:25:01 *** Wormnest has quit IRC
01:31:45 *** Flygon has joined #openttd
02:02:16 *** Supercheese has quit IRC
02:15:22 *** Wormnest has joined #openttd
04:10:14 *** Mazur has joined #openttd
04:14:44 *** D-HUND has joined #openttd
04:18:06 *** debdog has quit IRC
04:44:28 *** Samu has quit IRC
04:52:58 *** tokai has joined #openttd
04:52:58 *** ChanServ sets mode: +v tokai
04:53:11 *** Guest3248 is now known as th0bse_
04:59:56 *** tokai|noir has quit IRC
05:06:41 *** dihedral has quit IRC
05:11:04 *** dihedral has joined #openttd
05:44:33 *** Supercheese has joined #openttd
06:11:49 *** glx has quit IRC
07:32:44 *** Alberth has joined #openttd
07:32:44 *** ChanServ sets mode: +o Alberth
07:37:31 *** Smedles has quit IRC
07:37:49 *** Smedles has joined #openttd
08:48:39 *** andythenorth has joined #openttd
08:56:24 <Alberth> o/
09:09:09 <andythenorth> moin
09:10:05 *** stefino has joined #openttd
09:10:23 <stefino> Hi, is possible to delet GRF from bananas?
09:15:41 <andythenorth> no and yes
09:15:50 <andythenorth> there is no way for users to do it
09:16:12 <andythenorth> sysadmin like truebrain can do it, for issues like copyright infringement, etc
09:18:15 <stefino> thanks for answer :)
09:23:47 *** stefino has quit IRC
09:26:38 <Alberth> the right answer is likely "no, but you can publish a new version that overrides the old one"
09:44:40 *** th0bse_ has quit IRC
09:45:02 *** th0bse has joined #openttd
09:45:41 *** th0bse is now known as Guest3331
09:53:48 *** Supercheese has quit IRC
09:54:10 *** Supercheese has joined #openttd
10:06:01 <andythenorth> maybe we should write more GS
10:06:07 <andythenorth> to find out what's wrong with GS
10:15:17 *** Flygon_ has joined #openttd
10:17:43 <peter1138> Yeah?
10:21:04 *** Supercheese has quit IRC
10:21:16 *** andythenorth has quit IRC
10:22:23 <peter1138> Or quit.
10:22:27 *** Flygon has quit IRC
10:27:34 <planetmaker> moin
10:33:47 *** Flygon__ has joined #openttd
10:35:00 <Alberth> o/
10:40:56 *** Flygon_ has quit IRC
11:05:32 *** andythenorth has joined #openttd
11:14:51 *** Thedarkb-T60 has quit IRC
12:20:46 <Alberth> andythenorth: can you convert a partial nfo file to grf? I wonder how to implement linking in a quick and dirty way
12:21:37 <Alberth> I can read a grf container version 2, I should be able to merge 2+ of such files into 1
12:23:21 <Alberth> so that would then basically leave how to modify values in a partial grf
12:24:28 <Alberth> specifying sprite number + offset + what data to write, would that be feasible?
12:30:53 <andythenorth> Alberth: I'm not sure of the details of the format :)
12:31:10 <andythenorth> my assumption is that grf bytes could be split and linked
12:31:34 <Alberth> grfcodec has grf.txt , which has a description
12:31:55 <Alberth> it's a list of sprites, where the real-sprites data is moved to a seperate area
12:32:31 <Alberth> so you can read the sprite-list of all input files, and concatenate them
12:32:42 <Alberth> them move the data after it
12:33:19 <Alberth> it's a bit more involved as sprites point to the data, such pointers must be unduplicated, but that's details
12:35:12 <Alberth> https://paste.openttdcoop.org/pbrc9wjel <- output of my program, confusingly, it names "data" what we know as sprites and vice versa
12:35:48 <Alberth> but that's just plain copying, linking involves changing bytes here and there
12:36:05 <Alberth> do you have ideas there?
12:37:48 <Alberth> would "sprite #10, offset 15, replace 2 bytes by 0xAA 0xBB" work?
12:38:46 <Alberth> first version is probably best text-based for the replacements
12:39:44 <Alberth> hmm, give "0xAA 0xBB" a name perhaps, so you can refer to it?
12:43:13 <andythenorth> I can look later :)
12:43:26 * andythenorth must to work :)
12:43:55 <Alberth> ok
12:47:00 <peter1138> Hi
12:47:24 <Alberth> o/
12:50:26 <peter1138> grfid.cpp inside grfcodec shows roughtly how to read the raw grf format.
12:53:34 <peter1138> There is no index within the file, just a type & size. As long as everything is in the right order, things should refer to the right stuff.
13:01:38 <Alberth> yeah, I just coded reading from the description, it's simple
13:02:45 <Alberth> obviously, in a proper program you'd be able to express where a change would apply, but we don't have that yet
13:02:57 <Eddi|zuHause> do we have to do the linking on binary level?
13:03:37 <Eddi|zuHause> we could do it on an NFO-style intermediate language
13:03:50 <Eddi|zuHause> then maybe people could actually understand what's happening :)
13:04:57 <Alberth> yep, I agree you need to be able to specify linking in text, or nfo is out of the loop
13:04:59 <Eddi|zuHause> CETS does manipulation on NFO level by looking for a specially implanted action C
13:05:31 <Eddi|zuHause> (that is just a really crude hack, though)
13:06:15 <Alberth> I have no idea what you want to express tbh
13:07:04 <Alberth> simple is "replace X bytes in sprite Y offset Z by Q other bytes
13:07:11 <Eddi|zuHause> CETS was having issues with huge file sizes not being processed by NML properly (exploding memory), so i tried splitting it up, a few vehicles at a time
13:07:50 <Eddi|zuHause> this posed the problem that some IDs (like global action2s and string-IDs) need to be constant throughout all these smaller GRFs
13:07:53 <Alberth> Q other bytes should likely also be allowed to be a name for some bytes
13:08:32 <Eddi|zuHause> so i have a "header" and a "body", where the header gets an action C (comment embedded in nfo/grf) that says "header ends here"
13:08:49 <Eddi|zuHause> and everything before this commed gets discarded from the NML->NFO output
13:08:56 <Eddi|zuHause> *comment
13:09:16 <peter1138> Does NML output NFO?
13:09:22 <Alberth> it can
13:09:22 <Eddi|zuHause> yes, with a switch
13:09:37 <Eddi|zuHause> it can output NFO or binary
13:09:48 <Eddi|zuHause> or both, i think :)
13:11:35 <Eddi|zuHause> the combined CETS grf then gets stitched together from a dummy GRF that contains just the header (and a switch that makes use of all the IDs) all the bodies
13:11:58 <andythenorth> iirc you get away with that because you don't use strings in CBs
13:12:11 * andythenorth is hazy on the details
13:12:25 <Alberth> wavey hands and such :p
13:13:00 <Eddi|zuHause> andythenorth: i think that should work, but if you use the NML way to compose strings on compile time, you need to repeat that in the dummy switch
13:13:49 <andythenorth> I tried that and it started to get baroque
13:14:00 <Eddi|zuHause> a linkable-nml compile would need to collect those strings and put them into a symbol table
13:14:04 <andythenorth> I think it would have been possible, but it started to look complicated and fragile
13:14:18 <andythenorth> yes, table, not baroque fake things
13:14:19 <Eddi|zuHause> fragile, definitely
13:14:39 <Eddi|zuHause> needs a lot of discipline to not break it
13:16:45 <Eddi|zuHause> another problem with strings is that NML doesn't abstract away the run-time "textstack" (which isn't a stack) properly
13:17:00 <Eddi|zuHause> but that is independent from linking
13:18:21 *** Samu has joined #openttd
13:22:16 <Alberth> a string is just an id? 2 or 4 bytes or so?
13:24:07 <Eddi|zuHause> i think 2
13:26:18 <Alberth> simple in nfo: 01 02 03 word(foostr) 05 and else where foostr = 0x1234 thus
13:26:33 <Eddi|zuHause> https://paste.openttdcoop.org/pfm70oj8p <-- this is my dummy callback listing all the global IDs
13:27:38 <Eddi|zuHause> (this is a generated file)
13:28:19 <Alberth> but that's required, or just a work-around for something?
13:28:31 <Eddi|zuHause> that is a workaround
13:28:53 <Eddi|zuHause> to force NML to give the same ID to all these strings and CBs
13:28:58 <Eddi|zuHause> reproducibly
13:29:40 <Alberth> nml is a next problem wrt linking, first have something nfo-ish seems a better idea
13:30:05 *** criador15 has joined #openttd
13:30:11 <Eddi|zuHause> but this indicates the kind of IDs that would need to be "linkable"
13:30:32 <criador15> hi
13:31:15 <Alberth> o/
13:31:28 <Alberth> afk for some shopping for a while
13:31:32 <criador15> uh
13:31:37 <criador15> good shopping
13:32:12 <Eddi|zuHause> https://paste.openttdcoop.org/prdlsxozv <-- just for context, this is my "header" (this is a proper src file)
13:33:03 <criador15> hey, i was doing some mind work, and to make a new GRF with Game Script and AI, i start with who? a complex GRF, complex GS or complex AI?
13:33:45 <Eddi|zuHause> this is compiled once standalone, and included in each partial GRF (which would make them technically full standalone GRFs)
13:34:19 <criador15> if you was talking to me, i dont understand
13:34:21 <Eddi|zuHause> from the standalone compile, the dummy code is stripped, and from the partial GRFs the whole header part is skipped
13:34:32 <criador15> was me, sorry
13:34:36 <criador15> was not*
13:34:47 <Eddi|zuHause> no, i was not talking to you
13:40:10 *** criador15 has left #openttd
13:47:00 *** criador15 has joined #openttd
13:47:24 <criador15> GameScript, there is a way to remove citys?
13:48:41 <Eddi|zuHause> i don't think so, that is way too dangerous, as you would also have to remove all things referring to that city (industries, stations, ...)
13:49:51 <criador15> also there not is a way to remove industry
13:50:26 <Eddi|zuHause> clearing the tile not working?
13:50:59 <criador15> where is the clearing tile function?(which class)
13:51:36 <Eddi|zuHause> dunno, i would think that's a very generic and obvious function
13:54:54 <criador15> Would it be better to remove cities or just enable GS when there is only one city on the map?
13:59:06 <Eddi|zuHause> i don't understand what you mean
14:01:00 <criador15> i need my GS to run with just one city, is better erase the excess or just allow the player to run the game when there is only one city in cenario?
14:02:06 <Alberth> not sure a work-around is going to do much good, I could just as well do nfo -> bytes conversion. Just bad I have to perform image encoding as well then
14:03:23 <Alberth> criador15: don't add a restriction there imho, just pick a city that your GS deals with, and let a user or a scenario author decide whether that should be the only city that exists
14:07:03 *** criador15 has quit IRC
14:09:44 *** criador15 has joined #openttd
14:10:12 <criador15> talking about restritions, which kind of restritions make the game not recon my GS?(its needs to be in a tar file)?
14:10:52 <Alberth> can also be in a directory
14:11:36 <Alberth> you may want to start openttd with debugging output, so you get a log of what it finds and why it discards things
14:12:01 <criador15> can you tell me how do that?
14:12:58 <criador15> its the open with a console(terminal) window?
14:13:05 <Alberth> working on that, my openttd version needs recompiling first
14:13:41 <Alberth> yeah, start openttd from the command-line
14:14:06 <Alberth> if you add -h as option, you get the online help
14:15:51 *** Flygon__ has quit IRC
14:16:15 <Alberth> openttd.exe -d script=9 (if you have windows)
14:16:41 <Alberth> from a command window
14:17:47 <criador15> thanks, trying
14:20:00 *** Alkel_U3 has quit IRC
14:21:17 <criador15> well, how is a valid API version?
14:21:23 *** Alkel_U3 has joined #openttd
14:22:24 <criador15> i used 1.0, its need to be 1,0(commas) or (1.0)dot?
14:24:43 <Alberth> https://dev.openttdcoop.org/projects/busy-bee-gs/repository/entry/info.nut there's lots of prior art :)
14:25:37 <criador15> wait, API version is from the game version?
14:26:26 <Alberth> https://nogo.openttd.org/api/ starts at version 1.2, apparently
14:27:37 <Alberth> and yes, with every major release, you get new changes in the API, so it needs a new number
14:28:15 <criador15> the debug shows me this:
14:28:22 <Alberth> not here!
14:28:33 <Alberth> use a pastebin
14:28:44 <criador15> pastebin to 1 line?
14:28:44 <Alberth> https://paste.openttdcoop.org/
14:28:54 <Alberth> ok, 1 line is fine,
14:29:16 <criador15> :GetAPI version returned invalid version
14:29:38 <criador15> the index doesn´t exist
14:30:46 <Alberth> well, yeah, "1.0" doesn't exist
14:31:12 <planetmaker> it's the version of the API you want to use. Not the version of your script
14:31:29 <planetmaker> so generally use the latest and greatest version of the API when you start a new script
14:31:47 <planetmaker> unless you explicitly want to ensure that it also works on OpenTTD 1.2 or so
14:35:01 <criador15> now its working :D, thanks
14:36:52 <Alberth> you used 1.8 I hope?
14:38:11 <criador15> yes
14:39:52 <criador15> some of you had the idea of make a tutorial in your way?
14:40:12 <planetmaker> https://kallithea.openttdcoop.org/gs-tutorial
14:41:53 <criador15> this is huge
14:42:26 <planetmaker> it was not written in a single day :)
14:42:41 <planetmaker> zuu wrote quite some nice ai and gs stuff
14:42:54 <Alberth> nice !
14:43:35 <planetmaker> even with included map/scenario :-O
14:44:19 <criador15> its simple to understand?
14:45:05 <planetmaker> from how well structured it looks: I'd think so
14:45:27 <criador15> :thumbs up:
14:46:12 <Alberth> always nice, install a documentation package, and not find docs in /usr/share/doc :p
14:46:37 <criador15> haha, everything is in the ReadMe file of 3 GB
14:47:34 <criador15> gs-tutorial is a GameScript?
14:47:39 <planetmaker> yes
14:47:59 <criador15> nice²!
14:47:59 <planetmaker> it's an OpenTTD tutorial, teaching the basics of playing OpenTTD
14:48:21 <criador15> this should be embbed to the game itself
14:50:40 <planetmaker> I agree
14:51:41 <planetmaker> as should some other things IMHO
14:52:04 <criador15> translate IMHO for me?
14:52:51 <peter1138> In my humble opinion
14:57:46 *** supermop_work has joined #openttd
14:59:03 *** supermop_work_ has joined #openttd
15:01:10 *** Guest3331 has quit IRC
15:05:51 *** supermop_work has quit IRC
15:07:58 <criador15> exiting, see ya o/
15:08:07 *** criador15 has quit IRC
15:10:55 *** synchris has joined #openttd
15:15:49 <peter1138> hm
15:23:04 *** Wormnest has joined #openttd
15:27:26 *** criador15 has joined #openttd
15:27:55 <criador15> how i display a info message dialog?
15:30:19 <criador15> like when the game has a error, its show a warning message dialog, i want to make same but for information
15:43:04 *** criador15 has quit IRC
16:00:09 *** Wormnest_ has joined #openttd
16:00:51 *** Wormnest has quit IRC
16:03:56 *** nielsm has joined #openttd
16:04:00 <nielsm> hello
16:09:07 <nielsm> this weekend, merge and backport fixes and release RC2?
16:10:21 *** Wormnest_ has quit IRC
16:20:48 <peter1138> Would be useful if fixes were already merged and tested...
16:21:59 <nielsm> https://github.com/OpenTTD/OpenTTD/pull/7366 <- merge as-is?
16:22:05 <nielsm> (into master)
16:22:52 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh approved pull request #7364: Fix e66cec8f86: Permit loading of industry production callback with invalid cargo type. https://git.io/fjeba
16:22:52 <peter1138> I don't really see the point of it.
16:23:44 <nielsm> jgr has had it in his fork for a while afaik, could ask him if it has helped resolve any bugs
16:30:29 <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on pull request #7366: Add: List recently executed commands in crashlog output. https://git.io/fjebF
16:31:10 *** Thedarkb-T60 has joined #openttd
16:47:17 *** HerzogDeXtEr has joined #openttd
17:28:50 *** Progman has joined #openttd
17:39:37 *** DrSegfault has joined #openttd
17:40:06 <DrSegfault> Does anyone recall where in the options to highlight the currently reserved paths?
17:43:31 <peter1138> It's in... the settings.
17:43:44 <peter1138> Just type "reserve" in the filter
17:46:38 <nielsm> you might need to show the "expert" options
18:02:49 <DrSegfault> Ahh, under "surface"... Thanks!
18:16:57 <Alberth> NFO is a bit of a wonky format, scanner needs some tuning: https://paste.openttdcoop.org/p7siopvo4
18:21:37 <nielsm> if you're making an nfo linker (many nfo in, one nfo out) I'd suggest making the input format a bit less rigid perhaps
18:21:44 <nielsm> or at least easier to parse
18:22:13 <nielsm> since whatever linker input you're making won't be consumable by grfcodec regardless
18:22:26 <nielsm> (since it contains named symbols)
18:22:57 *** criador15 has joined #openttd
18:23:02 <criador15> Alberth, you are there?
18:25:31 <criador15> ok
18:25:48 <criador15> to create a GSGoal this line is corret? GSGoal.New(GSCompany.COMPANY_SELF,"Develop transport of passengers!!",GSGoal.GT_TOWN,0);
18:25:49 *** sla_ro|master has joined #openttd
18:27:29 <nielsm> is COMPANY_SELF the right one? I'd think you should pass the company id of the company you want to have the goal
18:27:44 <Alberth> could be an option niels, on the other hand, backwards compatible for the non-link parts would be nice
18:28:04 <criador15> like what parts?
18:28:27 <criador15> you mean post all in ottdcoop?
18:28:27 <nielsm> he'
18:28:34 <nielsm> he's talking to me, not youi
18:28:34 <Alberth> I am atalking about NFO, different subject :)
18:28:40 <criador15> ah yes
18:28:55 <Alberth> Strings don't work iirc
18:30:13 <nielsm> criador15 yeah, that too, for textual strings that will be displayed in the user interface, you need to create them in your language file
18:30:15 *** criador15 has quit IRC
18:31:47 *** criador15 has joined #openttd
18:32:05 <criador15> i made it without sucess, there is something that teach how to make the lang file?
18:32:34 <Alberth> have a look in busy bee
18:32:37 <nielsm> copy an existing one, adjust the parameters at the top, replace the strings in it with your own
18:32:51 <Alberth> in particular only the english one
18:33:07 <nielsm> yeah you _always_ start with english.txt
18:33:30 <nielsm> that's the master language without exceptions
18:33:34 <criador15> one more thing, i speak in portuguese, so to create the portuguese lang i can just create the file and it works or i need something else?
18:34:14 <Alberth> you can, just denote it as portuguese
18:34:19 <peter1138> b33r!
18:35:12 <Alberth> oh, the filename itself was the language name?
18:35:18 *** criador15 has quit IRC
18:35:26 <nielsm> also note that pt_PT and pt_BR are separate langauges in OTTD like most other places :)
18:35:40 <nielsm> portuguese.txt and brazilian_portuguese.txt
18:37:34 <nielsm> but you always need english.txt and it always needs to have all the formatting codes in it
18:41:45 <Alberth> long gone already niels
18:41:54 <nielsm> gah
18:43:14 <DorpsGek_II> [OpenTTD/OpenTTD] PeterN merged pull request #7364: Fix e66cec8f86: Permit loading of industry production callback with invalid cargo type. https://git.io/fhhbB
18:43:42 *** criador15 has joined #openttd
18:43:44 <criador15> understood
18:43:59 *** gelignite has joined #openttd
18:44:05 <criador15> and i knew about the PT and BR diferrents versions
18:49:23 <criador15> if i can debug the values which i pass to the method, some of you can help know if they are valid?
18:50:57 <criador15> and one more thing, there is some method or mod that let me take data from the game and export it?(like to a file, DB or something else that its not from game?)
18:52:24 *** criador15 has quit IRC
18:54:32 *** criador15 has joined #openttd
19:03:42 <Alberth> there is a log command to spam the AI/GS window with messages, that's useful for debugging , and export is not simple to do
19:05:07 <criador15> i am using the IA/GS debug of game(window) and is not simple why?
19:06:20 <Alberth> sorry, don't understand what you mean
19:07:08 <Alberth> I answered 2 questions above, maybe that confuses you?
19:07:16 <nielsm> the best way to get data about an ongoing game out of OTTD is using a GS and connecting to it via admin port
19:07:23 <nielsm> but that only works for multiplayer afaik
19:07:37 *** criador15 has quit IRC
19:10:55 *** criador15 has joined #openttd
19:11:13 <criador15> i use the AI/GameScript debug window, there is another?
19:11:36 <criador15> admin port you mean cmd line?
19:13:42 <nielsm> no, the admin port is a TCP network connection
19:13:52 <criador15> understood
19:14:18 <criador15> so the game becomes a server, and i need a very complicated software to interact with it and take the data
19:14:38 <nielsm> well the server part is really defined by the game script, mainly
19:14:56 <Alberth> just use the debug window
19:15:02 <criador15> i am using it
19:15:09 <criador15> the debug window
19:15:20 <criador15> but in this line: GSGoal.New(GSCompany.COMPANY_SELF,GSText(GSText.STR_COMPANY_GOAL, GSCargo.CC_PIECE_GOODS,50,GSMap.GetTileIndex(mapSX,mapSY)),GSGoal.GT_TOWN,GSTown.GetLocation(0));
19:15:22 <nielsm> (I'm not sure exactly what the admin port can do honestly, other than let other software talk to a GS running inside OTTD, the protocol doesn't seem to be well descrbed anywhere)
19:15:39 <criador15> it dont thel me what is wrong, its just say its okay and the game go on
19:16:19 *** andythenorth has quit IRC
19:18:47 <criador15> nielsm if you are interested, there a little information about it here https://www.tt-forums.net/viewtopic.php?f=65&t=68828
19:19:03 <criador15> thats it i want, but not now (lol)
19:19:13 <nielsm> why are you using GSCompany.COMPANY_SELF ?
19:19:48 <criador15> to designate the player company as the target to receive goals
19:19:56 <nielsm> the game script is not the player
19:19:59 *** glx has joined #openttd
19:19:59 *** ChanServ sets mode: +v glx
19:20:16 <criador15> yep, is to use the admin port
19:20:18 <nielsm> try using COMPANY_FIRST instead (for testing purposes)
19:20:23 <criador15> ok
19:20:36 <nielsm> in single player that will always be the human company
19:21:05 <nielsm> but if you want your GS to work for multiplayer, or with AIs, you will need to create the goals for every company
19:22:10 <criador15> yeah
19:22:35 <criador15> there not is a Company List class right?
19:22:40 <nielsm> no
19:22:53 <nielsm> but you know that all valid companies have an ID between COMPANY_FIRST and COMPANY_LAST
19:23:07 <nielsm> and you can use GSCompany.ResolveCompany(company_id) to check if a company is valid
19:23:27 <nielsm> uh, ResolveCompanyID() I mean
19:23:35 <criador15> okay
19:23:47 <criador15> the line still not make a valid goal
19:24:23 <criador15> (how you know that?, well the button goal its invalid, and the methods IsValidGoal(0) tells me that)
19:26:15 <glx> what's the return value of GSGoal::New()
19:26:17 <glx> ?
19:27:00 <criador15> -1
19:27:04 <criador15> very sugestive
19:27:08 <glx> that means invalid
19:27:20 <glx> well it's GOAL_INVALID
19:27:33 <glx> means the creation failed
19:27:51 <glx> you need to check last error
19:28:20 <criador15> in the game debug window, in the in-game debug window or with what?
19:28:31 <glx> in the script
19:28:54 <glx> but it can write to debug window
19:29:15 <nielsm> you need to give the TownID for the goal's destination, not the tile of the town
19:29:22 <criador15> hmm
19:29:32 *** Eddi|zuHause has quit IRC
19:30:25 <criador15> how i take the town id from a specific town from specific tile?
19:30:37 *** Eddi|zuHause has joined #openttd
19:31:33 <nielsm> the first town has id 0
19:31:37 <nielsm> the second has id 1
19:31:46 <nielsm> well, there might be holes in the id series
19:32:11 <criador15> so i have to track down id ands conditions to a town thats satisfacted the GS?
19:32:13 <nielsm> (in case some towns were deleted, during the game or during worldgen)
19:32:16 <glx> GSTile::GetClosestTown()
19:32:57 <glx> to get the townid from the tile
19:33:09 <criador15> uhh
19:33:16 <criador15> thats gold
19:34:04 <Alberth> just browse the list https://nogo.openttd.org/api/1.8.0/
19:34:14 <nielsm> yeah
19:34:18 <nielsm> read all the documentation
19:34:22 <nielsm> browse through it
19:34:28 <nielsm> you don't need to remember everything
19:34:31 <nielsm> just see it exists
19:34:43 <criador15> i am do the reverse
19:34:45 <nielsm> then you'll remember it when you need it, and can look up the details at that time
19:35:45 <criador15> first the need of it, then go find it
19:35:57 <criador15> but i look the doc too
19:36:32 <criador15> okay, if its still -1
19:36:42 <criador15> am i in trouble?
19:37:28 <glx> if it's still -1 check the errors
19:37:47 <glx> GSError::GetLastErrorString() should be useful
19:39:48 <criador15> ERR_PRECONDITION_FAILED
19:40:09 <nielsm> hmm, I could use some tonic water for a gin, but then I'd have to dress up for going outside (training pants are not good when it's windy and raining and close to freezing)
19:41:09 <criador15> so in english this would be?
19:41:53 <criador15> ahhh
19:41:56 <criador15> understood
19:43:16 <glx> one of the precondition shown in http://nogo.openttd.org/api/1.8.0/classGSGoal.html#8cfd4e97008202b4f9e8e7d61297d54f is not met
19:46:00 <nielsm> just to be sure, you do have at least one town on the map, right?
19:46:32 <criador15> the game display the name and population of 3 every 50 ticks
19:46:40 <criador15> yes, 3 citys
19:47:02 <Alberth> break the line in smaller parts, one call each line, and check each return result
19:47:30 <criador15> how i check if the second param of GSGoal.new is valid? its says text*goal
19:47:47 <criador15> how goal is a valid goal? what the apearence?
19:48:10 <glx> what do you pass for this param ?
19:48:14 <criador15> its prints the memory location
19:48:23 <criador15> local goal = GSText(GSText.STR_COMPANY_GOAL, GSCargo.CC_PIECE_GOODS,50,GSTile.GetClosestTown(GSMap.GetTileIndex(mapSX,mapSY)))
19:49:20 <Alberth> start with GSMap.GetTileIndex(mapSX,mapSY
19:49:36 <Alberth> next line do GSTile.GetClosestTown(..)
19:49:57 <Alberth> build it in small pieces, so you can find the call that fails
19:49:58 <criador15> 3 var for instance goal
19:50:10 <Alberth> instead of one of the 5 maybe
19:52:53 <glx> hmm I don't see this string in english.txt
19:53:30 <glx> hmm oh you can define your own strings of course
19:53:51 *** andythenorth has joined #openttd
19:54:50 <andythenorth> yo
19:54:55 <criador15> borrowed from busybee
19:54:58 <criador15> yo o/
19:56:01 <criador15> GSMap return 2080, town id is 2 until it is okay
19:59:30 <criador15> this line to be specific local goal_text = GSText(GSText.STR_COMPANY_GOAL, cargo.cid,this.wanted_amount, destination_string);
20:00:16 *** Wolf01 has joined #openttd
20:03:43 *** Supercheese has joined #openttd
20:08:04 <criador15> if the goal its not made, but there is no error what happen?
20:08:27 <criador15> forget what i said
20:08:50 <Alberth> hello wolf, andy
20:13:51 <criador15> GSCompany.ResolveCompanyID return -1 is okay?
20:14:20 <Alberth> documentation should define that, but it looks wrong
20:15:26 <criador15> -1 is company invalid?
20:15:39 <Wolf01> o/
20:16:21 <Alberth> https://nogo.openttd.org/api/1.8.0/classGSCompany.html#f62358efbc24594d388048863a50e0d4
20:16:52 <criador15> i looked here, but it dont sat if its a valid or not company id
20:17:00 <Alberth> compare with COMPANY_INVALID thus
20:20:24 <criador15> its not
20:21:42 <criador15> thanks
20:22:06 *** criador15 has quit IRC
20:26:29 *** frosch123 has joined #openttd
20:28:06 <andythenorth> quak
20:31:53 <supermop_work_> hi andythenorth
20:32:55 * peter1138 returned
20:34:06 <frosch123> moo
20:35:06 *** Samu has quit IRC
20:49:12 *** supermop_work_ has quit IRC
20:51:55 *** Samu has joined #openttd
20:52:11 <Samu> are we still on 1.9.0-RC1?
20:52:26 <peter1138> Yes
20:52:38 <Samu> cool
21:03:00 <Eddi|zuHause> moo too?
21:22:30 *** Eddi|zuHause has quit IRC
21:26:31 <peter1138> Oh...
21:28:33 <peter1138> Urgh.
21:28:43 *** Samu has quit IRC
21:28:43 <peter1138> Oh yes, that savegame crashes because of k-d tree, not my patch :p
21:30:35 *** Compu has joined #openttd
21:30:49 *** Alberth has left #openttd
21:36:33 <andythenorth> well
21:36:35 *** Eddi|zuHause has joined #openttd
21:36:39 <andythenorth> tanks?
21:36:54 <Wolf01> Lego?
21:38:15 <Wolf01> I built the new Mclaren Senna, really nice
21:50:40 <frosch123> are there lego tanks?
21:51:05 <frosch123> or does lego not get more military than stormtroopers?
21:53:21 <frosch123> oi, people sell custom sorted lego sets on amaz*n
21:59:59 <LordAro> lego doesn't do any (real) military, last i checked
22:00:56 <nielsm> they have done medieval style stuff afaik, but yeah no modern military
22:01:16 <nielsm> and pirates
22:01:59 <andythenorth> no war theme
22:02:01 <andythenorth> only space war
22:02:04 <andythenorth> and medieval war
22:02:07 <andythenorth> and pirate war
22:02:10 <andythenorth> and war on crime
22:02:19 <andythenorth> and ninja war
22:02:39 <glx> and robot war IIRC
22:03:20 <frosch123> well, i found a polish lego competitor who offers a whole wot set, but i don't dare to post it to not upset andy's family
22:09:38 *** gelignite has quit IRC
22:17:53 *** frosch123 has quit IRC
22:29:40 <TrueBrain> glx: MSVC is weird on AzurePipelines
22:29:45 <TrueBrain> editbin is detected fine here
22:29:47 <TrueBrain> without any issue
22:29:48 <TrueBrain> AP .. refuses
22:29:51 <TrueBrain> I hate MSVC :(
22:30:12 <glx> editbin is detected only from inside visual studio
22:30:34 <TrueBrain> guess we have to bundle your solution, if you are okay with GPLing it, ofc
22:32:06 <glx> from outside you need to do call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86
22:32:30 <TrueBrain> I refuse! That URL is way too volatile :P
22:32:50 <TrueBrain> I wanted a sane solution :P
22:32:54 <glx> there should be a var env with the path
22:34:49 <glx> hmm there isn't it seems :(
22:40:25 <TrueBrain> found a way :D
22:40:26 <TrueBrain> hihi
22:41:37 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain updated pull request #7270: Introduce CMake (and removing all other project-related code) https://git.io/fhbqc
22:43:46 <glx> I'm in the final part of squirrel_export, the xxx_instance.cpp stuff
22:43:54 <TrueBrain> \o/
22:44:04 <TrueBrain> this is something new btw; not sure how to deal with that just yet
22:44:10 <TrueBrain> I am totally for adding it
22:44:17 <TrueBrain> but possibly we need to do it in a second PR right after it
22:44:42 <TrueBrain> not sure what others think about it
22:47:01 <glx> I wanted to do the cmake way, in src/ai and src/game, but target properties and dependencies are not easy to manage (because src/ai and src/game are parsed before src/script/api), so I'll generate them from src/script/api
22:47:27 <TrueBrain> we control the order things are parsed in
22:47:32 <TrueBrain> it is the order add_.. runs
22:47:38 <TrueBrain> so you can do with it what-ever you want :P
22:47:44 <TrueBrain> (and ad a comment: ORDER MATTERS)
22:48:05 <glx> ah yes, totally forgot this option
22:48:44 <TrueBrain> but as always, first make it to work, then we make it pretty :D
22:49:28 <glx> yes I'm still in the generate only part, so the generated files are exactly the same as it was before
22:49:29 <TrueBrain> LordAro / peter1138: you think if we sneak in squirrel auto-generation (and remove the generated files) in the cmake branch, that will be an acceptable thing to do? :D
22:49:57 <glx> they probably will need to change to be usable at compile time :)
22:50:06 <peter1138> TrueBrain, I'm happy with it.
22:50:09 <glx> but that will be the next step
22:50:28 <glx> peter1138 had a patch for that ;)
22:50:45 <TrueBrain> doesn't mean he likes it being in a single PR :)
22:50:56 <TrueBrain> I think everyone agrees we have to do it :P
22:51:09 <nielsm> I don't know if this is something that will be/remain a problem with the windows build, but the way the current VS projects block on building the baseset files from translations
22:51:38 <TrueBrain> nielsm: sorry, what do you mean?
22:51:59 <TrueBrain> I think a word is missing in that sentence, I just cannot find which :(
22:52:11 <glx> baseset generation seems faster with cmake for me
22:52:22 <nielsm> when you build in visual studio from clean currently, building the main ottd project does not start until the baseset files have been generated
22:52:30 <nielsm> (.obg .obs .obm files)
22:52:52 <nielsm> and that takes significantly longer than compiling the languages
22:53:06 <peter1138> The vbs was a bit crude.
22:53:20 <glx> yeah the vbs is not optimised
22:53:23 <nielsm> but if that's not a problem with cmake then I don't see any reason to try to improve it
22:53:24 <TrueBrain> CMake is slower than the shell variant
22:53:43 <TrueBrain> with CMake and MSVC, it still does the baseset first
22:53:56 <TrueBrain> with Ninja etc, it does it before OpenTTD, but does the languages at the same time
22:54:16 <TrueBrain> AP decided to remove timestamps from the logs, so I cannot see how long it takes now :D
22:54:31 <TrueBrain> https://dev.azure.com/openttd/OpenTTD/_build/results?buildId=2116 <- IT IS FULLY GREEN! (regression and everything)
22:54:33 <TrueBrain> wauw ....
22:54:42 <TrueBrain> that is kinda huge progress right there
22:55:09 <glx> a big step :)
22:56:10 <nielsm> hmm I should boot my linux machine tomorrow and look at that fluidsynth annoyance
22:57:05 *** synchris has quit IRC
22:57:08 <nielsm> gnight
22:57:14 <TrueBrain> 8>Compiling language spanish
22:57:14 <TrueBrain> 4>Generating orig_tto.obm baseset metadata file
22:57:14 <TrueBrain> 8>Compiling language spanish_MX
22:57:19 <TrueBrain> locally it does it at the same time nielsm
22:57:34 <TrueBrain> so yeah, CMake fixes that ;)
22:58:13 <peter1138> "IT IS FULLY GREEN! (regression and everything)"
22:58:16 <peter1138> ^ Ship it!
22:58:34 <TrueBrain> bundling has to be fixed :D
22:58:41 <TrueBrain> but strictly seen, we can do that later :P
22:59:10 <TrueBrain> soon it might be good if we all try out the cmake branch, to see if we don't hit obvious issues
22:59:17 <TrueBrain> it should work/run for everyone
23:02:14 <peter1138> Hmm
23:02:49 <TrueBrain> but I first like to make another pass in making it a tiny bit more pretty
23:02:53 <TrueBrain> and tidying up a bit
23:03:05 <peter1138> Oh right, my old Makefile doesn't get deleted, heh.
23:03:21 <TrueBrain> we also need to work on getting grfcodec to work for our grf
23:03:24 <TrueBrain> and tons of -W flags
23:03:40 <TrueBrain> but, relative minor tbh
23:03:58 <peter1138> I have it built with cmake but I got stuck with boost :(
23:04:17 <peter1138> So it builds but only cos I happen to have boost installed, heh
23:04:53 <TrueBrain> who is using boost?
23:05:05 <TrueBrain> who should we start hitting with a breadstick
23:05:09 *** nielsm has quit IRC
23:05:25 <peter1138> grfcodec. it may be nforenum only.
23:05:34 <TrueBrain> ugh
23:05:39 <TrueBrain> good luck with that :D
23:05:58 <TrueBrain> I can look at it this weekend if you like? See if I can help
23:06:11 <TrueBrain> or possibly .. you can patch it so it doesn't use boost :D
23:06:56 <TrueBrain> right, telly time
23:07:13 <glx> hmm seems nmlc and python might be better than grfcodec and boost ;)
23:07:31 <peter1138> heh
23:08:14 <glx> but I guess it's using boost for historical reason
23:08:43 <peter1138> Hmm, it made a debug build
23:11:00 <peter1138> How do I make a normal build?
23:12:29 *** Wormnest has joined #openttd
23:13:46 <glx> cmake -DCMAKE_BUILD_TYPE <path_to_root>
23:13:55 <glx> cmake -DCMAKE_BUILD_TYPE=Release <path_to_root>
23:14:44 <peter1138> Ok
23:15:13 <peter1138> That's confusing. Current ./configure with no parameters makes a release build.
23:15:14 <glx> or RelWithDebInfo if you want to be able to debug
23:15:45 <peter1138> Hmm, I get compile warnings now, woo.
23:22:18 <andythenorth> yes but bedtime
23:22:51 <andythenorth> very unsleeping last night
23:22:55 *** andythenorth has quit IRC
23:29:51 *** Samu has joined #openttd
23:40:15 <DorpsGek_II> [OpenTTD/OpenTTD] stale[bot] closed issue #6993: Enhancements: Allow the scenario (.scn) to run by using the parameter in the openttd.cfg file. https://git.io/fhTQd
23:40:16 <DorpsGek_II> [OpenTTD/OpenTTD] stale[bot] closed issue #7016: New variables for railtype https://git.io/fh3QT
23:43:13 *** sla_ro|master has quit IRC
23:51:08 <DorpsGek_II> [OpenTTD/website] Leffe108 commented on issue #48: finger.openttd.org https://git.io/fjvvQ
23:57:58 *** Zuu has joined #openttd
23:59:20 <Zuu> Nice initiative with monthly blog bost. :-)