Time Nick Message 03:30 ghoti Hi all. I have some unknown nodes in the ground from rendering before I removed some mods. Without reinstalling all the mods, is there any way I can find out what the unknown nodes are supposed to be, without reinstalling mods I almost certainly don't want? Their previous names no longer show up in debug mode. 06:11 SoylentCow you should be able to, theoretically, find their names, because if you would reinstal the mod, they would come back. but i suppose if you don't want to reinstall the mod, 06:12 SoylentCow you may have to install an inspector mod of some kind 06:13 SoylentCow perhaps worldedit inspector can do this, i simply don't know, but it seems like something very doable 06:22 Follpvosten[m] ...when you click on them, the chat will tell you like "unknown node mod:node" in red text 06:22 Follpvosten[m] Left click that is 06:42 bobbertson hey there 06:44 bobbertson So I'm writing a mod to let users queue youtube songs that utilizes a youtube-dl python component to get songs and then sends it via minetest.dynamic_add_media, but I'm really struggling with setting up a socket from the minetest mod to the python component to communicate due to unfamiliarity with lua and the sandbox sort of secure environment where it doesn't want me to be able to acquire luasocket, can anyone help? 06:48 bobbertson If anyone even uses this channel that is 06:52 Hawk777 I’m not super-familiar with Minetest modding, but wouldn’t it make sense to just make your mod non-secure so it must not run in the sandbox? After all, if your users already trust you enough to run your separate Python code, which can do anything it wants, then the Lua sandbox isn’t really accomplishing anything. 06:52 bobbertson i did do that 06:53 bobbertson but i'm quite lost still lol 06:53 bobbertson basically how to run functions AFTER init so for example users can do /queue_song search_term_here and it would have to use the socket to send that out to the python component 06:54 bobbertson past init 06:54 bobbertson it's mostly just me being unfamiliar with lua i guess 06:54 Hawk777 I think you need minetest.register_chatcommand. 06:54 bobbertson ya i got that part down 06:55 bobbertson but idk how i can possibly use the socket i setup in init 06:55 bobbertson later on 06:55 bobbertson like a global or something 06:55 Hawk777 Oh. Ugly, but put it in a global variable? 06:55 bobbertson can functions be global? 06:56 Hawk777 Well, they are by default, but I don’t think that’s quite what you want. 06:56 Hawk777 It’s the socket that you need to hang onto, not some function. 06:57 Hawk777 If your init function and your chatcommand function are in the same .lua file, then pretty sure you should just be able to assign to a variable in the init function and use the value later in the chatcommand function. 06:58 Hawk777 As long as you don’t use “local” inside the init function, you get a global variable. 07:02 bobbertson how am i even supposed to require say luasocket within a minetest mod 07:02 bobbertson i don't think i'm doing it right 07:03 Hawk777 Oh, I thought you had already managed to create a socket but were having trouble passing it from an init function to a chatcommand function. 07:04 bobbertson idk i keep messing around with stuff 07:04 bobbertson i have no idea what i'm doing tbh 07:04 Hawk777 I don’t think you’re going to be able to use Luasocket from a Minetest mod. 07:04 bobbertson i'm getting a complaint about the socket module not being found but 'lua -l socket' works from cmd 07:05 bobbertson adv_chat and the irc mod do it 07:05 bobbertson with luasocket 07:05 Hawk777 Oh. Then… copy how they do it? 07:05 bobbertson im trying to understand how adv_chat does it 07:05 bobbertson pcall(function() socket = env.require"socket" end) 07:05 bobbertson build_bridge = (socket and build_socket_bridge) or build_file_bridge 07:06 bobbertson how else could i do something with a socket? 07:06 bobbertson would be nice if there was a socket API like there is an HTTP one 07:06 Hawk777 Huh, funny you should mention that. Have you considered having your Python code listen on a port for HTTP requests? It’s a bit icky, but it might be easier. 07:07 bobbertson ya thought about it 07:07 bobbertson want to do that as a last resort 07:08 bobbertson because would have to poll it and stuff 07:08 Hawk777 So what is failing with your code right now? 07:08 bobbertson "..\minetest-5.3.0-win64\bin\..\mods\youtube_queue\init.lua:9: module 'socket' not found:" 07:08 Hawk777 Can you pastebin your code? 07:08 bobbertson mhm 07:09 bobbertson beware its a huge mess because im really messing around 07:09 Hawk777 Oh, also, adv_chat has a backup, from looking at its source, it doesn’t appear to *require* luasocket, it can also use files. 07:09 Hawk777 So are you certain that your adv_chat install is really using sockets? 07:10 bobbertson https://pastebin.com/3vE21aXn 07:10 bobbertson possibly not lol i haven't really gotten it to work at all for the bridge part 07:10 bobbertson but didn't need it 07:11 bobbertson im starting to think the IRC mod doesn't use it at all because it says you need luasocket but the code doesn't seem to reference it at all rip 07:13 bobbertson if nobody has any ideas ill just switch over to using the HTTP stuff 07:13 Hawk777 On the IRC mod, everything that uses sockets is in the submodule. 07:14 Hawk777 That may be why you can’t find it, if you didn’t get the submodule. 07:14 bobbertson ah you are correct 07:14 Hawk777 You could also just use files. 07:14 bobbertson didn't notice it had a submodule 07:14 bobbertson ya i was thinking of just reading from the chat log locally 07:14 bobbertson and doing things that way 07:14 bobbertson since the youtube-dl python part is made to run on the same server 07:15 Hawk777 Oh yeah, if the chat is logged, Python code could just watch that log file. 07:15 Hawk777 I was really meaning you could have your mod write commands into a file and then Python watch for that file to be created and execute the commands—use files as a communication mechanism. 07:16 Hawk777 The “good” way would be to use inotify (or whatever the equivalent is in Windows if you care about that, there might be some cross-platform Python library for it); the quick-and-dirty way would just be to sit in a loop doing sleep(1) and then check if the file exists. 07:20 bobbertson do you know how to enable chat logs? 07:20 bobbertson i thought it already did it to a file but i guess not 07:20 bobbertson actually, shoot 07:21 bobbertson id still have to poll the python bit to get the new songs queued and stuff 07:21 bobbertson ill just do HTTP api 07:58 bobbertson seems like i cant use request_http_api() outside init too? 08:17 bobbertson i think i'm getting it figured out 09:50 bobbertson yesssssss i got a basic thing working finally 09:50 bobbertson thanks for the help Hawk777 :D 11:34 Andrey01 I just want to clarify, is 'X' axis pitch or roll? The lua_api.txt says pitch, however, when I try to rotate an object around X, it starts rotating around its longitudial axis and this is actually roll vice versa, not pitch 11:35 Andrey01 is this really mistake in the doc? 15:24 hisforever Hi is there a way to get rid of dark places on land? I've tried world edit and it dosen't work? 15:25 tango_ what are dark places? 15:26 hisforever dark patches on buildings and land 15:27 hisforever I think there is an app to help correct lighting 15:31 Krock_ !mod fixlight 15:31 MinetestBot Krock_: There are no results for this query :( 15:32 Krock_ worldedit //fixlight perhaps 15:38 hisforever thanks Krock This seemed to work //pos1 set //pos2 then //set air that took all the dark patches 15:39 Krock_ !next 15:39 MinetestBot Another satisfied customer. Next! 17:02 Andrey01 I want to clarify, does anybody know from which global half-axis does object yaw get counted off? 17:02 Andrey01 perhaps from +Z? 17:23 Krock_ Andrey01: see graphics here https://dev.minetest.net/Player 17:23 Krock_ Z towards -X 17:23 Andrey01 Also other question: in which sequence does set_rotation() implement rotations around three axises? ZXY or anyhow else? 17:24 Krock_ X Y Z 17:24 Krock_ "* `rot` is a vector (radians). X is pitch (elevation), Y is yaw (heading) and Z is roll (bank)." 17:37 Andrey01 Krock, I have still question: if the coords of two vectors are known and they starts from some point, I can know angle between them without problems by means of vector.angle, but how do I get rotation vector? 17:38 Krock_ same as vector.angle no? 17:39 Andrey01 no, this no, rotation vector in radians 17:39 Krock_ x = / math.pi * 180. same for y and z 17:39 Krock_ * x = x / math.pi * 180 17:39 Andrey01 hmm 17:40 Krock_ converts it to degrees 17:40 Krock_ and if you want to rotate a vector, check those: https://github.com/minetest/minetest/blob/master/doc/lua_api.txt#L3156-L3168 17:40 Andrey01 Lua has already embedded math.deg() :p 17:40 Krock_ well then, it's the same 17:40 Andrey01 so it is unncessary to convert it by hand 17:43 Andrey01 'x =/' is equivalent to 'x = x /' as in c++? 17:44 Krock_ C/C++ and C# are 'x /= n' 17:44 Andrey01 what does '* x' mean also? 17:44 Krock example? 17:45 Andrey01 I don`t understand what you wrote in the beginning: "x = / math.pi * 180 ..." 17:45 Krock the asterisk (*) is a correction mark 17:45 Krock instead of "x = / math.pi * 180" I actually meant "x = x / math.pi * 180" 17:46 Andrey01 'math.pi * 180' is this converting to degrees, yes? 17:48 Krock no, 1 / math.pi * 180 is 17:52 Andrey01 thanks, in any case 18:44 Sires Hello any good tips on creating textures? I suck at that 18:57 Sires wai 18:57 Sires is this a proper grass texture: https://imgur.com/WzeDZ6E 18:57 Sires one sec wrong pic 18:57 Sires Here: https://imgur.com/undefined 18:57 Sires wait what 18:58 Sires https://imgur.com/a/PCT0oRt 18:58 Sires this one, this last one, does this grass look ok 19:00 sfan5 it's a bit very green 19:00 sfan5 but that depends on what kind of grass it's supposed to look like 19:00 Sires hmm 19:00 Sires I should be able to just apply some filter to make it less green I guess 19:05 Sires https://imgur.com/undefined 19:05 Sires damn 19:05 Sires one sec 19:05 Sires https://imgur.com/a/p3Qbrwc 19:05 Sires tried making a bit less green, idk if it worked 19:06 Sires https://imgur.com/a/hjWzmB9 19:06 Sires yet another attempt 19:12 adfeno Hi, what is the procedure to “unexplore” parts of the world, so that they can regenerate ? Which level database type allows for this cleanup (including disk space cleanup) ? 19:14 Krock there's a script that deletes entries from the sqlite3 database. dunno whether it also supports other backends 19:14 Sires I'm not sure if it frees space but take a look at: https://github.com/minetest/minetest/blob/master/doc/lua_api.txt#L5029 19:30 adfeno Truth is that for smail servers, to avoid the file getting bigger, it would be good to have a command that the admin could use (even if that would require manual insertion of coordinates) 19:31 adfeno I know that there is /deleteblocks but last time I checked it didn't make the file smaller. 19:40 sfan5 sqlite files do not automatically get smaller unless you run "VACUUM" on them while the server is off 19:44 adfeno Hm, I see… Thank you for this infomration :) 20:08 specing Any tips on how to implement movement in CSMs? I guess setPlayerControl would be overriden fast through input processing, perhaps I should fake key presses? (and trap relevant ones while CSM is doing its thing?) 20:13 cheapie adfeno: sqlite does have an auto-vacuum option, but I can't imagine the performance would be all that great: https://www.sqlite.org/pragma.html#pragma_auto_vacuum 20:45 adfeno cheapie: Ah I see. 20:45 adfeno Thank you all for the information. :)