Time Nick Message 05:36 Luizsab Hello. I have a question about server&client. Is possible to load mods and texture from client? 05:36 sofar the client can not send textures to the server 05:37 sofar neither server nor client can currently send mods to each other 05:38 Chinchou That begs the question of how it happens that one can still play on a server when the client lacks the mods that the server is using. 05:38 Luizsab I know. If my client has the same mods and textures of the server, the world will be load more fast? 05:42 sofar mods are currently server only 05:42 sofar textures, models, sounds are sent to each client at login 05:42 sofar everything gets cached for subsequent logins on the server 05:44 Chinchou In other words, by "mods", you actually mean the Lua scripts. 05:44 Luizsab Is there any way to optimize the loading world? 05:46 Chinchou Hm... Does the client ignore existing assets when connecting to a server that uses them? 05:46 Chinchou Local installed copies, I mean, rather than the cache. 05:48 Luizsab No. But is very slow. I use it in a lan and is very very slow. If I start a clear world with default mods it is ok 05:51 Chinchou Luizsab, that makes it sound like you just have a bunch of big/slow mods you're using. There probably really isn't anything to be done to speed up loading in such a case. 05:53 Luizsab If I copy the world to client, it will be load faster? Although modifications by users? 05:55 Chinchou What? 05:56 Chinchou Sorry, I don't understand your second question. 05:56 Chinchou The world is server-side. Having a copy client-side will not affect connecting to the server. 05:58 Chinchou The loading times on the client are from loading the cached assets and logging in to the server - there's really no way to speed that up without throwing more CPU time at it. 06:01 Luizsab I understand. Thank you 06:03 Luizsab I really need more CPU, it is oldest PC 09:32 thePalin- Is there some list of "de facto standard" for api mods? 09:33 deltasquared thePalindrome: I'm not sure I understand what you mean 09:34 thePalindrome For instance, I need a mod that adds mobs for me to interact with, which one could I more reasonably assume people have? 09:35 deltasquared thePalindrome: oh right. well, I don't think such a list exists without having some kind of widespread data collection on mod installs 09:36 sfan5 well find one (or a few) that provide this api and check the forum topic to estimate its popularity 09:36 deltasquared my only guess would be to look at mob mods and see which ones they *appear* to use most often 09:36 thePalindrome Kindof figured 09:36 deltasquared short of opt-out data collection which I'm sure *loads* of people would just love to have :P 09:38 celeron55 most servers publish their list of mods 09:39 celeron55 i wonder if anyone has made any stats 09:40 deltasquared celeron55: then that one server I play on doesn't say which mods it has and doesn't give you privs for /mods 09:40 sfan5 i sometimes update the chart on the wiki 09:40 sfan5 https://wiki.minetest.net/File:Modsonservers.png 09:40 deltasquared sfan5: hehe, sometimes. I bet you jump for joy at that manual data entry :P 09:41 thePalindrome Neat 09:41 thePalindrome Mainly I'm just wanting to avoid depending on a mod that nobody "happens to have anyway" 09:42 deltasquared building_blocks and itemframes, I'll have to look at those 09:42 deltasquared thePalindrome: I do understand where you're coming from, but it's something you'd need data for, and that's where I can't help much 09:43 thePalindrome I know the itemsframes dev can't wait for the dynamic node texturing :P 09:44 thePalindrome I do find it interesting that the top 4 mods are the only ones with 50% usage, do people not use many mods? 09:50 sfan5 thePalindrome: here's the full stats updated just now: https://0x0.st/7VT.csv 09:51 thePalindrome Very nice 09:52 thePalindrome Alright, that lends credibility to my assumption, thanks 09:54 deltasquared dynamic node texturing? this a new thing in the dev version 09:54 sfan5 `doors` is more popular than `default` 🤔 09:59 thePalindrome Huh 09:59 thePalindrome deltasquared: wait, really? I know hardware coloring is, but texturing? 10:14 deltasquared thePalindrome: sorry, I meant to phrase it as a question 10:14 deltasquared I don't really know 10:14 deltasquared !mod itemframes 10:14 MinetestBot deltasquared: Item frames and pedestal [itemframes] by Zeg9 - https://forum.minetest.net/viewtopic.php?t=5600 10:14 thePalindrome Ah, my bad 10:14 thePalindrome Afaik it's still being worked on 10:15 deltasquared thePalindrome: I was playing around with support for changing the player's collisionbox on 0.5.0-dev, remarking how buggy it was at small sizes :P 10:16 deltasquared notably, "shrinking" yourself (I had combined it with viewmodel scaling and camera movement) and standing close but not right next to a block inhibited your jump ability 10:17 deltasquared sfan5: reminds me, after playing around with "shrinking" the player in said version I came to the conclusion that a wish list thing in the engine would be to move the player's base camera position relative to their model 10:17 sfan5 open a feature request on gh so it won't get forgotten 10:17 deltasquared sfan5: right, guess I better go fiddle with my credentials store again 10:18 deltasquared sfan5: so a feature request on github.com/minetest/minetest right, the core engine 10:19 sfan5 ye 10:19 deltasquared hmm, not sure if I still wanted a separate account for this stuff 10:19 MinetestBot 02[git] 04sfan5 -> 03minetest/minetest: ServerEnv: Clean up object lifecycle handling (#6414) 1304839f2 https://git.io/v5Qji (152017-09-15T10:19:01Z) 10:19 MinetestBot 02[git] 04SmallJoker -> 03minetest/minetest: Customizeable max breath for players (#6411) 13edbc533 https://git.io/v5QjP (152017-09-15T10:18:47Z) 10:19 deltasquared heh, customisable max breath? 10:19 * deltasquared imagines the HUD bar going crazy 10:21 deltasquared sfan5: just to be sure though, is the current camera position hardcoded? or is it related to the model somehow. 10:22 deltasquared just curious as it might change the phrasing of the request 10:22 sfan5 dunno 10:22 rubenwardy there's an eye offset ,iirc 10:23 deltasquared rubenwardy: yeah, but it's relative to the default position - a saner way would be to change the "default" position which is in turn relative to the cbox center (it looks like) 10:24 thePalindrome #5919 seems to be the marker for what's going on 10:24 deltasquared 3rd person for example swings the camera around behind the head, so to shrink the player you'd need to both change the camera position relative to cbox and be able to scale the "closeness to head" too 10:25 deltasquared is (discuss) a standard thing in the issues section to act as "request for comments" then 10:25 thePalindrome Huh, wonder why the bot didn't see that 10:28 deltasquared voxel area entities. damn. that looks like it'd need quite the non-trivial changeset 10:29 thePalindrome Indeed 10:29 thePalindrome But if implemented, opens up a lot of super duper cool stuff 10:29 thePalindrome the other game has a mod I like for moving airships 10:29 thePalindrome but imagine if you could walk on them too :D 10:29 rubenwardy it's not going to happen, unfortunately :'( 10:29 thePalindrome Oh? 10:29 deltasquared I don't really agree with the idea of implementing them though that is suggested - really, to avoid mishaps in the long run, code would have to be changed to break the assumption of a singleton world 10:30 deltasquared it'd likely involve API breaks all over the place 10:30 rubenwardy being realistic, it's way too big of a change 10:30 rubenwardy and that too 10:30 deltasquared like, everything in lua that currently accesses "the" world via the global minetest object would eventually either have to change or become obsolete 10:30 deltasquared either that or even more hacks 10:31 deltasquared needless to say, it would have been better if it had been there in the beginning, but this is not the case (and I don't have any hard feelings on that, either - don't let perfect be the enemy of the good etc.) 10:34 deltasquared !mod building_blocks 10:34 MinetestBot deltasquared: Building Blocks [] [building_blocks] by sdzen - https://forum.minetest.net/viewtopic.php?t=674 10:35 deltasquared sfan5: I'll get around to writing that PR as soon as I figure out how labels work 10:36 deltasquared unless it's like auto-assigned 10:36 deltasquared I'm not very accustomed to working on github 10:36 thePalindrome iirc you can't, a minetest repo admin has to 10:36 thePalindrome That may have changed since I added mine 10:37 deltasquared thePalindrome: that makes sense in a way, I'd just make it easier by making it fairly clear that it's a feature request 10:38 deltasquared but first, other obligations. 10:40 thePalindrome On a random note, is there a raytrace function? trying to write a handler for doing things to sections on a node 10:40 rubenwardy minetest.net/lua_api/L2699 10:41 rubenwardy minetest.net/lua_api/2699 10:41 sfan5 may i should add support for linking to individual functions to !api 10:41 deltasquared rubenwardy: so does that return like a list of nodes along the path 10:42 deltasquared also the line target in the redirect is broken 10:42 deltasquared I'll have to borrow that to do things with explosions 10:42 thePalindrome That gets me a reference to the node being selected, but I'd like to differentiate between e.g. "top half" and "bottom half" 10:51 thePalindrome I think I may be able to fake something and use line_of_sight, just wondering if there's a better way to do it 11:35 deltasquared sfan5: I'll probably have to file that feature request some other time. just had to deal with some IRL issues and I'm feeling rather frustrated now 11:35 thePalindrome I found it 11:35 thePalindrome minetest.pointed_thing_to_face_pos(puncher,pointed_thing) 11:35 deltasquared thePalindrome: what was that for 11:35 thePalindrome Take the y from that, subtract the node's position, then check positive 11:36 thePalindrome A method to detect if you click the top or bottom half of a block 11:37 thePalindrome Actually, that can detect any area within a node 11:37 thePalindrome As a bonus, you cna also determine the face from those values 11:49 thePalindrome So... I looked at the blame, the stairs mod added that function, to allow placing stairs upside down, ala the other game 11:49 thePalindrome Which was exactly what I was trying to do 11:52 deltasquared hah, I thought "the other block game" was just a one-off joke 11:52 thePalindrome I see it used fairly often :shrug: 11:52 deltasquared though I do find it being "it shall not be named" amusing 11:53 deltasquared hmm, would a distinct integer type in lua have killed to add... though I guess recursion depth limit testing should still be doable anyways 11:54 thePalindrome Well... Yeah 11:54 thePalindrome Lua is too weakly typed to have a "distinct integer" 11:55 deltasquared if (depth >= limit) return else ... end 11:55 deltasquared that should do it I guess 11:55 deltasquared even if depth or limit for some stupid reason were a float, still add a "whole" 1 each time 11:56 deltasquared well, I should say, a fractional value, they're all potentially floats internally 11:56 thePalindrome exactly :P 11:57 deltasquared now I'm just trying to think of the sanest way to round to a whole number 11:57 * deltasquared checks lua manual 11:57 thePalindrome Math.floor 11:57 thePalindrome or Math.ceil 11:57 thePalindrome or Math.round 11:57 thePalindrome depends on what you want :p 11:58 deltasquared ... oh, of course. I was just gonna use % given it's semantics (which I wasn't sure of) 11:58 thePalindrome I don't think Modulo guarentees a whole output 11:58 thePalindrome At least, mathematically it shoudl allow floats 11:59 thePalindrome Either way, Math.round'll do 11:59 deltasquared oh wait, I was wanting floor division, i.e. // 11:59 deltasquared or just the math.* as suggested 12:03 deltasquared it was only so I only get "integer" values before converting to a string - there was a "level" identifier registered into a block name 12:31 MinetestBot 02[git] 04DTA7 -> 03minetest/minetest: Add setting to display the itemstring after the tooltip in the invent… 13808ada1 https://git.io/v57YP (152017-09-15T12:31:32Z) 13:11 jas_ !server pizza 13:11 MinetestBot jas_: FREE PIZZA SERVER!! | 24.208.202.9 | Clients: 2/32, 0/3 | Version: 0.4.15 / minetest | Ping: 116ms 13:45 deltasquared hmm, if I wanted to create a variable in a mod's init.lua that was visible for the purposes of dofile(...) but then was "destroyed" at the end of init.lua, how would I do this 13:45 deltasquared considering dofile code doesn't check the enclosing scope for variables, I guess it'd have to be a temp global and set it to nil when done, but it technically still exists even if set to nil 13:55 thePalindrome Why does it need to be "destroyed?" 13:56 sfan5 deltasquared: you can return stuff from dofile 13:56 deltasquared thePalindrome: I would prefer that use of the name after it's supposed to be done with would cause an error of "not defined" vs an error where it's nil in another mod which accidentally uses the name 13:56 deltasquared sfan5: hmm, so maybe I could re-organise my code such that functions are "returned" in an object from dofile 13:56 sfan5 deltasquared: here's an example: https://github.com/minetest-mods/mesecons/blob/master/mesecons_fpga/init.lua#L4 // https://github.com/minetest-mods/mesecons/blob/master/mesecons_fpga/logic.lua#L210 13:57 deltasquared get_current_modname()... why da feck didn't I spot that 13:58 deltasquared shame one can't pass variables into a dofile chunk 13:58 deltasquared something like shell script's $ vars 13:58 ph3-der-loewe why not use a callback? 13:58 deltasquared ph3-der-loewe: for what 13:58 ph3-der-loewe dofile(...).register(x, y, z); 13:59 ph3-der-loewe if sfan5 is right you can return a callback or a table with stuff. 13:59 ph3-der-loewe like plugin interfaces do in gernal. 14:00 deltasquared ph3-der-loewe: I guess that'd work, it just took me a moment to invert the mental model to see how that'd work 14:00 ph3-der-loewe normally a plugin just returns a structure with same metadata and some callbacks. 14:01 ph3-der-loewe metadata like name, description, authro,... 14:01 deltasquared ph3-der-loewe: yes I can see how it'd work now 14:01 ph3-der-loewe and callbacks like register, unregister, run, ... 14:02 ph3-der-loewe this also allows to check the env before running code. 14:02 deltasquared A tad more complicated than I had originally envisioned, but it would encourage slightly cleaner internal design 14:02 ph3-der-loewe like loading all depends before running the init. 14:14 deltasquared thePalindrome: not a problem in any case - it appears that globals are special in that they can't hold nil - they become undefined again if you assign nil to them 14:15 rubenwardy false, nil is the same as undefined 14:15 rubenwardy global is just a table - _G 14:15 rubenwardy actually 14:21 deltasquared haha. for key,_ in pairs(_G) do _G[key] = nil end 14:21 deltasquared *explodes* 14:22 deltasquared I don't know what I expected else but it was amusing nonetheless 15:52 habeangur Krock: yes I didn't have on Linux again 15:52 habeangur Krock: s/again/too/ 16:49 deltasquared hmm, is there not a way to retrieve the item tooltip string for an existing item 16:49 deltasquared I can't see anything like a minetest.get_item_info() function in the API 16:49 rubenwardy stack:get_meta():get_string("description") or (stack:get_definition() and stack:get_definition().description) 16:49 rubenwardy warning, may return nil 16:50 rubenwardy h,,, 16:50 rubenwardy *hmm 16:50 rubenwardy actually 16:50 rubenwardy stack:get_meta():get_string("description") or (stack:get_definition() and stack:get_definition().description) or stack:get_name() 16:50 rubenwardy this should probably be a method, tbh 16:52 deltasquared rubenwardy: I should have phrased more differently. I meant something like get_item_info("default:cobble"), this is at init time 16:52 rubenwardy minetest.registered_items["default:cobble"] 16:52 rubenwardy and then .description# 16:52 rubenwardy so minetest.registered_items["default:cobble"].description 16:53 rubenwardy that will crash if default:cobble isn't defined 16:53 deltasquared rubenwardy: I figured. 16:53 rubenwardy so make sure you depend on default 16:53 deltasquared oh, I always do 16:53 deltasquared I have seen some mods which seem to neglect that 16:53 rubenwardy you shouldn't unless you need to 16:53 deltasquared rubenwardy: correction, I do if I reference default: 16:53 rubenwardy only depend on default if you need to depend on default - it's just another mod 16:53 rubenwardy ah 16:54 * deltasquared checks the actual lua_api.txt 16:54 rubenwardy well, I'd also consider not depending on a default node if possible 16:54 deltasquared rubenwardy: it's not a hard depends, default:cobble was an example 16:55 deltasquared in the context of what I can doing the code doesn't particularly care what blocks it's told to look up as long as they exist 16:55 deltasquared *what I am doing 16:57 deltasquared rubenwardy: so the entries in the registered_nodes table say, they're basically the definitions passed in to register_node() 16:57 rubenwardy yes 16:57 rubenwardy and also from craftitems and tools 16:57 deltasquared righty. 16:58 deltasquared right, I must be off now, dinner time. cheers for the assistance 19:43 Errante Hello guys. Im trying to code a mod which place a node back when digger do not have money, but I dont know how to take item back since Im using register_on_dignode. There would be a better way for doing this? 19:44 sfan5 pretty sure you can return false from that callback to abort it 19:47 Errante does on_placenode also workthat way? 19:47 sfan5 !api 19:47 MinetestBot Someone thinks you should read the API docs, please go to: https://github.com/minetest/minetest/blob/master/doc/lua_api.txt 19:48 sfan5 they should be able to give you a definite answer 19:49 Errante doesnt work 19:49 Errante Ive read before coming here 19:51 Errante register_on_dignode(function()if player.balance >= 2 then return true else return false end) 19:52 Errante lua_api says I should return true to abort 19:52 Errante and not to to dignode, but to placenode 19:53 Errante it seens dignode doesnt have a abort 19:53 Errante neither dignode 19:56 Errante on_placenode, I had to remove_node(pos) then return true to "abort" 19:57 Errante but on_dignode, I need to set_node(pos,oldnode) and to remove it from players's inventory 19:58 sfan5 if you want to prevent placing use the protection callback thingy 20:03 Errante sfan5: whats that? 20:04 Krock local old_is_protected = minetest.is_protected 20:04 Krock minetest.is_protected = function(pos, playername) do stuff here, use old_is_protected as fallback end) 20:05 Krock however, this only works for players, not for set_node/remove_node 20:06 Errante well, my question is how do I revert a dignode inside register_on_dignode 20:07 Errante Ive tried local inv=digger:get_inventory() local taken=inv:remove_item(oldnode) minetest.set_node(pos,taken) 20:08 Errante but now remove_item complains its not a string 20:08 rubenwardy oldnode.name 20:08 Errante xD 20:09 sfan5 you shouldn't revert it like this 20:09 Errante ... 20:09 sfan5 just use is_protected 20:09 rubenwardy It's say that's more of an abuse 20:10 Errante Sorry, but I cant get to understand how it does apply tomy problem 20:10 rubenwardy as other mods may rely on is_protect being for protection 20:10 rubenwardy *I'd say 20:10 sfan5 the problem with the other approach is that instead of preventing digging you're undoing it 20:10 sfan5 which is suboptimal 20:11 rubenwardy didn't paramat close an issue about this? 20:11 sfan5 idk 20:11 rubenwardy Errante, how many nodes to you need to prevent digging on 20:11 rubenwardy types that is 20:11 Errante every node 20:12 rubenwardy ah 20:12 rubenwardy https://github.com/minetest/minetest/issues/3107 20:12 rubenwardy not really related 20:13 rubenwardy heh, using minetest.is_protect would probably give the best effect for the least cost 20:14 rubenwardy minetest.net/lua_api/3142 20:14 sfan5 while it's not the really the intended purpose it's the best solution really 20:35 Errante woow 20:35 Errante thx guys 20:52 deltasquared woo, finally. https://github.com/thetaepsilon/mt_compressed_blocks 20:53 deltasquared welp guess job for tomorrow is forum registration, I can go chuck it on there 20:53 deltasquared also sort out that "modns" thing in there. 20:53 deltasquared *I need to sort 21:11 namex hello 21:12 namex i dont see server list in my client, only on site 21:12 sfan5 client version? 21:12 namex newest 21:12 sfan5 so 0.4.16 21:12 sfan5 any error in the log file? 21:13 namex no errors 21:13 namex okay 21:13 namex now i have list 21:14 namex thanks 21:16 deltasquared sfan5: dodgy 'net, apparently. -_- 21:16 deltasquared if only all those little issues could fix themselves that easily 21:35 Fixer jas_: i see this problem with caverealms https://i.imgur.com/DxLjzOX.png 21:36 Fixer jas_: what caverealms are you using? newest? any changes to it? 21:59 Gael-de-Sailly hi 21:59 Gael-de-Sailly I've not disappeared :) 22:31 Fixer hi 22:31 Fixer welcome