IRC logs for #openttd on OFTC at 2018-05-04
            
00:26:15 *** Extrems` has joined #openttd
00:29:58 *** Thedarkb has quit IRC
00:31:49 *** Extrems has quit IRC
00:31:49 *** Extrems` is now known as Extrems
00:40:54 *** supermop_work has quit IRC
00:50:15 *** Zexaron has quit IRC
01:12:32 *** Wormnest has quit IRC
02:16:14 *** tycoondemon has quit IRC
02:21:18 *** tycoondemon has joined #openttd
02:24:18 *** Thedarkb-X40 has joined #openttd
02:28:07 *** Thedarkb1-X40 has quit IRC
02:51:31 *** snail_UES_ has joined #openttd
04:21:25 *** glx has quit IRC
04:31:57 *** Flygon has joined #openttd
04:45:05 *** muffindrake3 has joined #openttd
04:46:56 *** muffindrake2 has quit IRC
05:07:39 *** sim-al2 is now known as Guest1681
05:07:41 *** sim-al2 has joined #openttd
05:10:26 *** Guest1681 has quit IRC
05:32:06 *** sla_ro|master has joined #openttd
05:51:13 *** snail_UES_ has quit IRC
06:03:32 *** Lejving__ has quit IRC
06:13:40 *** sla_ro|master has quit IRC
06:37:21 *** Cubey has quit IRC
07:25:54 *** andythenorth has joined #openttd
07:42:05 *** andythenorth has quit IRC
07:50:45 *** andythenorth has joined #openttd
07:54:12 <Pikka> o/
07:55:06 <andythenorth> lo bird
07:57:03 <Pikka> lo
08:05:05 <Pikka> boats are fun
08:05:15 <Pikka> you get to invent your own pathfinder
08:05:32 <peter1138> :/
08:05:49 <andythenorth> lawks
08:06:04 <andythenorth> but at least no need to figure out how many docks the station has ;)
08:06:13 <peter1138> :\
08:06:23 <andythenorth> think you'll deal with building docks on rivers? o_O
08:06:55 <Pikka> can you build docks on rivers?
08:07:47 <andythenorth> if you build a canal and raise land yes
08:07:55 <andythenorth> otherwise no
08:08:11 <Pikka> well, definitely not then
08:08:56 <Pikka> it's pretty similar to the airport building... it sticks a dock in if it's got an appropriate location, then connects them up with routes later
08:09:55 <andythenorth> http://dev.openttdcoop.org/attachments/download/3179/river_dock.png
08:10:34 <andythenorth> fancy! http://dev.openttdcoop.org/attachments/download/5621/dock.png
08:11:28 <Pikka> yeah, it certainly won't be building anything like that :P
08:12:55 <andythenorth> it shouldn't :P
08:12:58 <andythenorth> 'flat docks'
08:16:55 <V453000> :
08:16:57 <V453000> )
08:16:58 <V453000> yo
08:17:32 <peter1138> flat white docks
08:18:18 <V453000> andythenorth: do you think it's entirely impossible to code the vehicles with detection of 1 part type for max speed, with the position detection? Would something like making a max of 1 max speed part per train help and is that even possible?
08:18:32 <V453000> thing is, the engine-wagons can do power, T.E., weight, capacity on their own
08:18:38 <V453000> but the max speed not
08:19:11 <V453000> max speed is definitely something that every player will try to push as far as they can, so limiting to 1 per train is kind of eh
08:19:30 <V453000> at the same time it could properly break the balance of the whole set :D
08:22:26 <andythenorth> the max speed vehicle will have a specific ID
08:22:42 <andythenorth> but I can't think of a reliable way to find the position
08:24:32 <V453000> hm
08:28:29 <V453000> I can't do anything like taking results of switches, right? I have to literally have every single possible outcome in some switch
08:29:13 <V453000> taking / adding / subtracting / multiplying
08:29:52 <V453000> I know in NUTS I have switches like 1: 2*5; 2: 2*10; and so on, but I can't use a variable in that line, right?
08:29:55 <andythenorth> you can do limited storage of results
08:30:15 <andythenorth> you can't read props of other vehicles in cb36
08:30:19 <andythenorth> which is what kills you
08:31:40 <V453000> oh that's the store_temp thing
08:31:51 <V453000> ok, fundamental question
08:32:02 <V453000> how do you guys find "cb36", action whatever etc
08:32:09 <V453000> I can never find anything in the grf specs
08:32:23 <andythenorth> I always read the nfo specs first
08:32:25 <andythenorth> not nml
08:32:26 <andythenorth> https://newgrf-specs.tt-wiki.net/wiki/Callbacks
08:32:45 <andythenorth> nml is 'fine' but it's just a mass of keywords
08:32:56 <andythenorth> it doesn't give any idea of what's actually happening
08:33:14 <V453000> right, well I understand and accept that part, it's just that I never cound find shit in the grf :P
08:33:59 <andythenorth> so the killer problem is that you can't read props on other vehicles
08:34:03 <andythenorth> which is going to be a VA2
08:34:14 <andythenorth> so we go here https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Vehicles
08:34:26 <andythenorth> then we find https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Vehicles#Query_variable_of_n-th_vehicle_in_chain_.2861.29
08:34:38 <andythenorth> which has the sad line "It is not supported during a callback that is used to modify vehicle properties to avoid circular dependencies, which currently limits this variable to callbacks 1D, 2D, 31 and 32 plus outside callback scope."
08:35:57 <V453000> I guess the fact that I only need to update it when constructing the vehicle in the depot doesn't save it
08:36:02 <andythenorth> nope
08:37:21 <V453000> so I can't do stuff like save position_in_consist to a store_temp and then go through the consist and see the binary code of the train like 000101000111 for speed part positions and make huge switch out of that
08:37:30 <V453000> not to mention that I guess the switch would run out of IDs or something
08:38:43 <andythenorth> I can't think of anything that doesn't involve breaking the grf in other ways
08:38:54 <andythenorth> like, if all the other vehicles used same ID, you could maybe do it
08:38:58 * andythenorth looks
08:39:40 <andythenorth> well
08:40:21 <andythenorth> if you had to use a specific vehicle ID for a specific position you could do it
08:40:29 <andythenorth> like if ID 101 could only go in position 1
08:40:36 <andythenorth> and ID 102 could only go in position 2
08:40:48 <andythenorth> but that's probably not what you want
08:41:08 <Eddi|zuHause> that sounds terrible
08:41:37 <Eddi|zuHause> but whenever i think something, V thinks the opposite, so he must now do it :p
08:41:55 <andythenorth> we could look in the extended props
08:42:02 <andythenorth> but they're usually useless :)
08:42:51 <V453000> yeah specific parts for specific positions doesn't sound too great andy
08:43:12 <V453000> Eddi|zuHause: haha, I'd love to, but it seems to be rather difficult so far
08:44:51 <Eddi|zuHause> V453000: i think your main problem is you can't use var 61
08:44:55 <andythenorth> +1
08:45:13 <andythenorth> there aren't many tricks to work around that
08:45:14 <V453000> I guess that's what we have discovered so far, yeah :D
08:45:30 <Eddi|zuHause> and all the reasons why that is disabled would also apply to any workaround you'd find
08:45:45 <V453000> :d
08:46:06 <andythenorth> if there was a var to measure number of vehicles to first occurence of ID n
08:46:08 <andythenorth> that would do it
08:46:31 <V453000> fuck frosch wrote me somewhere his idea how to do it about 2 years ago, but it was probably some short thought which I guess in the end is wrong
08:46:35 <V453000> need to find it
08:46:37 <V453000> but where :d
08:46:51 <andythenorth> a variation on var 40/41 would do it https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Vehicles#Position_and_length_.2840.2C_41.29
08:46:57 <andythenorth> but not as they exist now
08:48:11 <Eddi|zuHause> you'd need a 60+ variable that takes a vehicle ID, and gives you the position (relative to SELF or PARENT)
08:48:52 <andythenorth> need one that can be called multiple times, with a parameter or mask for the count
08:49:01 <andythenorth> so you can read position of 1st, 2nd, etc
08:49:45 <andythenorth> position is immutable so it should be ok in cb36 and friends
08:50:37 <Eddi|zuHause> you could only sensibly find the first vehicle in this manner
08:50:56 <andythenorth> what about last?
08:51:22 <Eddi|zuHause> that would need a separate variable
08:51:29 <andythenorth> I could actually see other uses for this
08:51:37 <andythenorth> not exactly necessary ones though :P
08:51:50 <Eddi|zuHause> but last is slightly more expensive algorithmically
08:52:08 <andythenorth> it's cacheable though?
08:52:14 <andythenorth> these are static once depot is left
08:52:25 <Eddi|zuHause> you must loop through the whole consist, and need a storage for the last encounter
08:52:57 <Eddi|zuHause> it's not cacheable because you'd need a separate cache for each possible parameter
08:53:09 <andythenorth> hmm
08:53:16 <andythenorth> I defer to you
08:53:27 <andythenorth> I was thinking some mapping ID:[positions]
08:53:50 <Eddi|zuHause> you don't want to store that in a vehicle
08:53:57 <andythenorth> ok
08:54:17 <Eddi|zuHause> vehicles kinda need to be fixed size
08:54:25 <Eddi|zuHause> not some dynamic storage like that
08:54:32 <andythenorth> right
08:55:09 <Eddi|zuHause> but you don't really need it to be cached, if the result of the callback is cached
08:56:03 <andythenorth> V453000: what does the position gain you, as a player?
08:56:46 <Eddi|zuHause> anyway, suppose we implemented this "first occurance of <ID>" variable, what you could then do is let the player decide which stat he wants to prioritize by the order of the first wagons
08:58:08 <V453000> It's extremely essential, the whole idea of the parts adding different bonuses is great and makes the trains really customized by the player, but the position is what makes it truly interesting as then you have to prioritize which parts do you put in the front more
08:58:29 <Eddi|zuHause> so if you have 3 booster wagons A,B and C, the player can then do E,B,C,A,(following in any order)
08:58:46 <V453000> yes Eddi
08:59:49 <V453000> But if I didn't care about position, I guess it would make sense to just put together a total from the number of specific part type units in the consist, and divide it by total consist length?
08:59:50 <Eddi|zuHause> depending on how difficult you want to code your grf, you could also catch cases of "E,B,B,C,A,..."
08:59:52 <V453000> Would that work?
09:00:06 <Eddi|zuHause> yes
09:00:17 <peter1138> Are we coding a new variable?
09:00:17 <V453000> at this point I'm mainly asking about possiblity, difficulty is fine
09:00:48 <Eddi|zuHause> number of vehicles you can already get with existing variables
09:00:58 <V453000> that's what I thought
09:01:45 <andythenorth> peter1138: haven't had one for ~5 years
09:01:48 <andythenorth> maybe it's time? o_O
09:02:10 <Eddi|zuHause> well,you could simply extend var60 to also give you the first (or also last) position
09:02:26 <peter1138> Hmm
09:02:33 <Eddi|zuHause> then do some bitmagic to filter it out
09:02:33 <peter1138> If there's space, that makes sense.
09:03:00 <peter1138> And if it doesn't conflict, of course. Reserved space is handy.
09:03:04 <Eddi|zuHause> Count Veh.ID occurence (60)
09:03:06 <Eddi|zuHause> Format: xxxxxxnn
09:03:16 <andythenorth> it would potentially have other uses
09:03:18 <peter1138> Is that all?
09:03:19 <Eddi|zuHause> so these xx's seem to be unused
09:03:41 <andythenorth> when randomising sprites, this *could* be used for better results
09:03:44 <peter1138> Oh, then bits 8-15 can be first position and 16-24 can be last position. Or something.
09:03:51 <Eddi|zuHause> yeah
09:03:56 <Eddi|zuHause> pretty much
09:04:16 <peter1138> Could be 4 bits each if you don't care about trains longer than 16 :p
09:04:20 <Eddi|zuHause> should be about 10LOC
09:04:23 <peter1138> But I guess that's a silly restriction.
09:04:37 <Eddi|zuHause> nah, must be 8
09:04:44 <Eddi|zuHause> bits
09:19:26 *** andythenorth has quit IRC
09:20:22 <peter1138> http://fuzzle.org/~petern/ottd/var60.diff ?
09:21:55 <peter1138> Hmm, I should test it compiles :p
09:23:28 <Eddi|zuHause> init last to 0xFF as well?
09:23:45 <Eddi|zuHause> in case vehicle does not appear, first=0xFF, last=0 seems wrong
09:24:33 <Eddi|zuHause> what's max train length anyway? 128?
09:26:20 <V453000> I guess 128 yeah
09:27:04 <peter1138> Is it? Okay.
09:27:42 <peter1138> Reuploaded. Bit simpler.
09:27:50 <peter1138> (Removed the min()s.
09:27:51 <peter1138> )
09:27:56 <V453000> 2 years ago, frosch wrote me this piece of idea https://paste.openttdcoop.org/pqkw4ev0p
09:28:18 <V453000> when I asked him if anything like the boost obtained from wagons is possible
09:30:19 <Eddi|zuHause> V453000: that can probably be simplified with var 60
09:33:15 <Eddi|zuHause> also, it could probably be simplified with function calls, but that was never implemented in NML
09:36:08 <Eddi|zuHause> V453000: anyway, that piece of code seems to use var 61, which we determined doesn't actually work in the power callback
09:40:10 <peter1138> Hi, so is this var60 change useful?
09:40:51 <peter1138> Only issue I can see is that in unsupported versions you'll get 0 not 0xFF.
09:41:12 <peter1138> So it might make sense to count from 1 instead?
09:41:36 <peter1138> So that 0x00 means invalid and 0x01 means "first position".
09:42:07 <peter1138> Dunno how this would affect using the var.
09:56:34 *** andythenorth has joined #openttd
09:58:20 <Eddi|zuHause> that doesn't make a lot of sense
09:58:32 <Eddi|zuHause> the other positions are all 0-based
09:59:26 <Eddi|zuHause> and NewGRFs do have ways to check versions, so it's not that much of a problem
10:08:52 <peter1138> Yeah.
10:09:29 <peter1138> Hmm, wonder how that works without svn revisions now. I know there were some changes for it.
10:09:51 <Eddi|zuHause> i was wondering the same thing. is it now date-based?
10:17:45 <peter1138> Hmm, seems to just be the OpenTTD version, so for master builds it is 1.9.0 currently.
10:18:07 <peter1138> Also, 1.16.16 is not permitted :)
10:18:39 *** Lejving has joined #openttd
10:18:59 <Eddi|zuHause> well, newgrf version used to be a 4-byte value along the lines of 0x190<something incremental>
10:20:18 <Eddi|zuHause> with the highest bit of <something incremental> meaning "release"
10:20:41 <peter1138> Yeah, now it's just 0x19080000 for release, and 0x19000000 for not.
10:20:57 <Eddi|zuHause> that seems impractical
10:20:59 <peter1138> I guess adding a date is slightly useful.
10:22:42 <peter1138> We already bump the version so bugfix releases will still be flagged as lower version, regardless of the date.
10:23:01 <peter1138> So, encode the date into 19 bits.
10:23:01 <Eddi|zuHause> yeah
10:23:17 <Eddi|zuHause> just make sure the date doesn't overflow between two releasess
10:23:44 <peter1138> Possible make the epoch be the last release date.
10:24:04 <peter1138> Makes it less likely to overflow.
10:24:17 <Eddi|zuHause> that might work
10:24:32 <Eddi|zuHause> another thing that has to be updated manually on each release, though
10:24:41 <peter1138> Maybe.
10:24:54 <peter1138> May be possible to pull it from git.
10:25:45 <Eddi|zuHause> and completely throw out support for hg people?
10:25:46 <peter1138> $ git log -1 --format=%ai 1.8.0
10:25:46 <peter1138> 2018-04-01 11:14:34 +0000
10:25:50 <peter1138> Yes.
10:26:05 <Eddi|zuHause> seems a bit drastic
10:26:07 <peter1138> hg was only there because we were using svn and didn't know if hg or git would win.
10:26:20 <peter1138> There's no need to use hg now we are fully on board with git.
10:27:15 <peter1138> It's also slightly awkward for developing, as you don't know what the real version will be until it's committed.
10:27:55 <peter1138> But then again it always was, just easier to predict svn revision, until someone else commits.
10:27:56 <Eddi|zuHause> well, the other way would be a newgrf version in the code, similar to savegame version
10:28:07 <Eddi|zuHause> which gets bumped whenever a newgrf feature is implemented
10:28:15 <peter1138> Could do.
10:28:27 <peter1138> Reset it to 0 on release.
10:28:53 <peter1138> Hmm, I suppose there are no other implementations of NewGRF that matter any more :p
10:29:21 <andythenorth> facts on the ground
10:29:32 <peter1138> Actually.
10:29:38 <andythenorth> until someone does a substantial fork with newgrf API change
10:29:43 <Eddi|zuHause> well, TTDPatch version was always completely separate
10:29:46 <andythenorth> only one game in town
10:30:19 <Eddi|zuHause> but the OpenTTD NewGRF version doesn't really handle forks and patches in any sensible way
10:30:23 <peter1138> Oh, git rev-list doesn't quite work.
10:30:53 <peter1138> Well forks can implement their own solution :p
10:32:12 <andythenorth> forking the newgrf API would need a very good reason
10:32:13 <peter1138> Ah
10:32:16 <peter1138> git rev-list --count 1.8.0..HEAD
10:32:16 <peter1138> 89
10:32:19 <andythenorth> it's pretty much unwise
10:32:21 <peter1138> Maybe that's good enough.
10:32:51 <peter1138> Not quite right with branch, but once committed it is stable.
10:32:56 <peter1138> *branching.
10:33:50 <peter1138> Easier to use than working it out from dates.
10:36:16 <Eddi|zuHause> but is that stable across clones?
10:36:43 <Eddi|zuHause> assuming people do really weird stuff with their git
10:37:15 <peter1138> Yes.
10:37:43 <peter1138> You can't insert a commit in a past without rewriting history, and then it's no longer a clone.
10:42:59 <peter1138> Hmm, don't think I can automatically determine the last release version in the history anyway.
10:46:51 *** andythenorth has quit IRC
11:15:42 *** andythenorth has joined #openttd
11:36:47 <peter1138> wb
11:38:21 <LordAro> mildly relatedly, i noticed a load of svn stuff left in squirrel_export.sh the other day
11:38:26 <LordAro> which probably shouldn't be there anywaay
12:01:40 *** Pikka has quit IRC
13:40:48 *** Maraxus has joined #openttd
13:51:34 *** Maraxus has quit IRC
13:55:57 *** ektor has joined #openttd
14:07:36 *** ektor has quit IRC
14:42:09 *** snail_UES_ has joined #openttd
14:53:26 *** snail_UES_ has quit IRC
15:08:55 *** Alberth has joined #openttd
15:08:55 *** ChanServ sets mode: +o Alberth
15:09:07 <Alberth> o/
15:10:34 *** Stimrol has joined #openttd
15:14:45 <peter1138> hi
15:15:40 <andythenorth> hi Alberth :)
15:35:13 *** chomwitt has joined #openttd
15:57:41 *** sim-al2 has quit IRC
16:17:04 *** supermop_work has joined #openttd
16:18:39 <supermop_work> yo
16:26:25 <Alberth> o/
16:37:44 *** Wormnest has joined #openttd
16:50:31 *** HerzogDeXtEr has joined #openttd
16:53:39 *** nielsm has joined #openttd
17:13:42 *** nielsm has quit IRC
17:23:13 *** Gja has joined #openttd
17:36:43 *** TheMask96 has quit IRC
17:38:25 *** muffindrake3 has quit IRC
17:41:36 *** muffindrake has joined #openttd
17:41:53 *** TheMask96 has joined #openttd
17:49:16 *** Progman has joined #openttd
18:00:45 *** Cubey has joined #openttd
18:10:54 *** Cubey has quit IRC
18:21:29 *** Gja has quit IRC
18:23:19 *** nielsm has joined #openttd
18:25:12 *** chomwitt has quit IRC
18:26:50 *** Gja has joined #openttd
18:30:34 *** Flygon has quit IRC
18:33:27 *** Stimrol has quit IRC
18:35:05 <peter1138> https://github.com/PeterN/OpenTTD/commits/extend-engine-va2-var60
18:35:07 <peter1138> Pom te pom
18:35:18 <peter1138> I don't actually know what it's useful for, but... :p
18:37:07 *** Cubey has joined #openttd
18:39:18 <andythenorth> awesome :)
18:39:20 <andythenorth> V453000: ^^
18:39:34 <andythenorth> now nml needs patched ;)
18:39:39 <andythenorth> V can do that
18:45:32 *** andythenorth has quit IRC
18:50:38 *** Stimrol has joined #openttd
18:52:03 <nielsm> michi_cc: I'll close the "kill dmusic" PR for now and submit one with some bugfixes instead :)
18:52:54 <V453000> peter1138: I'm almost afraid what does that do? :)
18:55:06 <V453000> ah so for example when I have wagons AA BB CCC I can get positions 0-1 for A, 2-3 for B and 4-6 for C? What kind of values would it give with ABBCCCBBB?
19:04:30 *** Gja has quit IRC
19:05:55 *** glx has joined #openttd
19:05:55 *** ChanServ sets mode: +v glx
19:11:29 *** Pikka has joined #openttd
19:12:23 *** sla_ro|master has joined #openttd
19:12:37 *** Gja has joined #openttd
19:13:21 *** Wacko1976 has joined #openttd
19:15:32 *** Wolf01 has joined #openttd
19:15:53 <Wolf01> Moin
19:45:48 *** Borg has joined #openttd
19:46:21 *** Gja has quit IRC
19:49:19 *** supermop_work has quit IRC
19:52:27 <peter1138> V453000, you get the first and last
19:53:03 <peter1138> for ABBCCCBBB you'd get 0-0 for A, 1-8 for B and 3-5 for C
19:53:27 <peter1138> V453000, hence I dunno what it's useful for :p
19:54:07 <peter1138> last is probably unneeded
19:54:19 <peter1138> But first lets you prioritise things I guess.
19:54:43 <peter1138> Maybe variations. I dunno.
20:02:03 *** frosch123 has joined #openttd
20:02:56 <Borg> arghh.. guys..
20:03:07 <Borg> I saw change in 1,8.0 regarding stockpile industries..
20:03:18 <Borg> really... Coal: 1000 tons waiting looks terrible
20:03:30 <Borg> I changed it myself to: Coal (1000 tons waiting)
20:03:45 <Borg> I guess its just matter of taste.... but..
20:07:44 <peter1138> Never seen it but I guess it was changed for consistency.
20:11:54 <frosch123> wow, never noticed that var60 only specified the lower 8 bits
20:12:25 *** gelignite has joined #openttd
20:12:25 <frosch123> i am even more impressed that nml actually masks it, and that ttdp actually stores junk in the upper bits, so that likely all grfs actually mask it
20:12:27 <LordAro> i seem to recall that being complained about at length already
20:13:54 <peter1138> LordAro, oh? Somebody patching for super long trains?
20:14:11 <LordAro> no, the industry cargo waiting stuff
20:14:16 <peter1138> Oh :)
20:16:33 <frosch123> i think we had a bug report about the japanese trainset once
20:16:55 <frosch123> they had a wagon with 3 articulated parts, which all used the same id, and they switched graphics via "position in chain" % 3
20:17:19 <frosch123> someone built a train with more than 256 articulated parts, so one wagon was "broken"
20:17:32 <peter1138> o_O
20:18:08 <frosch123> we blamed it on the grf :p
20:19:01 <peter1138> Hmm, max train length is 64 tiles.
20:20:05 <frosch123> i think it used to be "number of wagon", not "number of tiles"
20:20:28 <peter1138> Well, 64 tiles is 128 standard-length wagons. Hmm.
20:20:39 <peter1138> So to push 256 you'd need tiny wagons.
20:27:52 <V453000> frosch123: remember sending me this? :P https://paste.openttdcoop.org/pqkw4ev0p#line-15
20:28:26 <V453000> peter1138: interesting, I need to think how to utilize that :)
20:28:48 <frosch123> no :p
20:29:19 <V453000> well it's been 2 years :P
20:29:22 <frosch123> i think last night we concluded that var61 does not work
20:29:39 <V453000> I guess
20:29:52 <V453000> I guess this thing from peter does not contribute enough to that?
20:30:05 <LordAro> thought: regression test grf
20:31:06 <peter1138> What's the issue with var61? Caching?
20:31:17 <frosch123> V453000: peter's diff would allow you to detect the first and last booster part, but not the 2nd and 2nd last
20:31:44 <peter1138> Right, I don't know what V453000 wants, and what is useful in general :-)
20:32:11 <peter1138> That functionality could be achieved, if it makes sense.
20:32:54 <V453000> peter1138: I would love to be able to have an engine with "booster wagons" so that the wagons add the engine's max speed, but in a way where the wagons add some_value / position_in_consist amount of power, so the later in the vehicle you use it the less effect it has, with some cap at 20 units
20:33:11 <V453000> *amount of power = amount of speed
20:33:43 <peter1138> Ok, then yeah, what I did is not that useful.
20:33:44 <V453000> the overall aim is to make a set with customizable trains controlled by wagon configurations
20:34:31 <peter1138> The "/position_in_consist" thing could be done really easily as a var
20:34:40 <peter1138> But that's possibly rather specific :p
20:34:59 <peter1138> Otoh... there's another 8 bits... :p
20:35:58 <frosch123> V453000: just go for "number of booster vehicles" and don't care about the position
20:36:16 <V453000> well more specifically I'd want some_value / (position_in_consist +2) because first 2 is engine :P but yeah
20:36:27 <V453000> frosch123: I'm considering how much would that remove and/or if I can design around that
20:36:37 <V453000> like, dividing the efficiency by total train length
20:37:59 <peter1138> Hmm.
20:38:12 <peter1138> Alternatively...
20:38:30 <peter1138> A bitmask
20:38:40 <peter1138> Would only work for consists < 24 bits :p
20:38:46 <peter1138> Er, less than 24 wagons.
20:39:14 <frosch123> add a FOREACH variable :p
20:39:28 <peter1138> I think that would even make /position_in_consist super easy
20:39:29 <frosch123> call this action2 chain for each vehicle
20:39:31 <Borg> noooooooo. I already have plenty of 26+2 loco trains
20:39:32 <Borg> :)
20:41:18 <peter1138> ABBCCCBBB would then be 100000000 for A, 011000111 for B and 000111000 for C.
20:41:26 <peter1138> (in binary)
20:41:34 <peter1138> 0x100, 0xC7 and 0x38 in hex.
20:41:40 <V453000> that's something that I imagined gathering through switches but I guess that's not doable
20:42:15 <frosch123> you can gather some info via the user-bits in var42
20:42:44 <peter1138> I dunno how easy it is to work with bits in general though
20:43:04 <peter1138> Like a find-first-bit function in varactions...
20:43:39 <frosch123> 24 switches with masks, each of them querying the variable again :p
20:44:00 <peter1138> Yeah :(
20:44:19 <frosch123> anyway, i think the issue with var61 were those variables which expose the user-bit-mask and current max-speed and stuff
20:44:22 *** supermop_work has joined #openttd
20:44:36 <frosch123> people wanted define their own properties depending on the properties of the vehicle in front and vice versa
20:44:54 <peter1138> Yeah that'll give you dependency issues.
20:45:03 <frosch123> var61 is fine for things which cannot be changed via callbacks
20:45:28 <frosch123> so we could possibly also add a list of valid variables to var61
20:45:34 <frosch123> instead of only a list of callbacks
20:58:03 *** sla_ro|master has quit IRC
21:11:48 <peter1138> Any views on using & in function signatures?
21:15:52 *** andythenorth has joined #openttd
21:16:59 <peter1138> Saves me having to use pointers :p
21:17:08 * andythenorth points at peter1138
21:17:39 <peter1138> Pretty sure the game is running much faster with these windows not updating so fast.
21:18:01 <peter1138> Might just be cos I'm on an i7 these days.
21:18:09 <Borg> yeah.. but industry NewGRF display bug not fixed
21:18:22 <Borg> and its probably easy to fix ;P
21:18:44 <Eddi|zuHause> Wolf01: concerning TF, yes, i have played with the beta version of that patch a bit, it was fine. just i have noticed an annoying change/bug where you cannot build a track directly parallel to a freight station anymore (passenger is still fine)
21:19:46 <andythenorth> which windows? o_O
21:19:53 * andythenorth could logs :P
21:22:21 <andythenorth> and why is some of the the chat missing in my client :o
21:27:28 *** andythenorth has left #openttd
21:27:45 *** andythenorth has joined #openttd
21:32:14 <peter1138> Borg, is it reported?
21:32:45 <Borg> only over IRC..we discussed it here.. and how to fix it.
21:33:05 <glx> just make a PR, will be faster
21:33:13 <Borg> no..
21:33:50 <peter1138> Put it on github
21:34:04 <Borg> I dont use github....
21:34:07 <peter1138> We do
21:34:29 <Borg> feel free to take it.. and get fame
21:34:34 <Borg> need screenshoot?
21:34:41 <peter1138> https://github.com/OpenTTD/OpenTTD/issues
21:34:45 <peter1138> ^ bug reports go there
21:52:09 *** Borg has quit IRC
21:56:48 *** Thedarkb1-X40 has joined #openttd
22:00:37 *** Thedarkb-X40 has quit IRC
22:24:28 <TrueBrain> yes, it is the fame we were after ... I forgot why I did this ..
22:25:01 <TrueBrain> (always makes me wonder why people think they do us a favour by giving us more work :P)
22:25:14 <peter1138> :D
22:25:30 <peter1138> Well, they haven't reported it so, not really more work :-)
22:25:36 <TrueBrain> :D
22:25:51 <TrueBrain> "if you can't be bothered to report it, why should I be bothered to fix it"
22:26:15 <peter1138> Funny, in fast-forward now, the news messages get deleted before they've finished scrolling up :p
22:26:23 <TrueBrain> lol
22:26:26 <peter1138> Empty map, mind you.
22:27:11 <TrueBrain> time to find a bed; night all :)
22:27:15 <peter1138> Awww...
22:27:19 <peter1138> It's early!
22:28:37 *** nielsm has quit IRC
22:29:55 *** Alberth has left #openttd
22:36:26 <frosch123> we already fixed the borg issue on 2017-12-27
22:37:06 <frosch123> we cannot fix people not getting used to silightly modified guis
22:48:59 <peter1138> o_O
22:51:42 <andythenorth> :P
22:53:17 <peter1138> Any idea what this means:
22:53:32 <peter1138> /* HandleMouseEvents was already called for this tick */
22:53:36 <peter1138> HandleMouseEvents();
22:54:00 <peter1138> I could just as well say "HandleMouseEvents needs to be called"
22:54:04 <peter1138> *It
22:54:12 <LordAro> i'm sure someone knew what it meant
22:54:14 <LordAro> at some point
22:55:43 *** gelignite has quit IRC
22:58:56 <frosch123> 8c33893ffd5 no idea
22:59:25 <peter1138> Yeah, doesn't make it clearer :-)
22:59:49 <frosch123> i think it is inverted
23:00:08 <frosch123> _input_events_this_tick makes sure that it is only called once or so
23:00:28 <frosch123> it's a comment to the "else" case of the if above
23:02:22 <frosch123> i would replace "already" with "not yet"
23:02:43 <frosch123> possibly with an "_input_event_this_tick == 0 comment"
23:03:00 <frosch123> but _input_events_this_tick looks quite insane :p
23:13:02 *** sim-al2 has joined #openttd
23:22:04 *** andythenorth has quit IRC
23:27:09 <peter1138> Yeah, I think it's something to be replaced :p
23:48:23 *** supermop_work has quit IRC