IRC logs for #openttd on OFTC at 2023-06-28
โด go to previous day
01:08:35 *** triple_xx has joined #openttd
01:08:35 <triple_xx> How does multiplayer work?
02:02:13 *** herms has quit IRC (Quit: bye)
02:19:30 *** Wormnest has quit IRC (Quit: Leaving)
02:35:43 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:36:26 *** thewood has joined #openttd
03:46:54 *** D-HUND is now known as debdog
04:15:52 *** tokai|noir has joined #openttd
04:15:52 *** ChanServ sets mode: +v tokai|noir
04:22:52 *** tokai has quit IRC (Ping timeout: 480 seconds)
05:52:23 <jfs> Also, there should already be console commands to get the world generation seed, and to generate a net world using a specific seed.
05:52:23 <jfs> If you have the exact same version of the game with the exact same world generation settings, then using the same seed _should_ create identical worlds, but I think there might be cases where it doesn't happen
06:40:38 <peter1138> It does feel pretty ridiculous to have such a font selector in a game...
07:08:16 <andythenorth> peter1138: make a thing to paste in css
07:08:23 <andythenorth> oh wait...we have console command ๐
07:10:33 <peter1138> Also yuck, and massively different size, despite the requested size being the same.
07:12:32 <peter1138> I guess style should be sorted by weight.
07:29:31 <_zephyris> TallTylerviaGitHub: Feels great to be a contributior!
07:49:15 <truebrain> peter1138: Is this really happening?! ๐ฎ
08:06:01 <pickpacket> I don't know how to respond to comments like "I don't like exclusive transport rights because they're mean and I always disable them". I just don't know how that's an argument pertaining specifically to my suggested change
08:08:41 <_jgr_> I would read it as "I think that the feature should be off by default"
08:09:23 <_jgr_> Which isn't entirely out of scope if you're changing how the feature works
08:15:15 <truebrain> well done LordAro ๐ (you know what I mean)
08:15:56 <pickpacket> Though tbh I don't know if *I* particularly care what the default setting of it is ๐คช But I could change the default to 'disabled'.
08:24:41 <locosage> my experience with current implementation: someone buys rights in a town I'm operating, I buy back and get banned from the server ๐คฃ
08:26:06 <pickpacket> locosage: hahaha! So buying them when someone else has them is wrong, but not buying them in the first place? ๐
08:26:56 <truebrain> pickpacket: well done on writing out the motivation and description; that is really nice! Wish I did that for every PR like that ๐
08:28:04 <locosage> pickpacket: No, you just can't buy them back from server admin :p
08:28:26 <pickpacket> truebrain: It *did* say that I should :D
08:30:12 <locosage> zephyrisviaGitHub: There already are settings for bribes, rights and r/r, 3 settings for advertisement next? ;)
08:31:00 <locosage> or give it to gamescript ๐ค
08:32:05 <locosage> someone already asked for api to add town actions, can probably be done along with removal somehow...
08:33:15 <locosage> though mixing in one api default and custom actions is meh
08:33:37 *** _aD has quit IRC (Ping timeout: 480 seconds)
08:33:52 <locosage> in league tables I got around that by just removing default stuff if custom tables are added
08:36:28 <locosage> actually, that the best approach for exclusive rights as well imo. leave default thing be and just add api for gs to do custom stuff
08:37:40 <locosage> vanilla-as-a-mod ๐
08:51:22 <pickpacket> locosage: it's not a bad idea to extend the gs api, but I would say that there's value in having good default behaviour anyway ;)
08:51:47 <locosage> I just noticed, exclusive rights apply to the stations linked to that town
08:52:05 <locosage> and ofc there is no way too see it in the game
08:52:18 <locosage> already can think of some "fun" exploits :p
08:53:24 <brickblock19280> It can be seen as long as you don't rename then
08:53:44 <locosage> well, ofc I'll rename it ;)
08:53:54 <locosage> to some other town xD
08:56:16 <locosage> brickblock19280: yes but you can also move stations while keeping the towwn
08:56:44 <locosage> so you can basically have a station that has one town in the name but is actually linked to any town on the map
08:56:55 <locosage> good luck buying exclusive rights :p
08:57:34 <pickpacket> locosage: yeah, a station can have coverage over one town('s industries) while belonging to another :)
08:58:21 <locosage> coverage is irrelevant, you can literally walk station across the map while keeping it linked to original town
08:58:40 <locosage> quite a well-known exploit in most city-builder scripts btw
08:58:46 <pickpacket> oh! Now I understand what you mean
09:03:35 <peter1138> Hmm, style sort order is a pain.
09:05:02 <truebrain> yeah, don't sort it by "prettiest" ๐
09:08:30 <peter1138> family, weight & style is probably going to be the most consistent.
09:08:58 <peter1138> sorting by slant (making italics appear consistently) doesn't work because fonts don't seem to set that consistently.
09:09:04 <peter1138> (Or my std::sort algorithm is wrong)
09:09:16 <LordAro> locosage: bug fixes are accepted!
09:10:16 <truebrain> can't believe OpenTTD is going to get a font-selector ...
09:10:21 <truebrain> #1 asked feature in years!
09:13:15 <LordAro> think of all those negative steam reviews that will be reversed!
09:13:20 <locosage> LordAro: well, as far as I'm concerned it's already fixed ;)
09:13:45 <locosage> doing it properly takes not a bug fix but re-design from scatch imo and better be left for gamescript
09:14:17 <truebrain> LordAro: will we make the top 500 list then? ๐
09:15:35 <locosage> like, I have an idea of how to to claimed territory and a way to fight for it but it's nothing vanilla game needs
09:16:24 <truebrain> we need to get to 94% rating on steamdb to get a place in the `Top rated games` .. we are SO CLOSE
09:16:25 <locosage> just an entirely separate game mode / script
09:17:23 <pickpacket> truebrain: if I had a steam account I would do my part!
09:27:22 <LordAro> locosage: i was talking station walking :p
09:27:42 <LordAro> but thanks for confirming that you are dP
09:29:11 <truebrain> haha, Discord usernames .... that is a bit confusing yes ๐
09:29:29 <locosage> does discord bridge pick username over the display name?
09:32:20 <locosage> yeah, I had 0 chance to claim my nickname in that kerfuffle
09:36:55 <locosage> LordAro: station walking isn't a bug, it's only a problem for things that use linked town for things other than station name
09:37:22 <locosage> citymania city-builder has no issues with walking because it uses distance from claimed town, not linked town of a station
09:41:58 <LordAro> sounds like it could be a bug
09:43:16 <locosage> walking is essentially just a combination of adding station tiles and removing station tiles, both perfectly valid features
09:45:31 <locosage> but linked town is a very weird concept in a gameplay sense
09:45:59 <locosage> it's fine to use it for station name but for not for anything that matters
09:46:13 <locosage> you don't know the town when you build station, you can't see town of the station
09:46:36 <locosage> town infuenced areas are weird
09:47:29 <locosage> if you "fix" it by changing town when moving station it will rename it
09:48:30 <locosage> nothing about it is good, just don't use it imo
09:49:13 <locosage> though in case of cb gamescripts it's easier said than done because cargomonitor api uses it for some reason
09:50:49 <LordAro> so perhaps the bug is that there's a link at all :p
09:50:57 <locosage> and it's non obvious how to change it to work, say, like citymania, because it adds distance parameter into the equation and also same station can techically "belong" to multiple towns
09:51:15 <locosage> well, it's a link for the station name
09:51:33 <LordAro> sure, at creation time
09:51:57 <LordAro> no need to persist that link otherwise though?
09:52:16 <LordAro> or is it also used for something cargodist-ish?
09:52:33 <locosage> station name is dynamic iirc
09:52:39 <locosage> you rename town in renames statios
09:56:52 <LordAro> sounds familiar to town names as a whole - list indexes rather than just using strings
10:00:18 <locosage> linked town of a station is that index
10:18:31 <peter1138> LordAro, oh, station walking? Ok, just change the town that the station belongs to if the sign position is moved. "Shouldn't" matter that the station gets renamed, but may need to check conflicts -- effectively give it a new name like building a new station does.
10:28:05 <locosage> yeah, make it worse for original purpose :/
10:28:12 <peter1138> Potentially also kill waiting cargo if the town changes, but that may be a bit evil and maybe accident-prone.
10:28:13 <locosage> modifying station changes its name
10:29:36 <locosage> and destroys cargo ๐
10:30:08 <peter1138> I really wish Discord blocks would actually block.
10:30:58 <peter1138> I don't need to see if toxic people have written more crap.
10:33:54 <locosage> if you actually read what I said you may have noticed I already mentioned the crappy solution you just proposed :p
10:34:02 <LordAro> locosage: the thing about code is that it can be tweaked to do whatever you want
10:34:16 <LordAro> code is the language we use to instruct computers
10:37:48 <locosage> link already works fine for the name, don't think anything needs to be changed there
10:38:10 <locosage> it's citybuilders that have issues
10:38:21 <locosage> and exclusive rights apparently
10:38:25 <locosage> if that's even a concern
10:40:04 <locosage> none of those can really be fixed by some hidden link regardless of how it is calculated
10:42:44 <LordAro> that's valuable insight, thank you
10:50:31 <truebrain> Too bad 14.0 feels a bit far away still .. too many nice things in the pipeline
10:56:07 <pickpacket> truebrain: I don't even know what's planned for 14.0
11:14:45 <pickpacket> truebrain: is there a roadmap or plan somewhere that I can look at?
11:44:16 <_glx_> But we don't have any roadmap
11:46:46 <pickpacket> if we release a 13.4, are features committed since 13.3 included in that?
11:47:09 <peter1138> Only bug fixes that need to be backported.
11:59:50 <LordAro> pickpacket: `git log` :p
12:00:14 <LordAro> _glx_: agreed, 13.4 seems appropriate at this point
12:00:27 <LordAro> there have been ..4? duplicates of that now
12:02:31 <LordAro> anything else that we can add?
12:02:53 <LordAro> (that will hopefully not result in requiring 13.5...)
12:05:17 <peter1138> Not sure if that affects 13.x
12:05:57 <peter1138> #10917 probably isn't important enough
12:07:34 <truebrain> LordAro: Haha, you now jinxed it ๐
12:07:46 <LordAro> #11051 doesn't affect 13.x
12:08:23 <LordAro> 10917 seems reasonable, but might come under the heading of "change" rather than "fix"
12:09:22 <LordAro> 11022 seems reasonable too, assuming it's possible to backport
12:17:07 <LordAro> ERROR: backporting language changes failed
12:17:55 <LordAro> ah, origin/upstream not set correctly on this checkout
12:33:10 *** talltyler has joined #openttd
12:33:10 <talltyler> locosage: I donโt know exactly what you have in mind (and if itโs GS territory) but the Wild West public multiplayer games could only benefit from some structure (optional, of course, some people probably like the lawless griefing)
12:35:48 <locosage> what I have in mind is to basically implement territorial.io in openttd
12:36:33 <locosage> that's hopefully a cool idea but no doubt a very specific game mode that doesn't suit the game in general
12:36:41 <locosage> kinda like minesweeper I did
12:36:58 *** keikoz has quit IRC (Remote host closed the connection)
12:37:23 <talltyler> Possibly with API additions
12:37:30 <locosage> I think I can do it with server patch, so GS in theory could too
12:38:12 <locosage> ah, actually, probably not
12:38:21 <locosage> gs can't filter commands, that's essential
12:38:47 <locosage> though btpro has command undo thing but idk if that's pure gs
12:40:30 <locosage> so api addon would be to filter commands which is basically impossible by gs and command system design
12:40:38 <locosage> or some kind or regions support
12:43:44 <talltyler> Maybe itโs time to finally implement regions in vanilla
12:49:16 <locosage> it's kinda hard to say how generic region support should look like
12:49:23 <locosage> but I guess at least now it has a chance with async mode
12:52:55 <LordAro> GS running arbitrary commands & being able to filter others out does sound fun
12:53:40 <LordAro> i suppose the usual technique currently is to "detect" undesirable changes and reverse them?
12:54:35 <locosage> you mean "fun"? yeah, its questionable but I don't thing there is a way around it, just too many different things rely on it
12:54:56 <locosage> there is no "usual", citymania just rejects or modifies the command with server patch
12:55:10 <locosage> whatever undo btpro does idk how it works, it may rely on admin server
12:58:29 <LordAro> i mean usual as in whatever GSes do currently
12:58:44 <LordAro> which is more or less impractical to do
12:58:52 <locosage> afaik they don't do anything
12:59:04 <locosage> you can destroy competitor towns in cb all you want
12:59:24 <locosage> only protection systems I know of is what citymania and btpro/n-ice
12:59:41 <locosage> maybe marko does something on his servers too, but that's server patch as well
13:01:06 <talltyler> Why does regions need to use async?
13:01:38 <locosage> at the very least to modify/define those regions at a reasonable speed
13:01:59 <locosage> if they're not of some basic shape like square
13:07:27 <pickpacket> truebrain: i actually didn't know that people made custom clients. Someone mentioned one in here a few days ago, but it didn't really register with me then
13:07:50 <truebrain> it is another way of saying: validation should happen on servers, not on clients ๐
13:07:55 <truebrain> holds true for any game btw ๐
13:10:39 <LordAro> or any client-server architecture :p
13:14:44 <truebrain> back when I wasn't born yet they didn't discover that information yet ๐
13:15:01 <truebrain> my birth is unrelated to that fact btw
13:15:04 <truebrain> there is no causality ๐
13:15:50 <truebrain> besides being born? A lot of breathing
13:15:54 <truebrain> weird how that is a requirements for life
13:16:13 <truebrain> I should migrate the CDN to Cloudflare, but I can't get myself to actually do it ....
13:16:19 <truebrain> it is so annoying .. I keep finding these others things to do ๐
13:16:24 * pickpacket now assumed that truebrain is human
13:16:27 <truebrain> and I know if I just focus on it, it will be done in a jiffy
13:17:47 <truebrain> Cloudflare doesn't offer any kind of RBAC or less-privileged on their R2 buckets, so I need to build one myself, to avoid an error in any script uploading to the R2, deleting everything or something ๐
13:18:00 <truebrain> it is not difficult, just annoying ๐
13:23:55 <pickpacket> no RBAC? That sounds unnatural in 2023
13:24:21 <truebrain> it honestly is really weird, yes
13:24:41 <truebrain> you either have access to all buckets, or to none
13:25:26 <truebrain> so what you end up with, is adding a worker in front of a bucket, and add some kind of RBAC yourself
13:34:27 <triple_xx> jfs: I think add-ons that add industries would cause somewhat different generation
13:35:22 <jfs> yes NewGRFs are part of the world gen configuration too
13:36:52 *** Venemo has quit IRC (Remote host closed the connection)
14:28:19 <_zephyris> I'm looking for the code which applies mask recolouring to a 32bpp sprite - can anyone point me to the code? I'm getting lost in the blitters!
14:30:07 <jfs> basics: the 32 bpp blitter is used for software video output, the 40 bpp blitter is used for hardware accelerated video output (i.e. OpenGL)
14:32:06 <jfs> look for the `m` member of each pixel, that's the palette channel which is what gets company colour remapped
14:33:00 <jfs> the basic place to start would be the simple version, and then compare with the optimized versions
14:34:59 <peter1138> m-channel being non-zero is the path used for recolouring.
14:35:36 <locosage> lines 126-148 basically
14:36:27 *** m3henry has joined #openttd
14:44:17 <_zephyris> So, amongst other things, a 32bpp pixel value of 0 mapping to the unmodified mask/8bpp value is intended behaviour.
14:44:37 <_zephyris> (the naive expectation would be pure black)
14:50:21 <peter1138> If you want pure black then you don't need any 8bpp mask on top, right?
14:51:26 <_zephyris> Absolutely - I'd argue the current behaviour is a little eccentric, but certainly not problematic.
14:53:08 <locosage> even naively, mapping decides colour and 0 is transparent, not black
14:53:23 <peter1138> TBH I'm no longer sure what "old 32bpp image" refers to but...
14:54:02 <peter1138> r=0, g=0, b=1 would be "almost" black, I guess.
14:56:30 <triple_xx> Why are zoomto levels limited to 5?
14:56:42 <triple_xx> Is it caused by lag?
15:01:39 <_zephyris> There are some other weird little inconsistencies... Vertical gray gradient is the 32bpp sprite, 8bpp mask is the vertical bars of each TTD palette colour. There are some weird behaviours where bright TTD colours mask bright gray values.
15:02:39 <jfs> max zoom-in is partially due to memory usage (storing/generating sprite versions that large) and partially that it just isn't useful
15:02:39 <jfs> max zoom-out is largely due to performance (too much visible on screen at once means exponentially more tiles and vehicles needing to be evaluated for sprites to use) and partially just for usefulness
15:03:32 <peter1138> _zephyris: Do you mean with the 'overbright' section?
15:04:02 <m3henry> Does the compiler optimise that switch (mode) inside the for loop?
15:04:40 <peter1138> Compiler does whatever optimisations it can.
15:04:57 <peter1138> However that is the "simple" blitter, which aims to be, well, simple.
15:05:24 <jfs> yeah the simple blitter is basically just aiming to be "obviously correct" with no thought to speed
15:05:39 <m3henry> The 8bpp_optimised has a similar structure
15:05:41 <peter1138> If you look at the optimized blitters, the mode is templated.
15:06:23 <locosage> _zephyris: you mean hue change? openttd just scales rgb values, not actually translate it to hsv or smth
15:06:31 <peter1138> 8bpp_optimized isn't templated for whatever reason.
15:07:12 <locosage> and rgb isn't a particularly linear color space...
15:08:08 <peter1138> RGB remaps are probably even weirder ๐
15:08:10 <_zephyris> locosage: Nope... I mean that as 32bpp brightness increases the result gets brighter, until some point the output can start getting darker
15:08:53 <peter1138> Hmm, that's probably a bug.
15:09:36 <locosage> I don't see it getting darker... are you sure it's not just monitor/viewing angle?
15:11:36 <locosage> ok, yeah, now I see it too
15:11:57 <_zephyris> It's a narrow corner case, you have to be masking near-white in the 32bpp image with a near-white TTD palette entry
15:12:17 <_zephyris> I was wondering if it was a deliberate simplification
15:12:27 <peter1138> There is code in ReallyAdjustBrightness to "reduce overbright strength", that's probably the culprit.
15:13:51 <_zephyris> Yeah, currently trying to understand it!
15:15:01 <_zephyris> Probably beyond my ability ๐
15:17:51 <_zephyris> I'll do a bug report...
15:18:08 <locosage> your picture shows what it does better than the code itself xD
15:18:46 <locosage> it was introduced like that so seems intentional, though I've no idea why
15:19:43 <_zephyris> locosage: Well, I just plotted all 65536 possible outputs! Sounds like cheating to me ๐
15:21:20 <peter1138> > commit 3ef77e55c5d552a58555f3d5eb7b7079b537fff3
15:21:20 <peter1138> > Author: peter1138 <peter1138@openttd.org>
15:21:20 <peter1138> > Date: Sat Dec 24 23:33:45 2011 +0000
15:21:20 <peter1138> > (svn r23670) -Feature: Add ability to adjust brightness of colour after remapping for 32bpp sprites
15:22:09 <peter1138> As suspected, it was me. I probably just made something up that looked okay with whatever I was looking at at the time.
15:22:26 <_zephyris> To be fair, its very close to perfect!
15:31:12 *** gelignite has joined #openttd
15:32:40 <peter1138> Also 12+ years before you found it ๐
15:38:58 <jfs> can it be fixed? how many grfs depend on this now?
15:39:23 <_zephyris> jfs: Approximately zero, otherwise those GRF authors would have noticed!
15:39:51 <jfs> no I mean, someone might have noticed and thought, "hey I can use this for a special effect!"
15:42:13 <_zephyris> Mmm, possibly... Unlikely in my opinion, but you never know...
15:43:35 <peter1138> Probably not, it requires being at the limits of shading.
15:44:06 <peter1138> So probably can be fixed, if anyone can work out what I was trying to achieve in the first place...
15:44:54 *** HerzogDeXtEr has joined #openttd
15:45:52 <_zephyris> Yeah, that's what I think
15:46:08 <_zephyris> Like I said, I'll do a bug report, but super low priority IMO
15:49:36 <jfs> I'm guessing there might be some overflow or underflow in it?
15:50:18 <jfs> changing all the intermediate values to signed int32 would maybe change the result
15:51:35 <peter1138> It's not over/underflow, it's just a weird algorithm.
16:06:27 <truebrain> finally a good reason to remove 32bpp!
16:10:51 <peter1138> Oh, fontconfig is archived on github, and their gitlab is horribly slow...
16:11:21 <locosage> I can imagine darkening looking better in actual sprites than just blots of white color
16:16:18 <locosage> also, it only really matters for dynamic colors like cc and palette cycles
16:17:11 <peter1138> Quora requires a login to even view content now, so...
16:34:05 <_zephyris> peter1138: Ugh, didn't realise that, just saw that the lead picture illustrated it well.
16:34:46 <_zephyris> locosage: Exactly what I was trying to do!
17:00:48 *** Wormnest has joined #openttd
17:52:22 *** _aD has quit IRC (Ping timeout: 480 seconds)
17:52:25 <FLHerne> pickpacket: You should look into using ccache if you aren't already, on slow machines it makes an enormous difference
18:16:41 *** gelignite has quit IRC (Quit: Stay safe!)
18:56:41 <andythenorth> do I GS or tanks?
18:59:25 <pickpacket> andythenorth: yes, definitely *nods sagely*
19:08:45 *** Flygon has quit IRC (Remote host closed the connection)
19:28:45 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
19:48:48 <andythenorth> pff unblock me here
19:49:02 <andythenorth> FIRS GS has a concept of 'happy towns'
19:49:26 <andythenorth> if a town is happy, there is a monthly dice roll chance that 1 primary industry in the town might permanently increase production
19:49:43 <andythenorth> should that live in the monthly town loop, or the industry loop? ๐
20:06:40 <brickblock19280> I guess I didn't have time to add knots as a unit
20:13:15 <_glx_> will the release workflow work ?
20:14:26 <Eddi|zuHause> we can always blame truebrain if it doesn't :p
20:15:36 <frosch123> at least everything claims to have succeeded ๐
20:16:42 *** nielsm has quit IRC (Ping timeout: 480 seconds)
20:18:18 <Eddi|zuHause> is that a case of "why did this ever work"?
20:19:13 <Rubidium_> not really, more the... why did anyone think of this construct. Why it works is clear...
20:19:37 <Rubidium_> ... but maybe it didn't work, and messing about adding +1 made it work and now it's that
20:19:47 <Eddi|zuHause> so it's a case of "luckily, it's a constant"
20:20:45 *** kageblink has joined #openttd
20:20:45 <kageblink> where do I begin if I want to start making my own sprites for buildings and stuff?
20:21:14 <frosch123> reading the manpage, i can see how this went wrong
20:21:29 <frosch123> "nfds This argument should be set to the highest-numbered file descriptor in any of the three sets, plus 1. The indicated file descriptors in each set are checked, up to this limit (but see BUGS)." <- pretty ambiguous
20:25:09 <pickpacket> FLHerne: thanks for the tip (re: ccache)
20:25:30 <Rubidium_> so it's a case of a very badly named variable?
20:25:50 <frosch123> yes, it's more like the capacity of the set
20:26:08 <frosch123> apparently it is ignored/meaningless on linux
20:26:21 <Rubidium_> _glx_: about #11081, I haven't tested that and wanted to see if you could see whether I broke something
20:26:24 <frosch123> maybe STDIN is some other value on other systems?
20:26:53 <_glx_> Rubidium_: code seems fine, but I can test yes ๐
20:27:13 <Rubidium_> frosch123: only when not defined(UNIX)
20:27:30 <Rubidium_> as it's currently hardcoded at line 33 of dedicated_v.cpp
20:28:35 <frosch123> well, but since STDIN is the only value to FD_SET, it's correct
20:29:19 <Rubidium_> well, I'll leave it as-is then
20:41:11 <kageblink> So I understand that openttd uses some kind of voxel implementation for pixels? Is there a tool for blender to export lets say a model of mine into openttd? How does this work? A lot of tutorials have dead links ๐
20:41:48 <kageblink> I found PixelTool - RichardWheeler.net, which is cool but I have a lot of buildings I worked on i would like to try out.
20:42:47 <_glx_> Rubidium_: tested with -D and with -swin32, both work fine
20:43:20 <Rubidium_> _glx_: nice! Thanks for testing
20:53:14 <FLHerne> kageblink: the voxel thing is Timberwolf's
20:53:48 <FLHerne> there's no support for that directly in OpenTTD, it renders to 2D sprites
20:54:27 <kageblink> Is that needed? Or is it just sprites? Mainly looking for a step by step guide to understand it. xD I thought so because it's only in one perspective lol
20:54:42 <FLHerne> or you can render directly from Blender if you're not trying to match the base game's pixel look
20:55:06 <kageblink> I can do either, play with what works
20:55:47 <FLHerne> the tricky thing with rendering 3D models is that the vehicles change proportion based on the angle, and it's challenging to make that look good with detailed renders
20:57:10 <FLHerne> is what happens if you keep the same vehicle proportions
20:57:21 <FLHerne> or you can stretch it
20:57:24 <kageblink> I read that it's isometric and at a 26degree downward angle
20:58:32 <brickblock19280> That is true except for vertical and horizontal sprites
20:58:47 <kageblink> my ocd would require me to go and make everything hires xD
20:59:02 <kageblink> looks nice but i would keep the pixel style
20:59:48 *** belajalilija has joined #openttd
20:59:48 <belajalilija> kageblink: Will be interesting to see
21:00:41 <_glx_> and he's doing opengfx2 now
21:05:47 <FLHerne> ^ kageblink is trying to render models from Blender, and also use PixelTool, both of which you're the expert on ;-)
21:06:32 <_zephyris> That's a deep rabbit hole, I wish I had good answers.
21:06:52 <_zephyris> I've not found a workflow I'm super happy with, which is why I've done pixel pushing, custom voxels, blender, now back to pixel pushing...
21:07:11 <kageblink> I would like to skip the pixel tool part idealy, but to put simply, is it easy? Like import .png into folder easy? lol
21:09:25 <kageblink> Just looking to make buildings, there are A LOT of amazing looking trains and buses lol
21:15:38 <FLHerne> kageblink: I'm not sure which step you're asking about
21:16:15 <kageblink> like after you render your model, edit it to where you need it, save it as png, the step after that. How does the game handle the file exactly?
21:16:49 <kageblink> so that blue is the transparency?
21:16:49 <FLHerne> that one's in the original paletted 8bpp normal zoom, which is required
21:17:34 <FLHerne> if you're using high-res sprites you can downscale but it tends to look strange/muddy because too few pixels
21:17:46 <FLHerne> which is what Timberwolf's voxel process was for
21:18:26 <FLHerne> then you need some NML code to replace it in-game, but that's... relatively... simple
21:18:37 <kageblink> yeah ofcourse, I'm thinking about playing with houdini, but I need to understand how the modding works first before I start going crazy
21:21:29 <FLHerne> you should use the DOS one, it has more colours
21:22:03 <FLHerne> as you note, the blue is transparent; there are some other magic colours
21:22:43 <FLHerne> OTTD also now supports conventional RGBA sprites, but needs you to provide 8bpp ones as a fallback
21:22:55 <LordAro> at some point someone is going to have to explain png -> grf
21:23:45 <kageblink> yeah that, the palettes are wicked
21:26:09 <FLHerne> LordAro: yeah, I was looking for a decent NML house set to point at as an example, but I haven't found one yet :p
21:28:21 <FLHerne> looks scary but it's mostly boilerplate
21:29:02 <FLHerne> unless you want anything clever it's literally write it once and copy-paste for each building
21:33:43 <_glx_> ah yes we don't have example for house
21:35:02 <kageblink> ahhh I see, yeah super helpful!
21:38:08 <FLHerne> it's a lot easier (for most of us, anyway) to give advice on how to code your sprites into the game than how to draw them :D
21:38:32 <kageblink> Yeah I got that covered ๐
21:39:25 <FLHerne> with all the ground angles
21:39:51 <FLHerne> you don't normally need to draw slopes for houses, they just sit on these raised foundation plinths
21:40:01 <FLHerne> I think you could if you wanted to ;-)
21:42:31 <kageblink> oooohh now we're cooking
21:42:58 <FLHerne> I never know what to link to first :p
21:43:44 <kageblink> super freaking helpful, especially the sloped ground stuff
21:44:02 <_glx_> hey at least you're not starting with stations ๐
21:44:41 <FLHerne> yeah, stations are cursed
21:45:28 <_glx_> objects and houses are the simplest things to do
21:47:48 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:52:53 <kageblink> Alright got it, so when I launch the game how do I know if the mod is working? Is there a way to specify how often it spawns?
21:53:18 <kageblink> ohhh or this is something I place manually?
21:53:48 <FLHerne> houses are random, objects are placed
21:54:08 <FLHerne> otherwise they're virtually identical from a modding-it-in perspective
21:54:49 <FLHerne> so it might be good to start off by coding your buildings as objects until you've got them looking how you want
21:55:33 <kageblink> yea basically the quickest way to get it in game so I can see, then I can modify the spawning stuff
21:58:22 <FLHerne> house properties have `probability` and `years_available`
21:59:20 <FLHerne> plus `construction_check` callback for more detailed checks (e.g. it can be a beachfront house and fail unless the tile is a coastline)
21:59:43 <FLHerne> and `destruction` that periodically checks if it should fall down
22:01:32 <FLHerne> objects placed manually from the landscaping toolbar
22:02:15 <kageblink> So I would set the code up like this?
22:03:39 <kageblink> and my test image name would be "BLINK_TestObject_1.png"?
22:05:46 <FLHerne> 'class' has to be a 4-character string
22:06:31 <FLHerne> string(...) has to refer to something in english.lng
22:06:53 <kageblink> so just find and replace blink to blnk? haha
22:07:38 <FLHerne> you need to add the spritelayout, next tutorial page
22:11:44 <FLHerne> the name of your image ends up in e.g. ` template_fingerpost(0,0,"gfx/dutch_fingerpost.png")`
22:12:55 <FLHerne> it's a bit more complicated than it has to be because of all the extra slopes though
22:13:26 <FLHerne> I keep thinking we need to redo the examples so there's a complete set of really minimal ones
22:13:45 <FLHerne> rather than trying to show off all the fun things you can do
22:14:36 <kageblink> Yeah exactly, learn and add as you go.
22:14:58 <FLHerne> also I'm being bad at explaining things in a useful order
22:15:49 <FLHerne> NML is a tool for turning *.nml files and sprites into *.grf files which are what OpenTTD reads
22:17:28 <kageblink> No worries, so wait now it's making sense, so NML is the tool I create these folders for the NMLTutorial object right? Then the NML turns that into the gameobject
22:17:49 <FLHerne> to make your buildings as objects, you should look at GRF, Item, Realsprites, Spriteset, Spritelayout from the main index
22:17:54 <kageblink> was wondering where to put the folder structure xD
22:18:06 <FLHerne> Switch if you want to do 'clever' stuff
22:18:41 <FLHerne> and the 'Objects' row in the big table of properties/variables/callbacks
22:18:56 <FLHerne> (or 'Houses' when you want them to be houses)
22:20:01 <FLHerne> you go to the folder and run `nmlc` on whatever.nml and it'll spit out whatever.grf
22:20:22 <FLHerne> the folder structure doesn't really matter, all the paths are exactly as written in whatever.nml
22:20:55 <FLHerne> conventionally sprite images are under gfx/ and the text string file(s) are under lang/ but that's not an actual requirement
22:21:08 <FLHerne> much like naming strings STR_WHATEVER
22:21:16 <FLHerne> it's just what everyone does
22:22:04 <FLHerne> oh, and you need to read 'Language files'
22:23:20 <FLHerne> you only need like three strings, but still
22:24:30 <kageblink> there is like a mountain of information here
22:24:50 <FLHerne> so: a minimal NML project will normally contain "whatever.nml, gfx/whatever.png", "lang/english.lng"
22:25:01 <FLHerne> the strings are in a separate file for convenient translation
22:25:26 <FLHerne> you can add a swedish.lng etc. as people write them
22:26:10 <FLHerne> I'm a little bit confused by what your screenshot is of, but eh :p
22:26:54 <kageblink> the folder structure
22:26:59 <kageblink> I am lost in the weeds here xD
22:27:23 <kageblink> where do I get the language file? Or do I make one?
22:27:36 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:27:44 <kageblink> And is it this complicated? Or am I totally misreading things
22:28:06 <FLHerne> it's probably not as complicated
22:28:37 <kageblink> It's telling me what everything is, I just don't know how its working lol
22:29:30 <FLHerne> oh, hm, I thought the release bundle came with the examples, but it doesn't :-(
22:31:00 <kageblink> the webpages be like "autorenew failed (money limit) " xD
22:32:03 <FLHerne> ##grflangid 0x01 <- says it's in English
22:32:32 <FLHerne> otherwise it's basically just a table of labels to texts
22:32:54 <FLHerne> the {CODES} are mostly self-explanatory
22:33:31 <FLHerne> any time you want a string in your grf, you just add a line to english.lng
22:33:50 <FLHerne> STR_MY_NEW_TEXT :Hello people reading this!
22:34:09 <FLHerne> and then string(STR_MY_NEW_TEXT) will mean "Hello people reading this!"
22:35:39 <FLHerne> then e.g. french.lng can be the same but with STR_MY_NEW_TEXT :"Bonjour ร tous ceux qui lisent ceci!" [Google Translate, might be gibberish]
22:38:00 <FLHerne> let me try to make an example grf without the overcomplicated slope stuff
22:38:18 <FLHerne> yeah, that looks fine
22:38:31 <FLHerne> (obviously it has some strings you don't need)
22:40:36 <kageblink> Stupid question but I really need python for this?
22:41:05 <_glx_> oh the standalone exe is enough to start
22:41:12 <FLHerne> the windows nmlc.exe is ok on its own
22:41:23 <FLHerne> (it's pretty much got a Python interpreter bundled into it)
22:41:59 <_glx_> a little slower because it has to unzip each time
22:42:31 <kageblink> I run the nmlc.exe, it pops up and disappears immediately
22:42:40 <_glx_> it's a command line tool
22:43:53 <_glx_> you can't run it by double click
22:44:13 <kageblink> trying to remember where I saw those command lines lol
22:45:22 *** _aD has quit IRC (Ping timeout: 480 seconds)
22:45:52 <_glx_> right click on the folder, you should have an option to open a command window
22:48:02 <_glx_> so you're in the folder with your .nml file (and lang)
22:48:29 <_glx_> just type `nmlc <your .nml file>`
22:53:34 <kageblink> im hopeless when it comes to this stuff xD wish it was just a drag and drop exe or I just type into an interface and hit save lol
22:55:54 <LordAro> no idea if it does houses though
23:00:32 <kageblink> sweet it's creating new project now ๐
23:06:05 <kageblink> this is mainly why, it's all the little things you gotta know
23:06:16 <kageblink> I fix them line by line but I don't know exactly whats going on lmao
23:07:59 <talltyler> Well, what's on line 9?
23:08:32 <kageblink> I fixed that, I'm down to line 3, name: string(BLNK_GRF_Object);
23:09:55 <kageblink> do I need to keep STR_?
23:10:20 <LordAro> if that's what you've got in your language file, yes
23:15:23 <kageblink> grfid: "\FB\FB\05\01";
23:15:23 <kageblink> name: string(STR_GRF_NAME);
23:15:23 <kageblink> desc: string(STR_GRF_DESCRIPTION);
23:15:25 <kageblink> min_compatible_version: 0;
23:15:27 <kageblink> item (FEAT_OBJECTS, item_TestObject_1) {
23:15:29 <kageblink> classname: string(STR_NLRF);
23:15:31 <kageblink> name: string(STR_TestObject_1);
23:15:31 <kageblink> climates_available: ALL_CLIMATES;
23:15:33 <kageblink> build_cost_multiplier: 2;
23:15:35 <kageblink> remove_cost_multiplier: 8;
23:15:35 <kageblink> introduction_date: date(1961, 1, 1);
23:15:37 <kageblink> end_of_life_date: 0xFFFFFFFF;
23:15:37 <kageblink> object_flags: bitmask(OBJ_FLAG_REMOVE_IS_INCOME, OBJ_FLAG_NO_FOUNDATIONS, OBJ_FLAG_ALLOW_BRIDGE);
23:15:43 <kageblink> additional_text: string(STR_TestObject_1_PURCHASE);
23:15:47 <kageblink> ```##grflangid 0x01
23:15:47 <kageblink> STR_GRF_NAME :Blink Object GRF: Object
23:15:49 <kageblink> STR_GRF_DESCRIPTION :{ORANGE}Blink Object GRF: Object{}{BLACK}This NewGRF is intended to provide a coding example for the high-level NewGRF-coding language NML.{}Original graphics by {SILVER}planetmaker, {BLACK}coding by {SILVER}planetmaker.{}{BLACK}This NewGRF defines a tile which can act as company-land replacement.
23:15:49 <kageblink> STR_VERSION_22723 :1.2.0 (r22723)
23:15:51 <kageblink> STR_NAME_OBJCLASS_INFRASTRUCTURE :Infrastructure
23:15:51 <kageblink> STR_NAME_COMPANY_LAND :Company land```
23:17:14 <talltyler> `STR_NLRF` doesn't exist in your language file ๐
23:17:34 <LordAro> nor does STR_TestObject_1, or STR_TestObject_1_PURCHASE
23:18:30 <talltyler> Ah, those probably correspond to the unused strings in your language file, and they just need to match
23:20:15 <kageblink> gonna start from absolute scratch here
23:20:43 <kageblink> The brackets are what I change?
23:20:57 <kageblink> or NAME and DESCRIPTION
23:21:01 <kageblink> or do I leave that?
23:23:10 <LordAro> what you've got there looks fine as far as strings are concerned
23:24:22 <kageblink> like yea I can just save it all out and call it a day but if I want to make more assets I need to start naming stuff right
23:25:44 <FLHerne> kageblink: it's a lookup table, nothing more
23:26:01 <kageblink> just gonna do this lol
23:26:44 <FLHerne> for every string(STR_XYZ) on the left in *.nml, you need a corresponding STR_XYZ :some text on the right in english.lng
23:28:36 <FLHerne> if you add `name: string(STR_NAME_PAINTED_WOMBATS) ` to test_object.nml you need to add `STR_NAME_PAINTED_WOMBAT :Painted Wombat (?)` to english.lng
23:30:23 <FLHerne> oh, that's because the example has {TITLE} defined in custom_tags.txt which you don't have
23:30:32 <FLHerne> just replace it with some normal text
23:30:58 <FLHerne> "kageblink's test grf" would do fine
23:34:05 <kageblink> ohhh put it in the documents Documents\OpenTTD\content_download\newgrf
23:34:45 <LordAro> ideally just OpenTTD\newgrf
23:34:55 <LordAro> content_download is for, funnily enough, downloaded content
23:35:52 <kageblink> I just put it in the first place I saw other files lol
23:36:06 <FLHerne> it doesn't really matter
23:37:03 <kageblink> yeah I'll make a new folder just as you said and put it htere xD
23:37:49 <_glx_> it should have created the tree at first start
23:38:20 <kageblink> it's just showing this
23:38:52 <_glx_> so you have a class, but is there an object defined ?
23:39:39 <FLHerne> you're still short some graphics
23:40:02 <kageblink> oh forgot to name the image
23:40:08 <FLHerne> needs a spriteset and so on
23:40:30 <kageblink> is this what I name it?
23:40:50 <_glx_> no that's some extra text
23:41:00 <FLHerne> the wiki example is a bit all over the place
23:41:27 <FLHerne> it's all there, but it's spread over a few pages in a really confusing way
23:42:03 <kageblink> yeah I've been looking at those files, but there's so much explaining there too
23:43:01 <kageblink> what kind of language is this?
23:43:17 <FLHerne> kageblink: no, I rewrote it to be even simpler
23:43:20 <kageblink> oops. not criticizing in anyway, genuinely asking the language of the code xD
23:43:39 <FLHerne> you can criticise it, the docs are a mess
23:43:59 <_glx_> and you're lucky nml exists ๐
23:44:12 <_glx_> before you would have to use nfo
23:44:28 <_glx_> and nobody should use nfo
23:44:48 <kageblink> that's the truth, lol I'm feeling that way about the game in general lol been looking for this ever since playing roller coaster tycoon as a kid xD
23:45:20 <kageblink> ok so, .png goes where?
23:46:16 <FLHerne> so the version I uploaded is different to the one you're quoting
23:46:44 <_glx_> a spriteset contains the sprites you will use in the spritelayout
23:47:03 <FLHerne> oops, just realised I forgot to change the comment
23:47:35 <FLHerne> so ignore the line "Graphics, found in cc_grid.png (in the same folder)", it's now in gfx/squares.png
23:47:35 <kageblink> Ohhh, the one you just linked
23:48:18 <FLHerne> that's the one I mean, yes :-)
23:48:43 <kageblink> So I add my png here?
23:49:04 <FLHerne> no magic auto-slope-detection, it's just a pink tile and a blue one
23:49:10 <_glx_> and this spriteset uses a template (not mandatory but reduce copy paste when project has many items with similar images)
23:50:09 <FLHerne> kageblink: if you look at gfx/squares.png you can see the base tile shape
23:50:11 <_glx_> put the spriteset and sprite layout before your item
23:50:37 <FLHerne> if you need a taller sprite the offsets in the template will want changing
23:50:54 <_glx_> because you'll need to add `default: sl_pink_square` to the graphics section of the item
23:52:29 <_glx_> spriteset lists the sprites, spritelayout tells how they are assembled, and graphics section tells which layout to use
23:52:53 <_glx_> and you need the template too ๐
23:53:41 <kageblink> ohhhh okay I'll redo from the template
23:54:18 <kageblink> Is there any way to get vscode to display the code formatting correctly? Not just the white text lol
23:54:31 <_glx_> yes, there's an extension
23:55:24 <kageblink> ommg this is so much simpler to read, thank you!
23:57:23 <_glx_> and I think some people just do it with notepad (they are crazy)
23:58:02 <FLHerne> kageblink: fwiw the 1+(80*n) is because the sprites in squares.png are 80 pixels apart with a 1-pixel border
23:58:51 <FLHerne> so if you keep adding sprites to the row, you can address them by tmpl_groundsprites(n)
continue to next day โต