Time Nick Message 04:51 untilted hi 05:50 [MatrxMT] Do I understand it correctly that `minetest.register_portable_metatable(name, mt)` allows me to port custom data to an async environment, or am I getting that wrong? 05:53 [MatrxMT] And if that's not the case, then what is it good for? 06:13 MTDiscord I think, this is not for data exactly. Just for objects. So if you transver vector, you cen still use it like a vector-> vec:vector_method() 07:18 sfan5 @Bram depends on what you mean by "custom data" 07:19 [MatrxMT] I'd like to transfer a `registered_caves` type from the mod initialization to the mapgen environment, in a similar way to how `minetest.registered_nodes` is accessible in the mapgen environment. 07:21 [MatrxMT] Hmmm. If I initialize variables in a mapgen script, then other mods with custom mapgen scripts can access those variables, right? 07:34 sfan5 yes 07:34 sfan5 register_portable_metatable does not transfer any data 07:34 sfan5 there are upcoming IPC functions for this 07:34 sfan5 currently the best option is to write a serialized form to a file in the world folder and read it back in the mapgen env 10:19 untilted Hello, I'm learning the lua api right now and I'm curious about the mapgen, reading the source code right now (script/lua_api/l_mapgen.h). 10:21 untilted I figured there is not much to set "dynamically" as the chunk generation runs, by reading the set_mapgen "cannot set after initialization" errors. 10:23 untilted So I see that the way to go modifying the mapgen is to use the register_mapgen_script, register_on_generated, etc. functions on the api. 10:24 untilted I was afraid it could be too slow but I saw some merges that put this feature on a new thread so i'll just try it. 10:27 untilted This is the part where I ask about the mapgens themselves, v7 is the one to use right? I read that this one has less "hard-coding" and on the github I saw paramat make this giant dungeon above the world, then he put it underground again by changing a variable in source-code. 10:29 ireallyhateirc custom mapgens can be implemented entirely with lua, the mapgen env (register_mapgen_script) lets you modify the voxel manip flat array just after it was generated by C++ 10:31 ireallyhateirc depends what you mean by "the one to use". v7 is better than v6 if that's what you ask for, but there are other "good" mapgens like valleys, carpathian or flat 10:32 untilted Yeah I've checked valleys and it was interesting how it felt like an entire different game. v6 I'm curious why its at the very bottom of the mapgen list. 10:33 [MatrxMT] v6 doesn't act like the other generators do with its biome system, mods end up needing to write separate code for it 10:34 untilted ireallyhateirc: Does this mean that the mapgen env in lua gets this kind of binary data from v7 to work with before writing to map? 10:35 untilted I can't, for example, modify a perlin noise on v7 to make the terrain very spiky or ultra flat, etc. 10:36 ireallyhateirc yeah, mapgen env lets you modify nodes after generation but before it gets written to map, though I wouldn't really call that data "binary", it's just a lua table 10:36 ireallyhateirc I believe you can modify perlin noise parameters with mapgen settings? 10:37 ireallyhateirc https://github.com/minetest/minetest/blob/master/minetest.conf.example 10:37 ireallyhateirc in this document there are various mapgen settings listed 10:38 untilted I see, I can have my own conf file for a custom game right? 10:39 ireallyhateirc Here's an example file from my game: https://codeberg.org/perfect_city_game_studio/perfect_city/src/branch/master/minetest.conf 10:40 ireallyhateirc There I customize perlin noise for hills with the flat mapgen 10:41 untilted Thank you. I see some PerlinNoise/PerlinNoiseMap classes on the API so I'm going to look for some mapgen examples on the forums. 10:42 untilted I saw some interesting ones but at first glance it looked like it was an entire new mapgen in lua not using v7 at all. 10:42 ireallyhateirc you can also do this in lua: minetest.set_mapgen_setting("mgflat_spflags", "nolakes, hills, nocaverns", true) 10:44 untilted I see, I can only do this once on the lua scripts. 10:44 ireallyhateirc yeah, I put that for example in ./minetest/my-game/mods/mapgen/init.lua 10:44 ireallyhateirc but anywhere works I guess 10:45 untilted Thanks. 16:48 CoolJar10 @MisterE couldn’t you use Wire-guard and ur router to configure ur own domain on ur local network?? And setting up protocol allowing Global Access to such port 21:04 MTDiscord I'm quite confused why I am the ideal person to answer this question 21:08 MTDiscord If you are asking about setting up a server hosted from your house, freemyip.com is a solution. 21:16 MTDiscord Asking if you could use wireguard as part of a home network setup is like asking if you can use copper to move information. Yes, there are a lot of ways it could be involved, but without something more specific in mind, I'm not sure what can usefully be said about it. 23:31 untilted How does the lua mods work exactly? Is there an "initialization" order of which ones get to register items/biomes/etc first and can I force it to do this? 23:31 MTDiscord mods can declare dependencies which are loaded before them. games can additionally declare a first/last mod to be loaded. 23:33 untilted I declare that by adding more dependencies in the mod.conf right? That made it work, thank you. 23:34 untilted Basically I was moving the mapgen.lua in the "default" mod to a separate one and "spawn" was triggering an assert. 23:43 ireallyhateirc untilted, you seem new: https://rubenwardy.com/minetest_modding_book/en/index.html 23:44 ireallyhateirc this small book is helpful for starting modding, it explain some basic stuff