IRC logs for #openttd on OFTC at 2017-06-15
            
00:03:56 *** gelignite has joined #openttd
00:24:26 *** gelignite has quit IRC
00:44:30 *** tokai has joined #openttd
00:44:30 *** ChanServ sets mode: +v tokai
00:50:19 *** Wormnest has quit IRC
00:51:08 *** tokai|noir has quit IRC
01:19:47 *** JacobD88 has joined #openttd
01:34:31 *** JacobD88 has quit IRC
01:49:14 *** Wolf01 has quit IRC
02:51:18 *** HerzogDeXtEr has joined #openttd
02:56:47 *** Mazur has quit IRC
02:57:04 *** Mazur has joined #openttd
03:48:02 *** D-HUND has joined #openttd
03:52:03 *** debdog has quit IRC
04:02:04 *** HerzogDeXtEr has quit IRC
04:08:02 *** Biolunar_ has joined #openttd
04:09:03 *** D-HUND has quit IRC
04:14:58 *** Biolunar has quit IRC
04:16:23 *** glx has quit IRC
05:37:48 *** Mazur has quit IRC
05:38:39 *** Mazur has joined #openttd
06:10:55 *** Montana has quit IRC
06:32:24 *** Arveen2 has joined #openttd
06:37:20 *** sla_ro|master has joined #openttd
06:37:44 *** Arveen has quit IRC
06:49:39 *** Montana has joined #openttd
06:57:02 *** Cubey has quit IRC
07:51:46 *** andythenorth has joined #openttd
07:56:46 *** andythenorth has left #openttd
08:27:01 *** andythenorth has joined #openttd
08:40:51 *** DDR has quit IRC
08:44:41 *** tycoondemon has joined #openttd
09:02:50 *** frosch123 has joined #openttd
09:28:58 *** JacobD88 has joined #openttd
09:33:44 *** Wolf01 has joined #openttd
09:33:54 <Wolf01> o/
09:34:22 <crem_> \o
09:34:22 *** Progman has joined #openttd
09:35:00 <frosch123> hoi
10:01:06 *** frosch123 has quit IRC
10:03:53 *** Hiddenfunstuff has joined #openttd
10:12:38 *** andythenorth has left #openttd
10:29:52 *** JacobD88 has quit IRC
10:42:44 *** sim-al2 has quit IRC
10:47:26 *** Montana has quit IRC
10:54:25 *** andythenorth has joined #openttd
10:54:30 *** andythenorth has left #openttd
10:54:58 *** gelignite has joined #openttd
12:04:14 *** debdog has joined #openttd
12:37:56 *** andythenorth has joined #openttd
12:39:32 *** andythenorth has left #openttd
13:06:54 *** Montana has joined #openttd
14:33:42 *** sim-al2 has joined #openttd
14:51:07 <supermop_home> is there any way to do math on a result of a switch?
14:52:07 <supermop_home> when I have "(switch_capacity_rb_open*7)/10"
14:52:28 <supermop_home> I get error that both operands must be intergers or floats
14:53:13 <Wolf01> Yeah, because this http://webster.openttdcoop.org/index.php?channel=openttd&date=1489449600 might happen
14:53:27 <supermop_home> is there a way to elsewhere take result of the switch and store it as a number?
14:58:32 <planetmaker> supermop, yes, there is a way. It's a complicated syntax but not really magic
14:59:19 <planetmaker> https://paste.openttdcoop.org/pdibzubsj <-- see the [ ] in that example
14:59:47 <planetmaker> basically it means: use the temporary registers
15:00:39 <planetmaker> store the value of a calculation and load it again for re-using in another calculation
15:01:16 <planetmaker> that example is taken from ogfx-landscape http://bundles.openttdcoop.org/ogfx-landscape/nightlies/LATEST/ogfx-landscape.nml has the full (pre-processed) code
15:01:59 <supermop_home> is the temp storage anywhere in the grf or does it have to be part of the item?
15:02:12 <planetmaker> hm... though that's not exactly what you are asking... it's doing the calculation *in one switch*
15:02:59 <planetmaker> STORE_TEMP and LOAD_TEMP are grf primitives always available. I *think* they live as long as a single decision chain is done
15:03:37 <planetmaker> but always properly initialize the storage with a value you want before you read it - it might contain garbage :)
15:04:36 <supermop_home> planetmaker ill ask more in 20 min, have to catch train
15:05:16 <planetmaker> it might be needed to do the calculation in one switch... I'm not sure anymore
15:05:19 <planetmaker> ok
15:08:19 *** Montana has quit IRC
15:11:08 <Eddi|zuHause> you can STORE_TEMP in an outer switch and LOAD_TEMP in an inner switch, but you cannot keep values over multiple callback runs
15:21:55 <supermop> hmm
15:30:46 <Eddi|zuHause> NFO also has a "function call" mechanism, where you use the return value of a switch in a calculation, but i think that was never implemented in NML
15:31:50 <Eddi|zuHause> there is also sommthing like STORE_PERM, but only for specific features like industries, not trains
15:32:35 <supermop> yeah
15:33:11 <supermop> i used to set all capacities with (param_capacity*X/2)
15:33:27 <supermop> where param defaults to 2, and x is the nominal capacity of that rv
15:33:55 <supermop> but i kept missing certain instances when updating bunch of vehicles
15:34:23 <supermop> so thought it would be easier to have a switch for each type of truck/trailer
15:35:38 <supermop> with a switch that takes param_capacity*x and returns that as the default result
15:38:10 <Eddi|zuHause> yes, that is pretty much the same thing i wanted to use the function call for
15:38:41 <Eddi|zuHause> but then it was easier to modify my code generator than implement it in NML
15:42:31 *** sim-al2 has quit IRC
15:47:37 <supermop> HMM
15:49:44 *** Arveen2 has quit IRC
15:55:40 *** frosch123 has joined #openttd
15:58:17 <frosch123> hoi
15:58:26 <supermop> yo frosch123
15:59:52 <Wolf01> Quak
16:02:23 <frosch123> We should make ottd commercial
16:02:42 <frosch123> just to annoy baldi
16:03:54 <supermop> make inflation require an in-game purchase to enable
16:04:38 <supermop> also a charge of 10 EUR each time user makes use of newgrf developer settings
16:06:12 <frosch123> is it better to allow buying better trains with real money, or should you rather be able to sabotage opponents?
16:07:10 <frosch123> maybe there should be an option for cross-server sabotage
16:07:24 <frosch123> btpro vs reddit
16:07:47 <supermop> like old tetris competitive, where lines you clear show up on opponents screen
16:10:33 <supermop> Eddi|zuHause: i just wish i could have a list of values that i define based on parameter
16:12:15 <supermop> i guess each RV could have a store_temp and load_temp, but that is worse than the original situation, as i still have some math at each vehicle to update
16:12:51 *** juzza1 has quit IRC
16:13:26 <frosch123> based on grf parameter?
16:14:15 <supermop> yes
16:14:15 <frosch123> you can assign arbitrary values to the options in grf parameter dropdowns
16:14:26 <supermop> not quite what i want
16:14:41 <planetmaker> quak
16:14:44 <supermop> lets say i have 3 types of trucks
16:14:44 <planetmaker> who is baldi?
16:14:57 <frosch123> andys nightmare
16:15:00 <supermop> flatbed, tank, and hopper
16:15:12 <supermop> theory: baldi is andy
16:15:29 <supermop> have they ever been seen in the same room?
16:15:33 <planetmaker> sounds like a popcorn-esk thing :D
16:15:58 <frosch123> but salty popcorn
16:16:01 <supermop> frosch123: i have a parameter to scale capacities
16:16:25 <planetmaker> yes... and why not have the user select via drop-down 1, 3 and 10?
16:16:39 <planetmaker> labeled tiny, intermediate and HUGE?
16:16:45 <frosch123> like 50%, 100, 150?
16:16:48 <supermop> but we have 3 different types of trucks, one carries 15 units, one carries 20, and one carries 25
16:16:55 <supermop> planetmaker: i already do that
16:17:08 <planetmaker> capacity = base_capacity * factor
16:17:30 <supermop> so currently param_capacity is either 1,2 or 3
16:17:54 <supermop> and each vehicle takes (param_capacity*x)/2
16:18:07 <supermop> where x is the capacity of that vehicle type
16:18:11 <frosch123> capacity: return 10 + 5×param?
16:18:12 <supermop> so 15, 20, or 25
16:18:26 <supermop> but i dont have 3 trucks
16:18:48 <supermop> i have 8 types of truck, and 6 generations of truck
16:18:55 <supermop> plus semi trucks
16:19:15 <supermop> plus diesel trucks, trolley trucks, and dual mode trucks
16:19:25 <planetmaker> sorry if it sounds dumb: what's the problem exactly?
16:19:51 <supermop> so lets call that 288 trucks
16:19:54 <planetmaker> you want to scale the capacity both by generation and with the capacity parameter and the truck type?
16:20:38 <supermop> which means there are 288 places where i need to find param_capacity*x/2
16:20:58 <supermop> and check to make sure that x is set to the correct value for that type of truck
16:21:25 <supermop> but every 3rd generation flatbed truck should have the same value of x
16:22:16 <supermop> so i could make a switch: switch_capacity_rigid_flat_3 or something
16:23:49 <supermop> that only has one possible return value
16:23:51 <frosch123> sounds like you should learn either about preprocessors, or about local parameter assignment
16:24:41 <supermop> what i'd like to do, is either take result of a swiitch like that and do math on it
16:24:44 <supermop> or
16:24:52 <planetmaker> what do you mean in NML context with the latter, frosch123 ? store_temp?
16:25:17 <supermop> store the result of the math done elsewhere into a value i can reference
16:25:35 *** juzza1 has joined #openttd
16:25:59 <frosch123> abc = param+10;
16:26:21 <frosch123> or did it use := ?
16:26:35 <supermop> how do i set abc in nml?
16:26:36 <planetmaker> your first thought is correct syntax
16:26:48 <planetmaker> abc = param + 42
16:27:42 <frosch123> https://newgrf-specs.tt-wiki.net/wiki/NML:Parameter_assignment
16:28:13 <supermop> because if i have to put store temp and load temp for each truck, then i have even more places to check and update than i did before
16:28:46 <supermop> how many params can a grf have? i thought it was some low amount
16:28:56 <frosch123> no idea whether you need to use the [ ] syntax
16:29:10 <frosch123> or whether abc works
16:29:42 <frosch123> 64 or so
16:29:44 <planetmaker> you can define named variables which are no parameter
16:30:08 <supermop> planetmaker: :O
16:30:11 <planetmaker> (exposed parameter)
16:30:13 <frosch123> hmm, i think even 128
16:30:38 <planetmaker> 127, I think. the other 128 or so are reserved for those internal variables used by NML or the user
16:32:50 <frosch123> supermop: anyway, store/load_tmp are for dynamic values during callback evaluation
16:33:05 <Eddi|zuHause> <planetmaker> sorry if it sounds dumb: what's the problem exactly? <-- the problem is, you cannot have a switch that calculates "return base_capacity*param_capacity", you have to duplicate it for every base capacity.
16:33:18 <Eddi|zuHause> and if you ever want to change the calculation, you have to modify every copy
16:33:27 <frosch123> in your case the values do not change during the game
16:36:48 <planetmaker> yeah, I guess that hit it spot-on...
16:52:02 *** frosch123 has quit IRC
17:13:20 *** Gja has joined #openttd
17:24:22 *** Wormnest has joined #openttd
17:26:29 *** Biolunar_ has quit IRC
17:28:56 <supermop> Eddi|zuHause: do you think storing the values as more parameters is a good idea?
17:31:00 *** Alberth has joined #openttd
17:31:00 *** ChanServ sets mode: +o Alberth
17:31:15 <supermop> hi Alberth
17:34:47 <Alberth> o/
17:58:34 <supermop> any more mountain engineering?
18:12:08 *** Gja has quit IRC
18:13:21 <Alberth> no
18:14:12 <Wolf01> o/
18:34:56 <Eddi|zuHause> supermop: i can't really decide that
18:51:10 *** Cubey has joined #openttd
18:58:39 *** HerzogDeXtEr has joined #openttd
19:00:05 *** Gja has joined #openttd
19:10:20 *** Arveen has joined #openttd
19:23:15 *** glx has joined #openttd
19:23:15 *** ChanServ sets mode: +v glx
19:36:19 *** frosch123 has joined #openttd
19:40:12 <V453000> o/ :)
19:42:19 <frosch123> Hoi, everything ready?
19:43:36 *** andythenorth has joined #openttd
19:44:28 <andythenorth> o/
19:44:50 <supermop> yo andy, does steeltown iron go on flatbeds, or only in ladles?
19:45:07 <supermop> ingots? bars?
19:46:31 <Alberth> whatever vehicle you got, we've got loads to move!
19:46:41 <andythenorth> pigs
19:47:55 <crem_> https://stackoverflow.blog/2017/06/15/developers-use-spaces-make-money-use-tabs/
19:48:14 <Wolf01> What?
19:48:33 <andythenorth> so I change my editor, and I earn more?
19:49:10 <andythenorth> oh I am not a developer :P
19:49:10 <crem_> It's not causation. :)
19:49:57 <Wolf01> Devlolopers win
19:56:40 <andythenorth> err
19:56:43 <andythenorth> anyone got Windows Mobile?
19:57:14 <andythenorth> specifically “ideally the site works on Windows Phone"
20:01:42 <Alberth> those still exist?
20:02:32 <andythenorth> requirement in a procurement tender
20:02:35 <andythenorth> so apparently
20:05:12 <V453000> of course not everything yet frosch123 but it's getting there ;P
20:05:41 <Eddi|zuHause> dangit, i just wanted to post that link...
20:06:34 <frosch123> it's true, at work i use spaces, in ottd i use tabs
20:10:02 <Wolf01> <andythenorth> anyone got Windows Mobile? -> me
20:10:26 <andythenorth> is it Windows Phone? o_O
20:10:33 <frosch123> anyway, the survey is questionable. According to my experience most people do not know about spaces and tabs
20:10:55 <Eddi|zuHause> anyone know how to crosscompile for windows CE on ARM?
20:11:39 <Wolf01> <andythenorth> is it Windows Phone? o_O <- no, windows phone is dead, is windows mobile
20:12:36 <andythenorth> ach
20:12:40 <andythenorth> tender says Windows Phone
20:12:41 <supermop> frosch123: my wife uses spaces and she makes much more than i do
20:12:45 <andythenorth> that’s the way it goes
20:13:11 <supermop> andythenorth: probably the guy writing the tender doesn't want to give up his phone
20:13:29 <Wolf01> Maybe he meant "windows phone" which is "smartphones which feature windows mobile"
20:14:09 <Eddi|zuHause> are we splitting hairs over something someone uninitiated probably used wrong anyway?
20:15:30 <Wolf01> https://www.windowscentral.com/tech-terminology-check-windows-phone-windows-mobile :D
20:17:12 <Wolf01> Also ginger ale abstinence is teasing me to go to the pub
20:17:39 <Eddi|zuHause> doesn't sound very abstinent
20:18:34 <Wolf01> I didn't drink it yet today
20:18:38 <Eddi|zuHause> anyway, i went to the doctor today, and she said my dizziness might be something in the inner ear, and referred me to an ear doctor...
20:19:13 <Wolf01> Did you try licking your elbow?
20:19:32 <Eddi|zuHause> i don't think so :p
20:19:45 <andythenorth> sometimes anti-sickness tablets stop dizziness
20:19:50 * andythenorth is *not* a doctor
20:20:15 <andythenorth> ach 41 questions, too many saying NOT DONE
20:20:57 <Eddi|zuHause> she didn't want to try medication at this stage yet
20:21:32 <andythenorth> http://www.bbc.co.uk/news/uk-england-leeds-40287817
20:21:47 <supermop> Wolf01: i think you can buy cans or bottles to keep in your fridge
20:22:58 <Eddi|zuHause> andythenorth: don't ever let anyone else tell you what a cloud looks like before you look at it yourself
20:23:50 <Eddi|zuHause> anyway, beware of anvil-shaped clouds. the rest is irrelevant
20:25:50 <Eddi|zuHause> (and by "irrelevant" i mean "the fun part")
20:28:18 *** DDR has joined #openttd
21:00:32 *** Wolf01|Phone has joined #openttd
21:01:11 <Wolf01|Phone> So, I'm here with a ginger ale on my hand...
21:03:43 <Wolf01|Phone> <supermop> Wolf01: i think you can buy cans or bottles to keep in your fridge <- better not, I'll drink it at litres
21:23:59 *** Wolf01|Phone has quit IRC
21:24:01 *** frosch123 has quit IRC
21:24:03 *** frosch has joined #openttd
21:28:11 *** frosch has quit IRC
21:32:24 *** LEdoian has joined #openttd
21:35:17 *** ledoian_ has joined #openttd
21:35:51 *** LEdoian has quit IRC
21:49:48 *** sla_ro|master has quit IRC
21:53:40 *** Alberth has left #openttd
22:00:02 *** cHawk has quit IRC
22:18:12 *** Montana has joined #openttd
22:22:58 <Eddi|zuHause> so, i found a workaround for my steam issue with "STEAM_RUNTIME_PREFER_HOST_LIBRARIES=0"
22:26:29 <Eddi|zuHause> https://github.com/ValveSoftware/steam-for-linux/issues/4795
22:27:36 *** sim-al2 has joined #openttd
22:31:54 *** Gja has quit IRC
23:00:16 <peter1138> hi
23:09:28 *** Biolunar has joined #openttd
23:15:15 <andythenorth> lo peter1138
23:31:12 <supermop> andy is up late
23:32:08 *** Progman has quit IRC
23:33:51 <andythenorth> tenders don’t write themselves eh?
23:33:57 <peter1138> lo bob
23:34:53 <andythenorth> isn’t it
23:35:10 <andythenorth> have we got a government yet?
23:43:49 <Eddi|zuHause> do you need one? :p
23:43:54 <supermop> what to mail vans refit to?
23:44:04 <supermop> everything box trucks do?
23:44:18 <supermop> is there a point?
23:44:30 <Eddi|zuHause> i mean, belgium had no government for over 2 years in a row, and they were getting along fine...
23:44:46 <Eddi|zuHause> ... but, they also didn't initiate a brexit
23:45:19 <ST2> conclusion: no government is the way to go!
23:45:30 *** andythenorth has quit IRC
23:45:55 *** FLHerne has joined #openttd
23:46:53 *** Hiddenfunstuff has quit IRC
23:59:32 <Montana> I agree. Spain had not government for 10 months and economical growth was impressive