IRC logs for #openttd on OFTC at 2025-02-03
β΄ go to previous day
03:05:10 *** Wormnest has quit IRC (Quit: Leaving)
04:03:40 *** debdog has quit IRC (Ping timeout: 480 seconds)
04:33:47 *** D-HUND is now known as debdog
04:44:14 <DorpsGek> - Update: Translations from eints (by translators)
05:42:56 *** felix has quit IRC (Ping timeout: 480 seconds)
06:13:33 *** keikoz has quit IRC (Ping timeout: 480 seconds)
06:28:13 *** peter1138 has quit IRC (Ping timeout: 480 seconds)
07:15:38 <DorpsGek> - Add: summary for week 05 of 2025 (by OpenTTD Survey)
07:17:35 *** Smedles has joined #openttd
07:22:06 *** Speedy` has quit IRC (Read error: Connection reset by peer)
07:23:39 *** Speedy` has joined #openttd
07:56:49 <truebrain> Rubidium: for your info, I just checked, more than one AI already uses IsValidBaseStation π So removing is no longer an option π¦ Fixing documentation to tell people not to use it, ofc, is always a good idea π
07:58:11 <LordAro> compatibility layer is always an option
07:58:34 <truebrain> Even that layer needs a public function to call to π
07:58:53 <truebrain> I am not sure we have anything in place that only allows a function to exist for certain compatibility layers only
08:00:13 <truebrain> owh, no, you are right. We can litteraly implement that function in Squirrel script
08:00:19 <truebrain> it is that simple code-wise
08:00:24 <truebrain> okay, I take back my comment π
08:00:51 <truebrain> I expected that function to do something internal; but it calls two other functions that are public too
08:00:56 <truebrain> so that could just go into the compat script
08:00:59 <truebrain> okay: lalalala, I said nothing
08:01:14 <truebrain> pretty sure #13408 won't go this way, but what Rb says sounds like an excellent idea π
08:02:06 <LordAro> truebrain: without having looked at anything, i was imagining implementing as isvalidststion || isvalidwaypoint
08:04:20 <truebrain> Too slow .. too slow .....
08:08:28 *** HerzogDeXtEr has joined #openttd
08:30:46 *** benjaminv has joined #openttd
08:48:59 *** peter1138 has joined #openttd
08:48:59 *** ChanServ sets mode: +o peter1138
09:04:41 <peter1138> Right. Some reason my pi blew up in a way that disconnected things :S
09:04:53 <peter1138> irssi had a broken pipe Β¦
10:05:51 <peter1138> Yeah, my fitness isn't up for any of that.
10:09:14 <LordAro> i may have used my TSP setup to create a route for it regardless
10:09:41 <LordAro> (not that you have to do them all)
10:50:58 <xarick> hmm okay let's see if I understood what must be done about IsValidBaseStation
11:02:15 *** Flygon has quit IRC (Read error: Connection reset by peer)
11:02:17 <xarick> if I understood... GetBaseStationID is not implemented, and on top of that, remove IsValidBaseStation from being accessible to the API? but still keep it, to be used internally as a helper function?
11:13:39 <LordAro> (except it should be kept for compatibility)
11:21:35 <xarick> ScriptVehicleList_Station::ScriptVehicleList_Station(StationID station_id) hmm
11:21:49 <xarick> should have been ScriptVehicleList_BaseStation
11:29:45 <_glx_> No, because you really want stations only and no waypoints
11:30:52 <_glx_> Well it could internally use a Base Station version providing the correct filter
11:33:22 <xarick> I am just inventing ScriptVehicleList_Waypoint::ScriptVehicleList_Waypoint(StationID waypoint_id)
11:37:03 <xarick> > 69/70 Test #69: regression_regression ........................................................................................................... Passed 11.85 sec
11:37:03 <xarick> Hmm, I expected it to fail, I made IsValidBaseStation innaccessible
11:42:04 <xarick> is this an inheritance issue or ...
11:44:51 <xarick> oh... there is no IsValidBaseStation in regression
12:00:26 <xarick> glx22viaGitHub: I don't agree
12:01:26 <_glx_> The 3 functions have exact same code
12:01:44 <xarick> seemingly similar, but not quite
12:05:18 <xarick> oh, also there was also the proposal for fixing GetStationID with 13409
12:05:41 <xarick> to not work on waypoints. I was coming from this angle
12:08:05 <_glx_> Call base, then validate returned ID
12:24:46 <xarick> where are the regression tests being written to?
12:30:25 <xarick> CTest runs the test, but doesn't write to a file anymore...
12:30:34 <xarick> what happened, it was working fine 2 days ago
12:39:28 <_glx_> No need to make it private, just hide it in API
13:13:08 <_glx_> Ah signed/unsigned return mismatch
13:14:40 <peter1138> Oh right, it compiles but doesn't actually work. Sigh.
13:14:46 <peter1138> Forgot to check regression test.
13:15:58 <peter1138> Saved by it I guess.
13:16:39 <LordAro> peter1138: impossible.
13:23:23 <peter1138> std::make_signed hopefully.
13:25:27 <peter1138> This passes regression for me, but I'm not sure if it's correct.
13:30:01 <xarick> TileIndex sometimes behaves as TileIndexDiff for AI/GS
13:36:08 <_glx_> hmm I wonder if regression test did something to check `return TileIndex((uint32_t)(int32_t)tmp)` (old `Param<TileIndex>`)
13:37:52 <_glx_> IIRC the int32_t cast was needed to first narrow SQInteger from 64 to 32 bits
13:42:39 <peter1138> Oh, lack of optimisations.
13:44:57 <peter1138> Heh, the ARM v8 code is just "ret"? o_O
13:46:23 *** merni has quit IRC (Quit: User went offline on Discord a while ago)
13:50:09 <_glx_> but #9725 doesn't mention anything about the double cast
13:54:50 *** benjaminv has quit IRC (Ping timeout: 480 seconds)
14:03:45 <_glx_> and yes we do strange stuff when talking to squirrel
14:05:59 <LordAro> _glx_: i'd say those casts are just to appease the compiler
14:06:22 <LordAro> i can't see there any functional change from them
14:06:41 <LordAro> (i.e. they could just be std::make_signed as well)
14:07:22 <_glx_> but uint8_t to int8_t will "change" the value in squirrel side, 128 becomes -1
14:08:01 <_glx_> while when we do uint8_t to int32_t it stays 128
14:09:23 <xarick> compatibility scripts...
14:09:44 <_glx_> technically I think the int32_t stuff comes from the fact initially we had SQInteger being 32 ot 64 bits depending to platform
14:10:55 <xarick> when was IsValidBaseStation introduced
14:11:15 *** kuka_lie has joined #openttd
14:11:27 <peter1138> SQInteger has been 64 bit since (at least) we vendored it.
14:12:00 <peter1138> Well, `__int64`, whatever that was.
14:13:18 <peter1138> So std::make_signed is not the same behaviour for uint8_t and uint16_t types, but on the other hand there are no existing ConvertibleThroughBase types of those sizes.
14:13:29 <peter1138> Money is already signed, so make_signed does nothing.
14:13:41 <peter1138> Leaving TileIndex the only one.
14:15:50 *** benjaminv has joined #openttd
14:18:15 <_glx_> a 5 years old child would do the same
14:28:26 <_glx_> we vendor squirrel since r15578, but we force 64bit SQInteger since r26584
14:29:27 <_glx_> 2009 and 2014 (and fixed the save handling in 2021)
14:35:46 <xarick> I wasn't here at the time
14:36:32 <xarick> so basestation didn't exist from the start
14:36:46 <xarick> it was initially station
14:37:04 <xarick> then yexo created a basestation and moved some stuff around
14:40:05 <xarick> waypoints didn't exist either
14:41:00 <xarick> before the inauguration and yexo's basestation, waypoints were created... must find when
14:44:37 <peter1138> Weird. r15578 has `typedef __int64 SQInteger;`
14:45:19 <peter1138> So __int64 didn't mean a 64 bit integer or something.
14:46:46 <_glx_> enclosed in #ifdef _SQ64
14:46:59 <_glx_> else it was typedef int SQInteger
14:47:43 <peter1138> Oh derp, the __int64 is just the only line that wasn't removed.
14:58:17 <peter1138[d]> Or... do heightmaps contain rivers?
14:58:27 <peter1138[d]> Oh wrong channel
15:08:19 <xarick> well, AIBaseStation was introduced in 1.0.0, confirmed
15:11:05 <xarick> should I add a compatibility function for 0.7?
15:12:19 *** test242352 has joined #openttd
15:13:12 <_glx_> if it didn't exist in 0.7 no need to add compat layer
15:16:14 <ahyangyi> ahyangyi: peter1138[d] I was (and still am) interested in heightmaps with rivers, though there were some discussions about the potential difficulties.
15:17:29 <ahyangyi> At that time I looked at the source code of the existing river generation algorithm and also wondered if I could just force the rivers to happen in a similar way we currently force slopes on heightmaps.
15:17:29 <ahyangyi> But river slopes are much more restricted than regular slopes, and there were cases I was not happy about.
15:21:21 <ahyangyi> ( I didn't put time into a branch because I decided to work on the heightmaps first, which turned out to be another time sink )
15:48:12 <andythenorth> me and my robot had adventures with python AST, and # comments
16:07:09 <xarick> i think 13408 can be closed now
16:07:31 <xarick> but that goes against @glx suggestion
16:10:03 <xarick> oh, can't compile due to.... dependencies
16:11:22 <xarick> yeah, it requires the others 2 to merge
16:24:37 <xarick> how many AIs am i gonna break now?
16:25:50 <xarick> ScriptVehicleList_Station
16:42:26 *** urdh has quit IRC (Ping timeout: 480 seconds)
16:43:24 <truebrain> that did not happen π
16:44:15 <truebrain> being ratted out by a freaking bot; can you imagine π
16:44:51 <LordAro> or some other terminology along those lines
16:44:58 <LordAro> it's been many years...
16:45:59 <xarothbrook> truebrain: skill issue
16:47:03 <peter1138> That's a lot of PRs, making up for some being closed :p
16:48:02 <truebrain> _glx_: I don't understand your comment. The `compat.nut` script in that PR doesn't do any of that either?
16:49:49 <_glx_> there's #13457 as an example, it removes `AIBaseStation.IsValidBaseStation` which was only present since 1.0, so 0.7 compat doesn't need to know about it
16:50:37 <peter1138> Remember it's for making old scripts compatible with the current API.
16:50:39 <truebrain> peter1138: I meant the other way around ofc π 1.13 should load 1.14, and 1.14 should load 1.15 π It is still a chain, isn't it?
16:51:00 <peter1138> Well, that's a big difference.
16:51:10 <peter1138> I guess I read it wrong.
16:51:18 <truebrain> or I wrote it wrong
16:51:26 <truebrain> but there should be a direction it chains π
16:51:56 <truebrain> anyway, was just a random thought, to avoid having a single file with all those checks
16:52:18 <truebrain> I kinda liked having the version that introduced a change in a single place; makes it less errorprune, for my idea
16:52:21 <truebrain> no clue if that is true π
16:53:32 <truebrain> _glx_: In the current structure, that would still not be solved one way or the other? I mean, 0.7 would just get an `AIBaseStation.IsValidBaseStation`, but as no AI ever could have been used it, it doesn't matter?
16:55:16 <_glx_> it matters when the replacement function (even if never used) calls stuff not existing at that time
16:56:24 <peter1138> Good idea. Let's go to the pub.
16:56:40 <truebrain> Doesn't it already happen, as in, we patch in functions already that didn't exist in older versions
16:56:43 <_glx_> though in IsValidBaseStation it's probably fine
16:56:46 <truebrain> but it just makes writing compat functions easier
16:58:27 <truebrain> _glx_: so let's take an example. I have a script that uses compat version 0.7. That causes, because of the chain of events, that this `IsValidBaseStation` is patched with a version that is more correct. That function will be completely valid, as it is 15 that is executing it. And as no 0.7 can ever be calling the function, it also doesn't matter.
16:58:31 <peter1138> If the function isn't called because it didn't exist in that earlier version, then I don't see the harm.
16:58:59 <truebrain> and it would compile fine
16:59:05 <truebrain> I mean, it is 15 code that is being compiled?
17:00:01 <truebrain> (btw, it is not actually compiled is it? It just executed what is under the cursor .. as the code is never executed, it can contain total garbage; as long as it is synthetical correct, not?)
17:00:18 <truebrain> been too long, so these are honest questions; I can't really remember whether what I ask is true or not π
17:03:06 <_glx_> oh right I forgot the compat script is loaded by current openttd
17:03:26 <truebrain> Yeah, that makes things easier here π
17:04:31 <truebrain> so okay, we are all thinking the wrong way around, it is not just me π
17:04:35 <truebrain> I should fix my comments to make sense π
17:04:48 <truebrain> Sorry, you are right; you didn't π
17:05:07 <peter1138> Chaining from old to new sounds fine, if we don't care about implementing things that didn't exist in older version.s
17:05:16 <peter1138> And perhaps the compatibility message.
17:06:04 <truebrain> Either way, I like this `require()` stuff π
17:06:06 <peter1138> It's like the big red message saying not to modify NewGRFs doesn't exist.
17:06:15 <truebrain> is that new, or did I just not know about it?
17:07:23 <_glx_> truebrain: I think you added `require`
17:07:23 <peter1138> You probably clicked ok and didn't read it... nobody else does ;)
17:07:37 <peter1138> Oh you mean require, heh.
17:10:08 <truebrain> _glx_: funny; I am getting old, clearly π
17:10:27 <_glx_> and it was present since NoAI introduction
17:10:48 <truebrain> I thought we had `import` and it had to be the first statement
17:10:57 <truebrain> so yeah ... I haven't touched Squirrel in a long time π
17:11:05 <truebrain> I will shut up now, I am only embarrising myself more π
17:15:18 <Rubidium> oh... I see a way to do the daisy chaining with exactly one log message, but it requires doubling the number of .nut files. That doesn't really feel like it's going to make things better
17:16:07 <truebrain> no, that would not π
17:16:14 <truebrain> The log-message can be done programmatically
17:16:41 <truebrain> it was mostly in that file, if I remember correctly, to make debugging a bit easier to see if the compat script was actually loaded
17:16:46 <truebrain> but .. I think we can trust the system by now? π
17:17:48 <peter1138> ^ One way to increase tree generation speed. Fix it from producing too many trees...
17:18:34 <peter1138> Crap, those screenshots were meant to be at the same location :S
17:19:49 <peter1138> Okay, now they are.
17:21:32 <LordAro> peter1138: i think the map looked better in the before :p
17:22:02 <LordAro> bet it speeds up worldgen though ;)
17:24:37 <peter1138> I've added a max-height 15 screenshot as well.
17:25:06 <peter1138> (Funnily enough it's the same seed, but map gen height apparently doesn't just scale...)
17:27:45 <peter1138> I wonder how clamping instead of scaling looks.
17:27:55 <peter1138> Probably still too many trees.
17:30:33 <peter1138> Correct, because it's always producing the maximum number of extra trees for each clump > 15.
17:35:59 <peter1138> Homogenous icons :(
17:40:11 <andythenorth> hmm train.py is 10k LOC
17:40:20 <andythenorth> maybe it should be consist.py and unit.py
17:41:06 *** kuka_lie has quit IRC (Ping timeout: 480 seconds)
17:48:10 <andythenorth> I asked the robot
17:48:16 <andythenorth> it made a lot of answers
17:48:45 <andythenorth> I should tune my GPT prompt so that if the answer is "it depends" it uses those 2 words, not 900
17:49:17 <peter1138> Did you... just make a PR of something that doesn't work?
17:49:23 <peter1138> (I mean, I do that a lot.)
17:49:34 <ahyangyi> andythenorth: Just ask GPT to summarize what GPT says
17:50:52 <peter1138> Okay, I guess I just don't understand the error message part.
17:52:46 <andythenorth> hmm ok, so now I'm refactoring the core Horse module
17:52:53 <andythenorth> so I can do variants better
17:53:01 <andythenorth> so I can do badges for more things
17:53:06 <andythenorth> so I can reduce name callback use
17:53:10 <andythenorth> so I get a faster compile
17:53:25 <andythenorth> spell S I D E Q U E S T?
17:53:48 <andythenorth> or is this actually how a Quest works?
17:54:08 <andythenorth> I guess 'go to the shops, buy cake, go home' isn't much of a quest
17:54:45 <peter1138> Similar to "Ride to the coffee shop, buy cake, go home"
17:58:22 <xarick> if (max_height > MAP_HEIGHT_LIMIT_ORIGINAL) j = j * MAP_HEIGHT_LIMIT_ORIGINAL / max_height;
17:58:22 <xarick> kinda like the same idea I had
18:00:09 <peter1138> Technically less trees...
18:03:43 <xarick> it's really easy for that j value to go over 15 though
18:05:10 <xarick> get j = tile height, then multiply by 2, then multiply by 3
18:10:36 <xarick> erm, i dont remember how I had the counting of trees
18:15:12 <xarick> was it _trees_placed_at_same_height or _total_trees_placed
18:28:16 *** gelignite has joined #openttd
18:31:11 <xarick> alright, preliminary numbers
18:31:28 <xarick> _trees_placed_at_same_height: 5269835
18:31:45 <xarick> should be around 9 380 763
18:31:59 <xarick> you're vastly under planting
18:33:20 *** Wormnest has joined #openttd
18:37:31 <peter1138> I'm not. The game is currently vastly over planting.
18:38:38 <xarick> need to rebase the 3 builds to current π¦
18:41:18 <xarick> too-many-damn-trees nice name
18:41:56 <xarick> now I need to prepare the openttd configs
18:42:05 <xarick> then i'll leave this running during dinner
18:42:41 <xarick> then I come back and do a nice excel graph
18:48:47 *** ChanServ sets mode: +v tokai
18:55:36 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
19:13:20 *** kuka_lie has joined #openttd
19:37:21 <truebrain> how did we not notice that earlier? π
19:37:44 <talltyler> We donβt play OpenTTD, remember?
19:38:00 <talltyler> Plus, everybody turns off trees
19:38:52 <peter1138> Because there's too many?
19:39:06 <truebrain> couldn't see the trees through the forest, you say?
19:50:00 *** johnfranklin has joined #openttd
19:50:00 <johnfranklin> I remember whenever I let trees grow freely, the game got easily stuck. It was in 12.1. I have turned trees off since then.
19:51:06 <xarick> I made a mistake in my tests
19:51:44 <xarick> i tested 13460 twice instead
19:53:18 <peter1138> johnfranklin, what you mean "stuck"?
19:54:18 <johnfranklin> Laggy, like, <1fps
19:55:32 <peter1138> Unlikely to be trees.
19:55:52 <andythenorth> all mine died once
19:55:56 <andythenorth> couldn't repro π
19:56:11 <truebrain> did you give them water?
19:56:27 <andythenorth> we should add rain to the game
19:59:29 <ahyangyi> What's the effect of rain, grow trees and desert cities?
20:11:32 <andythenorth> if playing for long enough, reservoirs
20:31:31 <peter1138> Hmm, would be nice if the bananas heightmap information could be included when selecting a heightmap to use (i.e. already downloaded)
20:51:49 <_zephyris> There's no recommended max height, right?
20:54:35 <peter1138> Generally it depends on the map size.
20:54:50 <peter1138> But many heightmaps indicate a preference for height.
20:56:25 *** reldred has joined #openttd
20:56:25 <reldred> CptK usually does, and I usually ignore them π
21:11:57 <kuhnovic> My god, openttd on a 38 inch monitor is amazing
21:15:11 <kuhnovic> Oh I like that idea!
21:19:31 <reldred> Iβve just been scaling rock patch size (which is then scaled by z level) in JGRPP but thatβs much more elegant
21:20:00 <peter1138> This doesn't do much with Very Smooth or Smooth maps, but perhaps that's to be expected.
21:20:13 <peter1138> I can almost get away with saying that's a feature :p
21:25:04 <reldred> peter1138: Seems reasonable
21:25:13 <reldred> Itβll be neat with the heightmaps I play
21:25:46 <peter1138> I happened to start my testing with Cpt.K's Reldred's choice heightmaps.
21:36:13 <xarick> peter1138[d]: your trees in sub-tropical are... very low
21:36:25 <xarick> I'm about to finish the excel, i'll show you
21:43:06 <xarick> i had set a -1/+1 % max deviation from the master
21:44:08 <xarick> it's measuring only _plant_trees_on_same_height
21:44:11 <peter1138> My change was not done for performance. I did it because there were too many trees being created.
21:44:29 <peter1138> Therefore, it is entirely correct that less trees are created.
21:45:09 <xarick> doesn't feel right, 85-90% less trees planted π
21:45:18 <xarick> let me actually look at the map
21:51:49 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
21:52:30 <xarick> this is the 16,27% example
21:55:13 <xarick> I don't know, lumbermills might run out of trees?
22:02:34 <peter1138> Only the initial number of trees is affected. Tree growth during the game is not changed.
22:05:36 *** gelignite has quit IRC (Quit: Stay safe!)
22:09:09 <_glx_> and you can plant more if needed for the lumbermill
22:14:53 <peter1138> Although it turns out that under some conditions, the generation time is greatly reduced too. That just wasn't a goal.
22:16:19 <peter1138> Hmmm, the "4kx4k UK" heightmap is bad. Not actually 4kx4k even.
22:20:15 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:27:13 *** nielsm has quit IRC (Ping timeout: 480 seconds)
22:32:21 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:37:42 *** kuka_lie has quit IRC (Quit: Lost terminal)
23:37:15 <peter1138> (Just changed the commit message as it mentioned removing something that is no longer removed.)
continue to next day β΅