[Beta] MapEdit

random_geek
Member
 
Posts: 36
Joined: Wed Jun 20, 2018 18:55
GitHub: random-geek
In-game: Techy5 random_geek

[Beta] MapEdit

by random_geek » Wed Jan 30, 2019 06:17

MapEdit, the fastest way (yet) to edit the world.

MapEdit is an external tool for relatively fast manipulation of Minetest worlds (map files). It is not intended to be a replacement for WorldEdit, but is more reliable and much faster for large operations where WorldEdit would usually fail.
The tool is currently in the beta stage; as such, it is not complete feature-wise, and probably contains bugs and other problems.

Features:
MapEdit is aimed at server owners, although it can be used for single-player worlds as well. It comes with a number of features which are useful for performing large-scale operations in maps. These include:

  • Moving, deleting, and cloning of mapblocks
  • Bulk replacement of nodes
  • Bulk metadata, node timer, and entity deletion
  • Param2 and metadata editing
  • Item replacement within inventories
  • Progress bar and time elapsed
As usual, full documentation of the commands and other notes can be found at the GitHub repository.

Dependencies: Python 3; no other packages should be required.

Download: https://github.com/random-geek/MapEdit/archive/master.zip

GitHub: https://github.com/random-geek/MapEdit

License: LGPL v3
I have not failed. I've just found 10,000 ways that won't work. —Thomas Edison
 

User avatar
cHyper
Member
 
Posts: 842
Joined: Fri May 06, 2011 08:49
Location: Austria
GitHub: cHyper-0815OL
IRC: cHyper
In-game: cHyper cHyper_0815

Re: [Beta] MapEdit

by cHyper » Wed Jan 30, 2019 18:52

is this tool only for linux-user or also for windows users? when it work on windows, how do i enable python3 on this plattform? thanks for infos.
 

random_geek
Member
 
Posts: 36
Joined: Wed Jun 20, 2018 18:55
GitHub: random-geek
In-game: Techy5 random_geek

Re: [Beta] MapEdit

by random_geek » Thu Jan 31, 2019 00:13

cHyper wrote:is this tool only for linux-user or also for windows users? when it work on windows, how do i enable python3 on this plattform? thanks for infos.


It should work on all platforms, including Windows. You can get the latest Python 3 release from https://python.org/downloads/windows/ and install it. Then, open the folder where mapedit.py is in Command Prompt or PowerShell and run "python mapedit.py" without the quotes. If it works, it should display a help screen. If it doesn't, try using "python3 mapedit.py" or restarting the computer.
Hope this helps.
I have not failed. I've just found 10,000 ways that won't work. —Thomas Edison
 

random_geek
Member
 
Posts: 36
Joined: Wed Jun 20, 2018 18:55
GitHub: random-geek
In-game: Techy5 random_geek

Re: [Beta] MapEdit

by random_geek » Sat Feb 02, 2019 19:26

UPDATE: A couple of bugs were fixed, as well as some code cleanup. :)
I have not failed. I've just found 10,000 ways that won't work. —Thomas Edison
 

Gundul
Member
 
Posts: 557
Joined: Thu Aug 27, 2015 10:55
Location: Europe/Asia
GitHub: berengma
IRC: Gundul

Re: [Beta] MapEdit

by Gundul » Sun Jun 16, 2019 12:30

random_geek wrote:UPDATE: A couple of bugs were fixed, as well as some code cleanup. :)


Looks like deleting mapblocks does not work:

Code: Select all
` python3.7 mapedit.py -f map.sqlite --p1 100 -100 100 --p2 -100 100 -100 deleteblocks
WARNING: Using this tool can potentially cause permanent
damage to your map database. Please SHUT DOWN the game/server
and BACK UP the map before proceeding. To continue this
operation, type 'yes'.

    yes
    Traceback (most recent call last):
    File "mapedit.py", line 177, in
    args.func(db, args)
    File "/Jungle/lib/commands.py", line 50, in delete_blocks
    list = helpers.get_mapblocks(cursor, area=(p1, p2), inverse=args.inverse)
    NameError: name 'cursor' is not defined
    `


I changed helpers.get_mapblocks(cursor, area=(p1, p2), inverse=args.inverse)
to helpers.get_mapblocks(database, area=(p1, p2), inverse=args.inverse)

now code is running, but the map.sqlite changed not in size after script finished.
My servers: Jungle, Lilly in the valley, ZombieTest
 

User avatar
Festus1965
Member
 
Posts: 875
Joined: Sun Jan 03, 2016 11:58
Location: Thailand - Chiang Mai (+5-6h to MEZ)
In-game: Thomas Explorer

Re: [Beta] MapEdit

by Festus1965 » Mon Jun 17, 2019 05:58

Gundul wrote:now code is running, but the map.sqlite changed not in size after script finished.
Sure it isn't changed size, as that is not included to run of VACUUM. That you still have to do yourself.
Server: still up, see some gamer - but there is a new 1st important thread "climate change" for me. Something I know since 1992 - had seen the melting glacier in Switzerland.
 


Return to Minetest-related projects



Who is online

Users browsing this forum: No registered users and 3 guests