Page 1 of 22

[Mod] WorldEdit [1.0] [worldedit]

PostPosted: Sun Dec 11, 2011 17:34
by sfan5
WorldEdit is an in-game world editor. Use it to repair griefing, or just create awesome buildings in seconds.

Image
License: GNU AGPL v3
Basically, this means everyone is free to use, modify, and distribute the mod, as long as modifications are also licensed the same way.
Most importantly, the Affero variant of the GPL requires you to publish your modifications in source form, even if the mod is run only on the server, and not distributed.

Dependencies: none
GitHub: https://github.com/Uberi/MineTest-WorldEdit


Download

Latest: master.zip
1.0: 1.0.zip (release notes)


How to set up

Just grant the “worldedit” privilege to yourself or another player.
/grant <name> worldedit

How to use

Take a look at the tutorial

+ Old tutorial


List of commands

PostPosted: Sun Dec 11, 2011 17:41
by dannydark
Whoa nice, although the first screenshot is just madness haha.

I will give this a try later ^_^

PostPosted: Sun Dec 11, 2011 17:50
by sfan5
Fun Fact about 1st Screenshot:
It took 2 minutes to set the blocks

PostPosted: Sun Dec 11, 2011 21:38
by Calinou
That IS awesome, great job... ;)
You should probably change its name to avoid confusion with Minecraft. Something like MESEdit? :P

PostPosted: Mon Dec 12, 2011 00:00
by MarkTraceur
When I followed your instructions, I got "permission denied" (or similar). weperms.txt created, logged in with the right name, weperms looks like

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
{marktraceur}


Bug?

PostPosted: Mon Dec 12, 2011 00:04
by Calinou
Would it be possible to have a //replace command?
Like: //replace dirt stone (replaces all dirt in selection with stone)

PostPosted: Mon Dec 12, 2011 01:06
by TBC_x
Calinou wrote:That IS awesome, great job... ;)
You should probably change its name to avoid confusion with Minecraft. Something like MESEdit? :P

MessEdit :)

PostPosted: Mon Dec 12, 2011 06:01
by sfan5
MarkTraceur wrote:When I followed your instructions, I got "permission denied" (or similar). weperms.txt created, logged in with the right name, weperms looks like

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
{marktraceur}


Bug?

Try copying weperms.txt into your current directory.
I'll make this better in the next version

PostPosted: Mon Dec 12, 2011 06:15
by sfan5
Calinou wrote:Would it be possible to have a //replace command?
Like: //replace dirt stone (replaces all dirt in selection with stone)

That is possible.
I'll include it in the next version

PostPosted: Mon Dec 12, 2011 06:36
by MarkTraceur
Awesome. Celeron added something that should make it easier:

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
    bd21f00        Add minetest.get_modpath(modname)

PostPosted: Mon Dec 12, 2011 13:09
by sfan5
MarkTraceur wrote:Awesome. Celeron added something that should make it easier:

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
    bd21f00        Add minetest.get_modpath(modname)

We need a new dev release

PostPosted: Mon Dec 12, 2011 15:01
by kahrl
Hmm. Shouldn't weperms.txt be per-world? I'm not sure if the mod directory is guaranteed to be writeable.

PostPosted: Mon Dec 12, 2011 17:20
by celeron55
kahrl wrote:Hmm. Shouldn't weperms.txt be per-world? I'm not sure if the mod directory is guaranteed to be writeable.


There should probably be minetest.get_worldpath() for this kind of usage?

PostPosted: Mon Dec 12, 2011 19:13
by kahrl
Hmm.

Suggestion 1:
  • There's a new world subdirectory, say world/moddata.
  • Define a function minetest.read_file(filename) which reads a file below world/moddata and returns its contents as a string (or an array of lines?). Similarly, define minetest.write_file(filename, contents).
  • Disable io.open and all other functions from from the io library. This should make it a bit safer to install random mods.
    • Also make sure minetest.{read,write}_file don't accept filenames that contain a directory separator or start with a dot.
    • And there's os.execute,os.remove, ...

or

Suggestion 2:
  • Like suggestion 1, but instead of minetest.read_file and minetest.write_file, define minetest.open_file(filename, mode) which opens a file under world/moddata and returns a file handle. This might mean that some functions from the io module would need to stay enabled.

or

Suggestion 3:
  • Restrict all filesystem access from lua and give mods some kind of access to the sqlite database.

PostPosted: Tue Dec 13, 2011 00:14
by Calinou
Suggestion 4: Suggestion 1 or 2, but with a dialog if the mod wants to write/delete something.
Like, a menu showing up: "Do you want to allow modname to write modstuff.extension? Reason: reason".

PostPosted: Tue Dec 13, 2011 06:01
by sfan5
I like Suggestion 4, but there should be a Button "Yes for all (only modname)"

PostPosted: Thu Dec 22, 2011 06:44
by Gatharoth
Is there going to be a remove feature? (or if there already is by like //set [some block that is equal to nothing])

PostPosted: Thu Dec 22, 2011 12:41
by dannydark
@Gatharoth you could do "//set air" ^_^

PostPosted: Thu Dec 22, 2011 16:46
by Gatharoth
dannydark wrote:@Gatharoth you could do "//set air" ^_^


Last time I tried "//set air" I was getting an error that it couldn't replace the block(s). And now today, it replaces them. >.< Oh well. Good mod anyway :D

PostPosted: Sun Jan 08, 2012 06:03
by IPushButton2653
I got the "You haven't got the permission for that" error. How do I fix it???

PostPosted: Sun Jan 08, 2012 06:11
by Gatharoth
IPushButton2653 wrote:I got the "You haven't got the permission for that" error. How do I fix it???


read below

sfan5 wrote:Create a weperms.txt in the bin folder.
Now add {username} to the file, for each user who should be able to use WorldEdit.

PostPosted: Sun Jan 08, 2012 06:17
by IPushButton2653
I did that, I made a weperms.txt file and added my username in the brackets as so: {John_Lennon}. It didn't work so I just put the name "test" in there, and it still didn't work. I am on windows, if that helps anything.

PostPosted: Sun Jan 08, 2012 07:14
by Gatharoth
its case sensitive, so the login name has to equal the name in the weperms.txt

so unless your login name for the server (including local) is "John_Lennon". Then idk. (if you're not using local, then you should also put it in the server's bin folder)

PostPosted: Sat Jan 14, 2012 22:17
by IPushButton2653
I still can't get it to work for me. Please help!!!

PostPosted: Sun Jan 15, 2012 00:02
by jordan4ibanez
this works..but its weird lol

PostPosted: Sun Jan 15, 2012 03:49
by IPushButton2653
This still isn't working for me!!! I put {John_Lennon} in the weperms.txt file inside the mod. And I still can't use the // commands :(

PostPosted: Sun Jan 15, 2012 08:41
by sfan5
weperms.txt must be inside your bin folder not in the mod folder

PostPosted: Thu Jan 19, 2012 00:13
by IPushButton2653
That explains all my problems. Thanks, and sorry for not replying sooner

PostPosted: Sun Jan 22, 2012 14:21
by copypaste
A //drain function for lava and water would really help a lot when fighting griefers.

PostPosted: Sun Jan 22, 2012 18:53
by sfan5
copypaste wrote:A //drain function for lava and water would really help a lot when fighting griefers.

I'll add that