[Mod] WorldEdit [1.0] [worldedit]

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

by sfan5 » Sat Oct 12, 2013 07:05

Sokomine wrote:
sfan5 wrote:
JackGruff wrote:
Could we please have the ability to remove blocks from a region? I'm not talking about making them air,I'm talking about deleting them such that the game regenerates them.

This would be useful to revert an area to its original state.


That is currently not possible using the Lua API

It is possible on the database level. Trouble is: How do you identify those mapblocks you want to be removed/calculated anew? Also, removing them would only work while the game is not running and using that particular database/map.

Well...
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
import sqlite3

def getBlockAsInteger(x, y, z):
    return z * 16777216 + y * 4096 + x

conn = sqlite3.connect("map.sqlite")
cur = self.conn.cursor()
post = [(7, 2, -2), (7, 2, -1)] # MapBlock position [ (nodepos.x / 16, nodepos.y / 16, nodepos.z / 16) ]

for pos in post:
    cur.execute("DELETE FROM `blocks` WHERE `pos`==?", (getBlockAsInteger(x, y, z), ))
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

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

by Sokomine » Sat Oct 12, 2013 15:13

That code certainly helps if the chunk to be removed has already been identified. Sometimes you'd want to remove all blocks that have not been built on, where people just wandered through in search for ressources/explored the scenery.
If only a few individual blocks ought to be generated, they could of course be marked with a special block that is used only in these blocks and nowhere else - and let the database handle the rest.
A list of my mods can be found here.
 

LazyJ
Member
 
Posts: 479
Joined: Wed Sep 12, 2012 12:29

by LazyJ » Sun Oct 13, 2013 11:04

Using WorldEdit to wipe-out an area and have Minetest regenerate that are gets a thumbs-up from me.

It would be nice to be able to quickly and easily restore heavily mined areas on our server or to regenerate abandoned sections for new development.

The other reason I came to post was to ask if it would be possible for the strength of the punch be greatly reduced when WorldEdit's punch selection is used.

In more recent daily-builds of Minetest the reach and strength of the player's actions in creative mode have been increased. The strength of the punch results in an instant removal of whatever node was struck.

Most of the time this is great, saves time from constantly having to flip back-and-forth between tools and materials. But, when WorldEdit's "//p set" is used the two marker-blocks get blasted. Usually those are blocks I'd like to keep.

I could edit the settings in Minetest but then I would lose the power-punch completely. It's only when I use WorldEdit that I require a light tap to set the markers.

Thanks for a great mod!
Last edited by LazyJ on Sun Oct 13, 2013 11:05, edited 1 time in total.
.: Minetest 0.4.14 ~ Linux Mint ~ A moka pot, a French press, a dirty coffee cup, and a spoiled-rotten kitty :.
Visit our Minetest server at: LinuxGaming2.com, port 30000
Screenshots, overview maps, and server info at: http://forum.minetest.net/viewtopic.php?f=10&t=5684
My blog: http://lazyjminetest.blogspot.com/
 

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

by Sokomine » Sun Oct 13, 2013 15:54

LazyJ wrote:Using WorldEdit to wipe-out an area and have Minetest regenerate that are gets a thumbs-up from me.

Doing it directly from WorldEdit would be dangerous. It's only really safe to delete from a world database while the world is not running. WorldEdit could only be used to mark the areas. Manually placing a block in each 16x16x16 chunk that is to be deleted would be possible (or, alternatively, those that are to be kept) - but it would also be a lot of work. Cutting off the map to delete anything below -1000 (as an example) or with x>1500 etc. would also be pretty easy.
A list of my mods can be found here.
 

User avatar
cHyper
Member
 
Posts: 587
Joined: Fri May 06, 2011 08:49
IRC: cHyper
In-game: cHyper

by cHyper » Tue Oct 15, 2013 16:45

nice mod...

is there a gui Version planed in the future?
this will be very helpful...
--------------------------------------------------------
 

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

by sfan5 » Tue Oct 15, 2013 16:53

cHyper wrote:nice mod...

is there a gui Version planed in the future?
this will be very helpful...

There was a GUI mod for WorldEdit but it was discontinued.
Why would you need a GUI anyway?
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
thefamilygrog66
Member
 
Posts: 169
Joined: Mon Jul 09, 2012 19:08

by thefamilygrog66 » Tue Oct 15, 2013 16:53

sfan5 wrote:
cHyper wrote:nice mod...

is there a gui Version planed in the future?
this will be very helpful...

There was a GUI mod for WorldEdit but it was discontinued.
Why would you need a GUI anyway?


A formspec would be handy, for sure.
 

twoelk
Member
 
Posts: 1092
Joined: Fri Apr 19, 2013 16:19

by twoelk » Tue Oct 15, 2013 18:11

For example browsing for a certain schematic file to load from within minetest would make things easier. At the moment you have to memorize the exact name or have a list visible some place outside the program window.

Actually being able to load schematic files from some other folder than the current world folder would be nice as well. I could keep my basic schematics in some util/schems/ folder instead of having folders with the same content in several world folders.
 

User avatar
addi
Member
 
Posts: 605
Joined: Thu Sep 20, 2012 03:16

by addi » Wed Oct 16, 2013 14:38

sfan5 wrote:
cHyper wrote:nice mod...

is there a gui Version planed in the future?
this will be very helpful...

There was a GUI mod for WorldEdit but it was discontinued.
Why would you need a GUI anyway?


We have a working version of cornernotes gui mod here: https://bitbucket.org/kingarthursteam/minetest-worldedit_gui/
its not tested with worldedit 1.0 and 0.4.7-dev but it shuld work with the worldedit version for 0.4.7 stable it dose not contain all chatcomands, but it give you an overview about some mostly used ones.

twoelk wrote:For example browsing for a certain schematic file to load from within minetest would make things easier. At the moment you have to memorize the exact name or have a list visible some place outside the program window.

thats a good idea! :) if im feeling lucky i may implement this into the gui version.
 

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

by sfan5 » Wed Oct 16, 2013 15:59

addi wrote:[...]

twoelk wrote:For example browsing for a certain schematic file to load from within minetest would make things easier. At the moment you have to memorize the exact name or have a list visible some place outside the program window.

thats a good idea! :) if im feeling lucky i may implement this into the gui version.

Irrlicht has a built-in file chooser, there is no need to redo that in lua.
All we need is a file chooser interface for Lua
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
cHyper
Member
 
Posts: 587
Joined: Fri May 06, 2011 08:49
IRC: cHyper
In-game: cHyper

by cHyper » Thu Oct 17, 2013 10:28

sfan5 wrote:Irrlicht has a built-in file chooser, there is no need to redo that in lua.
All we need is a file chooser interface for Lua


lets find that out...
that will be a great step for minetest-developers...
;)
--------------------------------------------------------
 

DragonSoul
New member
 
Posts: 7
Joined: Sat Sep 21, 2013 10:32

by DragonSoul » Thu Oct 24, 2013 13:21

I think there is a problem with the hollow cylinder of the 1.0 version, it does show how many nodes are generated but they don't appear. I have tried it multiple times with the latest minetest version but the nodes doesn't appear, all others are fine except for this.
Last edited by DragonSoul on Thu Oct 24, 2013 13:31, edited 1 time in total.
 

Temperest
Member
 
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Fri Oct 25, 2013 03:34

DragonSoul: Working perfectly fine here. I can't confirm this issue. If you can reproduce it under certain circumstances let us know.

LazyJ: Good idea, though punch strength can't really be reduced dynamically. I'll try to see if it's possible to do this by changing interact privs.

cHyper: a GUI is planned, yes, but I have no time right now to do it. Unfortunately addi's may not be entirely compatible (I know for sure that it's missing a few functions of 1.0), but it should be a good starting point.
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
 

kwalters-price
New member
 
Posts: 3
Joined: Thu Nov 07, 2013 05:58

by kwalters-price » Thu Nov 07, 2013 06:07

i should say
dannydark wrote:Whoa nice, although the first screenshot is just madness haha.

I will give this a try later ^_^
 

LazyJ
Member
 
Posts: 479
Joined: Wed Sep 12, 2012 12:29

by LazyJ » Sun Nov 10, 2013 14:45

UPDATE: The power-punch problem has been fixed by a github release of the minetest_game within the past week. The power-punch is still there with a slightly longer click while a light tap is back with a shorter click. Minetest keeps getting better! \0/
Last edited by LazyJ on Sun Nov 10, 2013 14:45, edited 1 time in total.
.: Minetest 0.4.14 ~ Linux Mint ~ A moka pot, a French press, a dirty coffee cup, and a spoiled-rotten kitty :.
Visit our Minetest server at: LinuxGaming2.com, port 30000
Screenshots, overview maps, and server info at: http://forum.minetest.net/viewtopic.php?f=10&t=5684
My blog: http://lazyjminetest.blogspot.com/
 

Tx_RushFan
Member
 
Posts: 31
Joined: Tue Dec 10, 2013 16:58

by Tx_RushFan » Wed Dec 11, 2013 01:07

I can't get this mod to work. I copied the Uberi-Minetest-WorldEdit-3fa9dfd folder into my Minetest's mods folder. In game I've tried the following:

1. type in /grant worldedit and am told Server -|- Invalid parameters (see /help grant)
2. type in /grant username worldedit and am told Server -|- Unknown privilage:worldedit
 

User avatar
Nightshade
Member
 
Posts: 25
Joined: Thu Oct 24, 2013 15:25

by Nightshade » Wed Dec 11, 2013 01:59

Tx_RushFan wrote:I can't get this mod to work. I copied the Uberi-Minetest-WorldEdit-3fa9dfd folder into my Minetest's mods folder. In game I've tried the following:

1. type in /grant worldedit and am told Server -|- Invalid parameters (see /help grant)
2. type in /grant username worldedit and am told Server -|- Unknown privilage:worldedit

First of all, make sure you rename the folder to "worldedit" (without the quotes, of course). Then, when you highlight your world in the singleplayer menu, click configure and enable the whole worldedit mod.
 

LazyJ
Member
 
Posts: 479
Joined: Wed Sep 12, 2012 12:29

by LazyJ » Sun Dec 22, 2013 09:35

Hlowdy :)

I'm having a bit of trouble with the GUI crashing my Mintest client when I click on the "World Edit" icon.

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
01:25:29: ERROR[main]: ServerError: ...in/../mods/utility_mods/WorldEdit/worldedit_gui/init.lua:75: attempt to call method 'get_player_by_name' (a nil value)
01:25:29: ERROR[main]: stack traceback:
01:25:29: ERROR[main]:     ...in/../mods/utility_mods/WorldEdit/worldedit_gui/init.lua:75: in function 'get_formspec'
01:25:29: ERROR[main]:     .../bin/../mods/utility_mods/unified_inventory/internal.lua:17: in function 'get_formspec'
01:25:29: ERROR[main]:     .../bin/../mods/utility_mods/unified_inventory/internal.lua:85: in function 'set_inventory_formspec'
01:25:29: ERROR[main]:     ...f/048/bin/../mods/utility_mods/unified_inventory/api.lua:93: in function 'action'
01:25:29: ERROR[main]:     ...bin/../mods/utility_mods/unified_inventory/callbacks.lua:59: in function <...bin/../mods/utility_mods/unified_inventory/callbacks.lua:51>
01:25:29: ERROR[main]:     ...Minetest_game_stuff/048/bin/../builtin/misc_register.lua:330: in function <...Minetest_game_stuff/048/bin/../builtin/misc_register.lua:318>


I'm using:
  • Singleplayer, creative mode with Unified Inventory's "creative" priv
  • Minetest 0.4.8 unstable, Github 2013_12_21
  • World Edit, Github 2013_12_20
  • Unified Inventory, Github 2013_12_21

Thanks for a great mod!
Last edited by LazyJ on Sun Dec 22, 2013 09:37, edited 1 time in total.
.: Minetest 0.4.14 ~ Linux Mint ~ A moka pot, a French press, a dirty coffee cup, and a spoiled-rotten kitty :.
Visit our Minetest server at: LinuxGaming2.com, port 30000
Screenshots, overview maps, and server info at: http://forum.minetest.net/viewtopic.php?f=10&t=5684
My blog: http://lazyjminetest.blogspot.com/
 

User avatar
kaeza
Member
 
Posts: 2141
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

by kaeza » Sun Dec 22, 2013 13:27

LazyJ wrote:I'm having a bit of trouble with the GUI crashing my Mintest client when I click on the "World Edit" icon.

https://github.com/Uberi/Minetest-WorldEdit/pull/26
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

kizeren
Member
 
Posts: 17
Joined: Thu Oct 24, 2013 15:06

by kizeren » Sun Dec 22, 2013 13:36

kaeza wrote:
LazyJ wrote:I'm having a bit of trouble with the GUI crashing my Mintest client when I click on the "World Edit" icon.

https://github.com/Uberi/Minetest-WorldEdit/pull/26


Hope he pulls soon... this bug annoying.
 

LazyJ
Member
 
Posts: 479
Joined: Wed Sep 12, 2012 12:29

by LazyJ » Sun Dec 22, 2013 14:56

Thanks, kaeza, for the fix :)

It was small enough that I decided to edit the code myself. Now the WE icon in Unified Inventory doesn't crash Minetest but... there is still a glitch to work out.

The GUI screen comes up but the Unified Inventory's item grid still displays and covers up the buttons on the right-hand side of the GUI.

The work-around I came up with was to type some random letters/numbers in Unified Inventory's search bar, click on the search icon, UI comes up with nothing (removing the item grid) then click on the WE icon and WE's GUI comes up unobstructed.

The comand-line use of WE is still faster (once mastered) but the GUI can help new users of the mod to better learn WE. The GUI gives a graphic representation of what the command-line does. Some of us learn better by having visual references. ;) "A picture is worth a thousand words" sort of thing.
Last edited by LazyJ on Sun Dec 22, 2013 14:57, edited 1 time in total.
.: Minetest 0.4.14 ~ Linux Mint ~ A moka pot, a French press, a dirty coffee cup, and a spoiled-rotten kitty :.
Visit our Minetest server at: LinuxGaming2.com, port 30000
Screenshots, overview maps, and server info at: http://forum.minetest.net/viewtopic.php?f=10&t=5684
My blog: http://lazyjminetest.blogspot.com/
 

Temperest
Member
 
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Sun Dec 22, 2013 17:54

Thanks for the patch kaeza, I've merged it. For some reason I missed it entirely while going through the GitHub feed.

Edit: LazyJ, I will investigate that. Does this happen when you just click the button, or are there additional steps involved?

Edit: confirmed, will be fixed soon before v1.1.

Edit: fixed in https://github.com/Uberi/Minetest-WorldEdit/commit/df6ab06e746939bad72f0c7ff4dcfd6a46f71925
Last edited by Temperest on Sun Dec 22, 2013 18:49, edited 1 time in total.
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
 

User avatar
addi
Member
 
Posts: 605
Joined: Thu Sep 20, 2012 03:16

by addi » Sun Feb 09, 2014 11:34

if i use the worldedit gui ill stay at it. there is no way to go to the craft grid again. only logout/login helps
the click on the back button opens only the last visited page in worldedit_gui
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Sun Feb 09, 2014 12:38

addi wrote:if i use the worldedit gui ill stay at it. there is no way to go to the craft grid again. only logout/login helps
the click on the back button opens only the last visited page in worldedit_gui
Press the escape key.

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

User avatar
addi
Member
 
Posts: 605
Joined: Thu Sep 20, 2012 03:16

by addi » Sun Feb 09, 2014 13:02

Jordach wrote:
addi wrote:if i use the worldedit gui ill stay at it. there is no way to go to the craft grid again. only logout/login helps
the click on the back button opens only the last visited page in worldedit_gui
Press the escape key.

when i press "i" it opens it again but it does not open the inventory and the craft grid it opens the worldedit_gui
 

User avatar
addi
Member
 
Posts: 605
Joined: Thu Sep 20, 2012 03:16

by addi » Sun Feb 09, 2014 13:30

here is a video that describes the bug
holding the i key does not help
Attachments

[The extension webm has been deactivated and can no longer be displayed.]

 

User avatar
Zombie471
Member
 
Posts: 13
Joined: Thu Feb 20, 2014 13:20
In-game: Zombie471

by Zombie471 » Thu Feb 20, 2014 14:34

I'm trying to import the Schematic from Minecraft to Minetest in https://forum.minetest.net/viewtopic.php?id=6007 but, //import doesn't exist. Not even in the command list on here..
 

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

by sfan5 » Thu Feb 20, 2014 16:15

Zombie471 wrote:I'm trying to import the Schematic from Minecraft to Minetest in https://forum.minetest.net/viewtopic.php?id=6007 but, //import doesn't exist. Not even in the command list on here..

My fault, use //load
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
Zombie471
Member
 
Posts: 13
Joined: Thu Feb 20, 2014 13:20
In-game: Zombie471

by Zombie471 » Thu Feb 20, 2014 16:51

sfan5 wrote:
Zombie471 wrote:I'm trying to import the Schematic from Minecraft to Minetest in https://forum.minetest.net/viewtopic.php?id=6007 but, //import doesn't exist. Not even in the command list on here..

My fault, use //load


I did //load *Schematic Name* and it says

11:48:41: ERROR[ServerThread]: Map::setnote(): not allowing to place CONTENT_IGNORE while trying to replace "default:stone" at (157,21,3) (block]

Only parts of the Schematic load.
 

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

by sfan5 » Thu Feb 20, 2014 18:57

Zombie471 wrote:
sfan5 wrote:
Zombie471 wrote:I'm trying to import the Schematic from Minecraft to Minetest in https://forum.minetest.net/viewtopic.php?id=6007 but, //import doesn't exist. Not even in the command list on here..

My fault, use //load


I did //load *Schematic Name* and it says

11:48:41: ERROR[ServerThread]: Map::setnote(): not allowing to place CONTENT_IGNORE while trying to replace "default:stone" at (157,21,3) (block]

Only parts of the Schematic load.

Make sure enough parts of the map are loaded by flying around first.
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

PreviousNext

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 4 guests

cron