Time Nick Message 08:52 TenPlus1 hif olks 08:52 TenPlus1 er... hi folks 08:53 TenPlus1 is there a minimum number of ABM's a mod should stick to before it slows down the game too much ??? or is it AMB specific to what it does ?? 08:57 * TenPlus1 notices that everyone seems to be a cardboard cutout 08:58 ShadowNinja TenPlus1: There's no set number, but less is better. 08:59 ShadowNinja You're welcome? 09:00 TenPlus1 I have an ABM checking water_source to see what's surrounding it, then freezing to ice... is this overkill to check the water itself ??? 09:02 ShadowNinja TenPlus1: That will run on a lot of nodes. Set air as a neighbor and only run on sources. 09:02 TenPlus1 so it only works on surface water... gotcha... 09:03 TenPlus1 minetest.register_abm({ nodenames = {"default:water_source"}, neighbors = {"ethereal:crystal_spike", "ethereal:crystal_topped_dirt", "default:snow", "default:snowblock"}, interval = 10, chance = 4, action = function(pos, node, active_object_count, active_object_count_wider) minetest.add_node(pos,{name="default:ice"}) end, }) 09:04 TenPlus1 so simply adding "air", will stop it checking ALL the water ? 09:04 ShadowNinja That ought to do. I think it will require all of those neighbors though. 09:05 ShadowNinja If you have a snow neighbor requirement you shouldn't need the air one. 09:06 TenPlus1 so the neigbours are ALL needed for it to work... I assumed it was an either/or siruation, if it found ANY of the above 09:06 TenPlus1 it can find one item on the list and make the water beside it into ice... 09:07 ShadowNinja I'm not sure about that and there might be an option. 09:08 TenPlus1 the api.txt file isnt that clear on usage, kinda vague in some areas 09:10 TenPlus1 yeah, sadly it's any of the above: " neighbors = {"default:water_source", "default:water_flowing"}, -- (any of these) " 09:10 TenPlus1 from the api.txt file 09:16 TenPlus1 I'll try and rejig the abm to check for the crystal itself and change surrounding water, will prolly be less intensive 09:42 TenPlus1 minetest.register_abm({ nodenames = {"ethereal:crystal_spike"}, neighbors = {"default:water_source"}, interval = 10, chance = 4, action = function(pos, node) local pos0 = {x=pos.x-1,y=pos.y-1,z=pos.z-1} local pos1 = {x=pos.x+1,y=pos.y+1,z=pos.z+1} local seedling = minetest.env:find_nodes_in_area(pos0, pos1, "default:water_source") if #seedling > 0 then minetest.env:set_node(seedling, {name="default:ice"}) 09:42 TenPlus1 that's the new ABM taken from the flowers mod, checks for crystal, checks for surrounding water and if so changes it to ice... but... ice doesnt appear >?!?! 09:46 CiaranG Put some logging in, make sure it's being called, find out what it's doing when it is 09:47 TenPlus1 I have, when it's called the "ice ice baby" is displayed in chat.... and it's appearing no problem 09:47 TenPlus1 just no ice being placed 09:49 CiaranG Surely you want set_node(seedling[1]... at the end there 09:50 TenPlus1 call me simple, but what does the [1] imply... 09:50 CiaranG minetest.find_nodes_in_area returns a list of positions 09:51 CiaranG You're passing that whole list as the first parameter to minetest.setnode. It only wants one position. 09:51 TenPlus1 so the [1] tell it to use the 1st 09:51 CiaranG Yep 09:51 TenPlus1 *slaps forehead*... am an idiot... thank you so much CiaranG... it's working now :) 09:51 TenPlus1 the old method was quite intensive but simple, this one is a lot easier on the CPU 09:56 TenPlus1 does anyone know much about v7 map generation ?? 09:57 TenPlus1 I get an "ERRORpmain]: BiomeDefManager: recolveNodeNames: node 'default:ait" not defined 09:59 TenPlus1 er... 'default:air" even....... it's for a cave biome where the node_top is desert stone and the filler is 'default:air'.... but that error appears when it's in use... and I dunno what else to put to have empty blocks as a filler 10:12 TenPlus1 thx for the help :) laters