IRC logs for #openttd on OFTC at 2017-06-15
⏴ go to previous day
00:03:56 *** gelignite has joined #openttd
00:44:30 *** ChanServ sets mode: +v tokai
01:19:47 *** JacobD88 has joined #openttd
02:51:18 *** HerzogDeXtEr has joined #openttd
04:08:02 *** Biolunar_ has joined #openttd
06:32:24 *** Arveen2 has joined #openttd
06:37:20 *** sla_ro|master has joined #openttd
06:49:39 *** Montana has joined #openttd
07:51:46 *** andythenorth has joined #openttd
07:56:46 *** andythenorth has left #openttd
08:27:01 *** andythenorth has joined #openttd
08:44:41 *** tycoondemon has joined #openttd
09:02:50 *** frosch123 has joined #openttd
09:28:58 *** JacobD88 has joined #openttd
09:34:22 *** Progman has joined #openttd
10:03:53 *** Hiddenfunstuff has joined #openttd
10:12:38 *** andythenorth has left #openttd
10:54:25 *** andythenorth has joined #openttd
10:54:30 *** andythenorth has left #openttd
10:54:58 *** gelignite 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: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: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: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: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: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: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:55:40 *** frosch123 has joined #openttd
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: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:13:26 <frosch123> based on grf parameter?
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:44 <supermop> lets say i have 3 types of trucks
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: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:26 <supermop> but i dont have 3 trucks
16:18:48 <supermop> i have 8 types of truck, and 6 generations of truck
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: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:26:35 <supermop> how do i set abc in nml?
16:26:36 <planetmaker> your first thought is correct syntax
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:44 <planetmaker> you can define named variables which are no parameter
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...
17:24:22 *** Wormnest has joined #openttd
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:58:34 <supermop> any more mountain engineering?
18:34:56 <Eddi|zuHause> supermop: i can't really decide that
18:58:39 *** HerzogDeXtEr has joined #openttd
19:36:19 *** frosch123 has joined #openttd
19:42:19 <frosch123> Hoi, everything ready?
19:43:36 *** andythenorth has joined #openttd
19:44:50 <supermop> yo andy, does steeltown iron go on flatbeds, or only in ladles?
19:46:31 <Alberth> whatever vehicle you got, we've got loads to move!
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:56:43 <andythenorth> anyone got Windows Mobile?
19:57:14 <andythenorth> specifically “ideally the site works on Windows Phone"
20:02:32 <andythenorth> requirement in a procurement tender
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: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: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: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")
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:32:24 *** LEdoian has joined #openttd
21:35:17 *** ledoian_ has joined #openttd
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:27:36 *** sim-al2 has joined #openttd
23:09:28 *** Biolunar has joined #openttd
23:33:51 <andythenorth> tenders don’t write themselves eh?
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: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: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
continue to next day ⏵