IRC logs for #openttd on OFTC at 2022-09-27
β΄ go to previous day
00:38:40 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
01:22:57 *** Wormnest has joined #openttd
02:15:40 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
02:22:55 *** Wormnest has joined #openttd
02:35:46 *** debdog has quit IRC (Ping timeout: 480 seconds)
05:06:44 *** D-HUND is now known as debdog
06:21:42 *** sla_ro|master has joined #openttd
06:37:01 *** sla_ro|master2 has joined #openttd
06:40:08 *** sla_ro|master has quit IRC (Ping timeout: 480 seconds)
06:50:14 *** sla_ro|master has joined #openttd
06:54:09 *** sla_ro|master2 has quit IRC (Ping timeout: 480 seconds)
08:00:48 <petern> I tried to break up my patches into smaller chunks and then keep making those too big π¦
08:00:53 <petern> Or getting side-tracked.
08:15:04 <petern> Regex search & replace is useful but potentially dangerous.
08:17:18 <andythenorth> I started out to make FIRS layouts very slightly larger without breaking placement
08:17:35 <andythenorth> and now I am reworking 1 entire economy, and rewriting the cargoflow graph
08:17:47 <andythenorth> and campaigning for more grf object IDs π
08:20:01 <pickpacket> petern: always do a search first to see what you're matching :D
08:20:29 <pickpacket> andythenorth: wow... how many object IDs are available, and how many would you like?
08:20:42 <andythenorth> 256 per grf, and 'more'
08:20:53 <petern> I had two false matches out of 167, which is not bad.
08:21:04 <pickpacket> andythenorth: could you make another GRF to use together with FIRS?
08:21:18 <pickpacket> petern: that's pretty good, yeah
08:21:22 <petern> andythenorth: Did we decide it was just that extended byte, or was there more to it...?
08:21:33 <andythenorth> there was more to it, but not a lot more
08:22:00 <pickpacket> would it break anything to make that an int instead of a byte?
08:22:18 <andythenorth> I can't remember exactly, but I think there are a bunch of function params being passed as byte
08:22:24 <andythenorth> I am always so out of my depth though
08:22:30 * andythenorth happier with pixels
08:22:31 <pickpacket> andythenorth: are you using TrueGRF or something else for FIRS?
08:22:34 <petern> Extended byte is a NewGRF binary-format thing.
08:22:50 <andythenorth> FIRS is it's own compile
08:23:13 <andythenorth> TrueGRF is slightly derived from FIRS, in a minor way
08:23:19 <petern> 0-254 is read as a byte, 255 indicates to read a 16 bit word again.
08:23:38 <petern> There isn't an extended word though π
08:24:28 <andythenorth> that tutorial is fine, if you're a 'learn from actual code' type person, the example grfs in nml repo are more useful
08:24:55 <andythenorth> the NML tutorial stuff tries somewhat to teach completely new programmers how to create a grf
08:25:04 <andythenorth> whilst failing somewhat to achieve that
08:25:36 <andythenorth> it can be quite confusing if you already know how to program, as it over-explains some things, whilst leaving out others
08:25:52 <andythenorth> also, depending how you learn, it might be better to read the actual grf spec
08:26:02 <andythenorth> action 0, 1, 2, 3, varact 2, callbacks
08:26:16 <andythenorth> NML is plastering structures over grf, and it works until it doesn't
08:27:17 <andythenorth> if you can't program, go with the NML tutorial π
08:42:35 <andythenorth> the industry example does not define new cargos, nor use new sprites
08:42:42 <andythenorth> but it's helpful anyway
08:43:51 <andythenorth> I learnt grf by modifying the existing industries to produce new cargos, then building up from that
09:06:34 <petern> I learnt GRF by implementing the parsers...
09:07:04 <petern> I got it wrong a few times, partly because our original implementation was very... wrong.
09:31:35 <petern> Turns out if I leave an OpenTTD running overnight on the intro screen, I'm still playing OpenTTD according to Discord. And Steam π
09:31:46 <petern> 339.1 hours of OpenTTD according to Steam.
10:07:55 <pickpacket> Is NFO the sort of βoriginalβ way to write grf files?
10:18:02 <petern> Updating OBS, nothing is going to go wrong, of course...
10:19:45 <petern> Hmm, quite some changes actually.
11:14:32 <petern> Why is maximum map height a cheat?
12:02:57 <LordAro> i suppose it was part of the difficulty system
12:03:12 <LordAro> so changing it would be cheating
12:03:31 <petern> No, it was never a thing when we only had 15 height levels.
12:04:59 <LordAro> what does git blame tell you?
12:08:49 <petern> "this is a cheat because of the fact that it needs to reset NewGRF game state and doing so as a simple configuration breaks the expectation of many"
14:44:44 *** sla_ro|master has quit IRC ()
14:53:33 *** Wormnest has joined #openttd
15:12:56 <FLHerne> clearly authored by The Winslow
15:18:31 *** gelignite has joined #openttd
15:28:03 *** geli has quit IRC (Remote host closed the connection)
15:30:53 <supermop_toil> ugh now i have to figure out gantt or kanban or some nonsense
15:32:19 <supermop_toil> i guess the little cards can't have dependencies, that's the whole point?
16:39:26 *** virtualrandomnumber has joined #openttd
16:39:43 *** virtualrandomnumber has quit IRC (Remote host closed the connection)
16:42:35 *** HerzogDeXtEr has joined #openttd
17:17:18 <pickpacket> Okay! I have a few hours before bedtime. Going to try to get a grip on NML or NFO... not sure which is best to start with
17:22:53 <petern> I like that the special NFO escape sequences are just as cryptic as the hex values...
17:24:43 <pickpacket> uhm... yeaaaahhh... NML it is.
17:25:01 <frosch> maybe the nfo should be indented, to make the comparison slightly more fair
17:25:32 <pickpacket> One question before I dive in: my goal is to add one new industry to the game. Not an entire set, just the one. Is that possible?
17:25:33 <petern> That sounds like commenting to me.
17:26:31 <frosch> yes, the default is to add more stuff. disabling original stuff is an extra step
17:28:25 <andythenorth> unless you redefine an existing ID?
17:28:38 <andythenorth> or did we give them their own per-grf IDs now?
17:28:56 <frosch> industries always had local ids
17:29:15 <frosch> cargos have global ids, but 32-63 are free by default
17:30:15 <frosch> cargo ids could also have been local, but the 64 limit is pretty hard, and firs uses all of them, so there is not really a point in trying to make them local
17:32:26 <andythenorth> I didn't quite use all of them yet π
17:32:28 <andythenorth> give me time though
17:32:35 <andythenorth> I feel it's achievable π
17:33:40 <andythenorth> also I am experimenting with adding more cargo nodes on cargo edges
17:34:02 <andythenorth> it might increase legibility for reader, and it seems to sometimes aid graphviz placement
17:34:17 <andythenorth> but this being graphviz, an improvement in one direction is probably worse in another π
17:37:19 <frosch> did you consider adding a "custom" economy, with grf settings to enable/disable individual industries? :p
17:37:26 <frosch> or is that what truegrf is for
17:37:52 *** xordspar0 has quit IRC (Ping timeout: 480 seconds)
17:38:58 <andythenorth> I have been asked to turn FIRS into an economy maker
17:39:08 <andythenorth> with parameters to turn each industry/cargo on/off
17:39:19 <andythenorth> and then probably set the name
17:39:27 <andythenorth> and change the input and output cargos and ratios
17:39:41 <andythenorth> "I'm sure that it would be fine"
17:39:59 <supermop_toil> Feature request: remove any and all fun from FIRS?
17:40:32 <andythenorth> honestly, this Steeltown remake might be doing that π
17:40:54 <andythenorth> it's not the goal, but I might accidentally be turning it into a confusing chore
17:41:53 <frosch> hmm, is XIS new enough to have >32 cargos and >2 output cargos?
17:41:59 <frosch> or is steeltown now more complicated?
17:42:35 <petern> Hmm, is it possible to either start up a GS in an existing game, or reset all the conditions a previous GS set on towns?
17:42:42 <andythenorth> not that I know of
17:42:53 <andythenorth> have to restart in my experience
17:43:00 <andythenorth> it's one of the reasons I didn't do FIRS GS yet
17:43:05 <andythenorth> dev really sucks
17:43:17 <andythenorth> if the GS is supposed to work with industries and cargos
17:43:27 <andythenorth> and testing it means making a complicated savegame
17:43:56 <andythenorth> hmm can GS accept console events?
17:44:09 <andythenorth> I could write a GS that is modular and designed to be re-initialised during game
17:45:40 <frosch> there is the script-commuincation protocol, which uses signs to communicate
17:45:42 *** xordspar0 has joined #openttd
17:45:49 <andythenorth> how about just a script console? π
17:45:53 <andythenorth> admin port maybe?
17:45:56 <frosch> you could implement ttdp sign cheats as gs
17:46:59 <andythenorth> oh can I just make storybook page with buttons?
17:47:03 <andythenorth> 'reset everything'
17:47:14 <frosch> looks like xis is 3-in-2-out only
17:47:34 <frosch> i guess that's what storybook is for
17:47:46 <frosch> not sure whether anyone really used it
17:49:36 <andythenorth> it's all good, until the bug is in my story book code π
17:50:05 <andythenorth> a long time ago I wrote my own flash-game resetter because I didn't understand how to use a debugger
17:50:12 <andythenorth> it could inspect any variable and change the value
17:50:31 <andythenorth> but also in flash, during debug, you could move the frame etc
17:50:36 <FLHerne> so you can have base FIRS with a fairly minimal economy, and then add on FIRS Chemicals and FIRS Metals if you want to do Steeltown
17:50:41 <andythenorth> and a lot of the state lived in frames
17:50:45 <andythenorth> was really powerful
17:50:54 <FLHerne> then give each grf a complexity parameter :p
17:51:07 <FLHerne> and the whole thing explodes in combinatorial madness, but whatever
17:51:32 <frosch> i think the in-game industry-chain window needs a zoom-out button
17:51:54 <frosch> steeltown is just too much for it
18:00:16 <andythenorth> I guess the boxes have to be large to allow for many inputs
18:00:58 <petern> They do scale depending on how many there are.
18:01:11 <petern> But all boxes are the same size, so whatever the largest one is...
18:02:44 <frosch> the lines are also kind of thick
18:06:36 <petern> Yeah, I think some of our UIs have been built with 2x zoom in mind, so the dimensions are off when I start scaling them π
18:13:48 <petern> Maybe the outlines aren't even needed
18:14:43 <petern> Width is set to the font height, this is with 5 pixels (scaled, so 10 here)
18:18:25 <petern> Borderless lines, looks okay to me, although a few 1 pixel gaps to tweak.
18:19:56 <andythenorth> borderless is fine until I choose the cargo colour that matches the background π
18:20:02 <andythenorth> in all other cases it looks better
18:20:48 <petern> if (colour.is.chosenby.andythenorth) drawlines()
18:21:12 <andythenorth> we could just remap it π
18:21:15 <LordAro> strange nested object
18:21:21 <petern> Game would need to know about similar palette colours, not sure it has any knowledge of that.
18:21:36 <andythenorth> I think I assign the colours algorithmically anyway
18:22:00 <petern> Make the window background cycle through different colours.
18:22:19 <petern> We're good a needlessly redrawing windows π
18:22:29 <frosch> there is some method to pick white/black font color depending on a background color
18:23:14 <frosch> the yellow borders are weird, but i prefer them over no borders
18:23:19 <andythenorth> truegrf could just ban that cargo colour
18:23:32 <andythenorth> all this choosing colours crap π
18:23:40 <andythenorth> let the game do it π
18:23:42 <petern> Oh we do have GetContrastColour(), nice.
18:24:06 <andythenorth> I would be quite happy to delegate to the game, with the existing grf stuff as an optional over-ride
18:24:48 <andythenorth> oh wait, this is old lady who swallowed a fly π
18:25:49 <petern> Universal rule of Minecraft: when you join a server it will be night time.
18:26:00 *** sla_ro|master has joined #openttd
18:26:05 <andythenorth> night time in OpenTTD
18:28:31 * andythenorth BBL, going outside
18:28:38 <andythenorth> but has beer with RL people
18:31:22 <petern> Right to left back to front up to down people.
18:32:20 <petern> andythenorth: Look at those colours you chose...
18:32:59 <petern> (Yes, it's tiny, but that's because 1x is always tiny)
18:35:03 <LordAro> yeah, think we need the outlines :p
18:37:53 <supermop_toil> andythenorth: your boat is outside my window come get it please
18:44:10 *** Smedles has quit IRC (Ping timeout: 480 seconds)
18:47:24 <pickpacket> is there a pre-compiled binary of NML for python 3?
18:49:42 <JGR> NML is already written for python 3
18:49:56 <JGR> It's a script, you don't need to compile it into a binary
18:50:48 <pickpacket> JGR: yeah... the tutorial installation instructions are outdated then
18:51:31 <pickpacket> where do I get it? pip install?
19:02:12 <DorpsGek> - Update: Translations from eints (by translators)
19:06:14 *** Smedles has joined #openttd
19:31:59 <petern> Heh, commit from May 2021, I sit on these things for a while π
19:36:26 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
19:39:02 <LordAro> are these building towards your scaling stuff?
19:42:46 <petern> Yes. My scaling stuff improves spacing and padding of many bits, and prefers to let the widget system handle things. It doesn't even depend on the non-integer scaling stuff which I originally added just to see if it's possible... but that is really nice too π
19:43:52 <petern> The little patch to highlight widget outlines is really useful for working out what's going on π
19:44:27 <petern> Also I noticed my almost-brand-new stupidly bright bike like is scuffed now π¦
19:56:39 *** gelignite has quit IRC (Quit: Stay safe!)
20:05:14 <petern> Hmm, weird, some text in the Story Book window is letter-wrapped rather than word wrapped.
20:09:18 <petern> Seems to be the first word after a colour change.
20:11:51 <LordAro> petern: that patch could be useful bundled into ctrl+b ?
20:12:15 <petern> I've got it on Ctrl-Shift-O, hah
20:12:24 <LordAro> or whatever the 'show bounding boxes' key combo is
20:12:43 <petern> I think putting in on the same one would be annoying.
20:20:51 <petern> Hmm, it's the fallback layouter, as with uniscribe it works fine.
20:25:36 *** Etua has quit IRC (Ping timeout: 480 seconds)
20:27:06 *** sla_ro|master has quit IRC (Ping timeout: 480 seconds)
20:33:44 <petern> So basically when it switches from one run to the next, the last_space is cleared, so it thinks it needs to wrap in the middle of the word.
20:34:21 <petern> I can set last_space to where the run starts, and it kinda works in that the text is word-wrapped rather than letter-wrapped, but it's not quite right.
20:35:33 <petern> e.g. `{ORANGE}hello{BLACK}.` may wrap the `.` to another line. Actually it eats it because it assumes it's an unnecessary space, but hey.
20:49:28 <petern> Ideally it would wrap before the colour change, but by that point it's already committed...
20:55:49 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:15:43 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
22:06:05 *** NGC3982 has quit IRC (Remote host closed the connection)
22:06:17 *** NGC3982 has joined #openttd
22:36:02 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:47:32 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
23:27:36 *** Wormnest has joined #openttd
continue to next day β΅