Time Nick Message 00:01 fluxionary makes sense, just never done it that way and i don't see any explicit documentation 00:01 erle fluxionary what do you use it for? 00:01 fluxionary currently, just going to keep track of a constantly incrementing ID 00:01 erle for what? 00:02 fluxionary and wanted to initialize the value while the mod was loading cuz that's easier than writing "register_on_mobs_loaded" or something 00:02 erle but what is the id for? 00:02 erle i am asking because i have seen this use case ;) 00:02 fluxionary tentatively starting a new mob API (because of course we need yet another one) 00:02 erle and why does it need a counter per world? 00:02 fluxionary and part of what it's going to do is not store huge quantities of metadata in the mob object itself 00:02 MTDiscord obligatory https://xkcd.com/927/ 00:03 erle uh-oh 00:03 fluxionary i haven't quite decided on a backend, but probably will use mod_storage 00:03 erle i want no part in this 00:03 erle but good luck 00:03 fluxionary but an entity and its metadata will be identified w/ a unique numeric identifier 00:03 fluxionary well, the metadata that isn't actually used by the engine directly 00:04 erle i think this is the inner-platform effect? 00:04 erle https://en.wikipedia.org/wiki/Inner-platform_effect 00:04 fluxionary basically, the result of `get_staticdata()` will just be `{id = something}` 00:04 erle what tangible benefit does this give? 00:05 erle i mean mod storage is less reliable than basically every other way to store data in a world 00:05 erle so you have to make up for that 00:05 erle somehow 00:05 erle so where is the advantage? 00:05 fluxionary oh, not having to store all that metadata when you e.g. pick up the mob as a tamed pet 00:05 erle oh i see, you want to make world downloads useless 00:06 fluxionary well, in terms of stored pets, sure 00:06 erle i am not sure how much metadata you are talking about 00:06 erle is this a performance issue? 00:06 rubenwardy using an incrementing id may be problematic - after a crash, you could end up with the incrementing id being lower than a mob in the world 00:06 rubenwardy using a random guuid is probably a better idea 00:06 fluxionary ask Sokomine, the two of use discovered that having a huge warehouse full of chests w/ 90 petz items in each, caused *huge* lag for the client when loading those areas 00:07 fluxionary and also for some reason even affected FPS 00:07 erle trivially true, yes 00:07 fluxionary in any event, i just started on the project today, not sure where it will end up 00:07 erle you get the same thing by putting shulkers in shulkers 00:07 erle or making a warehouse full of books 00:07 fluxionary erle: yup, too much metadata in the item 00:08 erle no, it's too much metadata in the area 00:08 fluxionary i suppose? but that's because there's too much metadata in the items? 00:08 erle rubenwardy is correct btw. you wan get an almost-monotonously increasing value by using seconds since epoch and a random value after the decimal separator 00:08 erle i do that in some code i wrote 00:09 erle and unless your clock goes bonkers, it is guaranteed to have no collisions outside of a second 00:09 erle just look at the different types of uuid 00:10 erle fluxionary how much metadata does a single tamed pet have? 00:10 fluxionary rubenwardy, possible, but i'm doing a call to `mod_storage:set_int()` before returning the next value. there's probably a race condition w/ saving to the db, but it seems unlikely and effectively unavoidable w/out some sort of actual locks 00:10 fluxionary erle: for petz? around 10k i think? 00:10 erle what 00:10 fluxionary i'd have to go back and check 00:10 erle are you saving an uncompressed bitmap of the pet or what 00:10 fluxionary i think most mobkit mobs store way too much metadata, petz is pretty egregious 00:11 fluxionary in that *every* mob stores *every possible key* for *every possible pet*, even when it doesn't make sense 00:11 erle ohhhh 00:11 erle look, the solution is to work smarter, not harder 00:11 erle the enchantments in mineclone2 had a similar problem 00:11 erle each enchanted tool was storing every digtime 00:11 erle so it had 21kb of metadata 00:12 erle in mineclone2 0.71 this is the most accessible source of lag 00:12 erle anyways, it was reduced to like 2kb 00:12 fluxionary O_O 00:12 fluxionary like the digtime for *every node*?! 00:12 erle i'm not saying it was smart 00:12 fluxionary that's hilarious 00:13 erle in fact, almost all code i see, including my own, is super stupid if you look at it too long 00:13 erle stare into the abyss for too long and the abyss stares back 00:13 fluxionary in any event, what i want to do really isn't that hard to implement, and the users of the mod (other mod writers) won't have to think about it 00:13 erle yeah, but you would have a better time and your users too 00:14 erle if you would look at the “adventures” that kay27 had with his mod storage ideas 00:14 erle you know, the griefing-proof mapgen that works fine as long as mod storage works perfectly 00:14 erle he posted the failures of it himself 00:14 erle if you crash at exactly the right time, it just is totally bonkers 00:15 erle holes in the map and so on 00:15 erle anyway, what's stopping you from doing the UUID suggestion? 00:15 erle that's a very common pattern 00:16 erle birthday paradoxon? 00:17 erle fluxionary could you point me at the metadata code in question? maybe i can see a quick fix to drive the data down 00:17 erle or have you fixed it already? has Sokomine? 00:19 fluxionary sorry was afk for a moment, give me a moment to respond 00:20 fluxionary erle: what storage backend was kay27 using? 00:20 erle mod_storage? 00:20 erle it doesn't really matter, the semantics are the same 00:20 erle and i do not know 00:20 fluxionary but which backend for that? 00:20 fluxionary like, `minetest.serialize`, sqlite, postgres? 00:21 fluxionary the semantics have changed 00:21 erle in what way 00:21 fluxionary (does it even do postgres) 00:21 erle is it *in any way* more reliable? 00:21 fluxionary in that writes are written to the backend immediately 00:21 erle as if 00:21 fluxionary really? 00:21 erle well i don't believe it without proof, show pls 00:21 fluxionary are the sql backends not doing what i think they do? 00:21 erle the semantics of mod storage as i remember are “you have to save stuff manually” 00:22 erle so where and when did they change? 00:22 fluxionary let me find that 00:22 erle i remember also another thing like that 00:22 erle the nether portals 00:22 erle they used mod storage 00:22 rubenwardy fluxionary: mod storage only saves every 15 seconds or so, and I don't think it's synced with world saves(?). Also, the mod storage file could be individually corrupted or lost 00:23 erle if you crashed the server in just the right way you could make a portal that would teleport the user into a lava cube 00:23 rubenwardy oh do we have sqlite mod storage now 00:23 erle what's the guarantee of sqlite? 00:23 rubenwardy slightly better than spitting everything out to json every X seconds 00:23 fluxionary it used to just not save until you quit (or after not-serious crashes) 00:23 erle tbh if you have 10kbb metadata that's okay. but if you have them and they should not be 10kbb, maybe clean them up? 00:24 erle i can help you probably doing that 00:24 erle “not-serious crashes” lol 00:25 erle you mean the once where you still get a trace? 00:26 fluxionary erle: entities are the hardest thing for the client to deal w/. if you've got just a few hundred entities in an area, low-power machines drop to single-digit FPS 00:27 erle rubenwardy can i do anything about that modpack i made which used to only hang the game and then i was told that's not useful and then i pivoted to a mod that fixes the hang by filtering the input (it is trivially triggerable as soon as users can trigger arbitrary location emerges) and then everyone seemed to think it was still the old mod or something. it is marked with action/change needed, but i got no advice what i should change 00:27 erle IIRC. 00:27 fluxionary erle: i'm not really sure what all the causes are, but i know that the size of the metadata that's sent to clients is at least correlated 00:27 erle rubenwardy i remember us talking about it some time back and you seemed to have some opinions on testing or so? 00:27 fluxionary sqlite isn't just the available, it's the default, and it'll toss out your old mod_storage if you aren't paying attention (or at least it used to?) 00:28 erle i wonder why that was the case 00:28 erle like why would it not be the default to migrate the data? 00:28 fluxionary that, i don't know 00:29 erle fluxionary i know about entity problems. but storing a lot of stuff in a mapblock is rarely an entity problem. 00:29 fluxionary it might have been because i was using dev versions, i never looked into it 00:29 fluxionary and none of my local worlds mattered 00:30 erle well either there is a good reason, or someone was impossibly lazy 00:30 fluxionary erle: or it was an "early adopters" bug or something 00:30 fluxionary not that i was trying to adopt that feature specifically 00:30 erle well, i have encountered a lot of people who have the mindeset ”it's done, i don't care about the legacy stuff” 00:31 erle one of the more toxic programmer memes IMO 00:31 fluxionary erle: i care about the legacy stuff, but at the same time, there's only a finite amount of attention in the world =D 00:31 erle compare minetest and minecraft 00:31 erle migrating worlds is a breeze in minetest 00:31 erle in minecraft … i sometimes read the mojang bugtracker just to be amused 00:31 erle it's much funnier than the minetest one 00:32 fluxionary erle: i've been working on re-doing a number of major mods, and i've tried very hard not to break any legacy stuff that was actually functional 00:32 erle for example, they have a bot that autocloses issues on trigger words 00:32 erle IIRC if a user comments “this works for me” or so hehe 00:32 fluxionary erle: i'm surprised they have a public-facing bugtracker 00:32 erle it's a flaming pile of garbage though 00:33 erle the funniest thing is when the devs themselves confidently assert something about the mechanics and users then point out it is wrong 00:33 erle also a lot of people post stuff like ”my 2FA is not working” hehe 00:33 erle closing that is legit 00:34 fluxionary i haven't used minecraft since i found this game, i'm pretty sure given all the weird things they've done to it, i probably won't be able to get it to work for me 00:34 erle back to the mob metadata thing 00:34 erle i have an old laptop and i know the pains 00:34 fluxionary back to that 00:34 fluxionary i feel that mod_storage is a reliable backend now 00:35 fluxionary but i've also left what i've written so far open to adopting some other backend 00:35 erle cool then you can also use it for chests hehe 00:35 erle breaking world downloads completely 00:35 fluxionary erle: that doesn't break world downloads completely 00:36 fluxionary erle: already, your local world shouldn't be getting info about the contents of other player's locked chests 00:36 erle if you save the inventory in mod_storage? 00:36 erle i disagree on principle 00:36 erle about the lag, there are several things 00:36 fluxionary erle: it breaks chest contents, for sure. but there's literally a `metadata:mark_as_private()` feature already 00:36 erle people are not using it ;) 00:37 fluxionary erle: i am 00:37 erle oh nice 00:37 erle i believe it reduces traffic 00:37 fluxionary most explicitly in my smartshop fork 00:37 erle one simple thing that you can do is look at the amount of traffic that the mapblock generates btw 00:37 erle and look if there are any ghost inventories around the area 00:37 fluxionary erle: yup, i know how to use wireshark :) 00:37 erle do you have an up to date dissector for the protocol? 00:38 fluxionary i don't have any better disector for the protocol than what ships currently 00:38 erle :/ 00:38 erle there was an area on clamity that had issues like the ones you had 00:38 fluxionary though i wrote a couple ad-hoc scripts 00:38 erle because of a lot of chests 00:38 erle turns out that a big issue was leftover unused metadata in the world 00:38 fluxionary though that was a couple years ago 00:39 fluxionary erle: interesting. left-over after... what? worldedit? 00:39 erle after duping 00:39 fluxionary like a physical node duping? 00:40 fluxionary using a piston or something? 00:40 erle oh tell i do not know piston duping hehe 00:40 erle i only know how to create the elusive standalone piston head 00:40 erle which can not be mined 00:40 fluxionary there was an ... interesting bug related to pistons and machines from the terumet mod 00:40 erle but blown up 00:40 erle tell 00:40 erle the duping made it so that you could have inaccessible inventories not associated with chests 00:41 erle those were full of shulkers, or even shulkers full of shulkers 00:41 erle a peculiar feature of item metadata is that you can stuff A LOT more data into an item than you can into an entity (and games rely on it lol) 00:42 erle and recursive shulkers are one of the worst cases i know 00:42 erle anyways, the area was full of it 00:43 erle upside: if you visit such an area and have the appropriate CSM, you can literally pick items out of thin air 00:43 erle even on vanilla client 00:44 erle fluxionary if you do not show me the 10kb pets metadata code, i am not going to try to figure out how to crush it 00:44 fluxionary oh, i can show you petz? 00:45 fluxionary https://github.com/runsy/petz/ 00:45 erle well i am pretty bad in lua, but good enough to have made some mods and sped up some code 00:45 erle so where is the part about the pet meta 00:46 erle https://github.com/runsy/petz/blob/master/petz/petz/bunny_mobkit.lua take this 00:46 erle how does this generate 10kb of meta 00:46 erle that would be like 3 times that file 00:46 erle which is incidentally, 3.33kb hehe 00:47 erle fluxionary tell me about big chungus 00:47 erle ples 00:47 erle please 00:48 erle so far i have not found anything 00:49 erle i remember using this mod i think 00:49 erle werewolves 00:50 erle https://github.com/runsy/petz/blob/096d2d4cd806ee8e58f12d0c529a89a604c5bef2/petz/api/api_capture.lua 00:51 erle local stack_meta = new_stack:get_meta() 00:51 erle local ent = self.object:get_luaentity() 00:51 erle local staticdata = ent:get_staticdata(self) 00:51 erle stack_meta:set_string("staticdata", staticdata) 00:53 erle github code search is so incredibly dumb 00:53 erle no results for “stat”, but 46 for “staticdata” 00:54 erle https://github.com/runsy/petz/blob/68eb2bed092ff1687991b13e163031fd13f00ac8/kitz/engine.lua#L736 00:54 erle oh lol 00:54 erle capturing an animal serializes its memory 00:55 erle funny 00:55 erle fluxionary, i still do not see how this gets to 10kb 00:56 erle or how it is remotely bad 00:56 erle it sounds a lot of unncessary features but quite cleanly implmeented 01:18 fluxionary it's apparently not 10k, a single test on a single mob shows 3.5k 04:44 MTDiscord erle: petz isn't cleanly implemented at all 08:18 MinetestBot 02[git] 04Wuzzy2 -> 03minetest/minetest: Fix lua_api typo: animated_images 13f0703f3 https://github.com/minetest/minetest/commit/f0703f3c5b8ed51d2c7caf83ffe547bf54bc1eb1 (152022-07-29T08:18:30Z) 08:21 MinetestBot 02[git] 04sfan5 -> 03minetest/minetest: Allow direction keys with autoforward again 136611d7e https://github.com/minetest/minetest/commit/6611d7e1ee3b078b5c3414bf57833755d8b43620 (152022-07-29T08:19:23Z) 08:21 MinetestBot 02[git] 04appgurueu -> 03minetest/minetest: Fix media overriding regression (#12602) 1399c8295 https://github.com/minetest/minetest/commit/99c8295e71eb86333ae21b1083b6f55fb9479565 (152022-07-29T08:19:36Z) 13:10 MinetestBot 02[git] 04RichardTry -> 03minetest/minetest_game: Update Russian translation for mtg_craftguide (#2873) 13c744829 https://github.com/minetest/minetest_game/commit/c744829ce5e8b8a67439e5e33571569a25a3ad47 (152022-07-29T13:10:24Z) 13:13 MTDiscord https://github.com/minetest/minetest/milestone/19 is 5.6 supposed to release in two days and there are still 5+ issues to be resolved (half the things on the list are pulls to fix issues tho), so I suggest considering to kick #12131 off the milestone if it isn't fixed swiftly 13:13 ShadowBot https://github.com/minetest/minetest/issues/12131 -- Add `minetest.settings` to CSM API and allow CSMs to provide `settingtypes.txt` by AFCMS 13:13 skunky3 hey, im wondering: is there a similar system to minecraft ticks/random ticks in minetest? basically a global timer that calls a callback on nodes every x seconds or so? 13:13 rubenwardy See https://rubenwardy.com/minetest_modding_book//en/map/timers.html 13:13 rubenwardy !title 13:13 MinetestBot rubenwardy: Node Timers and ABMs - Minetest Modding Book 13:14 sfan5 !book Node Timers 13:14 MinetestBot sfan5: Node Timers and ABMs - https://rubenwardy.com/minetest_modding_book//en/map/timers.html 13:14 sfan5 hey that works 13:14 rubenwardy oh cool. When was that added? 13:14 rubenwardy oh wait, did I do that? 13:14 sfan5 didn't you add it yourself 13:14 rubenwardy probably 13:14 rubenwardy I must be thinking of cdb that doesn't have a command 13:15 skunky3 thanks, i was more looking in the other official refference, but ill check it out 13:17 rubenwardy the official reference is that good to learn from if you don't know what to ctrl+f 13:17 rubenwardy *isn't 13:17 rubenwardy the official reference isn't good to learn from. You need to know what to ctrl+f 13:26 skunky3 i have been figuring out some things from there but interesting 13:33 skunky3 on abms, is it possible to check if the node is covered by another node on top, or does that have to be checked in the callback? 13:34 sfan5 if you don't see it in the definition in lua_api.txt then you need to check manually in the callback 13:34 sfan5 @luatic I commented a fix there, this took me 10 minutes; someone unfamiliar with the code might need up to an hour but it's not impossible, so I'm wondering if just nobody cares 13:36 skunky3 for example i want to implement grass turning into dirt if its covered by another normal type node 13:37 erle skunky3 for everything that does not happen very rarely, you will probably almost always want to use an ABM. each node timer uses memory per node to keep state. ABMs do not. 13:38 erle skunky3 i think you can define an abm with adjacent nodes as a constraint and then can check in the abm handler 13:38 erle that is, in my experience, fast enough 13:38 sfan5 short of very elaborate workarounds (like implementing in-world node tracking yourself) this is currently the most efficient way: https://github.com/sfan5/minetest_classic/blob/c05f2690d36e814bea03ae6a8194a3fdee852183/mods/default/abm.lua#L24-L37 13:39 sfan5 and also simplest 13:39 erle about ”very rarely”, for an oven you can use a timer. the advantage of a timer is that it will keep state even if the game is restarting. you don't want your smelter to restart once you reload the game. 13:41 skunky3 i see, so abms seem seem to be the way to go for crops growing, and similar 13:41 erle i think this is not exactly the most efficient way, even if it is the canonical way. IIRC you can save a tiny tiny amount of time by not using the vector function here but constructing the table yourself. 13:42 sfan5 abs are more "you have often occurring nodes and semi-random stuff happens to them once in a while" 13:42 sfan5 nodetimes are "you have specific nodes where something happens on an exact schedule" 13:42 sfan5 you could implement crop growing with both 13:42 sfan5 but for e.g. furnace you'd go with nodetimers 13:43 sfan5 and natural grass growth is a definite usecase for ABMs 13:43 erle there are indeed several approaches to growing crops. depending on what you want, you can use timers, but you will have a very uniform growth schedule then in a naive implementation. 13:44 skunky3 thanks for the info, i will now be messing around with these things on my own again! 13:44 erle kay27 also has a weird thing where he tries to track the time elapsed outside of the game in mineclone5 i think. please don't do it, but maybe look at it as an example of what not do to. it is barely achieving his goals, i bet it will not achieve any of yours. 13:45 erle IIRC the idea was something like “my crops will grow the same if i let the game run for an hour or if i quit it and restart it an hour later” or so? i do not remember. 13:45 erle but certainly a niche goal that *could* be useful, but most likely is not 13:46 erle if you, for example, have a game that syncs its day/night cycle to the local time 13:46 erle skunky3 is there any place where you publish your code? i am curious, having done a bit of crop growing stuff myself 13:47 erle maybe i learn of a new approach or new gameplay way (like the kay27 way, i did not even think of that before i sawo it) 13:48 skunky3 not yet, im still very much in the learning phase, i will publish my code once im away from experimenting, and actually making something playable 13:49 erle skunky3 a warning: for every process that can go exponential, do not use node timers. i.e. if some plant is spawning two other plants. literally every fire mod that uses node timers leads to lag if the fire becomes large enough. 13:49 erle even if you have 16G RAM instead of 4G like me, the difference is merely a few generations until it is full of node timers 13:50 skunky3 i can imagine, i plan on going very much on the efficent route instead of that 13:51 erle i am just saying that because it changes your outlook on how the logic has to work 13:51 erle you can have node-timer-based fires and ABM-chance-based-fires that are the same in gameplay terms 13:51 erle but they are implemented very differently 13:51 erle and the ABM fire never lags the computer ;) 13:51 erle except, maybe, if you have issues looking at many flames lol 13:52 skunky3 i basically thought of almost always using abms, except for when timers are really better 13:52 erle oh, also don't forget about ABM catch-up 13:52 skunky3 i saw 13:52 erle you might or might not want your stuff to depend on if the area is loaded 13:53 erle also LBMs are unreliable unless you set them to always execute, so just forget them for this kind of purpose, they are not the right tool for the job anyway (but i think i have seen LBM-based growing code) 13:54 erle skunky3 so what is your idea, still the biome blending thing? 13:54 erle just like, more colors? 14:02 skunky3 ill see, just more colours for now 14:36 kilbith the Black Mesa mainmenu: https://i.imgur.com/DwockxN.png 14:57 erle i believe this is again a console main menu, with no clear indications what exactly is a click target, it also suffers from small fonts (again) and everything being in french. ;) 15:42 skunky3 on abms: is it possible to check which neighbouring block made the condition true, if it is set? 15:43 skunky3 i could check all neighbouring blocks manually, but im unsure about its performance 15:44 erle skunky3 you are very unlikely to run into performance issues using ABMs and even if you do, the ABM evaluation is just going to skip a bunch of things 15:44 erle just don't overdo it 15:45 erle like, grass spread was never an issue 15:45 erle but in mineclone2 for example, i think the vine growing ABM did something bad 15:45 erle it was consistently the one that took the most time when i measured it 15:45 erle bubble column ABM also programmed really badly 15:46 erle skunky3 the most important thing about any ABM solution is that you need to be able to afford the ABM not firing 15:46 erle for example, IIRC in mineclone5, nether portals are despawned using ABMs 15:46 erle so they might hang around for a time if there is too much ABM lag around 15:47 erle the game will notlag 15:47 erle but the ABM evaluation will be inhibited 15:47 sfan5 if you have to use find_nodes_in_area 15:47 sfan5 or was it find_node_in_area? 15:48 erle for the portal despawning case there exist multiple algorithms featuring timers, most of them recursive 15:48 erle and one that is the simplest, just bulk set the nodes 15:48 erle an ABM is just wrong there 15:48 skunky3 ive been thinking about making abms that spread grass, over other grass, and then smoothly interpolate between their 2 colours 15:48 erle as it also affects portals that do not need to despawn (a portal despawns if its edge meets a non-obsidian-and-non-portal node) 15:49 erle you can do that, but 15:49 erle the most difficult thing for this will be the grass note color interpolation 15:49 erle node 15:50 erle skunky3 what is your solution for the grass node coloring? just a reasonable 256 color palette? 15:50 skunky3 oh i already have an idea for that 15:50 erle i mean 16 × 16 = 256 15:51 erle so you can smoothly blend a bunch of things 15:51 erle if you only want single-accent color 15:51 erle skunky3, tell 15:51 erle how are you going to solve it? maybe i can steal the idea hehehehehe 15:51 MTDiscord kilbith: Black Mesa's menu reminds me that I need to play it, there was a ton of thought and effort behind that game 15:51 skunky3 making 16 blocks, so that i can define colours via rgb 15:52 erle skunky3 you mean my R5G5B5 proposal? or just 16 base colors? 15:52 MTDiscord But I think that the tab hierarchy would do us some good 15:52 erle with my proposal, you get 4096 different colors for blending 15:52 skunky3 R5? isnt it 4 bits? 15:52 erle Benrob0329 there are similar, but much better thought out ideas in the issue 15:53 skunky3 or am i having a moment 15:53 MTDiscord Ok, and? 15:53 erle skunky3 you are right! off by one error. 15:54 erle 2¹⁵ = 4096 = 16 × 256 15:54 erle no 15:54 erle that was what i thought 15:54 erle but it is 2¹² 15:54 erle so you have only 4 bits 15:54 erle per color channel 15:54 skunky3 i think your proposal before had more textures in it 15:55 skunky3 but, with 16 i can parse hex colour codes of the form #AAA quite easily 15:56 skunky3 so the interpolation is actually the least difficult thing for me 15:57 erle well, it is if you want more colors 15:58 erle you need some way to distribute the colors to the nodes palette 15:58 erle programmatically 15:58 erle each color representing a base node and a param2 15:58 erle which with R4G4B4 are 2⁴ bits + 2⁸ bits 15:59 skunky3 well that seems quite simple to me, ima be honest 15:59 erle it is not too hard if you don't have an issue with all your base nodes being red or so hehe 15:59 MTDiscord Isn't there a colorized drawtype, that has a whole palette? 15:59 erle MisterE, yes, but only 256 colors 15:59 erle and ironically, it does not read the colormap of the image i think 15:59 erle not sure 16:01 skunky3 well it will be 16 nodes, with each 256 colours, where all of them use the same textures but do some other funk to make them different colours 16:02 skunky3 there wont really be a way to get grass node items without param2 set, except via creative 16:04 erle skunky3 i suggest to be a bit smarter about the bit fiddling. for the 16 nodes, use 1 red bit, 2 green bits and 1 blue bit 16:04 erle for the base nodes 16:04 erle IIRC the human eye is more sensitive to green color changes 16:04 erle in terms of perceived brightness 16:05 erle so you could make it so that the node you pick up is approx. the same color as the blended node ig 16:05 erle like one of 16 colors matching closest ideally 16:06 skunky3 i mean the node you pick up, keeps the param2 informantion tho 16:06 skunky3 like, the colour is kept the same 16:06 erle in the inventory too? 16:07 skunky3 yes 16:07 skunky3 as long as its not gotten through creative 16:07 erle so it is rendered with that color? 16:07 skunky3 yes 16:07 erle nice 16:07 erle then it's super easy 16:07 skunky3 yeah 16:07 erle i did not know 16:08 erle please show when you are done 16:08 erle this is interesting 16:08 skunky3 i can send a link to the script and image once it works with growing, just wont be doing stuff with biomes yet 16:09 erle yeah do 16:11 erle now i am also motivated to try it 16:11 skunky3 just keep in mind its just standalone rn, and will neither generate, nor set its colour when given through creative inventorys 16:12 skunky3 and im just setting param 2 through the development test param2 tool for testing 16:16 erle i am writing code to generate the palettes now 16:20 skunky3 my implementation will use a singular palette 16:21 erle for 16 nodes? 16:21 skunky3 yes 16:22 erle why 16:22 erle you can have 16 palettes 16:22 skunky3 and you can have 1 palette 16:23 erle but then you only ever need 1 node 16:23 skunky3 no 16:23 erle why 16:23 skunky3 i will show soon when it works 16:39 erle skunky3, check this out https://mister-muffin.de/p/cjLg.txt 16:41 erle 1. use R4G4B4 colors for blending (bit shift if you are lazy, better use the sample depth rescaling algorithm like i did here) 16:41 erle 2. have 16 different nodes. red color channel is the node 16:41 erle 3. green color channel × blue color channel is the param 2 16:44 erle skunky3, does that help you? 16:45 erle oh 16:45 erle i did something wrong here 16:47 erle i thin the correct param2 is (15 - green) × blue 16:53 skunky3 unsure where i would upload the image files, or the zip file 17:04 skunky3 but i deffinetly got all the colours there 17:54 erle skunky3 https://mister-muffin.de/paste 17:56 skunky3 does that support files besides text ones tho? erle 18:04 skunky3 erle its a tar.gz file https://mister-muffin.de/p/xiUb.gz 18:06 skunky3 ima still need to make the growing code tho 18:07 erle skunky3 i don't think the multiply trick works 18:08 erle you do not get a uniform color distribution that way 18:08 erle admittedly, in perceptual terms, my approach also does not give you one 18:08 erle but it's much better 18:10 erle i see why you are only using one palette though 18:10 erle it's pretty color 18:10 skunky3 i dont really mind tbh, my goal is just to get all colours that can be written as #3f6 18:10 erle but i think you will get banding issues 18:10 erle well, that is what my approach does too 18:11 erle maybe i am missing something here 18:11 skunky3 it only multiplies one of the colour channels of the palette 18:12 skunky3 and thats the colour thats always at 255 18:12 erle oh hmm 18:12 erle ig it's equivalent then 18:13 erle palette = "neko_grass.png^[multiply:#FF"..ihex.."FF" 18:13 erle nah i doubt it 18:13 skunky3 yes, the green channell is the one that doesnt get changed 18:14 erle but if you muiltiply the other channels with 255, you always get 255 for them? 18:14 erle like i am not sure, maybe i do not understand how the texmod works 18:14 erle but i assumed it would multiply channel-wise 18:15 skunky3 remember that colour values in multiply work with 0-1 instead of 0-255 18:15 erle and in multiplication the neutral element is not 255. is it in the texmod? 18:15 erle oh 18:15 erle i see 18:15 skunky3 thats how colour multiplication works in general 18:15 erle then i guess our solutions are equivalent, only i use more disk space and you use more RAM and CPU 18:15 erle i can assure you that i just assumed and did not look it up 18:16 erle i had a teacher once who said “if you assume, you make an ass out of you and me” höhöhö 18:16 erle so yes, smart trick. but where did you get the base image? 18:16 erle for the colormap 18:17 skunky3 well i tried it in game, and works 18:17 erle did you do this in an earlier project? 18:17 skunky3 i just made it using gradients in an image editor, was quite simple 18:17 erle oh lol 18:18 erle we have widely different ideas on reproducibility of artifacts i think 18:18 erle ig it's pretty much the same then anyways 18:18 erle wildly 18:19 skunky3 i dont like to automate something that ill only do once anyway 18:24 skunky3 dont get me wrong, i like automating things, but i usually weigh it out as to how usefull it is 19:20 erle skunky3 oh, i built my think in a way that you can have different color depths 19:20 erle or different color distributions 19:20 erle in the future 19:21 skunky3 ahh i see, im fine with it being at this scale, since its best fit to colour codes 19:25 erle skunky3 well, you might, for example, not use the entire rgb colorspace 19:25 erle anyway, pls tell me about your mod when you are finished! 19:27 skunky3 im planning to make a game rather then a mod, just making mods rn to learn the ins and out of minetest 19:49 skunky3 does minetest.find_nodes_in_area make sense for an area as small as 3x3x3? 19:51 erle skunky3 benchmark it 20:04 MinetestBot 02[git] 04RichardTry -> 03minetest/minetest_game: Update Russian translation 132bdc7c8 https://github.com/minetest/minetest_game/commit/2bdc7c8c7d9eb35185c9f90c371f65f105ab112a (152022-07-29T20:03:06Z) 20:20 MinetestBot 02[git] 04Wuzzy2 -> 03minetest/minetest: Update builtin translation files 133b37bcd https://github.com/minetest/minetest/commit/3b37bcd994ee455496818708b8efc488aaf2777b (152022-07-29T20:20:48Z) 20:20 MinetestBot 02[git] 04Wuzzy2 -> 03minetest/minetest: Update German builtin translation 136a269d5 https://github.com/minetest/minetest/commit/6a269d58ef28be6428a5fb62c0eb966fc1ff5883 (152022-07-29T20:20:48Z) 21:44 skunky3 the grass is growing, and merging 21:57 arielaw[m] hey y'all, are there any tutorials for grokking the map generation process? there's some funky stuff I want to do with terrain generation for a game but I'm not sure how I should go about it 22:04 arielaw[m] the wiki isn't quite doing it for me, I was wondering if there's something more along the lines of "hey here we have these parameters, with the valley/v7 mapgen and THIS is how the result looks" 22:28 MTDiscord I don't think so. 22:28 MTDiscord There are plenty of mapgen mods tho 22:38 arielaw[m] Yeah I've read a little about subterrane for example and it seems like it'll be useful for what I want to do, but you still need to more or less understand how perlin noise works to use this stuff, no?