IRC logs for #openttd on OFTC at 2021-07-25
            
00:00:54 *** Progman has quit IRC (Remote host closed the connection)
01:17:26 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
01:29:46 *** Wormnest has quit IRC (Quit: Leaving)
02:25:07 *** D-HUND has joined #openttd
02:28:30 *** debdog has quit IRC (Ping timeout: 480 seconds)
02:30:50 *** glx has quit IRC ()
03:49:26 *** tokai has joined #openttd
03:49:26 *** ChanServ sets mode: +v tokai
03:56:31 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
05:56:40 *** tokai|noir has joined #openttd
05:56:40 *** ChanServ sets mode: +v tokai|noir
06:03:40 *** tokai has quit IRC (Ping timeout: 480 seconds)
06:05:01 *** Flygon has joined #openttd
06:29:53 *** andythenorth has joined #openttd
06:30:01 *** Progman has joined #openttd
06:31:26 *** Wuzzy has joined #openttd
06:55:28 *** sla_ro|master has joined #openttd
06:59:56 *** andythenorth has quit IRC (Quit: andythenorth)
07:05:47 *** andythenorth has joined #openttd
07:22:29 *** tokai has joined #openttd
07:22:29 *** ChanServ sets mode: +v tokai
07:29:30 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
07:29:31 <DorpsGek> [OpenTTD/OpenTTD] fsimonis commented on pull request #9417: CodeChange: Improve LineCache queries https://git.io/J4YfL
07:31:18 <andythenorth> yo
07:35:13 *** andythenorth has quit IRC (Quit: andythenorth)
07:37:32 *** andythenorth has joined #openttd
08:43:47 *** WormnestAndroid has quit IRC (Remote host closed the connection)
08:44:00 *** WormnestAndroid has joined #openttd
08:54:10 *** marieke has joined #openttd
08:54:15 <marieke> hi
08:54:19 <marieke> i need some help
08:54:25 <marieke> i couldn't find anything online
08:54:31 <marieke> my mouse isn't working
08:54:34 <marieke> clicking does nothing
08:54:54 <marieke> on linux
09:00:24 <marieke> nvm reinstalling it fixed it
09:00:30 *** marieke has quit IRC (Quit: Leaving)
09:08:43 *** nielsm has joined #openttd
09:18:40 *** iSoSyS has joined #openttd
09:38:45 *** Westie has quit IRC (Ping timeout: 480 seconds)
09:40:00 *** Westie has joined #openttd
09:42:35 <andythenorth> it's oh so....quiet
09:43:14 *** Samu has joined #openttd
09:45:43 *** iSoSyS has quit IRC ()
09:48:05 *** Westie has quit IRC (Ping timeout: 480 seconds)
09:49:16 *** Westie has joined #openttd
10:23:40 *** HerzogDeXtEr has joined #openttd
11:55:29 *** jottyfan has joined #openttd
12:22:15 *** rockstable has quit IRC (Quit: Page closed)
12:24:32 *** glx has joined #openttd
12:24:32 *** ChanServ sets mode: +v glx
12:33:13 *** tokai|noir has joined #openttd
12:33:13 *** ChanServ sets mode: +v tokai|noir
12:40:11 *** tokai has quit IRC (Ping timeout: 480 seconds)
12:41:33 *** gelignite has joined #openttd
13:29:49 *** roadt__ has joined #openttd
13:36:45 *** roadt_ has quit IRC (Ping timeout: 480 seconds)
14:17:09 *** Gustavo6046_ has joined #openttd
14:17:30 *** Gustavo6046 has quit IRC (Quit: ZNC 1.8.2 - https://znc.in)
14:17:31 *** Gustavo6046_ is now known as Gustavo6046
14:47:21 <andythenorth> permanent primary production changes...
14:47:32 <andythenorth> default game does 100%, 200%, 400%, 800%
14:47:43 <andythenorth> 400% -> 800% is really quite insanely high
14:51:32 <andythenorth> hmm
14:51:44 <andythenorth> "Set the production level to the value in bits 16 .. 23 of register 0x100."
14:51:56 <andythenorth> I thought that would be STORE_TEMP(new_value >> 8, 256)
14:51:59 <andythenorth> seems not
14:55:28 <andythenorth> probably because 8 isn't 16
14:56:38 <andythenorth> nope still doesn't work
14:56:43 <andythenorth> oof
14:57:18 <TrueBrain> bits 16 .. 23 are "value << 16"
14:57:51 *** Westie has quit IRC (Read error: Connection reset by peer)
14:57:55 <TrueBrain> not sure why you are right-shifting .. that makes the value smaller ;)
14:58:13 <TrueBrain> (it removes bits)
14:58:30 <TrueBrain> never thought about it, but I guess it is weird that bits are RTL, not LTR :)
14:58:55 <andythenorth> such things
14:58:56 <TrueBrain> b1000 == 8, b1000 >> 1 == b0100 == 4
14:59:11 <andythenorth> we could just abstract all this crap in nml
14:59:25 <TrueBrain> you know my opinion about that :)
14:59:28 <andythenorth> we / me / my cat or dog
14:59:55 <andythenorth> oof I need to write also to bits 0..15
15:00:04 <andythenorth> I guess I have to AND with mask or something?
15:00:43 <TrueBrain> v1 == the value for bits 0..15, v2 == the value for bit 16..23: v1 & (v2 << 16)
15:00:46 <andythenorth> or can I just && after the shift?
15:00:51 <andythenorth> hmm
15:00:51 <andythenorth> ok
15:00:56 <TrueBrain> not &&, that is a logic operator
15:00:59 <TrueBrain> you want a bitwise operator
15:01:09 <andythenorth> hurrah
15:01:17 <andythenorth> this is actually easier in nfo
15:01:22 <andythenorth> because it's documented
15:01:29 <andythenorth> in a way idiots can read
15:01:55 <TrueBrain> NML assumes you know what bitwise operations are, I would guess
15:02:15 <andythenorth> kinda the opposite of a good assumption :)
15:02:29 <TrueBrain> it is also not that common to understand it if you are not a programmer
15:04:17 <TrueBrain> hell, even a lot of programmers won't know how to deal with it :D
15:04:21 <TrueBrain> but can't NFO abstract from there?
15:04:22 <TrueBrain> euh
15:04:23 <TrueBrain> NML
15:04:44 <andythenorth> probably can
15:04:45 *** sla_ro|master has quit IRC ()
15:04:57 <andythenorth> I could write a procedure for myself to handle this and never see it again
15:05:01 <andythenorth> or do it in the compile
15:05:08 <andythenorth> so many ways to avoid being good at it :P
15:08:22 <FLHerne> Does NML really not abstract that?
15:08:41 <FLHerne> It has all these stupid abstractions for things that don't need abstracting
15:08:53 <andythenorth> hmm
15:08:57 <andythenorth> STORE_TEMP(string(STR_PROD_CHANGE_TEST) & (128 << 16), 256)
15:09:25 <andythenorth> seems not to work, neither the string nor the industry production level (128) are correct
15:09:41 <andythenorth> do I need to mask any bits?
15:09:53 <TrueBrain> assuming string() returns a 16-bit value, that should be fine
15:10:07 <TrueBrain> but I don't know NML, so there might be some language specific thing I am not aware of :D
15:10:26 <andythenorth> FLHerne nothing documented here https://newgrf-specs.tt-wiki.net/wiki/NML:Industries#Production_change_callback_results
15:10:35 <andythenorth> Set the production level to the value in bits 16 .. 23 of register 0x100.
15:10:39 <andythenorth> Setting bit 8 replaces the news message with a custom message, read from register 0x100 bits 0 .. 15.
15:10:45 <andythenorth> (bit 8 is set)
15:11:06 <TrueBrain> owh, sorry
15:11:07 <TrueBrain> I am an idiot
15:11:09 <TrueBrain> & -> |
15:11:41 <andythenorth> ok :)
15:11:49 <glx> TrueBrain: NFO only knows & and | and nml uses that for && and || ;)
15:12:35 <andythenorth> now we're sucking diesel :D
15:12:36 <andythenorth> works
15:12:41 <TrueBrain> \o/
15:13:31 <glx> isn't there some nml magic with strings ?
15:14:11 <andythenorth> oh lol, now I have to do some integer maths
15:14:13 <andythenorth> " Floating-point operations are only possible when both operands are compile-time constants."
15:14:14 <andythenorth> GG
15:14:23 <andythenorth> we could abstract that away too :P
15:15:14 * andythenorth such l33t haxor
15:15:14 <andythenorth> production_level + (production_level / 2)
15:15:26 <andythenorth> instead of
15:15:29 <andythenorth> production_level * 1.5
15:15:41 <andythenorth> this is how real programmers get through the day, yes?
15:15:57 <glx> you need to work around nfo limitations :)
15:16:12 <andythenorth> it's nice that /2 isn't a floating point
15:16:19 <andythenorth> "isn't"
15:16:57 <glx> well /2 is usually >>1
15:17:36 <glx> so valid int :)
15:17:55 <glx> but 1/2 is 0 :)
15:18:52 <TrueBrain> andythenorth: * 1.5 is unclear if it should round up or down, where (a + a / 2) is rounding down
15:19:19 <andythenorth> throw away remainders
15:19:32 <TrueBrain> not saying it makes sense, but that is why it is different :)
15:20:38 <TrueBrain> in Python3, / is always float, // is always int
15:20:43 <TrueBrain> that is pretty helpful :D
15:21:51 <glx> I don't know why nml allows float, nfo wants int in the output
15:22:39 <andythenorth> I guess it has some rule for the constants that allow floats?
15:22:42 <glx> so float is valid only for compile time calculations
15:24:15 * andythenorth testing random things
15:24:21 <andythenorth> testing random things is the worst :)
15:24:45 <glx> oh no, you'll find new bugs
15:25:27 <glx> feeding the compiler with weird input may trigger things
15:25:52 <andythenorth> nah random in game :)
15:25:55 <glx> like your empty array the other time
15:25:57 <andythenorth> industry production change
15:34:34 *** tokai has joined #openttd
15:34:34 *** ChanServ sets mode: +v tokai
15:36:11 <andythenorth> maybe I should uncap ffwd speed for this :P
15:38:49 *** Wormnest has joined #openttd
15:40:54 <andythenorth> ok now we need to discuss 'nice looking production levels'
15:41:16 <andythenorth> 100% -> 200% -> 400% -> 800% gets silly
15:41:26 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
15:42:10 <andythenorth> 100% -> 150% -> 225% -> 337% -> 506% starts out ok, then looks a bit odd
15:45:34 <andythenorth> multiplier of 1.6 seems to work
16:00:43 *** supermop_Home has joined #openttd
16:06:07 *** andythenorth has quit IRC (Quit: andythenorth)
16:07:44 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
16:10:58 *** jottyfan has quit IRC (Quit: jottyfan)
17:04:28 *** tokai|noir has joined #openttd
17:04:28 *** ChanServ sets mode: +v tokai|noir
17:11:21 *** tokai has quit IRC (Ping timeout: 480 seconds)
17:13:58 *** andythenorth has joined #openttd
17:16:39 *** tokai has joined #openttd
17:16:39 *** ChanServ sets mode: +v tokai
17:23:40 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
17:51:05 *** esselfe has quit IRC (Ping timeout: 480 seconds)
18:02:50 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
18:19:25 <TrueBrain> for no real reason reading how GRFs are stored on disk .. so there is a compression bit, but it is unused :D
18:19:45 <TrueBrain> now I wonder what the idea was :)
18:22:38 *** sla_ro|master has joined #openttd
18:50:56 <DorpsGek> [OpenTTD/OpenTTD] DorpsGek pushed 1 commits to master https://git.io/J4uFQ
18:50:57 <DorpsGek> - Update: Translations from eints (by translators)
18:52:18 <TrueBrain> I also wonder what is up with this first psuedosprite that is always ignored
19:05:18 <Rubidium> that's the number of sprite that the "user" needs to set correctly
19:05:56 <Rubidium> first you could use nforenum to get that done, but if you didn't...
19:07:08 <TrueBrain> I did not understand 1 bit about what you said
19:07:24 <TrueBrain> expect for the seemly "suggestion" I should be using some tool to understand why OpenTTD skips that pseudosprite :P
19:08:49 <Rubidium> and there's a pseudo sprite at the end denoting 'end of file', so having a could of sprites at the begin is not even needed
19:09:44 <TrueBrain> wuth? :P
19:09:48 <TrueBrain> "having a could of sprites"?
19:09:48 <Rubidium> so, there is no use for OpenTTD to read it as it might be wrong and the information can be deduced in a much safer manner (i.e. looking at the 'end of file' pseudo sprite)
19:09:55 <Rubidium> s/could/count/
19:10:27 <TrueBrain> wow, that was some cryptic text you threw at me :P
19:11:30 <Rubidium> yeah, reading it back my mind was going way faster than my fingers
19:12:55 <TrueBrain> but okay, what you tried to say is: the first pseudo-sprite indicates how many sprites are in the file, right?
19:13:53 <Rubidium> well... that's what the specification says
19:14:16 <TrueBrain> do you happen to have a link to that part of the specs?
19:14:17 <Rubidium> in reality it might often not be the case depending on the tools you are (not) using to make the GRF
19:14:23 <TrueBrain> searching for it didn't really result in a useful page :P
19:14:37 <TrueBrain> (so instead I was just reading our source code, as that was surprisingly easier :P)
19:16:14 <Rubidium> https://www.tt-wiki.net/wiki/The_First_Vehicle#Add_the_special_first_pseudosprite
19:16:29 <TrueBrain> wow ....... yeah, no surprise I did not find it :P
19:16:30 <TrueBrain> tnx!
19:16:44 <andythenorth> TrueBrain isn't it obvious? :)
19:16:51 <andythenorth> I mean...the computer can't count the bytes
19:17:00 <andythenorth> and deduce the sprites from them
19:17:04 <andythenorth> the author must do that!
19:17:27 * andythenorth "must not troll"
19:17:29 <TrueBrain> it is not unusual to do things like that :)
19:17:35 <TrueBrain> similar that every sprite has a length indicator
19:17:48 <TrueBrain> has nothing to do with the author .. this is the raw format :)
19:18:18 <TrueBrain> which possibly is the biggest issue with NFO, it is "kinda" the byte-representation of the GRF itself :)
19:18:52 <TrueBrain> just with a TINY bit more context ;)
19:19:23 <Rubidium> yeah, NFO's practically asm with GRF being machine code
19:19:41 <TrueBrain> just asm does some useful stuff :P NFO seems to .. not :)
19:20:14 <TrueBrain> mostly the specs-wiki are a bit hard to read, as the distinction is in the details
19:22:11 <Rubidium> NFO can do some useful stuff too... https://newgrf-specs.tt-wiki.net/wiki/GRFActionsDetailed#Escape_sequences is about all of that though ;)
19:23:11 <TrueBrain> this was mostly where I noticed a difference between NFO and GRF bytes
19:23:23 <TrueBrain> which made me realise this small but important difference :P
19:23:47 <TrueBrain> mostly it took me a bit of time to realise the info version is tight to NFO
19:23:49 <TrueBrain> not to GRF
19:24:20 <Rubidium> oh... I think you missed a page ;)
19:24:36 <Rubidium> https://newgrf-specs.tt-wiki.net/wiki/Version_numbers
19:24:48 <Rubidium> there are 3 types of versions...
19:24:54 <TrueBrain> .... okay ....
19:25:03 <TrueBrain> so "Info version" is just confusing
19:25:05 <TrueBrain> gotcha
19:25:13 <LordAro> TrueBrain: you brought this on yourself :p
19:25:17 <TrueBrain> yup
19:25:22 <TrueBrain> and I am not even mad :)
19:25:27 <TrueBrain> and tnx Rubidium !
19:25:56 <TrueBrain> "Each property byte is followed by <num-info> new-info sections."
19:26:09 <TrueBrain> that is a very vague and unclear reference .. lol .. lets look in the source what it means :D
19:26:59 <andythenorth> controversial
19:27:05 <andythenorth> I maintain that 'guessing' is best
19:27:46 <TrueBrain> I did, twice .. both seems to be wrong :D
19:29:59 * Rubidium wonders whether the specs are deliberately obtuse ;)
19:30:13 * andythenorth can't believe how much difference cleaning the cooling system has made to this mac
19:30:17 <andythenorth> it's insane
19:30:26 <andythenorth> and also totally logical :P
19:32:32 <TrueBrain> okay ... so what the specs don't mention, is that it does index++ for each prop
19:32:35 <TrueBrain> and you only have to repeat the values
19:32:45 <TrueBrain> well, it tries to say that
19:32:49 <TrueBrain> but not in a way I could parse :)
19:32:50 <glx> TrueBrain: very often it's easier to understand grf spec by looking at openttd source (which is weird)
19:32:56 <TrueBrain> yup
19:33:55 <TrueBrain> just a lot of ambiguous language; which is fine, as once you know you know :)
19:34:15 <glx> very dependant on who wrote the wiki page
19:35:12 <glx> sometimes a very important bit of the spec is hidden in an example only
19:35:37 <TrueBrain> like: what is this first pseudo-sprite? :D
19:38:17 <Rubidium> pointless ;)
19:39:50 <TrueBrain> Installed version: 1.53.0 (2021-06-17)
19:39:50 <TrueBrain> Minimum required: 1.33.0-nightly (2019-01-13)
19:39:55 <TrueBrain> sometimes, rust can be a bit annoying :D
19:40:04 *** HerzogDeXtEr has joined #openttd
19:40:04 <TrueBrain> (the "nightly" part is important)
19:43:28 <glx> so 53 is lower than 33 because missing -nighlty ?
19:43:54 <TrueBrain> yes
19:43:58 <glx> silly
19:44:25 <LordAro> nightly enables experimental things
19:44:42 <TrueBrain> yup
19:44:53 <TrueBrain> and it totally makes sense .. just the reporting is funny
19:45:00 <glx> but you expect them to be in stable 2,5 years after
19:45:01 <TrueBrain> also a "once you know, you know" thingy :)
19:45:18 <TrueBrain> in fact, in this case I think it is a feature that got removed in the end :P
19:45:35 <TrueBrain> but the cargo I was using was a bit old too
19:46:16 *** gelignite has quit IRC (Quit: Stay safe!)
20:56:45 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:11:28 *** sla_ro|master has quit IRC ()
21:12:36 *** Samu has quit IRC (Quit: Leaving)
21:14:26 <TrueBrain> lol, I did something silly: https://cdn.discordapp.com/attachments/337701432230805505/868963211658031135/unknown.png
21:21:00 <andythenorth> TrueBrain buttons aren't working?
21:21:02 <andythenorth> I tried to click
21:21:08 <TrueBrain> stupid image
21:23:11 <andythenorth> I thought the internet was just clickable pictures?
21:31:56 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
21:46:28 <glx> yup that's silly
21:47:19 <glx> because you didn't read station specs yet ;)
21:51:25 <_dp_> I had a silly idea to make a website where one could upload a picture of stuff on a cardboard square, mark the square and it will make a newgrf object
21:51:42 <_dp_> but kinda feel like there are enough silly newgrfs as it is :/
21:54:14 <TrueBrain> glx: as in, that would make any person ragequit? :P
21:57:19 <TrueBrain> glx: anything in particular that makes you mention it?
21:57:48 <glx> well it's kinda complexe action 0
21:58:45 <glx> but action 0 is the easy part in newgrf
22:07:17 <TrueBrain> best part is I can make this into a SaaS and ask money \o/ :P :P :P
22:09:15 <andythenorth> 'lol stations'
22:09:16 <andythenorth> is all
22:11:59 *** andythenorth has quit IRC (Quit: andythenorth)
22:13:40 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
22:14:24 *** WormnestAndroid has joined #openttd
22:34:45 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
22:34:51 *** WormnestAndroid has joined #openttd
23:05:00 *** Progman has quit IRC (Remote host closed the connection)