Config
Log for #openttdcoop.devzone on 6th May 2011:
Times are UTC Toggle Colours
02:35:37  *** orudge has quit IRC
02:35:40  *** orudge has joined #openttdcoop.devzone
07:12:08  *** ODM has joined #openttdcoop.devzone
08:31:19  <Terkhen> it seems that doing OpenGFX+ Industries closure tests without any newgrfs loaded was not the path to success
08:35:24  <planetmaker> hm? Did you try the produce block?
08:36:04  <planetmaker> http://devs.openttd.org/~planetmaker/patches/index.php?source=doc_produce.diff <-- I also wrote a short piece of documentation. To be revised, though
08:36:52  <Terkhen> that's what I'm doing right now, but running tests without the newgrf loaded might have confused me a little :)
08:37:34  <Terkhen> I'm assuming that right place to call the produce callback is the default case of the current callback switch
08:38:02  <Terkhen> produce(industry_cargo_arrive_produce, 0, 0, 0, 0, STORE_PERM(0, 0x00)); <--- and that something like this will set the counter to zero
08:38:32  <planetmaker> oh, that way "without newgrfs" ;-)
08:38:50  <planetmaker> yes, the default case of current_callback switch, I'd say
08:40:01  <planetmaker> hm... I'm not sure about that logic, but yes
08:40:33  <Terkhen> neither am I
08:40:58  <Terkhen> I know that you can do store operations in the production callbacks because andy is doing it too, but I'm not sure that's the right way to do it
08:50:28  <Terkhen> http://paste.openttdcoop.org/show/180/ <--- the important part is the variable of industry_monthly_prod_change_switch
08:51:48  <Terkhen> it looks like a bug in nml to me
10:30:54  <Brot6> HEQS "Heavy Equipment" Set - Bug #2414: Tram trailing vehicle lengths appear to be wrong (Eddi) @ http://dev.openttdcoop.org/issues/2414#change-6658
10:34:06  <planetmaker> indeed it does not look consistent, Terkhen
11:16:55  <Terkhen> it seems like using an array interfered with executing the callback somehow
11:17:17  <planetmaker> quite so
11:52:51  <Terkhen> http://paste.openttdcoop.org/show/181/ <--- I still have to test if produce() really stops the closing process, but this code more or less works
11:53:11  <Terkhen> the power plants are closed in an interval of 5, 6 years
11:56:54  <Terkhen> no, it is right, they close in five years and a month :)
11:56:54  <planetmaker> it looks to me, Terkhen, whether the produce has one too little argument
11:57:06  <planetmaker> three input and two output cargos
11:57:23  <planetmaker> leading ID. And then a repetition argument
11:57:27  <planetmaker> as option
11:57:42  <Terkhen> hmm.. the five arguments are there, I don't have a repetition argument
11:57:47  <planetmaker> hm... the 5th is the STORE...?
11:57:52  <planetmaker> I see :-)
11:57:53  <Yexo> repetition argument is optional
11:57:55  <planetmaker> looks strage
11:57:56  <Terkhen> yes, I chose one at random to use it
11:58:08  <Terkhen> as I said before, I'm not sure that is the right place to do an store :)
11:58:19  <Yexo> it's as correct as any other place
11:58:19  <planetmaker> it looks out of place, if you ask me
11:58:27  <planetmaker> but correct still.
11:58:30  <Terkhen> now that I know that power stations close in regular intervals I can test if a serviced power station survives
11:58:32  <Yexo> why do you want a store there?
11:58:42  <planetmaker> I wonder if it can have a more intuitive syntax. But I'm out of a good suggestion, too
11:58:59  <Terkhen> Yexo: whenever the power station accepts some coal, the counter is reset to zero and the countdown to closure starts again
11:59:30  <planetmaker> Terkhen, we should start to re-write FIRS in NML ;-)
11:59:51  <planetmaker> Might be even easier than anticipated. "Just" work
12:00:01  <Terkhen> lots of work :P
12:00:07  <planetmaker> yeah
12:00:13  <planetmaker> But might motivate andy
12:00:19  <planetmaker> He seems a bit... de-motivated lately
12:00:20  <Yexo> Terkhen: how do you decide when the production callback is called?
12:00:29  <planetmaker> always, Yexo
12:00:48  <Terkhen> Yexo: by enabling IND_CBF_PROD_CB_CARGO_ARRIVE
12:00:49  <planetmaker> via the CB_FLAGS it's actually defined when it's called
12:00:51  <Yexo> yes, but I mean, are you sure it isn't called every 256 ticks?
12:00:58  <planetmaker> that's another CBF
12:01:00  <Terkhen> oh, no I'm not
12:01:07  <Yexo> planetmaker: ah, ok :)
12:01:25  <Terkhen> I just assumed that it would not be called without the flag :)
12:02:05  <Terkhen> planetmaker: if andy is okay with the conversion then I could help on it
12:02:42  <planetmaker> I think he's a bit ambiguous about it.
12:03:02  <planetmaker> I should try my nml2nfo conversion code from OpenGFX on FIRS
12:03:25  <planetmaker> but maybe a full rewrite without inclusion is easier
12:03:41  <planetmaker> just in parallel in the same repo, directory nml instead of nfo
12:04:01  <Terkhen> but with nml2nfo we could convert it on small steps
12:04:11  <planetmaker> yes, but it's very tricky
12:04:36  <planetmaker> it works for separate pieces. But access to global vars... well. Maybe. We can specify them explicitly
12:04:38  <Yexo> Terkhen: result of STORE_PERM is the value, so this is equivalent to your code: http://paste.openttdcoop.org/show/182/
12:04:39  <Terkhen> FIRS has a huge amount of code, doing it all at once might be quite crazy
12:04:56  <planetmaker> But strings, for example, are not easily - if at all - transferable
12:05:11  <planetmaker> but we could then work with two language files and it might work (again)
12:05:17  <Terkhen> huh... I'm getting a 500 internal server error
12:05:21  <planetmaker> difficult might be cargo...
12:05:31  <planetmaker> hm, I don't
12:07:08  <Terkhen> I only get it on paste.openttdcoop.org
12:09:28  <Ammler> Terkhen: just reload, paste is still running on a temporary stage server :-)
12:09:52  <Ammler> so it could happen, that it can't handle too many calls at same time
12:10:25  <Ammler> is paste useful, shall I deploy it?
12:11:22  <Terkhen> still not working
12:12:07  <Ammler> hmm
12:13:54  <Terkhen> heh, after removing all cookies it is working again
12:14:28  <Terkhen> Yexo: thanks, I'll test it :)
12:14:31  <Ammler> maybe something else
12:14:46  <Ammler> I see no suspicius things in the logs
12:17:06  *** KenjiE20 has joined #openttdcoop.devzone
12:21:48  <Terkhen> ooh... I did not think of checking the persistent storage with the newgrf debug tools :)
12:21:58  <Terkhen> okay, it seems to be finally working
12:32:42  <planetmaker> Ammler, I use our paste all the time
12:32:55  <planetmaker> though it would be more useful, if it had automatic line breaks
12:33:16  <planetmaker> s/useful/comfortable/
12:33:50  <Ammler> yes, or at least not its own scrollbar
12:44:08  <Ammler> planetmaker: there was also a pastebin in redmine direclty, didn't you like it?
12:51:02  <planetmaker> dunno, or dunno anymore? Where is it?
13:13:13  <Terkhen> hmmm... I want to randomize closure a bit, but industries do not have triggers to allow rerandomization
13:14:51  <Terkhen> oh, the production change callbacks provide some random bits, I guess I can use that somehow
13:18:57  <planetmaker> you don't need re-randomization.
13:19:30  <planetmaker> if the additional 'grace' months are not re-randomized for an industry no one will notice, I think
13:20:43  <Terkhen> I was using a 25% chance of closure, which resulted in only 25% of the power plants closing, the other 75% would never close
13:22:19  <planetmaker> hm, ah, that way
13:22:54  <planetmaker> I was thinking of giving an additional period of time. Your approach of a random chance is better, though
13:24:18  <planetmaker> Is 1/16 chance for each month beyond 60 months of no service good?
13:24:47  <planetmaker> it will still be a huge industrial decay on large maps, but such is life, I guess
13:25:11  <Terkhen> 1/4 and 1/8 are too big, even in small maps
13:25:14  <Terkhen> let's see with 1/16
13:27:12  <Terkhen> http://paste.openttdcoop.org/show/183/ <--- with 1/16 (the number is the tile position of the industry)
13:27:29  <Terkhen> your approach might give better results, with this all closures are clustered
13:27:34  <planetmaker> @calc (15/16)**12
13:27:34  <Webster> planetmaker: 0.460951589398
13:27:44  <planetmaker> half the industries will then close within one year...
13:27:57  <planetmaker> @calc (31/32)**12
13:27:57  <Webster> planetmaker: 0.683188561096
13:28:08  <planetmaker> hm... and 1/3 if you use 1/32
13:28:17  <planetmaker> @calc (63/64)**12
13:28:17  <Webster> planetmaker: 0.827802827811
13:28:22  <planetmaker> 1/64 might be better
13:28:55  <Terkhen> ok, let's see
13:29:52  <planetmaker> or... how often is the random prod CB called?
13:30:05  <planetmaker> i.e. not close on the monthly one at all
13:30:30  <planetmaker> but only when that is used AND a certain chance is fulfilled AND the 5 years are passed
13:30:51  <planetmaker> (otherwise it'd return NO_CHANGE)
13:31:12  <Terkhen> hmm... I don't know how often it is called, but that would add another layer of randomization (right now they always close in the first day of the month)
13:33:35  <planetmaker> you have 32 bits of randomness there ;-)
13:33:53  <planetmaker> in extra_callback_info_2
13:34:33  <Terkhen> yes, that's what I'm using :)
13:35:15  <Terkhen> right now I'm testing with 1/256, because probably the random production callback is called more than monthly
13:38:04  <Terkhen> or not, only two closures in 20 years :P
13:41:09  <planetmaker> :-)
13:41:22  <planetmaker> seems like 'less' ;-)
13:46:16  <Terkhen> http://paste.openttdcoop.org/show/184/ <--- 50% chance of closure whenever the random production callback is called after the counter reachs 61
13:49:44  <Ammler> planetmaker: http://testing.dev.openttdcoop.org/pastes/1 but it isn't that advanced
13:51:35  <Ammler> I will check, what is needed to deploy lodgeit for productive mode
13:57:43  <Terkhen> http://paste.openttdcoop.org/show/185/ <--- with 100% change it looks better IMO
13:57:48  <Terkhen> s/change/chance/
13:57:59  <planetmaker> for the random CB?
13:58:07  <Terkhen> yes
13:58:14  <planetmaker> well, then go for it :-)
13:59:01  <Terkhen> ok :)
13:59:04  <Ammler> I think the cli tool for lodgit rocks
14:01:02  <planetmaker> nah, indeed the redmine paste is not that great. It overflows
14:03:19  <Ammler> planetmaker: better about the overflow: http://paste.openttdcoop.org/show/177/
14:04:04  <Ammler> something else to fix?
14:06:35  <Brot6> OpenGFX+ Industries - Bug #2578 (Closed): Power plants can close even if serviced (Terkhen) @ http://dev.openttdcoop.org/issues/2578
14:06:35  <Brot6> OpenGFX+ Industries - Bug #2578 (Closed): Power plants can close even if serviced (Terkhen) @ http://dev.openttdcoop.org/issues/2578#change-6659
14:06:35  <Brot6> OpenGFX+ Industries - Revision 54:ddc93b47e60b: Fix #2578: Power plants now close after a random ... (Terkhen) @ http://dev.openttdcoop.org/projects/ogfx-industries/repository/revisions/ddc93b47e60b
14:06:41  <Terkhen> finally it's done :P
14:07:04  <Terkhen> and I think I have finally understood callbacks
14:07:54  <Ammler> 2 flies with one slap
14:09:36  <Terkhen> :)
14:09:50  <Terkhen> well, the "understand callbacks" fly has gotten a lot of slaps :P
14:19:37  <planetmaker> :-)
14:20:00  <planetmaker> it takes a bit to understand the concept of callback. But yes... it's a good one. Took me a bit, too
14:20:59  <planetmaker> Ammler, that 177 still overflows A LOT
14:21:04  <Ammler> yes
14:21:10  <Ammler> but now without the scrollbar
14:21:19  <planetmaker> well, yes
14:21:38  <planetmaker> But still it'd be nice to have the option "wrap lines"
14:22:11  <planetmaker> nice piece of work, Terkhen :-)
14:42:04  <Terkhen> thanks :)
14:44:28  <Ammler> [16:21] <planetmaker> But still it'd be nice to have the option "wrap lines" <-- is there a css properity for?
14:45:16  <Ammler> pre and wrap lines doesn't like each other, I would guess
14:45:53  <Ammler> well, show me a example where that works and I might be able to "steal" it
14:46:31  <planetmaker> http://www.blooberry.com/indexdot/css/properties/text/wordwrap.htm <-- maybe?
14:46:33  <Webster> Title: Word-Wrap - Cascading Style Sheets Properties (at www.blooberry.com)
14:46:35  <Ammler> I think it is already quite nice to have the scrollbar erased
14:47:02  <Ammler> planetmaker: did you just google?
14:47:07  <planetmaker> yes :-P
14:47:17  <Ammler> you know, I could do that too :-P
14:47:21  <planetmaker> I do
14:48:24  <planetmaker> but you asked me about something I have no clue about whatsoever ;-)
14:49:49  <planetmaker> and I don't know how much experience you have with css's
14:54:21  <Ammler> well, I was able to remove the overflow: auto :-)
14:54:29  <Ammler> but I have not that much experience either
14:55:07  <planetmaker> see :-) That's what I assumed, thus I though a small search on my part might uncover *something* ;-)
14:55:40  <planetmaker> 177 still overflows here
14:57:34  <Ammler> yes, of course, but now it does on the browser and not on the layer anymore
14:57:44  <Ammler> so you can use the browser scrollbar
15:00:53  <Ammler> pm, found a method to wrap the lines
15:01:01  <Ammler> but then the numbering doesn't work anymore
15:07:35  <planetmaker> not ideal either
15:10:48  <Ammler> no
15:11:17  <Ammler> wrap lines would need to be optional and disable numbering
15:11:54  <Ammler> but for that I feer my javascript knowledge is already too limited :-(
15:13:18  <planetmaker> don't waste too much of your time on that ;-)
15:13:30  *** Lakie has joined #openttdcoop.devzone
17:10:06  <Brot6> NewGRF Meta Language - Bug #2581 (New): DevZone compile failed (compiler) @ http://dev.openttdcoop.org/issues/2581
17:12:31  *** frosch123 has joined #openttdcoop.devzone
17:15:45  <Brot6> NewGRF Meta Language - Revision 1327:f38b5550d174: Fix 2581: Update regression properly (planetmaker) @ http://dev.openttdcoop.org/projects/nml/repository/revisions/f38b5550d174
17:17:44  <Brot6> nml: compile of r1327 still failed (#2581) - http://bundles.openttdcoop.org/nml/nightlies/ERROR/r1327
17:18:12  <planetmaker> hm, still?!
17:18:44  <planetmaker> drat :S
17:24:04  <Brot6> NewGRF Meta Language - Bug #2581 (Closed): DevZone compile failed (compiler) @ http://dev.openttdcoop.org/issues/2581
17:24:04  <Brot6> NewGRF Meta Language - Revision 1328:58af578e1d74: Fix #2581: And really update every part of the... (planetmaker) @ http://dev.openttdcoop.org/projects/nml/repository/revisions/58af578e1d74
17:24:04  <Brot6> NewGRF Meta Language - Bug #2581 (Closed): DevZone compile failed (planetmaker) @ http://dev.openttdcoop.org/issues/2581#change-6660
17:25:11  <planetmaker> Ammler: it seems that Brot responds to its own messages. Could that be changed?
17:25:45  <Brot6> nml: update from r1324 to r1328 done - http://bundles.openttdcoop.org/nml/nightlies/r1328
17:27:08  <Ammler> planetmaker: example?
17:27:26  <planetmaker> the lines above :-)
17:27:36  <Ammler> those aren't, that is why I ask
17:27:55  <Ammler> different users :-)
17:28:39  <planetmaker> hm, are they? They look so much alike
17:29:06  <Ammler> :-)
17:29:13  <Ammler> compiler - planetmaker
17:30:29  <Ammler> hehe, did you test if regression test still works :-P
17:30:43  <planetmaker> :-)
17:33:15  <Ammler> do you run it locally before push?
17:36:27  <planetmaker> usually yes, but not this time
17:39:41  <Ammler> I think, it would be a good idea to make regression test more verbose and maybe also be albe to run a single test
17:39:58  <Ammler> since the test needs around 10 times the time of building :-)
18:25:02  <planetmaker> well, it tells the files it fails on
18:25:08  <planetmaker> that's posix-compliant ;-)
18:25:45  <Yexo> being able to run the test individually would be nice, but not a high priority
18:29:55  <Ammler> well, it would also give the adv. of more verbositiy as you have for quite a long time no idea, what is going on
18:30:41  <planetmaker> well, the usual way is to run regression and you're interested in the overall result
18:31:28  <planetmaker> but yes, it takes long
18:31:53  <Ammler> the time is not the bad part, the beeing in unknown is
18:32:26  *** andythenorth has joined #openttdcoop.devzone
18:33:05  <planetmaker> how unknown? A failed regression test tells you which file fails
18:33:38  <Rubidium> but he doesn't know it's doing something
18:34:26  <planetmaker> well, it is as long as it doesn't return
19:32:19  <Brot6> HEQS "Heavy Equipment" Set - Bug #2414: Tram trailing vehicle lengths appear to be wrong (Eddi) @ http://dev.openttdcoop.org/issues/2414#change-6661
19:33:10  <Brot6> NewGRF Meta Language - Revision 1329:8156fb5715fa: Change: rewrite the regression test Makefile s... (yexo) @ http://dev.openttdcoop.org/projects/nml/repository/revisions/8156fb5715fa
19:33:37  <Yexo> Ammler: there you go
19:34:54  <Terkhen> andythenorth: who created the food shop sprites? is it the "General Store" described in attribution.txt?
19:35:11  <andythenorth> Terkhen: Irwe, retouched by me
19:35:17  <andythenorth> yes, general store
19:35:23  <Terkhen> ok, thanks :)
19:35:33  <Terkhen> I stumbled into a problem with custom chains: food in temperate :P
19:36:55  <Terkhen> we were thinking about either introducing a new industry or changing the default houses
19:37:17  <Yexo> nml regression test is now slightly slower (13s instead of 13.4s avg) but has the advantage that "make -j" works which results in a lot faster running time (avg 3.5s)
19:37:25  <andythenorth> Terkhen: have fun with that problem :)
19:37:26  <Terkhen> changing the default houses could be useful, but it should not be done by a industry newgrf
19:37:29  <andythenorth> no
19:37:41  <andythenorth> it's not reliable / easy to explain
19:38:25  <Terkhen> oh, I also have to thank you for inspiration for the power plant closure code :)
19:40:43  <andythenorth> what does it do?
19:41:08  <planetmaker> :-) close with random chance, if unserviced longer than 5 years
19:41:13  <Terkhen> it is quite similar to what you did: a counter is increased each month and set to 0 when cargo is accepted
19:41:19  <planetmaker> I should test it actually :-)
19:41:33  <Terkhen> when the counter reaches 60, the power plant will close the next time that the random production callback is called
19:43:10  <andythenorth> yarp
19:45:51  <planetmaker> Terkhen: do we need the same code for other industries?
19:46:01  <planetmaker> Then... we should define it as template
19:46:05  <Terkhen> I don't think so
19:46:29  <Terkhen> hmm... maybe banks
19:46:31  <planetmaker> water tower?
19:46:36  <planetmaker> :-)
19:46:39  <planetmaker> ok, two
19:46:53  <Terkhen> my test game is in subarctic, but we are using valuables bank
19:47:54  <planetmaker> I'll move it to a template, if you don't mind.
19:47:59  <Terkhen> go ahead :)
19:48:01  <planetmaker> Water towers will need it at least, too
19:48:25  <Terkhen> I'm fighting with custom chains, they are almost ready
19:48:33  <Terkhen> only water would be missing, and I don't care much about it
19:50:46  <Yexo> are the "dos toyland" and "win toyland" palettes used anywhere? are they even used in the basesets?
19:51:35  <planetmaker> hm...
19:53:37  <Terkhen> where should I define a tilelayout? it is an unexpected token both inside item(FEAT_INDUSTRIES, ... and outside of it
19:54:58  <Yexo> tilelayout is only valid in action0
19:55:15  <Yexo> perhaps only for specific properties
19:57:15  <Yexo> Terkhen: the name is only valid for the "layouts" property of airports and industries
19:58:01  <planetmaker> permanent storage is per industry or per grf?
19:58:23  <Terkhen> Yexo: http://paste.openttdcoop.org/show/186/ <--- the error is at the definition of the layout (tilelayout shop_layout {)
19:58:29  <Terkhen> planetmaker: per industry
19:58:34  <planetmaker> thx
19:58:47  <Terkhen> you can check it in the newgrf debug window for industries :)
19:59:29  <Yexo> Terkhen: that code compiles fine here
20:00:00  <Yexo> oh, a tilelayout block is not allowed inside another block
20:00:11  <Yexo> so no "if (a) { tilelayout... }"
20:00:27  <Terkhen> oh, that was the problem :)
20:00:32  <Terkhen> thank you Yexo
20:00:35  <Yexo> np
20:02:22  <Ammler> Yexo: now you see, which tests take that long
20:03:03  <Yexo> Ammler: no test takes significantly than the other tests
20:03:10  <Yexo> *more time
20:04:29  <Ammler> it differs quite much here
20:05:07  <Ammler> ah, it depends on -jN :-)
20:06:13  <planetmaker> Yexo: I don't find those palettes used
20:12:42  <Ammler> Yexo_bot should delete language wiki pages without changes
20:20:18  <planetmaker> http://dev.openttdcoop.org/projects/ogfx-industries/repository/revisions/ddc93b47e60b/diff/src/industry_definition.pnml <-- would Terkhen's commit actually make for a good regression test and also example in the docs?
20:20:35  <planetmaker> Or should it be something which actually sets the production?
20:20:47  <planetmaker> this has the advantage: exists and tested ;-)
20:24:13  <Terkhen> example for what? it uses a lot of different stuff :P
20:26:36  <planetmaker> mostly for the produce. But I'd keep it as a whole example which also illustrates a bit the "surroundings"
20:26:47  <planetmaker> like verbatim copy of your commit into the docs :-P
20:37:04  *** Lakie has quit IRC
20:44:16  <Brot6> OpenGFX+ Industries - Revision 55:40b2bb09fcf1: Codechange: Move the production logic of the powe... (planetmaker) @ http://dev.openttdcoop.org/projects/ogfx-industries/repository/revisions/40b2bb09fcf1
20:46:19  <Terkhen> nice, I'll be using that for the shop as soon as I figure why it does not appear ingame :)
20:50:39  <Brot6> OpenGFX+ Industries - Revision 56:5689f0de0073: Change: Add the closure logic for black hole indu... (planetmaker) @ http://dev.openttdcoop.org/projects/ogfx-industries/repository/revisions/5689f0de0073
20:50:59  <planetmaker> Terkhen: a new industry must define every property - and the strings. That's at least my usual mistake with new industries. And of course it needs availability etc...
20:52:15  <Terkhen> hmm... okay, I was just defining those that seemed important and expecting a broken industry appearing
20:52:22  <Terkhen> I'll stop being lazy then :P
20:56:38  <andythenorth> defining a new industry takes a bit of work ;)
20:57:14  *** andythenorth has left #openttdcoop.devzone
20:59:28  <Terkhen> :)
21:02:48  <planetmaker> I'm off for tonight. Was an early morning :-) Good night
21:02:54  <Terkhen> good night planetmaker
21:10:29  <Terkhen> hmmm... industry properties closure_msg, prod_increase_msg, prod_decrease_msg and prod_decrease_msg do not accept strings, they fail with " String used as value for non-string property: 12"
21:12:03  <Brot6> HEQS "Heavy Equipment" Set - Bug #2414: Tram trailing vehicle lengths appear to be wrong (Eddi) @ http://dev.openttdcoop.org/issues/2414#change-6664
22:13:20  *** ODM has quit IRC
23:50:14  *** KenjiE20 has quit IRC

Powered by YARRSTE version: svn-trunk