IRC logs for #openttd on OFTC at 2017-12-22
⏴ go to previous day
00:20:39 *** m3henry has joined #openttd
01:02:20 *** mindlesstux has joined #openttd
01:08:11 *** sim-al2 has joined #openttd
06:06:37 *** sim-al2 is now known as Guest250
06:06:39 *** sim-al2 has joined #openttd
07:01:28 *** ATMunn is now known as Guest254
07:18:05 *** Smedles has joined #openttd
07:35:10 *** sim-al2 is now known as Guest255
07:35:12 *** sim-al2 has joined #openttd
08:03:28 *** synchris has joined #openttd
08:06:45 *** sla_ro|master has joined #openttd
08:22:37 *** ATMunn is now known as Guest256
08:24:18 *** ChanServ sets mode: +v tokai
08:29:51 *** ToBeFree has joined #openttd
08:31:19 *** chomwitt has joined #openttd
09:35:47 *** Flygon_ has joined #openttd
10:44:51 *** Progman has joined #openttd
11:36:47 *** longtomjr has joined #openttd
11:37:59 <longtomjr> Hello! I have been looking at GRFs and seen that some people does not use NML (at least not that I can see) to create GRFs and instead use python. (As an example, SQUID, FIRS etc.)
11:42:10 <longtomjr> Is there any help/docs available to help with the python approach, or should I just use figure it out reading source? If the latter, any pointers? Should I look at SQUID, or go straight to NML itself?
11:44:00 <Alkel_U3> If I understand right they use Python to generate NML where suitable, not really directly using python to write newgrfs
11:47:17 <longtomjr> Ah ok, thanks for the reply, is there any reason for doing it that way around?
11:49:34 <Alkel_U3> I guess getting rid of more repetition in bigger projects and having control of more elements from more concentrated piece of code but you'd best ask someone native to those projects you mentioned
11:53:50 <longtomjr> Thanks again. How would I go about contacting andythenorth for example? Forums? Is there a way to do it on ottdcoop?
11:56:53 <DorpsGek> __ln__: andythenorth was last seen in #openttd 13 hours, 18 minutes, and 22 seconds ago: <andythenorth> too dark?
11:58:07 <longtomjr> ty __ln__ , Will hang around here :)
11:58:07 <Alkel_U3> he'll appear here, eventualy
12:05:46 *** HerzogDeXtEr has joined #openttd
12:25:48 *** m3henry has joined #openttd
12:25:49 *** SgtStroopwafel has quit IRC
12:26:05 *** ToBeFree has joined #openttd
13:15:34 <longtomjr> Does anyone here have a small major mode for NML in emacs? (Just wanna know if I should write my own, or if there is one available)
13:26:08 *** Alberth has joined #openttd
13:26:08 *** ChanServ sets mode: +o Alberth
13:32:45 <m3henry> Man, trying to refactor anything to do with SmallVector seems to confuse the hell out of KDevelop
13:46:21 *** SgtStroopwafel_ has joined #openttd
13:48:28 <Alberth> IDEs are pretty stupid :p
13:48:31 *** Gustavo6046 has joined #openttd
14:30:25 *** Thedarkb has joined #openttd
14:31:57 *** sim-al2 has joined #openttd
14:36:56 <m3henry> It is a little understandable, the inheritance hierachy doesn't make it easy
14:38:35 <m3henry> I'd like to take SmallVector::Begin() and ::End() and make them begin() and end() so that one can do `for (auto& val : vec) {...}`
14:43:29 *** SgtStroopwafel_ has quit IRC
14:51:23 *** SgtStroopwafel_ has joined #openttd
14:51:34 <Alberth> I wonder if composition would be better
14:51:48 <Alberth> or even a begin() and end() template function
14:57:40 <m3henry> composition would certainly better for readability
15:28:23 *** Progman has joined #openttd
16:34:48 <Borg> 2 oil rigs closed in same time ;D
16:39:29 *** Thedarkb has joined #openttd
17:00:34 *** Stimrol has joined #openttd
17:45:05 *** Wormnest has joined #openttd
18:27:07 *** frosch123 has joined #openttd
18:28:02 *** andythenorth has joined #openttd
18:35:55 <longtomjr> Hey andythenorth. I seen that your newGRFs are written in python, I was wondering what the purpose of that is, and if there is any resources for making newGRF's with python.
18:36:56 <andythenorth> there is a tutorial in forums
18:37:03 <andythenorth> but it's not how I actually work
18:37:31 <longtomjr> mmm? Are you generating NML code with python?
18:38:22 <andythenorth> is the beginners guide I wrote
18:38:33 <andythenorth> I generated docs, sprites and NML with python
18:39:24 <longtomjr> wow cool. Thanks for the link :)
18:39:55 <Borg> anyone here does loco transfers on 8 tiles distance? ;)
18:40:42 <longtomjr> Have been cloning them and looking already, thanks a lot for the help though :)
18:40:50 <longtomjr> Have been looking at SQUID too.
18:41:22 <frosch123> so they documentation always fits the grf
18:41:35 <longtomjr> Nice thanks for chiming in frosch123
18:41:41 <andythenorth> it's much better having the vehicles or industries as objects in code
18:41:58 <longtomjr> do you use Sphinx for the docs?
18:42:05 <andythenorth> there's a sort of irony, that NML also parses the declarations, and builds objects in code :P
18:42:10 <andythenorth> no I wrote my own templates
18:42:33 <andythenorth> python objects -> NML -> python objects -> grf
18:42:42 <andythenorth> it's a really silly interface in retrospect :P
18:42:53 <longtomjr> What dev enviroment do you use? Do you have some syntax higlighting for vim (or emacs)?
18:43:05 <andythenorth> I have an editor on OS X that understands python
18:43:07 <Borg> andythenorth: holy necro.. long path... no misgenerations? :)
18:43:34 <andythenorth> my editor doesn't understand nml :(
18:43:43 <andythenorth> I could write a syntax plugin for it, but meh
18:43:56 <andythenorth> I don't write much nml, I try to avoid it :)
18:43:57 <longtomjr> ah ok, I have the same issue, currently looking to write a major-mode in emacs for it
18:44:14 <andythenorth> I have to read the docs every time I want to write nml
18:45:14 <longtomjr> Since NML is written in python, would it not make sense to create something that interfaces through the nml source/compiler directly without needing the generation of NML
18:45:28 <frosch123> longtomjr: there are nml syntax files for kate and geany
18:45:33 <frosch123> maybe you can base your stuff on that
18:46:19 <longtomjr> The reason I ask is because I am much more comfortable with python and have been using it for years, so that is why I wanted to use python for this too, since I love working in it.
18:48:02 <longtomjr> @frosch123, thanks. I am using the files available, but emacs is a wierd beast when it comes to implementations like this. Still, even though it is different, it is a hell of a lot better than working in TMLanguage files in xml
18:48:57 <longtomjr> It is just difficult for me since I only started using emacs this year, but it sounds like a fin challenge, and I get to learn some list while I am at it
18:53:19 *** Thedarkb has joined #openttd
18:56:12 <andythenorth> Eddi|zuHause imported some of the nml packages for CETS, and wrote directly with them, I think
18:56:33 <andythenorth> doing that and assembling the tree is beyond my programming skills
18:57:27 <Alberth> makes use of the code in other projects also complicated
18:57:44 <Alberth> not many people have that deep knowledge of python and nml internals
18:58:17 <Alberth> while eg FIRS source is being used in several other projects, precisely because it's nml text
19:01:46 <Borg> as we speak.. but newgrf
19:01:57 <Borg> anyone can explain me how to catch industry production callback?
19:02:12 <Borg> its Action 2 industry... but.. I cant figure out how its being catched...
19:02:16 <Borg> there is no such callback..
19:02:27 <Eddi|zuHause> andythenorth: i think i wanted to try something like that, but it never went very far
19:02:58 <Borg> or I can just use action 3 to bind it.. and engine is smart enough to find it?
19:03:14 <andythenorth> Borg: you writing nfo or nml?
19:03:19 <Borg> from description they said I need to check CB 1C variable..
19:03:27 <Borg> but they didnt say what value..
19:03:55 <andythenorth> I can't remember how to do the production CB
19:03:56 <Eddi|zuHause> Borg: variable 1C stores the callback number
19:04:09 <Borg> erm... NFO is that binary thingie?
19:04:24 <Borg> Eddi|zuHause: yeah.. but what value... its not state anywhere..
19:04:27 <Eddi|zuHause> so you check 1C for whatever number the production callback. but nml does that automatically
19:05:05 <Eddi|zuHause> iirc nml has "produce"-blocks
19:05:21 <Borg> but I dont use NML. I could not wrap myself around it..
19:06:38 <Borg> andythenorth: yeah.. but what are they values
19:06:51 <Borg> I even start digging OpenTTD source.. and it doent look like callback at all :(
19:07:35 <andythenorth> try an action 3 -> action 2
19:07:43 <andythenorth> there is only one action 2 for industries
19:07:47 <andythenorth> the production cb
19:07:58 <andythenorth> afaik, action 2 always must be chained in action 3
19:08:05 <andythenorth> I could look up *really* old FIRS code
19:08:15 <frosch123> the "production callback" is no "callback"
19:08:19 <frosch123> it has no callback id
19:08:24 <frosch123> it's the default thing
19:08:36 <Borg> so I can have multiple action 3 binding action 2?
19:08:45 <Borg> currently I have some callbacks in use
19:09:34 * andythenorth looking in old FIRS code
19:09:45 <Eddi|zuHause> yes, you can reuse an action2 in multiple action3
19:09:56 <Borg> Eddi|zuHause: but other way around?
19:10:10 <Eddi|zuHause> there is no other way around
19:10:14 <Borg> there is no colission after all :)
19:10:20 <Borg> so.. it might work.. thx
19:10:36 <Borg> because production callbacks are only for primary industries
19:10:50 <Borg> and secondary one.. use that action 2
19:10:55 <Eddi|zuHause> you have exactly one action3 per industry
19:11:28 <andythenorth> C1 in my example chains to the production cb
19:12:51 * andythenorth can still read NFO :P
19:12:58 <andythenorth> after about 5 years of not touching it
19:13:03 <Eddi|zuHause> is it like riding a bike?
19:13:57 <Borg> I was mistaken.. there is collision!
19:14:28 <Borg> but.. okey :) I will do exacly as you
19:15:25 <Borg> andythenorth: do you have any additional checks in C1 action2 ?
19:15:32 <Borg> or its directly a production callback?
19:16:36 <andythenorth> it runs through some varaction 2 storing to registers
19:17:55 <Wolf01> (I didn't use this one for a long time)
19:34:17 *** sla_ro|master has joined #openttd
19:45:47 <DorpsGek> Commit by translators :: r27947 trunk/src/lang/spanish_MX.txt (2017-12-22 19:45:39 +0100 )
19:45:49 <DorpsGek> spanish (mexican): 1 change by Absay
20:50:19 *** Thedarkb has joined #openttd
21:03:11 <Borg> RafiX: still have problems joining servers?
21:03:20 <Borg> im looking for players ;)
21:03:32 *** Gustavo6046 has joined #openttd
21:19:44 <andythenorth> anyone played new Steeltown?
21:20:32 *** Gustavo6046 has joined #openttd
21:21:19 <Borg> I think I will set train maintenance interval to 540 days
21:21:28 <Borg> 270 and they sit too much in depots
21:58:00 <Alberth> andy, started somewhat
21:58:17 <Alberth> seems ok, chemicals is new
22:43:54 * andythenorth considering adding Tyres cargo
22:44:17 <andythenorth> primarily for the cargo graphics at station
continue to next day ⏵