IRC logs for #openttd on OFTC at 2025-05-01
โด go to previous day
00:14:07 <_glx_> that could be a problem
00:31:19 <peter1138[d]> StripTrailingWhitespace handles carriage return, newline and space, but not tab.
00:33:41 <_glx_> but the weird part is parent commit works fine, but data keys also have ???
00:36:05 <peter1138[d]> strgen_base.cpp:484: `auto len = str.find_last_not_of("\t\r\n ");`
00:36:31 <peter1138[d]> Also, removed the generated file "placeholder"
00:36:40 <peter1138[d]> With that, it seems to work.
00:39:12 <peter1138[d]> Yeah, the old code stripped spaces and tabs, the new code strips spaces and cr and lf.
00:41:25 <_glx_> well the strings with ??? are from the savegame
00:50:16 <_glx_> I'm trying to understand why the savegame has ? and not \t
01:04:03 <_glx_> oh it's SlStdString() translating \t to ?
01:06:34 <peter1138[d]> Probably just StrMakeValid somewhere.
01:08:02 <_glx_> yes and it's quite old,
01:09:27 <_glx_> so any save from a GS with \t between ID and `:` actually fail to correctly load strings, not an issued if GS is present as then the string will load from it
01:09:54 <_glx_> but if GS is not present it might be a problem
01:10:36 <_glx_> or maybe not since encoded strings don't rely on ID, but on numerical index
01:25:35 <_glx_> ha The Tim Traveler used TTD music again
02:20:29 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
02:22:57 *** WormnestAndroid has joined #openttd
02:23:09 <DorpsGek> [OpenTTD/OpenTTD] Iris-Persephone updated pull request #14158: Add: "Many random towns" button in scenario editor now prompts for the number of towns, with defaults based on the current new game settings https://github.com/OpenTTD/OpenTTD/pull/14158
02:26:52 *** goddess_ishtar has joined #openttd
02:26:52 <goddess_ishtar> internally debating whether or not to move the entire logic into that function
02:28:03 <goddess_ishtar> I'd have to check twice whether the setting is set to "custom town number" or not, but it makes the code in `town_gui.cpp` neater
02:28:07 <goddess_ishtar> I think I will
02:30:30 *** gnu_jj_ has quit IRC (Ping timeout: 480 seconds)
02:35:39 <DorpsGek> [OpenTTD/OpenTTD] Iris-Persephone updated pull request #14158: Add: "Many random towns" button in scenario editor now prompts for the number of towns, with defaults based on the current new game settings https://github.com/OpenTTD/OpenTTD/pull/14158
03:13:26 *** Wormnest has joined #openttd
04:03:53 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
04:03:54 *** WormnestAndroid has joined #openttd
04:04:00 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
04:04:07 *** WormnestAndroid has joined #openttd
04:47:28 <DorpsGek> - Update: Translations from eints (by translators)
05:38:03 *** Speedy` has quit IRC (Ping timeout: 480 seconds)
05:45:13 <andythenorth> Or is it still yesterday?
05:45:55 <Rubidium> in Dutch it'd even be tomorrow ;)
06:58:52 *** gelignite has joined #openttd
07:58:38 *** keikoz has quit IRC (Ping timeout: 480 seconds)
08:55:17 <kuhnovic> talltyler: I whipped up some visualization for your water map edges PR
09:29:11 *** truebrain has joined #openttd
09:29:11 <truebrain> kuhnovic: Nice ๐
09:51:56 <peter1138> I didn't check, does it work with the hidden freeform edges turned on (which is by default)?
09:55:08 <kuhnovic> Terraforming the outermost tiles is not allowed in "island-mode"
10:22:10 <peter1138[d]> Yeah, but is "island-mode" the same thing as "non-freeform-mode"?
10:22:36 <LordAro> i feel like it shouldn't have to be
10:33:39 <peter1138[d]> FFS Teams is so annoying.
10:43:32 <kuhnovic> Not sure what the non-freeform-mode is, I need to check
10:43:49 <xarick> omg i was in the middle of a rebase then i went to bed
10:44:26 <kuhnovic> git rebase --abort and start over
10:45:22 <peter1138[d]> Helpful tip if you are completely lost, you can create a new branch while you are rebasing, then do `git rebase --abort`
10:45:52 <peter1138[d]> You'll keep whatever you had done during the rebase, and also keep the original branch.
10:46:18 *** michi_cc has joined #openttd
10:46:18 <michi_cc> Xarick listening to a tip...? /s
10:46:21 <peter1138[d]> You can then rebase the original branch on top of the new branch to continue it, though you'll get conflicts for things that have changed. Like normal.
10:49:08 <kuhnovic> Oh I didn't know that, thanks!
10:50:35 <_glx_> Rebasing is fun, it gives a better understanding of the changes
10:51:29 <peter1138[d]> But rewriting may sometimes be more practical.
10:55:20 <LordAro> it can get annoying when all that's conflicting is whitespace changes
10:55:24 <LordAro> (i'm working on it...)
10:58:48 <xarick> trying to do something but not sure it's possible
10:59:23 <xarick> wanna compare my local branch "mix" with the branch "mix" on the github website
11:01:41 <LordAro> use the commit hashes
11:02:45 <peter1138[d]> VS Code's built in merge conflict tool is really quite good.
11:04:16 <peter1138[d]> Next time I search for a free slot I'll just ask frosch ๐
11:04:54 <xarick> can i download origin/mix into a locar mix-temp
11:05:10 <xarick> then i can use github desktop to do a branch comparison
11:05:36 <_zephyris> LEFT_ARROW needs a font update, right?
11:05:49 <xarick> meh, forget, i'm just gonna yolo
11:08:44 <peter1138[d]> _zephyris: Can do, but we need to settle on the codepoint first ๐
11:08:44 <peter1138[d]> I don't think the OpenTTD-TTF includes the RIGHT_ARROW glyph currently anyway.
11:09:10 <peter1138[d]> (It's included in OpenGFX 2 as a sprite font glyph)
11:09:36 <peter1138[d]> I noticed because 3x scaling left me with a 2x right arrow.
11:11:02 <peter1138[d]> I think we already allow truetype fonts to replace glyphs in the 0xE200-0xE2FF range.
11:11:15 <peter1138[d]> (For vehicle symbols.)
11:25:48 <_zephyris> This is `RIGHT_ARROW`, right?
11:26:08 <_zephyris> So should be in the small font - might be an ottd bug.
11:26:35 <_zephyris> If OGFX2 provides it then it's in the TTF fonts, because OGFX2 entirely derives the sprite fonts from the TTFs.
11:34:38 <peter1138[d]> Now do that stat for the US-only. WhatsApp will disappear...
11:36:51 <kuhnovic> It really depends on which country you're in. Pretty much everyone uses Whatsapp here in NL, but for example in Norway everyone uses Facebook Messenger (which I hate)
11:43:54 <peter1138[d]> _zephyris: Hmm, probably my ttfs are out of date then. I'm using the ones bundled in the OpenTTD source.
11:44:29 <peter1138[d]> Replaced those with fonts from the repo and it's scaled now.
11:46:18 <_zephyris> All makes sense ๐
11:54:11 <talltyler> kuhnovic: I wonder about only showing these when Shift is held. I like the seamless look. ๐
11:55:32 <peter1138[d]> 2024 is quite a while ago, are we due a font update?
11:55:49 <kuhnovic> That would be a bit weird IMO. Either we always draw it or we don't (or we make it a setting hehe)
11:55:50 <peter1138[d]> I guess after we've added left arrow ๐
11:58:53 <_zephyris> Make sure it's updated before 15
12:02:36 <peter1138[d]> Hmm, make an issue with the milestone so it's not forgotten ๐
12:02:44 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
12:06:09 <xarick> 15 is coming in august
12:06:53 *** WormnestAndroid has joined #openttd
12:13:52 <_zephyris> I think I've done that right...
12:14:41 <peter1138[d]> (Forgot the hashes...)
12:15:38 <peter1138[d]> Good thing about the combined options/settings menu, there's only one button on the intro menu, so I don't have to guess which side to press when I'm testing with RTL languages...
12:15:45 <peter1138[d]> That is, of course, the only reason I did it...
12:57:17 <xarick> feeder cargo doesn't affect rating
12:58:45 <goddess_ishtar> station rating is already broken
13:05:36 <xarick> how many hash bits to mimic a 4096x4096
13:13:28 <xarick> the new tile hash code seems slower
13:14:30 <peter1138[d]> Yesterday it was faster, today it's slower...
13:14:51 <peter1138[d]> You probably need to overclock your power supply again.
13:15:26 <xarick> that was industry generation
13:15:53 <_glx_> everything depends on map size, number of vehicles, location of vehicles, ...
13:22:22 <DorpsGek> [OpenTTD/OpenTTD] Iris-Persephone updated pull request #14158: Add: "Many random towns" button in scenario editor now prompts for the number of towns, with defaults based on the current new game settings https://github.com/OpenTTD/OpenTTD/pull/14158
13:33:21 <xarick> just realized something
13:33:41 <xarick> reloading a new game doesn't reset the measure points in framerate
13:35:05 <xarick> have to head to main menu to reset
13:43:59 <xarick> guess it's the same after all
14:36:06 <xarick> `UpdateStationRating` function, why is it done that way? `byte_inc_sat` ?
14:45:12 <peter1138[d]> It's very old-style code to increment with a clamp.
14:48:45 <xarick> cs->callback_mask.Test(CargoCallbackMask::StationRatingCalc
14:48:59 <xarick> newgrfs can define station ratings
14:54:33 *** Wormnest has joined #openttd
15:05:57 <peter1138[d]> You might think that's a feature for GameScripts, but...
15:06:48 *** Flygon_ has joined #openttd
15:13:38 *** Flygon has quit IRC (Ping timeout: 480 seconds)
15:24:26 *** Flygon_ has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
15:25:07 <xarick> how should I solve this
15:28:32 <xarick> uncovering a crash wasn't what I was looking for
15:29:04 <xarick> I clicked the + to expand
15:29:22 <xarick> at the passengers to any station and it popup that crash
15:29:46 <_glx_> it's nice you have a debugger running
15:30:06 <peter1138[d]> That doesn't mean an ability to debug though.
15:30:29 <goddess_ishtar> one step at a time
15:34:46 <_glx_> column 4 is definitely the issue
15:39:03 <peter1138[d]> Can reproduce with an assert.
15:39:38 <peter1138[d]> Possibly something not right with #14009
15:45:28 <peter1138[d]> Nope, the commit before crashes.
15:46:59 <peter1138[d]> Has it just been luck? There doesn't seem to be a range check.
15:47:34 <_glx_> and out of bound access is fine for that
15:48:23 <_glx_> potentially harmful but fine
15:48:30 <peter1138[d]> Switch from C-array to C++ std::array wouldn't cause the problem, but will make the symptom show for builds that add checked [] access.
15:49:02 <peter1138[d]> That's what I meant by "just been luck", because there's no gaurantee that it will be fine.
15:51:12 <_glx_> yeah not the first time c++-ification uncovered long existing issues
15:52:33 *** akimoto has joined #openttd
15:52:39 <_glx_> so many foot guns in C ๐
16:06:04 <xarick> why do the rail fences connect to the airport?
16:17:07 <_glx_> xarick: now your enums should work
16:33:09 <xarick> why does my ai do this...
16:33:21 <xarick> look at those rail tracks
16:39:40 <xarick> maybe I'm doing wrong checks for 90 degrees
16:41:43 <xarick> RemoveLeftovers is being called
16:48:47 <xarick> oh, cost for 45ยบ turns = 190, cost for 90ยบ turns = 300
16:53:25 <goddess_ishtar> if you really want to optimise, remember that it's only two 45-degree curves in the same direction within one train length which causes slowdowns
16:53:44 <goddess_ishtar> also I'd just forbid 90-degree turns entirely
16:55:07 <xarick> the ai have a bad time building rails
16:55:38 <xarick> if 45 degrees are allowed, I prefer the ai to build a connection with them rather than not building at all
16:56:53 <goddess_ishtar> the thing is, 90-degree turns are ugly and don't even save space compared to a 45-degree turn
16:57:10 <goddess_ishtar> the minimum size 45-degree turn is still only one tile
17:24:12 <xarick> experimenting with longer AIConstroller.Sleep() times
18:28:14 <pickpacket> I get "fluidsynth: error: fluid_is_soundfont(): fopen() failed: 'File does not exist.'" when I try to play music in the game (15.0-beta2 on ubuntu 25.04, amd64). Any idea how I can fix that?
18:29:01 <pickpacket> oh. Maybe install fluidsynth
18:29:54 <goddess_ishtar> I think some docs still say Timidity is the requirement
18:30:02 <goddess_ishtar> I have no idea where that comes from, but it's wrong
18:32:36 *** kuka_lie has joined #openttd
18:40:42 <pickpacket> works with fluidsynth installed :) Although these errors are interesting: fluidsynth: warning: Instrument not found on channel 6 [bank=9 prog=118], substituted [bank=0 prog=118]
18:49:00 <goddess_ishtar> that doesn't look like transparency, that looks like a sprite layer issue
18:49:22 <goddess_ishtar> the fences are being drawn above the factory instead of below
18:49:43 <pickpacket> would that be an OpenGFX2 issue or a game code issue?
18:49:53 <goddess_ishtar> I am not certain
18:53:17 <pickpacket> I've never seen it with OpenGFX. My guess is it has to do with OpenGFX2
18:54:04 <goddess_ishtar> well, we can ask _zephyris about it
18:56:15 <_glx_> Yeah I'd blame the base set, you can report the issue (if it's not already done)
18:56:31 <_zephyris> Fences were aligned 1px too low, already fixed.
18:58:12 <_zephyris> Hmmm, almost fixed. There's still a few stray pixels.
19:01:28 <xarick> shouldn't the aircraft point the other side :d
19:05:02 *** gelignite has quit IRC (Read error: Connection reset by peer)
19:05:03 <_zephyris> No. Well, not when testing right to left language layouts.
19:10:23 <peter1138[d]> Nope, the problem is... Newgrf again
19:10:42 <peter1138[d]> They often don't provide left facing purchase list sprites.
19:11:40 <peter1138[d]> In fact they go out of their way to not provide one, because it wasn't needed originally.
19:12:28 <peter1138[d]> Hmm, I wonder if there's an LTR varaction variable.
19:13:49 *** tokai|noir has joined #openttd
19:13:49 *** ChanServ sets mode: +v tokai|noir
19:18:35 *** tokai has quit IRC (Ping timeout: 480 seconds)
19:19:51 *** gelignite has joined #openttd
19:22:17 <xarick> my reserve money system is trash
19:23:01 <peter1138[d]> Draw it column by column with clipping? Heh
19:24:11 <xarick> I need to do some type of rotation system
19:24:29 <xarick> switch between transport type mode when deciding on a new route
19:25:15 <xarick> the current way was fine when there was only road and air
19:26:24 <xarick> now that the AI has all modes of transport, I rather have it focus all the attention on a single one
19:27:08 <xarick> and not do a bit of 0, then a bit of 1, then a bit of 2, then a bit of 3, and repeat
19:27:42 <xarick> i prefer it to do fully 0, skip others, once 0 is done (or failed), do fully 1...
19:28:46 <xarick> should also help with the reserve money issue a bit
19:32:58 <peter1138[d]> Crop rotation. Don't want no famine.
19:49:24 *** gelignite has quit IRC (Quit: Stay safe!)
20:00:06 <andythenorth> peter1138[d]: x = -x for x in [foo]
20:00:18 <andythenorth> or just use the sprite for -> ๐
20:14:19 <_zephyris> Should mirror the cursors for RTL really...
20:15:42 <peter1138[d]> Probably "NewCursors"?
20:24:01 <peter1138[d]> andythenorth: Yeah, that's the point, there isn't a sprite for -> most of the time.
20:24:33 <andythenorth> in the 8 vehicle angles?
20:24:44 <andythenorth> my solution is horrible
20:25:04 <andythenorth> it would involve taking something from the non-purchase act 3, 2, 1 chain
20:25:41 <peter1138[d]> Yeah, that doesn't work because there are all sorts of variables that don't exist.
20:26:02 <andythenorth> ok just invert the x pixels then ๐
20:26:07 <andythenorth> do we have a transform for pixels?
20:26:12 <peter1138[d]> (And yes, this is something I have looked at before...)
20:26:26 <alpapilus> I canโt imagine drawing over 200 sprites but multiply that by 8 and also donโt forget the coaches because thatโs just trains.
20:26:31 <alpapilus> Thatโs dedication
20:26:39 <andythenorth> just port everything to OpenGL, the texture map all sprites onto polys, then reflect the poly?
20:27:27 <peter1138[d]> The problem is texture mapping so many tiny sprites is not one of OpenGL's strong points.
20:27:59 <andythenorth> that's the **only** problem? ๐ฎ
20:28:35 <peter1138[d]> Technically OpenGL texture names are 32 bit integers, so you can have 4 billion or so.
20:28:56 <peter1138[d]> But lots of individual textures is not good for performance.
20:29:28 <peter1138[d]> I wrote that OpenGL patch about 20+ years ago, it worked.
20:30:24 <peter1138[d]> xarick: did you make an issue for that station crashing bug?
20:30:47 <peter1138[d]> Ok. No worries, I just won't bother searching for it then ๐
20:38:35 <peter1138[d]> Hmm, maybe add some more asserts.
20:38:59 <xarick> feels like a different AI
20:39:19 <xarick> it used to amass road vehicles
20:41:01 <xarick> it has a very high failure rate of water routes
20:41:37 <peter1138[d]> Yup, found another crash.
20:42:24 <xarick> I'm never sure when it's monetarily safe to build canals
20:43:47 <xarick> because... aqueducts have absurd costs
20:52:44 *** akimoto has quit IRC (Remote host closed the connection)
21:02:37 *** kuka_lie has quit IRC (Quit: Lost terminal)
21:25:12 <_zephyris> Are those the left-right arrows you need for badge column order too?
21:25:43 <peter1138[d]> No, those are sprite-based and use the scrollbar icons.
21:25:54 <peter1138[d]> Which is a little bit of an annoying change I made many years ago.
21:26:07 <peter1138[d]> They were originally text based, but I thought it was odd that icons should be drawn as text.
21:26:28 <peter1138[d]> Which means that now they are limited to powers-of-two scaling.
21:27:14 <peter1138[d]> Not impossible to change, but probably not wise before 15.0 ๐
21:27:31 <_zephyris> Yeah, not exactly a big problem!
21:27:54 <peter1138[d]> WIth font glyphs we also can't actually get the real height of them.
21:28:03 <peter1138[d]> (I mean, we can, but the system isn't designed for it.)
21:28:22 <peter1138[d]> For fonts we have character width, and height is the over all font height, not per glyph.
21:28:38 <peter1138[d]> This would make centring glyphs in the widgets a pain.
21:32:09 <frosch123> _zephyris: Just working on a PR to allow adding a rtl variant for any gui sprite. Should be ready tomorrow
21:33:43 <peter1138[d]> Mind you I guess what I just did is kinda "not sprites" as it's a font.
21:34:29 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:34:31 <frosch123> I mean tool bar icons and such, no fonts
21:34:44 <peter1138[d]> Yes, that's why I made the distinction ๐
21:53:33 <xarick> hmm why am I building statues ๐ฆ
21:54:18 <xarick> reservedMoney is not working, I bet
22:00:27 <xarick> i need about 300kish to build a water route
22:00:34 <xarick> i don't even reserve it
22:00:57 <xarick> how did the AI even manage to work
22:00:59 *** nielsm has quit IRC (Ping timeout: 480 seconds)
22:12:03 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:56:49 *** D-HUND has quit IRC (Ping timeout: 480 seconds)
continue to next day โต