Log for #openttdcoop.devzone on 11th April 2010:
Times are UTC Toggle Colours
02:16:28  <DJNekkid> wazzapp? :P
02:26:45  <DJNekkid> and on a sidenote:
02:26:51  <DJNekkid> can anyone explain why;
02:27:14  <DJNekkid> when download a ("legal") torrent on the lunix machine
02:27:37  <DJNekkid> ONLY when i save it (the torrent data) to home/<user>/desktop
02:27:43  <DJNekkid> it will actually download
02:28:23  <DJNekkid> but when i save it to ... wherever else really, it saies "stalled"
02:28:28  <DJNekkid> and i use KTorent
06:39:44  <Webster> Latest update from devactivity: HEQS "Heavy Equipment" Set - Revision 318: Feature: improved cargo graphic support for mining t... <>
08:24:07  *** ODM has joined #openttdcoop.devzone
10:05:26  *** Seberoth has joined #openttdcoop.devzone
10:20:51  *** KenjiE20 has joined #openttdcoop.devzone
10:49:40  <Hirundo> Yexo: I plan to finish action2layout this evening
10:50:34  <Hirundo> Currently it works for vehicles, stations, cargos, railtypes, basically anything that has the normal action 2 syntax
10:53:48  <Hirundo> Also, I propose [item1, item2, item3] as syntax for all stuff that vaguely resembles an array, including real sprites
11:29:59  <ODM> i vote against
11:48:21  *** frosch123 has joined #openttdcoop.devzone
12:24:26  <Yexo> Hirundo: nice :)
12:33:53  <Hirundo> ODM: Could you provide a reason for your vote?
12:34:40  <ODM> no
12:34:43  <ODM> i am messing with you
12:34:52  <ODM> i have no clue what you do:P
12:43:06  <V453000> :D :D
12:46:10  <ODM> i appreciate your work though!
12:46:57  <Yexo> does a newgrf always have a single cargo translation table or are there newgrfs that have multiple tables and switch bewteen them with action7/action9?
12:47:22  <Ammler> Yexo: I guess so
12:47:41  <Yexo> Ammler: always a single table?
12:47:53  <Ammler> afaik canset does switch
12:48:04  <Ammler> for their own industries and ECS
12:48:51  <Yexo> hmm, it'd be a lot easier to implement if I could limit it to a single table
12:57:20  <frosch123> iirc there are quite some vehicle grfs with different cargo trans tables for different industry sets
12:57:53  <frosch123> esp. the sets of those authors who cannot stand cargo classes and only allow transporting cargos which they have explicit graphics for :)
12:58:50  <Ammler> yexo, does nml somehow allow native nfo code?
12:58:59  <Yexo> no
12:58:59  <Ammler> so you could insert special cases directly
13:00:16  <Yexo> I'm afraid that would be even harder to support correctly
13:00:32  <Yexo> I wnat to suport cargotabels by using the IDs directly, also in action0 properties
13:00:50  <frosch123> i guess single cargo trans table is fine, there are suggestions to work around the limitations of refit masks
13:01:34  <Yexo> what are those limitations exactly? the fact you can only use the first 32 cargos?
13:02:04  <frosch123> yes, and that the property breaks if industry sets use different cargo classes for the same label
13:04:04  <frosch123> <- i should also have a patch somewhere for that
13:04:07  <Webster> Title: Transport Tycoon Forums • View topic - Page about Cargo Types on the Wiki is a mess (at
13:08:15  <Webster> Latest update from devactivity: NFO Meta Language - Revision 29: Fix: escape some special chars in strings <>
13:11:42  <Yexo> frosch123: that is nice, but is it already implemented?
13:11:51  <Yexo> if not, I'd rather not use it
13:11:51  <DJNekkid> Yexo: you can have as many (within reason) entries in the cargotable
13:11:52  <frosch123> nope :p
13:12:05  <DJNekkid> but only the first 32 can be used in Action0 prop 1D
13:12:35  <DJNekkid> but action3's can use as many you want
13:12:50  <frosch123> DJNekkid: now imagine you cannot stand gravel being transported in coal wagons, and you never use cargo classes, then you are limited to those 32 items :p
13:13:02  <DJNekkid> frosch123: yup :)
13:13:05  <DJNekkid> indeed
13:13:20  <DJNekkid> but wasnt it exactly that i saied?
13:13:24  <frosch123> Yexo: i just meant that it is not worth to deal with multiple translation tables in a higher level language
13:13:32  <Yexo> ok :)
13:13:44  <Yexo> are cargo classes only defined by industry newgrfs?
13:13:57  <Hirundo> C does not support everything you can do with asm either
13:14:11  <DJNekkid> i know pikka have one cargo in NARS
13:14:14  <DJNekkid> the "regearing"
13:14:16  <frosch123> those who use them, would likely not use a higher level language. and if someone would really need it, the target would rather supporting something new
13:14:49  <Yexo> ok, so single cargo translation table it is
13:15:14  <Yexo> reordering the list shouldn't be a problem, right? (as long as I also update all action0 elements that use the ids)
13:15:33  <DJNekkid> should be fine
13:15:50  <Hirundo> It does make using action6 in this context kinda hard
13:15:56  <DJNekkid> and action3s
13:16:11  <DJNekkid> and posibly varaction2 variable 47
13:16:32  <frosch123> it is no problem for the table, but for newcargo grfs you need a way to force usage of certain slots, as they are not allocated dynamically and conflict with other grfs
13:18:00  <DJNekkid> frosch123: if i never use cargoclasses, then both coal and gravel would have different wagons...
13:18:10  <Yexo> so no reordering, the user will have to make sure only the first 32 entries are used in actino0 prop 1D then
13:18:32  <DJNekkid> and thus i could use whatever number i would like in my action3/var2-47
13:19:23  <frosch123> DJNekkid: you can define graphics for them, but you cannot define refittabilitiy
13:19:35  <frosch123> resp. the default cargo
13:19:58  <DJNekkid> you can put default cargo to be number 40...
13:20:09  <DJNekkid> but i think we both know what we mean :)
13:20:21  <frosch123> no. the default cargo property is broken by design as it uses cargo slots and not translated bits
13:20:51  <frosch123> basically the default cargo property is unusable :p
13:21:10  <DJNekkid> hehe...
13:21:20  <DJNekkid> i see your point
13:21:30  <DJNekkid> i can set it to be. i.e. livestock
13:21:43  <DJNekkid> and then 1D livestock away and add gravel :)
13:21:55  <DJNekkid> but then it need, as you say, to be between 0 and 31 :)
13:23:48  <Hirundo> Out of curiosity, what is the status of nfo version 8?
13:25:16  <frosch123> i guess noone is working on it, though some points have been archieved in other ways
13:27:45  <Yexo> a newgrf needs to use actino0 cargotypes if and only if it defines a new cargotype, is that correct?
13:28:06  <Yexo> so normally industry newgrfs, and nars for regearing
13:28:40  <frosch123> it can also modify existing cargos
13:29:03  <frosch123> it is like vehicles without dynamic_engines
13:29:16  <frosch123> everyoine can mess with them and conflict with them
13:29:58  <Yexo> cargo prop 08 (bit number for bitmask) is not used if a newgrf defines a cargo translatino table?
13:30:15  <frosch123> e.g. one grf could just alter the payments, or there is some grf which just renames "goods" to "stuff" (on grfcrawler). but they all conflict with the real industry sets
13:30:41  <frosch123> correct, prop 08 is kind of default cargo transtable :)
13:32:25  <frosch123> or in other words, industry sets do not conflict. it is their cargo part that conflicts
13:32:51  <Yexo> ok, understood
13:34:35  <Yexo> so 2 industry sets could be made compatible by making sure they use the same slots for the same cargo and unique slots for cargo unique to that industry set (provided there are enough cargo slots)
13:34:46  <Yexo> and yes I know there aren't enough cargo sltos for that, but in theory
13:34:48  <Hirundo> To what extent do existing sets (ECS/PBI/FIRS) use GRM?
13:35:33  <frosch123> i guess not at all
13:35:47  <Hirundo> But it is supported, isn't it?
13:36:18  <frosch123> specs say so, no idea about the code
13:36:22  <Yexo> openttd supports it, but from what I've seen there is no reason to use it with openttd. I could be wrong though
13:37:09  <frosch123> there is no use for vehicles since dynamic_engines, but for actiona sprites and cargose there would be some use
13:38:15  <Hirundo> I feel it may be useful for cargo sets that only alter some properties, like payments
13:38:19  <frosch123> hmm, though cargos do not support "reserve" and "find". so maybe not that useful ...
13:44:07  <Yexo> spec says that for unkown cargos the default table is unitialized, so that may be the reason ttdpatch doesn't support reserve/find on cargos
14:26:05  <welshdragon> Hirundo: i'm getting a crash with IS2.1.1
14:26:12  <welshdragon> on windows
14:39:21  <Webster> Latest update from devactivity: Infrastructure Sharing - Bug #894 (New): Crash with Windows <>
14:59:09  *** PeterT has quit IRC
15:05:49  *** PeterT has joined #openttdcoop.devzone
15:18:17  <Ammler> @topic remove -2
15:18:18  *** Webster changes topic to "Talk about things hosted and developed on | Downloads log: | TODO: setup fw for openttd server and irc"
15:29:15  <Yexo> what should I do with train prop 15 cargo type?
15:29:43  <Yexo> can it be ignored if the other properties (cargo classes supported) are set?
15:32:00  <frosch123> maybe set it to ff if capacity > 0, or 00 if capacity == 0
15:33:27  <Yexo> that is not possible, the capacity could be set to the value of a parameter
15:33:27  <frosch123> that is, vehicles become unavailable if they have cargo, but none of the refittable or default cargos is available
15:33:49  <Yexo> so would always setting it to FF be a problem?
15:34:32  <frosch123> yes, if you set it to ff and refit mask to 0, the engine will not be available
15:34:56  <frosch123> you always need a cargotype for livery selection and such, even if capacity is 0
15:35:25  <frosch123> hmm, so maybe set it to 0
15:35:56  <frosch123> though i have no idea what ttdp would do with it
15:36:10  <Yexo> 0 is passengers
15:36:23  <Yexo> but if the vehicle had no capacity anyway, that shouldn't e a problem
15:37:26  <frosch123> oh, it is a problem. for articulated road vehicles, the first vehicle decides between truck and bus
15:38:14  <Yexo> I'll just expose it to the user then
15:38:28  <Yexo> I don't see a way to deal with that automatically
15:39:50  <frosch123> i guess so, just remember that it is no translate cargobit :)
15:39:53  * Yexo is wondering why a lot of people said that varaction2 would be the hard part in writing a meta-language, dealing with cargo-types is a lot harder
15:40:30  <Ammler> :-)
15:40:47  <frosch123> because you try to abstract the complexity of newgrf, while other only tried the nfo syntax
15:40:47  <Yexo> even parameter computations (including action6) were simpeler
15:48:30  <Yexo> is the base length for trains always 32? if not, how can it be changed?
15:52:10  <frosch123> actiond var 9something
15:52:34  <frosch123> 9e
15:52:55  <frosch123> grflocal in ottd, global in ttdp
15:52:58  <Yexo> that is only for the depot
15:53:20  <frosch123> and vehicle details
15:53:34  <Yexo> ok
15:53:56  <frosch123> on the map they are always 32, if you meant that
15:57:21  *** Paul2_ has joined #openttdcoop.devzone
15:57:58  *** Paul2 has quit IRC
16:10:14  <Webster> Latest update from devactivity: Infrastructure Sharing - Bug #894: Crash with Windows <>
16:25:09  <DJNekkid> yea! we lead 2-0 after 20mins over one of the norwegian top teams
16:25:21  <Webster> Latest update from devactivity: NFO Meta Language - Revision 31: Add: support for parsing arrays to use in action0 properties <> || NFO Meta Language - Revision 30: Feature: parsing/writing a cargo translation table <>
16:34:53  *** Doorslammer has joined #openttdcoop.devzone
16:55:50  <Webster> Latest update from devactivity: NFO Meta Language - Revision 32: Feature: support for all train properties <>
16:56:07  * Hirundo claps
16:56:50  <Hirundo> welshdragon: Could you elaborate on "Request Closure, my stupidity..." ?
16:57:58  <welshdragon> lol
16:58:21  <welshdragon> erm, i hadn't copied the right files over
16:58:25  <welshdragon> so i did a reinstall
17:14:14  <Yexo> Ammler: I think you could implement a train newgrf now
17:25:57  <Webster> Latest update from devactivity: Infrastructure Sharing - Bug #894 (Closed): Crash with Windows <" target="_blank">> || Infrastructure Sharing - Bug #894 (Closed): Crash with Windows <>
17:26:28  <Ammler> Yexo: you meant pm :-)
17:26:38  <Ammler> he asked yesterday
17:26:44  <Yexo> ah, yes, sorry
17:26:48  <Ammler> but gratulation :-)
17:27:11  <Ammler> Hirundo: might it be possible to document your IS2 workflow a bit
17:27:24  <Ammler> maybe also publish your local scripts for merging
17:27:59  <Ammler> I think, it would be a good thing for GeekToo and his EZ patch
17:28:29  <Hirundo> I'll look into it, but the stuff would need some fixing first
17:28:54  <Ammler> well, "we/he" can fix ti self else
17:30:07  <Ammler> we could then make a common script to merge and create a patch with the nighly
17:30:13  <Ammler> nightly*
17:31:20  <Hirundo> good point, I'll shift it upwards on my todo list :)
17:32:02  <Hirundo> Tonight I wanna fix action1/2 first, though, so pm can get going
18:03:10  <Hirundo> Yexo: I'm getting an error at " offset += property.get_size()" "type object 'property' has no attribute 'get_size'" <- Did I miss some change?
18:05:05  <Yexo> nope, it's an error on my part
18:06:25  <Yexo> pushed the fix
18:09:55  <Hirundo> ok, got it
18:11:36  <Hirundo> I made a syntax change that uses [a,b] instead of a,b for sprites in sprite groups. Can I push it?
18:14:47  <Hirundo> Yexo: <- Spriteblock example from my test script
18:15:07  <Yexo> sure
18:15:14  <Yexo> push whatever change you make
18:15:40  <Ammler> why do you have hex soemtimes?
18:16:42  <Yexo> Ammler: hex/decimal are interchangeable, you can use whatever you want
18:18:16  <Hirundo> Also, I propose a change to the way we currently handle compile time constants and compile time definitions like REQUIRES_TTDPATCH etc
18:18:55  <Hirundo> a) <expression> is allowed in all places, instead of a fixed 'feature', 'ID', whatever
18:19:21  <Hirundo> b) ID tokens can also be part of an expression
18:19:47  <Hirundo> c) when needed, these expressions are resolved at compile time, if they are not constant an error is thrown
18:20:43  <Hirundo> d) When evaluating, a symbol table is sent along that maps IDs (like REQUIRES_TTDPATCH) to numbers
18:22:31  <Hirundo> advantages: simpler syntax tree, better error messages ('non-const' instead of 'syntax error'), ability to use bitmasks (for e.g. real sprite compression)
18:25:22  <Hirundo> IMO the parser should eat basically everything, and error checking on constness, number and type of parameters, etc should be done later
18:25:41  <Hirundo> Yexo: Opinion?
18:26:25  <Webster> Latest update from devactivity: NFO Meta Language - Revision 34: Change: Change sprite groups to use the same array syntax: [a,b] <> || NFO Meta Language - Revision 33: Fix: loop over all returned properties <>
18:26:52  <Yexo> Hirundo: that's fine
18:26:59  <Yexo> but not as easy as you make it sound
18:27:19  <Yexo> different places have a different size
18:28:04  <Hirundo> Size of what?
18:28:35  <Hirundo> And yes, it's not gonna happen today :)
18:30:21  <Yexo> parameters are dword for example, but several aciton0 props only byte or word sized
18:32:35  <Hirundo> In what way does that matter at the parser / post-parse checking side?
18:33:07  <Yexo> hmm, probably not
18:33:23  <Hirundo> btw, grf block is currently the only place that requires semicolons
18:37:07  <Yexo> yes, those semicolons aren't needed anymore
18:37:17  <Yexo> just haven't got around to removing that from the parser yet
18:37:21  <Hirundo> will do
18:57:16  <Webster> Latest update from devactivity: NFO Meta Language - Revision 35: Fix: Semicolons are not needed any more, so remove them. <>
19:04:16  <Hirundo> Is there an easy way to get the token type of a given token if it's a keyword (i.e. GROUND or BUILDING)?
19:04:54  <Yexo> t[x] will be equal to the string
19:05:04  <Yexo> so in case of BUILDING it'll be 'building'
19:05:10  <Yexo> see also BinOp
19:05:48  <Hirundo> thanks
20:21:16  *** frosch123 has quit IRC
20:38:32  <Hirundo> hmm.. Action2Layout requires quite some checking to ensure its validity
20:38:46  <Hirundo> Yexo: Is there any convention regarding error numbering / messages?
20:38:58  <Yexo> nope
20:39:12  <Yexo> in fact, all I've done so far is "raise ScriptError("message")" at some locations
20:39:19  <Yexo> haven't come up with a good way to deal with errors yet
20:40:02  <Hirundo> I think we need to store file/line information in the AST in some way
20:43:56  <Yexo> yes
20:45:38  <Yexo> did you do anything on the expression = ID, list of constants in parser already?
20:45:41  <Yexo> if not, I'll start with that now
20:46:19  <Hirundo> No, I did not, you can go ahead
20:46:43  <Hirundo> Does python have anything like the .* operator in C (pointer to member)?
20:47:55  <Yexo> sorry, I don't get that
20:48:06  <Yexo> python doesn't have pointers afaik
20:48:39  <Yexo> or rather, almost everything is an implicint pointer
20:51:48  <Hirundo> basically, I'm trying to access a member of class foo: foo.$bar, where $bar is selected from a finite number of names
20:53:28  <Hirundo> Nvm, I'll figure some other way
20:56:25  <Yexo> Hirundo: dir(foo)[bar]
20:57:28  <Yexo> hmm, no
20:58:14  <Yexo> does foo[bar] work?
21:00:25  <Hirundo> Not without defining a method __setitem__ or similar
21:04:41  <Hirundo> Should I guard against setting the same property multiple times?
21:04:57  <Yexo> no, that is valid
21:05:38  <Hirundo> sorry, by 'property' I mean e.g. the xoffset of a building sprite
21:05:51  <Yexo> ah
21:05:58  <Yexo> do whatever is easiest
21:06:04  <Yexo> we'll deal with handling errors later
21:11:18  <Yexo> allowing an ID everywhere where currently an expressino is allowed leads to problems with the parser
21:12:46  <Yexo> just adding some constants that resolve always to the same number is easy
21:13:30  <Yexo> we can easily add those as another array in and specialcase that array in t_ID
21:20:03  <Hirundo> disadvantage of that approach is that the global name space can get polluted really easily
21:20:46  <Hirundo> Could you post a dump of the parser conflicts?
21:20:54  <Yexo> not easily
21:21:20  <Yexo> make the change yourself, then run the script, it'll output "xx shift/reduce conflicts"
21:21:30  *** andythenorth has left #openttdcoop.devzone
21:21:32  <Yexo> then search parser.out for conflict
21:24:29  <Yexo> this would allow to use those constants everywhere where a number is expected
21:25:44  <Hirundo> I'll check later, after committing
21:41:18  <Yexo> crap, now nforenum hangs
21:47:04  <Rubidium> nice! :)
21:52:20  <Yexo> can someone confirm dat running nforenum on makes nforenum hang?
21:53:28  <Ammler> hangs after "Warning on sprite 10 (level 1)." here
21:53:54  <planetmaker> Yexo: confirmed
21:54:01  <Yexo> thanks Ammler / planetmaker
21:55:04  <Ammler> planetmaker: I very much like the alignment of 2cc trains
21:55:18  <Ammler> maybe reconsider the templates?
21:55:29  <Ammler> (2cc v2)
21:56:35  *** Seberoth_ has joined #openttdcoop.devzone
21:56:59  <planetmaker> which? current or the old v1? or...?
21:59:02  <Ammler> [23:55] <Ammler> (2cc v2)
21:59:32  <Ammler> the TGVs are simply perfect
22:03:23  <planetmaker> yes. shall I reconsider v2 or v1? :-)
22:03:27  <Ammler> olanetmaker, just wonder why msx already is 0.2 :-)
22:03:35  <Ammler> it isn't complete, is it?
22:03:48  <planetmaker> it isn't
22:04:05  *** Seberoth has quit IRC
22:04:07  <planetmaker> though it has nearly as many songs as the original one
22:09:27  <Ammler> <-- grat pm
22:09:27  <Webster> Title: plasma-desktopPZ6589.jpg (at
22:10:08  <planetmaker> :-)
22:11:05  <Ammler> also the alignment seems fine now
22:12:26  <Yexo> Hirundo: can you push any commits you already did?
22:14:07  <Ammler> there are toyland towns with 10 piggy bank and 0 coffe pots
22:14:14  <Hirundo> I made a mess of my patch stack by fixing earlier stuff in later patches, so I'll have to commit in one go
22:14:42  <Hirundo> Currently in obscure-bug-fixing stage
22:14:44  <Yexo> just wanted to save the trouble of merging, if you haven't committed yet I'll push something now
22:14:51  <Ammler> but also other towns with 10 coffee pots and 0 banks
22:17:01  <Hirundo> Yexo: In general I don't commit local only, so you're free to push
22:17:43  <Hirundo> Any local commits are mq patches, but these can be rebased easily
22:17:44  <Yexo> ok (I often forget to push)
22:29:58  <Webster> Latest update from devactivity: NFO Meta Language - Revision 36: Fix: an action0 modifies 1 ID by default, not 0 <>
22:36:00  *** Paul2_ is now known as Paul2
22:40:07  <Hirundo> Hmm.. my Action2 code checks for 23 different errors in the code :)
22:40:12  * Hirundo commits
22:40:54  *** ODM has quit IRC
22:51:04  <Yexo> Hirundo: can you also hg add actions/ and push that?
22:51:22  <Hirundo> :fail: will do
22:52:30  <Hirundo> done
22:52:44  <Ammler> :-) such a common mistake
22:54:22  *** Seberoth_ has quit IRC
23:00:16  <Webster> Latest update from devactivity: NFO Meta Language - Revision 38: Fix: Forgot to hg add <> || NFO Meta Language - Revision 37: Feature: Support for action2 tile layouts (houses/industry tiles) <>
23:05:23  <Hirundo> Yexo: Can I push?
23:05:32  <Yexo> sure
23:06:54  <Hirundo> I added some feature-checking to action2
23:07:44  <Hirundo> Now, a quick look at the parser before going to sleep
23:15:52  <Webster> Latest update from devactivity: NFO Meta Language - Revision 41: Fix: airports are feat 0x0D, not 0x11 <> || NFO Meta Language - Revision 40: Add: airports can have a real action2 as well <> || NFO Meta Language - Revision 39: Feature: Make sure that action2 is only used for the proper grf ... <>
23:37:29  <Hirundo> Yexo: <- I don't get any conflict when I butcher the parser this way
23:38:23  <Hirundo> My notepad++ just segfaulted on me, a clear sign that I need sleep :)
23:40:03  <Yexo> I can't get that patch to apply
23:40:19  <Yexo> patch: **** Only garbage was found in the patch input. <- output from patch
23:40:46  <Yexo> and it won't work (you need to add a lot of length checks, and replace numbers in t[x]
23:41:01  <Yexo> but I need sleep too, we'll see about this tomorrow
23:42:50  <Hirundo> Indeed, the main work is in ast, just wanted to check that it's possible
23:46:12  <Webster> Latest update from devactivity: NFO Meta Language - Revision 43: Fix: line endings of action2layout <> || NFO Meta Language - Revision 42: Fix: print an empty line after the cargotable action0 <>
23:53:27  *** KenjiE20 has quit IRC

Powered by YARRSTE version: svn-trunk