Copy/paste a portion of a map
Copy/paste a portion of a map
Hello.
I want to import a big building in a new map. So, is it technically possible to cut an portion of a map and paste on other ?
Regards,
JP
I want to import a big building in a new map. So, is it technically possible to cut an portion of a map and paste on other ?
Regards,
JP
Just select a region in your source world and "//save mymodel". Then copy the "schems/" directory into the destination world directory, load it up, mark the correct node, and "//load mymodel".
WorldEdit always loads models so that pos1 is at the lowermost x/y/z coordinate, so the node you need to mark for pasting might be different than the pos1 you marked in your source world.
WorldEdit always loads models so that pos1 is at the lowermost x/y/z coordinate, so the node you need to mark for pasting might be different than the pos1 you marked in your source world.
-
- Member
- Posts: 4276
- Joined: Sun Sep 09, 2012 17:31
- GitHub: Sokomine
- IRC: Sokomine
- In-game: Sokomine
Yes it is. If you want to transfer individual buildings, WorldEdit is indeed a good choice. If you really want to cut out a huge portion of a map and put it into another map, go to the database level. Each entry in the database the map consists of contains 16x16x16 nodes. The map format is documented in doc/mapformat.txt, and transfering data on that level is extremly fast.jp wrote: I want to import a big building in a new map. So, is it technically possible to cut an portion of a map and paste on other ?
If your area is just too large for the standard WorldEdit save/load commands but still not so big that you'd want to calculate the ID of the map chunks involved (as the database level would require), try the schematic-related commands from WorldEdit: //mtschemcreate etc.
A list of my mods can be found here.
Well, I did the test with Sky City (which you know, Sokomine). Exported about 300,000 blocks in a .we file of 53 Mo.
I thought that my computer would explode during the process...
Then I imported the file in a new world, and several parts of Sky City didn't appear, sometimes some parts of brick walls was replaced by dirt. I think it was too big for one file...
I thought that my computer would explode during the process...
Then I imported the file in a new world, and several parts of Sky City didn't appear, sometimes some parts of brick walls was replaced by dirt. I think it was too big for one file...
Last edited by jp on Fri Feb 28, 2014 16:44, edited 1 time in total.
- Krock
- Developer
- Posts: 4650
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
Use WorldEdit:
In the 1st world:
Go into one edge of the building (ex. down, left, in front)
say: //pos1
Go into the other edge of the building (ex. up, right, in the back)
say: //pos2
say: //save FILENAME
Go into your world folder, copy the "schems" folder into the 2nd world.
In the 2st world: (where you copied the "schems" folder to)
Go into an edge on the bottom, (~ where the lowest part of your building should be)
say: //pos1
say: //pos2 (yes, at the same position!)
See if you made it right: The worldedit will draw x++, z++, that means, when you're at the coordinates (4, 5, 7), then your house might end at (12, 10, 23), that would be a size of 8x5x16 nodes.
say: //load FILENAME
have fun.
For maps with same mods, this shouldn't give any problems.
In the 1st world:
Go into one edge of the building (ex. down, left, in front)
say: //pos1
Go into the other edge of the building (ex. up, right, in the back)
say: //pos2
say: //save FILENAME
Go into your world folder, copy the "schems" folder into the 2nd world.
In the 2st world: (where you copied the "schems" folder to)
Go into an edge on the bottom, (~ where the lowest part of your building should be)
say: //pos1
say: //pos2 (yes, at the same position!)
See if you made it right: The worldedit will draw x++, z++, that means, when you're at the coordinates (4, 5, 7), then your house might end at (12, 10, 23), that would be a size of 8x5x16 nodes.
say: //load FILENAME
have fun.
For maps with same mods, this shouldn't give any problems.
Last edited by Krock on Fri Feb 28, 2014 16:47, edited 1 time in total.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
-
- Member
- Posts: 4276
- Joined: Sun Sep 09, 2012 17:31
- GitHub: Sokomine
- IRC: Sokomine
- In-game: Sokomine
For larger structures, use //mtschemcreate filename instead of //save filename, and //mtschemplace filename instead of //load filename. The schematics force areas to be loaded and are resistant against mapgen griefing. It ought to work fine with Sky City.Krock wrote: say: //save FILENAME
A list of my mods can be found here.
-
- Moderator
- Posts: 4094
- Joined: Wed Aug 24, 2011 09:44
- GitHub: sfan5
- IRC: sfan5
- Location: Germany
That is much faster because serializing MTSchematics is done in C++.jp wrote:Hello.
I tried //mtschemcreate and //mtschemplace commands to export / import Sky City.
It was very much faster, better made and much lighter for the schem file than //save and //load.
Thanks alot, Sokomine
But note that mtschematics cannot any metadata of soft, that means contents of chests/furnaces will not be saved.
Re: Copy/paste a portion of a map
Can I use this to copy within a single map? So I can build something and move it, e.g. make towns faster?
Also, is WorldEdit built into Minetest, or is it a mod type thing?
Ps. The post above me has a WorldEdit mod, is this the official thing? Or it's it just an awesome mod?
Also, is WorldEdit built into Minetest, or is it a mod type thing?
Ps. The post above me has a WorldEdit mod, is this the official thing? Or it's it just an awesome mod?
-Murkle
-
- New member
- Posts: 2
- Joined: Fri Apr 27, 2018 17:47
- GitHub: Tallmantsu
- IRC: Tallmantsu
- In-game: Tallmantsu
Re: Copy/paste a portion of a map
I have just found this mod very simple to copy past whatever you want on single map :Murkle wrote:Can I use this to copy within a single map? So I can build something and move it, e.g. make towns faster?
Also, is WorldEdit built into Minetest, or is it a mod type thing?
Ps. The post above me has a WorldEdit mod, is this the official thing? Or it's it just an awesome mod?
https://github.com/minetest-mods/edit
-
- Member
- Posts: 4276
- Joined: Sun Sep 09, 2012 17:31
- GitHub: Sokomine
- IRC: Sokomine
- In-game: Sokomine
Re: Copy/paste a portion of a map
Take a look at my handle_schematics mod. Obtain two of the build chests, place one in front and one at the backside of your building, save it to a file, and then later on spawn it at the target position. You can even replace the materials with other ones.
A list of my mods can be found here.
Who is online
Users browsing this forum: No registered users and 1 guest