IRC logs for #openttd on OFTC at 2012-11-15
            
00:12:40 *** Zuu has quit IRC
00:13:08 *** supermop has quit IRC
00:13:58 *** Zuu has joined #openttd
00:16:17 *** krinn has joined #openttd
00:16:50 <krinn> hello
00:17:03 *** Eddi|zuHause2 is now known as Eddi|zuHause
00:19:07 <krinn> i get a strange result by squirrel (well, maybe not, but for me it look strange) : local _blah = null; switch (huhu) { case 0: _blah=0; break; case... } print(_blah) <- error _blah does not exist
00:20:26 <krinn> inside the switch case, _blah exist and show the proper value i have set, but once i reach the break; state the _blah value disappears, shouldn't it kep it ?
00:21:26 <Eddi|zuHause> smells scopy... :p
00:21:51 <krinn> it's all inside the same function
00:21:54 <Eddi|zuHause> i think the switch opens its own scope, so each _blah assignment there creates a new local variable, shadowing the other _Blah
00:22:15 <krinn> i was thinking that too :(
00:22:28 <Eddi|zuHause> but i don't know details about squirrel scopes
00:22:48 <krinn> but shouldn't i get an error inside the switch {} because i use _blah= and not local _blah= so inside the switch _blah is not define
00:23:06 <Eddi|zuHause> local is just syntactic sugar
00:23:12 <Eddi|zuHause> it's not required
00:23:31 <krinn> :o
00:23:38 <Eddi|zuHause> (at least if it works remotely like python)
00:23:42 <krinn> you mean local is not local then :)
00:24:11 <krinn> how can i fix that ?
00:24:20 <Eddi|zuHause> "a=0" creates a local variable a if it can't find a variable with that name
00:24:53 <krinn> mmm let me try the a=0 to see if it throw "a doesn't exist"
00:26:03 <krinn> no, i got the a doesn't exist error
00:26:25 <Eddi|zuHause> hm ok
00:26:38 <krinn> anyway to fix that ?
00:26:57 <krinn> inside the switch the print(_blah) works, not outside
00:28:21 <Eddi|zuHause> then i don't know... could be a squirrel/optimisation bug that the variable goes out of scope too earlly, or it could be a misunderstanding of the specs
00:28:59 <glx> you can try to print it before the switch, just to test
00:29:09 *** Zuu has quit IRC
00:29:17 <krinn> glx: it works, until i reach the break; statement
00:29:46 <krinn> the problem is because i do inside the switch _blah = aclass();
00:30:04 <krinn> if i do _blah = "hell", _blah after the break print "hell"
00:30:37 <glx> looks like it deletes the object when exiting from the switch then
00:30:49 <krinn> glx yes
00:31:01 <krinn> even if _blah was define itself before the switch
00:32:41 <krinn> damn scope hell!
00:47:34 <krinn> found the line that create this, if i comment it out, it works, else it doesn't :/
00:48:21 <krinn> but it's a foreach loop
00:57:17 *** pugi has quit IRC
01:01:26 <glx> maybe paste the code somewhere
01:03:06 <krinn> pastebin ?
01:03:14 <glx> yes
01:03:24 <krinn> really strange, i will put comment on the line that trouble me
01:06:07 <krinn> http://pastebin.com/A5eYEn3J the code
01:07:26 <krinn> http://pastebin.com/67zVknSE the error if i kept the foreach loop line uncomment
01:10:04 *** roadt has joined #openttd
01:10:24 *** catpants has joined #openttd
01:10:38 <krinn> really weird, the foreach make it lost the _station
01:11:16 <krinn> but after the break, as before the break i still have it
01:16:01 <glx> I don't think it's safe to modify _station.s_Tiles inside a foreach iterating it
01:17:02 <krinn> that's what i was thinking too, even i have done it plenty times
01:17:12 <krinn> i have change it too : foreach (loc, _dummy in _station.s_Tiles) { print("trigger bug"); }
01:17:39 <krinn> commenting it, it works, uncomment, it put trigger bug output and indeed the bug appears
01:18:41 <glx> and only this foreach breaks ?
01:19:06 <krinn> lol yes
01:19:20 <glx> because the one on the next line is very similar
01:19:25 <krinn> i have even change it to : foreach (loc, _dummy in _station.s_Tiles) { }
01:19:45 <krinn> ah no, sorry i have just add this one before pasting it, this one must be comment out too
01:22:41 <krinn> it's kinda amazing, even that trigger the bug -> local grrr = AIList(); grrr.AddList(_station.s_Tiles); foreach (loc, _dummy in grrr) { }
01:29:31 <krinn> i have update the pastebin with the current code and sample of output at end : http://pastebin.com/xgJLkMn2
01:31:35 <glx> that's really weird
01:31:53 <krinn> i know :D
01:31:59 <krinn> i really don't get what's going on
01:32:14 <krinn> the foreach make it act stupidly
01:37:23 <krinn> what squirrel version we use in openttd 1.2.1 ?
01:37:44 <krinn> i'm looking at : http://freecode.com/projects/the-squirrel-programming-language/releases/259630
01:37:59 <krinn> and i see foreach changes
01:38:12 <krinn> for squirrel 2.1.2
01:41:35 <glx> we use 2.2.5
01:42:13 <krinn> any function to get the squirrel version in openttd itself?
01:43:45 <glx> there is _version_
01:44:32 <krinn> you mean a print(_version_); should make it ?
01:44:38 <glx> yes
01:45:38 <krinn> ah yes, 2.2.5 stable
01:46:04 <krinn> and of course they don't gave 2.2.5 changed here :) http://sourceforge.net/news/?group_id=85893
01:47:25 <krinn> must say i'm totally lost now
01:48:33 <glx> http://sourceforge.net/projects/squirrel/files/squirrel2/squirrel%202.2.5%20stable/ there's a changelog here
01:49:50 <krinn> thank you
01:51:13 <krinn> glx you think it's squirrel bug too ?
01:51:19 <glx> dunno
01:52:17 <krinn> ah lol, i have just think i could for loop it instead of foreach :D
01:55:01 <glx> why not just use Valuate() .
01:55:07 <glx> ?
01:55:27 <krinn> ah yes, will work too
01:55:30 <krinn> changing code to see
01:56:15 <glx> because your line is exactly a use for Valuate() :)
01:56:46 <krinn> :) _station.s_Tiles.Valuate(AIRoad.GetRoadStationFrontTile);
01:58:34 <krinn> dbg: [script] [1] [P] loc=228518 other=228519
01:58:34 <krinn> dbg: [script] [1] [S] Your script made an error: the index 'bugme' does not exist
01:58:41 <krinn> valuate version works :D
01:59:11 <glx> it should be faster too
01:59:16 <krinn> it's really foreach, scarry, i have plenty
02:00:09 <krinn> grep -R foreach * | wc -l
02:00:09 <krinn> 248
02:00:11 <krinn> :(
02:00:35 *** Zuu has joined #openttd
02:00:41 <glx> even a foreach not using _station in any way ?
02:01:13 <krinn> ah no, i shouldn't have that special foreach between switch case a lot
02:02:03 <krinn> oh ! and glad at least the bug do throw an error that crash the ai !
02:02:13 <krinn> so should be 248 safe foreach :)
02:03:32 <krinn> should i put that in flyspray for reminding it ?
02:03:38 *** Djohaal has quit IRC
02:03:57 <glx> maybe yes
02:04:20 <krinn> even there's no real explain why it does that?
02:04:21 <glx> some devs are more familiar than me with squirrel VM
02:05:24 *** cyph3r has quit IRC
02:05:28 <glx> maybe you're the first to use foreach in a switch :)
02:05:55 <krinn> lmao, with a local variable before the switch, re-use after it
02:07:00 <krinn> i will post it tomorrow, will do a small AI with just the case in it to see if it could reproduce at least easy or it need special conditions
02:07:55 <glx> yes the smaller test case the better
02:09:53 <glx> http://www.tt-forums.net/viewtopic.php?f=65&t=49176
02:10:00 <glx> you're not the first :)
02:10:57 <krinn> glx wow amazing how you find this one so fast
02:11:28 <krinn> eheh i suppose i don't need a testing AI so, it's confirm
02:12:18 <glx> more than 2 years old
02:14:15 <krinn> so still affecting squirrel 2.2.5
02:16:15 <krinn> ahah lol and morloth fix works
02:16:47 <krinn> local _station = null; local stupidbug = 0; and the foreach works
02:22:04 *** Zuu has quit IRC
02:22:57 *** Knogle has quit IRC
02:40:13 *** Elukka has quit IRC
02:43:51 *** Pinkbeast has joined #openttd
02:44:34 <Pinkbeast> Ha, I think I just realised why cargod*st always produces unfeasible pax numbers
02:45:02 *** perk11 has joined #openttd
02:54:57 *** perk11 has quit IRC
03:17:32 *** TrueBrain has joined #openttd
03:19:47 *** kais58_ is now known as kais58|AFK
03:20:12 *** kais58|AFK is now known as kais58_
04:13:10 *** glx has quit IRC
04:23:12 *** Zeknurn has quit IRC
04:25:10 *** catpants has left #openttd
04:39:15 *** Zeknurn has joined #openttd
05:34:39 *** Psyk has quit IRC
05:49:58 *** flaa has quit IRC
05:56:02 *** Eddi|zuHause has quit IRC
05:56:16 *** Eddi|zuHause has joined #openttd
06:25:33 *** sla_ro|master has joined #openttd
06:29:29 *** HerzogDeXtEr has quit IRC
06:33:25 *** Prof_Frink has quit IRC
07:25:05 *** andythenorth has joined #openttd
07:26:38 *** Devroush has joined #openttd
07:31:30 *** andythenorth has quit IRC
07:31:54 *** valhallasw has joined #openttd
07:32:17 *** Zeknurn has quit IRC
07:39:43 *** Zeknurn has joined #openttd
07:41:11 *** andythenorth has joined #openttd
07:46:25 *** KouDy has joined #openttd
07:49:05 *** andythenorth has left #openttd
07:55:00 *** RavingManiac has joined #openttd
08:04:38 *** pugi has joined #openttd
08:15:45 <Terkhen> good morning
08:17:51 *** valhallasw has quit IRC
08:28:37 *** Pensacola has joined #openttd
08:42:24 *** RavingManiac has quit IRC
08:51:13 *** frosch123 has joined #openttd
08:51:46 *** Devroush has quit IRC
09:05:16 <planetmaker> moin
09:08:13 *** frosch123 has quit IRC
09:11:47 *** Supercheese has quit IRC
09:17:27 *** valhallasw has joined #openttd
09:47:37 *** oskari89 has joined #openttd
10:03:39 *** sla_ro|master has quit IRC
10:20:04 <krinn> morning
10:34:06 *** cyph3r has joined #openttd
10:44:43 *** Devroush has joined #openttd
10:49:36 *** Sacro_ has joined #openttd
11:02:18 *** DDR has quit IRC
11:10:45 *** sla_ro|master has joined #openttd
11:20:48 *** dada__ has quit IRC
11:46:45 *** KouDy has quit IRC
11:48:41 *** KouDy has joined #openttd
11:55:37 *** Zeknurn` has joined #openttd
11:59:17 *** Zeknurn has quit IRC
12:22:03 *** Rait has joined #openttd
12:27:52 *** cyph3r has quit IRC
12:30:41 *** dada_ has joined #openttd
12:36:50 *** andythenorth has joined #openttd
13:04:14 *** andythenorth has quit IRC
13:04:31 *** andythenorth has joined #openttd
13:13:22 <andythenorth> la la la
13:13:50 <Flygon> Nice singing
13:14:51 <andythenorth> electricity http://www.youtube.com/watch?v=WIYAALiE_lA&feature=relmfu
13:15:06 <andythenorth> what openttd *really* needs is tesla coils
13:15:52 <NGC3982> Indeed.
13:16:05 <Flygon> I want Tesla Coil trains
13:16:30 <Flygon> Can train NewGRF's determine the amount of sparks they create?
13:16:53 <andythenorth> ha
13:17:08 <Flygon> It's a serious question
13:17:16 <andythenorth> no
13:17:23 <andythenorth> it's a sore point for andythenorth
13:19:54 <Eddi|zuHause> http://img.pr0gramm.com/2012/11/fpuuf.jpg
13:20:05 *** cyph3r has joined #openttd
13:20:05 <V453000> well if your trains would be massively weak, they would use all of their effort all the time ... which would make a lot of sparks
13:20:09 <V453000> usability is .. :)
13:20:41 <Eddi|zuHause> sparks have nothing to do with effort
13:21:04 <andythenorth> did you see in the FISH thread btw, someone has suggested ships should have smoke
13:21:14 <andythenorth> it's an intriguing idea
13:21:15 <V453000> I thought when train has a hard time, it makes more sparks
13:21:20 <Eddi|zuHause> what a stupid idea!! :p
13:21:28 <V453000> with the setting set to 2
13:21:40 <Eddi|zuHause> V453000: sparks are usually caused by dirty spots on the catenary
13:21:49 *** Elukka has joined #openttd
13:22:02 <Eddi|zuHause> i.e. when the contact between catenary and pantograph is weak
13:22:11 <V453000> well I meant things like steam, diesel smoke and electricity sparks coming from top of trains
13:22:14 <andythenorth> not so much in ottd :P
13:22:18 <planetmaker> does ice count as dirt? ;-)
13:22:23 <Eddi|zuHause> yes :)
13:22:28 <V453000> right
13:22:39 <Eddi|zuHause> it's most common with ice
13:22:53 <V453000> still, diesel/steam is based on what the train is doing
13:22:57 <V453000> I think electricity just as well
13:22:59 <Eddi|zuHause> V453000: steam puffs are not "sparks" :)
13:23:13 <V453000> questionable!
13:23:18 <V453000> ok maybe not
13:23:53 <andythenorth> code will know
13:25:16 <Eddi|zuHause> andythenorth: the code calls them "effect vehicles", which cover all three types (and a little more)
13:28:07 <V453000> that is what Flygon was talking about isnt it
13:28:40 <Eddi|zuHause> in the context of tesla coils? why would he talk about steam puffs?
13:29:06 <V453000> Can train NewGRF's determine the amount of sparks they create?
13:29:17 <Flygon> Yes, that's what I want to know
13:29:30 <Eddi|zuHause> "spark" = "electricity effect"
13:29:42 <Flygon> The Tesla v1 train will be designed in 1894
13:29:42 <V453000> that is what I am saying all the fucking time :D
13:30:05 <Flygon> The Telsa v446 will come out in 2445 and will have the finest of Borg engineering
13:30:34 <V453000> I like anything imaginary
13:30:53 <Flygon> Okay then
13:30:58 <Eddi|zuHause> you're nuts...
13:31:03 <Flygon> What about the Flygon Aircraft? :D
13:31:30 <Flygon> Half the room just groaned irl, I just know it
13:32:39 <Eddi|zuHause> 80% of the room is idle...
13:33:37 <Flygon> Half the active room :U
13:35:08 <V453000> +-5 people
13:36:28 <Flygon> ...
13:36:33 <Flygon> How about this
13:36:40 <Flygon> http://www.youtube.com/watch?v=7_5v6dU9bNE Awesome music time
13:36:51 <Flygon> Because, I feel like an idiot right now
13:37:00 <Flygon> And I'd like to preserve what little humility I have left :p
13:38:06 <V453000> now that is some wtf
13:38:15 <Flygon> The music?
13:38:19 <Flygon> It's not that bad :(
13:38:38 <Markk> Is it Yello?
13:39:12 <V453000> dont think this is Yello
13:39:34 <Flygon> I'm so confused
13:40:56 <Markk> Are you bicurious?
13:41:12 <Flygon> Mate
13:41:27 <Markk> Oi
13:41:30 <Flygon> Uuuh
13:41:45 <Flygon> Should I reply via query?
13:41:47 <Flygon> >=3
13:41:54 <Markk> Haha, do it.
13:41:56 <Flygon> And besides
13:42:01 <Flygon> I'm not Bike Curious
13:42:01 <Markk> do so*
13:42:05 <Flygon> I'm Bike Commuter
13:42:08 <Markk> ;)
13:42:11 <Markk> Same here.
13:42:16 <Markk> At least in the summer.
13:42:26 <Flygon> Move to Melbourne
13:42:28 <Markk> But right now I'm taking the bike to the train and back.
13:42:37 <Markk> You don't think I kinda want to?
13:42:41 <Flygon> Summer can go anywhere between 8c to 47c
13:42:42 <Markk> Bloody cold up here atm.
13:42:59 <Flygon> I tried to take my bike onto the Tram, and the driver said no :(
13:43:08 <Flygon> So my friend went on the tram, and I used my bike
13:43:14 <Flygon> As it turns out, bikes are faster than trams
13:43:25 <Flygon> ...and cars, and buses, and trucks, in the Melbourne CBD
13:43:30 <Markk> :D
13:43:57 <Flygon> But yeah, I tend to take my bike on the train too
13:54:38 *** cyph3r has quit IRC
14:19:09 <Belugas> hello
14:19:19 <Flygon> Heya
14:19:34 <andythenorth> sqawk
14:19:42 <andythenorth> what noise does the whale make?
14:19:52 <andythenorth> this? http://www.youtube.com/watch?v=Kybyy1EkoOE
14:22:55 <Belugas> hehe
14:24:09 <andythenorth> so what have I done to break FIRS ground sprites? :p
14:29:24 <NGC3982> That's a very good song.
14:39:11 <andythenorth> how do I get openttd to complain about broken sprites?
14:39:14 <andythenorth> I need some debug
14:51:49 <planetmaker> might not have been you. might have been so before even
14:52:10 <planetmaker> might be related to invalid sprites being called, e.g. when drawing fences. maybe
14:52:23 <planetmaker> but not sure what you mean with "break"
14:53:20 <andythenorth> trying different FIRS versions suggests it was me :)
14:53:46 <andythenorth> iirc the layout is trying to draw sprite numbers that just don't exist (or so frosch told me)
14:54:02 <andythenorth> it's in old old pnml templates
14:54:14 <andythenorth> so unless it's an easy fix, I should just convert the affected industries
14:54:29 <andythenorth> issue shows as '?' sprite, or just flickering other sprites
14:55:07 <andythenorth> unfortunately, because I moved things it the repo, I've broken hg revision history on the affected files :P
15:17:43 *** Psyk has joined #openttd
15:26:07 <Ammler> yeah, I wonder how it is meant that hg rename should keep the history
15:26:49 <Ammler> but just use the old path with hg log
15:41:09 *** perk11 has joined #openttd
15:46:44 *** KouDy has quit IRC
15:55:46 *** Cybert1nus has joined #openttd
15:57:43 *** TyrHeimd1l has joined #openttd
15:57:46 *** Markk_ has joined #openttd
15:58:07 *** mikegrb has quit IRC
15:58:07 *** Pulec has quit IRC
15:58:07 *** KyleXY has quit IRC
15:58:07 *** murr4y has quit IRC
15:58:07 *** kais58_ has quit IRC
15:58:07 *** Guilux has quit IRC
15:58:07 *** TyrHeimdal has quit IRC
15:58:07 *** xaroth has quit IRC
15:58:07 *** Markk has quit IRC
15:58:07 *** Cybertinus has quit IRC
15:58:09 *** Markk_ is now known as Markk
15:58:19 *** kais58_ has joined #openttd
15:58:47 *** mikegrb has joined #openttd
15:59:29 *** Pulec has joined #openttd
15:59:29 *** KyleXY has joined #openttd
15:59:29 *** murr4y has joined #openttd
15:59:29 *** Guilux has joined #openttd
15:59:29 *** xaroth has joined #openttd
15:59:39 *** Guilux has quit IRC
16:00:28 *** Guilux has joined #openttd
16:00:44 *** murr4y has quit IRC
16:01:19 *** murr4y has joined #openttd
16:13:32 <andythenorth> so
16:13:43 <andythenorth> GS that 'uses' 'electricity'
16:14:04 <andythenorth> needs to measure production at power stations (use delivered cargo as proxy)
16:14:14 <andythenorth> needs to be tied to specific newgrfs
16:14:48 *** KouDy has joined #openttd
16:14:55 <andythenorth> needs to have some effect on town or other goals
16:15:28 <andythenorth> I had an idea called 'GridIron' which is basically build 1 power station per town for n towns, and deliver x thousand tonnes of coal
16:15:36 <andythenorth> it's a variation on cargo goal GS
16:18:30 <Pinkbeast> It does seem to be coal that most makes the producer-led model of OTTD a little painful
16:22:11 <andythenorth> ?
16:25:25 *** KouDy has quit IRC
16:27:16 *** Pensacola has quit IRC
16:33:47 *** HerzogDeXtEr has joined #openttd
16:37:51 *** Knogle has joined #openttd
16:38:55 *** sla_ro|master has quit IRC
16:49:10 *** Biolunar has joined #openttd
17:00:10 *** FLHerne has quit IRC
17:01:23 *** Djohaal has joined #openttd
17:01:38 *** Pensacola has joined #openttd
17:06:23 *** DanMacK has joined #openttd
17:08:11 <DanMacK> O/
17:29:12 *** HerzogDeXtEr has quit IRC
17:29:17 *** HerzogDeXtEr has joined #openttd
17:30:27 *** HerzogDeXtEr has joined #openttd
17:31:13 *** HerzogDeXtEr has joined #openttd
17:31:54 *** andythenorth has quit IRC
17:37:41 *** kero has joined #openttd
17:39:17 *** valhallasw has quit IRC
17:39:31 *** DanM has joined #openttd
17:46:42 *** DanMacK has quit IRC
17:55:16 *** sla_ro|master has joined #openttd
17:55:20 *** cyph3r has joined #openttd
17:55:26 *** Pensacola has quit IRC
18:01:33 *** andythenorth has joined #openttd
18:01:49 *** DanM has quit IRC
18:03:29 *** KouDy has joined #openttd
18:05:01 *** valhallasw has joined #openttd
18:10:27 *** andythenorth has quit IRC
18:17:28 *** Progman has joined #openttd
18:21:56 *** Devroush has quit IRC
18:23:13 *** KouDy has joined #openttd
18:30:54 *** roadt has quit IRC
18:32:41 *** Hyronymus has joined #openttd
18:33:41 *** krinn has quit IRC
18:34:54 *** Alberth has joined #openttd
18:34:54 *** ChanServ sets mode: +o Alberth
18:35:26 <Alberth> o/
18:38:20 *** Supercheese has joined #openttd
18:41:33 * Alberth puts a cable through the channel
18:42:32 *** glx has joined #openttd
18:42:32 *** ChanServ sets mode: +v glx
18:45:32 <DorpsGek> Commit by translators :: r24751 /trunk/src/lang (3 files) (2012-11-15 18:45:23 UTC)
18:45:33 <DorpsGek> -Update from WebTranslator v3.0:
18:45:34 <DorpsGek> norwegian_bokmal - 13 changes by jhsoby
18:45:35 <DorpsGek> romanian - 36 changes by kkmic
18:45:36 <DorpsGek> swedish - 1 changes by Joel_A
19:00:42 *** supermop has joined #openttd
19:01:02 *** andythenorth has joined #openttd
19:01:14 <supermop> yo andy
19:02:23 <andythenorth> lo
19:02:45 <Alberth> hi
19:02:51 *** Zuu has joined #openttd
19:02:59 <Alberth> hi Zuu
19:03:06 <Zuu> Hello Alberth
19:03:11 <supermop> so no one is writing a power gs, but everyone is saying they'd like one
19:03:28 * Alberth has not said any such thing
19:03:33 <supermop> haha
19:03:44 <supermop> literalism aside,
19:03:45 <andythenorth> I am not writing one
19:03:55 <andythenorth> but I have a name and a concept - GridIron
19:04:01 <supermop> is this something i could conceivably do?
19:04:06 <andythenorth> probably
19:04:27 <supermop> and how would the GS recognize power production?
19:04:34 <Alberth> anyone can, given that you have enough itch
19:04:47 <supermop> it seems that simply looking for coal delivery isn't sufficient
19:04:52 <Zuu> a GS can monitor cargo delivery to industries/towns
19:05:28 <Zuu> why isn't it sufficent?
19:05:33 <supermop> as some industry grfs could implement other types of power plants, not to mention industries that accept coal but do not produce pwer
19:06:02 <Alberth> supermop: don't try to get the optimal solution, just find any solution that works at first
19:06:06 <supermop> supplying the Firs concrete factory with coal shouldn't power an aluminum plant
19:06:06 <andythenorth> you have to tie it to specific grfs
19:06:21 <andythenorth> you need to look for an industry ID
19:06:30 <andythenorth> it's known to be a poor solution, but meh, try it
19:06:40 <Alberth> it's quite likely that once you have a solution, people will change their ideas
19:06:50 <supermop> can you look for any cargo delivered to industry type X?
19:06:59 <andythenorth> you can track delivered amounts
19:07:02 <supermop> or only cargo y?
19:07:06 <Zuu> You can check that the industry type doesn't have any cargo output.
19:07:13 <andythenorth> right now the electricity debate has entered into bikeshedding territory :)
19:07:21 <andythenorth> or rather, just a noisy debate :P
19:07:32 <supermop> bikeshed?
19:07:40 <supermop> what angloism is this?
19:07:50 <andythenorth> arguing about what colour to paint the bikeshed at the nuclear power plant
19:08:00 <andythenorth> http://en.wikipedia.org/wiki/Parkinson's_Law_of_Triviality
19:08:01 <supermop> blue
19:08:04 <supermop> easy
19:08:09 <andythenorth> actually the electricity debate is not bikeshedding
19:08:12 <andythenorth> just noisy :P
19:08:13 <Zuu> supermop: You can monitor cargo of a specific cargo type diliveried/picked up to/from any industry by a specific company.
19:08:27 <andythenorth> supermop: just adapt NoCarGoal, or SiliconValley
19:08:34 <andythenorth> SV might have more of what you need already
19:08:57 <Zuu> Or you can monitor a specific town to get all cargo deliveried to houses and industries of that town.
19:09:01 <supermop> can a gs require specific grfs, or is it agnostic?
19:09:06 <Alberth> http://nogo.openttd.org/api/trunk/classGSCargoMonitor.html
19:09:26 <Zuu> A GS cannot check for specific NewGRFs by NewGRF id or name.
19:09:28 <andythenorth> supermop: your readme.txt can require specific grfs :)
19:10:09 <andythenorth> GS should be able to mark grfs as dependencies
19:10:39 <supermop> what programming knowlege should I learn? do i need to knpow c?
19:10:48 <Zuu> Squirrel is enough
19:11:14 <Zuu> http://squirrel-lang.org/doc/squirrel2.html <--- not so good documentation of the language
19:12:35 <Zuu> http://www.tt-forums.net/viewtopic.php?f=65&t=62163 <--- template GS that you can copy and rename for new projects
19:16:18 <Zuu> http://wiki.openttd.org/AI:Main_Page <--- wiki page that describes the infrastructure for AIs which in most cases also apply to game scripts.
19:16:37 * andythenorth wonders what will happen when it's discovered that only one GS per game is possible
19:16:44 <andythenorth> and that GS has limited magical powers
19:17:35 <andythenorth> :)
19:19:03 <supermop> if you wanted power and some other goal, it would be reasonable to write a new script that did both?
19:22:12 <Zuu> Yes, both would have to be in the same GS.
19:22:41 <Zuu> At some point we will probably see the first GS pack.
19:23:01 <Rubidium> andythenorth: a nuclear plant must be fluorescent green-ish yellow
19:23:26 <supermop> how about objects that produce power but take no fuel, such as a wind farm or dam? can GS look for those specific items based on grf loaded or would there be another way?
19:24:39 <Zuu> There is currently not an API to access NewObjects and properties of them.
19:24:47 <supermop> ok
19:28:17 <Rubidium> is there even a property to signal such things in objects at all?
19:28:25 *** cyph3r has quit IRC
19:28:25 *** TheMask96 has quit IRC
19:29:13 <Zuu> I guess such things would need to go via the name. Though now that I think of it, the name that the GS would see is probably subject to translations.
19:30:02 <supermop> can objects produce or accept cargo?
19:30:14 <Zuu> No, for that you want an industry.
19:30:17 <supermop> maybe dams etc would be better as industies or houses then
19:30:47 <andythenorth> industries
19:30:51 <andythenorth> hydro plant etc
19:31:01 <andythenorth> requires: nothing
19:31:03 <andythenorth> produces: nothing
19:31:06 <supermop> industry that accepts and produces no cargo
19:31:58 <supermop> i was hoping there would be a way to but a flag on some tiles (of anything) that says: this tile produces power
19:32:03 <supermop> and gs looks at that
19:32:48 *** TheMask96 has joined #openttd
19:33:29 <andythenorth> nope
19:33:36 <andythenorth> no way to do that
19:33:38 <andythenorth> how much of town control is implemented?
19:33:44 <supermop> kwh or mwh as a cargo would be good if one could forbid it from being transported
19:33:59 <supermop> then gs looks for mwh produced
19:34:22 <__ln__> i made a patch for that in ~2004
19:34:47 <Zuu> Or just don't make any industries that accept mwh?
19:35:06 <supermop> and you get the satisfaction of seeing a coal plant's productivity in its window
19:35:16 <andythenorth> that could be done in text
19:35:21 <andythenorth> but not in a way GS could read
19:35:25 <supermop> hmm
19:35:44 <andythenorth> do what can be done now
19:36:03 <andythenorth> there are lots of ideas kicking around, but little interest in actually implementing :)
19:36:07 *** DanMacK has joined #openttd
19:36:11 <andythenorth> same as you said on forums
19:36:33 <supermop> can i mess around with gs on note pad or similar?
19:36:36 <supermop> I am at work
19:36:47 <Zuu> You can use notepad if you like
19:37:01 <Zuu> Pretty much any text editor is enough.
19:37:15 <Zuu> And OpenTTD to run the GS of course :-)
19:37:18 *** KritiK has joined #openttd
19:37:32 <supermop> i don't need a compiler?
19:37:44 <supermop> (don't really get what a compiler is)
19:37:57 <Zuu> No, OpenTTD have everything built in to intreprete the .nut files.
19:38:55 <Zuu> To my understanding it reads the source files and does some sort of compiling/intrepreteing when you start a game to not have to read the .nut files letter by letter when it executes the script. But this all happen inside of OpenTTD.
19:39:27 <andythenorth> newgrf wiki has nothing about town control
19:39:49 <Zuu> Town APIs: http://nogo.openttd.org/api/trunk/classGSTown.html
19:40:51 <Zuu> What you want to watch out for is statements like these "Valid GSCompanyMode active in scope." in the description of an API. That means that it must perform that action on behalf of a company.
19:41:24 <Zuu> s/description/list of preconditions/
19:43:32 <Zuu> In several cases patches that lift these restrictions will probably be accepted. However, many of these require more than just a one-line change and making sure you don't break anything. For example the industry construction for GS change took me several hours to prepare.
19:44:32 *** mahmoud has joined #openttd
19:44:50 <Zuu> I don't want to discourage anyone from looking at other restrictions, just saying that going over all and lifting where possible, will take time.
19:49:32 <Rubidium> ... and even then bugs might creep up years later ;)
19:54:10 *** Devroush has joined #openttd
19:54:27 *** DanMacK has quit IRC
19:55:50 *** andythenorth has quit IRC
20:06:52 <__ln__> http://mars-one.com/en/
21:11:32 <supermop> has no one said anything in the past hour?
21:11:34 <supermop> weird
21:12:39 *** sla_ro|master has quit IRC
21:19:18 <__ln__> everything's been said already, there's nothing more to discuss.
21:20:51 <supermop> yep might as well decommission the channel
21:21:57 <Supercheese> Hmm, I haven't yet learned how to code GS
21:22:01 <Supercheese> just grfs
21:22:21 <__ln__> so, would anyone here be willing to emigrate to Mars?
21:22:38 <Supercheese> No way, the latency on mutliplayer games would be horrendous
21:25:38 <NGC3982> http://ic.pics.livejournal.com/lanube/25130513/53599/53599_600.gif
21:26:24 *** DDR has joined #openttd
21:27:32 *** Psyk has quit IRC
21:29:19 *** Psyk has joined #openttd
21:33:00 <Supercheese> So... even if one were to write an Electricity-related gamescript... what should it do, exactly?
21:33:27 <planetmaker> *that* is the good question ;-)
21:33:33 <Rubidium> empower the user
21:33:34 <Supercheese> That's the $64,000 question
21:34:03 <supermop> i will write a GS for $64,000
21:34:04 <planetmaker> I'd suggest to implement it like boosting or even enabling town growth, if nearby power plant receives coal
21:34:09 <supermop> i'll need 50% up front
21:34:14 <Supercheese> There's one suggestion
21:34:17 <Rubidium> spark the user's imagination?
21:34:34 <Supercheese> some folks seem to want electricity generation required to run electrified trains
21:34:53 <Rubidium> good luck starting in 2050 then
21:34:54 <Supercheese> I personally don't care for that feature, but more importantly, is that even possible?
21:35:01 <supermop> i don't know if it would be
21:35:14 <Rubidium> or actually, good luck starting any time...
21:35:28 <Rubidium> as trucks/busses would then need diesel
21:35:30 <Supercheese> Horse-drawn stuff?
21:35:35 <supermop> i think if you do that, you need well supplied oil refineries too
21:35:41 <Rubidium> horses need straw/grain
21:35:44 <supermop> rickshaws
21:35:50 <Supercheese> First route must be from farm
21:35:53 <Supercheese> :P
21:35:54 <Rubidium> rickshaws need food
21:36:03 <supermop> humans buy their own food with their salary
21:36:04 <Rubidium> steam trains need coal
21:36:09 <Supercheese> Heyyy... there are no rickshaws are there
21:36:18 * Supercheese wonders how hard it would be to draw them
21:36:27 <Rubidium> rickshaws are not impossible
21:36:30 <supermop> but only if you have a productive food industry!
21:36:34 <Supercheese> or bicycles, for that matter. Both would probably be like 5 pixels though
21:36:47 <Supercheese> but the scales are so out of whack anyway
21:36:53 <Supercheese> might as well make bicycles the size of buses
21:36:55 <Eddi|zuHause> the first railway companies to use electric traction usually built their own power plant
21:37:33 <Eddi|zuHause> in switzerland and bavaria they used water power, and in central germany coal power
21:37:49 <Rubidium> Eddi|zuHause: that needs building materials
21:37:56 <supermop> Eddi|zuHause: not just because of no other generation, but also because they didn't have good enough long distance transmission yet
21:38:20 <supermop> so force user to build feeder plants
21:38:30 <supermop> and watering stations for steam
21:38:35 <Zuu> Making a power GS that work on the default industries should be fairly simple. Restrict it to watch dead-end industries that take the only cargo with the label "COAL". If > X coal units have been received for a town the last month, enable town growth of that town, otherwise disable it.
21:38:45 <Eddi|zuHause> the tram companies also often were the first ones to bring electricity to a town
21:38:58 <Supercheese> Water towers for steam engines are already drawn
21:39:07 <Supercheese> so are coal loaders
21:39:25 <Supercheese> and I guess wood loaders for wood-burning
21:39:29 <Alberth> Eddi|zuHause: false, we do have electricity, but not trams
21:39:36 <supermop> now just make them mandatory for confused new users
21:39:43 <Zuu> For powered engines, abuse the ability to sell player vehicles to sell electric engines if they aren't bought in a depot that have a powerplant nearby.
21:39:45 <Eddi|zuHause> Alberth: i said _often_
21:40:03 <supermop> Zuu: i thought of that
21:40:13 <Eddi|zuHause> in the years 1885..1900
21:40:32 <supermop> i actually like playing maps with only one depot
21:40:43 <Alberth> Eddi|zuHause: I suggest you start counting the number of cities with trams, and the number of cities with electricity then :p
21:40:52 <supermop> and scheduling non-revenue movements to get trains to their lines
21:40:55 <Supercheese> Gamescripts cannot affect industry production changes, correct?
21:41:05 <planetmaker> no(t yet)
21:41:19 <Alberth> good night
21:41:22 <Zuu> The later hower need to have a check that runns fairly often which means that you cannot check coal delivery of all towns in one go but need to do some towns, and then check all depots for illegal electric trains and then go back to checking delivery etc.
21:41:24 <Supercheese> vale, dormiture
21:41:31 <Eddi|zuHause> Alberth: you misunderstand me on purpose...
21:41:40 <planetmaker> and it's conceptionally questionable whether they will. From my POV the most they'll ever can be made to do is ask the industry (newgrf) to change production
21:41:43 <supermop> now we just need trains stranded on the tracks because you didn't generate enough power last month
21:41:48 <planetmaker> which it may ignore and totally do its own thing
21:41:57 <Supercheese> GRF/Gamescript interfacing sounds good
21:42:06 <supermop> or ran out of steam or diesel
21:42:25 <Eddi|zuHause> Alberth: under the condition of a town having an electric tram system [now or in the past], count the number of towns which had electricity before that tram system was introduced.
21:42:38 <supermop> then we write a GS where your goal is to refund irate passengers their money
21:42:48 <Alberth> supermop: and then it gets fun bringing coal over the same set of tracks :p
21:42:54 <Zuu> planetmaker: Even if NewGRF _can_ veto, its possible for someone to make a NewGRF that doesn't veto which makes it suitable to use along with a GS that do detailed control.
21:43:16 <supermop> (Refunded $10234 out of $2000000 last month!)
21:43:24 <Alberth> Eddi|zuHause: you probably win then
21:43:52 *** Alberth has left #openttd
21:43:57 <planetmaker> Zuu, yes, of course. I know already a NewGRF which likely then would support it. Or two ;-)
21:44:12 <supermop> Also supply food to depots to stock the snack cart on passenger trains
21:44:46 *** kero has quit IRC
21:44:59 <supermop> (can't build plane! Must supply 20 crates of small soda cans this month to build 737!)
21:46:16 <planetmaker> lol
21:46:22 <planetmaker> and helium to lift it :-P
21:48:36 <supermop> if one really wanted to go down this route it would be best to just discount running cost on a per traction type basis
21:48:56 <supermop> not sure GS can do that
21:54:48 <supermop> planetmaker: must deliver the helium quickly though or it will leak out of the crates!
21:59:17 *** catpants has joined #openttd
22:00:19 *** Hyronymus has quit IRC
22:04:52 *** perk11 has quit IRC
22:14:27 *** sprog has joined #openttd
22:26:04 <Eddi|zuHause> supermop: we have "late delivery" penalties for that
22:30:11 *** FLHerne has joined #openttd
22:30:58 *** oskari89 has quit IRC
22:35:37 *** Psyk has quit IRC
22:37:09 *** pugi has quit IRC
22:47:41 *** Psyk has joined #openttd
22:51:04 *** valhallasw has quit IRC
22:53:43 *** Prof_Frink has joined #openttd
22:58:00 *** Rait has quit IRC
23:09:23 *** KouDy has quit IRC
23:12:11 *** lugo has quit IRC
23:14:45 *** mahmoud has quit IRC
23:28:10 *** Zuu has quit IRC
23:28:54 *** Biolunar has quit IRC
23:29:00 *** Devroush has quit IRC
23:50:03 *** supermop has quit IRC