Change a node for another in the whole server
- MasterGollum
- Member
- Posts: 79
- Joined: Thu Sep 27, 2012 14:48
Change a node for another in the whole server
I recently migrated from 0.4.3 to 0.4.8 all the changes are impressive and really cool, but I have a little big problem. I have already created large extensions of buildings with cobble stone, now the texture has more sense, but I would not had used that nodes from the begining if that texture was the existing in that time. I don't want to change the default texture, I like it, I think it is better than the previous one, I just want to transform my cobbles to stone bricks that is just what they were looking until now.
In short, exists a way to massive change all the cobble stones (or any other node) to another existing one? I opened the database, but there all the blocks are just blobs so I can't perform a SQL update. I don't care about the ones inside inventories or containers, just the placed ones.
In short, exists a way to massive change all the cobble stones (or any other node) to another existing one? I opened the database, but there all the blocks are just blobs so I can't perform a SQL update. I don't care about the ones inside inventories or containers, just the placed ones.
- Pitriss
- Member
- Posts: 254
- Joined: Mon Aug 05, 2013 17:09
- GitHub: Pitriss
- IRC: pitriss
- In-game: pitriss
- Location: Czech republic, Bohumin
try to write simple mod with abm which change all loaded cobble to stone bricks and walk through whole map.
as decribed here. This should turn all default:cobble loaded into default:stonebrick every 10s.
Code: Select all
minetest.register_abm({
nodenames = {"default:cobble"},
interval = 10,
chance = 1,
action = function(pos)
minetest.add_node(pos, {name="default:stonebrick"})
end,
})
I reject your reality and substitute my own. (A. Savage, Mythbusters)
I'm not modding and/or playing minetest anymore. All my mods were released under WTFPL. You can fix/modify them yourself. Don't ask me for support. Thanks.
I'm not modding and/or playing minetest anymore. All my mods were released under WTFPL. You can fix/modify them yourself. Don't ask me for support. Thanks.
- rubenwardy
- Moderator
- Posts: 6978
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Maybe minetest.set_node, as iirc, add_node requires the position to be air.Pitriss wrote:try to write simple mod with abm which change all loaded cobble to stone bricks and walk through whole map.
as decribed here. This should turn all default:cobble loaded into default:stonebrick every 10s.Code: Select all
minetest.register_abm({ nodenames = {"default:cobble"}, interval = 10, chance = 1, action = function(pos) minetest.add_node(pos, {name="default:stonebrick"}) end, })
- PilzAdam
- Member
- Posts: 4026
- Joined: Fri Jul 20, 2012 16:19
- GitHub: PilzAdam
- IRC: PilzAdam
- Location: Germany
add_node and set_node are exactly the same, no difference at all.rubenwardy wrote:Maybe minetest.set_node, as iirc, add_node requires the position to be air.Pitriss wrote:try to write simple mod with abm which change all loaded cobble to stone bricks and walk through whole map.
as decribed here. This should turn all default:cobble loaded into default:stonebrick every 10s.Code: Select all
minetest.register_abm({ nodenames = {"default:cobble"}, interval = 10, chance = 1, action = function(pos) minetest.add_node(pos, {name="default:stonebrick"}) end, })
- MasterGollum
- Member
- Posts: 79
- Joined: Thu Sep 27, 2012 14:48
- ShadowNinja
- Developer
- Posts: 200
- Joined: Tue Jan 22, 2013 22:35
- GitHub: ShadowNinja
- IRC: ShadowNinja
- In-game: ShadowNinja
You could also try:
This might convert items in chests too if you move them, although it will make stone drop stonebrick while it's enabled. Another option is to use WorldEdit and run //replace default:cobble default:stonebrick on all of your structures.
Code: Select all
minetest.register_alias("default:cobble", "default:stonebrick")
Last edited by ShadowNinja on Tue Jan 07, 2014 02:02, edited 1 time in total.
-
- Member
- Posts: 4290
- Joined: Sun Sep 09, 2012 17:31
- GitHub: Sokomine
- IRC: Sokomine
- In-game: Sokomine
Perhaps the easiest way in such a case might be to simply switch the textures and give cobble the old-cobble-new-stonebricks-texture while giving the current cobble texture to stonebricks. If necessary, stone could turn into stonebricks (with cobble texture) after digging - though that might be confusing for crafting receipes. Perhaps just exchanging the textures might do. The few times you'll actually need the new cobble texture (i.e. for paths), crafting them with a new receipe or as stonebricks might work.
A list of my mods can be found here.
- hoodedice
- Member
- Posts: 1374
- Joined: Sat Jul 06, 2013 06:33
- GitHub: hoodedice
- IRC: hoodedice
- In-game: hoodedice
- Location: world
- Contact:
@Sokomine: Nope, ShadowNinja beat me to it. WorldEdit is by far the easiest way to replace nodes in a given area.
7:42 PM - Bauglio: I think if you go to staples you could steal firmware from a fax machine that would run better than win10 does on any platform
7:42 PM - Bauglio: so fudge the stable build
7:43 PM - Bauglio: get the staple build
7:42 PM - Bauglio: so fudge the stable build
7:43 PM - Bauglio: get the staple build
- MasterGollum
- Member
- Posts: 79
- Joined: Thu Sep 27, 2012 14:48
I decided to use the Pitriss's function. It worked fine, but the stairs, they lost the direction I fixed it transfering the param2 value to the new nodes. I prefer not to use an aliass because I wanted to leave the default behaviour, so once I changed all I will remove the abm. Luckily I had not used WorldEdit or I would have done a mess with all the stairs
- hoodedice
- Member
- Posts: 1374
- Joined: Sat Jul 06, 2013 06:33
- GitHub: hoodedice
- IRC: hoodedice
- In-game: hoodedice
- Location: world
- Contact:
Oh dam.MasterGollum wrote:I decided to use the Pitriss's function. It worked fine, but the stairs, they lost the direction I fixed it transfering the param2 value to the new nodes. I prefer not to use an aliass because I wanted to leave the default behaviour, so once I changed all I will remove the abm. Luckily I had not used WorldEdit or I would have done a mess with all the stairs
7:42 PM - Bauglio: I think if you go to staples you could steal firmware from a fax machine that would run better than win10 does on any platform
7:42 PM - Bauglio: so fudge the stable build
7:43 PM - Bauglio: get the staple build
7:42 PM - Bauglio: so fudge the stable build
7:43 PM - Bauglio: get the staple build
- Evergreen
- Member
- Posts: 2135
- Joined: Sun Jan 06, 2013 01:22
- GitHub: 4Evergreen4
- IRC: EvergreenTree
- In-game: Evergreen
- Location: A forest in the midwest
- Contact:
This is why mod creators need to provide abms to replace current blocks with the new version of the block. I had this problem with the quartz mod pillars, which I created an abm for.MasterGollum wrote:I decided to use the Pitriss's function. It worked fine, but the stairs, they lost the direction I fixed it transfering the param2 value to the new nodes. I prefer not to use an aliass because I wanted to leave the default behaviour, so once I changed all I will remove the abm. Luckily I had not used WorldEdit or I would have done a mess with all the stairs
Last edited by Evergreen on Tue Jan 07, 2014 20:38, edited 1 time in total.
Back from the dead!
Who is online
Users browsing this forum: No registered users and 37 guests