IRC logs for #openttd on OFTC at 2023-01-18
β΄ go to previous day
00:22:38 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
01:00:10 *** Wormnest has joined #openttd
01:52:51 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
02:10:36 *** tokai|noir has joined #openttd
02:10:36 *** ChanServ sets mode: +v tokai|noir
02:15:48 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
02:15:59 *** WormnestAndroid has joined #openttd
02:17:23 *** tokai has quit IRC (Ping timeout: 480 seconds)
02:30:21 *** Wormnest has joined #openttd
02:34:44 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
02:34:53 *** WormnestAndroid has joined #openttd
02:34:57 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
02:35:13 *** WormnestAndroid has joined #openttd
02:48:35 *** Wormnest has quit IRC (Quit: Leaving)
03:17:08 *** debdog has quit IRC (Ping timeout: 480 seconds)
05:47:59 *** _aD has quit IRC (Quit: leaving)
06:00:03 *** keikoz has quit IRC (Ping timeout: 480 seconds)
07:14:35 *** sla_ro|master has joined #openttd
07:16:38 <andythenorth[d]> wonder how much bad stuff I can do in GS
07:16:41 <andythenorth[d]> at game start
07:16:44 <andythenorth[d]> with free opcodes
08:21:38 <andythenorth[d]> ok, computing like it's 1984: how many rects do I need to approximate a circle? π
08:23:39 <andythenorth[d]> ok there must be algorithms for this
08:24:45 <andythenorth[d]> walking tiles individually for pi r^2 of origin seems silly
08:24:58 <andythenorth[d]> so r will clip through the corners of that red rect
08:25:01 <andythenorth[d]> so that's one big rect
08:25:18 <andythenorth[d]> but the yellow and green rects need something different
08:26:46 <andythenorth[d]> ok google is not massively helpful
08:26:56 <andythenorth[d]> 'need' is a strong word
08:27:23 <andythenorth[d]> I am exploring what GS can do already, and at what cost
08:27:39 <andythenorth[d]> GS has been massively under-explored
08:28:06 <andythenorth[d]> 57 city builders, all of which appear to use a simplistic cargo monitor and town growth, and just break with FIRS a lot
08:28:15 <andythenorth[d]> a few interesting scripts I don't understand
08:28:18 <andythenorth[d]> not much else
08:28:43 <dP> because gs has very few functions that actually affect gameplay :p
08:29:00 <dP> at some point town growth was about the only one
08:29:14 <andythenorth[d]> things are changeable
08:30:31 <dP> on practice the haven't been changed much for years
08:31:00 <dP> gs is still plagued with fundamental problems it had at birth
08:31:12 <dP> command delay, opcode limit, lack of callbacks, etc
08:34:12 <dP> one of the most useful features of citymania server is the ability to intercept and reject player commands
08:36:15 <dP> adding something like that to gs seems nearly impossible
08:38:26 <dP> even if some entry point is added to gs to filter commands exploring command structure would be an api nightmare
08:39:40 <andythenorth[d]> just needs put in a box, respecting what the purpose of GS is
08:39:56 <andythenorth[d]> I found conversations from like 2012 in irc
08:40:15 <andythenorth[d]> it was very much presented as all-purpose solution for everything that grf couldn't do
08:40:25 <andythenorth[d]> and that grf should primarily be concerned with graphics
08:40:40 <andythenorth[d]> mistakes were made
08:40:59 <dP> andythenorth[d]: though this is not wrong :p
08:41:02 <andythenorth[d]> I don't think it really has been tried TBH
08:41:15 <andythenorth[d]> GS is a way to enrich the state that's on the map
08:41:27 <andythenorth[d]> and provide some gameplay hints
08:41:40 <andythenorth[d]> it's not a modding framework
08:41:56 <andythenorth[d]> that can have control over all entities, methods etc in ~real-time
08:42:59 <andythenorth[d]> (1) it's been framed wrong (GS vs grf), partly my fault
08:43:05 <andythenorth[d]> (2) it's a total PITA to develop on
08:43:22 <andythenorth[d]> (3) it should be usable by content authors, but, mostly, it's only usable by programmers
08:43:44 <andythenorth[d]> (4) it's not really been explored enough
08:44:11 <andythenorth[d]> 1-4 or all changeable
08:44:36 <dP> imo any good modding framework should a) run on client, b) partially abandon compatibility
08:44:52 <andythenorth[d]> ok, so it's fine to declare GS 'not a good modding framework'
08:45:07 <andythenorth[d]> but then the conclusion is one you already made: mod the client
08:45:16 <andythenorth[d]> client / server /s
08:45:49 <dP> it's more like the conclusion jgr made xD
08:45:55 <dP> cmclient is compatible so has some isssues
08:46:03 *** WormnestAndroid has quit IRC (Remote host closed the connection)
08:46:51 <andythenorth[d]> my goals are not complex right now
08:47:02 <andythenorth[d]> I can use GS to improve generated maps with FIRS
08:47:15 *** HerzogDeXtEr has joined #openttd
08:47:17 <andythenorth[d]> so I don't spend 30 minutes generating a viable random map
08:47:35 <andythenorth[d]> I can do town growth which *could* be done in grf also, and should be, but eh
08:48:11 <andythenorth[d]> I can manage the fact that OpenTTD really fails at building industries during gameplay in any way that makes sense for gameplay
08:48:21 <andythenorth[d]> I can manage the size of towns
08:50:23 <andythenorth[d]> more brackets π
08:50:34 <andythenorth[d]> (5) it's not clear if there's appetite to extend GS, which is standard OpenTTD 'if somebody is interested it will happen'
08:51:13 <andythenorth[d]> stuff like pathfinding and circular tile searches and partitioning tiles into shapes
08:51:32 <andythenorth[d]> that's programmer stuff, content authors won't be able to do it
08:51:48 <andythenorth[d]> there are libs, but eh, they're hard to find, they lack docs, and I have no way to know if they're good or not
08:52:13 <andythenorth[d]> some pathfinder in a lib might be a terrible implementation, I wouldn't know
08:53:27 <andythenorth[d]> case in point....I want to build roads between large cities at game start
08:53:43 <andythenorth[d]> there are multiple libs for that
08:54:36 <dP> there is a limit to how much logic you can do without coding as it basically means it's implemented in a library
08:54:55 <dP> like, for example, grf-py can do cargo subtypes for you but not push-pull xD
08:56:03 <andythenorth[d]> superlib, for example has a roadbuilder
08:56:39 <andythenorth[d]> Zuu wrote it, so it's probably good
08:57:30 <andythenorth[d]> but then forums says `- RoadPathFinder from SuperLib is really really slow. I don't know much if I do something wrong, but even on a small map the towns takes several minutes to connect (on a big map, this cas spent several hours!). Good news, you can still play while the GS connects roads.`
08:58:53 <dP> well, pylon placer is doing similar thing so it can be done relatively quickly :p
08:59:17 <andythenorth[d]> then, because humans naturally take path of least resistance
08:59:25 <andythenorth[d]> and JGRPP connects city roads
08:59:50 <andythenorth[d]> discussion about making it better in vanilla probably goes off to die
09:00:13 <andythenorth[d]> why offer GS faster ways of doing things if you can just download a patched client?
09:00:41 <andythenorth[d]> (I'm not anti the patched clients, 100% supportive, but just people's gonna people)
09:01:38 <andythenorth[d]> instead of command 'build road tile' repeat 3000 opcodes, why can't the game just have a command 'build road between (xy), (xy)
09:01:50 <dP> well, patched client doesn't compete with gs as gs runs on servers xD
09:02:03 <andythenorth[d]> it's the headspace that is competed for
09:02:47 <andythenorth[d]> GS gets better if people do interesting things with it, even if they're not perfect or technically amazing
09:02:50 <andythenorth[d]> or even great gameplay
09:02:57 <andythenorth[d]> even the pylon placer showed that
09:03:08 <andythenorth[d]> lots of players would love a pylon placing assistant
09:03:11 <dP> andythenorth[d]: if there are too many specific functions in the game supporting it will become hard
09:03:13 <andythenorth[d]> enhancing the map
09:03:18 <dP> newgrf situation would be an example
09:03:33 <andythenorth[d]> I am aware that everything we add restricts future choices
09:03:38 <dP> that's why I said good modding should abandon compatibility, at least partially
09:03:48 <andythenorth[d]> but successful APIs have to commit to offering enough functionality
09:04:09 <andythenorth[d]> if it's all primitives, that's useful for programmers, but not less capable authors
09:04:19 <andythenorth[d]> and then if it's all primitives AND it's execution limited
09:04:31 <andythenorth[d]> it's like trying to suck up the ocean through a straw
09:05:05 <andythenorth[d]> it's like having a web API with basic create / edit / delete record, but only one at a time AND it's rate limited to 1 execution per second
09:05:39 <dP> andythenorth[d]: so leave the api and remove the rate limit ;)
09:05:56 <andythenorth[d]> that's an approach, but having a credible API doesn't prevent that
09:06:21 <andythenorth[d]> at that point, taking the web example, now you're building your own application, or running patched binaries somewhere
09:07:01 <dP> it doesn't, it's just that api should aim to allow modders to do as much as possible
09:07:23 <dP> not spec some specific features that someone asked somewhere once
09:07:52 <dP> again, citybuilder api in gs would be an example
09:09:20 <dP> it allows to set cargo goals for town but citybuilder logic is hardcoded so it's useless
09:09:48 <andythenorth[d]> so API design is the art of finding the right level of generic thing, and making it configurable with parameters
09:09:53 <andythenorth[d]> this is not our first rodeo
09:10:11 <andythenorth[d]> too generic, no-one can use it, it's all primitives
09:10:21 <andythenorth[d]> too specific...well that's just too specific
09:10:57 <dP> making specific things out of generics is the job for libraries
09:11:17 <andythenorth[d]> so this might all look very different if e.g. Zuu was active
09:11:21 <andythenorth[d]> as an example
09:12:21 <dP> if any dev actually cared about gs
09:12:43 <andythenorth[d]> who knows if they don't?
09:12:54 <andythenorth[d]> mostly the chat around GS is negative, and even programmers are social
09:13:07 <andythenorth[d]> there's not much in the way of lolz, and the problems aren't framed to be interesting
09:13:13 <andythenorth[d]> but GS features get added
09:14:26 <andythenorth[d]> if it's more interesting / entertaining, it will get contributions
09:14:29 <andythenorth[d]> and we'll learn something
09:21:25 <reldred> I need to watch that at some point
09:24:01 <dP> I don't use GS yet am probably the one adding the most new features lately :p
09:24:11 <dP> kinda tells something about gs development xD
09:24:41 <andythenorth[d]> GS development sucks
09:24:53 <andythenorth[d]> everything is nearly good, but the friction is silly
09:25:01 <andythenorth[d]> docs are nearly complete, but really hard to use
09:25:21 <andythenorth[d]> easy to follow examples are non-existent, but there is MinimalGS as a good start point
09:25:37 <andythenorth[d]> there's no way to reload the GS other than reload save, and that takes 3 clicks
09:26:21 <andythenorth[d]> there are libs that do things, but minimal docs, and no way to know which are good
09:26:52 <andythenorth[d]> there's no established guidance on e.g. performance re: opcodes etc
09:26:56 <dP> I wouldn't call gs nearly good, more like the opposite :p
09:27:07 <andythenorth[d]> you have different ambitions for it I suspect
09:27:19 <dP> I considered using gs when I started citymania but quickly abandoned the idea
09:27:26 <dP> it has barely anything of what I need
09:27:57 <andythenorth[d]> I think it's an apples, oranges situation
09:28:11 <andythenorth[d]> GS is a 10% change thing, you want more like 60% change
09:28:42 <andythenorth[d]> we don't even have conventions / expectations
09:28:53 <andythenorth[d]> like....am I supposed to support 16k^2 maps in GS, or not?
09:29:07 <dP> well, in theory, that's the exact problem GS was supposed to solve
09:29:18 <dP> allowing (servers) to implement custom game modes
09:29:23 <andythenorth[d]> AIUI, GS was an accident, not an intent
09:29:51 <andythenorth[d]> I asked a long time ago about a goals framework, was told it was ~impossible
09:30:01 <andythenorth[d]> then one day NoGo just appeared as an extension to NoAI
09:30:11 <andythenorth[d]> 'accident' is the wrong word
09:30:18 <andythenorth[d]> 'emergent' would be better
09:33:04 <dP> take the framework that kinda sucks and extend it to the area it has no hopes of ever being good at :p
09:34:46 <All_Heil_Lord_Pepe> How easy is it edit someone else's newgrf?
09:35:27 <andythenorth[d]> dP: or design an alternative that will attract enough interest to get implemented
09:38:49 <andythenorth[d]> can't find the spec Truebrain was working on π
09:38:57 <andythenorth[d]> was a few years ago
10:02:27 <Merni> All_Heil_Lord_Pepe: If the grf was written in NML and the NML source code is available, it's quite easy since NML is rather easier to learn than NFO. If only the NFO source, or the .grf file is available, then you need to learn NFO which is pretty hard
10:08:43 <Pruple> writing NFO isn't hard, especially if you're only doing simple things. But decompiling a grf will give you unformatted, uncommented lumps of code, rather than the original source.
10:08:43 <Pruple> In any case, it's worth asking the original author if you want to extend or change something.
10:11:07 <Pruple> the biggest headache with NFO is that no-one is maintaining renum, so it's very out of date. π
10:28:48 *** TheRisky_Bandit030 has joined #openttd
11:13:05 <andythenorth[d]> LordAro: last I recall frosch was -1 to renum, but that might be false memories
11:19:24 <Samu> there are two sources of CT_NO_REFIT
11:21:11 <Samu> SpecialCargoID::CT_NO_REFIT
11:21:32 <Samu> they all happend to have the same value, but still looks strange
11:41:10 <dP> Pruple: grf-py decompile is quite readable ;)
11:42:27 <dP> but ofc not at the level of hand-written code
11:42:53 <dP> though some hand-written nfo is worse :p
11:45:40 <CplBurdenR3294> I find its one of those truisms that no matter how bad machine written code is, you can always find a human who chooses to code in an even sloppier style π
11:45:59 <CplBurdenR3294> It takes human ingenuity to really foul things up π
11:46:34 <petern> Hmm, 60 seconds to restore packages before compiling. Maybe I should pre-cache those...
11:46:52 <petern> On the other hand, it's not that much, and reproducible builds are nice.
11:56:37 <petern> Well, that took extra long...
12:17:32 <andythenorth[d]> ok let's try partitioning all tiles into various regions, in GS
12:17:36 <andythenorth[d]> for the whole map
12:17:41 <andythenorth[d]> 'what could go wrong'?
12:34:47 *** WormnestAndroid has joined #openttd
12:41:21 <glx[d]> andythenorth[d]: It's already possible to build a straight section in one call
12:42:01 <glx[d]> As user can drag to build
13:02:08 *** JustANortherner has quit IRC (Quit: User went offline on Discord a while ago)
13:10:35 <Samu> regression doesn't test many things, and yet it's still does a lot already
13:14:04 <andythenorth[d]> I have a regrettable idea to make a test / examples GS
13:14:28 <andythenorth[d]> one of the main reasons NML succeeded is that people wrote a *lot* of docs
13:14:38 <andythenorth[d]> like serious effort, writing docs is really hard and boring
13:14:53 <andythenorth[d]> that was a big achievement
13:15:55 <andythenorth[d]> how in scope is the squirrel?
13:16:15 <andythenorth[d]> do we have access to actual squirrel lines of code in OpenTTD?
13:16:15 <andythenorth[d]> or is it all compiled to some bytecode or something?
13:19:53 <glx[d]> It's compiled to bytecode
13:20:21 <andythenorth[d]> I was thinking of - I don't know how exactly - but something like an example GS with a storybook
13:20:32 <andythenorth[d]> so you could go to the 'GSRoad' page of the storybook
13:20:37 <andythenorth[d]> and click 'build a road example'
13:20:41 <andythenorth[d]> and see what it does
13:20:53 <andythenorth[d]> but also have a window with the related squirrel
13:21:52 <glx[d]> Regression AI uses many parts of the API
13:22:04 <LordAro> and also not nearly enough
13:22:57 <andythenorth[d]> well the nice thing about regressions etc is that every little improvement is good π
13:23:01 <andythenorth[d]> and having anything beats having nothing
13:23:43 <andythenorth[d]> for that prospecting issue, what I _should_ have done is provide a quick example GS
13:23:51 <andythenorth[d]> to at least aid testing
13:24:48 <glx[d]> From GS POV prospecting was fine, the issue was with newgrf communication π
13:25:22 <andythenorth[d]> ok so maybe I should have provided both π
13:25:32 <andythenorth[d]> it looked to Tyler like a GS issue, so maybe the framing has to be better
13:26:32 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
13:26:35 *** WormnestAndroid has joined #openttd
13:26:38 <andythenorth[d]> does regressions AI run on the CI?
13:29:29 <andythenorth[d]> is there an equivalent regressions GS, or would that just be duplicating the same methods etc?
13:30:28 <Samu> * \li AIOrder::GetOrderDistance parameter order has changed to 'origin_tile, dest_tile, vehicle_type'
13:30:29 <Samu> * from 'vehicle_type, origin_tile, dest_tile', to make it useable with valuators. Now tests the
13:30:29 <Samu> * validity of the vehicle type, returning -1 for invalid vehicle types.
13:31:56 <glx[d]> Hmm if you want to use it as valuator it's easy to write a wrapper and not change the function itself
13:32:59 <Samu> didn't think about that :)
13:38:48 <Samu> how do i check how the doxygen document looks like?
13:40:19 <Samu> wanted to see how it ends up looking like
13:47:46 <petern> Bring back the OpenTTD port?
13:50:36 <petern> Hmm, can I run it on my A7000+?
13:51:43 <andythenorth[d]> I just want chocks away on a pi π
13:52:01 <andythenorth[d]> steam deck would be even better
13:52:11 <andythenorth[d]> Andrew Hutchings probably lives near ish to you
13:52:20 <andythenorth[d]> Reading, Slough, M4 corridor somewhere
13:52:25 <andythenorth[d]> he does sound programming now
13:53:34 <andythenorth[d]> was it lunch?
13:59:50 <petern> Yes, you missed it. You'll have to wait for dinner time now.
14:03:50 <LordAro> i've denied the person who directly requested membership of the es_MX group
14:09:45 <andythenorth[d]> petern: might have a nap then
14:10:04 * andythenorth[d] stuck in a queue to get drains unblocked
14:10:34 <petern> Do I want to go MTB cycling at feels-like -3Β°C tonight?
14:10:42 <andythenorth[d]> it's apparently good for you
14:11:05 <andythenorth[d]> I wouldn't, but I'm an indoors type, and I've accepted I won't live 3 years longer
14:11:17 <andythenorth[d]> all weather cyclists live longer, on average
14:12:23 <andythenorth[d]> I'd find a reference link, but every result in google is just a cookie banner
14:12:26 <andythenorth[d]> glad about the internet
14:14:03 <LordAro> i wasn't planning on going road (well, flood lit circuit) cycling tonight in feels-like -4C
14:14:15 <andythenorth[d]> shall I stream this hold music in Discord?
14:14:46 <andythenorth[d]> is 'feels-like' accounting for wind chill at 20 mph?
14:14:55 <andythenorth[d]> and does it net off the heat gain from activity?
14:15:34 <LordAro> dunno where the number comes from, i was just taking it off BBC weather
14:16:02 <LordAro> i'm already at the point of shivering just sitting at my desk
14:16:08 * LordAro goes to find a jumper
14:16:35 <andythenorth[d]> I have 2 hoodies
14:18:47 <petern> I also have my current excuse of "waiting for my new prescription cycling glasses so I don't ruin my Β£200 regular glasses"
14:25:12 <Samu> regression is kinda lacking for the tests I wanted
14:25:30 <Samu> cus it never tests the compatibility nut files
14:27:56 <Samu> i searched the return values of all uint and int functions, found a few issues and fixed them
14:28:28 <petern> You can make more tests that test those.
14:29:34 <glx[d]> It should be possible to manually load compatibility files
14:34:22 <glx[d]> Run the tests, load compat_0.7, rerun the tests
14:36:57 <glx[d]> First time will need manual comparison of the results, but after that any diff in the output should be easy to catch
14:38:57 <glx[d]> Another option is to add another regression test which just set API version to 0.7 and compare output to the normal regression output
14:40:02 <glx[d]> Hmm no, can't work as output can be different for previous versions, that's why we add compatibility nut
14:57:38 <Merni> merni-nsviaGitHub: JGRPP just increases the limit to 63 (similar to increasing station name length limits etc). I think that'd practically work for the majority of cases -- especially considering more than 63 letters are likely to be not visible in the purchase menu anyway (since there is no horizontal scrolling there).
14:59:07 <Merni> I got the issue because the Czech Railway Set uses a huge number of spaces to align text like this π€¦. This is even more than 63 chars
15:00:32 <Merni> There's also this example from the v4 CEE set which is more than 64 chars and doesn't fit in any way on my screen unless I reduce the text scaling π€¦
15:02:15 <Merni> Come to think of it, why don't NewGRF strings have a length limit?
15:29:32 <andythenorth[d]> Merni: I applaud the idea, that implementation sucks. petern separate suffixes? π
15:30:12 <FLHerne> All_Heil_Lord_Pepe: other thing is: if you only want to alter the graphics it's easy in any case
15:30:18 <Merni> Or just do icons, or non-aligned (), like every other set
15:31:31 <Merni> The offsets they've used are so huge that unless you make the window very *w i d e*, you just see "..." instead of that column
15:33:43 <Pruple> Merni: Or none of the above, and put it in the extra text just in case the player *really* needs to know "this is a diesel"...
15:34:24 <Merni> I would argue it's quite important to at least know whether something is electric or not
15:38:26 <andythenorth[d]> I just like the TTD style
15:38:57 <andythenorth[d]> I do find it noisy though
15:43:42 <andythenorth[d]> might be self-inflicted
15:44:26 <glx[d]> Samu: it's what we call an overflow
15:53:02 <petern> andythenorth[d]: Someone was going all out with suggesting callbacks and stacks... I have no idea.
16:16:48 <andythenorth[d]> some people are just wrong though
16:47:56 *** gelignite has joined #openttd
17:17:15 <frosch> some weird company which crawled our website, found it necessary to sent us a mail that it did so, and how it will process the data in compliance to the GDPR, including forwarding it to outside the EU
17:20:30 <andythenorth[d]> frosch: shall we consult legal counsel?
17:22:13 <andythenorth[d]> 'armchair legal counsel'
17:22:18 <andythenorth[d]> I should update my linkedin
17:22:27 <frosch> backseat legal counsel?
17:48:31 *** Wormnest has joined #openttd
17:50:45 *** esselfe has quit IRC (Ping timeout: 480 seconds)
17:50:55 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
18:02:55 *** esselfe has joined #openttd
18:22:06 <andythenorth[d]> hmm timing GS
18:23:04 <andythenorth[d]> ah we have systemtime π
18:26:20 <andythenorth[d]> ah granular to seconds only
18:27:42 <andythenorth[d]> hmm are there limited free opcodes at game start?
18:27:59 <andythenorth[d]> my script ran a bunch of commands very fast, then suddenly stopped
18:28:03 <andythenorth[d]> until I unpaused
18:29:43 <andythenorth[d]> will be 2000 or more
18:44:05 <frosch> chatgpt labels each conversation with some title matching the subject
18:44:22 <frosch> i talked with it about newgrf, and it titled the conversation "new chat" π
18:45:16 <frosch> you never now when it is correct and when not
18:45:57 <frosch> anyway, when i pressured it into clarifying the details, which it got wrong, it gave up answering :/
18:46:14 <frosch> it's like a sales person
18:46:25 <DorpsGek> - Update: Translations from eints (by translators)
18:52:28 <andythenorth[d]> can it advise me on GS?
18:52:46 <andythenorth[d]> just inefficiently and clunky
18:55:02 <frosch> it can talk better about things, which are often talked about on the internet
18:55:13 <frosch> the nml/nfo stuff was pretty bad
18:55:50 <frosch> if you ask it about ottd-addon design, most of the training data is probably andy chatting on irc
18:56:10 <frosch> so you could talk with your past self about gs design π
19:01:04 <andythenorth[d]> we asked it to redesign Horse, in another channel
19:01:17 <andythenorth[d]> it was not bad, but it was quite focussed on realism
19:01:25 <andythenorth[d]> or lies, presented as realism
19:01:45 <andythenorth[d]> it wasn't very keen on suggesting gameplay, and kept saying "it's your choice"
19:01:55 <andythenorth[d]> lawyer-induced liability clause maybe π
19:03:13 <frosch> i don't think lawyers are involved π it generally talks a lot without saying much, and repeating everything at least twice
19:04:55 <andythenorth[d]> am I GS correctly?
19:05:06 <frosch> it's actually annoying to talk to, it beats around the bush all long
19:06:34 <frosch> are you writing a GS which observes player's construction efforts and tries to block their progress by putting industries into their way?
19:06:57 <andythenorth[d]> no but that sounds good
19:07:39 <andythenorth[d]> I want to divide the map into 9 equal quadrants, then build n farms in each quadrant
19:07:56 <andythenorth[d]> I can't limit prospecting, so I'll have to reimplement a random tile search
19:08:08 <andythenorth[d]> but I can use the GS test mode somehow to prospect
19:08:23 <andythenorth[d]> I might want to detect sea tiles also, and adjust the placement attempts accordingly
19:08:55 <andythenorth[d]> an alternative project is to place a scrap yard in every town with more than x population
19:09:12 <andythenorth[d]> which will require walking all the tiles to find which town they belong to
19:09:25 <andythenorth[d]> GS is really interesting, dunno why it's so neglected π
19:10:24 <andythenorth[d]> I was hoping I could walk all the tiles in the free opcodes at game start
19:10:59 <andythenorth[d]> GS seems to have Init() or so which seems less restricted
19:11:13 <andythenorth[d]> if I don't exec any commands, am I unlimited?
19:11:52 <frosch> looks like you found your hammer to turn things into nails π
19:12:13 <andythenorth[d]> or to make everything look like a nail?
19:13:02 <frosch> "walk all tiles" sounds like something that is always wrong to do π
19:13:26 <andythenorth[d]> I am hoping (a) it works, (b) somebody agrees it's stupid and provides alternative methods / ideas
19:13:42 <andythenorth[d]> otherwise we just go around in hot air about GS vs everything else, like since 2012
19:13:44 <frosch> you could walk the towns instead
19:14:11 <andythenorth[d]> if we had actual areas, I could define an area per town?
19:14:31 <andythenorth[d]> I'd probably generate allowed areas for different industries by type or something
19:14:39 <andythenorth[d]> there are many use cases
19:15:14 <frosch> interesting, when i wrote the area-control thingie, i aborted it because i did not find any use case π
19:15:21 <andythenorth[d]> I can find many I think
19:15:59 <andythenorth[d]> also, if there's some common data structure, which GS can update, and grf can read as a var or something
19:16:18 <andythenorth[d]> then the 'GS is not a callback' problem disappears
19:16:54 <andythenorth[d]> areas do not generally need frequently updating, and if we lost 20% of the use cases because they're slow to update, then 80% is still good
19:17:23 <andythenorth[d]> GS -> for industry type X, these are the allowed tile indexes
19:17:34 <andythenorth[d]> grf -> read that as a var during cb 28 or friends
19:17:51 <andythenorth[d]> or a flag to delegate entirely to the area
19:18:26 <andythenorth[d]> it can't just be delegated as 'area' might be one of a number of conditions
19:18:39 <andythenorth[d]> I read that yesterday again π
19:19:15 <andythenorth[d]> I'm stumbling on why we actually need json, except that it's more arbitrarily extensible?
19:19:51 <andythenorth[d]> "NewGRF can query GS information, which has been set in advance by the GS."
19:20:57 <andythenorth[d]> "GS can then also not influence placement of initial industries etc." <- no but it could delete ALL of them π
19:21:04 <andythenorth[d]> and start again
19:21:40 <andythenorth[d]> I've already ruled out caring about performance on (1) very large maps (2) very large numbers of towns or industries
19:22:21 <dP> andythenorth[d]: well, you could do delaunay triangulation...
19:24:05 <andythenorth[d]> frosch: "GS/AI info query callback" <- can that be otherwise understood, as 'here is a templated query, please fill out the correct values', like a form π
19:24:10 * andythenorth[d] trying to understand
19:25:28 <frosch> yes, the newgrf contains a static template. then callbacks fill in the variables. and the gs gets a complete data structure
19:26:22 <frosch> for exchanging data dicts/lists/... are pretty common, and gs/ai also uses them for saveload data
19:26:32 <frosch> so the idea is to also use that for gs<->newgrf
19:26:44 <frosch> json is just one syntax (which ottd already uses in other places)
19:27:09 <frosch> you could also use protobuf or whatever, but json is the easiest format of the non-ambiguous ones
19:27:32 <andythenorth[d]> sems fine π
19:28:16 <frosch> though maybe that would make yaml a good fit for newgrf π
19:28:18 <andythenorth[d]> it's probably much more likely to get a PR now we've got a format war π
19:29:06 <andythenorth[d]> unrelated, but it would be helpful if news messages could be suppressed π
19:29:17 <andythenorth[d]> GS commands might not want to be newsworthy
19:29:55 <frosch> i guess events at game start are not newsworthy
19:30:14 <frosch> but otherwise they are relevant as the default industry spawn spam
19:30:27 <andythenorth[d]> it would need selective suppression
19:34:03 <andythenorth[d]> I can probably reimplement prospecting in GS, but it would be helpful to just use game prospecting, restricted to an optional tile array or other area definition,
20:20:59 <andythenorth[d]> trying to find map size in GS π
20:21:08 <andythenorth[d]> doxygen search would be so helpful π
20:25:15 <dP> I usually search source code xD
20:27:19 <supermop_toil> i could have sworn grasshopper could use regular expressions and a could write module*
20:27:24 <supermop_toil> but i guess noe
20:27:38 <andythenorth[d]> could we patch the errors to not be unreadable?
20:27:47 <andythenorth[d]> red on grey with black shadow
20:29:05 <andythenorth[d]> can't see any string codes here `seprintf(buf, lastof(buf), "Your script made an error: %s\n", error);`
20:32:29 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
20:35:52 <andythenorth[d]> is the URL something I'm supposed to supply?
20:43:15 <andythenorth[d]> actually can't find the red π
20:43:46 <andythenorth[d]> found `STR_ERROR_AI_PLEASE_REPORT_CRASH`
20:44:29 <Pruple> they're less unreadable in a proper font... and yes, it will show the URL you provide in the info.nut iirc
20:47:13 *** TROILUS5 has joined #openttd
20:48:06 <andythenorth[d]> I don't want errors reported π
20:54:18 *** TROILUS has quit IRC (Ping timeout: 480 seconds)
20:54:19 *** TROILUS5 is now known as TROILUS
20:55:38 <andythenorth[d]> ErrorPrintFunc or something?
21:02:26 <andythenorth[d]> ok baffled, red string code must be injected somewhere
21:02:29 <andythenorth[d]> but I can't find it
21:07:53 *** Beer has quit IRC (Quit: Leaving)
21:10:47 *** gelignite has quit IRC (Quit: Stay safe!)
21:17:13 *** Beer has quit IRC (Quit: Leaving)
21:24:26 *** Beer has quit IRC (Quit: Leaving)
21:27:33 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:35:12 <andythenorth[d]> so much better
22:02:55 <TallTyler> andythenorth[d]: Is regular AI/GS console test always black, or can it be other colours?
22:03:28 <TallTyler> White on grey does look much better, as long as it stands out as an error against otherwise black text
22:03:37 <andythenorth[d]> there are classes of log message
22:03:49 <andythenorth[d]> LOG_WARNING is yellow
22:03:55 <andythenorth[d]> the other non-errors are black
22:04:14 <TallTyler> Oh I see in the code now π
22:04:56 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:05:14 <TallTyler> It feels strange to me to have Warnings be more βhey look at meβ than Errors
22:05:51 <TallTyler> Perhaps a different colour could be used, maybe Gold or Orange, to be more scary looking than Yellow but more readable than Red
22:06:06 <TallTyler> Or warnings could change too
22:06:20 <andythenorth[d]> the script crashes anyway on error
22:06:23 <andythenorth[d]> so you have to look
22:06:26 <andythenorth[d]> and the window opens
22:06:32 <andythenorth[d]> so it's not like you have to spot them π
22:06:36 <andythenorth[d]> legibility is the priority
22:07:41 <andythenorth[d]> I still don't understand GS, this list is empty when printed
22:07:43 <andythenorth[d]> ` local tile_list = GSTileList();
22:07:43 <andythenorth[d]> tile_list.AddRectangle(GSMap.GetTileIndex(0, 0), GSMap.GetTileIndex(GSMap.GetMapSizeX(), GSMap.GetMapSizeY()));
22:07:44 <andythenorth[d]> foreach (tile, _ in tile_list) {
22:07:44 <andythenorth[d]> Log.Info(tile);
22:23:12 <andythenorth[d]> yeah list is empty, confirmed with Log.Info(tile_list.IsEmpty());
22:23:24 <andythenorth[d]> seems superlib removes 2 tiles from map size
22:23:26 <andythenorth[d]> tile_list.AddRectangle(GSMap.GetTileIndex(0, 0), GSMap.GetTileIndex(GSMap.GetMapSizeX() - 2, GSMap.GetMapSizeY() - 2));
22:23:33 <andythenorth[d]> but that doesn't work for me
22:23:38 <andythenorth[d]> just I do have a stupid typo?
22:24:40 <dP> andythenorth[d]: 0,0 and other border is likely void tile for you
22:24:40 <andythenorth[d]> ok (0, 0) is not a valid tile
22:25:03 <dP> if passed void tile addrectangle does nothing
22:25:27 <Samu> isn't the keyword Script accepted by the commit checker?
22:26:07 <andythenorth[d]> does list not have sizeof or length or something?
22:26:14 <andythenorth[d]> I'm sure I saw that somewhere
22:26:43 <dP> also, GSTileList is custom multimap so probably not a good idea to dump the whole map there :p
22:26:56 <dP> it makes a set for every item
22:27:19 <andythenorth[d]> we live and learn π
22:27:58 <dP> whoever wrote this shit was probably a php fan
22:28:03 <dP> it also has silly arrays :P
22:28:10 <andythenorth[d]> it's horrific language
22:28:12 <andythenorth[d]> it's nearly good
22:28:15 <andythenorth[d]> but it's not good
22:28:40 <andythenorth[d]> ok on 512x256, it takes 1s to walk all tiles with foreach
22:28:45 <andythenorth[d]> just doing nothing
22:30:02 <andythenorth[d]> if I also increment a counter, it's 2s
22:30:33 <andythenorth[d]> the squirrel tables and slots system is nearly amazing
22:31:36 <andythenorth[d]> but it seems like a weird abstraction around something that fundamentally appears to be 'dump all your vars into a single namespace, but with parent/child hierarchy'
22:34:58 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:40:10 <andythenorth[d]> how do I valuate?
22:42:16 <andythenorth[d]> valuating tiles with their town is faster than doing foreach loop for same
22:51:05 <andythenorth[d]> increased the map size, angered the game π
22:51:40 <glx[d]> valuating is done in C++ π
22:52:18 <glx[d]> and it's somehow counting fake ops
22:52:25 <glx[d]> and barks at some point
22:52:50 <glx[d]> because while you valuate, the game is "paused"
22:55:29 <andythenorth[d]> I figured valuating the map would break π
22:55:33 <andythenorth[d]> now I know why
22:57:25 <andythenorth[d]> wonder if fake prospecting will hit the same thing
22:57:44 <andythenorth[d]> lot of tiles to try
23:12:44 *** Samu has quit IRC (Quit: Leaving)
23:48:48 *** sla_ro|master has quit IRC ()
continue to next day β΅