Config
Log for #openttdcoop.devzone on 29th October 2013:
Times are UTC Toggle Colours
04:53:59  *** stevenh has joined #openttdcoop.devzone
04:54:17  <stevenh> Hello all... how would one go about getting access to a project on the devzone?
04:55:04  <Supercheese> You can ask, open a new request on the issue tracker
04:55:11  <Supercheese> which project?
04:56:02  <stevenh> Jpset and all subprojects
04:57:11  <stevenh> Have asked dandan, don't know if he knows that he can add me?
04:57:15  <stevenh> Or is it out of his contorl?
04:57:19  <Supercheese> Not sure
04:58:03  <Supercheese> I can add people to my project, so if he is manager he should be able to do the same
04:58:17  <Supercheese> of course, he may not have gotten your message
04:58:57  <Supercheese> "Last connection: 2013-03-09"
04:59:05  <Supercheese> I don't think he's gotten your message
04:59:43  <stevenh> asked over tt-forums pm.
04:59:43  <Supercheese> Huh, that date seems wrong though
04:59:46  <stevenh> will ask again
04:59:53  <Supercheese> Since he has reported issues in May
04:59:56  * Supercheese shrugs
05:01:37  <Supercheese> The TT forums date seems more accurate: "Last visited: 	Tue Oct 08, 2013 10:47 pm"
05:16:43  <stevenh> Thanks Supercheese.
05:17:41  *** stevenh has quit IRC
06:16:27  *** andythenorth has joined #openttdcoop.devzone
06:21:51  *** andythenorth has quit IRC
09:44:48  *** Taede has quit IRC
10:25:46  *** Taede has joined #openttdcoop.devzone
11:06:17  *** frosch123 has joined #openttdcoop.devzone
12:31:42  *** Supercheese_ has joined #openttdcoop.devzone
12:36:49  *** Supercheese has quit IRC
16:49:32  <DevZone> Project ISR Industrial Station Renewal build #47-push: SUCCESS in 1 min 51 sec: https://jenkins.openttdcoop.org/job/isr/47/
16:51:22  <DevZone> Project Dutch Rail Furniture build #15-push: SUCCESS in 1 min 50 sec: https://jenkins.openttdcoop.org/job/dutchrailfurniture/15/
16:55:11  <DevZone> Project OpenGFX build #85-push: SUCCESS in 7 min 44 sec: https://jenkins.openttdcoop.org/job/opengfx/85/
17:01:05  *** oskari89 has joined #openttdcoop.devzone
17:21:11  <DevZone> Project NML - NewGRF Meta Language build #108-nightlies: SUCCESS in 2 min 34 sec: https://jenkins.openttdcoop.org/job/nml/108/
17:31:38  *** ODM has joined #openttdcoop.devzone
17:49:36  *** Alberth has joined #openttdcoop.devzone
18:08:17  <DevZone> Project finnishtrams build #9-nightlies: SUCCESS in 1 min 40 sec: https://jenkins.openttdcoop.org/job/finnishtrams/9/
18:23:48  *** gelignite has joined #openttdcoop.devzone
18:25:16  <planetmaker> meh... #4667 and #5246 are not as simple as they may sound :S
18:27:14  <DevZone> Project Finnish Rail Infrastructure - Rails build #128-nightlies: SUCCESS in 37 sec: https://jenkins.openttdcoop.org/job/frissrails/128/
18:31:17  <DevZone> Project Nutracks build #55-nightlies: SUCCESS in 40 sec: https://jenkins.openttdcoop.org/job/nutracks/55/
18:38:01  <Alberth> yeah, they look complicated :(
18:39:54  <planetmaker> I thought the aircraft speed thing is easy. There's the property definition in nml/actions/action0properties.py
18:40:06  <planetmaker> :448
18:40:25  <planetmaker> Initially I thought the unit_conversion there is wrong. And somehow it is
18:40:40  <planetmaker> NML works correctly, if one specifies the property in nfo values (unit 'nfo')
18:42:05  <planetmaker> somehow the values in 'unit_conversion' seem to have no influence whatsoever
18:42:11  <planetmaker> which kinda irks me
18:42:17  <frosch123> what meaning do they have
18:42:30  <frosch123> i do not unterstand them for the other vehicle types either
18:42:39  <planetmaker> conversion from unit value to SI units, thus m/s
18:43:27  <planetmaker> I *think*
18:43:35  <frosch123> yeah, that could fit about
18:44:01  <planetmaker> though... then it'll be the same for each vehicle type
18:44:12  <frosch123> @calc 3600 * 1609 / 1600 / 2
18:44:12  <Webster> frosch123: 1810.125
18:44:44  <planetmaker> @calc 10000/1397
18:44:44  <Webster> planetmaker: 7.15819613457
18:47:32  <planetmaker> in any case, happily changing that, didn't change the resulting NewGRF
18:48:26  <DevZone> Project Iron Horse build #352-nightlies: SUCCESS in 49 sec: https://jenkins.openttdcoop.org/job/iron-horse/352/
18:48:40  <frosch123> @calc 1609/1600 * 1000/3600
18:48:40  <Webster> frosch123: 0.279340277778
18:48:48  <frosch123> @calc 1 / (1609/1600 * 1000/3600)
18:48:49  <Webster> frosch123: 3.57986326911
18:49:09  <frosch123> @calc 500 / (1609/1600 * 1000/3600)
18:49:09  <Webster> frosch123: 1789.93163456
18:49:19  <frosch123> @calc 500 * (1609/1600 * 1000/3600)
18:49:19  <Webster> frosch123: 139.670138889
18:49:24  <frosch123> @calc 5000 * (1609/1600 * 1000/3600)
18:49:24  <Webster> frosch123: 1396.70138889
18:49:42  <frosch123> ok, found some formula to get that value :p
18:51:32  <planetmaker> :-)
18:51:58  <planetmaker> # 'unit_conversion' defines a conversion factor between the value entered by
18:51:58  <planetmaker> # the user and the resulting value in nfo. This is either an integer or a
18:51:58  <planetmaker> # rational number entered as a 2-tuple (numerator, denominator).
18:51:58  <planetmaker> # The entered value (possibly converted # to the appropriate reference unit,
18:52:00  <planetmaker> # see 'unit_type' above) is multiplied by this factor and then rounded to an
18:52:01  <planetmaker> # integer to provide the final value.
18:53:34  <frosch123> @calc 701 * (8 * 1609/3600)
18:53:34  <Webster> frosch123: 2506.46444444
18:53:47  <frosch123> ok, the number is indeed correct
18:55:00  <planetmaker> what happens is: I enter a value of 80mph in the nml code. And I get in nfo a value of 0x80
18:55:49  <frosch123> can you try different values
18:55:56  <DevZone> Project ISR Industrial Station Renewal build #48-push: SUCCESS in 53 sec: https://jenkins.openttdcoop.org/job/isr/48/
18:56:09  <planetmaker> and 80 km/h are nfo 0x50
18:56:31  <frosch123> 8 mph, 16 mph, 24 mph and such
18:56:38  <frosch123> so maybe there is a pattern
18:56:53  <frosch123> it might get rounded or clamped somewhere
18:57:06  <planetmaker> 8 mph is 0x0D
18:58:02  <planetmaker> 16 -> 0x1A
18:58:25  <planetmaker> 24 -> 0x27
18:58:48  <planetmaker> 32 -> 0x34
18:58:59  <frosch123> @base 16 10 1a
18:58:59  <Webster> frosch123: 26
18:59:02  <frosch123> @base 16 10 0d
18:59:02  <Webster> frosch123: 13
18:59:07  <frosch123> @base 16 10 27
18:59:07  <Webster> frosch123: 39
18:59:11  <frosch123> @base 16 10 34
18:59:11  <Webster> frosch123: 52
18:59:20  <planetmaker> 40 -> 0x40
18:59:33  <frosch123> we could grep for a 13 :p
18:59:34  <Rubidium> all multiples of bad luck, except the last one
18:59:48  <frosch123> @base 16 10 40
18:59:48  <Webster> frosch123: 64
19:00:04  <Rubidium> what are you calculating though?
19:00:18  <planetmaker> speed does have a special unit conversion for speed units in units.py:19-34
19:00:23  <planetmaker> units['nfo'] = {'type': 'nfo', 'convert': 1, 'ottd_mul': 1, 'ottd_shift': 0} #don't convert, take value literal
19:00:31  <planetmaker> # Conversion factor works like this:
19:00:31  <planetmaker> # 1 reference_unit = convert other_unit
19:00:31  <planetmaker> # So nfo_value = property_value / convert * property_specific_conversion_factor
19:00:31  <planetmaker> # To avoid using fractions, rational numbers (as 2-tuples) are used instead
19:00:31  <planetmaker> # ottd_mul and ottd_shift are the values taken from OpenTTD's src/strings.cpp and
19:00:32  <planetmaker> # are used to calculate the displayed value by OpenTTD. If possible, adjust_values
19:00:34  <planetmaker> # increases or decreases the NFO value so that the desired display value is actually
19:00:36  <planetmaker> # achieved
19:00:38  <planetmaker> #Speed (reference: m/s)
19:00:40  <planetmaker> units['mph'] = {'type': 'speed', 'convert': (3125, 1397), 'ottd_mul': 1, 'ottd_shift': 0}
19:00:42  <planetmaker> units['km/h'] = {'type': 'speed', 'convert': (18, 5), 'ottd_mul': 103, 'ottd_shift': 6}
19:00:44  <planetmaker> units['m/s'] = {'type': 'speed', 'convert': 1, 'ottd_mul': 1831, 'ottd_shift': 12}
19:00:46  <planetmaker> (sorry, spam)
19:00:52  <Rubidium> @calc 3125/1397
19:00:52  <Webster> Rubidium: 2.23693629205
19:01:50  <frosch123> planetmaker: can you add some debug output to adjust_value (action0.py)
19:02:11  <Rubidium> @calc 8*3125/1397
19:02:11  <Webster> Rubidium: 17.8954903364
19:02:12  <frosch123> i.e. input variables, and something in the loop iteration
19:02:56  <frosch123> action0.py:29
19:04:43  <Rubidium> so the convert converts the number to m/s, right?
19:05:09  <Rubidium> them what converts that to km-ish/h?
19:05:12  <frosch123> yes, but adjust_value and ottd_display_speed change the converted value again
19:05:24  <DevZone> Project OpenGFX build #86-nightlies: SUCCESS in 6 min 48 sec: https://jenkins.openttdcoop.org/job/opengfx/86/
19:07:48  <Rubidium> does python magically convert int division to float?
19:08:19  <Alberth> no, python2 does the same as C
19:08:28  <planetmaker> ('Values (org, unit, ottd_convert_func): %i, %s, %s', <nml.expression.base_expression.ConstantNumeric object at 0x2e0e910>, <nml.ast.item.Unit object at 0x2e0eb10>, <function <lambda> at 0x2b7c848>) :D
19:08:32  <planetmaker> not what I expected
19:09:21  <Rubidium> is there a test NML?
19:09:44  <planetmaker> test project you mean? No
19:09:56  <planetmaker> could be done though...
19:10:47  <Rubidium> is it for all vehicles?
19:11:16  <Alberth> expressions should print itself with a %s
19:11:30  <Alberth> it also has a debug_print() method, it seems
19:11:32  <DevZone> Project ISR Industrial Station Renewal build #49-push: SUCCESS in 51 sec: https://jenkins.openttdcoop.org/job/isr/49/
19:13:07  <Alberth> for the unit, %s should also work, although it may not give you much information, only the name is printend
19:13:35  <Rubidium> for trams it seems to work
19:14:00  <frosch123> planetmaker: does it actually change something if you remove the whole 'adjust_value' from the aircraft prop?
19:15:29  <planetmaker> it's called only once with the values
19:16:12  <planetmaker> with the value I entered in the nml file, thus unconverted
19:17:53  <frosch123> http://paste.openttdcoop.org/show/2754/ <- i mean something like that
19:20:19  <planetmaker> that changes something, yes
19:20:30  <planetmaker> let me check whether that actually *is the fix*
19:20:52  <frosch123> well, it disables a feature :p
19:20:52  <Rubidium> it gets it closer
19:21:03  <Rubidium> 100 mph -> 103 mph
19:21:30  <planetmaker> which feature? :-)
19:22:29  <frosch123> something with R
19:23:06  <Rubidium> although... 103 mph might be closest you can get
19:23:20  <frosch123> its 8mph units in nfo
19:23:22  <planetmaker> it's in steps of 8mph. So... yeah
19:23:28  <frosch123> so 96 or 104
19:23:44  <frosch123> and whatever ottd rounds it to
19:24:03  <Rubidium> 95 and 103
19:24:26  <Rubidium> though 96 input rounds to 95, and above that to 103
19:24:42  <planetmaker> tata. Any case, that fixes it, frosch123
19:25:14  <Rubidium> http://rbijker.net/openttd/aha.diff
19:26:34  <frosch123> http://paste.openttdcoop.org/show/2755/ <- planetmaker: and that?
19:26:46  <frosch123> same as rb
19:27:28  <planetmaker> I tried a float value there before. As-is, it requries an int parameter.
19:27:47  <Rubidium> frosch123: division by zero
19:28:15  <frosch123> ah, ints :)
19:30:02  <planetmaker> Rubidium, your patch gives an ingame speed of 810km/h instead of 797 km/h
19:30:13  <planetmaker> when I asked for 800km/h
19:30:42  <Rubidium> that I kinda mentioned already
19:31:05  <Rubidium> only 96 roundes to 95, everything from 96..100 rounds to 103
19:31:14  <Rubidium> (all in mph)
19:31:17  <V453000> :d
19:31:27  <V453000> yeah these things are hate :|
19:31:42  <planetmaker> why the heck would it / does it do that, Rubidium ?
19:32:09  <Rubidium> due to adjust_value I'd reckon
19:33:41  <Rubidium> it doesn't try to get the closest value, it decreases the value until it goes past the wanted value (lower), then it increases until is passes it again (higher)
19:33:48  <Rubidium> which means it will generally round up
19:34:28  <frosch123> well, ottd seems to round down, so maybe it shall compensate that
19:34:53  <frosch123> but, i guess it is questionable whether this is useful for aircraft
19:37:55  <planetmaker> for aircraft speed at least, yes
19:38:04  <planetmaker> hm, I think that'll do :-)
19:39:08  <planetmaker> tyvm frosch123 & Rubidium :-)
19:43:10  <Rubidium> http://rbijker.net/openttd/aha.diff <- even better
19:46:13  <Rubidium> the first chunk solves the rounding up tendency
19:46:44  <planetmaker> yup :-)
19:47:19  <planetmaker> that's even better :-)
19:50:41  <planetmaker> you want to go for it?
19:56:39  <Rubidium> isn't #5513 fixed? What's open is just the different versioning scheme, right?
19:56:39  <DevZone> Project NML - NewGRF Meta Language build #109-push: SUCCESS in 1 min 12 sec: https://jenkins.openttdcoop.org/job/nml/109/
19:59:05  <planetmaker> yes and no. As nml does have a branch, the reported version is different than mine. Or different than for someone who checksout the whole repo
19:59:10  <DevZone> Project ISR Industrial Station Renewal build #50-push: SUCCESS in 1 min 49 sec: https://jenkins.openttdcoop.org/job/isr/50/
19:59:24  <planetmaker> so the versioning scheme change is an essential part. the missing 50%
20:01:44  <Rubidium> hmm, is my commit message faulty? or are there delays in closing stuff?
20:02:02  <Rubidium> hmm... the devzone doesn't see the revisions yet
20:03:53  <planetmaker> Rubidium, why -    return int(value.value / divisor) * 10 / 16 * unit.ottd_mul >> unit.ottd_shift
20:03:53  <planetmaker>  instead of +    return int(value.value / divisor * 10 / 16 * unit.ottd_mul) >> unit.ottd_shift
20:03:53  <planetmaker>  ?
20:05:38  <Rubidium> the * 10 / 16 was meant to be run as int (so trashing any decimal places). Doing the cast to int later will cause the multiplication with unit.ottd_mul to happen with the untruncated number, and thus yield a higher value than it would in openttd
20:06:15  <planetmaker> ah, k
20:37:39  *** ODM has quit IRC
20:42:45  <DevZone> Project NML - NewGRF Meta Language build #110-push: SUCCESS in 1 min 29 sec: https://jenkins.openttdcoop.org/job/nml/110/
21:10:45  *** Alberth has left #openttdcoop.devzone
21:40:33  *** frosch123 has quit IRC
22:07:32  *** gelignite has quit IRC
22:13:44  *** oskari89 has quit IRC
22:46:55  *** thiagoxxxx has joined #openttdcoop.devzone
23:35:36  *** Supercheese_ has quit IRC
23:59:24  *** Supercheese has joined #openttdcoop.devzone

Powered by YARRSTE version: svn-trunk