IRC logs for #openttd on OFTC at 2018-12-26
            
00:00:09 <Zuu> It might be possible to add a command for both AI -> GS and GS -> AI. But I find it less confusing to have different names eacch way.
00:00:24 *** andythenorth has quit IRC
00:01:06 <Zuu> this is the normal pointer to the instance of the current class. But in the callback methods this would refer to some SCP internal class (I think), so instead there is a parameter self which is passed along that points to your "this".
00:02:13 <Zuu> When you register comands you have "local self = this;" that is not required you could instead just pass this as parameter I think. But the NoCarGoal code may have it that way with the intention to document the purpose of it.
00:06:18 <Samu> i can eliminate that line then?
00:07:04 <Samu> SCPLib.AddCommand("CurrentGoal", COMMAND_SET, this, SCPManager.ReceivedCurrentGoalCommand);
00:07:15 <Samu> that 'this' in there instead of 'self'
00:08:42 <Samu> uh oh, line 112 is wrong, let me fix
00:09:10 <Samu> local result = [to_company, goal_mode, response_value];
00:12:29 <Samu> could I remoe the to_company variable at all?
00:12:38 <Samu> it's not really needed come to think of it
00:13:32 <Samu> I wonder...
00:23:00 <Samu> on the SCPClient_CompanyValueGS side, is there a way to customize the displaying of AILog.Info message at all?
00:24:38 *** Wolf01 has quit IRC
00:25:43 <Zuu> <Samu> that 'this' in there instead of 'self' <-- looks good
00:27:01 <Zuu> In NoCarGoal to_company is useful as somethimes the AI get information about other companies than themself. If it is due to limitations of scp/openttd or how NoCarGoal GS sends messages I don't know.
00:27:09 <Samu> I tried: if (self._scp._SCPLib_Client.Configuration[4]) AILog.Info("SCP: Reveived CurrentGoal command with data: " + s);
00:27:24 <Samu> says _SCPLib_Client is invalid
00:27:38 <Samu> but in the main.nut it's there
00:28:43 <Zuu> So self is your SCPManager?
00:28:58 <Zuu> It doesn't have a _scp member what I can see.
00:29:14 <Samu> this._scp = scp_ptr;
00:29:25 <Samu> the scp_ptr is... hmm let me check
00:29:37 *** nielsm has quit IRC
00:29:56 <Samu> this.scp = SCPLib("LDAF", 8);
00:30:02 <Samu> this.cvgs = SCPClient_CompanyValueGS(this.scp);
00:30:21 <Zuu> Ah.. you are back in the AI again, and not in SCPManager, but in SCPClient_CompanyValueGS?
00:30:24 <Samu> this._scp = SCPLib("LDAF", 8); thus
00:31:03 <Zuu> Well, make sure the path you try to go via exist and that self points to what you think it points.
00:31:22 <Zuu> When in doubt you could foreach a node and print its members.
00:31:40 <Samu> oh, that would come useful, how do i do it?
00:33:14 <Samu> in my AI, i have this.scp = SCPLib("LDAF", 8); this.cvgs = SCPClient_CompanyValueGS(this.scp);
00:34:11 <Samu> in the AI library SCPClient_CompanyValueGS I got this._scp = scp_ptr
00:34:45 <Samu> meh, it's confusing, it's like the 'this' is pointing to 3 entities at the same time
00:35:37 <Zuu> Usually (no callbacks involved) this points to the curernt instance of the class you are in.
00:36:11 <Zuu> I suggest reading up on classes and instances in some object oriented programming language.
00:36:31 <Zuu> (not JavaScript if you can avoid)
00:38:12 <Zuu> With some improved knowledge on object oriented programming, this will be easier for you to sort out. Squirrel is not the most newbie friendly environment. I mean it is good because it is high in motivation because you can create cool stuff within OpenTTD, but your code run inside OpenTTD an is hard to inspect what it is doing and not.
00:39:08 <Zuu> You can use AIController.Break() and log messages etc. of course, but there is no interactive code interpeter or similar like for many other script languages.
00:39:51 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 updated pull request #6989: Change: use vcpkg integration in Visual Studio https://git.io/fhUip
00:42:09 <Zuu> Regarding JavaScript, I'm not against learning it, instead it is quite a useful language to know, but it is not the language I would recommend for learning basics of object oriented code. Classen, instances etc. as JS doesn't have classes in the traditional way.
00:42:35 <Zuu> s/Classen/Classes/
00:43:19 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 updated pull request #6989: Change: use vcpkg integration in Visual Studio https://git.io/fhUip
00:43:22 <Samu> https://dev.openttdcoop.org/projects/scriptlib-scp/repository/entry/src/main.nut#L236
00:43:38 <Samu> that's where i found the log
00:44:18 <Samu> _SCPLib_Client.Configuration[4]=setting;
00:45:28 <Samu> gonna try something, brb
00:46:17 <Zuu> _SCPLib_Client is clearly a private name you shouldn't access directly.
00:47:13 <Zuu> You should access SCP library using SCPLib main class that you import.
00:48:57 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 commented on pull request #6989: Change: use vcpkg integration in Visual Studio https://git.io/fhTLb
00:52:03 <Zuu> Libraries in OpenTTD can only have one class that is imported in the name you decide with import() command. Any other classe that libraries include will be included in yoru global scope in their literal name. Therefore libraries should in general only contain one class. But if they need more, they are in general named something obsucre starting on _ as a clear indication that it is a private name, and AIs/GS:es should consume the library via its
00:52:03 <Zuu> public interface provided via the library main class.
00:53:26 <Zuu> Obviously it would be best if libraries could have their private classes in their own scope isolated from the AI/GS, but that is technically not possible in Squirrel2/OpenTTD and thus we need to have to follow a resonable practice.
00:56:05 <Samu> experimenting this: if (enable == null) return _SCPLib_Client.Configuration[4] == 1;
00:56:24 <Samu> between line 232 and 233
00:59:26 <Samu> and on my library, i'm now trying
00:59:29 <Samu> if (self._scp.SCPLogging_Info(null)) AILog.Info("SCP: Reveived CurrentGoal command with data: " + s);
01:02:56 <Samu> seems to be working
01:02:58 <Samu> yay
01:03:11 <Samu> the Info message wasn't displayed
01:03:16 <Samu> let me try turn it on
01:04:38 <Samu> okay, on my AI side, LuDi, i now got this.scp.SCPLogging_Info(true);
01:05:45 <Samu> yay, it works!~
01:05:51 <Samu> message is displayed
01:08:05 <Samu> it is the AI can turn it on or off, the SCPClient_CompanyValueGS will get to display the info or not, based on what is set in the AI
01:08:11 <Samu> everything can be linked together!
01:08:43 <Zuu> Good night and happy coding. Stay calm and follow the API docs. :-)
01:08:51 <Samu> oki
01:09:10 *** Zuu has quit IRC
01:10:24 *** Wacko1976 has quit IRC
01:17:12 *** gelignite has quit IRC
01:21:05 *** Thedarkb-T60 has joined #openttd
01:32:50 *** Flygon has joined #openttd
01:50:54 *** lugo has quit IRC
02:38:38 *** Progman has quit IRC
04:46:53 *** glx has quit IRC
05:33:42 *** Samu has quit IRC
06:29:41 *** tycoondemon has quit IRC
07:32:15 *** tycoondemon has joined #openttd
08:45:27 *** sla_ro|master has joined #openttd
09:05:56 *** andythenorth has joined #openttd
09:08:13 *** tokai has joined #openttd
09:08:13 *** ChanServ sets mode: +v tokai
09:09:34 *** lugo has joined #openttd
09:10:28 <andythenorth> moin
09:14:57 *** tokai|noir has quit IRC
09:30:46 *** erratic has quit IRC
09:40:07 *** nielsm has joined #openttd
09:40:21 *** synchris has joined #openttd
09:42:54 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain requested changes for pull request #6989: Change: use vcpkg integration in Visual Studio https://git.io/fhTl8
09:43:32 <TrueBrain> gooooood morning andythenorth
09:55:03 *** Laedek has joined #openttd
10:01:53 <TrueBrain> hmm, is afxres.h still needed, I wonder ..
10:04:07 <TrueBrain> seems we don't
10:10:26 *** Wacko1976 has joined #openttd
10:12:50 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain opened pull request #6991: Use vcpkg integration in Visual Studio https://git.io/fhT88
10:13:12 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain commented on pull request #6989: Change: use vcpkg integration in Visual Studio https://git.io/fhT8u
10:13:13 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain closed pull request #6989: Change: use vcpkg integration in Visual Studio https://git.io/fhUip
10:13:34 <TrueBrain> anyone mind proof-reading #6991 MSVC instructions? :D
10:15:00 <TrueBrain> always a bit tricky to write instructions on something you never used yourself :P
10:16:12 <nielsm> looks okay to me
10:19:40 <TrueBrain> if you can express that with an approval, I would be very greatful :D
10:19:54 <TrueBrain> NO MORE openttd-useful! :D
10:19:57 <TrueBrain> best xmas present EVAH
10:20:48 <Eddi|zuHause> [citation needed]
10:22:39 <TrueBrain> so running all of OpenTTD's infrastructure on Azure costs around 400 dollar a month ... and just 100 dollar when you do the same on DigitalOcean .. why you ask? Well, DO gives bandwidth a lot cheaper ... 30 dollar vs 300 dollar ..
10:22:45 <TrueBrain> not sure why ..
10:23:57 <TrueBrain> did I really wrote greatful? grateful ofc ...
10:23:59 <TrueBrain> lolz ..
10:25:55 <SpComb> 75% of monthly costs are in bandwidth?
10:26:15 <TrueBrain> yup ....
10:26:17 <TrueBrain> odd aint it
10:27:02 <TrueBrain> k8s is about the same price, give or take (and ignoring storage)
10:27:20 <TrueBrain> but DO gives a 4TB a month CDN for ~30 dollar, Azure for ~300 dollar
10:27:49 <nielsm> installing the deps via vcpkg does take a while
10:28:13 <nielsm> caching them as a build artifact and importing into regular CI builds is def. the way to go
10:28:36 <TrueBrain> nielsm: ~10 minutes on Azure. But yeah .. exactly the reason I did that :P
10:28:50 <TrueBrain> and as vcpkg is just a folder you can just pick up and drop
10:28:55 <TrueBrain> super flexible :D
10:49:44 *** Wolf01 has joined #openttd
10:49:54 <Wolf01> o/
10:52:58 <Wolf01> So valve lost satisfactory
10:54:49 <andythenorth> ?
10:55:21 <Wolf01> 3D factorio
10:55:24 <andythenorth> TrueBrain: we got enough funds?
10:55:27 <andythenorth> :P
10:56:00 <TrueBrain> Wolf01: "lost" .. Epic "won" is a better way of putting it
10:56:09 <TrueBrain> people are getting sick of how much money Steam holds back
10:56:12 <TrueBrain> and it starts to show
10:56:15 <Wolf01> Yep
10:56:26 <andythenorth> I had to install Steam once
10:56:28 <TrueBrain> andythenorth: still, DO is cheaper .. I dont get the pricing of stuff like azure (at all)
10:56:38 <TrueBrain> (or GCP or AWS)
10:56:42 <andythenorth> mostly $$$
10:56:43 <TrueBrain> guess I must be using the calculator wrong
10:56:50 <andythenorth> AWS is ok on spot instances
10:56:52 <TrueBrain> or they are not meant for our size
10:56:58 <TrueBrain> bandwidth is the issue mostly ;)
10:57:02 <TrueBrain> the rest is comparable
10:57:10 <andythenorth> any guaranteed performance, commity cloud $$ >> self-managed hardware
10:57:17 <Wolf01> But I won't use Epic launcher, I'm just grabbing the free game they give twice a month and let it rot there
10:57:18 <TrueBrain> but DO is just very straightforward in their price .. no non-sense nothing
10:57:21 <andythenorth> commodity *
10:57:35 <Wolf01> Like uplay, like origin, like gog
10:57:50 <TrueBrain> that is the thing I like about Steam .. everything in one place
10:57:57 <andythenorth> Steam kept wanting to do stuff to my computer
10:58:00 <TrueBrain> but .. I can understand publishers moving away
10:58:09 <andythenorth> I just wanted to play ETS2, not have loads of extra shit and tinfoil
10:58:10 <TrueBrain> so we need an Open Source project that combines all those platforms into one :D
10:58:16 <Wolf01> <andythenorth> Steam kept wanting to do stuff to my computer <- like updating games?
10:58:23 <andythenorth> yeah
10:58:26 <andythenorth> and itself
10:58:27 <andythenorth> constantly
10:58:31 <andythenorth> with admin user permissions
10:58:41 <andythenorth> I hate giving sudo to anything
10:58:55 <Wolf01> That happens on windows too
10:59:53 <Wolf01> But usually when games need to update/install runtimes, my games are on a different HDD and don't require permissions to install/update
11:01:46 <Wolf01> Mmmh, my cat talks too much
11:04:45 <Wolf01> I think the best approach is the one like gog, you buy games on steam and you get a copy on gog too (if supported and while you keep it on steam, so no buy-redeem on gog-refund on steam trick)
11:05:41 <Wolf01> Then if you want to use gog for everything in one place you will be able to do it... too bad only 10 games of my 900 are supported
11:09:16 *** Progman has joined #openttd
11:21:06 *** Wolf01 has quit IRC
11:24:46 *** Wolf01 has joined #openttd
11:25:07 <TrueBrain> how does Grafana work .. hmm .. I just want to subtract two queries ..
11:25:10 <Wolf01> NAT is shitty on this router :|
11:27:18 *** nielsm has quit IRC
11:31:44 *** cHawk has quit IRC
11:32:00 *** cHawk has joined #openttd
12:33:55 <Eddi|zuHause> i wish TF had a more modular station setup
12:34:18 <Eddi|zuHause> like i could freely combine passenger platforms, freight platforms and through platforms
12:34:32 <Eddi|zuHause> in any order
12:34:34 <Wolf01> Just build them side by side
12:41:57 <andythenorth> 91%
12:47:52 <Wolf01> Did you remove more things?
12:48:25 <LordAro> andythenorth: 1 Jan release?
12:49:58 *** andythenorth has quit IRC
12:55:20 <Eddi|zuHause> that question killed him
13:00:49 *** Jayvdw has joined #openttd
13:01:33 <Jayvdw> Hello! Wow, sure are a lot of people in here. I was wondering if I could ask a question as a starting OTTD player.
13:08:41 <TrueBrain> @topic get 3
13:08:41 <DorpsGek> TrueBrain: Don't ask to ask, just ask
13:09:04 <TrueBrain> and hi :)
13:12:30 *** andythenorth has joined #openttd
13:30:23 *** Wacko1976 has quit IRC
13:35:36 <andythenorth> 92%
13:42:25 *** Wacko1976 has joined #openttd
13:51:00 <Eddi|zuHause> andythenorth: done by this evening?
13:51:19 <Eddi|zuHause> andythenorth: could technically still call it christmas release :p
13:52:23 <andythenorth> http://bundles.openttdcoop.org/iron-horse/push/LATEST/docs/html/changelog.html
13:52:29 <andythenorth> I am doing the docs then shipping it
13:52:33 <andythenorth> 92% is enough
13:53:04 <SpComb> Eddi|zuHause: there's some station mods, but tbh those are even less modular
13:53:12 <Eddi|zuHause> SpComb: yeah
13:53:28 <SpComb> like curved stations... yeah, you have a selection of fixed radii to choose from
13:53:41 <Eddi|zuHause> i haven't really tried mods, some looked interesting but not quite what i need
13:54:02 <Eddi|zuHause> i wish that stations could bend along existing tracks if extended
13:54:26 <SpComb> I should try OpenTTD again some day, because some things work better... not as flexible, but also less fiddly
13:54:54 <Jayvdw> I'm noticing there are a lot of NEWGRF's to download.
13:55:14 <Jayvdw> As a newish player, would it be better to stay away from adding some of those?
13:55:21 <Eddi|zuHause> there's still loads of tiny features missing from TF
13:55:22 <SpComb> building flyovers seems to have just been intentionally made so damn difficult... "bridge supports collision"
13:56:14 <Eddi|zuHause> SpComb: i can think of two easy fixes for flyovers: a) lower minimum height to trigger the option of building a bridge, and b) short bridges with 0 pillars
13:57:36 <Eddi|zuHause> minimum bridge height seems to be way larger than is needed to actually fit through the bridge, especially for bridges over roads
14:01:44 *** lugo has quit IRC
14:09:05 <Wolf01> <SpComb> building flyovers seems to have just been intentionally made so damn difficult... "bridge supports collision" <- flyover junction mod
14:09:44 <Wolf01> I have installed every mod which enhances the build of things
14:10:07 <Wolf01> But I need to try the latest patch which fixed some other problems
14:11:43 <Eddi|zuHause> i'm still getting a bunch of freezes, especially before autosave
14:13:21 <Wolf01> The previous patches solved that for me
14:18:21 *** Thedarkb-T60 has quit IRC
14:18:42 *** Thedarkb-T60 has joined #openttd
14:25:43 *** Jayvdw has quit IRC
14:27:41 <Eddi|zuHause> but they seem to have significantly improved the economy, no more industries dying to any tiny hiccup in the supply chain
14:27:42 *** Flygon has quit IRC
14:38:19 *** Thedarkb-T60 has quit IRC
14:39:24 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 commented on pull request #6991: Use vcpkg integration in Visual Studio https://git.io/fhTam
14:40:05 *** glx has joined #openttd
14:40:05 *** ChanServ sets mode: +v glx
14:43:47 *** Thedarkb-T60 has joined #openttd
14:44:07 *** Progman has quit IRC
14:51:30 *** Wolf01 is now known as Guest1019
14:51:32 *** Wolf01 has joined #openttd
14:58:57 *** Guest1019 has quit IRC
15:07:12 <SpComb> I tried playing with the beta patch but it kept crashing, couldn't revert back to stable because of the newer savegame version
15:11:21 <TrueBrain> glx: is openttd the first project? As there has to be a reason someone added it in the first place? :D
15:11:26 <TrueBrain> (can you check? I cannot :D)
15:12:01 <glx> it's the first project in vs140.sln
15:12:10 <TrueBrain> and vs141 too?
15:13:01 <glx> same in vs141
15:13:20 <TrueBrain> good
15:13:22 <TrueBrain> less is more
15:13:27 <TrueBrain> guess someone fixed it and never updated the docs :D
15:13:30 <glx> I think it was not the case a long time ago, but for that I need to check the history
15:13:42 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain updated pull request #6991: Use vcpkg integration in Visual Studio https://git.io/fhT88
15:16:52 *** Borg has joined #openttd
15:19:13 <TrueBrain> glx: what it was is less important than what it is :D
15:19:18 <TrueBrain> and less documentation is better :P
15:19:50 <glx> indeed, it's better now
15:27:34 *** Samu has joined #openttd
15:27:39 *** Progman has joined #openttd
15:28:02 <Samu> hi
15:32:20 <glx> found it https://github.com/OpenTTD/OpenTTD/commit/a7914ca0b4e73bd6aa518ac5e7cbeb7a110d4827#diff-35a2864c314e4367eb1684bfe126a967
15:32:46 <glx> almost 12 years ago
15:33:09 <TrueBrain> this happens when people don't update docs :P
15:34:14 <TrueBrain> there was more non-sense in there btw
15:34:16 <TrueBrain> dead-links etc
15:34:26 <TrueBrain> hopefully all is good now :)
15:43:56 * andythenorth forgot how to release newgrfs
15:44:55 * TrueBrain wants someone to approve his PR :P
15:46:10 <Samu> my 12th function
15:46:13 <Samu> https://paste.openttdcoop.org/puya3ikkl
15:46:21 <Samu> good english? good description?
15:46:37 <Samu> and good mechanic usage?
15:47:16 <Samu> i should be removing functions instead of adding :(
15:48:32 <andythenorth> lol bananas error handling only applies after the 11MB upload is done
15:48:36 <andythenorth> then I have to upload again :P
15:49:07 <TrueBrain> andythenorth: make it better! :P
15:49:16 <andythenorth> nah
15:49:18 <andythenorth> frog job
15:50:23 <andythenorth> faster jenkins please
15:50:26 <andythenorth> thanks bai
15:50:29 <andythenorth> (coop)
16:00:50 <andythenorth> Horse 2 alpha shipped
16:00:53 <andythenorth> now chores
16:06:44 <Samu> made a few slight changes to the function
16:07:02 <Samu> to ensure it always returns the expected values
16:07:26 <Samu> meh, feels bad to talk alone
16:25:51 <Samu> my AI is still slow in management
16:26:23 <Samu> i see stopped vehicles in the depot from 5 years ago, waiting to be renewed or sold
16:26:51 <Samu> i just dont know what to do anymore to speed this process at this point :(
16:28:57 <Xaroth> that moment when you open up your github activity
16:29:01 <Xaroth> and you see you're being stalked by planetmaker.
16:29:05 * Xaroth eyes planetmaker
16:44:23 *** Thedarkb-T60 has quit IRC
16:49:46 <Samu> need to create a tl;dr readme
17:02:36 <DorpsGek_II> [OpenTTD/OpenTTD] jottyfan opened pull request #6992: Patch 1 https://git.io/fhTKB
17:03:55 *** Wormnest has joined #openttd
17:26:37 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 approved pull request #6991: Use vcpkg integration in Visual Studio https://git.io/fhT6G
17:27:01 <glx> even if it's like approving my own PR ;)
17:29:02 <TrueBrain> haha :D
17:29:13 <DorpsGek_II> [OpenTTD/OpenTTD] TrueBrain merged pull request #6991: Use vcpkg integration in Visual Studio https://git.io/fhT88
17:29:17 <TrueBrain> there we go, no more openttd-useful! \o/ \o/
17:29:19 <TrueBrain> PARTYYYYY
17:29:25 <TrueBrain> tnx glx :D
17:31:43 *** Thedarkb-T60 has joined #openttd
17:51:24 <andythenorth> boom
18:08:53 *** Thedarkb-T60 has quit IRC
18:09:14 *** Thedarkb-T60 has joined #openttd
18:10:37 *** FLHerne has quit IRC
18:11:11 *** FLHerne has joined #openttd
18:24:57 <andythenorth> so more-cargos-FIRS time
18:27:22 *** Thedarkb-T60 has quit IRC
18:27:44 *** Thedarkb-T60 has joined #openttd
18:37:03 <Eddi|zuHause> <glx> even if it's like approving my own PR ;) <-- the point of "approving" is to make sure at least 2 people were involved?
18:37:15 <Eddi|zuHause> i think that's the case here :)
18:37:53 <glx> yes it's to have a double check
18:40:00 <Samu> Zuu! how do I handle 2 different SCPClients, trying to detect if the game is NoCarGoal or CompanyValueGS or neither, can't get this to work properly
18:43:10 <Samu> especially the "neither" part
18:44:43 <Samu> you see, I have a do/while loop trying to detect if there's NoCarGoal or CompanyValueGS or neither.
18:44:57 <Samu> if there's NoCarGoal, the loop breaks
18:45:06 <Samu> if there's CompanyValueGS, the loop breaks
18:45:20 <Samu> if there's neither, the loop doesn't break, but I need it to break
18:46:59 <Samu> i tried with a counter with a limit of 500 tries
18:47:08 <Samu> but that can be a too long time
18:47:14 <Samu> before giving up
18:49:01 <Samu> halp https://paste.openttdcoop.org/pm8nykyc1
18:51:55 <Samu> if i check it against false, it breaks the loop too early
18:52:58 <Samu> is there a way that these clients could give another answer?
19:12:53 <Samu> trying a different approach
19:13:27 <Samu> https://paste.openttdcoop.org/pvyl4y1v5
19:13:33 <Samu> the counter outside the two whiles
19:14:09 <Samu> but it still has to timeout if there's "neither"
19:17:11 <Samu> why isn't the counter stopping?
19:17:12 <Samu> t.t
19:17:22 *** Thedarkb-T60 has quit IRC
19:17:32 <Samu> oh, right
19:17:43 *** Thedarkb-T60 has joined #openttd
19:17:53 <Eddi|zuHause> hm, i must have gotten a "wrong" mod, now i have silly "multiple unit" self-driving freight wagons, and i can't find which mod adds them
19:18:43 <andythenorth> is it a modern modding API?
19:18:47 <andythenorth> with XML and stuff
19:18:48 <andythenorth> ?
19:20:04 <Eddi|zuHause> who knows...
19:20:24 <Samu> https://paste.openttdcoop.org/psveifvzx
19:20:51 *** chomwitt has quit IRC
19:41:26 <TrueBrain> funny, on Azure Pipelines it would mean that every PR change we fetch the docker from hub.docker :D That will be a lot of bandwidth
19:41:33 <TrueBrain> wish it could be cached somehow ..
19:47:32 <TrueBrain> how to get gfx files on the macos machine .. hmm
19:48:12 *** nielsm has joined #openttd
19:48:19 <Samu> isn't there a simpler way to get my company id?
19:48:30 <Samu> if (action_price.GetCosts() < cvgs.GetCompanyIDDiffToNext(AICompany.ResolveCompanyID(AICompany.COMPANY_SELF), false)) {
19:51:57 <glx> I think you can call ResolveCompanyID() once and store the result for use in other calls
19:52:49 <glx> because the index should not change in a running game
19:53:52 <Samu> hmm, sounds like something i should have done a long time ago
19:56:01 <TrueBrain> yippie, regression on MacOS passes :D Sweet :D
20:02:26 <andythenorth> nice TrueBrain
20:03:14 <nielsm> Eddi|zuHause, andythenorth, transport fever modding API? it's based on static data defined via Lua
20:03:25 <TrueBrain> Windows is SLLLOOOWWWW :P
20:03:45 <nielsm> i.e. it executes the lua scripts on game start and stores the data generated, then never calls into lua again during play
20:03:55 <TrueBrain> MacOS was done in 3 minutes .. linux in 6 ... Windows ... in 7
20:03:57 <TrueBrain> lame
20:04:19 *** Thedarkb-T60 has quit IRC
20:04:20 <nielsm> TrueBrain, the windows build is not very good at multithreading, unfortunately
20:04:35 <TrueBrain> the linux builds are still with -j1
20:04:39 <TrueBrain> about to push them to -j2 :D
20:04:57 <nielsm> huh, I had to run the linux builds with -j2 to get them down from 5-6 mins
20:05:25 <TrueBrain> running just 'make' doesnt do CPU detection, does it?
20:05:40 <TrueBrain> fun fact: running 'make -j' is horrible :D
20:05:41 <nielsm> no
20:06:04 *** Thedarkb-T60 has joined #openttd
20:07:33 <Eddi|zuHause> i think i once made an alias so it would run -j12
20:07:54 <Eddi|zuHause> without me forgetting it all the time
20:09:37 <nielsm> TrueBrain, do you think it might be worth to find some contact at MS/azure and verify that using build artifacts as storage for docker images/dependencies isn't considered "abusive" (to avoid risk of nasty surprises later on)
20:10:17 <TrueBrain> nielsm: the docker images that are stored will fall off with retention; the only ones published as artifacts are only to be used by the job itself
20:10:23 <TrueBrain> so I assume they meant it to be used like that
20:10:42 <TrueBrain> (so the traffic is also only internal)
20:10:59 <TrueBrain> the Windows Dependencies .. they are only to be used by other pipelines on the same account .. but .. they are open for anyone
20:11:15 <TrueBrain> I am indeed not sure how they would like that to be used for the free accounts
20:11:17 <TrueBrain> that is very vague
20:14:06 <TrueBrain> nielsm: I will see if I can find a contact to ask this question :)
20:14:34 <TrueBrain> I guess I set it up, and ask them if they are okay with this way of using their Azure Pipelines :)
20:20:51 <LordAro> #6992 needs closing
20:21:17 <TrueBrain> well, someone first has to explain to him how to do it properly
20:21:20 <TrueBrain> in a nice tone
20:21:22 <LordAro> or pointing in the direction of the thing that resizes the window
20:21:24 <TrueBrain> then you can close it :)
20:21:43 <TrueBrain> but feel free :)
20:21:48 <TrueBrain> such a pointer sounds like a wonderful idea!
20:23:32 <TrueBrain> nielsm: tools like 'Atom' use it in the same way; still I will drop them an email :D
20:23:36 <TrueBrain> nielsm: or do you want to? :)
20:24:25 <nielsm> you set it up, and you have more seniority in the project, so I'll leave it to you :)
20:25:53 <TrueBrain> meh; seniority is overrated
20:25:56 <TrueBrain> I just want this done :D
20:36:21 <Samu> how do I get the 2nd item from an AIList?
20:36:56 <TrueBrain> nielsm: did you know it also integrates with GitHub Checks perfectly? Took me a bit to figure out how exactly, but damn, that is sweet :D
20:37:00 <Samu> list.GetItem doesn't do what I want
20:37:46 <TrueBrain> https://github.com/TrueBrain/OpenTTD/runs/44453205
20:37:50 <TrueBrain> I hope that URL works
20:37:54 <TrueBrain> but yeah .. awesomeness :D
20:38:29 <Samu> list.Begin() gets me the first item
20:38:49 <Samu> but if i want to get the item in the nth position, what would I do?
20:39:16 <Samu> list.Begin().Next().Next().Next() etc.??
20:40:50 <TrueBrain> nielsm: linux builds are now down to 4 minutes :D
20:44:08 <nielsm> and the entire first minute is waiting for checkout isn't it :)
20:48:16 <TrueBrain> ofc!
20:49:49 <TrueBrain> okay, pipeline works. Now I just need to find out how to run the regression on Windows ..
20:50:02 <TrueBrain> that is for tomorrow :D
20:50:47 <Samu> I wonder if I should enforce asserts
20:50:53 <Samu> in a library
20:51:46 *** Kaiser has joined #openttd
20:51:59 <Kaiser> "Unfortunately due to new improvements in Toyland environment, we ran out of room in the map array, so we have chosen to eliminate train signals."
20:52:03 <Kaiser> What does it mean?
20:52:52 <nielsm> look at the date it was written
20:53:01 <Samu> it means devs should stop making jokes
20:53:27 <Kaiser> 2018-04-01
20:53:29 <Kaiser> Oh...
20:53:32 <Kaiser> Now i see
20:53:41 <Kaiser> 1st of april
20:53:44 <ST2> it was so perfect that at Dec. 26th someone still falling for it :D
20:54:16 <Kaiser> Feelin like a fool
20:54:37 <ST2> no worries Kaiser :)
20:54:43 <Samu> hi st2
20:54:47 <Kaiser> One more question
20:54:50 <ST2> hi :)
20:55:19 <Kaiser> Where's situated config file? I just wanna change in-game fonts
20:55:28 <nielsm> on windows?
20:55:31 <Kaiser> yep
20:55:51 <nielsm> in your Documents folder, it should have made an OpenTTD folder
20:55:57 <nielsm> then look for openttd.cfg in there
20:56:05 <ST2> https://wiki.openttd.org/Openttd.cfg
20:56:22 <ST2> location for some OS's
20:57:37 <Borg> Kaiser: looking for multiplayer game? :)
20:58:06 <andythenorth> 6992 happens for english translation too
20:58:09 <andythenorth> it's bad UI
21:00:43 <Kaiser> Maybe
21:04:25 *** Borg has quit IRC
21:11:57 <glx> TrueBrain: of course it integrates with github, it's even available from github market place https://github.com/marketplace/azure-pipelines/
21:12:48 <Samu> Anybody can help me simplify this function? https://paste.openttdcoop.org/pwjr1knwo
21:12:55 <Samu> there's some repetition :(
21:14:28 <TrueBrain> glx: that is how the integration works; but it is not a given :)
21:14:37 <TrueBrain> travis for example doesn't integrate yet (at least, not last month)
21:14:44 <TrueBrain> it still uses the old ways of doing
21:14:47 <TrueBrain> so it was a nice surprise :)
21:15:50 <glx> but azure is a MS thing, and github too, so I guess their respective team can communicate together ;)
21:16:01 <TrueBrain> that is not a given
21:16:04 <TrueBrain> so again, a nice surprise :)
21:18:13 <glx> travis is more a gitlab thing IIRC
21:18:56 <glx> anyway it looks nice
21:25:30 *** synchris has quit IRC
21:37:07 <LordAro> glx: gitlab has its own ci system
21:38:32 *** Kaiser has quit IRC
21:49:12 * andythenorth should newgrf or something
21:50:21 <andythenorth> eh TrueBrain I'll reply to this https://www.tt-forums.net/viewtopic.php?f=32&t=84525
22:04:03 <andythenorth> https://www.tt-forums.net/viewtopic.php?p=1216513#p1216513
22:09:23 *** Zuu has joined #openttd
22:10:42 <Zuu> Samu: Don't detect if it is NoCarGoal or CV permanently, just query it where it makes sense to affect the logic. Or if you really need, detremine which it is at the start of your main loop and pass that along. But I wouldn't do that. I would assume that the boolean IsXYZ-method is cheap enough to use it inline.
22:12:21 <Zuu> Ie start building your first connection when the AI starts and it probably have not resoved yet which type of game it is, and then it will likely be known for connection 2+. But no need for seeing decisions so binary.
22:13:56 *** HerzogDeXtEr has joined #openttd
22:14:30 <Zuu> And for simplifying your function, it looks like there is repetion of some blocks. Maybe you can make a second method that implement one of those block generic enough (with parameters) that you can call it from your existing method for each of the blocks parameterized so it does the same thing as before.
22:15:01 <Wolf01> Chat buffer mode: on - <TrueBrain> there we go, no more openttd-useful! \o/ \o/ <- So if I want to compile now what steps do I need to do?
22:15:57 <Zuu> If you can record a state before you call your large method and after, it is possible to run the changed one and assert that it produce the same new state.
22:19:28 <glx> Wolf01: docs\readme_windows_msvc.md ;)
22:20:43 <glx> but it's really easy, follow quick start from https://github.com/Microsoft/vcpkg
22:21:15 <glx> then install the required libs
22:22:58 <Wolf01> +1
22:23:55 <FLHerne> andythenorth: 0ad (for example, I can think of several) has the dev revision log in a sidebar https://play0ad.com/
22:24:13 <FLHerne> I think that's quite nice
22:33:46 <DorpsGek_II> [OpenTTD/OpenTTD] agentw4b opened issue #6993: Enhancements: Allow the scenario (.scn) to run by using the parameter in the openttd.cfg file. https://git.io/fhTQd
22:37:57 <nielsm> TrueBrain, "# TODO -- Add a way to test (currently needs bash)" --- they do have bash (from git-packaged mingw) on the windows vm's
22:38:17 <Wolf01> Mmmh, it doesn't recognize vcpkg as a command system wide, even after the PS integration (I restarted PS yes)
22:39:08 <nielsm> it possibly needs you to log out and back in entirely
22:39:13 <nielsm> to update the default environment
22:39:30 <Wolf01> Strange, it should do it instantly
22:39:47 <Wolf01> At least with other things it worked
22:41:47 <Wolf01> Maybe I need to close all the PS shells
22:46:17 <Wolf01> Do I need to run the package install from the checkout folder or any folder is fine?
22:47:05 <nielsm> it installs the packages in the checkout folder regardless
22:47:59 <Wolf01> Of the vcpkg project?
22:48:17 <nielsm> yes
22:48:25 <Wolf01> Ok, then it worked
22:48:56 <Wolf01> Got a brand new clone of ottd master, it doesn't find the packages
22:51:23 <glx> specified x86-windows-static or x64-windows-static when installing the packages ?
22:51:35 <Wolf01> x64
22:51:50 <glx> vcpkg list will tell what packages are installed
22:52:05 <Wolf01> Maybe I should also compile for x64 instead of win32
22:52:38 <glx> if you installed only x64 packages yes
22:53:05 <Wolf01> I was used with my config which allowed to compile both
22:53:20 <Wolf01> Oook, compiled, fine, kthbye :D
22:53:31 <glx> if you want both you can also install x86 packages
22:54:14 <nielsm> I was just about to suggest you add a .vcxproj.user file next to the supplied .vcxproj to augment the build: https://gist.github.com/nielsmh/2aef12fbda4334b004365b8ab645b7d7
22:54:50 <Wolf01> That's the one I had previously :P
23:03:56 <Wolf01> VS2017 is really faster compared to VS2015, I miss some little utilities but finally I decided to switch :P
23:04:58 <Wolf01> Also bed, tomorrow work
23:05:02 <Wolf01> 'night
23:05:10 *** Wolf01 has quit IRC
23:07:06 *** gelignite has joined #openttd
23:15:16 *** sla_ro|master has quit IRC
23:21:02 <andythenorth> bed
23:21:07 *** andythenorth has quit IRC
23:25:19 *** nielsm has quit IRC
23:39:12 <DorpsGek_II> [OpenTTD/OpenTTD] glx22 updated pull request #6987: Fix: [Win32] WIN32 may not be defined, always prefer the compiler pre… https://git.io/fp9vd
23:45:13 <Samu> https://paste.openttdcoop.org/pwcf1wdzf
23:45:27 <Samu> i'm such a terrible coder
23:46:30 <Samu> AITown.TOWN_ACTION_BUILD_STATUE is everywhere
23:48:23 <Samu> well, the AILog line is to be eliminated
23:48:37 <glx> but it's for 3 different calls so nothing you can do
23:49:04 <glx> yes except the duplicate call due to AILog line
23:49:13 <Samu> https://paste.openttdcoop.org/ptjsvzrdg
23:49:16 <Samu> without it
23:51:02 <Samu> the ai company resolve should have been handled by now
23:52:01 <Samu> LuDiAIAfterFix.my_company_id
23:52:20 <Samu> kek, still big because...
23:52:39 *** Thedarkb-T60 has quit IRC
23:53:03 <Samu> maybe an util
23:55:03 <Samu> function Utils::MyCID() { return AICompany.ResolveCompanyID(AICompany.COMPANY_SELF); }
23:55:35 <Samu> at least Utils.MyCID() is shorter