Copy/paste a portion of a map

User avatar
jp
Member
 
Posts: 705
Joined: Wed Dec 18, 2013 09:03
GitHub: kilbith

Copy/paste a portion of a map

by jp » Fri Feb 28, 2014 09:33

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
 

User avatar
Pitriss
Member
 
Posts: 253
Joined: Mon Aug 05, 2013 17:09
GitHub: Pitriss
IRC: pitriss
In-game: pitriss

by Pitriss » Fri Feb 28, 2014 09:51

AFAIK Worldedit can import/export pieces of map.
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.
 

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

by Morn76 » Fri Feb 28, 2014 10:31

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.
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

by Sokomine » Fri Feb 28, 2014 16:04

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 ?

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.
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.
 

User avatar
jp
Member
 
Posts: 705
Joined: Wed Dec 18, 2013 09:03
GitHub: kilbith

by jp » Fri Feb 28, 2014 16:41

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...
Last edited by jp on Fri Feb 28, 2014 16:44, edited 1 time in total.
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

by Krock » Fri Feb 28, 2014 16:46

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.
Last edited by Krock on Fri Feb 28, 2014 16:47, edited 1 time in total.
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

User avatar
jp
Member
 
Posts: 705
Joined: Wed Dec 18, 2013 09:03
GitHub: kilbith

by jp » Fri Feb 28, 2014 17:08

Thank you for your precise explication, Krock.

I loaded the file with only pos1 in the new world...
Last edited by jp on Fri Feb 28, 2014 17:09, edited 1 time in total.
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

by Sokomine » Fri Feb 28, 2014 17:27

Krock wrote:say: //save FILENAME

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.
A list of my mods can be found here.
 

User avatar
Novacain
Member
 
Posts: 285
Joined: Sat Aug 31, 2013 01:03

by Novacain » Fri Feb 28, 2014 17:33

i think I need to bookmark this page so I can move buildings :P
EXTERMINATE!!!
My Tronrealm modpack
My tronblocks mod
 

User avatar
jp
Member
 
Posts: 705
Joined: Wed Dec 18, 2013 09:03
GitHub: kilbith

by jp » Sat Mar 08, 2014 17:24

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 ;)
Last edited by jp on Sat Mar 08, 2014 18:01, edited 1 time in total.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Sat Mar 08, 2014 18:59

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 ;)

That is much faster because serializing MTSchematics is done in C++.
But note that mtschematics cannot any metadata of soft, that means contents of chests/furnaces will not be saved.
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

Murkle
New member
 
Posts: 8
Joined: Wed Mar 30, 2016 02:56

Re: Copy/paste a portion of a map

by Murkle » Mon Jun 27, 2016 07:37

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?
-Murkle
 

User avatar
Naj
Member
 
Posts: 170
Joined: Sat Sep 19, 2015 21:14
GitHub: pyrollo
In-game: naj

Re: Copy/paste a portion of a map

by Naj » Mon Jun 27, 2016 09:09

It's a mod, you can find it here.

With Worldedit, you can perform various operations on map, load, save, rotate, flip...
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 34 guests

cron