Time Nick Message 11:49 bebebeko guys, it's is possible to get ObjectRef for node at some position? my case: i need get ObjectRef for node at position { x = 10, y = 10, z = 10 } and call set_nametag_attributes() method 11:50 sfan5 nodes are not objects so no you can't do that 11:51 bebebeko sfan5: oh sad news :( thank you again 11:52 sfan5 you can use the waypoint hud element to add a nametag in-world 12:01 bebebeko sfan5: I try to find some way to get something like that https://www.youtube.com/watch?v=to2BMSdGwlo 12:01 bebebeko waypoint hud element can help me? 12:05 sfan5 hm 12:05 sfan5 for that case you'd rather use an entity that displays the text 12:06 sfan5 nametags can give you text display, but not styled like in that video 12:09 bebebeko sfan5: okay, thank you, I'll research this way 12:14 rubenwardy I actually have some code that makes a fake ObjectRef for a node 12:14 rubenwardy it doesn't add any new engine functionality, but it allows you to refer to objects and nodes using a single interface 12:14 rubenwardy This is in conquer - I wanted it to be possible to say attack(ref) rather than attack_node and attack_object 13:25 fruitsnack Hey, how do I get current itemstack selected in hotbar? 13:28 fruitsnack nvm found it 13:38 NorKle 5 13:38 NorKle oops 13:38 NorKle hi 13:49 fruitsnack is there a way to store entity reference in an itemstack metadata? 13:49 rubenwardy there's not 13:50 rubenwardy you can make your own ID referencing mechanism 13:50 rubenwardy like, assign ids when creating entities 13:50 rubenwardy use them to track between loads 13:50 rubenwardy Minetest's built-in ids are intentionally not exposed to modding, as they are volatile 14:22 fruitsnack ok thanks 14:23 fruitsnack Another question, can I compare itemstacks, as in, are they the same objects and == them would properly return false or true? 14:23 fruitsnack I mean not two different itemstacks with same contents but a same reference to one itemstack 14:24 sfan5 that behaviour was recently(?) changed to compare contents 14:24 sfan5 so if you want a specific behaviour it's better to explicitly write out the checks you need 14:25 sfan5 uh wait, that wasn't merged #9880 14:25 ShadowBot https://github.com/minetest/minetest/issues/9880 -- LuaItemStack: Add __eq metamethod by ClobberXD 14:25 fruitsnack hm, how do I check then if the itemstack is indeed the same, not another itemstack with same contents? 14:25 rubenwardy you'd need to compare the location instead 14:27 fruitsnack hm, I plan on making a tool that spawns an entity that is active for an arbitrary amount of time, and continuously checks if the wielded stack is the same 14:27 sfan5 currently itemstack1 == itemstack2 will do that but I wouldn't rely on it 14:27 sfan5 uh in that case, you cannot expect get_wielded_item() to return the same reference 14:27 sfan5 s/reference/itemstack/ 14:28 fruitsnack yes, in that case the entity is removed 14:28 fruitsnack Or you mean it wouldnt return the same itemstack even if wielded itemstack didnt change? 14:28 sfan5 yes 14:29 sfan5 in fact I'm pretty sure calling get_wielded_item() twice will get you two different objects 14:29 fruitsnack hm, my own ID referencing mechanism with metadata IDs it is them 14:29 fruitsnack then* 14:31 bebebeko I correctly understand, there is no meta for entities? I need to create my own Lua tables for storing entity's metadata? 14:32 fruitsnack I think you can define custom fields directly in entity definition 14:32 fruitsnack and access/modify them in entity instances 14:33 rubenwardy bebebeko: staticdata is a string representation of an entity 14:33 rubenwardy ~book entit 14:33 rubenwardy !book entit 14:33 MinetestBot rubenwardy: Objects, Players, and Entities - https://rubenwardy.com/minetest_modding_book//en/map/objects.html 14:34 rubenwardy You'd need to serialize lua members into staticdata 14:34 rubenwardy the book has an example 14:34 bebebeko fruitsnack, rubenwardy thanks! 20:04 specing Hello 20:04 specing Any expert on digilines out here? 20:05 specing Does a digiline chest or digiline detector tube send its item info in a more usable format in addition to the string in event.msg? 20:05 specing or what is the most efficient way to parse that out in a luacontroller. string.split seems unavailable 20:05 specing not does event.msg.split(" ") work 20:10 calcul0n_ specing, i use this function : local s1 = string.find(stack, " ", 1, true) if s1 then return string.sub(stack, 1, s1-1), tonumber(string.sub(stack, s1, string.find(stack, " ", s1+1, true))) else return stack, 1 end 20:11 calcul0n_ (where stack is event.msg) 20:11 calcul0n_ it returns two values, name, count 20:11 specing excellent, I just discovered that string.find does work in a luacontroller 20:42 tarrie which is the best and popular mod for mobs? 20:44 calcul0n_ tenplus1's mobs_redo is probably the most popular 20:47 tarrie thx ill take a look 20:48 tarrie are mods server side too? do they require the client to have them? 21:05 Lone_Wolf @tarrie, mods are completely server-side, unless you're talking about client side mods, which are completely clientside 21:05 tarrie Lone_Wolf: wow thats really cool 21:06 tarrie it's my first day trying out minetest and im really impressed 21:06 Lone_Wolf If you haven't already you should check out https://content.minetest.net/ 21:07 Lone_Wolf If you see a mod you like you can open up Minetest and download the mod from the content menu 21:07 Lone_Wolf Or I guess download it from the site and extract into Minetest/mods/ 21:09 Lone_Wolf The site has a tag for mob/npc mods actually https://content.minetest.net/packages/?type=mod&page=1&tag=mobs 21:25 SoylentCow yah i haven't tried anything else lately because mobs_redo seems super-stable, and real easy to modify 21:25 SoylentCow and now it has mob_horse!!!