Page 1 of 1

How to Clean a world

PostPosted: Mon Sep 08, 2014 11:58
by balthazariv
I use an old world where I disabled some mod.
Now i have "unkonw node", "unknow item" , ...

1 ) How quickly retrieve missing mods ?
2 ) How to clean the world of the disabled mods that I never want to see ?

Thanks

Image

Re: How to Clean a world

PostPosted: Mon Sep 08, 2014 16:01
by CraigyDavi
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
local old_nodes = {"modname:block1", "modname:block2"}

for _,node_name in ipairs(old_nodes) do
    minetest.register_node(":"..node_name, {
        groups = {old=1},
    })
end

minetest.register_abm({
    nodenames = {"group:old"},
    interval = 1,
    chance = 1,
    action = function(pos, node)
        minetest.remove_node(pos)
    end,
})


Create a mod with this code.
Change to top line to include the names of the nodes you want to remove.

Re: How to Clean a world

PostPosted: Tue Sep 09, 2014 09:55
by balthazariv
CraigyDavi wrote:Create a mod with this code.
Change to top line to include the names of the nodes you want to remove.


Thanks but I was looking for something simple that would erase automatically without knowing the name of the node unknown. I think if an unknow appears Minetest block at a time is that it should well recognize as such when generating the world.

For my first interrogation "How quickly retrieve missing mods ?you have an idea ?"

Re: How to Clean a world

PostPosted: Tue Sep 09, 2014 10:47
by Topywo
balthazariv wrote:For my first interrogation "How quickly retrieve missing mods ?you have an idea ?"


Put this line in your minetest.conf file: debug_log_level = 4

Delete your 'old' debug.txt file.

Start minetest, start the saved game with the missing mods.

Exit minetest.

Open your debug.txt file.

Search for: SQLite3

Under it you can see the original modnames of the nodes that have turned into unknown that the map is trying to load at your position.

Re: How to Clean a world

PostPosted: Tue Sep 09, 2014 14:11
by balthazariv
Topywo wrote:Put this line in your minetest.conf file: debug_log_level = 4

Delete your 'old' debug.txt file.

Start minetest, start the saved game with the missing mods.

Exit minetest.

Open your debug.txt file.

Search for: SQLite3

Under it you can see the original modnames of the nodes that have turned into unknown that the map is trying to load at your position.



Thanks, I will test this method.