Time Nick Message 12:32 MinetestBot 02[git] 04SmallJoker -> 03minetest/minetest: Camera: Improve subpixel movement (#7319) 13d5d248c https://git.io/vpSCw (152018-05-12T12:30:52Z) 12:32 MinetestBot 02[git] 04SmallJoker -> 03minetest/minetest: Run detach callbacks on player leave 139dd432c https://git.io/vpSCr (152018-05-12T09:50:04Z) 12:51 andirc8000 is there a way to generate an endless forest? (is there such map generator?) 12:52 andirc8000 'flat' works but eventually if I walk far enough the forest ceases and desert/plains begins 12:53 andirc8000 'flat' works (after a few tries) but eventually * 12:54 Shara Do you want endless forest, or endless flat forest? 12:54 andirc8000 Shara: endless flat forest 12:54 andirc8000 no hills, cavities 12:55 Shara Then use flat and make something to deregister all other biomes? 12:55 andirc8000 Shara: what about 'deserts'? 12:55 Shara https://github.com/minetest/minetest/blob/master/doc/lua_api.txt#L821 12:56 Shara unregister them 12:56 Shara You could also make a mod that starts with clear_registered_biomes() then register a single biome that is forest 12:57 Shara then whichever mapgen you use, you'll only get that biome everywhere 12:58 * andirc8000 reading https://wiki.minetest.net/Biomes 12:58 Shara That's just a list of biomes. It won't help you change them 12:59 Shara lua_api is what you should read :) 12:59 andirc8000 Shara: ye but first I must understand what a biome is :) 12:59 Shara Ah, okay :) 13:28 edoput hello people 13:29 edoput is there anyone that can help me use the new settings api? 13:33 sfan5 what is that you need help with (specifically) 13:40 edoput yeah, I got a warning on using minetest.setting_get for my mod but the newer api is not described 13:41 edoput I've seen the lua_api.txt in master and the minetest.settings:get("bla") fails on getting the default setting 13:43 sfan5 it fails? 13:43 edoput it returns nil even if I've set a default on the value 13:44 sfan5 how are you doing that? 13:44 edoput the setteingtypes contains `statsd_port (Port of the receiving server) int 8125` 13:45 edoput but using minetest.settings:get("statsd_port") returns nil 13:45 edoput which is very strange 13:46 sfan5 I don't think settingtypes is read for the default value 13:46 sfan5 and this works with the old api? 13:46 edoput that's how I did for another mod using the previous api 13:47 edoput let me check 13:56 edoput yeah it works with the minetest.setting_get 13:56 edoput very puzzled 13:56 Krock to get default values, you'll need an entry in defaultsettings.cpp 13:57 Krock settingstypes.txt is only a visual help for the Advanced Settings menu 13:59 edoput I know the wiki is not to be trusted but that's the only thing that minetest.setting_get does http://dev.minetest.net/minetest.setting_get 13:59 edoput and I think is really important to have this 14:00 sfan5 !api 14:00 MinetestBot Someone thinks you should read the API docs, please go to: https://github.com/minetest/minetest/blob/master/doc/lua_api.txt 14:00 sfan5 ^ official reference 14:00 sfan5 (dev.minetest.net is also official, but you can only 100% rely on lua_api.txt) 14:01 edoput yeah I know but maybe there shouldn't be a warning to upgrade if the api is not compatible 14:01 sfan5 the thing is I haven't seen setting_get ever do this 14:02 sfan5 https://github.com/minetest/minetest/search?utf8=%E2%9C%93&q=settingtypes.txt&type= 14:02 sfan5 if you look here, none of the code responsible for the Lua API (that would be C++), is even aware of that file 14:08 cimbakahn Ok.   If you put a torch next to an ice brick it will melt.  What about lights?  Will lights make ice brick melt too? 14:08 edoput but that doesn't mean anything, it the api returns a table to the engine then it can read configuration 14:09 edoput and the fact that minetest.setting_get does exactly that is a sane way to configure mods 14:10 sfan5 but it doesn't 14:11 sfan5 unless you have some custom wrapper to make it behave like that, setting_get won't ever care about settingtypes.txt 14:12 edoput but it does 14:13 edoput I can submit a bug report with examples if you like 14:13 sfan5 please do 14:14 edoput and my saturday is gone, btw thank you for your help 14:24 Krock cimbakahn, it only melts next to lava IIRC 14:24 Krock however, this depends much on the mods which are installed 14:38 cimbakahn I decided to put a glo stone on top of one and it did not melt.  I remember from the past just sticking a torch on the ground right next to one would make it melt. 15:05 andirc8000 when can I register/deregister biomes in my mod in version 0.4.16? (I see that minetest.register_on_mapgen_init is available only in 0.4.18+)? 15:05 andirc8000 is it possible at all in 0.4.16? 15:05 andirc8000 ohh sorry it was 0.4.8+ 15:06 Krock you can clear all registered biomes 15:21 andirc8000 so where is the right place to register/deregister biomes (hopefully before the map is generated by the mapgen)? I tried: https://hastebin.com/uqeyotoveq.lua and the logfile appears to be empty e.g. no biomes are yet registered in 'minetest.register_on_mapgen_init' callback 15:21 andirc8000 didn't find this via googling either 15:26 Krock that's not how you use minetest.log. Replace it with minetest.log("action", "text foo bar covfefe") 15:28 Ruslan1 Hello 15:29 Krock hi Ruslan1 15:29 paramat andirc8000 there is a way, i'll explain. which forest biome do you want? 15:30 Ruslan1 !f 15:30 andirc8000 paramat: all of them 15:30 Ruslan1 !t 15:30 paramat so only forest biomes ok 15:31 andirc8000 paramat: e.g. I want only biomes of type: 'Coniferous forest' , 'Rainforest', 'Taiga', 'Jungle' and none other to exist in my generated world 15:32 andirc8000 paramat: so I want to remove biomes of all other types before the terrain is generated 15:32 paramat yes a mod with 'minetest.clear_registered_biomes()' as first line, then .. 15:33 andirc8000 paramat: or any other way to achieve the desired outcome (which is: I want only biomes of type: 'Coniferous forest' , 'Rainforest', 'Taiga', 'Jungle' and none other to exist in my world) 15:33 paramat hang on .. 15:34 paramat copy-paste the desired biome registrations from https://github.com/minetest/minetest_game/blob/18956c7f69bd7783b657b50201ab6938f3480282/mods/default/mapgen.lua#L534 15:34 paramat into your mod after the 'clear' 15:35 Krock andirc8000, btw, there's also the dump(obj) function. pass anything to 'obj' and it'll convert whatever it is to a human readable string 15:35 paramat that should do it 15:35 Ruslan1 Nice 15:35 paramat your code in the hastebin is unnecessary 15:37 paramat then use the mod in the flat mapgen 15:38 paramat or yes alternatively unregister all other biomes 15:38 paramat as explained 15:38 paramat (without a clear) 15:39 paramat make sure to also copy-paste the dunes/shore/ocean sub-biomes for each forest biome 15:40 paramat for example you can see 'coniferous forest' actually consists of 3 biomes stacked vertically 15:41 andirc8000 paramat: your explanation is too 'deep' for me to 'grasp' 15:41 paramat and rainforest has a swamp 15:42 paramat well it's just copy-paste 15:42 andirc8000 paramat: all I want as a first try, is to _not have_ deserts or any other open areas in my newly generated worlds 15:42 andirc8000 I like em' dense' with trees is all 15:43 andirc8000 paramat: ok, swamp maybe is a little bit of a problem but lets assume that for starters I'm ok even with that 15:44 paramat hang on, i'll write the mod for you since it's easy ... 15:45 andirc8000 paramat: so for starters, does my algorithm sound ok to you at all: I want to 1) generate a new world via 'flat' mapgen. 2) remove in my mod all the biomes that are non-trees 3) hopefully achieve trees-only flat world 15:49 andirc8000 Krock: ok thanks 15:49 Krock np 15:49 paramat create a mod with 'default' in the depends file and this as the init.lua file: https://gist.github.com/paramat/a155efe0d0c9b6fb760165f9871baba4 15:49 Shara andirc8000: you don't need any algorithm. Just unregister biomes you don't want.. I provided the information for this earlier 15:50 Shara You really just need a simple mod that has minetest.unregister_biome(biome_name).. then the biome is gone 15:51 paramat then choose flat mapgen when you create a new world, and enable that mod in world configuration before entering that world 15:52 paramat also, please be more patient on IRC 16:10 andirc8000 paramat: ok sorry if to hasty I tried your mod it doesn't work I still see desert. 16:10 andirc8000 too hasty * 16:11 paramat did you enable the mod in world config? 16:11 andirc8000 paramat: if irc is too problematic maybe I should ask in the forums instead ... 16:11 andirc8000 paramat: well I suppose I'll ask in the forums 16:11 Shara andirc8000: add default mod as a depends 16:12 paramat IRC is ok. i don't know why it doesn't work, you must have made a mistake :) 16:12 paramat ^^ 16:13 andirc8000 paramat: is it *ok* to ask in forum though? (and cross-link from here?) 16:14 andirc8000 paramat: convo gets *too heated* and I'm not *native english* speaker so I suppose I better formulate my thoughts vs. real-time sentences exchange 16:14 paramat yes, ask in the 'ask mapgen questions here' thread 16:14 paramat in 'modding discussion' 16:15 paramat did you set the depends file to 'default'? 16:22 entuland quick curiosity: renaming / cloning a world is just matter of renaming the folder / copying over the folder with a different name, correct? 16:22 entuland I just tried it and it seems to work, should I be altering any data file inside the folder accordingly? 16:23 entuland cause I don't see any option to rename the world from the main menu 16:23 paramat andirc8000 the mod works for me (testing) 16:23 entuland I found posts like this but they're a bit old: https://forum.minetest.net/viewtopic.php?f=10&t=13551 16:27 paramat oh i did make small mistake, updated gist andirc8000 17:41 Wuzzy hey all. does minetest.get_objects_inside_radius take the obeject's collisionbox into account? 17:41 Wuzzy i mean, how does it determine if an object is "inside the radius"? 17:42 sfan5 vector.distance(pos, object:getpos()) <= radius basically 17:42 Wuzzy does it simply compare pos with the pos (=center) of the object? or is it smarter than that? 17:42 Wuzzy :( 17:43 Wuzzy i like to figure out how to detect object-object collision efficiently 17:43 Wuzzy e.g. arrow vs mob 17:44 Wuzzy my bow mod hilariously fails often when i shoot arrows at mobs because i only do such a primitive check 17:44 Wuzzy the problem is this doesnt account for the different mob sizes :( 17:44 Wuzzy minetest 0.5.0-dev does not have on_collide for objects yet, right? 17:46 Krock no, that doesn't exist yet because it would require some threshold until a collision callback is called 17:46 Krock otherwise it just spams Lua with callbacks 17:50 Wuzzy :( 17:51 Wuzzy i agree, a raw callback for collisions would not really work, there must be a better way 17:52 Wuzzy maybe enable collision notifications only for particular entities for which the modder KNOWS it is needed (e.g. for arrows) 18:54 andirc8000 ehh, so eventually settled for this: https://hastebin.com/burilajifi.lua 18:55 andirc8000 probably useless to post this on forums 18:56 andirc8000 the mistake was that I indeed didn't include 'depends.txt' with the value 'default' and in that case minetest.registered_biomes table was empty. 19:11 andirc8000 thanks for all the help so far :) 19:14 paramat weird way to do it, and don't forget 'deciduous_forest' 19:16 paramat well actually, it's not weird 19:16 paramat quite clever