Times are UTC Toggle Colours
00:54:17 *** APTX has quit IRC 00:57:01 *** APTX has joined #openttd 01:02:54 *** tokai has joined #openttd 01:02:54 *** ChanServ sets mode: +v tokai 01:09:45 *** tokai|noir has quit IRC 01:45:00 *** Wormnest has quit IRC 02:06:35 *** glx has quit IRC 02:23:00 *** D-HUND has joined #openttd 02:26:21 *** debdog has quit IRC 03:24:35 *** snail_UES_ has joined #openttd 03:57:29 *** snail_UES_ has quit IRC 04:46:45 *** tokai|noir has joined #openttd 04:46:45 *** ChanServ sets mode: +v tokai|noir 04:53:36 *** tokai has quit IRC 04:57:41 *** tokai|noir has quit IRC 05:11:25 *** Flygon has joined #openttd 06:04:46 *** sla_ro|master has joined #openttd 06:10:14 *** EER has quit IRC 07:24:31 *** andythenorth has joined #openttd 07:36:41 *** nielsm has joined #openttd 07:38:38 *** Strom has quit IRC 07:40:15 *** Strom has joined #openttd 09:01:30 <TrueBrain> https://truebrain.github.io/TrueGRF/ <- a bit smoother experience now .. and you can change the name of the NewGRF :D Hihi :) 09:04:36 <DorpsGek> [OpenTTD/OpenTTD] ecolortest opened issue #9458: [Bug]: desync after joining server https://git.io/J4Sll 09:07:22 <LordAro> TrueBrain: oh dear. 09:07:58 <TrueBrain> you don't like? :P 09:08:06 *** andythenorth_ has joined #openttd 09:11:24 *** WormnestAndroid has quit IRC 09:11:37 *** WormnestAndroid has joined #openttd 09:14:46 *** andythenorth has quit IRC 09:20:09 *** andythenorth has joined #openttd 09:26:21 *** andythenorth_ has quit IRC 09:26:21 <TrueBrain> lol .. "industry type override" doesn't work for the name, it seems .. LAME 09:33:31 <andythenorth> these are the things 09:33:44 <andythenorth> setting the string doesn't change it? 09:36:06 <TrueBrain> need to experiment a bit more :) 09:36:36 <TrueBrain> and am I right to assume that index 0 can refer to either your new industry, or the original industries, depending on the action and even the settings therein? 09:41:13 <TrueBrain> funny, if you change the name of the NewGRF, it is not updated ingame until you remove and add the GRF :P 09:41:19 <TrueBrain> guess that is also not a really common scenario :D 09:50:08 <TrueBrain> I just love how good you have to read every part of the spec .. this sentence is funny: 09:50:10 <TrueBrain> In either scheme, you can use the value 7F or FF, respectively, to define strings shown for languages that you do not provide translation for. First set all strings to a default value using this, and later override the language specific ones if they exist. 09:50:23 <TrueBrain> it is written as a suggestion, but really, it is not :P 09:50:42 <peter1138> NewGRF is horrible. 09:50:51 <peter1138> When goes it throw out, etc, etc... 09:51:00 *** iSoSyS has joined #openttd 09:53:02 <TrueBrain> not sure NewGRF is horrible; just the specs makes me read real good :D 09:55:56 <TrueBrain> https://github.com/OpenTTD/OpenTTD/blob/master/src/newgrf.cpp#L567 <- hihihihi :) 10:04:05 <TrueBrain> how ever I slice it, I cannot use 09 to overwrite an industry name .. so copy/disable it is! 10:05:15 <peter1138> You're not meant to read the specs, just entered random hex numbers and see what happens... 10:06:47 <TrueBrain> AFL the fuck out of it :D 10:08:53 <LordAro> :D 10:09:28 <LordAro> it would hit a *lot* of NOT_REACHED blocks, is my prediction 10:09:41 <TrueBrain> how to validate if it created what the user entered 10:09:43 <TrueBrain> now that is the question :) 10:16:37 <TrueBrain> https://truebrain.github.io/TrueGRF/ <- w00p, renaming of industries works :P 10:16:40 <TrueBrain> that was interesting 10:18:16 <TrueBrain> funny how smooth that works .. press green button, load NewGRF, start new game, open Fund Industry, rename "Power Station" into something else .. hit the green button, and BAM, it is in-game 10:20:48 <TrueBrain> now I wonder how to do layouts .. 10:27:19 *** Samu has joined #openttd 10:32:15 <peter1138> You are mad. 10:47:25 <andythenorth> not yet 10:47:30 <andythenorth> but the signs are emerging :) 11:11:54 <LordAro> TrueBrain: did you get rid of the requirements.txt vs pip freeze check? 11:11:56 <LordAro> i can't seem to find it 11:12:48 <LordAro> ah, dockerfile 11:12:56 <LordAro> carry on 11:56:46 <TrueBrain> :D 11:57:18 <TrueBrain> Copy/pasting GPL code? :p :p 12:07:03 <andythenorth> Element got another m, maybe they fix ease of use and I can avoid getting Slack 12:11:10 <LordAro> TrueBrain: just confirming i was doing the right thing :p 12:11:34 <TrueBrain> LordAro: :D 12:11:44 <TrueBrain> if you like, I can license you to use those lines of code, no problem :P 12:12:26 <LordAro> TrueBrain: but since you're here... how would you fit a windows-only package into the whole requirements.base/requirements.txt structure? (i.e. """pywin32; sys_platform == 'win32'""") - only solutions i can think of are either duplicating requirements.txt or doing some hackery with sed 12:13:03 <TrueBrain> in setup.py you can solve that 12:13:06 <TrueBrain> but that is ofc not pinned 12:13:28 <LordAro> mm, pinning is required (build reproducibility, etc) 12:13:37 <TrueBrain> yeah, which is a good thing 12:13:43 <TrueBrain> hmm, it is an interesting problem 12:13:55 <LordAro> (we're so serious about that here that we have a caching server in front of pypi) 12:14:13 <TrueBrain> good 12:14:18 <TrueBrain> I do the same on my jobs :) 12:14:38 <TrueBrain> what you can do, is have a requirements.base/txt, and a requirements-win.base/.txt 12:14:44 <TrueBrain> in the latter, you do "-r requirements.txt" 12:14:52 <TrueBrain> that way at least you do not have duplication 12:15:50 <TrueBrain> hmm, did PEP 508 land? 12:16:33 <LordAro> mm, that could work 12:16:49 <LordAro> maybe 12:16:53 <TrueBrain> PEP 508 supports 'sys_platform == "linux"' etc in requirements files 12:16:59 <TrueBrain> but I do not think "pip freeze" outputs them again 12:17:06 <TrueBrain> so validating correctness becomes tricky :) 12:17:20 <LordAro> the thing i'm trying to avoid is one requirements.txt file being updated and the other getting forgotten 12:18:27 <TrueBrain> doing that is easy, but doing that while keeping the check OpenTTD has in Dockerfile .. not so much :P 12:18:43 <LordAro> mm 12:19:09 <TrueBrain> no, sorry, no suggestions there .. bit of a pita :) 12:28:32 <TrueBrain> once again I forgot to read the smaller print: "The layout consists of a list of the above tile definitions, terminated by two bytes: 0,80h " :P 12:29:28 <andythenorth> always read the smaller print :P 12:31:55 *** glx has joined #openttd 12:31:55 *** ChanServ sets mode: +v glx 12:34:09 <TrueBrain> Clearly :p 12:35:32 <glx> isn't there 3 different ways (at least) for requirements in python ? 12:59:38 *** snail_UES_ has joined #openttd 13:20:37 *** roadt_ has joined #openttd 13:20:37 *** roadt__ has quit IRC 13:36:56 <TrueBrain> https://truebrain.github.io/TrueGRF/ <- okay, changing industry layout works .. funny :) 13:37:04 <andythenorth> :D 13:37:05 <TrueBrain> guess next is to make the dropdown show sprites :P 13:37:29 <andythenorth> +/- rows and cols also :D 13:37:32 <andythenorth> free-form drawing! 13:37:33 <andythenorth> lol 13:37:44 <andythenorth> grid, sprites, drag-drop, profit 13:38:19 <TrueBrain> most of my time is in finding the correct React components etc 13:38:24 <TrueBrain> not in doing the NewGRF stuff :D 13:38:52 * andythenorth wonders which is worse: current state of JS and UI, or newgrf 13:42:33 <TrueBrain> hmm .. for original industries, I guess I should embed OpenGFX or something 13:52:00 <Samu> I'm experimenting another kind of rectangle limit 13:53:11 <Samu> no search limitation vs bresenham's vs rectangle 13:55:27 <_dp_> how to use null driver? I want to advance a savegame for n ticks 13:57:04 <LordAro> https://github.com/OpenTTD/OpenTTD/blob/master/cmake/scripts/Regression.cmake#L35 13:58:29 <_dp_> hm... and how to a savegame at the end? 14:00:23 <LordAro> how to save a savegame? 14:00:36 <LordAro> good question. 14:00:43 <nielsm> I don't think that's a feature... 14:01:04 <nielsm> could maybe be a parameter to the null driver, "execute this script file at the end" 14:01:06 <_dp_> well, I guesss I can add a tiny patch... 14:01:18 <_dp_> but, yeah, having a parameter would be nice 14:01:47 <nielsm> like -v null:before=setup.script:after=cleanup.script 14:01:49 <nielsm> or however 14:03:38 <_dp_> I think just null:save=aaa.sav would already cover the most cases 14:04:10 <_dp_> before/after can be used as extras for advanced setup but just save is better for convenience 14:08:09 <TrueBrain> or, you know, you could use autosave_on_exit :) 14:09:10 <TrueBrain> (so funny how even developers don't know all the settings :P) 14:10:21 <_dp_> I want to run them in parallel so I need a way to save into different files 14:10:47 <_dp_> well, I guess I can do schenanigans with openttd home directory but meh 14:11:00 <_dp_> I already coded save param :p 14:11:17 <TrueBrain> to be clear, I also didn't know of this setting till I was doing my massive savegame-testing-stuff :) 14:12:59 <TrueBrain> in fact, I think I made a PR to allow me to make a savegame on exit, till someone says: dude, there is a setting for that :D Funny how circles go :P 14:14:11 *** snail_UES_ has quit IRC 14:14:52 <_dp_> well, null driver param is a much better solution imo 14:16:03 <TrueBrain> the game_start.scr script was also surprisingly helpful 14:16:12 <TrueBrain> never imagined scripts having a use 14:25:12 <_dp_> scripts are made for a different purpose so not exactly convenient for testing 14:26:05 <_dp_> I'd like to specify everything in a command line, not depend on some magic globals 14:26:32 <TrueBrain> " Variational action 2 variable 43 for industry tiles can help you limiting tile consumption to 2 or 3 per industry." .. hmm ... I like to ask: how? :D I need to pick andythenorth 's brain after dinner :P 14:26:44 <andythenorth> after dinner :) 14:27:17 <andythenorth> TL;DR branch in the tile graphics chain to correct tile layout, using the industry layout as the var 14:27:19 <andythenorth> simple yes? 14:27:30 <TrueBrain> but then you only need 1 tileID, not? 14:27:34 <TrueBrain> or 1 per layout 14:27:58 <andythenorth> 1 per specific tile 14:28:07 <andythenorth> tiles have some immutable properties like animation rate 14:28:16 <andythenorth> so some industries need 1 tile, some need more 14:28:17 <TrueBrain> owhh, like that 14:28:23 <TrueBrain> okay, that makes sense 14:28:30 <TrueBrain> the "2 or 3" was confusing me 14:28:34 <andythenorth> so min. 1 tile per industry 14:28:35 <TrueBrain> like, what is wrong with 1 :) 14:28:40 <TrueBrain> cool, tnx 14:28:45 <TrueBrain> that surely was a quick dinner somehow :P 14:28:48 <andythenorth> in principle tiles could be shared across industries, but there's no real upside 14:28:57 <andythenorth> yeah I got distracted 14:32:36 <TrueBrain> I need to figure out how to do stuff like "add to a list" in React :P 14:34:07 <TrueBrain> but first .. can I do isometric projection in React :D 14:34:44 <TrueBrain> https://www.npmjs.com/package/react-isometric-grid <- last updated, 3 years ago 14:34:45 <TrueBrain> booooo 14:38:15 <_dp_> I fail to understand why that grid even exists 14:39:01 <_dp_> like... wut? https://tympanus.net/Development/IsometricGrids/ 14:39:11 <_dp_> who on earth thought that would be a good idea :p 14:57:41 <TrueBrain> hmm ... guess I need a way to filter out transparent pixels in a browser ... interesting issue :P 15:04:37 <glx> and don't forget the magic company colors and flashing ones :) 15:05:25 <glx> (well company colors are just blue shades, so not really an issue) 15:08:22 <TrueBrain> seems I have to draw it on a canvas to manipulate it 15:26:56 <TrueBrain> right, next question is to figure out how the game knows which old-tile-id matches with which basegraphics sprite id :) 15:53:28 <glx> https://github.com/OpenTTD/OpenTTD/blob/master/src/table/industry_land.h <-- this big table ? 15:55:40 *** WormnestAndroid has quit IRC 15:56:09 *** WormnestAndroid has joined #openttd 15:56:57 <glx> and https://github.com/OpenTTD/OpenTTD/blob/master/src/table/build_industry.h should have more hints 15:57:15 *** tokai has joined #openttd 15:57:15 *** ChanServ sets mode: +v tokai 16:16:00 *** Progman has joined #openttd 16:20:23 *** WormnestAndroid has quit IRC 16:21:59 *** WormnestAndroid has joined #openttd 16:30:07 *** WormnestAndroid has quit IRC 16:32:08 *** WormnestAndroid has joined #openttd 16:35:14 *** gelignite has joined #openttd 16:45:24 <TrueBrain> tnx glx, was looking for the first table .. hex .. didn't think of that :D 16:45:55 <glx> and https://newgrf-specs.tt-wiki.net/wiki/IndustryTileDefaultProps uses decimal :) 16:47:01 <glx> the joy of newgrf, sometimes it's decimal, sometimes it's hex, but it's never clearly stated ;) 16:49:24 <TrueBrain> glad it is not just me :) 16:51:22 <glx> properties, callbacks, variables, the "number" is always in hex 16:53:39 *** HerzogDeXtEr has joined #openttd 16:54:44 <TrueBrain> I loved this part: "this is a word value in little endian notation, e.g. 8134 becomes 34 81. " 16:54:52 <TrueBrain> like .... okay .... how did this help me? :D 16:55:07 <TrueBrain> some notion of what is what would have helped there :P 16:55:09 <glx> it's also hex 16:56:19 <glx> luckily NFO has the nice \w \d and other friends :) 16:56:45 <glx> but I guess you encode "by hand" 16:57:21 <TrueBrain> https://github.com/TrueBrain/TrueGRF/blob/main/truegrf-rs/src/grf.rs#L44 16:57:23 <TrueBrain> bit ugly atm :P 17:01:46 *** Compu has joined #openttd 17:04:18 *** jottyfan has joined #openttd 17:06:42 <glx> could be worse, looks cleaner than nml :) 17:10:28 *** Wolf01 has joined #openttd 17:11:10 <TrueBrain> meh, with OpenTTD in a browser, I keep running out of memory on my machine 17:11:17 <TrueBrain> Firefox doesn't seem to like opening the console too much 17:19:06 <TrueBrain> https://cdn.discordapp.com/attachments/273533192601075712/869629674689560576/unknown.png <- tnx glx, at least I now have the right sprites :) 17:20:57 <TrueBrain> although I think the wiki page is incorrect 17:26:49 <TrueBrain> ah, yes .. construction vs finished 17:26:58 <TrueBrain> those tiles are just a bit weird 17:43:35 *** WormnestAndroid has quit IRC 17:46:54 *** WormnestAndroid has joined #openttd 17:54:44 *** Flygon has quit IRC 18:00:42 <TrueBrain> hmm, industry prop 14 .. is that for each cargo or for all combines? 18:05:29 <TrueBrain> "The industry can be exploded by a military airplane (oil refinery) " <- wait, what now? :P 18:08:49 <andythenorth> "The produced cargo will be distributed to stations only after it exceeds this amount." 18:08:54 <TrueBrain> okay, so all the other industry settings are pretty easy .. mostly about how it looks etc. The nasty stuff is in the callbacks, ofc :D 18:09:05 <TrueBrain> andythenorth: yeah .. which cargo :) 18:09:06 <andythenorth> I never understood prop 14 18:09:13 <andythenorth> industry_cmd.cpp will know 18:09:19 <andythenorth> it's the canonical source! :D 18:09:35 <andythenorth> or it will be "move cargo to station" 18:09:36 <TrueBrain> done for each cargo 18:09:47 <andythenorth> let's not ask 'why' that feature exists at all 18:09:49 <TrueBrain> so you cannot move one cargo faster than the other 18:10:12 <TrueBrain> like pax per 1, but steel per 16, you cannot do that :) 18:10:48 <andythenorth> this is example of vestigal spec that would be better rm-ed 18:10:49 <andythenorth> but eh 18:10:54 * andythenorth broken record 18:11:06 <TrueBrain> what is the default value I wonder 18:11:28 <andythenorth> let me know if you find out :) 18:11:35 <andythenorth> might be 8 for reasons 18:12:21 <andythenorth> FIRS has the following 18:12:22 <andythenorth> self.min_cargo_distr = "1" # just use the most common value from default OTTD industries, this property needs set but has little use 18:12:32 <TrueBrain> some are 5 18:12:33 <TrueBrain> others are 30 18:13:02 <TrueBrain> correction: all are 5 but one 18:13:05 <TrueBrain> forest, that has 30 18:13:21 <andythenorth> oh because it cuts whole trees 18:13:28 <andythenorth> so we have to have 30t of tree at once 18:13:38 <andythenorth> anything else is unrealistic :) 18:13:58 <TrueBrain> worst part is that a recession is calculated after that :P 18:13:59 <andythenorth> I think the original animation was 4 trees cut in one cycle 18:14:03 <TrueBrain> so you can still have < 30t :) 18:14:07 <andythenorth> lol 18:17:23 <TrueBrain> "Do not rely on handling production cb sub-chain as default ID for the varaction 2 checking 0C, this can have unexpected results. However the ID of the varaction 2 handling the production cb itself should be the default ID for the 0C check. Makes sense? " 18:17:27 <TrueBrain> happy the author realised it does not 18:18:19 <andythenorth> pretty certain history will show that as me 18:20:05 <andythenorth> oh it was frosch 18:20:06 <andythenorth> weird 18:20:08 <andythenorth> sounds like me 18:20:40 *** frosch123 has joined #openttd 18:20:54 <LordAro> you summoned him 18:21:06 <andythenorth> omg 18:21:19 <andythenorth> I am sure that edit was me, but I never understand mediawiki history 18:21:21 <andythenorth> it's so fucking odd 18:21:41 <andythenorth> yes it was me :D 18:22:34 <andythenorth> 10 years later me doesn't know what 10 years ago me was talking about 18:22:40 <andythenorth> but it was clearly important at the time 18:24:03 <TrueBrain> I think I need an example of this production cb .. 18:26:33 <TrueBrain> I am assuming that "registers" is the temporary storage varact2 talks about 18:27:11 <andythenorth> registers are temp or permanent 18:27:50 <andythenorth> there might a production callback here in the nml regressions https://github.com/OpenTTD/nml/blob/master/regression/expected/example_industry.nfo 18:28:33 <andythenorth> maybe https://github.com/OpenTTD/nml/blob/master/regression/expected/example_industry.nfo#L102 18:28:42 <andythenorth> dunno might be misleading you :D 18:28:55 <frosch123> looks like it worked 18:29:04 <frosch123> getting tb into newgrf :p 18:29:48 <TrueBrain> hi frosch123 :) 18:30:06 <TrueBrain> https://truebrain.github.io/TrueGRF/ ITS PRETTY 18:30:15 <andythenorth> this isn't newgrf 18:30:20 <andythenorth> this is TrueGRF 18:30:29 <TrueBrain> and yes, I blame you for the name frosch123 18:30:30 <andythenorth> it is well known that TB has nothing to do with NewGRF 18:30:40 <frosch123> i regret nothing 18:30:44 <TrueBrain> :D 18:31:50 *** WormnestAndroid has quit IRC 18:33:16 *** WormnestAndroid has joined #openttd 18:35:05 <TrueBrain> okay, the documentation took a turn for the worse when it comes to Action2 :P 18:36:07 <TrueBrain> so there are feature-specific "type"s 18:36:09 <TrueBrain> and generic ones 18:38:02 *** Wormnest has joined #openttd 18:39:21 <andythenorth> I might misunderstand, but we have e.g. for industry, action 2, advanced / new action 2, varaction 2, advanced varaction 2, and random action 2 18:39:37 <andythenorth> and procedures, which are a varaction 2 called like a var 18:39:57 <TrueBrain> where for action0 it is pretty easy to find, when you go from left to right in the command, what it is doing 18:40:00 <TrueBrain> action2 .. less so 18:40:13 <TrueBrain> for industry, 00 .. 02 are industry specific, I think 18:40:17 <TrueBrain> but all of a sudden I see 89 18:40:22 <TrueBrain> which is in a completely different part of the wiki 18:40:27 <TrueBrain> bit hunting for eggs :D 18:40:35 <andythenorth> that's just a quirk, that's 'produce' 18:40:58 * andythenorth checks facts 18:42:01 * andythenorth has no idea :D 18:42:20 <frosch123> TrueBrain: 80+ are the same for all features 18:43:03 <frosch123> < 80 are different per feature, but several feature share the same logic 18:43:26 <frosch123> you can check the frontpage, which links are the same 18:44:24 <TrueBrain> ah :D 18:47:57 <frosch123> andythenorth: how can we avoid tb implementing deprecated crap like random-action? :p 18:48:19 <andythenorth> tell TB not too? 18:48:23 <andythenorth> to * 18:48:52 <andythenorth> TB: don't implement random-action 18:49:08 <andythenorth> just get some bits in a var instead, maybe with modulo if needed 18:49:27 <TrueBrain> rgr 18:49:52 <TrueBrain> the piece that is not connecting for me, how a cb chain is assigned 18:50:04 <TrueBrain> I can tell an industry that it should call its production cb every 256 ticks 18:50:10 <TrueBrain> but .. what is it going to call? 18:50:40 <frosch123> action3 -> varaction2 checing var 0C -> continue with callbacks/production/whatever 18:50:50 <TrueBrain> ah, action3 .. 18:50:57 <TrueBrain> yeah, all this talk about "graphics" is confusing :D 18:51:17 <DorpsGek> [OpenTTD/OpenTTD] DorpsGek pushed 1 commits to master https://git.io/J4xAD 18:51:18 <DorpsGek> - Update: Translations from eints (by translators) 18:53:29 <TrueBrain> okay .. that just leaves the question of "wtf are those \wx0000" doing in the URL andythenorth gave me .. lets find out :D 18:53:40 <TrueBrain> (as in, I get it is a word, but I don't get why they ar ethere) 18:54:08 <frosch123> they are the labels 18:54:22 <frosch123> as it "goto <label>" 18:54:25 <TrueBrain> 12 * 11 00 0A \b2 01 FF \wx0000 21 02 22 01 18:54:29 <TrueBrain> I mean this case 18:54:44 <frosch123> that is an action0 18:54:47 <TrueBrain> action 0, industries, 2 props, 1 info, industry 0xff 18:54:57 <TrueBrain> prop 21 to 02, prop 22 to 01 18:55:03 <TrueBrain> I just don't get what the \wx0000 does :D 18:55:20 <andythenorth> 'everything is in the graphics chain' 18:55:31 <andythenorth> so action 3 is a dispatcher for sprites or logic :P 18:55:51 <andythenorth> but it's not in the 'graphics chain' when we talk about the 'graphics chain' meaning sprites 18:55:56 <andythenorth> it's all so simple :) 18:56:00 <frosch123> \b10 -> 0A, \w10 -> 0A 00, \d10 -> 0A 00 00 00, \wx10 -> 10 00, \dx10 -> 10 00 00 00 18:56:31 <frosch123> \wx takes the following thing as hex number and outputs it as unsigned word 18:56:45 <TrueBrain> yeah, and I don't understand what those 0s are doing there :D 18:56:57 <frosch123> "\wx0000" is the same as "\wx0" 18:57:09 <frosch123> someone liked adding leading zeros :) 18:57:13 <TrueBrain> again, I am not misunderstanding what the syntax means .. I am missing what it does :P 18:57:23 <TrueBrain> 12 * 11 00 0A 02 01 FF 00 00 21 02 22 01 18:57:25 <TrueBrain> same question :P 18:57:36 <TrueBrain> there are 2 bytes I cannot account for :P 18:58:08 <frosch123> ah, that's the question 18:58:28 <frosch123> ok, the thing is, it's not "industry 0xff" 18:58:42 <frosch123> https://newgrf-specs.tt-wiki.net/wiki/Action0 <- "id" is a "B*" 18:58:55 <TrueBrain> ah .... 18:59:01 <frosch123> "B*" means extended byte: 00-FE are normal, FF means a word value follows 18:59:03 <TrueBrain> I can feel where this is going :P 18:59:09 <TrueBrain> tnx :D 18:59:11 <TrueBrain> these details ... :D 19:01:00 <frosch123> to simplify action6-usage, nml outputs all "B*" as "FF \w...", even if the short form would suffice 19:03:52 <TrueBrain> but not for action3, I am guessing? 19:04:13 <TrueBrain> B/B*, okay .. but isn't B implied with B* .. hmm 19:04:31 <frosch123> action3? 19:04:33 <TrueBrain> only B* for vehicles .. 19:05:03 <glx> ahah the so nice action6 19:05:17 <frosch123> yeah, it was a B first, but then changed to B*, but noone dared breaking things using id FF :p 19:05:32 <frosch123> didn't we change this in version8? 19:06:48 <glx> <frosch123> to simplify action6-usage, nml outputs all "B*" as "FF \w...", even if the short form would suffice <-- would have been a pain to properly handle action6 with variable size B* 19:06:51 <TrueBrain> okay, so despite the fact you can use IDs > 255 in Action0, you cannot in Action3 for industries, if I am putting 1 and 1 together :) 19:07:26 <TrueBrain> 128 per NewGRF anyway 19:08:00 <glx> are you expecting some logic in the spec ? 19:08:14 <TrueBrain> I am not having any opinion about the spec 19:08:18 <TrueBrain> just putting things together in my head 19:08:39 <frosch123> https://github.com/OpenTTD/OpenTTD/blob/master/src/industry_type.h <- there are some comments about the limits 19:09:27 <TrueBrain> "limited to 255 to allow extending Action3 with an extended byte later on." <- some comments are more confusing than helping :D 19:09:29 <glx> remember newgrf spec is basically a hack on hack around original TTD/TTDp limitations 19:09:59 <frosch123> TrueBrain: limiting to 255 instead of 256 makes newgrf using if 0xFF invalid. thus you can later use 0xFF to indicate a word-sized id 19:10:01 <TrueBrain> people seem to be waiting for me to bash the specs or anything .. I really am not. Just trying to wrap my head around it 19:10:20 <TrueBrain> frosch123: the comment should mention the "instead of" part :D 19:10:28 <TrueBrain> tnx :) 19:10:33 <TrueBrain> context is everything :D 19:10:42 <frosch123> TrueBrain: anyway, "industries" are the nice part of newgrf :p 19:10:49 <TrueBrain> good 19:10:57 <glx> yeah linking spec bits together may take some time 19:11:06 <andythenorth> frosch123 not trains? :) 19:11:16 * andythenorth likes trains 19:11:40 <glx> trains are not too bad, just too many things allowed in callbacks 19:11:42 <frosch123> vehicles and stations are "ttd weirdness is the default, newgrf specifiy differences to ttd behavior". everything newer is "there are some sane basics, newgrf define stuff from scratch" 19:12:12 <glx> except stations ? 19:12:32 <glx> oh didn't read fully 19:12:43 <frosch123> so industry newgrf define how a industry shall behave. while vehicle newgrf define how their vehicles are different to default vehicles :p 19:12:47 <TrueBrain> okay, so advanced varaction2 didn't get its own type, but is a mask. now that part clicks a bit :) 19:13:01 <glx> advanced varact2 is fun 19:13:10 <glx> you can chain ops 19:14:35 <frosch123> TrueBrain: adv. va2 has the same thing as \bx again. you only need the 32bit variant. the 8 and 16 bit variants only add complexity to save a few bytes on disk 19:14:41 <frosch123> (no different at runtime) 19:15:41 <TrueBrain> is there, performance wise, a difference between using prop9 on industries vs prop 8 to copy it and disable the old? 19:15:53 <frosch123> ok, the "no difference at runtime" is not true. it's just "no useful difference" :p 19:16:03 <glx> prop 8 is required IIRC 19:16:22 <frosch123> yes, one is mandatory, the other is optional 19:16:40 <glx> and it must be the first set prop 19:16:59 <TrueBrain> I couldn't get prop9 to work in a way that was useful to me :P 19:17:29 <frosch123> the "overwrite original stuff" is rather pointless in ottd. it's only meaningful if you add newgrf to a savegame without newgrf, but we do not support that 19:17:43 <TrueBrain> okay, so just ignore prop9 19:17:45 <TrueBrain> good 19:17:48 <TrueBrain> simple == better :) 19:19:47 <_dp_> hm, weird, null driver doesn't seem to be running the game state loop... 19:19:49 <TrueBrain> https://github.com/OpenTTD/nml/blob/master/regression/expected/example_industry.nfo#L115 <- this blob "overwrites" 0xfd .. I assume that is the way to chain it? 19:20:19 <glx> it should, else regression would not work 19:20:57 <_dp_> yeah, I'm trying to figure what am I doing differently 19:21:15 <glx> TrueBrain: action 2 id can be reused in chain 19:21:16 <frosch123> there are only 256 action2 ids. you have to reuse them, otherwise you run out pretty fast 19:21:30 <TrueBrain> how I read it, you can use any set before you, and it will point to the one you expect 19:21:32 * andythenorth runs out fast anyway :P 19:21:39 <TrueBrain> anyone after you can overwrite a setid again, but that is of no interest to you? 19:22:03 <glx> it's not overwritten 19:22:16 <frosch123> you are always referencing the last va2 using a specific id 19:22:23 <glx> from 0xfd you can link to previous 0xfd :) 19:22:39 <TrueBrain> frosch123: "last" in what context? Runtime context? Or compile-time? 19:22:44 <frosch123> compile time 19:22:53 <TrueBrain> k, so that is what I expected 19:22:54 <TrueBrain> tnx :D 19:23:05 <glx> all this magic is nicely handled by nml 19:23:28 <frosch123> glx: let him suffer a bit with nfo. then nml looks nicer :p 19:23:37 <andythenorth> oh maybe frosch123 might review this glx? :) https://github.com/OpenTTD/nml/pull/227 19:23:42 <TrueBrain> I cannot use NML, so that is not something I can enjoy anyway :) 19:23:51 <andythenorth> I wanted to yolo approve it, but I daren't 19:26:38 <TrueBrain> okay, tnx a bunch for all this information :D Lot faster than trying out, failing, reading source, trying again, etc :D 19:27:02 <TrueBrain> I think I understand the concept of Action2/3 .. now to think of a good / useful way to put it in TrueGRF :) 19:27:39 <glx> the full idea is 1/2/3 19:28:12 <glx> sprites, selection of sprites, when the selection should happen 19:29:47 <andythenorth> TrueBrain location check callback is a good one to try 19:30:14 <TrueBrain> hmm .. I should extend TrueGRF to "Compile and start a new game" 19:30:17 <andythenorth> quick test is only allow the industry to locate in towns with index modulo 3 19:30:21 <TrueBrain> maybe even with same seed .. 19:37:12 <frosch123> TrueBrain: https://raw.githubusercontent.com/frosch123/quaking/main/stream20210402/firs/arable_farm.dot.png <- i hope not like that :p 19:37:39 <frosch123> maybe rewatch that stream :p 19:37:48 <_dp_> great, something pauses the game and null driver "runs" paused :/ 19:38:43 <_dp_> also how to stop openttd from loading newgrfs from my .openttd? I'm already giving it a custom config elsewhere 19:38:45 <andythenorth> frosch123 you should re-graph them, but detecting procedure calls, and chained procedure calls :P 19:40:09 <glx> _dp_: -X 19:40:21 <glx> so it ignores global folders 19:40:54 <glx> https://github.com/OpenTTD/OpenTTD/commit/ed3946e295f0e74880d85ffb6f6a933ca87e460d#diff-84e5bd1673aba7f0fbb76c27ae19a02693636d290501c5af53d144ef05a88c08 19:40:59 <glx> it's quite recent 19:41:42 <_dp_> -X too new, I'm running 1.11.2 :( 19:44:41 <andythenorth> hmm when did I run out of action 2 IDs recently? 19:45:02 <andythenorth> oh I was going to use procedures to assign names to town and industry permanent storage 19:45:33 <andythenorth> so I could just call supplies_delivered_date() or something instead of LOAD_PERM(27) 19:46:00 <DorpsGek> [OpenTTD/nml] frosch123 approved pull request #227: Fix f2cab72: Called procedures may receive wrong values in parameters https://git.io/J4hU0 19:46:04 <andythenorth> but we have 256 registers for towns and 256 for industries 19:46:21 <andythenorth> and procedures, at least the way I use them, consume 'global' action 2 IDs 19:46:26 <DorpsGek> [OpenTTD/nml] glx22 merged pull request #227: Fix f2cab72: Called procedures may receive wrong values in parameters https://git.io/JWyIz 19:47:05 <glx> well the id is freed after last use of the procedure 19:48:57 <TrueBrain> frosch123: haha, I have no clue how my trees are going to look :D 19:49:20 <andythenorth> thanks frosch123 glx 19:49:57 * andythenorth has 'tested' nml a bit recently 19:50:09 <glx> you broke it ;) 19:50:13 <glx> multiple times 19:50:18 <andythenorth> strong words 19:50:24 <TrueBrain> frosch123: big wishlist for v9 :D 19:50:44 <andythenorth> well at least nml was fixed quickly :D 19:50:47 <glx> at least you found bugs to fix, which is always good 19:50:55 <andythenorth> we should release nml I think 19:50:59 <andythenorth> I am not the only user :P 19:51:22 <TrueBrain> oof, 2015 .. 19:51:24 <andythenorth> https://github.com/OpenTTD/nml/pull/193 19:51:27 <frosch123> TrueBrain: i was just surprised that it was not yet on the list 19:51:33 <TrueBrain> :D 19:52:59 <TrueBrain> I see 3 approaches for the callback stuff .. a very opinionated "you can only do these N things", which will cover the basic usage, but not andythenorth et al .. or a coding approach, or a visual approach .. hmm .. I will have to toy with it a bit .. 19:53:02 <frosch123> hmm, good point. newgrf is from 2002, grfv8 is from 2012, so we are almost at that important date 19:53:22 <andythenorth> TrueBrain you don't need to cover me :P 19:53:27 <TrueBrain> :D 19:53:37 <frosch123> TrueBrain: can you add a "fork FIRS" button? 19:53:44 <andythenorth> GH has one 19:53:47 <TrueBrain> :P 19:54:17 <andythenorth> I am off in la-la land 19:54:21 <frosch123> select firs version, enter new names for industries and cargos, compile, done 19:54:26 <frosch123> should be most usecases 19:54:29 <andythenorth> trying to work out if I can fake lists and loops in procedures 19:54:36 * andythenorth would like a list type in nfo 19:54:46 <andythenorth> and an iterator for loops :P 19:54:52 <TrueBrain> it is funny in how many ways NFO does arrays :) 19:55:00 <TrueBrain> from fixed-size, to length-prefix to nul-postfix :) 19:55:09 <TrueBrain> (for what-ever variation of nul) 19:55:25 <frosch123> is that more or less variants than in ottd savegames? 19:55:35 <TrueBrain> 1.12 savegame? Less :) 19:55:38 <TrueBrain> pre 1.12? Equal :P 19:55:42 <TrueBrain> :D 19:55:47 <frosch123> :) 19:55:53 <andythenorth> frosch123 first block of v9 is done no? https://wiki.openttd.org/en/Development/Design%20Drafts/NewGRF/GRF%20version%209 19:55:56 <TrueBrain> it is very natural :) 19:56:20 <frosch123> andythenorth: no 19:56:54 <andythenorth> I recommend annotating that wiki page with icons https://c8.alamy.com/comp/KGC8N2/tick-icon-set-stylish-check-mark-icon-set-in-green-and-red-colors-KGC8N2.jpg 19:57:00 <frosch123> pretty sure we classified the acceptance callbacks under "noone uses them, so we do not need to extend them" 19:57:01 <andythenorth> really big icons 19:57:48 <andythenorth> oh it's house crap for 1F I see 19:58:02 <andythenorth> I always forget about houses 19:58:29 <frosch123> it's also industry tiles starting to accept oil only after 1960 19:58:40 <frosch123> and all that ECS stuff 19:59:07 <andythenorth> yeah how silly 19:59:20 <andythenorth> special flags bit 1 just discards the need for 2B imho 19:59:25 <andythenorth> but anyway 19:59:49 <andythenorth> 'my opinion' on newgrf spec isn't useful :D 20:02:03 <andythenorth> "Allow more than 256 VarAction2 ids." 20:02:11 * andythenorth signs up for that newsletter 20:02:36 <andythenorth> " Instead prefix every variable with the "scope" (parent, self, more in future), so different scopes can be mixed easily within expressions, without chaining to other Action2." 20:02:36 <frosch123> TrueBrain: how is the 3DS port going? did you include the polish translation? 20:02:54 <andythenorth> ^^ /me just found that with towns 20:02:57 <glx> B* for action 2 IDs could be a nice improvement 20:03:04 *** Gustavo6046_ has joined #openttd 20:03:08 * andythenorth tried to mix town and industry vars in expressions 20:03:09 *** Gustavo6046 has quit IRC 20:03:09 *** Gustavo6046_ is now known as Gustavo6046 20:03:10 <andythenorth> 'nope' 20:03:21 <andythenorth> procedures to the rescue! 20:03:34 <andythenorth> procedures are the best nml feature since...well...anything really 20:03:57 * andythenorth considers faking a loop iterator, but it's limited to about 255 iterations 20:04:07 <andythenorth> and using some registers to fake lists 20:04:08 <glx> the scope prefix is something for nml, with auto split in sub action 2 on scope change 20:04:37 * andythenorth horrible ideas 20:04:51 <andythenorth> replace all nml var access with intermediate procedures :P 20:05:04 <glx> and I think most nml devs already had ideas about scope stuff 20:05:14 <glx> the current way is just weird 20:06:50 <andythenorth> it's 'fine' for industry 20:06:58 <andythenorth> scopes for trains are weird 20:07:33 <glx> "parent" is weird, it's the worst choice of naming :) 20:07:40 <andythenorth> it's so confusing what PARENT is when it's an articulated vehicle 20:07:56 <andythenorth> we could just hide it all in procedures 20:08:12 <andythenorth> that's probably bad sticking plaster idea 20:08:48 <andythenorth> I think I wrote a procedure to get the 'parent' of an articulated vehicle, based on position 20:08:53 <andythenorth> and 0x61 20:12:06 <andythenorth> I did, for random bits :D https://github.com/andythenorth/iron-horse/blob/master/src/templates/procedures_alternative_var_random_bits.pynml 20:12:14 <andythenorth> that should just be in nml :P 20:17:54 *** gelignite has quit IRC 20:18:44 <glx> andythenorth: I think you can save IDs and still use many procedures, but that implies indirect calls 20:24:34 <_dp_> finally figured it out, game is paused so null driver does nothing 20:24:52 <_dp_> and unpausing it in the driver doesn't help because it's loaded in the game loop :( 20:26:10 <_dp_> now.. how do I unpause the freaking save after load... 20:34:57 <andythenorth> glx call to a switch named use_procedure(x)? Where x is the procedure I want? :P 20:35:07 <glx> yes 20:45:22 <TrueBrain> frosch123: 3DS port? What are you smoking? :D 20:46:33 <TrueBrain> lol, 1 user did a refund on GOG :) Now that is funny :) 20:46:52 <glx> refund for something free ? 20:46:57 <TrueBrain> yup 20:47:19 <frosch123> TrueBrain: mail too old, you already forgot it :) 20:47:23 <TrueBrain> sorry :P 20:47:33 <TrueBrain> did you read the fantastic mass-mail to a lot of free software companies? 20:47:46 <TrueBrain> that was a treat :) 20:47:51 <frosch123> yes 20:48:08 <frosch123> though, not sure whether i really "read" it 20:48:29 <TrueBrain> after a few lines it became "skimmed over" :P 20:48:53 <TrueBrain> still, in the top 5 of mails we received in my book :) 20:50:06 <frosch123> i think it came twice 20:50:18 <TrueBrain> I think the second time had an update of sorts 20:50:22 <TrueBrain> but couldn't be bothered :P 20:51:02 <frosch123> hmm, the ratio of steam vs gog sales is better than the ratio of steam vs gog forum posts 20:51:10 <TrueBrain> ha, yes 20:51:21 <TrueBrain> GOG is a lot more than I expected 20:51:33 <LordAro> there is a gog forum? 20:51:53 <frosch123> https://www.gog.com/forum/openttd#1625730027 <- 7 posts 20:52:54 <frosch123> i felt bad for gog to put in so much effort, when i saw that forum activity 20:52:59 <frosch123> but the "sales" are much better 20:53:04 *** WormnestAndroid has quit IRC 20:53:13 <TrueBrain> yup 20:53:16 <TrueBrain> just not really chatty :) 20:53:23 <frosch123> maybe gog customers are smarter and know how to duckduck things 20:53:28 <TrueBrain> if you have nothing good to say, shut up? :D :D 20:54:17 *** WormnestAndroid has joined #openttd 20:54:41 <TrueBrain> NewGRF question: if you need to check 0C on callback to know if it is a production cb, why not allow on action3 to already mention that? Feels like the first chain is now always a bit silly? (asking to check if I am missing something) 20:55:08 <frosch123> action3 switches on different things :p 20:55:27 <frosch123> but yes, often you have to duplicate the 0C switch for all action3 cases 20:56:36 <TrueBrain> are these chains expensive, or is it so close to the machine it is really not that relevant? 20:57:53 <frosch123> noone knows. usually they become expensive because they are called so often, not because a single one takes too long 20:58:08 <frosch123> but that is hard to measure, because the instrumentation to measure single callbacks is so expensive :) 20:58:11 <glx> or because andy abuse them :) 20:58:32 <TrueBrain> frosch123: lol, okay, that on its own answers the question :D 20:58:46 <frosch123> we talked about adding statistical profiling for newgrf 21:00:21 <andythenorth> please don't :P 21:00:27 <frosch123> some years ago i could speed up nuts by 8% or so, by sorting + binary search the switch ranges 21:00:30 <andythenorth> currently I only have to optimise for compile time 21:00:41 <frosch123> but that only worked beause nuts switches on like 200 cargo types :p 21:00:42 <andythenorth> I can ignore run-time performance because we are blind to it 21:01:27 <TrueBrain> and action2 chains are basically only: get props/vars/registries values, do math, store in registry, return, right? 21:02:18 <frosch123> maybe, not sure how to answer that :p 21:02:53 <glx> some vars are cpu intensive, but many are cached 21:02:54 <TrueBrain> haha, okay, that is fair :) Euhm .. it is basically an integers in / integers out 21:02:59 <TrueBrain> ? 21:03:26 <frosch123> yes, but there are multiple paths for input and output 21:03:46 <LordAro> TrueBrain: are there stats on gog users anywhere? 21:03:47 <frosch123> there is not just one type of register :p 21:03:49 <TrueBrain> and all those switches I always see in NML are just a means to an end, right? 21:03:54 <TrueBrain> LordAro: in the info@ mailbox :) 21:04:17 <glx> switches are typical var action 2 21:04:32 <TrueBrain> I am really asking vague questions, sorry :P 21:05:02 <frosch123> TrueBrain: nml switches do not match 1:1 with nfo action2 21:05:04 <LordAro> clearly steam is dying https://steamdb.info/app/1536610/graphs/ 21:05:18 <frosch123> nml expressions and stuff often require multiple va2 for encoding 21:06:04 <andythenorth> off-topic: is everyone here a product engineer? Or does anyone do internal tools or business intelligence stuff? 21:06:07 * andythenorth has questions 21:06:27 <TrueBrain> ha, I see I am not the only one asking vague questions :P 21:06:38 <TrueBrain> "do internal tools" .. :D I think we all do ;) 21:06:47 <frosch123> andythenorth: we have a "everyone does a bit of internal tools" policy 21:07:21 <frosch123> no idea what "business intelligence" is... sounds like something with a lot of names in different contexts 21:07:24 <andythenorth> engineers are so hard to hire in the UK, we have all engineers on product nearly all of the time, or alternatively on customer support 21:07:40 <andythenorth> the level of manual processes we run inside the business is shocking 21:07:50 <andythenorth> and we have very limited tools for data 21:07:54 <TrueBrain> devoppppsssssssssss 21:08:01 <andythenorth> it's always more pressing to do more product 21:08:05 <andythenorth> because product can be sold 21:08:20 <TrueBrain> job of a Product Owner to keep that balance healthy :) 21:08:34 <glx> you just need to find someone annoyed enough by manual processes 21:08:34 <andythenorth> that's me, and I always decide 'more product' 21:08:38 <frosch123> andythenorth: https://xkcd.com/1205/ <- ah, so you are back to that one 21:08:42 <TrueBrain> Product Manager pushes for more stuff to sell, Product Owner says: I need time to do A, B, C too 21:08:51 <TrueBrain> so you are a shitty PO :P :P 21:09:01 <andythenorth> frosch123 yeah, but there's a missing column saying 'time could be spent on things to sell' :P 21:09:34 <andythenorth> well if I hired someone else as PO and they pushed for internal tools, I'd fire them 21:09:43 <andythenorth> we make more money building product 21:09:45 <TrueBrain> hence: it is a balance ;) 21:09:52 <andythenorth> but we have batshit internal process 21:10:10 <andythenorth> nothing is automated, and we have 10s of people doing rudimentary manual tasks 21:10:12 <TrueBrain> in general you sell more if your internal process is streamlined as well :) 21:10:19 <TrueBrain> or: pay less wages 21:10:21 <TrueBrain> which is the same, I guess 21:10:26 <frosch123> andythenorth: anyway, my experience from my past companies: internal tools are crap if they are developed by people who do not use them themself 21:10:39 <andythenorth> generally they can be bought off the shelf 21:10:41 <TrueBrain> ddeeevvvvooooppppssssss :D 21:10:43 <frosch123> so "people exclusively doing internal tools" seem to always be a waste 21:11:05 <andythenorth> I mean...we did do all the classic mistakes, like building our own CRM, ticket system etc 21:11:09 <andythenorth> sacked all that 21:11:23 <andythenorth> TrueBrain is that some kind of meme? 21:11:43 <TrueBrain> no; it is a solution to your problem :P 21:11:50 <andythenorth> lol no 21:11:57 <andythenorth> ever tried hiring a devops engineer? 21:12:02 <andythenorth> rarer than unicorns 21:12:19 <TrueBrain> have seen plenty :) 21:12:27 <frosch123> devops is better than having devs and ops 21:12:44 <andythenorth> we don't have ops 21:12:46 <TrueBrain> lot of dev like to do some ops too, if they can automate it 21:12:49 <frosch123> pure ops usually send excel sheets via mail, and ask for input and sending them back 21:12:51 <TrueBrain> not many ops like to do dev .. that is rare :P 21:12:55 <frosch123> so they can manually merge them from all teams or so 21:13:19 <TrueBrain> andythenorth: you might not call them ops, but you sure have ops 21:13:23 <TrueBrain> someone is keeping those machines alive 21:13:30 <andythenorth> oh I don't mean hosting :) 21:13:34 <andythenorth> I mean business stuff 21:13:41 <andythenorth> hosting is a different shitshow 21:13:42 <TrueBrain> we are back to the "stuff" again :P 21:13:50 <TrueBrain> but I mean to say: you do have ops :) 21:14:09 <TrueBrain> companies I worked at, devops also took care of things like CI/CD, ticket system, and even customer support 21:14:09 <andythenorth> yeah we have the work, we just make people do it on top of the rest of their job 21:14:37 <andythenorth> well 21:14:44 <glx> at one point someone will decide to automate it 21:14:59 <TrueBrain> okay .. so does action2 chains "return", or does it do a call in the end which publishes the return value or something .. hmm .. lets find out 21:15:19 <glx> there's a return bit 21:15:39 * andythenorth fell in a devops salary checking hole 21:15:39 <glx> when set it's a return, else it's a chain to next 21:15:47 <andythenorth> devops salaries have gone weird 21:16:00 <TrueBrain> you might be underpaying the rest of your staff :P 21:16:02 <andythenorth> they were £80k-120k a few years ago here 21:16:14 <andythenorth> now they are a lot less 21:16:16 <andythenorth> that's weird 21:16:27 <TrueBrain> devops is more mainstream? 21:16:34 <andythenorth> possibly 21:17:15 <andythenorth> or more people advertising who can't afford £80k 21:17:17 <TrueBrain> glx: doesn't seem to be the case always 21:17:22 <andythenorth> stats don't say the job was actually filled 21:17:27 <andythenorth> just advertised 21:17:29 <TrueBrain> this action2 industry chain I am looking at, just ends with a "format version 2" 21:17:49 <glx> ah yes it can be a spriteset too 21:18:10 <frosch123> TrueBrain: va2 ranges are "jump" not "call". you can also have real"calls" inside the chains, but that is more magic 21:18:12 <glx> but that's still the end of the chain 21:18:35 <TrueBrain> frosch123: ah :) 21:18:38 <andythenorth> action 2 returns action 1 in the sprites case? 21:18:44 <andythenorth> what's the weird loaded/loading thing 21:18:47 * andythenorth looks it up 21:21:27 <frosch123> TrueBrain: anyway, va2 ranges can be both "jump to <x>" or "return y". < 0x8000 is jump, >= 0x8000 is return 21:21:40 <frosch123> all other action2 are returns 21:21:51 <TrueBrain> and per callback is defined if it expects a return value, I guess? 21:21:56 <frosch123> (the basic action2 with type < 80) 21:22:25 <glx> yup each callback tells what the return should be 21:22:31 <frosch123> uhh.. let's say yes, but the term "callback" is ambiguous in some cases :p 21:23:01 <glx> some are bools, some are more complexe 21:23:25 <frosch123> there is also a special callback result "callback failed", which is returned by linking to an ordinary action2, instead of returning an integer 21:23:58 <frosch123> some callbacks also have output values in specific registers, in addition to the callback result 21:24:25 <glx> 256+ registers (write only from NFO) 21:24:29 <andythenorth> monthly production change, for example 21:24:37 <andythenorth> puts a string in register 21:24:49 <TrueBrain> okay, so this industry production callback .. you end with a call to tell in which registers are the goodies .. 21:24:55 <TrueBrain> guess that is a solution to returning more than 1 variable 21:25:00 <andythenorth> https://newgrf-specs.tt-wiki.net/wiki/Callbacks#Random_production_change_.2829.29 21:25:40 <frosch123> TrueBrain: "industry production callback" is one of the two ambiguous "callbacks" :) it's not really a callback 21:25:44 <andythenorth> ^ optionally returns a string in register 0x100 bits 0..15 and another value in bits 16..23 21:25:51 <frosch123> it has no integer result like the other 100 callbacks 21:25:58 <andythenorth> ho maybe I need to buy a nocode platform 21:26:00 <TrueBrain> frosch123: it is just a procedure, basically? 21:26:05 <andythenorth> then maybe hire someone to write code for it 21:27:10 *** Samu has quit IRC 21:27:20 <TrueBrain> trying to understand this example: https://github.com/OpenTTD/nml/blob/master/regression/expected/example_industry.nfo#L113 21:27:27 <TrueBrain> that line .. checks for callback 0x0, which doesn't exist? 21:28:38 <glx> move up :) 21:28:54 <glx> 0 means graphics ie basic action 2 21:29:35 *** Progman has quit IRC 21:29:43 <TrueBrain> owh, 00 means "not in a callback" 21:30:13 <glx> nml produce commented nfo, but not everything can be commented 21:31:17 <glx> usually to understand a block of nfo you have to follow the jumps 21:31:25 <frosch123> TrueBrain: https://dpaste.org/KjfP <- maybe helpful 21:31:29 <TrueBrain> it is not NFO I am not understanding glx :) 21:32:20 <TrueBrain> frosch123: the first 3 lines are very useful :) 21:32:47 <TrueBrain> https://github.com/OpenTTD/nml/blob/master/regression/expected/example_industry.nfo#L104 continues to check var18, which is weirdly documented .. 21:33:43 <frosch123> the meaning of var10 and var18 depend on var0C :) 21:33:59 <TrueBrain> so it mentions .. but I cannot find what it means when var0C is 0 :D 21:34:37 <frosch123> https://newgrf-specs.tt-wiki.net/wiki/Action2/Industries#Details <- for industry production it is written under "details" 21:34:56 <TrueBrain> https://newgrf-specs.tt-wiki.net/wiki/GlobalVariables#Extra_callback_info_.2810_.2F_-.29_and_.2818_.2F_-.29 mentions only 3 other features :D 21:35:05 <TrueBrain> okay, tnx frosch123 :D This really is a nice hunt for information :) 21:36:12 <frosch123> at least we no longer have to read ttdp assembly code 21:37:07 <TrueBrain> okay, so 0C = 0, 18 = 0 means a train arrived and you can decide what to do 21:37:53 <frosch123> lol 21:38:00 <glx> https://github.com/OpenTTD/nml/blob/8ed9791b66bcadda99970d051144f4694e03b8d0/examples/industry/example_industry.nml#L89 21:38:05 <glx> it's this line 21:40:26 <TrueBrain> I love that you can just smell the iterative way NewGRF is created :) 21:40:39 <TrueBrain> okay, so industry production bla is the exception in it all, cool 21:40:58 <frosch123> yep :) 21:41:43 <TrueBrain> "(was width of "€" character) " 21:41:44 <TrueBrain> how cute :D 21:42:04 <glx> lang codes 21:42:14 <frosch123> i reverse engineered that at some point. it used to be "reserved" 21:42:24 <TrueBrain> lol :) 21:42:45 *** tokai|noir has joined #openttd 21:42:45 *** ChanServ sets mode: +v tokai|noir 21:43:11 <TrueBrain> "Has always all bits set; you can use this to make unconditional jumps " <- how nice :D 21:43:40 <glx> var 1A ? 21:44:08 <TrueBrain> yup 21:44:24 <frosch123> haha, that is underselling it 21:44:31 <glx> heavily used in nml to create any number 21:44:35 <frosch123> you also need it for creating all constand numbers 21:44:50 <TrueBrain> lol, there is no other way to create a number? :D 21:45:06 <glx> var 1A & the number you want 21:45:11 *** nielsm has quit IRC 21:45:14 <frosch123> no, constants are ((var1A >> 0) & value) 21:45:19 <glx> then you can do math with it 21:45:28 <TrueBrain> that is just awesome :D And indeed, underselling 21:45:48 <TrueBrain> var1C, result from most recent VarAction2 ... which "recent"? Yours? Of the feature you are in? Guess I should look this up :P 21:45:58 <glx> last result 21:46:10 <glx> in the chain 21:46:13 <TrueBrain> you can repeat the words, but it still lacks context :D 21:46:47 <frosch123> TrueBrain: the value used to decide that last range 21:46:56 <glx> like you do (a + b) then chain to another action 2, and it can use 1C to get (a+b) and do stuff with it 21:46:57 <frosch123> usually from the va2 that chained to the current one 21:46:59 <TrueBrain> ah, that "result" :D 21:47:22 <andythenorth> does nml have that var 21:47:25 * andythenorth looks 21:47:37 <frosch123> andythenorth: i hope not, it wouldn't work :p 21:47:42 <TrueBrain> awesome, tnx again guys :) 21:47:46 <glx> nml has it 21:48:05 <andythenorth> frosch123 I only just learnt I can just do 'return;' and yield the value from the switch expression 21:48:11 * andythenorth so clueless about nml 21:48:23 <glx> may be needed with procedures (unless we smartly hide it) 21:48:28 <andythenorth> I was putting those results into registers :P 21:48:28 <glx> can't remember the code 21:48:30 <TrueBrain> "Manhattan distance of closest dry/land tile " <- some variables really surprise me :D 21:48:33 *** HerzogDeXtEr has quit IRC 21:48:51 <glx> andythenorth: but return; is in the doc 21:49:03 <andythenorth> I never read those docs :) 21:49:14 <glx> a lot is not in the doc 21:49:17 <andythenorth> FIRS was ported to nml by other people, and I just copy-paste since then 21:49:40 *** tokai has quit IRC 21:50:18 <andythenorth> I did quit FIRS when it was nml-ported, but PM said I was being a cry-baby and should get over myself :) 21:50:20 <andythenorth> good pep talk 21:51:22 <frosch123> and then you took revenge and turned it into pynml 21:53:00 <andythenorth> well 21:53:09 <andythenorth> it did have all those variadic CPP macros in 21:53:09 <glx> pynml is good to trigger nml bugs ;) 21:53:18 <glx> like [] 21:53:33 <andythenorth> the worst time was when I was using python to generate the variadic macros, during a migration 21:53:38 <andythenorth> that was .... unpleasant 21:53:53 <TrueBrain> okay, last stupid question as I am too lazy to look in the code: https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Industries#Cargo_info_variables_.2869..71.29 <- of what cargo is it returning ? 21:54:23 <glx> 60+X var have an extra arg 21:54:24 <andythenorth> I think the peanut gallery here told me "You shouldn't be doing this variadic macro stuff" and I was like "FML, I'm trying to delete it" 21:54:47 <TrueBrain> glx: ah, tnx. That is what they mean with "size" 21:54:57 <TrueBrain> hmm, no, that is not filled in 21:55:51 <TrueBrain> I love this part: "The variables are independent of the number of cargo types and their order." 21:55:56 <TrueBrain> I have no clue what it says :D 21:56:43 <andythenorth> hmm what other bugs did I trigger recently? 21:56:43 <glx> for var 60+X the format is 60 <extra data> 21:56:52 <andythenorth> oh "town registers don't work" 21:56:56 <TrueBrain> how do you know? Besides knowing? 21:57:02 <andythenorth> but that was just because debug window isn't redrawn 21:57:39 <andythenorth> it's nice having a debugger where you have to refresh window :) 21:57:44 <TrueBrain> https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2#Variable <- ah, there it is being sneaky 21:58:31 <andythenorth> when the register values are incremented on some time period, I have to windowshade the debug window on some precise frequency to see them change :) 21:58:45 <andythenorth> but my sense of timing is....poor 21:59:08 <andythenorth> also sometimes it just garbles the font sprite, so the number is indistinct :) 21:59:16 <andythenorth> this is like RNG in the tank game, adds fun 21:59:53 *** sla_ro|master has quit IRC 21:59:58 <TrueBrain> right, sleepy time 21:59:59 <TrueBrain> nn 22:00:20 <andythenorth> nn 22:00:28 <andythenorth> also 22:00:30 *** andythenorth has quit IRC 22:05:11 *** frosch123 has quit IRC 22:07:44 <glx> that's the hardest part with newgrf, knowing stuff but not knowing where it is in the doc 22:08:30 *** Wolf01 has quit IRC