Time Nick Message 04:01 Toothless Is anyone available I could use some help with creating a map for Capture The Flag 04:08 MTDiscord @LandarVargan ^ since your online 04:57 MTDiscord I am working on a tutorial video for it, but until then the Discord Server is probably the best place to ask. Or maybe https://forum.minetest.net/viewtopic.php?f=12&t=19729&start=225 11:08 kabou question: 11:08 kabou I have registered a node, 11:09 kabou in the table declaration I have put some _my_key = value 11:09 kabou I want to read that value later 11:09 kabou but 11:11 kabou when I later in a callback try to do  minettest.get_meta(pos)  , the meta has no fields at all 11:11 kabou not _my_key 11:11 kabou but nothing else either that was defined at node registration 11:12 kabou I did check the meta:to_table().fields table and it is empty as well 11:13 kabou what elementary mistake am I making here? 11:13 kabou btw the pos, node, etc that the callback receives seem to be correct 11:14 kabou it is just that I cannot seem to find back whatever gets defined at nod registration 11:25 kabou hrrrm 11:26 kabou I can get all the fileds back from minetest.registered_nodes[node.name] 11:26 kabou but not from get_meat(pos) 11:26 * kabou confused 11:26 ROllerozxa extra node definition keys is not the same as node meta 11:29 kabou so node meat can only ever be set by minetest.get_meta():set(key, val)  ? 11:29 ROllerozxa yeah. 11:29 kabou or else it is never there? 11:29 ROllerozxa extra node definitions are global for that node type in particular, node meta is specific for each node placed in the world. you'll need to initialise the node's metadata with on_construct 11:31 kabou makes sense in a way, otherwise there'd be a lot of data duplication when every instance of node meta carried the node defs 11:33 kabou anyway tnx for confirming this 11:38 erlehmann luk3yx what do you think of my movement prediction without SSCSM idea? https://forum.minetest.net/viewtopic.php?f=7&p=406922#p406922 11:47 Andrew luk said sscsm is needed for AmongTest 12:14 erlehmann Andrew most people say they wand sscsm for movement prediction or something else that needs to be responsive 12:21 rubenwardy petition to stop naming things *Test 12:28 erlehmann want 12:29 erlehmann rubenwardy you really dropped the ball by not naming ContentDB … ContentTest ^^ 12:29 kabou no more game writeup conTests? 12:30 erlehmann no protest! 12:31 erlehmann kabou node meta should be renamed to node meat hehe 12:34 kabou "node meat data is a table with filets" 12:34 kabou yumm 12:50 kabou if I do minetest.get_node_timer(pos), , when does the NodeTimerRef get free'd / garbage collected? 12:50 kabou when on_timer callback returns false? 12:52 kabou I call ' local timer = minetest.get_node_timer(pos) ' inside an if block inside an auxiliary function 12:53 kabou not sure what the lifetime of local timer is, surely that is not the only ref to the NodeTimerRef object? 13:00 Andrew erlehmann: Oh, we need it for venting 13:01 Andrew Needs to be really time responsive 13:01 Andrew Also, I can't think of any way to get Amonguscameras working in Minetest 13:10 MTDiscord I need sscsm for physics for blockbomber's ice. I want classic arcade ice... 13:12 kabou I need sscsm for access to wallets.  I want more bitcoins.. 13:18 MTDiscord Andrew, look https://forum.minetest.net/viewtopic.php?p=406931#p406931 13:18 erlehmann if I do minetest.get_node_timer(pos), , when does the NodeTimerRef get free'd / garbage collected? 13:18 erlehmann hahahahaha 13:18 erlehmann i recently had a node timer related memory leak 13:19 erlehmann you should make *really* sure that you need those node timers 13:19 erlehmann and don't make like, 40k of them 13:19 erlehmann or you'll have laggy minetest, like me 13:19 kabou yeah I read, and now I'm using it myself (albeit in moderation) and it got me wondering 13:19 erlehmann so the thing is 13:19 erlehmann i suspect node timers are actually stored in the mapblock 13:19 erlehmann not sure 13:19 erlehmann but after the fixed code was used 13:19 kabou use the source luke 13:19 erlehmann we still had all the fucky node timers 13:19 erlehmann that slowed everything down 13:19 kabou hahaha 13:20 erlehmann makes sense really, otherwise everything would fire or stop moving once you reload the world 13:20 erlehmann yeah so good that i caught it in review 13:20 erlehmann fixed corafire is live on oysterity 13:20 kabou should be properly documented if they are part of node metadata 13:20 kabou hidden node metadata 13:21 kabou oh wait maybe its part of the hidden documentation 13:21 erlehmann yes do not rely on anything 13:22 erlehmann or you'll fall for the oldest joke in minetest 13:22 erlehmann is it undocumented? if you are relying on it, you may fall victim to the API rugpull! 13:22 erlehmann very funny! 13:22 erlehmann but seriously, just don't create tens of thousands of timers and you'll be ok 13:23 erlehmann and don't give users the means to do that either 13:23 erlehmann fire was an extremely stupid case because it is a node that copies itself 13:23 kabou oh well, just focus on improving the documentation, that't nail the rug to the floors 13:23 kabou you are part of minetest-docs, no? 13:23 erlehmann i think you are trying to guilt me into documenting node timers lol 13:24 kabou nono just making "constructive suggestions" 13:24 kabou all in good spirits, chap 13:24 erlehmann i bet rubenwardy has done that better than i did, already 13:24 Andrew btw, luk3yx is in new zealand, so he is asleep 13:24 erlehmann or someone else 13:27 Andrew @MisterE, thanks! 13:27 kabou nah it's not documented very well 13:27 Andrew Well I'd need wireless digiline or just bake wireless in for those purposes, but meh 13:27 kabou https://minetest.gitlab.io/minetest/class-reference/#nodetimerref 13:29 Andrew How does Minetest transfer passwords around? 13:29 kabou some knowledge of the implementation beyond the mere interface can be useful 13:29 MTDiscord andrew: it doesnt, it uses srp 13:30 Andrew Well, that was my question 13:30 Andrew So thanks :D 13:30 Andrew MITM would be hard, I guess 13:42 rubenwardy if I do minetest.get_node_timer(pos), , when does the NodeTimerRef get free'd / garbage collected? 13:42 rubenwardy When you stop holding a reference to it 13:43 kabou rubenwardy it's not immediately clear to me what is holding references to it 13:43 rubenwardy local timer = minetest.get_node_timer(pos) 13:43 rubenwardy timer is a reference 13:43 erlehmann i guess the best advice is not “do not create 40k timers”, but “do not juggle them all at the same time” 13:43 kabou yeah, but that is located in an auxilary function 13:44 erlehmann scope? 13:44 erlehmann > local 13:44 erlehmann kabou can you tell us what you are trying to do 13:44 erlehmann so we can evaluate if node timers are indeed the correct thing here 13:44 kabou yeah it's a local inside an if block inside a function that is not inside the node def that has the callback 13:45 erlehmann and not minetest.after() or ABMs 13:45 * Andrew is the imposter 13:45 kabou oh I am making a composter block 13:45 erlehmann oh? 13:45 kabou after the last level of compost has been formed, it waits for a second to become ready to give bone meal 13:46 erlehmann that does not seem too bad 13:46 kabou I figured a timer was the way to go here 13:46 erlehmann hmmm 13:46 erlehmann i'd use minetest.after(), but i guess then it is unreliable on server shutdown 13:47 erlehmann and it does not matter ultimately ig 13:47 erlehmann because composters will be rare 13:47 rubenwardy kabou: ok, so once the reference is dropped then it'll be deleted when the GC runs 13:47 rubenwardy there's no need to worry about this really 13:48 erlehmann yeah, unless some fun-hater blankets your world in composters AND manages to fill them all at the same time 13:48 kabou not worried, just wondering 13:48 rubenwardy Time makes sense there 13:48 rubenwardy minetest.after doesn't make sense 13:48 erlehmann rubenwardy why? 13:48 rubenwardy because it doesn't persist after restarts 13:48 erlehmann we use it for nether portal destruction 13:48 rubenwardy and it's not related to a position either 13:48 erlehmann i guess i have to rewrite the nether portal despawning algorithm then 13:48 erlehmann to use node timers 13:49 rubenwardy oh, and .after won't work if the map block unloads 13:49 erlehmann otherwise crashing the server while the portal is despawning gives half a portal 13:49 rubenwardy unless you force load the block 13:49 erlehmann oh, i did not know THAT 13:49 erlehmann thanks! 13:49 kabou rubn 13:50 erlehmann rubenwardy oh wait, mesecons use minetest.after() right? 13:50 erlehmann i have a feeling you have given me the piece of the puzzle to solve the creation of the elusive half-piston 13:50 erlehmann or these cursed pistons 13:51 erlehmann that stay extended 13:51 kabou rubenwardy but I was wondering if my get_node_timer ref is in a local var inside an if block in a local function 13:51 kabou what holds the ref outside of the function call? 13:51 erlehmann i wonder if these were made through stratetic mapblock unloading https://forum.minetest.net/download/file.php?id=25617&sid=8119ebfb2b8603179bb6bb325a2d0fac 13:53 kabou the function is defined outside the register_node defs 13:53 kabou but it is called from within the register_node defs, and so is the on_timer callback 13:54 erlehmann o.0 13:54 erlehmann show code pls 13:54 kabou I'll admit that I'm not much of a lua wizzard and I'm oblivious to its darkest innerest scoping mechanics 13:55 rubenwardy kabou: don't worry, the timer itself isn't stored in the NodeTimerRef 13:55 rubenwardy NodeTimerRef is just a Lua API, the object can be destructed without breaking the timer 13:56 rubenwardy All NodeTimerRef has is a `map` reference, and a position 13:56 kabou allright, tnx.  So what does keep the timer refs and frees / garbage collects it? 13:56 rubenwardy and then a bunch of method 13:56 rubenwardy Lua 13:56 rubenwardy Lua is responsible for ensuring that variables are deleted when they're no longer referenced, as part of the GC 13:57 kabou yeah I understand, I was just wondering how minetest handle the actual timer lifetime 13:57 rubenwardy ah, well that's part of the map code. I imagine it'll delete the timer when it expires and runs, and isn't renewed 13:58 kabou indeed this has nothingto do with lua I guess 13:58 rubenwardy C++ isn't GCed, it uses explicit `delete` 13:59 kabou yeah, it got me wondering when minclonia devs encountered huge lags from out of large fire spreadings 13:59 kabou they used timers to control the fire 14:00 kabou ask erlehmann 14:00 erlehmann well, mineclone2 fires used timers, but also had high CPU load 14:00 kabou so when I was using a timer myself and reading the docs it puzzled me a bit 14:00 erlehmann so cora optimized them so you could have bigger fires 14:00 erlehmann and that made them fill the RAM with timers 14:01 erlehmann because each fire used a timer to figure out when it should extinguish 14:01 erlehmann we are now using an ABM 14:01 erlehmann because no one really cares that the fire node lives exactly so and so long 14:02 erlehmann 40k nodes with ABMs on them do not need additional RAM, obviously 14:02 rubenwardy ~book timer 14:02 rubenwardy !book timer 14:02 MinetestBot rubenwardy: Node Timers and ABMs - https://rubenwardy.com/minetest_modding_book//en/map/timers.html 14:02 erlehmann > They have a high CPU overhead, but a low memory and storage overhead. 14:02 erlehmann i think the „high” is relative 14:03 erlehmann ABM satiation is a thing, obviously 14:03 rubenwardy that it is 14:03 erlehmann but mcl mods spam ABMs on all kinds of nodes to spawn mobs there 14:03 erlehmann and the only time it really is a problem for me is when i am in a jungle because the vine growing ABM seems to be a beast 14:03 rubenwardy some people swear on only using ABMs 14:04 erlehmann > Burnin’: Make every air node catch on fire. (Tip: “air” and “fire:basic_flame”). Warning: expect the game to crash. 14:04 erlehmann lol 14:04 kabou 2022-02-15 14:42:16: WARNING[Server]: active block modifiers took 215ms (processed 315 of 485 active blocks) 14:04 kabou 2022-02-15 14:42:17: WARNING[Server]: active block modifiers took 211ms (processed 330 of 485 active blocks) 14:04 kabou 2022-02-15 14:42:18: WARNING[Server]: active block modifiers took 204ms (processed 215 of 485 active blocks) 14:04 kabou 2022-02-15 14:42:19: WARNING[Server]: active block modifiers took 205ms (processed 344 of 485 active blocks) 14:04 kabou 2022-02-15 14:42:20: WARNING[Server]: active block modifiers took 219ms (processed 286 of 485 active blocks) 14:04 erlehmann now i wonder if minetest_game fire uses timers 14:04 kabou times a zillion 14:04 erlehmann kicked for ABM satiation 14:05 GNUHacker F 14:05 erlehmann kabou the thing is, obviously, we only use ABMs for stuff where it does not matter 14:05 erlehmann like if the fire does not go out right now because of lag, well, it will not contribute to further lag. it will go out later. 14:05 rubenwardy Also, one drawback that isn't mentioned is that Node Timers can be unreliable, as they don't actively search. So you can end up in situations where a timer isn't running on a node 14:05 erlehmann or grass spread on dirt 14:05 erlehmann oh, i did not know! 14:05 rubenwardy For things like furnaces, this isn't a problem 14:05 erlehmann so what would be such a situation? i have never seen a furnace bug out on me 14:06 erlehmann i mean … how would i even notice. 14:06 rubenwardy not entirely sure 14:06 rubenwardy it could never be started, for example if an LVM places the node that needs it 14:06 erlehmann oh yeah, but that's kinda obvious if you use LVMs 14:06 rubenwardy LVMs don't run callbacks or generation notifications 14:07 erlehmann funny LVM story, i have a nether roof fix in mineclonia. before i limited ores to only generate under the nether roof, the roof was LIT. 14:08 erlehmann reason probably glowstone being generated and then being zapped away by an LVM mapgen function 14:08 erlehmann it does not automatically update the lighting AFAIK 14:08 erlehmann whereas set_node() gets you a light update 14:08 erlehmann (but that would be a very slow way to clear an entire area) 14:13 erlehmann rubenwardy am i correct that this fix kay27 proposed might lead to a half-despawned portal? https://git.minetest.land/MineClone5/MineClone5/issues/202#issuecomment-32335 14:14 erlehmann (i just want to know if it makes sense to use node timers here) 14:15 rubenwardy yeah, if the map unloads or the server restarts then it will be lost 14:15 rubenwardy why not just use a for loop? 14:15 rubenwardy rather than recursion 14:15 erlehmann stack overflow 14:15 rubenwardy you can use minetest.bulk_set_node 14:15 erlehmann oh you mean, count the nodes, then despawn them? 14:15 erlehmann the despawning effect is cool 14:15 rubenwardy ah 14:15 erlehmann i kinda wanna keep it 14:16 erlehmann given that the previous recursive solution was a stuck overflow on, i think we'll live with the consequences of half-despawned portals for a while 14:16 erlehmann and i'll make a ticket to use node timers 14:17 erlehmann thank you! 14:17 kabou erlehmann you are too sentimental and attached to your sentiments to boot 14:18 kabou remind me to give you constructive suggestions to use minetest.bulk_set_node 14:18 erlehmann kabou bc it's a cool effect with an artifact if the server crashes? 14:18 erlehmann i think using node timers on the nodes would be the solution to keep the cool effect 14:18 erlehmann i mean making corrupted portals in-game is kinda like my thing 14:19 erlehmann kabou, see here ;) https://forum.minetest.net/viewtopic.php?p=406359&sid=8119ebfb2b8603179bb6bb325a2d0fac#p406359 14:19 kabou not sure if meesed up world is a design goal for mineclone 14:19 erlehmann i'd say it is an unavoidable side effect of the way it is developed 14:20 erlehmann in this case, kay27 added screwdriver support to portal nodes for creative 14:20 erlehmann i did not tell him it also worked in survival 14:20 erlehmann because it was too funny 14:20 erlehmann he figured it out after some time 14:20 erlehmann :D 14:20 kabou yikes even the redering is messed up, look at that bottom portal node 14:21 erlehmann cursed yes 14:21 erlehmann i never noticed hehe 14:24 erlehmann rubenwardy any idea how much overhead a single timer has in terms of RAM? 14:24 rubenwardy probably not that much 14:39 erlehmann rubenwardy can node timers be used to make nodes update “in lockstep”? 14:39 erlehmann like for anxiety machines 14:42 Andrew GNUHacker: Hi there 14:42 GNUHacker Andrew: hi, sup? 14:43 Andrew Oh just waving helol as I found you here :) 14:43 Andrew s/ol/lo/ 14:43 GNUHacker helol = hello + lol 14:43 Andrew lol 14:44 GNUHacker exactly 16:26 kabou meh, finicky lua 16:26 kabou doesn't like me building a table with node names as keys 16:27 kabou : is a reserved token 16:27 kabou have to [" "] all node names 16:42 Andrew Hi. I've got a random Minecraft map and I wanna convert it. I don't have Minecraft installed on my system in any way, and I would avoid it (nonfree software). Can I convert a .scheme into a WE file? 16:43 Andrew Wow, mcimport doesn't even mention that GTK is a dependency. Time to bloat my system hehe 16:52 Andrew the .schem files are big binary messes 16:58 GNUHacker Andrew: you can convert a mc map 16:59 GNUHacker but idk what format is .scheme 16:59 GNUHacker it is not mc i think 16:59 Andrew It is 17:00 Andrew I'm trying to convert the minecraft schematic to a minecraft world 17:00 Andrew Then I can use https://github.com/ShadowNinja/MC2MT 17:00 ROllerozxa By .scheme do you mean Minecraft .schematic files? If so you'd need to import them with MCEdit and then save it as a normal Minecraft world. 17:01 ROllerozxa (MCEdit is an open source program btw, there's several versions of it but any one should work) 17:03 Andrew Well, it requries a bunch of GTK stuff, and I'm not feeling like building that 17:03 Andrew And it just fails compilation on Gentoo systems 17:03 GNUHacker mcedit only work on Windows i think, dont work with libre software 17:03 Andrew It has a GNU/"Linux" version 17:03 ROllerozxa MCEdit is literally written in Python. 17:03 GNUHacker oh, idk 17:04 Andrew It is free software, GNUHacker 17:04 Andrew And it works with GNU/Linux, at least it says so 17:04 Andrew But I can't get it to compile 17:04 Andrew It's only tested on Ubuntu 17:04 GNUHacker nice 17:05 Andrew not nice lol 17:05 Andrew I can't compile it 17:05 GNUHacker gtk? 17:06 sfan5 does mcedit even still exist 17:06 Andrew GTK I just compiled fine, but their install script is confusing 17:06 sfan5 the legacy version has been basically broken for some time 17:06 Andrew sfan5: Apparantly so 17:06 sfan5 and idk about the new version 17:11 ROllerozxa Oh wow, MCEdit does look quite dead. Both Unified and 2 still only support Python 2 and neither support anything above 1.12. 17:12 Andrew trying to pip install amulet_map_editor 17:12 Andrew might as well do the trick 17:13 Andrew It's a small schematic (Just The Skeld), no reason to compile the progam 17:13 GNUHacker just build it lol 17:14 Andrew Well, they don't provide good docs 17:14 Andrew It's mostly a python script being compiled with cythin 17:15 Andrew s/in/on 17:15 GNUHacker you can write the doc lol 17:16 Andrew ... lol 17:43 Andrew I'd highly appreciate somebody helping me convert https://static.planetminecraft.com/files/resource_media/schematic/skeld.schem into MT WE, MT world, or MC world (order by preference) 17:45 Andrew I only know of that schematic, nothing else 17:54 erlehmann kabou this is what minetest.after() leads to https://git.minetest.land/attachments/f3bbae71-8958-458c-9934-ecea71449d3b 17:54 erlehmann i crashed the game while the portal was despawning 18:58 kabou erlehmann hmm yeah, that's what rubenwardy said 18:59 kabou I still think he was right in suggesting to use bul_set_node 18:59 kabou (friendly reminder and constructive suggestion) 19:00 kabou also, a portal is not some physical brane that pops in slowmotion 19:00 kabou it is metaphysical 19:00 kabou once you pop it, the magic is gone instantly 19:00 kabou its not worldly, hence not bound by worldly inertias 19:02 kabou if the portal has a list of all its portal nodes (should be made at portal creation) 19:02 erlehmann it will pop like a bubble! 19:02 kabou then it is a piece of cake to bulk remove 19:02 erlehmann nah, you can just count them 19:02 kabou it should not pop like a bubble 19:02 kabou why not keep a list? 19:03 kabou its the neat & tidy way to do it 19:03 erlehmann why would i keep a list of portal nodes instead of counting? 19:03 erlehmann you konw what, i'll give portal nodes a node timer 19:03 erlehmann and NOT activate it, HA! 19:03 erlehmann unless an adjacest obsidian is dug 19:04 Toothless I'm working on A capture the flag map I could use some help. 19:04 kabou 1. a list of all the obsidians of the frame 19:05 kabou 2 a list of all the portal nodes 19:05 kabou store it in the meta of one of the frame nodes 19:05 kabou every frame node has a reference to that special node 19:05 erlehmann what 19:05 erlehmann kabou this is not workable 19:06 erlehmann what if an obsidian frame node is part of multiple portals 19:06 kabou that ref then helps to determine that any frame node is part of a prtal 19:06 kabou have multiple refs? 19:06 kabou as long as there is one ref, you know that it is part of a portal 19:06 erlehmann i think your proposal leads to a brittle solution 19:07 erlehmann because any node in the game world can be replaced by something 19:07 kabou if a frame node is broken, handle all the refs it has in its met 19:07 erlehmann for example, if someone spawns a portal right into it 19:08 kabou how so? do you mean with overlapping frames? 19:08 kabou the nodes of the pre-existing frame get updated with extra refs to the new portal meta node 19:09 kabou if the frames do not touch, then they don't have to interact 19:13 erlehmann i think you are overengineering it 19:16 kabou oh well 19:17 kabou a little preparation goes a long way in preventing escalating quagmires 19:18 kabou anyway, I don't care, it's all academic 19:18 kabou right now I'm more concerned with the composter 19:20 erlehmann well 19:20 erlehmann i am right now doing the following 19:20 erlehmann hmmm 19:20 erlehmann probably crashing? 19:20 erlehmann i see 19:30 MinetestBot 02[git] 04baytuch -> 03minetest/minetest_game: Fix translation of "cotton" for UK and RU locales 13240f9a6 https://github.com/minetest/minetest_game/commit/240f9a6a8527d71376839d9efac70db9a6dd6566 (152022-02-15T19:29:34Z) 22:38 erlehmann wait, are node timers super-unreliable maybe? 22:38 erlehmann i got this https://mister-muffin.de/p/_bZE.jpg 22:38 erlehmann when despawning portals using node timers 22:38 erlehmann i am disappointed 22:38 erlehmann rubenwardy, is it to be expected that node timers sometimes just fail to trigger? 22:41 kabou what is that? a portal cube? 22:41 kabou a frameless portal cube 22:48 erlehmann kabou i made a 23x23x23 hollow cube using worldedit and spawned a bunch of portals. then destroyed them. 22:48 erlehmann seems node timers can sometimes not fire 22:48 erlehmann how stupid is that 22:48 erlehmann :( 22:49 kabou could it be related to this: 22:49 kabou 2022-02-15 23:38:45: WARNING[Server]: active block modifiers took 213ms (processed 252 of 485 active blocks) 22:49 kabou abm have a time budget, maybe timers do too?