Back to Home / #openttd / 2018 / 07 / Prev Day | Next Day
#openttd IRC Logs for 2018-07-29

---Logopened Sun Jul 29 00:00:54 2018
00:44-!-Alberth [] has joined #openttd
00:44-!-Alberth is "purple" on #openttd
00:44-!-mode/#openttd [+o Alberth] by ChanServ
01:18-!-keoz [~keikoz@2a01:e35:2fd5:51e0:d790:795d:2cc7:b53d] has joined #openttd
01:18-!-keoz is "Grmph" on #openttd
01:33-!-FLHerne [] has quit [Quit: Goodbye (ZNC disconnected)]
01:34-!-FLHerne is "Francis Herne" on #kernelnewbies
01:34-!-FLHerne [] has joined #openttd
01:48-!-rp4k [~rp4000@] has joined #openttd
01:48-!-rp4k is "rp4k" on #openttd
01:49<rp4k>hello is there an easy way to apply a patch for ottd1.8.0 on windows? me and my friend would like this chatbox patch we found on the forums.
02:03<@Alberth>as soon as you patch, it is not 1.8.0 any more
02:04<@Alberth>which means you cannot play a multi-player game with other unpatched 1.8.0 versions
02:05<@Alberth>but patching involves getting the source code, getting a compiler, applying the patch to the source code, and compile everything
02:06<@Alberth>not terribly complicated, but setting it all up takes time and effort
02:07<rp4k>and what makes it even worse is i run the server off my synology server/docker/contianer
02:08<rp4k>not worth the headache
02:08<rp4k>network_chat_box_width_pct = 40
02:08<rp4k>network_chat_box_height = 5
02:08<rp4k>network_chat_timeout = 180
02:08<@Alberth>oh, 2008 i see
02:08<rp4k>these things in settings worked just fine
02:08<@Alberth>likely the patch doesn't apply cleanly
02:09<rp4k>we just wanted something easy for us to use to open chat window to see what we had said
02:09<@Alberth>which means you have to manually merge it into the source code
02:09<rp4k>but pushing ~ also does this i guess
02:09<@Alberth>I typically keep a chat open in another window
02:10<@Alberth>ie another application
02:11<@Alberth> you saw this remark?
02:11<rp4k>what application
02:12<@Alberth>just a regular chat application, whatever you have
02:14<@Alberth>but I have 4 virtual desktops with windows of various applications
02:20-!-andythenorth [] has joined #openttd
02:20-!-andythenorth is "andythenorth" on #openttd
02:21<@Alberth>it looks like you will have to rewrite the entire window code of that patch
02:22<@Alberth>since the window system was rewritten between 2009 and 2011 or so
02:22<@Alberth>hi andy
02:22<andythenorth>seems I msised a lot
02:22<andythenorth>so nml is now xml, right?
02:24<@Alberth>we pondered about xxml, but didn't decide yet
02:25<andythenorth>I wondered about blockchain
02:27<@Alberth>I know the word, and its connection to crypto stuff, but how? no clue
02:27<andythenorth>blockchain is a very important tool
02:27<andythenorth>like XML
02:28<@Alberth>ah, that makes sense
02:28<andythenorth>its main benefit is the ease with which it extracts money from investors
02:28<andythenorth>if we want to modernise openttd, we should probably consider it
02:28<@Alberth>:o I thought bitcoin did that, or am I too late for that?
02:28<andythenorth>oh you can just start your own coin offering
02:28<andythenorth>it's fine
02:29<andythenorth>then people send you BTC or paypal real $
02:29<andythenorth>then you just abscond with it
02:29<@Alberth>sounds good
02:30*andythenorth reading about merkle trees
02:39-!-nielsm [] has joined #openttd
02:39-!-nielsm is "Niels Martin Hansen" on #openttd #tycoon
02:42<andythenorth>moin nielsm
02:45<@Alberth> macro processor thingie
02:45<@Alberth>planetmaker: ^
02:54<andythenorth>Alberth: does that use a new syntax, or the CPP syntax? o_O
02:55<andythenorth>I did read the code first :)
02:55<andythenorth>but not very well
02:55<nielsm>some examples would be nice ;)
02:56<@Alberth>it uses new syntax, the readme explains it, although in a very technical manner
02:57<@planetmaker>it's somewhat new syntax. But close enough IMHO that 99% can be adopted quickly enough
03:00<@Alberth> some random ogfx+airports code adapted for py-xpd
03:00<@planetmaker>rp4k, I suggest to use a client connected to the admin interface to store the ingame chat for longer. Or to open the console of your OpenTTD client
03:00<andythenorth>ok so macros with params
03:01<andythenorth>wonder if I could drop chameleon? o_O
03:01<@Alberth>basically #include -> include; #define -> define ... endmacro and remove the \
03:01<@Alberth>yes, macros with params, like cpp :p
03:01<andythenorth>now it just needs loops, string replacement, and the ability to call arbitrary python :D
03:01<andythenorth>oh and conditionals
03:02*andythenorth is probably not the target audience
03:02<@Alberth>I think that macro processor already exists, it's called 'python'
03:03<@planetmaker>andythenorth, string replacements is basically one application of 'define'
03:03<@Alberth>you may have heard of it :p
03:07<andythenorth>dunno how anyone else writes nml :)
03:07<andythenorth>they all seem to do it without loops
03:08<andythenorth>loops are the most basic concept in programming, or at least the first one I learnt
03:08<andythenorth>10 print [swearwords]
03:08<andythenorth>20 goto 10
03:08<andythenorth>basically the first program
03:08<@Alberth>looping is applying a template 20 times, or 20 includes
03:09<@Alberth>once for every thing
03:09<andythenorth>do(20) {loop}
03:09<andythenorth>I am not trying to persuade you to add them :)
03:09<andythenorth>just talking
03:09<@Alberth>you make one more step, and have the various slight variations all bundled into one template
03:10<@Alberth>so you need to go left or right depending on the variation you generate
03:10<andythenorth>with (vehicle_ids) { template(vehicle_id) }
03:11*andythenorth back to pixels :P
03:11<@Alberth>pixel1(); pixel2(); pixel3(); ... :)
03:11<andythenorth>loops with a single parameter are very bad long term
03:11<andythenorth>and params scale horribly
03:11<@Alberth>there is a sweet spot somewhere in the middle
03:12<andythenorth>much easier to have a data structure in scope, like....a python class :P
03:12<@Alberth>not using templates is bad, trying to squash all complexity into a single template doesn't work either
03:12<andythenorth>the nice thing about using it 20 times
03:12<andythenorth>is there's no separate step to define the vehicle/industry etc
03:13<andythenorth>whereas I have split the configuration step (python files) from the templates (chameleon)
03:13<andythenorth>arguably just calling template_name(parameters) is more direct
03:14<andythenorth>I have a lot more glue in the middle
03:14<andythenorth>Horse sprites: 55% complete
03:14<@Alberth>it's a matter of scaling, you can generate several economies all with the same templates
03:15<@Alberth>and easily edit/change them
03:15<@Alberth>that comes with the cost of clean separation of things
03:15<@Alberth>all new horses?
03:16<@Alberth>or do you re-use old horses too?
03:18<andythenorth>all new pretty much
03:18<andythenorth>everything at least tweaked, or totally redrawn
03:20<andythenorth>Alberth: I forget, did we rewrite nml to use scopes? o_O
03:20*LordAro decides not to go cycling today :(
03:21<@Alberth>not that I am aware of, andy
03:21<andythenorth>I think we'd remember that
03:21<@Alberth>think so too
03:21<@Alberth>no good weather outside LordAro ?
03:22<LordAro>much wet
03:23<@Alberth>:o it's beautifully sunny, but also with some clouds here, looks like a day for a nice walk
03:23<@Alberth>wouldn't you get wet on the inside otherwise?
03:24<LordAro>haha, yes
03:24<LordAro>but there's a point at which you're just having another shower
03:24<LordAro>for 2.5 hours
03:25<@Alberth>hmm, bit long eh?
03:27-!-Progman [] has joined #openttd
03:27-!-Progman is "Peter Henschel" on #openttdcoop #openttd
03:42-!-dvim [] has quit [Quit: WeeChat 2.2]
04:31<@planetmaker>andythenorth, there's no scopes in NML so far. As far as I know / remember
04:32<andythenorth>there aren't :)
04:36<@Alberth>it came up in a discussion once, we both consider it a good idea :)
04:43<andythenorth>the main appeal for me was partial compiles
04:43<andythenorth>there might be other ways to achieve that
04:43<andythenorth>my solutions are often crude
04:43<andythenorth>scopes is a rudimentary way of being able to link at the end
04:47<@Alberth>it's more to avoid so many unique variables
04:48<@Alberth>with the messy bla ## bla glue hacks in cpp
04:49-!-Progman [] has quit [Ping timeout: 480 seconds]
04:55<andythenorth>and less boilerplate declaring IDs
04:56<andythenorth>oh and less time in the compile resolving varaction 2 IDs
04:59<nielsm> hmmmmmm
04:59<@Alberth>I'll make a new station nml :p
05:00<andythenorth>nielsm: not resolving strings for non-default cargos?
05:00*andythenorth pure guessing, no clue
05:00<nielsm>yeah, I have no idea what I'm doing here
05:00<@Alberth>not enough lines was my guess
05:00<andythenorth>nielsm: have you got a test grf?
05:00<nielsm>it's also not using the right cargoes
05:01<nielsm>oh, I know why that is now
05:03<nielsm>broke the cargo translation table with a dumb mistake
05:07<@Alberth>do smart mistakes exist?
05:10-!-chomwitt is "chomwitt" on #debian #debian-games
05:10-!-chomwitt [] has joined #openttd
05:13-!-Alberth [] has left #openttd []
06:03-!-Wormnest [] has joined #openttd
06:03-!-Wormnest is "Wormnest" on #openttd
06:32-!-chomwitt [] has quit [Ping timeout: 480 seconds]
06:36-!-frosch123 [] has joined #openttd
06:36-!-frosch123 is "frosch" on #openttdcoop.devzone #openttd
07:04-!-chomwitt is "chomwitt" on #debian #debian-games
07:04-!-chomwitt [] has joined #openttd
08:17-!-Alberth [] has joined #openttd
08:17-!-Alberth is "purple" on #openttd
08:17-!-mode/#openttd [+o Alberth] by ChanServ
09:05<nielsm>not quite right...
09:08-!-Kippers [] has joined #openttd
09:08-!-Kippers is "ScumbagDog" on #openttd
09:15<andythenorth>not bad though eh
09:15<andythenorth>tells me that I rarely want to use more than 4 :P
09:17<andythenorth>it has one really nice benefit for FIRS though
09:17<nielsm>actual problem seems to be that town houses that should accept more cargoes are not
09:17<andythenorth>I can consolidate the ports to just 1 or 2 types, instead of 3 or 4
09:17<andythenorth>it will make for much more playable maps
09:19<Kippers>How do I generate a new string table? Trying to add the new russian ruble to the game, but I'm unsure how to declare the game options string
09:20<nielsm>the makefile (or visual studio project) automatically does that if you modify english.txt
09:20<@Alberth>usually with strgen, not sure if that program is downloadable
09:20<Kippers>Ok, I'll give it a shot
09:20<nielsm>so step 1 modify english.txt to add new strings, recompile, step 2 use new string constants in code, recompile
09:20<nielsm>and step 3 make translations
09:21<Kippers>Ah, better cut out my code snippet then
09:22<nielsm>well you might get a compile failure the first time
09:22<nielsm>but it shouldn't really hurt to begin using the new strings before strgen'ing them for english base
09:22<nielsm>(just compile once more when the new headers are generated too)
09:25-!-masse [] has quit [Ping timeout: 480 seconds]
09:26<Kippers>By the way, what is the text encoding for OTTD? I'd like to add the cyrillic characters for the ruble while I'm at it
09:27<nielsm>don't expect cyrillinc to show correctly for players using bitmap fonts (the default for english)
09:30<Kippers>So I shouldn't add a cyrillic postfix?
09:30<nielsm>not for the base english no
09:31<nielsm>unless you also add some supplement characters to the base grf files
09:32<Kippers>Welp, "rub" postfix it is
09:34<Kippers>Now that I've added the string constants in the english set, how do I add the translations?
09:34<Kippers>Just a recompile?
09:35<Kippers>Or do I have to manually add the string for every language?
09:35<nielsm>it's okay to leave other translations without the new string
09:35<nielsm>the eints web translator handles that correctly
09:36<Kippers>So I just need to commit after having added the string to the english set, right?
09:37<Kippers>I'll go mess with git then
09:50<@planetmaker>Kippers, translations are entirely handled by the translations system. No translations shall be changed via code commits
09:52<@planetmaker>Only add the new string in default english language file
09:58<Kippers>Good, because that's what I did
09:58<nielsm>ah that looks right:
10:00<nielsm>(confusing, but not wrong)
10:00<nielsm>(need to figure out what the little squares at the bottom are)
10:00<@Alberth>vertical connections aren't entirely centered between the industries, are they?
10:00<Kippers>I also made a pull request with my mediocre git abilities
10:00<@Alberth>maybe they never were, I don't remember :p
10:10-!-Kippers [] has quit [Ping timeout: 480 seconds]
10:27-!-Kippers [] has joined #openttd
10:27-!-Kippers is "ScumbagDog" on #openttd
10:28<@planetmaker>nielsm, increasing the cargo acceptance and production numbers per industry?
10:29<nielsm>planetmaker yep
10:29<@planetmaker><3 :)
10:29<nielsm>"almost working", so only the hard work left
10:29<@planetmaker>hehe. nasty 80:20 rule :)
10:30<nielsm>someone needs to extend NMLC to support the new properties and callbacks
10:30<@planetmaker>for your new cargo capabilities?
10:30<nielsm>and make something more advanced than I can figure out how to hack up in nfo
10:31<@planetmaker>andythenorth, will be your friend for (ab)using all the cargoes you throw at him ;)
10:31<nielsm>I know, he's already drooling :P
10:41-!-sim-al2 [] has quit [Ping timeout: 480 seconds]
10:43<@planetmaker>Kippers, can you explain to me: what's the difference between the rubel and the new rubel? There's a difference in the conversion to the game currency... but actually different to what I'd expect (things get more expensive instead of cheaper, while in reality 3 zeroes got cut off)
10:50<andythenorth>is nml in openttd github yet? o_O
10:52<@planetmaker>didn't seem so
10:52<andythenorth>it looked close though
10:57<Kippers>planetmaker, I looked up the conversion factor for GBP to RUB, and used that in the exchange rate. I just assumed that was how it was supposed to work. Did I mess it up?
11:00<@planetmaker>no, that's how it works... though iirc usually the conversion at 1950 is used - which arguably is difficult - and is of limited value as exchange rates may vary wildly as time progresses
11:01<@planetmaker>I rather wonder whether it shouldn't work like the Euro: the RUR is transformed to the RUB at the given date
11:02<Kippers>I didn't mess with converting old ruble to new ruble at a certain date, though I wondered if I should
11:02<Kippers>Maybe that's the next thing I'll get my hands dirty with
11:02<Kippers>Seems like a decent beginner issue
11:03<@planetmaker>was the RUR the currency used in the Soviet union, too? How did it go with the currencies of the other former Soviet states?
11:03<Kippers>IIRC they used the SUR
11:04<Kippers>Dunno about the rest of the eastern bloc
11:07<@planetmaker>they had their own currencies - if they were not part of the SU.
11:08<Kippers>So Yugoslavia and the like
11:08<Kippers>Though they were never really soviet to begin with
11:09<@planetmaker>wiki suggests that for Russia there was no new currency when the SU fell apart. Just differently-looking bills and coins, but no reform with different exchange rates or so
11:10<Kippers>Maybe they used potato as currency
11:11<Kippers>Anyway, should I update the old ruble conversion value to match a more modern value, or is it irrelevant?
11:11<@planetmaker>Using Rubel is older than the potatoe is known in Europe ;)
11:11<Kippers>Before then, it was merely a slavic dream
11:11<frosch123>Kippers: some newgrf try to assign the historical prices to vehicle
11:12<frosch123>changing currency conversions has no effect other than upsetting those people :)
11:12<Kippers>Fair enough
11:12<Kippers>I'll not mess with it then
11:15<@Alberth>0 * 4 165.000000 19.000000 0.000000 0.000000 haha, nice sprites :p
11:16<frosch123>i think you overdid it with the floating spec
11:17<+michi_cc>Ladies and Gentlemen, please have a close look at (where's our announce bot, TB? :p)
11:27<nielsm>frosch123: so if following your idea, you'd add a flag on the industry that indicates "all tiles accepts all input cargo types", which is tested in the IndustryTileAccepts function, and if set all cargos from the industry are automatically added
11:27<nielsm>then you can keep using prop 0A 0B 0C on industry tiles to add extra accpted cargos for some tiles
11:28<nielsm>and maybe extend those properties so the acceptance amount is taken as a signed value (when the "all tiles accept everything" flag is set) so you can instead subtract acceptance from some tiles
11:28<nielsm>and not add any more properties or callbacks on industry tiles at all?
11:29<frosch123>i meant a flag for the tile, not for the industry
11:29<frosch123>all other options are left open
11:31<frosch123>one could also add an optional property like the new industry property 25 to list all accepted cargos of a cargo, which would still duplicate thoe from the industry...
11:32<frosch123>anyway, my concern is mainly about the tile callbacks. they multiply the cpu resources by the number of tiles of an industry (so like 20x-40x) without adding any functionality)
11:32<nielsm>I did add industry tile prop 13 which lists all accepted properties for the tile
11:33<nielsm>in variable length format
11:33<frosch123>yes, something like that
11:33<nielsm>my test nfo
11:34<frosch123>i hope you did not count the bytes manually :)
11:34<nielsm>approximated and let grfcodec do that :)
11:35<frosch123>usually peoply just write "-1 * -1"
11:35<nielsm>I can't find anything about a syntax that lets it calculate lengths for me
11:35<frosch123>nfo syntax is a bit of a mess :p those values are just ignored
11:35<frosch123>just like the "do not modify" :p
11:49<nielsm>a slightly improved nfo format with macros, but nothing as "understanding" as nml, could be useful
11:50<frosch123>m4nfo :p
12:18<@peter1138>Nobody understands m4.
12:19<@Alberth>it's not that difficult, just lots of quotes :p
12:20<frosch123>they thought lisp is hard to read because of all the ( ), so they used ` ´ instead
12:23<@Alberth>something like that :)
12:24<@Alberth>could use tcl, also has lots of quotes, since everything is a string
12:25<frosch123>i think it has way more \ than quotes
12:26<frosch123>they say, c beginners randomly add * and & until it compiles
12:26<frosch123>when i use tcl, i usually have to incrementally add more \
12:26<@Alberth>oh, didn't use tcl for long, basically until I found Python 1.5.2 :p
12:28<frosch123>what was the main change for python1 -> 2?
12:32<frosch123>hmm... i thought unicode is one of the main features of python3 (strings vs bytes)... but it is also listed for python 2 vs 1 :p
12:32<nielsm>python3 made unicode the default
12:33<nielsm>python2 might have made it possible
12:39<@Alberth>from what I remember, the main change was a better class system
12:41<@Alberth>python3 has the string/bytes distinction enforced, you have to go through a codec from external to internal and vice versa
12:41<frosch123>i expected you to say "list comprehension"
12:41<@Alberth>python2 had unicode, but it was all string
12:42<@Alberth>in that case, generators :)
12:43<@Alberth>where values are computed on the fly, at the moment they are needed
12:44<@Alberth>so no large intermediate lists that are passed around between functions, but a generator object
12:44<@Alberth>ie "yield" statement
12:47<@Alberth>list comprehension wasn't new to me, I already encountered it in a functional programming language :)
12:48<frosch123> <- most irritating is the text on sourceforge
12:48<@Alberth>I also already implemented list comprehensions in a language as graduation project :)
12:54<@Alberth>back then, sourceforge was useful :)
14:17<nielsm>hmm... what the little stubs look like if I revert the change that makes the industry chain window small again:
14:18<nielsm>rather interesting they bottom align
14:18<@Alberth>you can analyze the max number of connections
14:19<@Alberth>what if you made the lines smaller?
14:20<nielsm>that's the other option, just scaling them down
14:20<nielsm>but you still want them large enough to hit with a mouse (or a fat finger groping the screen)
14:20<@Alberth>I made them this big as it looks good, and you can easily click them, but if you make the name clickable instead or so
14:21<@Alberth>or some rectangle somewhere
14:21<@Alberth>hmm, a row at the bottom?
14:21<@Alberth>non-scrolled :p
14:21<@Alberth>you have at most 32 cargoes
14:26<frosch123>64 :)
14:27<frosch123>i wonder when people will request more palette colors
14:28<nielsm>here's another solution failure I tried:
14:29<nielsm>there's at most 16 connected bars of cargo in each "connection column", and each edge of an industry has at most 16 connections
14:29<nielsm>but there could be up to all 64 different cargoes represented on a single display of this, via the stubs
14:30<nielsm>it needs to place the stubs in the empty slots on each industry, starting from the top
14:36-!-keoz [~keikoz@2a01:e35:2fd5:51e0:d790:795d:2cc7:b53d] has quit [Ping timeout: 480 seconds]
14:52-!-Supercheese [] has joined #openttd
14:52-!-Supercheese is "Supercheese" on #openttd
15:06<@Alberth>click on the industry, and the row display the industry input/output?
15:07<nielsm>"don't draw non-participating cargoes" is also a potential solution :P
15:08<@Alberth>you can click them to change cargo you display currently :p
15:10<frosch123>is there some way to blame the grf? :p
15:13<nielsm>don't think so, the cargo order gets shuffled around during the graph construction!
15:14<andythenorth>I am not convinced we need the stubgs
15:14<andythenorth>stubs *
15:14<andythenorth>they're nice, but I didn't realise what they did until I read ^^^^
15:16<@Alberth>functionality hidden in plain sight :p
15:17<@Alberth>I agree it could use a hover text
15:22<@Alberth>nice picture
15:26<@planetmaker>is it picture time? :D
15:27<nielsm>is there ever a time on the internet where it's inappropriate to post pictures of animals?
15:27<nielsm>(especially pets)
15:28<@planetmaker>probably :)
15:28-!-keoz [~keikoz@2a01:e35:2fd5:51e0:d790:795d:2cc7:b53d] has joined #openttd
15:28-!-keoz is "Grmph" on #openttd
16:12-!-glx [] has joined #openttd
16:12-!-mode/#openttd [+v glx] by ChanServ
16:12-!-glx is "Loïc GUILLOUX" on +#openttd
16:16-!-Alberth [] has left #openttd []
16:23-!-Kippers [] has quit [Ping timeout: 480 seconds]
16:32-!-sim-al2 [] has joined #openttd
16:32-!-sim-al2 is "sim-al2" on #openttd
16:37-!-Kippers [] has joined #openttd
16:37-!-Kippers is "ScumbagDog" on #openttd
16:59-!-frosch123 [] has quit [Quit: be yourself, except: if you have the opportunity to be a unicorn, then be a unicorn]
17:10-!-Kippers [] has quit []
17:10-!-Supercheese [] has quit [Read error: Connection reset by peer]
17:11-!-Supercheese [] has joined #openttd
17:11-!-Supercheese is "Supercheese" on #openttd
17:26-!-andythenorth [] has left #openttd []
18:08-!-Wormnest [] has quit [Quit: Leaving]
18:32-!-nielsm [] has quit [Ping timeout: 480 seconds]
19:51-!-chomwitt [] has quit [Ping timeout: 480 seconds]
20:49-!-keoz [~keikoz@2a01:e35:2fd5:51e0:d790:795d:2cc7:b53d] has quit [Ping timeout: 480 seconds]
21:40-!-Supercheese [] has quit [Read error: Connection reset by peer]
21:41-!-Supercheese [] has joined #openttd
21:41-!-Supercheese is "Supercheese" on #openttd
22:13-!-cHawk [] has quit [Quit: Leaving]
23:18-!-glx [] has quit [Quit: Bye]
23:42-!-haudrauf [] has quit [Ping timeout: 480 seconds]
23:43-!-haudrauf [] has joined #openttd
23:43-!-haudrauf is "Haudrauf" on #openttd #frickelplatz #cryptoparty
---Logclosed Mon Jul 30 00:00:55 2018