IRC logs for #openttd on OFTC at 2025-01-21
⏴ go to previous day
00:00:15 <peter1138> Alright, shall I do a callback for colour remap?
00:24:44 <peter1138> CMake Error at /home/petern/src/openttd/cmake/scripts/CreateGRF.cmake:53 (message): NFORenum failed
00:29:21 <peter1138> //!!8bpp normal zoom sprite must appear first.
00:34:30 <peter1138> Just need a slightly better way to bolt it onto the NFO.
00:35:15 <peter1138> As badges.grf is built with grf-py, I have to build it, decode it, copy the files to the right place, and strip the action 14 and 8.
00:38:05 <_glx_> like any change in openttd NFO
00:38:06 <peter1138> Hmm, now that that 32bpp->8bpp change is merged, maybe I can drop the 8bpp sprites.
00:40:18 <peter1138> Ah no, NFORenum still requires 8bpp.
00:45:09 <peter1138> Approved but not merged.
03:28:43 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:31:49 *** Wormnest has quit IRC (Quit: Leaving)
03:53:41 *** gnu_jj_ has quit IRC (Ping timeout: 480 seconds)
04:43:03 <DorpsGek> - Update: Translations from eints (by translators)
06:08:34 *** keikoz has quit IRC (Ping timeout: 480 seconds)
07:44:26 <andythenorth> errors of sleeping occurred
07:51:49 <andythenorth> peter1138[d]: thanks 😄
08:30:49 *** D-HUND is now known as debdog
09:05:14 <andythenorth> I had some stupid idea at 4am, can't remember why it seemed good
09:05:23 <andythenorth> wanted to give each badge an associated bool bit
09:06:09 <andythenorth> so we could effectively do (python example, but eh) `getattr("my_flags/the_best_flag", False)`
09:06:37 <andythenorth> and then allow the vehicle instance to store the bool, but the flag is on the vehicle spec
09:06:45 <andythenorth> have no idea what the point was
09:07:21 <andythenorth> think it was for caching arbitrary flags, instead of walking the consist constantly
09:07:41 <andythenorth> `horse_flags/consist_has_restaurant_car`
09:20:21 <peter1138> Seems like persistent storage would be more generic and flexible.
09:22:24 <peter1138> How can I set up a translation thing for badges.grf?
09:23:48 <peter1138> `STR_ROLE_RESTAURANT_CAR :Restaurant car`?
09:24:12 <andythenorth> hmm, persistent storage, labelled by badges? 😛
09:24:26 <andythenorth> then could var 0x61 to neighbouring vehicle's storage
09:24:30 <andythenorth> which nobody needs ever
09:24:42 <andythenorth> for meaningless cross-grf cooperation
09:25:38 <peter1138> I think the idea would be to extend the start/stop callback to allow all vehicles in the chain to re-evaluate the chain and update their own storage.
09:26:00 <peter1138> But this could be circular :p
09:28:42 <peter1138> g.add(grf.Comment("Default Badges"))
09:28:47 <peter1138> return bytes((0x0C)) + self.data
09:28:47 <peter1138> ~~~~~~~~~~~~~~^~~~~~~~~~~
09:28:47 <peter1138> TypeError: can't concat str to bytes
09:30:01 <andythenorth> did we find cases for persistent storage beyond "andythenorth has implemented a stupid loop unroll in grf" ? 🙂
09:30:55 <andythenorth> I can forsee lots of extra triggers being asked for, maybe that's ok, can always say no
09:30:57 <peter1138> Property 25 replacement?
09:31:15 <andythenorth> load/unload, servicing, railtype change, periodic etc
09:31:31 <andythenorth> "i need to record when the driver needs a nap"
09:31:39 <andythenorth> prop 25, the best of properties
09:31:48 <peter1138> I think it should be on consist-change.
09:32:06 <andythenorth> maybe this loop unroll is just a side quest
09:32:14 <andythenorth> we could agree to forget it exists
09:32:31 <peter1138> Yup, change you complex ID tests to use badges and be done ;-)
09:33:05 <andythenorth> peter1138: have nearly done that
09:33:23 <andythenorth> I think I did measure Horse effect on FPS subjectively
09:33:40 <andythenorth> can't remember the results, but I think it cut FPS by 50% compared to vanilla vehicles
09:33:49 <andythenorth> not really science though
09:33:54 <andythenorth> maybe xarick could test it
09:34:40 <xarick> i know nothing about NewGRF, but couldn't iron horse trains that have similar properties except use the same engineID?
09:35:43 <andythenorth> I guess I'm hoping someone sets up tests and measures the effect of Iron Horse on performance 😛
09:35:56 <andythenorth> before we change anything without data
09:35:58 <xarick> from a perspective of an AI, they're all different engines :/
09:36:59 <andythenorth> that's because they're all different engines
09:37:23 <andythenorth> the AI is 100% accurate
09:37:28 <xarick> or maybe it's just a me-problem, I go through all engines to pick the "best"
09:37:39 <andythenorth> yes, Iron Horse is designed to prevent "best"
09:37:56 <andythenorth> it's an offensive defense against min-maxing
09:38:12 <xarick> costs precious AI ops time :/
09:38:22 <andythenorth> it's a message to not min-max
09:38:50 <peter1138> Even so, an AI needs to be able to pick an engine.
09:39:01 <andythenorth> when the meta game is 'discover which engine the grf author thinks you *should* use' that gets old
09:39:05 <andythenorth> like 2048 gets old
09:39:18 <andythenorth> or hunting coins under cups
09:39:31 <andythenorth> AI should measure hp / ton
09:39:40 <andythenorth> and have a heuristic for that
09:40:21 <andythenorth> anyway sounds like 'no' from xarick 😄
09:41:04 <xarick> you could release an Iron-Horse redux
09:41:51 <xarick> same iron horse, without the eye-candy variations
09:42:40 <xarick> oh, so it was a me-problem after all 😐
09:45:08 <peter1138> Use the reduced roster option :)
09:47:25 <peter1138> Hide variants from AIs?
09:47:49 <peter1138> (Sorry all those authors using variants as a display tree)
09:48:39 <peter1138> andythenorth, there's a couple of variants even with the simplified roster.
09:48:41 <andythenorth> make it an AI param on the method call 😛
09:48:46 <peter1138> Dunno if that's intentional.
09:48:58 <andythenorth> maybe not, unless it's HST coaches
09:49:42 <andythenorth> yeah these are bugs
09:49:58 <peter1138> I need to update my IH. Everything is marked as power/steam :D
09:50:22 <andythenorth> my local branch has that 😛
09:50:28 <andythenorth> it was a test of badge compiling
09:50:44 <peter1138> With badges included by default it's easier to see, heh.
09:51:38 <peter1138> Should the script API have a way to query badges on prototypes?
09:58:00 <andythenorth> hasbadge or hasbadges
09:58:37 <andythenorth> also everything in script is yak shaving, so it probably needs to know all the badges in current game
10:00:39 <peter1138> Can an API function return a list of raw strings...
10:05:14 <peter1138> locosage, have I misused `grf.Comment("Test")`? :)
10:08:47 <xarick> what my poor AI does with Iron Horse 😦
10:09:42 <xarick> tests whether every wagon can be attached to every engine
10:10:05 <peter1138> 3 * 26 00 00 00 00 00 00 00 00 00 00 00 00 "Default Badges"
10:10:11 <peter1138> 3 * 15 0C "Default Badges"
10:11:59 <peter1138> I'll make a PR later.
10:12:25 <andythenorth> xarick: how intriguing
10:12:38 <andythenorth> O log(n) or something
10:20:02 <peter1138> You actually BUY every vehicle to test it?!
10:21:07 <peter1138> Wagon attach callbacl is, indeed, brutal for AIs, but...
10:22:11 <andythenorth> but wagon attach callback should also be deleted
10:22:25 <andythenorth> it's inappropriate for grf authors to be controlling that
10:29:21 <peter1138> It seems like you test wagon attach first though.
10:30:44 <peter1138> Step one: find potentially suitable engines (hp/ton?), Step 2: try building and attaching them. If it succeeds, you can stop here, if it fails move on to the next best.
10:32:18 <peter1138> Ok, my database schemas are all in sync now.
10:32:42 <LordAro> oh yeah, that's a terrible idea
10:32:47 <LordAro> why would you do that
10:32:55 <LordAro> and why would you do it again for every route
10:33:43 <xarick> maybe I don't do for every route, my bad
10:34:04 <xarick> need to check my code again
10:35:28 <xarick> ::caches.CanAttachToEngine(wagon, engine, cargo, railtype))
10:35:48 <xarick> but since there's 100000000 engines... takes a while
10:37:11 <LordAro> feels like you should be able to filter based on matching name/power/size/whatever stats if nothing else
10:37:15 <andythenorth> why not pre-provision the viable attachments?
10:37:34 <andythenorth> they could just be read in as data to the script
10:37:48 <andythenorth> calculating them in runtime *every time* seems overkill
10:38:11 <andythenorth> if you can write an AI to calculate all the possible combinations, surely you can dump that out to a data file?
10:38:47 <LordAro> AI's cannot write anything
10:39:15 <andythenorth> and log files can be parsed
10:39:35 <LordAro> i suppose arguably players don't know ahead of time what can and can't attach either
10:39:40 <LordAro> AIs can't read files either
10:39:51 <peter1138> I assume andythenorth means bake it into the AI.
10:40:06 <LordAro> that sounds exhausting
10:40:10 <peter1138> (Which is also a bad idea)
10:40:13 <andythenorth> I was a bit more agnostic
10:40:19 <andythenorth> it could be done on bananas
10:40:23 <andythenorth> or by a custom client
10:40:27 <andythenorth> or by parsing the source of grfs
10:40:38 <peter1138> Okay, there's no var 61 equivalent for houses?
10:40:55 <peter1138> I suppose it would be difficult because it might not be a house tile.
10:41:54 <peter1138> Maybe something like "count the number of houses within a radius have a specific badge"?
10:44:15 <peter1138> But potentially less costly than making each NewGRF work out how to do that.
10:44:37 <peter1138> I'm not sure if you would ever care about a specific direction.
10:45:14 <andythenorth> perfect is the enemy of good?
10:45:24 <andythenorth> ~circular radius seems enough?
10:45:36 <andythenorth> otherwise it might as well be an arbitrary polygon 😛
10:50:29 <peter1138> Well, could it cover any type of tiles?
10:52:03 <andythenorth> Interesting idea 🙂
10:52:04 <peter1138> Test how many tiles in an area have a specific badge. Seems slow. More persistent storage?
10:52:36 <andythenorth> Large maps though?
10:52:47 <andythenorth> Some kind of index?
10:53:02 <andythenorth> Hmm terrain badges?
10:53:05 *** merni has quit IRC (Quit: User went offline on Discord a while ago)
10:53:57 <peter1138> Remember ctrl-shift in the depot window?
10:54:20 <xarick> it's time for my static_cast PR
10:54:52 <andythenorth> Terrain badges available to industry/house placer?
10:58:09 <_zephyris> andythenorth: Tree newgrf please!
11:04:04 <peter1138> Okay, now I need a script to strip all 'actions' from the start until a comment.
11:04:22 <peter1138> Should I call grfcodec from python?
11:08:11 <peter1138> `sed -i '1,/0C "Default Badges"/d' sprites/badges.nfo`
11:09:10 <_zephyris> Is there a list of badges needing icons yet?
11:09:55 <peter1138> I would like the steam and diesel smoke icons to be replaced.
11:10:21 <peter1138> These were created by upscaing the existing sprites that everyone uses, as they were at 1x scale.
11:10:30 <peter1138> Replaced by SVG versions, that is.
11:10:48 <peter1138> Everything else is created from SVG images.
11:11:01 <peter1138> I need to add the colour swatches :D
11:12:49 <peter1138> Oh yes, I was contemplating a callback for colour remapping badges.
11:13:20 <peter1138> Also badge icons can be different depending on feature. Maybe I should remove that.
11:14:24 <peter1138> My NML implementation doesn't support it.
11:19:52 <ahyangyi> This wouldn't interact with company colours, right?
11:20:58 <ahyangyi> I'm still working on my company colour switches and I think I'm not going to worry about RGB company colour for now.
11:29:23 *** debdog has quit IRC (Ping timeout: 480 seconds)
11:30:17 <peter1138> ahyangyi, there's already a flag to apply company colour.
11:30:38 <peter1138> And you won't need to create switches because they'll be in the default badges.
11:31:09 <peter1138> Thing is, most things don't need a swatch, 1cc or 2cc is kinda irrelevant.
11:39:27 <ahyangyi> Whether most things don't need a switch is irrelevant when the feature I'm implementing asks for it...
11:40:17 <ahyangyi> Though I guess I can also use those advanced layout flags and duplicate the parent sprites to achieve that
11:42:06 <ahyangyi> I really don't feel like duplicating parent sprites though, there are already 2 or 3 childsprites in each parentsprite...
11:42:53 <ahyangyi> There's also an eviler plan to use a transparent catch-all parentsprite and turn everything else into childsprites, but I still need to develop that. It might make things easier though.
11:43:52 <peter1138> Oops, I meant swatch.
11:44:19 <peter1138> But if you're talking about layouts, then you're talking about something else.
11:45:24 <xarick> i tried to replace long with int64_t, it failed
11:47:13 <ahyangyi> Oh, my head autocorrects swatch into switch
11:47:54 <ahyangyi> swatch is that colourful watch brand?
11:48:03 <xarick> `long n = x + y * prime + _settings_game.game_creation.generation_seed;` I question this line of code...
11:48:17 <xarick> generation seed is an already large value
11:48:40 <ahyangyi> oh, danger of overflowing?
11:48:42 <xarick> so, i dunno what that long means
11:48:52 <ahyangyi> and signed integer overflow is UB, right?
11:49:00 <ahyangyi> let's change it into unsigned overflow
11:49:28 <xarick> also, the introduction mentioned something about generation seed being an int32
11:50:11 <ahyangyi> `long n = (long)((ulong)x + (ulong)y * (ulong)prime + (ulong)_settings_game.game_creation.generation_seed);`
11:50:56 <ahyangyi> And I think I'm (accidentally) cosplaying ChatGPT in terms of offering uninformed suggestions
11:57:57 <peter1138> Yeah, I misread switch as swatch in the first place, my bad :)
11:58:32 <peter1138> So... I don't really understand your origianl question.
12:00:26 <ahyangyi> Not really a question, just that I don't know how to be futureproof about RGB company colours, if I have to manipulate palettes with switches.
12:00:43 <ahyangyi> Of course it'd be ideal to eliminate those switches in the first place.
12:01:27 *** HerzogDeXtEr has joined #openttd
12:01:29 <xarick> okay this long is meant to mean int64_t in my view
12:01:58 <xarick> but i dunno if it's behaving like such
12:03:17 <peter1138> ahyangyi, what feature is this switch for?
12:03:29 <peter1138> Parent sprites suggest it's not vehicles :)
12:05:16 <peter1138> So station sprites are 1CC or not.
12:05:30 <peter1138> If you are using a custom colour remap, it's not CC any more.
12:07:13 <peter1138> RGB CC is unlikely to happen anyway, it's over a decade old already.
12:07:25 <ahyangyi> And if I want to support both 1CC and "not CC", either I use a switch or I make two parentsprites and show/hide them depending on the parameters.
12:07:38 <ahyangyi> or I secretly emulate 1cc with "not CC"
12:07:50 <xarick> is it supposed to overflow?
12:08:55 <xarick> ((n * (n * n * 15731 + 789221) + 1376312589) & 0x7fffffff), with n being 431764103
12:09:05 <xarick> not even uint64_t would fit
12:09:33 <peter1138> It's a random noise function, it's meant to overflow.
12:10:04 <peter1138> I'm not sure why long was used though.
12:10:15 <ahyangyi> It probably wants to be unsigned during computation.
12:13:14 <xarick> is of a int32_t, but the seed is of uint32_t
12:13:30 <xarick> then divides by / 1073741824.0
12:13:44 <xarick> that number is 0x8000000
12:15:26 <peter1138> It's converting the random noise value to a floating point number between -1.0 and 1.0.
12:17:13 <peter1138> ahyangyi, what is a "parameter" in this case?
12:17:40 <peter1138> NewGRF config parameter set by the player?
12:18:30 <peter1138> You can probably do magic with parameters that does the right thing at load-time.
12:19:49 <xarick> `long n = x + y * prime + static_cast<int32_t>(_settings_game.game_creation.generation_seed);`
12:19:49 <xarick> I think this is the intention
12:19:57 <xarick> but i still dunno about long
12:20:17 <peter1138> No, at that point the see is unsigned.
12:20:48 <peter1138> `long` IS an odd choice. It should probably just be `uint32_t`, along with the `long` parameters.
12:21:09 <xarick> but it wants a signed value
12:21:28 <xarick> the range you mentioned -1.0 to 1.0
12:21:55 <peter1138> Making it signed is handled by the conversion from integer to floating point.
12:22:26 <xarick> the mask seems to be of MAX_INT
12:22:55 <peter1138> The mask means it ignores the sign bit, so basically it doesn't matter if the input value is signed or unsigned, it's always going to be a positive value.
12:26:09 <xarick> let me think with a smaller number
12:26:38 <xarick> whatever value & 0x7F / 0x40
12:30:42 <peter1138> `/ 0x40` is not equivalent.
12:31:29 <peter1138> `(value & 0x7F)` is converted to a double, then it's `/ 64.0`.
12:31:41 <peter1138> This gives you a floating point value between 0.0 and 2.0.
12:32:01 <peter1138> Then it does `1.0 -`, which gives you a value between -1.0 and 1.0.
12:32:38 <peter1138> (I'm not sure why it does `1.0 - x` instead of `x - 1.0` but the result is the same (inverted, but as a noise function that's irrelevant)
12:39:03 <ahyangyi> peter1138: It does make the result (-1, 1] instead of [-1, 1)
12:39:09 <ahyangyi> as noise it doesn't matter though
12:40:05 <ahyangyi> peter1138: My comment about signedess was more about "signed overflows are UB".
12:55:32 *** Extrems has joined #openttd
13:49:57 <xarick> hexadecimal floating literal requires an exponent, let me google this
13:51:27 <xarick> 0x40000000P0; ah this works
13:53:16 <xarick> what's the code style of Hex numbers?
13:55:53 <peter1138> Don't change that sort of thing.
13:56:02 <peter1138> It's basically standard magical values.
13:57:07 <ahyangyi> Just a hash function from (x,y) to values, cheaper than typical "cheap" general purpose hash functions but creates a pattern that looks good enough
14:04:25 <xarick> n = (n >> 13) ^ n; that's different than what tgp has
14:07:36 <peter1138> There's also some misguided soul who thought ^ should be pow() :)
14:29:17 <xarick> gonna try assert(1073741824.0 == 0x40000000p0);
14:31:59 <bohaska> trying to make it better
14:32:56 <ahyangyi> The roof looks much more natural now.
14:35:28 <xarick> waiting for CodeQL for issues
14:39:36 <bohaska> oh whoops wrong channel
14:39:37 *** kuka_lie has joined #openttd
14:43:35 <xarick> there are coastal differences when i cast the seed to int32_t
14:47:53 <_glx_> but seed is typically used as a bitfield (unless very rare places where it's a number)
14:48:56 <_glx_> anyway differences in your test are not an issue, it's meant to be random
14:49:36 <xarick> going to look at the history of tgp.cpp
14:50:06 <peter1138> I recommend just not touching this piece of code. It does what it is intended to do.
14:50:20 <xarick> i'm under the impression generation seed used to be int32_t
14:50:47 <_glx_> as said seed type doesn't matter as long as it's 32bits
14:50:48 <peter1138> There is absolutely no reason to, e.g. change floating point values to hexadecimal floating point values.
14:51:12 <_glx_> the actual seed value is meaning less
14:53:41 <_glx_> it seems you think something happen to the stored value when converting from int to uint (or uint to int) but it's just the interpretation of the actual 32 bits
14:54:01 <peter1138> Hmm, I borrowed from NWidgetSocialPlugins, but now I'm stuck :(
15:00:58 <peter1138> Hmm, needs a callback function or user_data
15:08:00 <xarick> 15.0-beta1 might not be producing the same map as current master... why do I insist testing 15.0
15:15:49 <xarick> something doesn't make sense...
15:16:09 *** D-HUND is now known as debdog
15:17:53 <xarick> could different compilers builds result in differences?
15:22:56 <xarick> some change I did is breaking
15:23:21 <Rubidium> git bisect for the rescue!
15:25:40 <xarick> 15.0-beta1 vs current master
15:27:11 <Rubidium> next time, open the console and type getseed so we can be sure it's the same seed. But as I said, git bisect to the rescue
15:29:16 <xarick> seems to only affect coasts
15:29:25 <xarick> the interior looks equal
15:30:28 <peter1138> Have you bisected yet?
15:30:37 <xarick> no, i dunno what that is
15:31:00 <peter1138> It's a git tool to find which commit introduced a change.
15:32:39 <peter1138> Also it's exactly 4 weeks since 15.0-beta1, in case anyone has nothing else to do tonight...
15:36:01 <goddess_ishtar> bisect is basically like a binary search
15:36:23 <goddess_ishtar> you give it two commits, one of which definitely has the change you're looking for and the other of which definitely does not
15:37:21 <goddess_ishtar> and it keeps giving you commits to check out and narrow it down based on whether or not they have the change you're looking for until you find the exact commit it was introduced in
15:37:59 <goddess_ishtar> it's great for hunting down regressions
15:48:40 <xarick> could Iron Horse be affecting mapgen?
15:49:46 <goddess_ishtar> if it is, I think you would have a bigger problem on your hands
15:50:28 <Rubidium> it *could* if you were to use the ancient map generator (and Iron Horse replaces the right sprites)
15:52:41 <xarick> tested ce4012b7c7ae50f44964957eae545c1d72c5bc24, works fine here
15:53:02 <xarick> strange, because that's what I expected to be in error
15:54:19 <andythenorth> Iron Horse affects game start speed and newgrf scan speed
15:54:29 <andythenorth> but affecting map gen would be....exciting
15:54:55 <xarick> ah, found the issue, i think
15:55:09 <xarick> it was a me problem and it got into master 😦
15:57:00 <andythenorth> my lerp isn't broken
15:57:19 <LordAro> xarick: i hope you see the issue in making changes with no purpose
15:57:23 <goddess_ishtar> peter1138: sounds painful
15:57:32 <LordAro> static code does not make new bugs
15:58:13 *** Wormnest has joined #openttd
15:58:30 <peter1138> And refactoring tools wouldn't have broken that.
15:58:45 <peter1138> Which suggests you did it manually, which is a bit silly.
15:59:02 <LordAro> nevermind refactoring tools, find and replace wouldn't have done that
16:01:37 <xarick> wrong commit message now
16:04:30 <kuhnovic> Not for this PR at least :p
16:07:36 <LordAro> wait, that's a thing?
16:10:14 <peter1138> Yeah, I've used std::lerp. But I wouldn't randomly change this code, certainly not mixing it with other fixes.
16:12:30 <xarick> should i ammend commit too?
16:13:18 <LordAro> i think you should stop making changes
16:17:08 <xarick> hmm okay, I won't ammend
16:50:45 *** SigHunter has joined #openttd
16:58:14 *** SigHunter has joined #openttd
17:37:22 <peter1138> Didn't realise that had never been committed :o
17:49:04 *** HerzogDeXtEr1 has joined #openttd
17:51:04 *** Xaroth92328 has quit IRC ()
17:51:20 *** Xaroth92328 has joined #openttd
17:51:36 *** eirc has quit IRC (Read error: Connection reset by peer)
17:51:59 *** Hirundo has quit IRC (Ping timeout: 480 seconds)
17:51:59 *** avdg has quit IRC (Ping timeout: 480 seconds)
17:52:43 *** Hirundo has joined #openttd
17:55:14 *** HerzogDeXtEr has quit IRC (Ping timeout: 480 seconds)
18:25:42 <xarick> is there a way to compare two map arrays?
18:47:56 *** ChanServ sets mode: +v tokai
18:54:48 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
19:17:51 <peter1138[d]> Yea, tile by tile
19:23:52 <xarick> but how do i get 2 maps
19:30:50 <peter1138[d]> Copy one into another pair of vectors
19:58:57 <xarick> the script died unexpectedly
20:03:35 <xarick> oh, "This script took too long in the Load function. Script is not started."
20:03:41 <xarick> but this message wasn't printed
20:03:52 *** gelignite has joined #openttd
20:04:51 <andythenorth> ok was it badges time?
20:04:56 <xarick> it just dies with no log
20:08:01 <peter1138[d]> andythenorth: Always
20:10:20 <xarick> <if (this->engine->IsSuspended()) ScriptLog::Error("This script took too long in the Load function. Script is not started.");>
20:10:20 <xarick> `this->engine->IsSuspended()` returned false
20:10:53 <andythenorth> peter1138[d]: if we added 'achievements' which have a (settable) bool and a (settable) date, we could give them a (static) badge prop
20:10:58 <andythenorth> then players could earn badges
20:13:37 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
20:17:21 *** liquidsnake0123 has joined #openttd
20:17:21 <liquidsnake0123> Hey guys, I just wanted to ask. I'm working on adding a new variable that will be an attribute to all companies. I'm having a bit of hard time, and I was wondering if it's possible to do this. If so, is there any advice you could give or is there a guide somewhere that I could follow? Thanks in advance.
20:20:33 <xarick> _glx_: My GS can't load saved data back
20:21:32 <_glx_> you saved too much probably
20:21:42 *** kuka_lie has quit IRC (Quit: Lost terminal)
20:21:58 <xarick> yes, the whole map height
20:22:11 <_glx_> there's an opcode limit for loading
20:23:17 <xarick> gonna try a different method
20:24:10 <andythenorth> we already know we can't store the whole map in GS 😛
20:26:04 <xarick> it could save, but can't load
20:33:09 <xarick> it worked on a 64x64 map
20:35:01 <LordAro> 10:20:02 < peter1138> You actually BUY every vehicle to test it?!
20:35:26 <LordAro> just as well there wasn't anything worse in my clipboard
20:36:49 <LordAro> liquidsnake0123: no guides (not really the sort of thing that happens often enough!), but company_base.h seems like a good place to start
20:37:03 <LordAro> from there, follow one of the other variables
20:37:22 <LordAro> (idk, like location_of_HQ in CompanyProperties)
20:37:35 <xarick> it works now, I must have screwed up
20:39:37 <_glx_> save and load have the same limit
20:43:37 <andythenorth> ok Horse badge quest 1 done 🙂
20:43:42 <andythenorth> do I get a badge?
20:45:04 <andythenorth> `dumpinfo badges` maybe? 🙂
20:48:00 <xarick> ``` if (table.height_map.len() == 0) {
20:48:00 <xarick> GSLog.Warning("Nothing to load!");
20:48:01 <xarick> ``` if (table.height_map.empty()) {
20:48:01 <xarick> GSLog.Warning("Nothing to load!");
20:49:20 <xarick> so, didn't seem to be a too long to load error
20:50:01 <xarick> but a "I don't know 'empty'" error
20:52:08 <xarick> now I realise I can't use this script
20:54:02 <xarick> I have a saved height map of the current map. if I restart the game, the GS starts anew
20:56:31 <xarick> how to export this data into a file or something... json something
20:57:33 <Rubidium> you can also compare screenshots
21:03:35 <_zephyris> Aka exporting the data through a dedicated renderer into a standard 2D array format
21:09:08 <_glx_> you asking too much for GS
21:09:42 *** stenyg has quit IRC (Quit: User went offline on Discord a while ago)
21:10:17 <andythenorth> might work on 64 x 64 🙂
21:10:18 <_glx_> that's kind of stuff you could send through admin port
21:21:57 *** HerzogDeXtEr1 has quit IRC (Read error: Connection reset by peer)
21:39:17 <andythenorth> peter1138[d]: is it worth the git overhead for me to add var 0x64 to nml? 😛
21:39:35 <andythenorth> you have a PR already
21:57:28 *** gelignite has quit IRC (Quit: Stay safe!)
22:20:06 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:45:50 <xarick> hmm im doing something wrong
22:45:58 *** nielsm has quit IRC (Ping timeout: 480 seconds)
22:46:33 <xarick> i suspect RandomGen isn't reseted
22:55:55 <xarick> dbg: [misc:0] height mismatchs count: 0
23:08:17 <frosch123> Rubidium: there is also CargoID instead of CargoType
23:09:28 <frosch123> Hmm. EngineID or EngineType?
23:09:56 <frosch123> Maybe EngineType is more like train vs rv vs ship
23:13:48 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
23:28:53 <xarick> Results when changing `float` to `double` in `HeightMapCurves` function
23:29:12 <xarick> it's the only place in tgp with float
23:30:58 <xarick> ow, there's much more mismatchs when variety is low
continue to next day ⏵