IRC logs for #openttd on OFTC at 2023-01-23
β΄ go to previous day
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
02:18:19 <supermop_Home_> bummer, i could think of a few things to blow 50 grand on
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)
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 ..
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: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: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: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: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: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: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: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: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: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: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: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: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:23:23 <andythenorth[d]> can we let GS run Java Applets?
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: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:28:09 <Samu> I was thinking ScriptGroup for GS's too
14:28:33 <Samu> what else is diabled for GS's?
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: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: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: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: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:17:07 <andythenorth[d]> I have a service for that
16:21:10 <andythenorth[d]> Rubidium as a Service?
16:21:16 <andythenorth[d]> also bring back Beluga
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: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: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: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:20:31 <petern> I'm not saying you're wrong. Just my code probably is π
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: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> 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:46:36 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
17:50:31 <petern> Signals don't have varactions.
17:53:10 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
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:58:06 <FLHerne> petern: isn't var 18 signal status?
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: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: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: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: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: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: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: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: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:17 <andythenorth[d]> I'm trying to patch core game π
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:13 <petern> LordAro, predictable pushback there π
19:13:46 <petern> Also literal answer to misreading the question of how it was found π
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:35:00 <petern> TBH it's probably unlikely that you'd get different answers for this particular one.
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: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:42:47 <JGR> andythenorth[d]: You could, but performance would be atrocious
19:45:15 <andythenorth[d]> move GS to C++ π
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: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: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]> I did a stupid π
20:16:46 <andythenorth[d]> tile = RandomTile();
20:16:46 <andythenorth[d]> while (tile < 10000 || tile > 20000);
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: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:28 <Samu> you can use floating points in squirrel
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:28 <andythenorth[d]> there must be a fast way to approximate certain primitive shapes
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:58:09 *** Etua has quit IRC (Quit: Etua)
20:58:59 *** gelignite has quit IRC (Quit: Stay safe!)
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: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: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: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: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: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: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:56:09 <andythenorth[d]> petern: GSBBCBasic.Draw(x, y)
21:56:21 <andythenorth[d]> GSBBCBasic.Move(xoffs, yoffs)
21:56:29 <andythenorth[d]> can we implement BBC Basic in GS?
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: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: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:52 <FLHerne> You can install generic Linux software on them, so could probably get them to sync like that
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: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]> will I name all the liveries? π
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]> 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:52:59 <andythenorth[d]> quite silly π
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: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: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: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: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: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: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: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:42 <petern> Outsourced ChatGPT programmer?
23:15:54 <petern> Would probably do a better job.
23:16:40 <andythenorth[d]> local bears = GSForest.AddBears(tile, count)
23:17:54 <andythenorth[d]> What do bears even add to gameplay though?
23:19:39 <andythenorth[d]> Need a porridge entity
23:19:56 <andythenorth[d]> And goldilocks methods
23:20:21 <andythenorth[d]> Hot, cold, just right
23:20:34 <andythenorth[d]> First valid use of subtypes ever
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:26:14 <andythenorth[d]> Needed for bears
23:27:03 <andythenorth[d]> Or maybe NoBears
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. π
continue to next day β΅