IRC logs for #openttd on OFTC at 2023-01-16
00:02:15 <glx[d]> ok let's try to reproduce #10361
00:08:08 *** Soni has quit IRC (Ping timeout: 480 seconds)
00:09:26 <glx[d]> and it doesn't crash for me
00:10:26 <glx[d]> oh maybe the comment location is important
00:15:55 *** WormnestAndroid has joined #openttd
00:16:01 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on issue #10361: [Crash]: GS crashes OpenTTD with malformed comment prefix
00:30:15 *** Wormnest has joined #openttd
00:50:55 *** Etua has joined #openttd
01:04:36 *** Etua has quit IRC (Ping timeout: 480 seconds)
01:29:36 *** TROILUS has joined #openttd
01:30:36 *** TROILUS has quit IRC ()
01:30:55 *** TROILUS has joined #openttd
01:57:53 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
02:10:55 *** tokai has joined #openttd
02:10:55 *** ChanServ sets mode: +v tokai
02:17:41 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
03:04:41 *** supermop_Home has quit IRC (Ping timeout: 480 seconds)
03:08:36 *** Soni has joined #openttd
03:15:26 *** D-HUND has joined #openttd
03:18:48 *** debdog has quit IRC (Ping timeout: 480 seconds)
04:00:59 *** WormnestAndroid has joined #openttd
04:16:05 *** Wormnest has quit IRC (Quit: Leaving)
04:40:53 *** D-HUND is now known as debdog
04:41:02 *** keikoz has joined #openttd
05:05:06 *** Flygon has joined #openttd
06:01:06 *** keikoz has quit IRC (Ping timeout: 480 seconds)
07:00:23 <Pruple> is there a list somewhere of all the yapf pathfinder penalties?
07:07:18 <andythenorth[d]> ouch
07:07:28 <andythenorth[d]> certain regrets
07:12:27 <DorpsGek> [OpenTTD/OpenTTD] PikkaBird opened issue #10362: [Bug]: Bridges cannot not have a speed limit
07:13:17 *** Etua has joined #openttd
07:14:30 <Pruple> andythenorth[d]: but then again
07:15:12 *** Etua has quit IRC ()
07:15:18 <andythenorth[d]> going to bed early never works
07:16:36 <Pruple> what, never?
07:25:55 <DorpsGek> [OpenTTD/OpenTTD] superfloh247 commented on issue #10275: [Crash]: crash closing dialogue box
07:30:00 <andythenorth[d]> caught the mouse
07:40:07 <DorpsGek> [OpenTTD/OpenTTD] TrueBrain commented on issue #10361: [Crash]: GS crashes OpenTTD with malformed comment prefix
07:41:18 <andythenorth[d]> check my eyes.....industry has no GS method to get the town it belongs to?
07:41:28 <andythenorth[d]> and towns have no method to get nearest industry of type X?
07:41:49 *** sla_ro|master has joined #openttd
07:44:49 <andythenorth[d]> 2022 code I wrote here suggests nearest industry has to be calculated in GS
07:45:32 <andythenorth[d]> which is fine, but I can't rely on that to find the town
07:45:36 <andythenorth[d]> wonder if the tile has it
07:46:24 <Pruple> you can GetClosestTown for a tile
07:46:28 <andythenorth[d]> thanks
07:46:33 <andythenorth[d]> and Authority it seems
07:46:45 <Pruple> no guarantee that that's the town that owns the industry though ๐Ÿ™‚
07:47:28 <andythenorth[d]> I wonder which tile offset the industry location is reported as
07:47:42 <Pruple> 0, 0 I'd assume
07:47:44 <andythenorth[d]> assuming it will be relative 0, 0 N
07:48:17 <andythenorth[d]> so how many farms should there be per town in a Steeltown map? ๐Ÿ˜›
07:48:26 <andythenorth[d]> 'Farmtown' by accident
07:49:04 <andythenorth[d]> 0.5 seems about right
07:51:19 <Pruple> I'm surprised(ish) there isn't an IndustryList_Town
07:51:56 <Pruple> can you get the name of the industry, remove the name of the industry type from the end of the string, and then find the town by name? ๐Ÿคฃ
07:52:17 <andythenorth[d]> probably
07:52:22 <andythenorth[d]> can players rename them?
07:52:36 <Pruple> you cannot rename industries
07:52:47 <andythenorth[d]> Superlib might have some of this stuff
07:52:52 <Pruple> and renaming towns automatically updates the name of the industries ๐Ÿ‘
07:52:59 <andythenorth[d]> I'm considering a lib for things, but I don't want to support it ๐Ÿ˜›
07:53:52 <Gwyd> andythenorth[d]: I'd take up to 2 or 3 on a lower density map
07:54:43 <andythenorth[d]> measuring density relative to map size is probably doable
07:55:43 <andythenorth[d]> I am going to give farms a gameplay effect on towns, so there's eye candy vs. gameplay to consider
07:57:21 <andythenorth[d]> Pruple: does seem like TownList_Industries or vice versa should be a thing
07:57:25 <andythenorth[d]> should we?
08:06:23 <petern> Is it?
08:17:01 <andythenorth[d]> not yet
08:21:17 <Gwyd> Tbh I'd say having a %age coverage of farm coverage on a map would be a fun way of doing it
08:23:54 <andythenorth[d]> by field size?
08:30:58 <andythenorth[d]> wonder if a GS can be 100% stateless and still useful?
08:31:09 <andythenorth[d]> I can't be arsed with saveload right now
08:31:29 <andythenorth[d]> it also implies a lot more testing, and having to restart games and stuff because state changed
08:40:30 <petern> Oh that's what that noise was... my PC's fan was on :/
08:40:39 <Gwyd>
08:41:26 <petern> That's worse small text than OpenGFX.
08:44:48 <Gwyd> Yeah
08:45:11 <Gwyd> But the upshot is most of the lowland UK is pasture or arable land
08:47:40 *** WormnestAndroid has quit IRC (Remote host closed the connection)
08:50:26 <Pruple> andythenorth[d]: IndustryList_Town... it's an industrylist relating to the town ๐Ÿ™‚ and why not?
08:54:09 <Pruple> the way I've always done saveload is to only store what's absolutely necessary, and reconstruct everything else on loading.
08:58:06 <petern> Hmm, towns do have a station list, and stations have an industry list...
08:59:27 <petern> Doesn't seem to be a cached town to industry list or vice versa though.
09:00:59 <andythenorth[d]> Pruple: if I have to keep state I might have some buttons in storybook
09:00:59 <andythenorth[d]> 'clear state'
09:00:59 <andythenorth[d]> 'regenerate state from fake data'
09:12:13 <petern> State should be for remember things your GS wants to do, not for remember the state of the game.
09:14:39 <FLHerne> reading (because LWN comments)
09:14:56 <FLHerne> I wonder what that would mean for OTTD
09:16:08 <FLHerne> parsing grfs etc in a sandboxed process or with Rust code, probably
09:17:07 <LordAro> what it means? very little
09:18:05 <LordAro> also, OTTD in no way runs at any sort of high privilege
09:18:32 <petern> Bound to be people running as Administrator/root because they're silly ๐Ÿ™‚
09:18:39 <FLHerne> depends if you consider random grfs (and network packets) trustworthy I guess
09:18:48 <Eddi|zuHause> that's probably not true, never trust people :p
09:19:32 <Eddi|zuHause> someone in this world might run openttd on their work computer with admin privileges
09:20:07 <FLHerne> unrestricted FS r/w access is high privilege in the sense they mean, aaui
09:20:16 <FLHerne> aiui
09:20:38 <FLHerne> it's not like a browser runs as root either
09:21:56 <FLHerne> Chromium's sandboxed processes are restricted from doing pretty much anything besides talking to the parent
09:21:57 *** supermop_toil has quit IRC (Read error: Connection reset by peer)
09:23:13 <LordAro> true
09:32:07 <andythenorth[d]> Eddi|zuHause: eddi are you asking for a friend?
09:32:34 <Eddi|zuHause> i ... uhh .. errr... :p
09:34:28 <petern> Parsing GRFs in a sandbox isn't that useful, NewGRF-related crashes happen in the main game loop.
09:34:40 <petern> So sandboxing the game loop would be better idea.
09:34:42 <andythenorth[d]> petern: I haven't experimented yet with things like cargo monitors, and how much they are persisted by OpenTTD vs. persisted in the GS
09:35:14 <Eddi|zuHause> petern: you could port the whole game to rust by that point
09:35:22 <petern> Quite.
09:35:30 <LordAro> petern: what i'm hearing is "multithreaded OTTD"
09:35:31 <LordAro> :p
09:35:55 <petern> multithreaded but not concurrently ๐Ÿ™‚
09:36:02 <LordAro> :)
09:37:08 <andythenorth[d]> one thread for each town in GS
09:37:13 <andythenorth[d]> oh wait, MP safety ๐Ÿ˜›
09:37:43 <petern> Modern computing, get the server to run the game and send video back to the clients.
09:37:58 <petern> Gaming as a Service.
09:38:50 <Eddi|zuHause> has that ever taken off in the past 10 years people propagated it?
09:38:56 <andythenorth[d]> apparently it works
09:39:05 <Eddi|zuHause> or is that like "linux can be used as a desktop"?
09:39:15 <petern> How well is Stadia going?
09:39:16 <andythenorth[d]> always next year?
09:39:34 <andythenorth[d]> 2024 is the year desktop linux will become mainstream
09:39:39 <petern> > Stadia will be wound down on 18 January 2023.
09:39:42 <petern> "Oh"
09:39:43 <andythenorth[d]> oh dear
09:39:50 <andythenorth[d]> 2 days left to port OpenTTD to it
09:39:53 <andythenorth[d]> 'port'
09:40:30 <Eddi|zuHause> never trust in the longevity of a google project
09:41:26 <Eddi|zuHause> i'm mildly worried steam will shut down in the next 10 years, and we lose 2 decades of gaming history
09:41:34 <petern> 3 years old, that's practically a lifetime in Google terms.
09:46:30 <petern> Hmm, you can't list something as "January Sale!" but then not actually reduce the price...
09:50:06 <andythenorth[d]> Have you seen the discount on OpenTTD pricing?
09:50:14 <andythenorth[d]> For January 2023
09:50:18 <LordAro> 100% off
09:50:51 <Eddi|zuHause> that's unpossible. must be a ripoff
09:53:27 <andythenorth[d]> hmm what is a cargo monitor anyway
09:55:28 <Pruple> some sort of big lizard?
09:55:48 <LordAro> โ˜œ(๏พŸใƒฎ๏พŸโ˜œ)
09:56:06 <petern> It's free, but it will take away 18 years of your life (so far)
09:58:19 <Eddi|zuHause> that's not entirely sure, because it ignores the "entry drug" which wasn't free and took like 10 more years
09:58:23 <FLHerne> petern: everyone is shocked at Stadia shutting down after three years
09:58:34 <Eddi|zuHause> s/sure/true/
09:58:37 <andythenorth[d]> cargomonitor.cpp eh
09:58:38 <FLHerne> they thought it would be, like, one :p
09:58:43 <andythenorth[d]> so it's a full thing
09:58:51 <CplBurdenR3294> I was going to say, I was surprised it lasted as long as it did
09:59:24 * andythenorth[d] trying to understand if cargomonitor instances live in the savegame and can be attached to by any GS once created
09:59:32 <andythenorth[d]> or if they are instanced in some GS space
09:59:42 <Eddi|zuHause> let me guess: stadia isn't giving you the titles you paid full price for to play on your local computer
10:00:17 <FLHerne> Eddi|zuHause: they're giving full refunds for everything
10:00:22 <FLHerne> which seems kind of insane
10:00:37 <Eddi|zuHause> that's... interesting?
10:01:26 <andythenorth[d]> google level money
10:01:32 <FLHerne> sort of implies they were losing a hell of a lot of money, if that's cheaper than just keeping it running
10:01:52 <Eddi|zuHause> well... it was kind of insane that they asked for any prices at all, instead of giving you something like gamepass which includes all games for a flatrate
10:02:31 <andythenorth[d]> turns out xbox gamepass can arbitrarily drop titles
10:02:38 <andythenorth[d]> probably was in the small print, but eh
10:02:44 <andythenorth[d]> can be disappointing to 10 year olds
10:02:54 <andythenorth[d]> who have spent all their christmas money on a gamepass
10:03:07 <andythenorth[d]> which then removes a game they've got 80 hours of world-building in
10:03:26 <FLHerne> they're even refunding the controller hardware
10:03:37 <FLHerne> which you can keep and use as a generic controller for other platforms
10:04:24 <Eddi|zuHause> what happened to the times when the conventional wisdom was that console money is earned in the hardware
10:05:08 <Eddi|zuHause> and every game came with some gadget that you had to purchase separately to get the full experience?
10:05:13 <petern> Games became software.
10:06:03 <andythenorth[d]> have I become software yet?
10:06:23 <andythenorth[d]> I am pretty certain that I can be faked
10:06:24 <Eddi|zuHause> depends on how you define "soft"
10:06:44 <andythenorth[d]> I mostly exist as a monologue in chat channels
10:06:54 <Eddi|zuHause> i thought for a moment you said "faxed" :p
10:07:24 <Eddi|zuHause> andythenorth[d]: are you secretly chatgpt?
10:07:54 <andythenorth[d]> it's much better behaved than me
10:08:15 <Eddi|zuHause> have we lost the turing test yet?
10:08:26 <andythenorth[d]> I would be surprised if we haven't
10:08:27 <FLHerne> Eddi|zuHause: was that ever true?
10:08:53 <Eddi|zuHause> FLHerne: which part?
10:08:57 <FLHerne> IIRC even the Atari 2600 was sold pretty much at cost for the hardware
10:09:38 <andythenorth[d]> I can't see anything in cargomonitor.cpp that ties it to a specific script instance
10:09:39 <petern> Oh god why do I have 197 branches.
10:09:41 <FLHerne> a couple of games had weird inputs but it wasn't the norm
10:09:44 <Eddi|zuHause> FLHerne: i think i heard the peak of that was the guitar hero era
10:09:53 <andythenorth[d]> do monitors live in some kind of pool or something?
10:10:43 <Eddi|zuHause> andythenorth[d]: that sounds like a sentence from a parallel universe
10:11:02 <andythenorth[d]> it's the inside of my brain
10:11:08 <andythenorth[d]> of course it's parallel ๐Ÿ˜›
10:11:28 <Eddi|zuHause> i mean where PC screens were developed by aquatic people
10:11:43 <andythenorth[d]> like dolphins
10:11:56 <Eddi|zuHause> and office compartment are called "pools"
10:13:16 <Eddi|zuHause> you would have to think hard on ways aquatic people could discover electricity
10:13:44 <Eddi|zuHause> or fire, for that matter
10:13:46 <petern> Hmm, am I going to overheat wearing a blanket...
10:17:01 <andythenorth[d]> I am wearing 2 hoodies
10:17:04 <andythenorth[d]> and coughing a lot
10:17:06 <andythenorth[d]> might be TB
10:17:27 <andythenorth[d]> or rat lungworm
10:20:59 <andythenorth[d]> "The active monitors are saved and loaded. Upon bankruptcy or company takeover, the cargo monitors are automatically stopped for that company."
10:21:08 <andythenorth[d]> docs are handy when they're handy
10:21:34 <andythenorth[d]> reminds me that I hadn't thought about multiplayer
10:22:05 <andythenorth[d]> one of my ideas is primary industries rolling dice for production increase if the town is happy (has food, drink etc)
10:22:18 <andythenorth[d]> I guess I just monitor all companies delivering
10:22:28 <andythenorth[d]> happy towns are happy for all companies?
10:22:33 <andythenorth[d]> or happy about specific company?
10:23:15 <Eddi|zuHause> andythenorth[d]: looking up symptoms online always result in "you have cancer"
10:23:25 <andythenorth[d]> or lupus
10:23:38 <LordAro> it's never lupus
10:23:43 <Eddi|zuHause> and i think my s key starts to break. it's offten missing
10:23:48 <andythenorth[d]> no but the symptoms often suggest lupus
10:24:47 <andythenorth[d]> is it interesting to be able to own an industry?
10:24:50 <andythenorth[d]> in MP?
10:24:54 <andythenorth[d]> Pruple: ?
10:26:04 <Pruple> what does it owning an industry mean?
10:26:29 <andythenorth[d]> dunno
10:26:48 <andythenorth[d]> not like in Railroad Tycoon 3 where you get the profits
10:27:00 <andythenorth[d]> there was a strategy in RT3 where you just bought all the industries and won
10:27:09 <andythenorth[d]> shovels, alaska, gold rush
10:27:36 <andythenorth[d]> I think it goes like this
10:27:45 <andythenorth[d]> you deliver food to runningbottom
10:27:52 <andythenorth[d]> you 'own' runningbottom coal mine
10:28:01 <andythenorth[d]> runningbottom coal mine rolls the dice for production increase
10:28:13 <andythenorth[d]> runningbottom iron ore mine is owned by Scuddles
10:28:20 <andythenorth[d]> no dice roll for Scuddles
10:28:42 <andythenorth[d]> I have no ideas
10:28:57 <Eddi|zuHause> andythenorth[d]: maybe you should talk to the citybuilder community?
10:29:14 <andythenorth[d]> I talk to dP is that the same thing? ๐Ÿ˜›
10:30:18 <Eddi|zuHause> i think i played like 2 multiplayer games. one with my brother and one on a public server
10:31:33 <Eddi|zuHause> don't remember if that was pikkas server or it just used a lot of pikka grfs
10:35:07 *** Samu has joined #openttd
10:43:23 <dP> on citymania you own funded industries
10:43:36 <dP> meaning others can't take production
10:44:09 <dP> also secondary industries lock on the company that delivers first
10:44:28 <andythenorth[d]> is it good?
10:44:50 <andythenorth[d]> I almost only entirely play single player
10:44:56 <dP> the best way I know
10:45:02 <andythenorth[d]> except for silly games with scrubbles
10:46:25 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on issue #10362: [Bug]: Bridges cannot not have a speed limit
10:47:09 <dP> allowing competition on anything but primary industries leads to silly gameplay
10:48:10 <dP> even on primaries it's kinda meh but usually tolerable with a few more rules
10:50:47 <andythenorth[d]> thanks
10:50:59 <dP> problem with openttd in general is that when competing companies actively interact it quickly goes to shit
10:51:34 <andythenorth[d]> FIRS GS constraints then
10:51:45 <andythenorth[d]> - tune for single player, not MP, and definitely not competitive MP
10:52:03 <andythenorth[d]> - disables or shows warning if there are more than n towns / industries on the map
10:52:30 <andythenorth[d]> - try to avoid keeping state wherever possible
10:55:18 <scrubbles> openttd challenge spinoff was amazing back in the day, I haven't yet played any of the equivalent city building type gamescripts though
10:56:48 <scrubbles> it was just all of the ttd vanilla climate vehicles and industries put on the same map, a custom map generator which was very mountanious and the whole city claiming and growing mechanics, but it was amazing
11:01:23 <DorpsGek> [OpenTTD/OpenTTD] PikkaBird commented on issue #10362: [Bug]: Bridges cannot not have a speed limit
11:02:49 <petern> andythenorth[d]: players seem to think they do already
11:05:29 <petern> Can GS influence which companies and deliver/take cargo from industries and houses?
11:05:43 <andythenorth[d]> I don't know if it can manipulate station rating
11:05:45 <andythenorth[d]> I'll look
11:05:46 <petern> Beyond exclusive contracts in towns.
11:06:16 <petern> I mean directly, not via messing with station rating.
11:06:16 <andythenorth[d]> searchable doxygen anyone? ๐Ÿ™‚
11:06:26 <andythenorth[d]> you mean like an actual API?
11:06:34 <andythenorth[d]> and not just trying to plaster things over the past?
11:06:36 <petern> Yes.
11:06:41 <andythenorth[d]> like it was designed?
11:06:49 <andythenorth[d]> not just doing our best with old stuff?
11:06:53 <andythenorth[d]> No
11:06:55 <petern> Can GS say industries will only accept cargo from another specific industry?
11:07:03 <andythenorth[d]> no
11:07:06 <andythenorth[d]> that would contracts
11:07:10 <petern> Yes.
11:07:13 <andythenorth[d]> or we'd try and make cdist do it
11:08:29 <petern> At some point we need to add things that might be useful to GS, because we don't want to change base gameplay.
11:08:35 <andythenorth[d]> although, reverting to the old way of doing things, there's no SetRating
11:08:44 <andythenorth[d]> which I had an interest in
11:09:02 <petern> "Just write a GS" is not helpful if the GS can't actually do things.
11:09:08 <andythenorth[d]> yair
11:09:26 <andythenorth[d]> SetRating, goes it build statue instead?
11:09:36 <andythenorth[d]> do I have to GS to the company to build statue, not deity?
11:09:39 <andythenorth[d]> change hat
11:10:45 <andythenorth[d]> do we know where cargo packets originate?
11:10:56 <Eddi|zuHause> petern: problem with that is that GS is not callback driven, so you can't just hook into gameplay routines to override what they do
11:11:54 <petern> Well it should be, tbh.
11:12:28 <Eddi|zuHause> that probably needs a completely different interperter design
11:12:37 <petern> Probably.
11:12:53 <andythenorth[d]> if only we had some programmers
11:14:31 <petern> But it's still possible to add rules to the standard gameplay that by default do nothing different, but can be controlled by GS.
11:15:16 <andythenorth[d]> and we have a long time to do it
11:15:20 <andythenorth[d]> because the deadline is ages away
11:15:22 <Eddi|zuHause> sounds like a nice project of about 3 months
11:16:05 <petern> Eddi|zuHause: Making GS event driven is not really feasible, it would need a massive structural change, and most likely require GS to run on all multiplayer clients too.
11:16:30 <andythenorth[d]> eh what, don't we have to explain to me every 3 months that GS *is* event driven?
11:16:35 <Eddi|zuHause> well "3 months" :p
11:17:30 <Eddi|zuHause> andythenorth[d]: i think that meant a different kind of event
11:17:43 <andythenorth[d]> well event-driven seems to have 2 meanings ๐Ÿ˜›
11:17:51 <Eddi|zuHause> more like 8 :p
11:17:59 <andythenorth[d]> ok
11:18:05 <Eddi|zuHause> like every buzzword
11:18:07 <petern> Well, notifying any event has happened is a bit different from asking the GS what should happen during an event.
11:18:11 <andythenorth[d]> I first encountered event-driven in UIs
11:18:21 <andythenorth[d]> where it's kind of part of the deal to handle it in near-real-time
11:18:31 <andythenorth[d]> onMouseUp() -> but only in some future opcode
11:18:32 <andythenorth[d]> nope
11:18:50 <andythenorth[d]> words are hard
11:19:05 <petern> event-driven UIs is more about replacing ancient VB-style code that does everything in a single thread, so pressing a button freezes the process...
11:19:49 <Eddi|zuHause> andythenorth[d]: basically what a GS currently does is repeatedly observe the game state, and on certain conditions ("events") change the game state via commands
11:21:11 <andythenorth[d]> well we should figure out how to do more amusing things with it
11:21:34 <Eddi|zuHause> but a "callback" (also some kind of "event") would mean during recalculation of the game state the gamescript is asked what the new state should be
11:22:33 <Eddi|zuHause> NewGRFs are kinda like that
11:23:32 <Eddi|zuHause> but newgrfs are very limited in terms of what they can do during that callback
11:24:14 <Eddi|zuHause> which has both good and hysteric reasons on why that is
11:24:53 <petern> So, new NewGRF feature to handle GS callbacks?
11:25:03 <Eddi|zuHause> sure :p
11:25:28 <petern> GS a command to set some kind of persistent state, and then a callback can check that state when things happen...
11:26:18 <Eddi|zuHause> ... which comes back to the problem that you can't enforce a NewGRF and a GS to be loaded at the same time. in the correct matching versions of each other
11:26:35 <petern> So add a mechanism to do that.
11:26:35 <andythenorth[d]> frosch and TB have some partial idea about this, GS raising events
11:26:53 <petern> This isn't raising events as such
11:27:03 <andythenorth[d]> events, loaded term, sorry ๐Ÿ™‚
11:27:08 <andythenorth[d]> 'ask the newgrf for an answer'
11:27:09 <petern> This is GS changing state so that predefined CB can evaluate it.
11:27:25 <petern> I'm sure it's totally illegal, and will kill performance ๐Ÿ™‚
11:27:52 <andythenorth[d]> TB's idea for enforcing grf + GS together is just to wrap a little preset bundle around them somehow
11:27:59 <andythenorth[d]> so they're just associated in the content service and when loading
11:28:08 <andythenorth[d]> we already have grf deps and GS lib deps
11:28:44 <Eddi|zuHause> towns have storage, GS could put arbitrary data in that storage via command, the NewGRF could read that storage. but if the versions don't match the data could be garbage
11:28:56 <andythenorth[d]> stuff breaks ๐Ÿ™‚
11:28:58 <andythenorth[d]> shared memory
11:29:02 <andythenorth[d]> it's only a train game though
11:29:18 <andythenorth[d]> we added the rudiments of GRF interoperability to GS
11:29:26 <andythenorth[d]> which I am using in my test FIRS GS
11:29:30 <andythenorth[d]> no kittens have yet died
11:29:39 <andythenorth[d]>
11:30:06 <andythenorth[d]> I found a log from 2012 where it turns out the idiot arguing that GS and grf couldn't work together...was me ๐Ÿ˜›
11:30:17 <andythenorth[d]> context was important though ๐Ÿ˜›
11:31:49 <petern> Eddi|zuHause: If only there was some way for GS to ensure a specific NewGRF was present...
11:31:58 <andythenorth[d]> if only we'd added that and tested it
11:32:02 <andythenorth[d]> and are using it ๐Ÿ˜›
11:32:19 <andythenorth[d]> how the user is supposed to add the right GS and right a thing though
11:32:30 <andythenorth[d]> also versioning and so on
11:32:32 <petern> They can read the documentation?
11:32:35 <petern> I dunno...
11:32:54 <petern> Yes, ideally the GS could specify it and have it happen, but that's not ultimately required.
11:33:04 <petern> And on multiplayer servers you don't need to worry.
11:33:08 <andythenorth[d]> the only weird thing so far....due to [the many things I do not understand], load order means the grf can't know if the GS is present or not at map gen
11:33:24 <andythenorth[d]> hmm GS to generate your entire game?
11:33:32 <andythenorth[d]> not even joking, we added some UI scripting?
11:33:44 <andythenorth[d]> for title game
11:33:55 <petern> I think there was some idea to have tutorials or something.
11:34:02 <andythenorth[d]> like original TTD ๐Ÿ™‚
11:34:30 <petern> Like, all widgets with IDs are set up as enums in the scripting side.
11:34:45 <andythenorth[d]> does that include the grf window? ๐Ÿ˜›
11:34:50 <andythenorth[d]> /me has horrific idea
11:34:56 <andythenorth[d]> "YOU WILL PLAY MY WAY"
11:35:06 <Samu> not sure if this is a problem: AIBase.Rand() returns negative and positive values
11:35:26 <andythenorth[d]> it's a signed uint32
11:35:30 <andythenorth[d]> seems correct?
11:35:47 <petern> It's a signed int32 then?
11:35:54 <petern> Cos the u means unsigned...
11:36:19 <andythenorth[d]> oh ๐Ÿ˜›
11:36:25 <andythenorth[d]> I just read from the GS docs
11:36:42 <andythenorth[d]> ok hedge-homer time
11:37:02 <andythenorth[d]> I wasn't here
11:37:18 <Samu>
11:37:46 <Samu> strange, it's uint32, then how can it become negative when printing it?
11:38:23 <petern> Printing it as signed.
11:38:59 <LordAro> today, Samu will learn about twos-complement
11:39:38 <petern> Judging by how long it took us to work out the OWNER_DEITY stuff for industry prospecting was broken, I reckon we can have cooperating GS/NewGRF in about 25 years.
11:39:48 <Eddi|zuHause> andythenorth[d]: i'm pretty sure GS-based map generators were discussed before
11:40:49 <petern> Hmm, does jQuery bypass standard javascript events...
11:41:42 <andythenorth[d]> petern: I think that's pessimistic
11:41:57 <andythenorth[d]> it was only 3 or 4 years to do Variants
11:42:03 <petern> ๐Ÿ˜ฎ
11:42:23 <Eddi|zuHause> are you sure?
11:42:32 <Eddi|zuHause> probably more like 12
11:42:58 <andythenorth[d]> I had a log somewhere
11:43:17 <petern> How the heck did VS Code autocomplete the entire rest of the line I was writing...
11:43:24 <andythenorth[d]> it knows what you want
11:43:49 <petern> It completed addEventListener('click', <nameOfFunction>)
11:44:09 <TonyPixel> Well thatโ€™s easy
11:44:36 <TonyPixel> Thatโ€™s literally what you want from ide
11:45:41 <TonyPixel> Also, bananas newgrf page has its table out of bounds
11:47:00 <andythenorth[d]> yeah
11:47:04 <Samu> found something
11:47:04 <andythenorth[d]> who wrote that html ๐Ÿ˜›
11:47:12 <Eddi|zuHause> andythenorth[d]: "[Dienstag, 20. April 2010] [21:00:16] <frosch123> Terkhen: something about "Refit options" on the left, and "Variants" on the right?" <-- earliest reference to "variant" in this context i could find within 5 minutes
11:47:21 <Samu> uint32 is converted to int32?
11:47:22 <andythenorth[d]> wow
11:47:38 <andythenorth[d]> yeah I remember forum discussions about actual variants with buttons etc
11:48:00 <andythenorth[d]> doing it by just using vehicle IDs was a later idea ๐Ÿ™‚
11:48:05 <LordAro> Samu: as far as the bits are concerned, uint32 & int32 are identical
11:49:08 <LordAro> TonyPixel: ;)
11:50:30 <Eddi|zuHause> andythenorth[d]: i'm pretty sure there is a linear path between that discussion and the growth of the idea that it should be separate IDs
11:50:48 <andythenorth[d]> I can't find the screenshot in forums
11:52:24 <andythenorth[d]> it had a row of small sprites for livery variants
11:52:31 <andythenorth[d]> nvm
11:52:40 <andythenorth[d]> petern: I reckon 18 years
11:52:52 <andythenorth[d]> which will be nice, just in time for when I want to retire and have a hobby
11:53:12 <Samu> I wonder what RandRange will print if i put a high enough number
11:53:27 <petern> TonyPixel: Yeah but how would it know what function I wanted it to refer to?
11:54:03 <petern> Can VS Code code OpenTTD for me yet?
11:55:51 <LordAro> Samu: please save everyone some time and go read up on how computers represent numbers
11:56:02 <LordAro>
11:56:05 <LordAro> start here
12:00:30 <Samu> - return a random value between 0 and max - 1. guess it won't work that well
12:01:08 <glx[d]> petern: GS can set exclusive supplier and consumer, but it's for companies, not other industries
12:01:48 <petern> Interesting
12:01:49 <Samu> well, the documentation says between 0 and max everywhere, but it's not true
12:02:03 <Samu> fix documentation or? fix code?
12:02:05 <glx[d]> It is true, it's just a display issue
12:02:12 <petern> So it's possible for servers to enforce their stupid "no stealing" rules if they expended a bit of effort on it.
12:02:55 <glx[d]> And probably squirrel only knowing int
12:06:13 <Eddi|zuHause> is that just me that gets weird certificate warnings on the forums occasionally about mismatched URL?
12:09:51 <petern> Yes.
12:10:28 <petern> If you check the network history in developer mode, maybe it shows it accessing a different url?
12:10:45 <Eddi|zuHause> that sounds too annyoing to check
12:11:06 <Eddi|zuHause> but it happened like 3 times in the last 2 days
12:11:13 <petern> More annoying that weird certificate warnings?
12:11:32 <Eddi|zuHause> at the current rate, yes
12:16:30 <petern> Could be spyware intercepting your traffic ๐Ÿ™‚
12:18:17 <Eddi|zuHause> as far as i can tell, it's happening when i click on the "new posts" icon
12:18:45 <DorpsGek> [OpenTTD/OpenTTD] PikkaBird opened issue #10363: [Bug]: Setting "Distribution mode for the ARMOURED cargo class" description gives bad advice
12:20:58 <petern> Uh, where is the "new posts" icon?
12:21:19 <Eddi|zuHause> on a thread with new posts in it, left of the topic title
12:21:55 <petern> Ooh, tiny.
12:26:56 <TallTyler> Pruple: #10363 is probably a good first PR if youโ€™re interested ๐Ÿ™‚
12:27:15 <TallTyler> All that needs changing is `english.txt`
12:27:45 <Eddi|zuHause> TallTyler: eagerly trying to work in the "new guy"? :p
12:27:45 <TallTyler> Or if you suggest an alternative text someone else can copy and paste and make a PR
12:28:46 <FLHerne> TallTyler: Pruple *is* PikkaBird unless I'm seriously confused :p
12:29:02 <TallTyler> Yeah thatโ€™s what I mean
12:29:13 <Eddi|zuHause> i'm pretty sure everybody relevant knows that :p
12:29:22 <FLHerne> oh, I get what you're saying now
12:29:30 <Pruple> eh, my opinion is suggesting turning on cargodist at all is bad advice, so I'm probably not the one to rewrite it. ๐Ÿ˜›
12:29:54 <petern> Heresy!
12:30:01 <FLHerne> TallTyler: you commented on the bridge speed thing, are you doing that atm?
12:31:33 <TallTyler> โ€œPRs acceptedโ€ often isnโ€™t a useful thing to tell people who arenโ€™t programmers but are nice enough to report bugs, but changing an English string is super easy, and I think Pikka mentioned learning to contribute a few weeks ago. I wasnโ€™t trying to be passive-aggressive, just gently encourage. ๐Ÿ™‚
12:31:36 * petern considers changing the names of the font size settings, to reduce <>
12:32:27 <TallTyler> FLHerne: Not presently, but was thinking about it later today. If you want to do it, feel free.
12:32:51 <FLHerne> I'll see if it's as trivial as it feels like :p
12:34:07 <petern> insertAdjacentHTML() is a lot easier/lazier than fiddling with templates and DOM objects...
12:35:50 <TallTyler> Iโ€™ll tackle the Cdist help string then, because I do use the feature ๐Ÿ™‚
12:36:28 <Eddi|zuHause> i think i played more multiplayer games than games in subtropic
12:42:25 <andythenorth[d]> glx[d]: hmm if we had a graph of 'these are your industries'
12:42:32 <andythenorth[d]> tree / graph /s
12:43:13 <petern> "your"?
12:43:21 <petern> For players?
12:43:29 <andythenorth[d]> company
12:43:42 * andythenorth[d] half idea, still thinking
12:43:53 <andythenorth[d]> if your company has suppliers and sinks per cargo
12:44:00 <andythenorth[d]> you can't deliver to the sink unless there's a supplier
12:44:03 <petern> Of course, you don't own them... but you probably mean serviced by
12:44:16 <andythenorth[d]> exclusive use or something
12:44:45 <andythenorth[d]> my brain has left-turned into graphviz terms, because FIRS cargo flow charts
12:45:03 <andythenorth[d]> hmm your company could get exclusive rights to coal?
12:45:11 <andythenorth[d]> or something
12:45:39 <andythenorth[d]> you are The King Of Coal
12:46:23 <Eddi|zuHause> andythenorth[d]: how about hostile takeover of a company?
12:46:32 <Eddi|zuHause> err... industry
12:47:17 <andythenorth[d]> annual bidding
12:49:23 <andythenorth[d]> contract renegotiation
12:49:25 <andythenorth[d]> bribes
12:49:26 <andythenorth[d]> hmm
12:49:36 <andythenorth[d]> multiplayer, but one person is actually the game master?
12:49:45 <andythenorth[d]> and represents the industries?
12:50:03 <andythenorth[d]> /me never player dungeons and dragons, is game master a thing there?
12:50:41 <Eddi|zuHause> 8 players are honest company leaders and 2 are saboteurs, and each year one is voted out :p
12:50:58 <andythenorth[d]> you had Traitors too?
12:51:11 <Gwyd> Industries decide who they want goods from/to
12:51:31 <Gwyd> You merely negotiate transport terms/rates
12:51:47 <andythenorth[d]> we connect with chatGPT?
12:51:58 <Gwyd> If you don't move enough fast enough you don't get paid
12:51:59 <Eddi|zuHause> GSGPT?
12:53:15 <andythenorth[d]> hmm, like that, but you negotiate payment rates with one of the cats from the giant cats grf
12:53:31 <andythenorth[d]> grf objects, but with chat capability
12:53:41 <andythenorth[d]> NPCs?
13:01:11 <Eddi|zuHause> AIGPT? that sounds redundant
13:01:18 <CplBurdenR3294> Eddi|zuHause: Does that mean I am relevant? ๐Ÿ˜„ cool! ๐Ÿ˜›
13:01:42 <Eddi|zuHause> CplBurdenR3294: that's probably an invalid reversal
13:01:51 <CplBurdenR3294> Oh most definitely
13:10:20 *** WormnestAndroid has joined #openttd
13:16:03 <andythenorth[d]> lunch?
13:17:40 <petern> I had mine, but it wasn't a salad, as that had, er, gone runny. Oops.
13:18:04 <andythenorth[d]> happens
13:18:19 <andythenorth[d]> ok, it's like prospecting, or random industry placement, but it can be constrained to a sector of the map
13:18:34 <andythenorth[d]> implementation blah blah, but could be an x1, y1, x2, y2 box
13:18:35 <petern> Also it's going to rain, it's 3ยฐC and I don't feel like going for a lunch-time cycle like I was thinking about last night.
13:18:44 <andythenorth[d]> or it could be radius of an xy
13:19:12 <Eddi|zuHause> "radius" in manhattan distance?
13:19:12 <andythenorth[d]> GS can do it, but also grf can hint to game somehow in map gen
13:19:16 <petern> ๐Ÿ˜„
13:19:23 <CplBurdenR3294> Time is an illusion, lunch time doubly so - Douglas Adams
13:19:27 <andythenorth[d]> we agreed that implementation design is best not left to me ๐Ÿ˜›
13:20:04 <andythenorth[d]> I have 2 cases so far
13:20:09 <Eddi|zuHause> it's weird how openttd randomly decides which of the 3 major distances is used
13:20:16 <andythenorth[d]> 1) co-locating industries in a grf, which somewhat works, but can fail
13:20:43 <andythenorth[d]> because the target tile is entirely random, so distance constraints to another type can hit the cap on number of attempts
13:20:47 <petern> What was I working on before I got called...
13:21:06 <andythenorth[d]> 2) GS can build industries randomly, but in a specific region of the map
13:21:23 <andythenorth[d]> alternative ideas / parameters: constrain to a town
13:22:01 <andythenorth[d]> I could write my own GS version of 'place an industry randomly' but it seems quite unwise
13:23:00 <Samu> should I bother with this?
13:24:23 <Samu> how many scripts am I gonna break if they expect the broken behaviour?
13:28:38 <TallTyler> Uh
13:29:06 <TallTyler> Thatโ€™s not really a โ€œfixโ€
13:30:00 <FLHerne> yeah
13:30:08 <LordAro> it's not broken behaviour
13:30:35 <petern> 17ยฐC indoors is not comfy. Maybe I should burn some money...
13:30:47 <andythenorth[d]> I am trading disposable income for warmth
13:30:48 <FLHerne> it's not even clear to me what it's supposed to do
13:30:59 <andythenorth[d]> and I've sold all my fossil fuel stocks and shares ๐Ÿ˜ฆ
13:31:08 <andythenorth[d]> why is negative random bad?
13:31:15 <FLHerne> doc says it returns "A random value between 0 and MAX(uint32)."
13:31:27 <LordAro> FLHerne: Samu has just discovered twos complement, but doesn't understand what that entails
13:31:29 <FLHerne> and before the change it returns a uint32
13:31:49 <LordAro> and as usual, the rest of us may as well be on mute
13:33:38 <andythenorth[d]> let's invent GS lolz instead
13:35:30 <Eddi|zuHause> is that where the GS puts bold letters on a map trying to be funny?
13:35:39 <andythenorth[d]> that ought to be supported
13:35:46 <andythenorth[d]> text to object-ascii-art
13:36:00 <andythenorth[d]> it can place objects
13:36:16 <andythenorth[d]> just needs a transform from glyphs to tiles
13:36:31 <andythenorth[d]> there's probably some library that can do that for e.g. segment displays or something
13:36:39 <FLHerne> is the problem that Squirrel only has signed ints and it gets blindly converted?
13:36:52 <andythenorth[d]> is the problem that nobody knows what the spec is? ๐Ÿ˜›
13:36:57 <andythenorth[d]> might not be
13:37:02 <FLHerne> no, the spec is pretty clear for once
13:37:03 <andythenorth[d]> is there no problem? ๐Ÿ˜ฎ
13:37:20 <andythenorth[d]> anyway
13:37:33 <LordAro>
13:37:34 <andythenorth[d]>
13:37:34 <andythenorth[d]> my GS prospects for extra farms after game start
13:37:38 <Eddi|zuHause> i have no problem. well... not this problem :p
13:37:41 <andythenorth[d]> there are gameplay and eye candy reasons
13:37:54 <andythenorth[d]> I don't mind it clustering
13:38:11 <andythenorth[d]> but it would be nice to divide the map into quadrants, and force a farm into every quadrant
13:38:15 <andythenorth[d]> allowing for water
13:38:32 <andythenorth[d]> alternatively to force a farm within n tile distance of each town
13:38:38 <FLHerne> LordAro: ah
13:39:00 <andythenorth[d]> I can write an elaborate command-eating GS method to do the things above
13:39:10 <andythenorth[d]> but it will be slow and error prone because I wrote it
13:39:34 <Eddi|zuHause> andythenorth[d]: designate each town as "farming", "mining", "manufacturing" with different likelyhood of industries?
13:39:39 <andythenorth[d]> yes
13:39:55 <andythenorth[d]> or 'coal mining region' etc
13:40:05 <Eddi|zuHause> maybe not 0, but much lower
13:40:11 <andythenorth[d]> there's lots of unmeetable edge cases like 'farms, but above snowline'
13:40:12 <andythenorth[d]> but eh
13:40:13 <Samu> breaks regression
13:40:31 <andythenorth[d]> I can actually do regions in grf quite reasonably
13:40:40 <andythenorth[d]> it works, Tyler showed a way and I've copied it
13:41:06 <andythenorth[d]> but GS doesn't get the proposed xy location of a new industry before it's built, unlike grf
13:41:08 <Eddi|zuHause> but GS can look at the shape of the map, and determine whether the regioun around the town is flat, hilly, water, ...
13:41:19 <petern> 58 lines with jQuery, 83 lines with javascript. Improvement, right?
13:41:27 <andythenorth[d]> depends how much you hate jquery
13:41:54 <andythenorth[d]> most of the jquery lines I see are something like
13:41:54 <andythenorth[d]> `});`
13:42:11 <Eddi|zuHause> what's that smilie mean?
13:42:24 <andythenorth[d]> it means you accidentally made a career mistake and have to write jquery
13:42:43 <Eddi|zuHause> "winky double chin drooling, no combover"
13:43:11 <andythenorth[d]> It's bad form to go around hating on languages, but javascript burnt me early ๐Ÿ˜›
13:43:35 <andythenorth[d]> whereas disliking perl is just pure blind irrational prejudice
13:44:21 <Eddi|zuHause> perl is just fancy regex
13:44:56 <Eddi|zuHause> and regex is write-only
13:45:35 <petern> andythenorth[d]: Lots of my javascript is like that...
13:45:56 <Samu>
13:46:03 <Samu> all positive values!
13:46:39 <andythenorth[d]> I'm a positive value
13:46:45 <andythenorth[d]> no wait, I'm Spartacus
13:47:13 <Samu> and the already positive remained positive
13:47:17 <Samu> the same
13:47:33 <LordAro> hmm
13:47:38 <LordAro> Samu: have you tried it with in32 instead?
13:47:40 <LordAro> int32*
13:57:00 <glx[d]> IIRC squirrel integers are 64bit, so int32 should be fine
13:58:09 <Samu> let me try int32
14:00:46 <Samu> regression doesn't fail with int32, but that means it contains negative values
14:02:10 <Samu> gonna try something different
14:07:43 <Samu> GetBridgeID(): -1
14:07:43 <Samu> GetBridgeID(): 4294967295
14:07:45 <Samu> i see
14:07:59 <Samu> the other way to fix this is a bit too drastic
14:10:44 <Samu>
14:11:50 <glx[d]> Should be fixable somewhere in SQConvert area
14:13:43 <Samu> GetBridgeID() is relying on broken behaviour :)
14:14:16 <glx[d]> uint32 is directly casted to int32 there, and that could be changed to map uint32 to the positive side of int64
14:14:47 <glx[d]> But a lot of things will break
14:15:21 <glx[d]> As many -1 will become big positive values
14:16:32 <andythenorth[d]> GS option to shrink a town?
14:16:43 <andythenorth[d]> randomly removed building
14:17:02 <glx[d]> Remove town main tile
14:18:45 <pickpacket> Maybe add this to the game?
14:21:50 <Eddi|zuHause> are the doctors or the apples superconducting?
14:22:09 <LordAro> at what point does the cost of replacing the apples every day become prohibitive?
14:22:29 <Eddi|zuHause> sounds like a high maintenance task, so immediately
14:23:03 <andythenorth[d]> robot can do it
14:23:11 <andythenorth[d]> but does the robot run on apples or not?
14:24:49 <glx[d]> But that will only produce levitation not moving the train
14:24:59 <andythenorth[d]> angle the doctors
14:26:36 <andythenorth[d]> then cut the apples in half
14:26:43 <andythenorth[d]> and put them on rotating wheels
14:26:57 <andythenorth[d]> the repulsion will be greater for 50% of the cycle
14:27:23 <Eddi|zuHause> is the growth of enough apples sustainable to replace them every day?
14:27:32 <andythenorth[d]> vertical apple farms
14:27:34 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
14:27:36 <andythenorth[d]> in space
14:27:42 *** WormnestAndroid has joined #openttd
14:27:53 <andythenorth[d]> it's amazing how much free energy you can get if you invest in it
14:27:57 <Eddi|zuHause> and should we try for larger or smaller apples?
14:27:59 <LordAro> what if we swapped it over - attach the apples to the trains instead
14:28:05 <Samu> i tried (int64)res, it still returns a big 4294967295
14:28:14 <Samu> for BridgeID
14:28:38 <andythenorth[d]> hmm so put the doctors in the trackbed?
14:28:42 <Eddi|zuHause> LordAro: means we need to invest in increasing the density of doctors in non-urban environments
14:31:35 <LordAro> andythenorth[d]: we could ensure they stay in the right position with some sort of metal poles
14:32:24 <andythenorth[d]> if the apples are rotating could they just engage with the train to move it forward?
14:32:31 <andythenorth[d]> or is that too much apple friction?
14:32:52 <andythenorth[d]> like a physical interface
14:33:34 <andythenorth[d]> hmm is electromagnetism a physical interface?
14:33:41 <andythenorth[d]> it's physics
14:33:46 <andythenorth[d]> but it doesn't touch
14:33:57 <Eddi|zuHause> it's not a mechanical interface
14:36:00 <andythenorth[d]> is it a simple machine?
14:36:36 <Eddi|zuHause> define "simple", or "machine"?
14:36:58 <andythenorth[d]>
14:37:08 <andythenorth[d]> mechanical
14:37:46 <Eddi|zuHause> then not
14:42:59 <andythenorth[d]> ok so
14:43:30 <andythenorth[d]> GS wouldn't be able to handle things like 'game wants to construct an industry of type n at location x, y'
14:43:40 <andythenorth[d]> because that needs effectively real time
14:43:59 <andythenorth[d]> but GS could pre-define a set of tile ranges in which industry type n is allowed, or not
14:44:03 <andythenorth[d]> and update that periodically
14:46:02 *** HerzogDeXtEr has joined #openttd
15:09:45 *** nielsm has joined #openttd
15:17:20 <petern> That's kinda where I was going with GS -> data -> NewGRF CB.
15:37:59 <andythenorth[d]> ok so some structures
15:38:05 <andythenorth[d]> in the savegame
15:39:16 <andythenorth[d]> hmm
15:39:28 <andythenorth[d]> petern: ever play Repton?
15:40:49 * andythenorth[d] trying to remember games that had a contagion type effect
15:40:55 <andythenorth[d]> where the map got filled in by BAD STUFF
15:42:04 <andythenorth[d]> we could call it neverending story
15:42:11 <andythenorth[d]> map is gradually removed ๐Ÿ˜›
15:43:04 <petern> Did I play Repton...
15:43:10 <petern> Did I play Repton...
15:43:17 <petern> Did I play Repton...
15:44:02 <petern> Repton (and the sequels) were my THE game.
15:44:18 <andythenorth[d]> there was a world editor in at least one of them
15:44:25 <andythenorth[d]> I spent more time building worlds than playing the game
15:44:33 <petern> Repton 3 had the editor.
15:44:36 <andythenorth[d]> one edition had some kind of spreading virus thing in it
15:44:48 <petern> Repton Infinity had the REPTOL scripting language.
15:44:53 <andythenorth[d]> oo
15:45:06 <andythenorth[d]> what was that other game with a virus?
15:45:08 <andythenorth[d]> Virus?
15:45:13 <andythenorth[d]> the Risc OS demo thing?
15:45:44 <petern> Lander/Zarch?
15:45:53 <petern> Dunno about that, never played that much.
15:46:13 <petern> <>
15:46:22 <andythenorth[d]>,vid:mFwpsb75omg
15:46:54 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler opened pull request #10364: Fix #10363: CargoDist setting helptext shouldn't suggest symmetric distribution for diamonds in subtropic
15:47:20 <petern> I've no idea how to use the editors now though.
15:47:46 <andythenorth[d]> ok so some kind of structures that don't have to be tied to historical gameplay
15:47:50 <andythenorth[d]> or the map array?
15:49:20 <andythenorth[d]> /me wonders about a .... Tech Tree for vehicles ๐Ÿ˜ฎ
15:50:28 <Eddi|zuHause> "tech tree" is a flawed concept
15:50:38 <andythenorth[d]> possibly
15:50:39 <Eddi|zuHause> tech doesn't work that way
15:51:59 <TallTyler> In real life or in games?
15:53:30 <andythenorth[d]> I never played anything like civilisation
15:53:54 <andythenorth[d]> Railroad Tycoon series sometimes had engine unlock as a reward for completing micro-challenges I think
15:54:00 <Eddi|zuHause> TallTyler: Civ's "techtree" hasn't been a tree since like civ3 or so
15:54:08 <andythenorth[d]> tech tree in tank games are different, they're just tiers of play
15:54:11 <andythenorth[d]> and lots of grinding
15:54:25 <CplBurdenR3294> It's always struck me that tech trees in transport games are somewhat backwards to reality
15:54:51 <TallTyler> I guess it's more of an interconnected maze than a tree
15:54:52 <CplBurdenR3294> In reality, vehicles exist because of routes. Companies have specific routes they need vehicles for, and put out tenders for those designs (or design them themselves)
15:55:22 <Eddi|zuHause> actually, it has never been a tree, it was always "depends on A and B" even in civ1
15:55:25 <CplBurdenR3294> in games, invariably, your routes are defined by what the vehicles you have are capable of doing. You can't alter those vehicles, so, your routes have to change
15:56:09 <Samu> GetBridgeID seems to be the only case where -1 becomes big number
15:56:47 <LordAro> Samu: i am certain there are others, they're just not tested sufficiently
15:56:47 <Samu> might have missed a few return -1's
15:57:02 <dP> tech directed acyclic graph doesn't sound that well :P
15:57:56 <Samu> all the other return -1 i could find are returning either int, or int32 or int64 or Money
15:58:16 <Samu> need to do a better search though
15:58:42 <LordAro> Samu: they're likely INVALID* enum values
15:58:48 <CplBurdenR3294> A transport game with some sort of design dynamic, a bit Hearts of Iron esque? where you could put points into say tractive effort, or speed, or reliability, at the cost of something else (including, well, sheer cost) would be interesting
15:59:02 <TallTyler> Modular vehicles?
15:59:14 <CplBurdenR3294> "I need a heavy passenger engine at the moment for this particular route, so lets design one"
15:59:50 <Eddi|zuHause> inventory slots for your manager where you can put magical amulets and rings giving you + and - stats :p
16:00:20 <Eddi|zuHause> ... anyway, those are more like "policies" rather than "techs"
16:00:21 <TallTyler> At least in the US, smaller railroads did a lot of "bigger railroad is buying a bunch of these, let's get some too and save on design fees"
16:00:53 <TallTyler> And diesel freight locomotives are pretty off-the-shelf
16:01:18 <TallTyler> It was mostly steam engines and transit equipment that gets designed per-customer, I think
16:01:45 <CplBurdenR3294> I've actually thought that having Hearts of Iron type policies, ministers etc for a transport game would be interesting too. "Oh you're playing the Midland? Small Engine Policy, so, bonus to maintenance but debuff to engines over a certain wheel arrangement or tractive effort"
16:01:47 <Eddi|zuHause> TallTyler: european railways were mostly state-run by the time of diesel engines
16:02:07 <TallTyler> What's really backwards is technology being predetermined by real-world history, when the game takes place in an alternate history
16:02:23 <CplBurdenR3294> TallTyler: That's my point yes
16:02:43 <TallTyler> CplBurdenR3294: Iron Horse probably has enough engines where a GS could do this
16:02:45 <CplBurdenR3294> Real world routes determining what locos exist, when those routes may never exist and therefore those requirements not existing for those locos to appear
16:02:58 <TallTyler> Yeah, exactly
16:03:06 <Eddi|zuHause> TallTyler: real history has some annoying gameplay limiting factors like the "war gap"
16:04:19 <TallTyler> Maybe we need more granular control over production multipliers beyond "everything is half during Recessions" and allow GS to control it, so we can have a "Real-world events GS"
16:04:19 <Samu> how do i use reg ex
16:04:28 <CplBurdenR3294> You don't get any heavy freight engines for a bit because, historically that region/countries coal mines went into a massive decline. Of course, in game, not so much, but you're still buggered by that historical hiccup and forced to deal with a historical issue that is occurring to your ahistorical railway. Your heavy coal trains that shouldn't exist, do
16:04:49 <TallTyler> Railroad Tycoon 3 had real-world event-driven production changes built into its economy
16:04:58 <Samu> wanna search for anything containing 'return' and '-1' in the same line
16:05:03 <CplBurdenR3294> I did suggest a Railroad Tycoon "Real World Events" GS some years back and it got universally shunned
16:05:17 <Samu> because the Bridge one was not 'return -1', it was 'return (BridgeID)-1'
16:05:18 <CplBurdenR3294> "We have enough events going on that no-one wants this in their game"
16:05:33 <petern> regex search for "return.*-1"
16:06:27 <TallTyler> Interesting, Recessions use `MoveGoodsToStation()` to control production, so it works regardless of NewGRFs like FIRS that do entirely custom production mechanics
16:06:37 <Samu> thanks
16:06:41 <Brickblock1> CplBurdenR3294: you might be able to solve this by using multiple sets form different parts of the world
16:07:03 <CplBurdenR3294> I attempted to make it myself but frankly even getting one event to fire with Squirrel was confusing as buggery so I gave up. No-one was willing to assist because it wasn't something anyone was interested in, so, that was that
16:07:41 <CplBurdenR3294> Brickblock1: True, but, if I am trying to have a vaguely historical game, it presents issues beyond merely vehicle sets. But, thats a problem with trying to do historical stuff in a sandbox I guess
16:08:04 <TallTyler> I suspect slowing down time would alleviate a lot of the "time goes so fast historical events are meaningless and by the time you're done adapting, it's over" problem
16:08:15 <petern> NoDL++
16:09:06 <TallTyler> I should work on that today
16:09:24 <petern> Civilization time? Early game passes very quickly, later game slows down...
16:10:07 <TallTyler> Does Civ do that? It would make sense
16:10:13 <petern> Yup
16:10:21 <petern> 4000BC moves quickly...
16:14:35 <TallTyler> GS can change settings, so that should be possible to write
16:15:04 <Samu> aha, found a bug
16:16:39 <Samu>
16:16:50 <Samu> return -1, as uint32
16:18:56 <LordAro> well, the function never specifies the "invalid" return value
16:19:11 <LordAro> so 0xFFFFFFFF is just as good
16:19:48 <andythenorth[d]> Hmm
16:20:14 <andythenorth[d]> Whatโ€™s the engine ID limit now? 1m?
16:21:25 <petern> Probably 64000.
16:21:46 <LordAro> 1 million dollars โ˜
16:22:19 <andythenorth[d]> Could do a lot of engines in grf with minor stats differences
16:22:30 <andythenorth[d]> Let GS decide which you get
16:22:58 <TallTyler> "Western Region"
16:23:03 <andythenorth[d]> Basically, generative vehicles but precomputed
16:28:06 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #8492: Fix: Don't allow towns to terraform certain floodable tiles
16:29:27 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on issue #10275: [Crash]: crash closing dialogue box
16:29:30 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler closed issue #10275: [Crash]: crash closing dialogue box
16:33:23 *** keikoz has joined #openttd
16:42:47 *** gelignite has joined #openttd
16:48:23 <petern> andythenorth[d]: Let GS change engine stats? :p
16:51:06 <nielsm> player directed vehicle development and every company has unique engines
16:51:09 <Pruple> CplBurdenR3294: while that's kind of true, the biggest, fastest, and most powerful vehicles of any era (which is what tends to get included in OpenTTD sets) were always pushing the limits of what was technically possible at the time, and that *did* influence how infrastructure was built and how vehicles were used.
16:53:31 <DorpsGek> [OpenTTD/OpenTTD] glx22 approved pull request #10364: Fix #10363: CargoDist setting helptext shouldn't suggest symmetric distribution for diamonds in subtropic
16:54:35 <LordAro> can't backport that one
16:54:55 <andythenorth[d]> petern: why not just work around it using arcane solutions and lots of resources ๐Ÿ˜›
16:54:57 <dP> I had some ideas of introducing some research points that can be spent on, say, making engines 10% faster
16:55:49 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler merged pull request #10364: Fix #10363: CargoDist setting helptext shouldn't suggest symmetric distribution for diamonds in subtropic
16:55:52 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler closed issue #10363: [Bug]: Setting "Distribution mode for the ARMOURED cargo class" description gives bad advice
16:59:28 <Pruple> I know this is an outlying opinion, but I think the gameplay of OpenTTD is improved by longer gaps between vehicles / generations. You get to explore the capabilities of the vehicles more, and then when the next generation comes, it's more of a jump and opens up more possibilities. I find that much more interesting than constant replacements with nickle-and-dime stat increases every year.
17:00:05 <nielsm> I think many want to have more time to play with each individual vehicle model
17:00:34 <Eddi|zuHause> Pruple: that's why people want daylength
17:00:53 *** supermop_toil has joined #openttd
17:01:44 <nielsm> but yes, vehicle models that are super top of the line at introduction time should be excessively expensive to purchase and run, and later on models with comparable stats might get introduced that are much cheaper
17:02:35 <nielsm> but perhaps have the running costs of the early "tech demo" vehicles also drop over time so it also won't be sensible to replace them with the cheapified newer models
17:02:48 <dP> you're saying it like money meanss anything in openttd :p
17:02:59 <nielsm> well make it mean something!!!!!!
17:03:08 <dP> already did :P
17:03:12 <Pruple> good luck with that
17:03:41 <andythenorth[d]> money don't matter tonight
17:03:46 <Pruple> the correct answer to that balancing issue is "don't have the super-top-of-the-line 'tech demo' vehicle at all".
17:03:46 <andythenorth[d]> and it sure didn't matter yesterday
17:03:57 <andythenorth[d]> errr
17:04:15 <andythenorth[d]>
17:04:15 <andythenorth[d]> am I doing it wrong Pruple ?
17:04:39 <Pruple> snoughplows are never wrong. well, hardly ever.
17:05:15 <andythenorth[d]> they're never quite right either
17:05:30 <Eddi|zuHause> Pruple: that disturbs me about transport fever mods. they only ever make weird/experimental/fantasy engines, but never the "boring" generic common ones
17:05:31 <andythenorth[d]>
17:05:31 <andythenorth[d]> but this is some kind of apex / pinnacle vehicle ๐Ÿ˜›
17:05:40 <scrubbles> only because we don't have different tiers of snowploughs yet
17:07:02 <Samu> found something unrelated
17:07:04 <Samu>
17:07:10 <Samu> size_t is unsigned
17:07:20 <Samu> but it has a return -1
17:07:41 <andythenorth[d]> Pruple: Progression is weird. Without any, there's no...progression
17:08:14 <andythenorth[d]> I don't have a final opinion yet, but the obligation to provide progression is dull when it doesn't add anything
17:08:38 <andythenorth[d]> but I have deleted a lot of gen 6 Iron Horse
17:10:20 <andythenorth[d]> I think there was some place I had 6 mph speed bump or something between generations
17:10:21 <andythenorth[d]> big woo
17:11:19 <andythenorth[d]> hmm GS control of NoDL setting?
17:11:52 <Pruple> Sunshine is 25 locos over 100 years, "generations" 15-20 years apart, but the generations aren't straight 1-1 replacements or upgrades, which I find makes a big difference. And there's few enough locos that the choices aren't overwhelming. ๐Ÿ™‚
17:12:24 <andythenorth[d]> hmm did we discuss vehicle loot boxes already, via GS?
17:13:38 <dP> time only moves when your trains move
17:13:38 <Pruple> eg, the pompom and the greyhound get replaced by the 8k and mogul respectively, but while they're much more powerful, the replacements are both slightly slower. So you might keep using the older designs if you're not taking advantage of the opportunity to make bigger, heavier trains.
17:14:06 <andythenorth[d]> so add 2nd currency, gems or something
17:14:10 <andythenorth[d]> earn gems for arbitrary goals
17:14:20 <andythenorth[d]> spend gems on GS storybook loot boxes
17:14:25 <andythenorth[d]> x% drop chance of a new train
17:15:15 <andythenorth[d]> then we monetise that for real money, and relocate to a jurisdiction where encouraging children to gamble is ok
17:15:23 <andythenorth[d]> Brexit Britain or something
17:15:46 <Pruple> the more different in-game currencies, the better the game design, right?
17:16:03 <andythenorth[d]> probably
17:16:14 * andythenorth[d] is taking cold medicine, may not be 100% lucid
17:18:35 <andythenorth[d]> if the monetisation doesn't produce fast enough, we can add skins or player avatars or something
17:18:46 <andythenorth[d]> that's what Variants is for, purchaseable vehicle skins
17:20:04 <andythenorth[d]> we need to DRM grfs, and add some new props for 'unlocked'
17:20:27 <scrubbles> pay for train whack rolls
17:23:13 <andythenorth[d]> train whack in the game when?
17:25:01 <scrubbles> I thought the bug with open wagons and vans showing together was intended, makes for easy and lazy mixed wagon goods trains building
17:28:04 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick commented on pull request #8492: Fix: Don't allow towns to terraform certain floodable tiles
17:28:10 <FLHerne> CplBurdenR3294 etc. : even a large map is pretty small compared to a country (that isn't Luxembourg or something)
17:28:35 <FLHerne> so I just assume that this is one part of a larger company that's designed whatever it has
17:28:45 <FLHerne> for its national requirements
17:34:14 <glx[d]> Samu: returning -1 for unsigned just means returning a value with all bits set, and size_t can be 32 or 64 bit depending on target CPU, so -1 will be 0xFFFFFFFF for 32 bit and 0xFFFFFFFFFFFFFFFF for 64 bit
17:42:32 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick commented on pull request #8492: Fix: Don't allow towns to terraform certain floodable tiles
17:50:07 *** Flygon has quit IRC (Read error: Connection reset by peer)
18:03:28 <andythenorth[d]> hmm
18:03:32 <andythenorth[d]> GS flooding?
18:03:38 <andythenorth[d]> can we adjust sea level?
18:07:42 <DorpsGek> [OpenTTD/OpenTTD] FLHerne opened pull request #10365: Fix #10362: NewGRF bridges without speed limits.
18:11:10 <Samu> question about include "xxx.h", is it better to have less includes or more includes?
18:11:24 <LordAro> fewer.
18:11:34 <LordAro> (to a point)
18:11:56 <Samu> if i move that townterraforming function from water_cmd.cpp to town_cmd.cpp, i will have to add some includes
18:12:47 <Samu> if i let it stay where it is, in water_cmd.cpp, no includes are necessary
18:13:40 <Eddi|zuHause> andythenorth[d]: i think we had a patch like 15 years ago
18:13:54 <DorpsGek> [OpenTTD/OpenTTD] quackersian opened issue #10366: [Bug]: Fast Forward stuck on at year end finance
18:16:01 <DorpsGek> [OpenTTD/OpenTTD] LordAro commented on issue #10366: [Bug]: Fast Forward stuck on at year end finance
18:16:04 <DorpsGek> [OpenTTD/OpenTTD] LordAro closed issue #10366: [Bug]: Fast Forward stuck on at year end finance
18:16:09 <Samu> I almost disagreed with everything TallTyler suggested, maybe except the renaming of the function itself
18:16:21 <Samu> what do i do
18:16:30 <LordAro> justify your disagreements
18:16:33 <LordAro> in the PR
18:16:40 <LordAro> disagreeing is fine
18:16:46 <LordAro> "i disagree" is not
18:17:07 <Samu> not sure i wanna move the function to town_cmd.cpp, it would require extra includes
18:18:08 <Samu> the function requires GetFloodingBehaviour
18:18:33 <Samu> so i'd need to add include "water.h" in town_cmd.cpp
18:18:50 <LordAro> so ask that
18:18:53 <Samu> then i'm unsure where i but the declaration thing
18:18:54 <LordAro> say that
18:19:13 <Samu> oh :(
18:19:38 <LordAro> if TallTyler finds your justification acceptable, then the issue will be resolved
18:19:48 <LordAro> if he still thinks it should be moved, then you move it (or close the PR, i guess)
18:20:11 <LordAro> fewer includes is better, but if they're needed, you still add them
18:22:50 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick commented on pull request #8492: Fix: Don't allow towns to terraform certain floodable tiles
18:31:00 <Samu> i could also argue that this function is excusively for terraform command
18:31:32 <Samu> would also make sense for it to go to terraform_cmd.cpp
18:34:56 <petern> Argue that then. In the PR.
18:35:16 <petern> The PR has discussion features for a reason.
18:35:51 <DorpsGek> [OpenTTD/OpenTTD] glx22 commented on pull request #10365: Fix #10362: NewGRF bridges without speed limits.
18:36:06 *** Wormnest has joined #openttd
18:40:26 <DorpsGek> [OpenTTD/OpenTTD] FLHerne updated pull request #10365: Fix #10362: NewGRF bridges without speed limits.
18:43:29 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #8492: Fix: Don't allow towns to terraform certain floodable tiles
18:44:11 <DorpsGek> [OpenTTD/OpenTTD] DorpsGek pushed 1 commits to master
18:44:12 <DorpsGek> - Update: Translations from eints (by translators)
18:45:11 <Samu> isn't it BuildBridgeData &bridge_data
18:47:03 <FLHerne> seems to depend which file you look at :p
18:47:12 <FLHerne> that format does seem more common
18:51:17 <DorpsGek> [OpenTTD/OpenTTD] FLHerne updated pull request #10365: Fix #10362: NewGRF bridges without speed limits.
18:52:09 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #10330: Codechange: Rework 'start_date' parameter for AIs as a game setting
18:52:28 <Samu> oops, i made a boo boo
18:54:13 <Samu> i clicked update with merge
18:54:16 <Samu> :(
18:54:45 <glx[d]> you can always rebase
18:56:45 <DorpsGek> [OpenTTD/OpenTTD] SamuXarick updated pull request #10330: Codechange: Rework 'start_date' parameter for AIs as a game setting
19:06:50 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #10365: Fix #10362: NewGRF bridges without speed limits.
19:15:40 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #8492: Fix: Don't allow towns to terraform certain floodable tiles
19:16:01 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler commented on pull request #8492: Fix: Don't allow towns to terraform certain floodable tiles
19:17:05 <DorpsGek> [OpenTTD/OpenTTD] FLHerne updated pull request #10365: Fix #10362: NewGRF bridges without speed limits.
19:18:02 <DorpsGek> [OpenTTD/OpenTTD] 2TallTyler approved pull request #8492: Fix: Don't allow towns to terraform certain floodable tiles
19:29:54 <andythenorth[d]> so cargo prices eh
19:30:04 <Pruple> $$
19:30:05 <andythenorth[d]> the grf spec is basically 'lol no'
19:30:25 <andythenorth[d]> but there is a profit cb
19:30:43 <andythenorth[d]> so what if GS could adjust a price factor, per cargo, per tile or something
19:30:51 <andythenorth[d]> but again, periodically
19:31:05 <andythenorth[d]> per tile is mad granular, per town would be quite enough?
19:34:10 <TallTyler> Per town seems plenty
19:34:29 <TallTyler> I assume you're thinking about supply and demand?
19:35:28 <andythenorth[d]> or anti-supply and demand ๐Ÿ˜›
19:35:31 <andythenorth[d]> whatever authors want
19:35:45 <TallTyler> Lumberjack Industries does grain production only during fall harvest time, and I tried using the profit callback to make grain not delivered then spoil, but it was finicky and stupid so I left profit alone
19:35:48 <andythenorth[d]> we could make Dope Wars
19:36:07 <andythenorth[d]> 'a Colombian freighter dusted the coastguard, weed prices have fallen through the floor'
19:36:28 <andythenorth[d]> 'hippies are going crazy for acid, prices are sky high'
19:36:44 <andythenorth[d]> also...really meaningful recessions ๐Ÿ˜›
19:36:44 <TallTyler> (seasonal production is also somewhat stupid at default game speed, but that's a separate issue)
19:37:16 <andythenorth[d]> could we give cargos a provenance?
19:37:26 <andythenorth[d]> so you can't earn money delivering white wine to france from the UK?
19:37:43 <TallTyler> CargoDest 2?
19:38:09 <TallTyler> Industries of the Caribbean has Domestic Oil and Imported Oil, for gameplay reasons
19:38:16 <andythenorth[d]> lol 'all cargo from industry A wants to go to industry P'
19:38:18 <andythenorth[d]> forever
19:38:22 <andythenorth[d]> you have one dest
19:38:26 <andythenorth[d]> no recalcs
19:38:34 <andythenorth[d]> CPU burden reduced
19:38:45 <andythenorth[d]> just store the origin, destinations are inferred
19:42:31 <DorpsGek> [OpenTTD/OpenTTD] quackersian commented on issue #10366: [Bug]: Fast Forward stuck on at year end finance
19:51:37 <Samu> found another bug in script_airport
19:52:14 <Samu>
19:52:22 <Samu> that's a weird thing to return
19:53:43 <TallTyler> That truly does look like a bug
19:53:45 <andythenorth[d]> do you suspect copy-paste? ๐Ÿ˜›
19:54:08 <TallTyler> I certainly do, considering the method above
19:54:27 <Samu> even if it returns -1, it can't, it's uint
19:54:32 <Samu> must be changed to int
19:58:19 <Samu> let me check with the other cost factors
20:00:13 <Samu> they return 0
20:01:06 <Samu> they're all uint16
20:01:18 <Samu> and return 0, except airport version, which returns town
20:01:24 <Samu> what to do?
20:01:38 *** Wolf01 has joined #openttd
20:04:42 <CplBurdenR3294> TallTyler: CargoDest 2: Overhead Electric Boogaloo
20:05:35 <Samu> GetMaxSpeed for the road is also returning 0 if roadtype doesn't exist, but 0 is used for no speed limit, it should return -1
20:10:27 <Samu> GetMaxSpeed for rail actually returns -1
20:10:35 <Samu> for railtypes that don't exist
20:40:42 <Samu>
20:40:58 *** gelignite has quit IRC (Quit: Stay safe!)
20:41:05 <Samu> the enforce preconditions are trying to return false, but it can only return as uint32
20:42:28 <Samu> im unfamiliar with Story Page stuff
20:42:52 <Samu> but that false is probably being returned as 0
20:49:14 <petern> false IS 0...
20:50:35 <Samu> there is a STORY_PAGE_INVALID
20:50:45 <Samu> and a STORY_PAGE_ELEMENT_INVALID
20:50:50 <Samu> which isn't 0
20:51:10 <Samu> I don't know how to fix this part
21:03:31 <andythenorth[d]> ok so to prospect / build an industry at random location
21:03:39 <andythenorth[d]> but with a constraint
21:03:44 <andythenorth[d]> what would we do?
21:03:49 <andythenorth[d]> partition some tiles?
21:04:03 <andythenorth[d]> do a quadrant with x,y corners?
21:04:13 <andythenorth[d]> do a list of eligible town(s)?
21:04:25 <andythenorth[d]> all of the above?
21:11:14 <andythenorth[d]> unrelated, so the opcode limit means I never have to worry about hanging openttd with a GS do...while?
21:11:21 <andythenorth[d]> I deliberately tried
21:12:02 <andythenorth[d]> obviously my GS might then be hung
21:12:49 <nielsm> correct
21:13:18 <nielsm> your script just gets suspended in the middle of whatever it was doing and the game continues simulation
21:13:27 <andythenorth[d]> so I'd still want some protection to prevent it trying to prospect things indefinitely
21:13:45 <andythenorth[d]> (prospect is in a do..while loop, with a potentially unmeetable condition)
21:13:55 <nielsm> and if the player closes the game at that time whatever it was doing would be lost
21:15:40 <nielsm> ideally you'd structure the GS as doing a prospecting step, setting the progress aside somewhere that can be used for the save/load data, process events, then go do the next prospecting step
21:18:59 <andythenorth[d]> that might require me having more understanding
21:19:19 <andythenorth[d]> but each single instance of prospecting will take place no?
21:19:28 <andythenorth[d]> it's still a command getting executed, game state changes?
21:21:53 <nielsm> prospecting, at least when done by a player, costs money, so it is a command
21:23:01 <nielsm> I'm not sure if a GS has the restriction on "prospecting", I think it can (only) issue direct build insdustry commands, which either succeed at the tile given, or fail
21:26:29 <nielsm> and if it fails, it fails before the command is issued
21:29:12 <glx[d]> IIRC prospection never fails for GS
21:30:04 <glx[d]> bool prospect_success = deity_prospect || Random() <= indspec->prospecting_chance;
21:31:04 <glx[d]> well unless it can't find a suitable place after 5000 tries
21:35:51 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:38:08 <andythenorth[d]> ah so the grf probability doesn't apply?
21:38:16 <andythenorth[d]> but it might not find a location
21:38:26 <andythenorth[d]> but it does try quite hard....
21:38:39 <glx[d]> and it can prospect or fund at will
21:38:51 <andythenorth[d]> so 5000 tries, for one command?
21:39:28 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:40:08 <glx[d]> yes the loop is inside the command
21:40:30 <andythenorth[d]> great
21:40:36 <andythenorth[d]> so instead of do...while (target not met)
21:40:56 <andythenorth[d]> I can do for i in range(target) ... prospect
21:41:13 <andythenorth[d]> and if that doesn't work, probably not possible on current map
21:41:37 <glx[d]> each try is random tile and random layout
21:44:10 <andythenorth[d]> ok next thing
21:44:23 <andythenorth[d]> can we make industry construction message suppressable?
21:44:28 <andythenorth[d]> either in GS or grf or both
21:44:49 <andythenorth[d]>
21:44:49 <andythenorth[d]> I am adjusting the map at game start
21:44:58 <andythenorth[d]> ^ that's nice for debug, but is a weird way to start the game
21:49:01 <glx[d]> disabled only for editor it seems
21:50:05 <glx[d]> and the message also post the event to AIs and GS
21:55:26 <Samu> there is no BridgeType enum :/
21:55:59 <petern> That's a bit like asking for an enum of engines.
21:58:43 <andythenorth[d]> I would like an enum of engines
22:00:14 <Samu> static const BridgeID BRIDGE_INVALID = ::MAX_BRIDGES; ///< Invalid Bridge ID.
22:00:53 <Samu> it almost makes sense
22:02:06 <glx[d]> there are only 13 valid bridgeID
22:02:06 <andythenorth[d]> ok so sounds like the news message is non-trivial to suppress
22:02:34 <Samu> but the number 13 being used for invalid bridge seems dumb
22:03:12 <glx[d]> it works
22:03:31 <petern> Until more bridges are added.
22:03:41 <TallTyler> It can be fixed then?
22:03:42 <glx[d]> it will still work ๐Ÿ™‚
22:04:58 <glx[d]> and that's why you should use XXX_INVALID or INVALID_XXX in the checks
22:06:36 <petern> And don't check for founder 0x12 ๐Ÿ™‚
22:07:53 <petern> Hmm, I wonder if it is necessary for objects to have an object id.
22:08:12 <petern> Oh. Savegame compatibility would be awkward.
22:08:15 <glx[d]> for internal use it helps
22:08:32 <petern> Stations are identified by class & index within the class.
22:08:42 <petern> Objects have a class & index within the class, but also an id.
22:09:01 <Samu> going from -1 to 4294967295 and then to 13
22:09:11 <petern> But I think some default objects are not actually in a class.
22:09:12 <glx[d]> stations have a fallback mechanism
22:09:14 <Samu> GetBridgeID
22:09:42 <glx[d]> if the newgrf is not available it will use default
22:32:45 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
22:40:47 <Samu>
22:41:08 <Samu> not sure about the script story page fix, seems wrong still
22:47:12 <Samu> the engine max order distance still wrong apparently
22:48:29 <Samu> ah no, it's fine
22:48:43 <Samu> uint16 fits well into a int
22:51:39 <Samu> oh wait a minute...
22:51:42 <Samu> return ::Engine::Get(engine_id)->GetRange() * ::Engine::Get(engine_id)->GetRange();
22:51:55 <Samu> uint16 * uint16 = ?
22:53:31 <Samu> okay, it's wrong
23:00:20 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
23:09:12 <Samu> multiplication could overflow
23:10:24 <Samu>
23:10:30 <Samu> okay im off to bed, take care
23:10:36 *** Samu has quit IRC (Quit: Leaving)
23:24:12 *** sla_ro|master has quit IRC ()
23:39:58 <petern> > _object_specs.size() * sizeof(ObjectSpec)
23:39:58 <petern> 170624
23:40:07 <petern> That's ... slightly smaller than the default allocation.