IRC logs for #openttd on OFTC at 2023-01-23
            
00:07:46 *** Soni has quit IRC (Ping timeout: 480 seconds)
00:50:46 *** Etua has quit IRC (Quit: Etua)
01:19:52 *** BriggsSaint has joined #openttd
01:19:52 <BriggsSaint> I'll help 10 people how to earn $50,000 in just 72hours from the crypto market.
01:19:52 <BriggsSaint> Dm me to know How
01:23:43 <dwfreed> oh now it's discord spam
01:23:50 <dwfreed> TrueBrain: ^^^
02:18:19 <supermop_Home_> bummer, i could think of a few things to blow 50 grand on
02:43:18 <DorpsGek> [OpenTTD/OpenTTD] merni-ns commented on pull request #10384: Change #10370: Increased max length of vehicle type names https://github.com/OpenTTD/OpenTTD/pull/10384#issuecomment-1399715413
03:08:26 *** debdog has joined #openttd
03:11:41 *** D-HUND has quit IRC (Ping timeout: 480 seconds)
03:18:56 *** supermop_Home_ has quit IRC (Ping timeout: 480 seconds)
03:26:43 *** Wormnest has quit IRC (Quit: Leaving)
04:04:18 *** Flygon has joined #openttd
04:23:32 *** Soni has joined #openttd
04:41:01 *** keikoz has joined #openttd
04:55:42 *** urdh has joined #openttd
05:46:48 *** HerzogDeXtEr has joined #openttd
06:00:06 *** keikoz has quit IRC (Ping timeout: 480 seconds)
06:32:19 <TrueBrain> dwfreed: Sadly, that happens on all networks. But on Discord too, they are kicked faster than you can say "mamma".
06:32:48 <TrueBrain> I might consider not relaying messages for users that just joined the server .. Will see ..
07:41:47 <DorpsGek> [OpenTTD/OpenTTD] gh658804 started discussion #10401: Maintenance on helicopters https://github.com/OpenTTD/OpenTTD/discussions/10401
07:42:52 <andythenorth[d]> moin
08:07:35 <LordAro> o/
08:09:08 <DorpsGek> [OpenTTD/OpenTTD] andythenorth commented on discussion #8446: Vehicle variants [newgrf] https://github.com/OpenTTD/OpenTTD/discussions/8446
08:11:26 <andythenorth[d]> I can't lock that discussion πŸ™‚
08:11:36 <andythenorth[d]> seems I'm missing a flag on my role somewhere
08:15:13 <DorpsGek> [OpenTTD/OpenTTD] andythenorth commented on discussion #9904: Livery Refit Alternative https://github.com/OpenTTD/OpenTTD/discussions/9904
08:19:28 *** supermop_toil has quit IRC (Read error: Connection reset by peer)
08:31:03 *** sla_ro|master has joined #openttd
08:42:25 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
09:36:56 <Merni> TallTyler: I was surprised too but it seems so :)
10:02:30 <dwfreed> TrueBrain: delay the relay to see if the message is deleted within X seconds
10:05:09 <reldred> just block all whitetext's from even seeing the channel, EZ
10:05:14 <reldred> *ducks*
10:06:24 <Merni> 😒
10:07:52 <reldred> I more meant anyone without a role at all but anyway πŸ˜›
10:08:37 <dwfreed> that's honestly a common anti-spam approach
10:09:03 <dwfreed> a bot monitors for reacts on the rules message, and gives you a role that lets you actually see channels besides the rules channel
10:09:29 <reldred> Once upon a time the dev channels were role locked.
10:09:40 <Merni> reldred: Well the JGR server role is just a reaction role
10:09:48 <reldred> I dunno if we need to go that far though.
10:09:57 <reldred> Merni: Yeah but spambots don’t even do that.
10:10:04 <Merni> Oh lol
10:10:06 <petern> 🎢 It's only forever, not long at all
10:11:10 <petern> That's how I feel about my CI/CD times πŸ˜„
10:13:23 <Merni> If you removed the mingw things from CI it might reduce a good bit :p
10:13:40 <petern> They're not on my own CI/CD.
10:13:45 <LordAro> Merni: CodeQL takes about the same amount of time now anyway
10:14:22 <petern> 3 minutes to build and deploy, such long!
10:15:04 * LordAro looks at 50 minutes to build, 90 minutes to test, 60 minutes for Extra Tests
10:15:10 * LordAro cries
10:50:36 <petern> Hmm, I wonder how long next-day delivery should take for something apparently sent on Wednesday.
10:51:51 <Merni> "Next weekday, I didn't say which week"
11:15:29 *** Samu has joined #openttd
11:20:21 <Samu> hello
11:20:50 <Samu> I had a fix for this in the past, it was rejected https://github.com/OpenTTD/OpenTTD/discussions/10401
11:40:02 <petern> Ooh, parcel arrived!
11:41:45 <petern> Oh, it's not for me. Argh.
11:46:41 <reldred> Oh dear once CNY is over I have so many parcels on the way
12:17:03 <TallTyler> andythenorth[d]: Done
12:19:37 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick opened pull request #10402: Change: allow GS to mutate vehicle orders (previously AI-only) https://github.com/OpenTTD/OpenTTD/pull/10402
12:24:31 <FLHerne> andythenorth[d]: not wanting to be negative, but why do you want GS to alter vehicle orders?
12:24:41 <FLHerne> it seems like a bit of a layering violation to me
12:24:55 <FLHerne> also, very likely to blow up AI companies if the GS alters theirs
12:31:53 <petern> They can already do other questionable stuff.
12:32:28 <DorpsGek> [OpenTTD/OpenTTD] FLHerne commented on discussion #10401: Maintenance on helicopters https://github.com/OpenTTD/OpenTTD/discussions/10401
12:33:23 <FLHerne> yeah, in isolation the ability to blow up AI isn't a big deal
12:33:30 <FLHerne> they mostly do it to themselves anyway
12:33:52 <FLHerne> but I'm struggling to imagine any case where the GS interfering with player orders is a good idea either
12:34:53 <petern> What about the ability for GS to sell player vehicles?
12:35:11 <petern> Or refit them.
12:35:33 <petern> Or stop/start them πŸ˜„
12:35:40 <petern> GS can do all that right now.
12:45:08 <TallTyler> It’s interesting how when a player uses a GS they basically consent to the GS doing whatever it wants, often with little to no documentation
12:45:26 <TallTyler> In that vein I say why not let it mess with orders too?
12:47:49 <Eddi|zuHause> https://twitter.com/BenGrossPhoto/status/1616576210770829312
12:49:00 <petern> TallTyler: Yup, I'm in favour of it. Especially as we like to defer gameplay decisions to GS.
12:49:08 <Eddi|zuHause> "error: disconnecting train"
12:49:28 <petern> Hah
12:50:33 <Eddi|zuHause> or as the display calls it "service interruption due to technical issues"
12:57:21 <andythenorth[d]> GS is an API, and whilst it's tempting to try and design what GS authors should be allowed to do, it's not the most ideal way to design APIs πŸ™‚
12:57:38 <andythenorth[d]> we should prevent infosec risks and obvious performance problems, but eh
14:17:23 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler updated pull request #10400: Fix #10395: When loading old saves, don't forcibly bar level crossings https://github.com/OpenTTD/OpenTTD/pull/10400
14:18:06 <andythenorth[d]> have we discussed lunch?
14:18:10 <Rubidium> as long as we don't have a function for a GS to get the password of a company (and also not a way for the AI ot get the password), then that should be fine infosec wise. After all, all the info an AI or GS has, the player has as well in the savegame/game state
14:19:39 <andythenorth[d]> so that's fine then πŸ˜„
14:20:00 <andythenorth[d]> I mean...just don't give GS local filesystem right access, and popen()
14:20:05 <andythenorth[d]> 'probably fine'
14:20:29 <petern> But what if I want it to play a video...
14:20:32 <Rubidium> well... we got GSEventAdminPort ;)
14:21:20 <andythenorth[d]> give it youtube πŸ˜›
14:21:33 <andythenorth[d]> new story page element
14:21:42 <LordAro> petern: it can use trees as pixels
14:21:51 <andythenorth[d]> or objects
14:21:53 <andythenorth[d]> 16k map
14:21:56 <Rubidium> so, in theory... if you have access to the admin port then a GS could divulge the other passwords via de admin port by getting the appropriate settings
14:21:57 <petern> Yes but it needs the source πŸ™‚
14:22:14 <andythenorth[d]> petern: a video embed for tutorials though... πŸ˜›
14:22:15 <petern> Video decoding in squirrel πŸ˜„
14:22:16 <andythenorth[d]> could be a thing
14:22:25 <petern> Video embed? lol no.
14:23:23 <andythenorth[d]> can we let GS run Java Applets?
14:23:49 <petern> ActiveX
14:23:54 <andythenorth[d]> yeah
14:24:02 <petern> Embedded Excel for those stats-lovers.
14:24:14 <andythenorth[d]> ODBC or whatever it was called
14:24:33 <Rubidium> andythenorth[d]: OLE?
14:24:54 <andythenorth[d]> that too
14:24:57 <andythenorth[d]> and a twitter feed
14:25:06 <andythenorth[d]> Object Linking and Embedding?
14:25:19 <petern> Yes, precursor to ActiveX.
14:26:03 <petern> Twitter feed but each player needs to use their on API keys because Twitter have blocked shared keys.
14:26:09 <petern> RIP third-party clients.
14:26:27 <andythenorth[d]> surprising Twitter outcomes
14:26:31 <andythenorth[d]> nobody would have predicted
14:26:44 <andythenorth[d]> ok so Rubidium says GS is at least as secure as Java Applets
14:26:56 <andythenorth[d]> so just performance issues to consider
14:27:32 <petern> Vulkan GS API?
14:28:09 <Samu> I was thinking ScriptGroup for GS's too
14:28:33 <Samu> what else is diabled for GS's?
14:28:42 <Samu> disabled*
14:28:48 <Rubidium> andythenorth[d]: well, I think we might want to restrict access to reading private/secret settings before I'd make that claim
14:29:23 <Samu> gss can already read and change game settings
14:29:42 <Samu> not sure if that includes private ones
14:29:59 <Rubidium> or maybe restrict reading secret settings (i.e. the passwords)
14:31:45 <Rubidium> though, you might want to consider whether we should even allow those settings to be written by scripts at all
14:43:05 <Rubidium> oh, even better... scripts may only read integers and not write those that are synced over the network already. So no access to passwords, only maybe the server port number though who cares?!? That's probably mostly the same for 99+% of the users. Would be nasty to make your script behave differently when you configured a different (admin) port :D
14:45:11 <Eddi|zuHause> that's the point where you ask about "do we care about phoning home and fingerprinting?"
14:46:09 *** WormnestAndroid has quit IRC (Remote host closed the connection)
14:54:39 <Rubidium> well... technically... I could release a nice GS that in network games checks for an user with a particular name and once that user joins put the admin port or something in a story page for only that user/company. Then you'd leak that, and you could run a password attack on the admin port and once in there you got all information.
14:56:15 <Rubidium> ... but that's not really a concern I have now. It would become a big concern when strings are added as supported setting type, as then I don't need to do the password attack. I can just put the password on the story page. Or worse, the invite secret so I can hijack the whole server's identity
14:58:39 <andythenorth[d]> I need to write a use case for GS areas
14:58:43 <andythenorth[d]> it's clear in my head
14:58:50 <andythenorth[d]> just not in written words yet πŸ˜›
14:59:16 <andythenorth[d]> the examples are all a bit sensible though
14:59:53 <andythenorth[d]> better would be example of how to recreate some 1980s computer game using OpenTTD as a platform
15:00:04 * andythenorth[d] awaiting inspiration
15:02:27 <Rubidium> are there no orthogonal/diagonal variants of the DemolishTile function?
15:08:19 <Rubidium> there is a PlantTreeRectangle but no DemolishTileRectangle?!? Might be unwanted. But then, there no diagonal variant of all those Rectangle functions... Would adding those solve most of andy's problems?
15:10:46 <andythenorth[d]> possibly, but frosch wrote an area spec, which is worth exploring πŸ™‚
15:11:15 <petern> Adding variants of existing commands is a bit limited.
15:11:48 <petern> (And what is the parent variant anyway :D)
15:12:00 *** nielsm has joined #openttd
15:12:31 <Rubidium> petern: sure, but... IMO scripts should not get special commands/variants only they can use
15:13:24 <petern> We're asking GS to control the gameplay, but then saying they can only do it in the way players can?
15:14:12 <andythenorth[d]> it's an API πŸ™‚
15:14:26 <andythenorth[d]> we'll figure it out in the end
15:14:28 <andythenorth[d]> πŸ™‚
15:16:09 <Rubidium> okay, I can see that point. Then limit that functionality only to GS? And obviously unit/regression test the .... out of it
15:16:38 <andythenorth[d]> that is a route yes
15:16:55 <andythenorth[d]> expose ~everything, rate limit things that are foot guns, test a lot
15:26:12 <Samu> SetPrimaryLiveryColour and SetSecondaryLiveryColour is exposed to GS'es
15:26:16 <Samu> is that intended?
15:26:44 <Samu> not that I'm complaining, I was actually gonna expose more functions to GS'es
15:27:48 <Samu> you can't rename a company or set a new president face/gender
15:27:55 <Samu> but you can set their colours
15:27:57 <Samu> as gs
15:28:06 <Samu> i find that a lapse?
15:36:24 <andythenorth[d]> Samu maybe just list everything in a google doc that GS can't do πŸ™‚
15:38:34 <TallTyler> I think Pruple made an auto-livery GS that sets colours automatically (randomly)
15:40:20 <Rubidium> I think you should ask the question in the reverse. What should not be available for GS? I could imagine the EnginePreview event not being sent to the GS. Definitely UseAsRandomAI doesn't belong to GS. Company::IsMine... that's tricky. All others I can't really think why you would want to disallow/disable them
15:43:50 *** HerzogDeXtEr has joined #openttd
16:09:34 <petern> The great thing about reactions is that IRC users don't see any of them.
16:13:53 <LordAro> πŸ₯³
16:16:51 <andythenorth[d]> ha ha
16:17:07 <andythenorth[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1067115778119323839/image.png
16:17:07 <andythenorth[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1067115778383552512/image.png
16:17:07 <andythenorth[d]> I have a service for that
16:18:43 <petern> Ah, RaaS
16:21:10 <andythenorth[d]> Rubidium as a Service?
16:21:16 <andythenorth[d]> also bring back Beluga
16:21:40 <andythenorth[d]> B^3
16:24:08 <LordAro> @seen Bjarni
16:24:08 <DorpsGek> LordAro: Bjarni was last seen in #openttd 11 years, 15 weeks, 6 days, 16 hours, 5 minutes, and 1 second ago: <Bjarni> heh
16:32:52 <Samu> andythenorth[d], https://gist.github.com/SamuXarick/f9d2ffa582c176a56f66a846e613f16b
16:42:59 *** WormnestAndroid has joined #openttd
16:43:12 *** Wormnest has joined #openttd
16:46:38 <Rubidium> only killer for removing even more @api -game tags, is that more functions should get a precondition check that it may only be executed in a company's scope. I wonder why ScriptCompany::SetName does when still in OWNER_DEITY mode, but I reckon that it's going to call the underlying command instead of some precondition that fails
16:52:26 <DorpsGek> [OpenTTD/OpenTTD] jengelh opened pull request #10403: Codechange: replace bridge cost loop by an O(1) calculation https://github.com/OpenTTD/OpenTTD/pull/10403
16:53:36 <LordAro> aaaah, floats
16:59:06 <petern> That's a weird place to find a performance improvement though.
16:59:32 <petern> (How often do you place bridges?)
17:06:39 <DorpsGek> [OpenTTD/OpenTTD] LordAro commented on pull request #10403: Codechange: replace bridge cost loop by an O(1) calculation https://github.com/OpenTTD/OpenTTD/pull/10403#issuecomment-1400684595
17:08:22 <DorpsGek> [OpenTTD/OpenTTD] glx22 approved pull request #10400: Fix #10395: When loading old saves, don't forcibly bar level crossings https://github.com/OpenTTD/OpenTTD/pull/10400#pullrequestreview-1266001214
17:08:25 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler merged pull request #10400: Fix #10395: When loading old saves, don't forcibly bar level crossings https://github.com/OpenTTD/OpenTTD/pull/10400
17:08:28 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler closed issue #10395: [Bug]: Loading a pre-#9931 savegame bars all level crossings, even when no train nearby https://github.com/OpenTTD/OpenTTD/issues/10395
17:14:53 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #10403: Codechange: replace bridge cost loop by an O(1) calculation https://github.com/OpenTTD/OpenTTD/pull/10403#pullrequestreview-1266010021
17:15:26 <petern> Does it? πŸ˜„
17:16:09 <TallTyler> Doesn't it?
17:17:26 <petern> I don't know.
17:17:26 <TallTyler> I guess it technically prohibits // on its own line, not the inverse
17:17:39 <petern> I hazard a guess that it's not something I follow πŸ™‚
17:17:47 <TallTyler> I've never seen block comments on the same line as anything in the OpenTTD code base though
17:17:55 <TallTyler> 🀷
17:20:31 <petern> I'm not saying you're wrong. Just my code probably is πŸ™‚
17:22:59 <DorpsGek> [OpenTTD/OpenTTD] George-VB commented on issue #10371: [Bug]: Different display of additional_text for vehicle, that is vehicle group in depot https://github.com/OpenTTD/OpenTTD/issues/10371
17:23:33 *** tokai has joined #openttd
17:23:33 *** ChanServ sets mode: +v tokai
17:30:33 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
17:30:49 <andythenorth[d]> so what do we do? GS for every CMD or something?
17:30:59 * andythenorth[d] looks in code
17:31:15 *** gelignite has joined #openttd
17:31:39 <andythenorth[d]> oh command_type.h πŸ˜„
17:31:46 <andythenorth[d]> that's better than I dared hope for
17:32:51 <andythenorth[d]> ok so that's game-state modifying stuff?
17:32:59 <andythenorth[d]> but not things like 'open a UI window'
17:34:09 <petern> There's no command for that, no.
17:34:20 <petern> Closest is the goal window.
17:35:27 <andythenorth[d]> assume I know nothing (not hard I know)
17:35:35 <andythenorth[d]> would opening a window be a command?
17:35:42 <andythenorth[d]> or are commands always modifying state?
17:35:50 <LordAro> TallTyler: `grep -PR '^.*[^\s].*/\*' src/ | grep -v "#\s*endif"` reveals a few things :p
17:36:07 <petern> If you want a GS to do it, you'd need a command for it.
17:37:25 <andythenorth[d]> so it would be a method extending GSWindow() and then a command
17:37:50 <andythenorth[d]> or alternatively GS walks the widget tree, clicking buttons
17:37:57 <andythenorth[d]> first way is better πŸ˜›
17:38:17 <petern> Clicking on a vehicle to open its window might be hard that way πŸ™‚
17:38:27 <andythenorth[d]> right
17:38:38 <andythenorth[d]> although there is the 'choose vehicle' button in story page
17:38:42 <andythenorth[d]> but that's the player
17:45:35 *** Gwyd has joined #openttd
17:45:35 <Gwyd> Any nfo knowers in the chat? How do I make a varact2 that queries signal state? So far I've got
17:45:35 <Gwyd> ```~*~ 02 0E 81 10 ?? ?? 01
17:45:35 <Gwyd> 01 00 ??
17:45:35 <Gwyd> 00 00```
17:46:36 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
17:50:31 <petern> Signals don't have varactions.
17:50:44 <andythenorth[d]> JGRPP
17:53:10 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
17:53:34 <Gwyd> Uh right yes that
17:53:40 <Gwyd> What I mean is railtype
17:56:23 <petern> Okay, railtypes are feature 0x10, not 0x0E. But there is no variable for signal status.
17:56:56 <petern> (Oh, maybe I'm misreading that NFO πŸ™‚
17:57:50 <petern> No
17:57:54 <petern> I'm wrong πŸ˜„
17:57:58 <petern> It's extra param2.
17:58:01 <petern> Is that var 18?
17:58:06 <FLHerne> petern: isn't var 18 signal status?
17:58:08 <FLHerne> ^
17:58:32 <FLHerne> https://newgrf-specs.tt-wiki.net/wiki/Action3/Railtypes#Signal_sprites_.280B.29
17:58:32 <petern> No clue, this wasn't in railtypes when I wrote it.
17:58:35 <Gwyd> The spec isn't very helpful in this respect
17:58:38 <FLHerne> I don't know why it's documented there
17:59:06 <petern> Huh, there's 4 signal types that don't exist.
18:08:27 <Gwyd> Yeah
18:09:00 <JGR> Gwyd: This is not going to work in vanilla
18:10:10 <Gwyd> In trunk nml I've been able to define signals by type (block/pre/path), electricness (semaphore/electric), and state (stop/go)
18:10:17 <Gwyd> Surely this can be done in nfo
18:11:03 <Gwyd> I know 0E va2, a3, and a0 don't exist
18:11:24 <Samu> question the code for ScriptCompany:GetPresidentName is much more complicated than the one in ScriptCompany::GetName, why's that?
18:12:10 <JGR> Gwyd: You can do this for railtypes in vanilla, this is not feature 0E
18:13:01 <JGR> See: <https://newgrf-specs.tt-wiki.net/wiki/Action3/Railtypes#Signal_sprites_.280B.29>
18:14:10 <petern> Samu: Not sure, it seems to return an empty string if the company is invalid, instead of null (like GetName does)
18:17:47 <Rubidium> Samu: probably because somebody simplified some code, then search for locations by search for GetName (e.g. ScriptEngine::GetName is basically the same)
18:20:33 <Samu> I see
18:22:36 <petern> Easy PR πŸ™‚
18:23:26 <FLHerne> Gwyd: anything that can be done in NML can be done in NFO
18:24:01 <FLHerne> Gwyd: run nmlc working.nml --nfo output.nfo and see what it's doing ;-)
18:25:23 <FLHerne> nmlc can be run as an NML-to-NFO compiler, besides NML-directly-to-bytecode
18:26:27 <Samu> it's so cold in my room, time to heat my GPU
18:27:39 <andythenorth[d]> stuff https://gist.githubusercontent.com/andythenorth/c0c9d2425d575e971d93d8b0cdb837ff/raw/019b1eb21553d442e373c24dedc7070182e891c4/gistfile1.txt
18:27:41 <andythenorth[d]> areas
18:28:07 <andythenorth[d]> it's not impossible to approximate areas in grf btw, it's just really limited, as grf has no overall map view or flow control
18:28:33 <andythenorth[d]> I do use areas in grf, they're just rudimentary and prone to maps with weird industry placement failures
18:28:39 *** keikoz has joined #openttd
18:29:17 <andythenorth[d]> I favour idea 1, areas are just lists of tiles, as it's pretty much GSTileList already
18:29:40 <andythenorth[d]> but implementations are...I defer to others πŸ˜›
18:33:22 <petern> Definitely turtles.
18:33:55 <andythenorth[d]> every time in my career that turtles has looked good
18:34:00 <andythenorth[d]> it has been a mistake πŸ˜›
18:34:06 <andythenorth[d]> objects in objects
18:34:12 <andythenorth[d]> dashboards in dashboards
18:34:18 <andythenorth[d]> oh wait, folders in folders is fine
18:34:19 <petern> I just like turtles.
18:34:56 <andythenorth[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1067150461116882954/turtlesallthewaydown.png
18:35:11 <andythenorth[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1067150522399866931/51y2FOnmWWL.png
18:43:55 <DorpsGek> [OpenTTD/OpenTTD] DorpsGek pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/97844df123d1888a042644097c873c3495ec54a4
18:43:56 <DorpsGek> - Update: Translations from eints (by translators)
18:53:39 <andythenorth[d]> ok so just for experimenting....
18:53:52 <andythenorth[d]> to prospect from a reduced range of tiles
18:54:02 <andythenorth[d]> would patching RandomTile() be a possible approach?
19:01:54 <andythenorth[d]> nah probably not trivially
19:02:18 <andythenorth[d]> if I read RandomTile() it's generating a tile index from a seed, rather than walking a list of tiles and picking one?
19:03:16 <andythenorth[d]> we'd need something like a list of tiles, then a seed scaled to the length of that list, then pick an index that way
19:03:24 <andythenorth[d]> but that seems like reinventing random?
19:06:17 <petern> You don't scale a seed.
19:06:33 <andythenorth[d]> right
19:06:58 <andythenorth[d]> if we start from andythenorth[d] doesn't know what a seed is, really πŸ˜›
19:08:37 <glx[d]> random range for x and y and conversion of (x,y) to TileIndex should be possible already
19:10:02 <glx[d]> https://docs.openttd.org/gs-api/classGSMap.html#af6f67891630768b10eda045c6def5aaa
19:10:17 <andythenorth[d]> I'm trying to patch core game πŸ™‚
19:10:24 <DorpsGek> [OpenTTD/OpenTTD] jengelh commented on pull request #10403: Codechange: replace bridge cost loop by an O(1) calculation https://github.com/OpenTTD/OpenTTD/pull/10403#issuecomment-1400842282
19:10:29 <andythenorth[d]> CmdBuildIndustry
19:11:03 <petern> If you define a region with areas, you can then pick a random tile and test if that tile is covered by the area, if not do it again. Or you can build a list of all the tiles covered by the area and just pick a random one from that list. Not efficient though πŸ˜„
19:11:22 <petern> If you have a random range for x and y, then you can only do rectangles.
19:12:02 <andythenorth[d]> petern: can do that in GS I think by prospecting in test mode πŸ™‚
19:12:08 <andythenorth[d]> ah no, random πŸ˜›
19:12:10 <andythenorth[d]> silly me
19:12:13 <petern> LordAro, predictable pushback there πŸ™‚
19:13:12 <LordAro> petern: your turn :)
19:13:46 <petern> Also literal answer to misreading the question of how it was found πŸ™‚
19:26:42 <DorpsGek> [OpenTTD/OpenTTD] FLHerne commented on pull request #10403: Codechange: replace bridge cost loop by an O(1) calculation https://github.com/OpenTTD/OpenTTD/pull/10403#issuecomment-1400865031
19:27:18 <TallTyler> Excellent answer, helps me understand why too πŸ™‚
19:27:57 <TallTyler> Beyond "floating point is dangerous for desyncs because floats are weird"
19:28:41 <andythenorth[d]> my beer has finished
19:28:43 <andythenorth[d]> another?
19:30:40 <andythenorth[d]> OR wine?
19:30:55 <LordAro> not XOR, i notice
19:35:00 <petern> TBH it's probably unlikely that you'd get different answers for this particular one.
19:35:35 <andythenorth[d]> got wine
19:35:42 <petern> I've got tea
19:35:46 <andythenorth[d]> not XOR no
19:36:05 <andythenorth[d]> but I didn't double park
19:36:33 <andythenorth[d]> well I could reimplement prospecting entirely in GS
19:36:47 <andythenorth[d]> firs.lol.prospect(industry, tile_list)
19:37:13 <andythenorth[d]> but ottd tries 5000 times to prospect, and with different layouts
19:37:29 <andythenorth[d]> not sure I can replicate that in GS πŸ˜›
19:37:51 <petern> ottd does it for you.
19:37:54 <andythenorth[d]> isn't it
19:38:03 <petern> Oh, reimplement. Heh
19:38:14 <andythenorth[d]> mostly because I can see how to do that πŸ˜›
19:38:25 <andythenorth[d]> and not how to limit the tile range for ottd prospecting
19:38:38 <andythenorth[d]> 'lack of vision or skill' is always a great way to design
19:39:04 <andythenorth[d]> also I'd have to add a new set of event s
19:39:29 <andythenorth[d]> GSEventGameWantsToBuildAnIndustry()
19:39:33 <andythenorth[d]> seems....ass backwards πŸ˜„
19:40:49 <andythenorth[d]> I mean....we could move ALL the game logic into GS πŸ˜›
19:41:58 <andythenorth[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1067167328237781022/software_development.png
19:42:47 <JGR> andythenorth[d]: You could, but performance would be atrocious
19:45:15 <andythenorth[d]> move GS to C++ πŸ˜›
19:45:20 <andythenorth[d]> write native
19:45:37 <andythenorth[d]> https://tenor.com/view/what-could-possibly-go-wrong-cartman-south-park-whats-the-worst-that-could-happen-nothing-is-going-to-happen-gif-22243962
19:47:29 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on issue #10371: [Bug]: Different display of additional_text for vehicle, that is vehicle group in depot https://github.com/OpenTTD/OpenTTD/issues/10371
19:50:41 <TallTyler> petern: Turns out #10371 is a variants bug, I think I diagnosed it in the bottom comment and assigned you πŸ™‚
20:02:05 <Samu> CmdSetCompanyManagerFace doesn't have safety measures against invalid companies
20:02:40 <Samu> in the event of a gs being allowed to SetPresidentGender
20:04:27 <andythenorth[d]> does it crash the game?
20:04:59 <Samu> no, because DoCommands fail before even reaching there
20:05:04 <Samu> i think, let me verify
20:08:24 <Samu> yes
20:08:29 <Samu> it fails CommandHelperBase::InternalExecutePrepTest
20:08:45 <Samu> so it doesn't reach CmdSetCompanyManagerFace
20:09:55 <Samu> the command doesn't have a CMD_DEITY flag, that's why
20:11:19 <glx[d]> It's fine then
20:12:01 <glx[d]> And it should work in company scope
20:15:01 <petern> It's almost like those preconditions are a bit pointless πŸ˜‰
20:15:22 <Samu> they are useful just for the Error message
20:16:37 <andythenorth[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1067176048103542804/image.png
20:16:37 <andythenorth[d]> I did a stupid πŸ˜„
20:16:46 <andythenorth[d]> ` do {
20:16:46 <andythenorth[d]> tile = RandomTile();
20:16:46 <andythenorth[d]> }
20:16:46 <andythenorth[d]> while (tile < 10000 || tile > 20000);
20:16:46 <andythenorth[d]> `
20:16:56 <andythenorth[d]> I know that unclosed do..while is unwise
20:18:16 <andythenorth[d]> does the game have any concept of tile range or tile list beyond GSTileList?
20:21:15 <Samu> GetTileX(tile) < 10000 maybe
20:21:20 <Samu> or TileY
20:21:43 *** MaverickFischer has quit IRC (Remote host closed the connection)
20:22:08 <andythenorth[d]> ideally arbitrary lists of tiles, not necessarily sequential
20:22:15 <andythenorth[d]> and with a way to pop one random item from the list
20:23:13 <JGR> This sounds like it's going to use up a lot of memory unnecessarily
20:23:30 <JGR> What is wrong with a list of rectangles?
20:24:14 *** MaverickFischer has joined #openttd
20:24:25 *** Etua has joined #openttd
20:24:28 <Samu> you can use floating points in squirrel
20:24:31 <Samu> double etc
20:24:51 <petern> No problem there.
20:27:00 <andythenorth[d]> JGR: maybe nothing
20:27:06 <andythenorth[d]> precision might not be needed
20:27:17 <andythenorth[d]> but I think also circles might be a thing
20:27:24 *** Etua has quit IRC ()
20:27:26 *** Etua has joined #openttd
20:27:28 <andythenorth[d]> there must be a fast way to approximate certain primitive shapes
20:27:43 <Samu> ScriptOrder and ScriptCompany are done! https://github.com/OpenTTD/OpenTTD/compare/master...SamuXarick:OpenTTD:expose-more-functions-to-GSs
20:27:46 <andythenorth[d]> backface culling? πŸ˜›
20:28:44 <petern> rects, circles and diamonds are probably easy enough. combing several "areas" into a "region" is simple enough and doing OR/AND operations with those is fine (but probably getting too complex already)
20:30:40 <andythenorth[d]> I wanted to write my name in a region πŸ˜›
20:30:45 <andythenorth[d]> ok lots of 1 tile rects? πŸ˜›
20:31:12 <JGR> I'm pretty sure that there's a memory limit for scripts
20:31:34 <Samu> ScriptGroup is next, this one is huge
20:33:19 <andythenorth[d]> the scripts don't necessarily have to build the tile list
20:33:29 <andythenorth[d]> if openttd can handle the primitives
20:33:40 <andythenorth[d]> the scripts just need to pass a set of primitive constructors
20:33:45 <andythenorth[d]> or arbitrary functions πŸ˜›
20:34:33 <JGR> A primitive which allocates memory for each tile index in an area is too tempting a footgun
20:34:57 <andythenorth[d]> imagine how many people might make πŸ™‚
20:35:32 <andythenorth[d]> I mean...you can't trust GS authors, they do stuff like walk all tiles and copy properties from them into table slots
20:50:15 <michi_cc[d]> Anybody renamed their engine variants yet?
20:51:13 <andythenorth[d]> I need to apply the nml patch
20:51:16 <andythenorth[d]> I'll do it now πŸ™‚
20:51:24 <andythenorth[d]> while somebody implements Areas πŸ˜›
20:52:02 <andythenorth[d]> https://wiki.openttd.org/en/Development/Design%20Drafts/Scripts/Area%20Control
20:58:09 *** Etua has quit IRC (Quit: Etua)
20:58:59 *** gelignite has quit IRC (Quit: Stay safe!)
21:00:17 <Samu> strange!
21:01:26 <Samu> ScriptGameSettings::IsDisabledVehicleType is not exposed to GS, but when the GS is in company mode and builds a vehicle, ScriptGameSettings::IsDisabledVehicleType is accessed either way
21:01:34 <andythenorth[d]> hmm how do I build Iron Horse?
21:01:38 * andythenorth[d] has only been doing GS :P
21:02:07 <Samu> ScriptVehicle::BuildVehicle has a call to ScriptGameSettings::IsDisabledVehicleType
21:15:23 <andythenorth[d]> hmm
21:15:34 <andythenorth[d]> money element for GS story page
21:15:40 <andythenorth[d]> then can do auctions and bid for things
21:15:42 <andythenorth[d]> town access etc
21:15:45 <andythenorth[d]> also for lolz
21:18:08 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:20:15 <andythenorth[d]> ok can we use the face generator also on story pages?
21:20:24 <andythenorth[d]> then we can do 'choose your chief engineer' etc
21:20:36 <andythenorth[d]> ha could have a report on every train, and show the driver
21:24:36 <Samu> I thing Group Owner should be exposed to GS'es, it doesn't exist yet, and it won't make sense to exist for AI
21:24:57 <Samu> but the idea is so that I could get the entire list of groups
21:25:00 <Samu> of any owner
21:25:44 <Samu> without having to get into companymode
21:26:49 <andythenorth[d]> michi_cc[d]: so the var (vars?) need naming in nml for name callback?
21:26:57 <andythenorth[d]> or do I fail at reading the patch? πŸ™‚
21:28:24 <andythenorth[d]> or I can reuse var 10 maybe
21:28:26 <Samu> how many groups can be created per company?
21:28:34 <Samu> or is the pool shared by all companies?
21:31:08 <andythenorth[d]> seems maybe those sprite vars aren't named
21:31:18 <andythenorth[d]> nml docs link to https://newgrf-specs.tt-wiki.net/wiki/Action2/Vehicles#Drawing_different_sprites_on_map_in_various_GUIs
21:36:52 <andythenorth[d]> ok it helps if I call the switch from the callback handler
21:38:09 <michi_cc[d]> The var is callback_info1. No idea if the constants are a name in NML, in my example I just used the numeric values.
21:38:58 <andythenorth[d]> constants aren't named, but I can just use the hex values
21:39:08 <andythenorth[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1067196813150527628/image.png
21:39:38 <andythenorth[d]> I didn't try to break it yet πŸ˜„
21:40:11 <andythenorth[d]> did I count correctly for indentation check, or do I obiwan? getbits(extra_callback_info1, 8, 23)
21:40:49 <michi_cc[d]> Number of bits is 24, but in practive indentation is only an 8 bit value in OTTD anyway.
21:40:59 <andythenorth[d]> so just pick 8?
21:41:06 <andythenorth[d]> ok
21:41:14 <andythenorth[d]> hmm too late to add this to 13.0?
21:41:25 <andythenorth[d]> 13.1 then πŸ˜›
21:43:22 <michi_cc[d]> The easiest way to break this (or more exactly NML) is to try to name more than 1024 vehicles. It is possible to use the text stack and a string that just includes another string to get around the callback text limit, but I am not smart enough to figure out how to patch NML to get it to allocate a `srtring(STR_XXX)` into the D8xx area instead of the D0xx area.
21:43:55 <andythenorth[d]> even I don't have 1024 vehicles
21:44:16 <andythenorth[d]> well I have 1214
21:44:25 <michi_cc[d]> Well, cargo subtype strings and extra engine info text also count against this limit.
21:44:25 <andythenorth[d]> but that includes articulated parts with no name πŸ˜›
21:45:31 <andythenorth[d]> if I name all the variants individually I might get close to breaking this
21:45:31 <andythenorth[d]> nmlc info: D0xx strings: 417/102
21:46:33 <TallTyler> Owner face in storybook would be pretty funny
21:47:08 <andythenorth[d]> story book needs a lot more stuff
21:47:11 <andythenorth[d]> 'needs'
21:49:38 <michi_cc[d]> It is easy enough to get over the 1024 callback string limit for this callback by returning a string with a `{STRING}` in it and pushing the actual string onto the text stack. The string include can also use the D8xx (up to FFFF now with this PR) area, but NML seems to allocate any string referenced from an Action2 in any shape or form into the D0xx area, no matter if it really a callback result or just put into a text stack regi
21:51:04 <petern> GSStoryBook.SetPixel
21:54:06 <DorpsGek> [OpenTTD/OpenTTD] George-VB commented on issue #10371: [Bug]: Initializing available engine GUI forces selection of top vehicle, even if it's an unavailable variant https://github.com/OpenTTD/OpenTTD/issues/10371
21:56:09 <andythenorth[d]> petern: GSBBCBasic.Draw(x, y)
21:56:17 <petern> Plot 69
21:56:21 <andythenorth[d]> GSBBCBasic.Move(xoffs, yoffs)
21:56:29 <andythenorth[d]> can we implement BBC Basic in GS?
21:56:31 <andythenorth[d]> probs
21:56:39 <andythenorth[d]> we have arrays and crap
21:56:57 <andythenorth[d]> so multi-line text entry field in story book
22:00:19 <petern> Okay, can I have a 32" e-paper display?
22:00:56 <DorpsGek> [OpenTTD/OpenTTD] andythenorth commented on pull request #10399: Feature: [NewGRF] Engine name callback. https://github.com/OpenTTD/OpenTTD/pull/10399#issuecomment-1401053293
22:01:40 <andythenorth[d]> petern: for openttd?
22:01:47 <petern> No for sheet music πŸ˜„
22:02:09 <petern> I rotated my 22" monitor to make it big enough, but the rotated TN panels suck.
22:02:24 <petern> https://www.padformusician.com/en/padmu/34-40-padmu-4.html#/2-version-double
22:02:26 <petern> Oh please
22:02:39 <andythenorth[d]> cheap at the price
22:07:11 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:19:35 <andythenorth[d]> is it sleeping?
22:25:30 <FLHerne> petern: 'cheaper' to buy two of these https://remarkable.com/store/remarkable-2
22:25:52 <FLHerne> You can install generic Linux software on them, so could probably get them to sync like that
22:32:14 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on issue #10371: [Bug]: Initializing available engine GUI forces selection of top vehicle, even if it's an unavailable variant https://github.com/OpenTTD/OpenTTD/issues/10371
22:37:29 <michi_cc[d]> andythenorth[d]: NB you can save some text IDs by returning `CB_RESULT_NO_TEXT` to make OTTD use the name property string (which does not count towards the string limit) for "uninteresting" contexts.
22:37:42 <andythenorth[d]> oh worth knowing πŸ™‚
22:38:12 <DorpsGek> [OpenTTD/OpenTTD] andythenorth commented on pull request #10399: Feature: [NewGRF] Engine name callback. https://github.com/OpenTTD/OpenTTD/pull/10399#issuecomment-1401104336
22:38:15 <michi_cc[d]> Or just fail the callback, but I think this is more explicit.
22:39:55 <andythenorth[d]> probably cuts a lot of strings out in my case
22:39:57 <andythenorth[d]> nmlc info: D0xx strings: 21/1024
22:40:25 <andythenorth[d]> that will grow, but maybe a few hundred
22:40:49 <andythenorth[d]> based on diagrams and schemas I've seen, other authors might hit this rather sooner
22:41:02 <andythenorth[d]> some grfs are implementing 4 or 5 levels of nested variant
22:41:32 <michi_cc[d]> Yeah, max number of engines > 1024, which is why the extended D8xx string range is combined into the PR.
22:43:22 <andythenorth[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1067212981689143387/image.png
22:43:22 <andythenorth[d]> will I name all the liveries? πŸ˜›
22:44:23 <andythenorth[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1067213234798612480/image.png
22:44:23 <andythenorth[d]> the simple version πŸ˜›
22:45:29 <andythenorth[d]> wonder if I can just empty string πŸ˜›
22:46:15 <andythenorth[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1067213705252708393/image.png
22:46:15 <andythenorth[d]> can't tell which one is selected when empty string πŸ˜„
22:47:21 <andythenorth[d]> seems nml doesn't have the string code for the 'train' icon πŸ˜„
22:49:13 <michi_cc[d]> Docs say `{TRAIN}`. https://newgrf-specs.tt-wiki.net/wiki/NML:Language_files
22:52:10 <andythenorth[d]> thanks
22:52:59 <andythenorth[d]> https://cdn.discordapp.com/attachments/1008473233844097104/1067215397977346149/image.png
22:52:59 <andythenorth[d]> quite silly πŸ™‚
22:55:17 *** Fairy has joined #openttd
22:55:17 <Fairy> Question about #10399, am I correct in understanding that this allows you to set the name in the build menu to be different to the name in the vehicle menu once you've bought it? Or am I completely misunderstanding it?
22:56:16 <DorpsGek> [OpenTTD/OpenTTD] PeterN opened pull request #10404: Fix #10220: Don't select unselectable engine as default. https://github.com/OpenTTD/OpenTTD/pull/10404
22:59:09 <michi_cc[d]> Fairy: There's no vehicle menu that would show the engine, but you can have a different name shown in the vehicle details information panel.
22:59:41 <Fairy> ...and question for #10404 too. Does this mean we can't use non-buyable vehicles as 'variant headers'? Like, if I want the vehicle that shows as the top level but can't be bought, would this prevent that?
22:59:43 <michi_cc[d]> The names/the callback is engine-specific though, not vehicle specific. You don't get the variables of the vehicle in the CB chaiun.
23:00:09 <petern> Fairy: No, it just stops it from being selected for purchase.
23:00:21 <Fairy> Ah, okay
23:00:35 <petern> It can't be selected anyway, except if it is the first item in the list when you open the build window.
23:02:45 <DorpsGek> [OpenTTD/OpenTTD] glx22 approved pull request #10404: Fix #10220: Don't select unselectable engine as default. https://github.com/OpenTTD/OpenTTD/pull/10404#pullrequestreview-1266552123
23:04:06 <Samu> GetNumEngines is complicated
23:04:19 <andythenorth[d]> ok sleeping time
23:04:21 <Samu> it forces me to enter companymode
23:04:31 <Samu> ScriptGroup.GetNumEngines that is
23:04:55 <glx[d]> yes, because it's different depending on previews
23:07:24 <Fairy> petern: ... question. what if all vehicles in the purchase list are unavailable, and only the ones that are available are variants. Would it auto select a variant?
23:07:25 <Samu> no, it's because GROUP_DEFAULT and GROUP_ALL exists for all companies, so it has to be specific
23:09:17 <Samu> alright, bed time, i've been through half of ScriptGroup, the worst part is yet to come
23:09:21 <andythenorth[d]> Oops sleeping fail
23:09:25 <Samu> cyas goodnight
23:09:37 *** Samu has quit IRC (Quit: Leaving)
23:10:05 <andythenorth[d]> Maybe GS should have a method to suppress aspects of map gen that it wishes to control
23:10:19 <petern> I need MS Teams to auto-disconnect at 5pm...
23:10:22 <andythenorth[d]> Like generating industry, town etc
23:10:35 <andythenorth[d]> Oh dear teams
23:11:11 <andythenorth[d]> We have gchat, in a browser, which people close at end of working day
23:11:13 <petern> I also need to remember that if my boss asks me to help him with a report, I don't actually need to deal with until 9am...
23:11:22 <andythenorth[d]> I remind you
23:11:27 <petern> Teams is like "yeah, you remember you quit me? lol no"
23:11:38 <petern> You did once, and that was actually useful lol
23:12:01 <andythenorth[d]> Boss is just sending mail before bed to not forget
23:12:12 <andythenorth[d]> β€œProbs”
23:12:24 <andythenorth[d]> Hmm anyway GS things
23:12:49 <andythenorth[d]> GSworldgen.allowtrees(bool)
23:12:54 <petern> Nah, he likes to pore over spreadsheets on his holidays.
23:13:01 <andythenorth[d]> Oh
23:13:39 <andythenorth[d]> Holidaying incorrectly, 0/10
23:13:59 <andythenorth[d]> I did write a reporting app on xmas day once
23:14:36 <reldred> I flew halfway across the state on christmas eve once to fix a system that got struck by lightning
23:14:40 <andythenorth[d]> Ok GSForest.PlantTrees(RegionID)
23:15:08 <andythenorth[d]> GSForest.Beavers(bool)
23:15:30 <andythenorth[d]> or would it be count of beavers per tile?
23:15:33 <petern> Can I rewrite my job to run on the cloud?
23:15:39 <andythenorth[d]> Also bears
23:15:42 <petern> Outsourced ChatGPT programmer?
23:15:49 <andythenorth[d]> Yes
23:15:54 <petern> Would probably do a better job.
23:16:40 <andythenorth[d]> local bears = GSForest.AddBears(tile, count)
23:16:52 <andythenorth[d]> bears.eat()
23:16:58 <andythenorth[d]> Etc
23:17:54 <andythenorth[d]> What do bears even add to gameplay though?
23:18:50 <petern> Population control.
23:19:39 <andythenorth[d]> Need a porridge entity
23:19:56 <andythenorth[d]> And goldilocks methods
23:19:57 <petern> cargotype porridge
23:20:12 <andythenorth[d]> Subtypes
23:20:21 <andythenorth[d]> Hot, cold, just right
23:20:34 <andythenorth[d]> First valid use of subtypes ever
23:21:01 *** kamnet has joined #openttd
23:21:01 <kamnet> Cargo chain forest -> Wood cutter -> Timber -> Furniture Factor - > Beds -> Furniture store in the middle of the forest
23:25:19 <Fairy> kamnet: Honestly that last part reminds me of one of the main reasons why I love ITI and PIRS so much. No random big secondary/tertiary industry out in the middle of nowhere, they're always near cities. I feel like more industry GRFs should do that.
23:25:25 <andythenorth[d]> NoForests PR when?
23:25:45 <petern> ?
23:26:14 <andythenorth[d]> Needed for bears
23:27:03 <andythenorth[d]> Or maybe NoBears
23:27:12 <andythenorth[d]> NotBears?
23:28:05 <Fairy> UnBearAble
23:30:28 <andythenorth[d]> πŸ‘
23:31:39 <petern> Ahh <https://www.youtube.com/watch?v=t2fnlxXK0f8>
23:42:53 <TallTyler> reldred: I spent a Christmas Eve once pouring buckets of hot water into toilets of my train to thaw out the frozen holding tanks, in the snow. Truly miserable. πŸ˜›
23:45:35 <reldred> Lmao
23:45:41 <reldred> Sounds pleasant
23:58:33 <kamnet> Ursus Add-On Set.