[Mod] WorldEdit [1.0] [worldedit]

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

by Temperest » Sat Aug 18, 2012 04:54

Cylinders!

Image

I used the Bresenham Circle Algorithm, so it's amazingly fast. The solid dirt cylinder (length 100, radius 5) in the middle took about 2 seconds, while the outer glass hollow cylinder (length 100, radius 10) took less than a second. It's the //hollowcylinder and //cylinder commands, and both are documented in the README.

Additionally, the WorldEdit API has the added worldedit.hollow_cylinder and worldedit.cylinder functions, so anyone can use these routines in their own mods!

Spheres coming soon!
Last edited by Temperest on Sat Aug 18, 2012 04:55, edited 1 time in total.
WorldEdit 1.0 released

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

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

by sfan5 » Sat Aug 18, 2012 10:17

Awesome!
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

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

by Jordach » Sat Aug 18, 2012 10:21

Temperest wrote:Cylinders!

Image

I used the Bresenham Circle Algorithm, so it's amazingly fast. The solid dirt cylinder (length 100, radius 5) in the middle took about 2 seconds, while the outer glass hollow cylinder (length 100, radius 10) took less than a second. It's the //hollowcylinder and //cylinder commands, and both are documented in the README.

Additionally, the WorldEdit API has the added worldedit.hollow_cylinder and worldedit.cylinder functions, so anyone can use these routines in their own mods!

Spheres coming soon!

Cool, and don't use ALT+Prt Scrn. Make use of F12, just as long you are using Minetest.

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



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

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Sat Aug 18, 2012 12:53

Awesome! Thanks for making them available via api. Will be useful to be able to make an object/node that turns into a sphere of nodes. I think I may also use it to generate starting spheres in my skyblock game.

I have some requests...

1) //save and //load with support for node metadata
2) other shapes:
- spiralsquare - http://rosettacode.org/wiki/Spiral_matrix#Lua (i also requested this in multinode) -- great for floor/wall patterns, or perhaps mazes.
- rectangular pyramid -- perfect for roofs
- circular pyramid (cone) -- perfect for castle turrets
- triangular prism (triangle tube)
- hexagonal prism (6 sided tube)
- wedge (like a cube cut down the )
- torus (doughnut)

I know that's a lot, but it would be really cool to be able to generate different 3d shapes to help build the world.

Thanks again for this mod.
 

zzarko
New member
 
Posts: 9
Joined: Sun Aug 12, 2012 08:19

by zzarko » Sat Aug 18, 2012 17:39

Maybe this is not strictly mod-related, but I have a few questions:
- Is there a way to list available block names? Or, to see what's the name of the block under cursor?
- How can I know where are X and Z axes oriented? I often don't know in what direction will stacking be done (except when going up or down).
- When loading something, what will be the orientation (probably related to previous question)?

Thanks for the mod update!
 

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

by Temperest » Sat Aug 18, 2012 17:39

Jordach wrote:Cool, and don't use ALT+Prt Scrn. Make use of F12, just as long you are using Minetest.


Wasn't aware of that; I've tried F2 for screenshots (as it is in Minecraft), but it didn't do anything, so I assumed there was no screenshot function...


cornernote wrote:Awesome! Thanks for making them available via api. Will be useful to be able to make an object/node that turns into a sphere of nodes. I think I may also use it to generate starting spheres in my skyblock game.

I have some requests...

1) //save and //load with support for node metadata
2) other shapes:
- spiralsquare - http://rosettacode.org/wiki/Spiral_matrix#Lua (i also requested this in multinode) -- great for floor/wall patterns, or perhaps mazes.
- rectangular pyramid -- perfect for roofs
- circular pyramid (cone) -- perfect for castle turrets
- triangular prism (triangle tube)
- hexagonal prism (6 sided tube)
- wedge (like a cube cut down the )
- torus (doughnut)

I know that's a lot, but it would be really cool to be able to generate different 3d shapes to help build the world.

Thanks again for this mod.


1) It's on the todo list! As soon as I figure out a good way to go about it. And a way to maintain backwards compatibility with the current WorldEdit format.
2) Spheres are incoming, cones and pyramids on the todo list, and you can make the prism shapes using //stack. I'll see about adding spirals and torii if I can find the time to :)
WorldEdit 1.0 released

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

zzarko
New member
 
Posts: 9
Joined: Sun Aug 12, 2012 08:19

by zzarko » Sat Aug 18, 2012 17:40

Maybe this is not strictly mod-related, but I have a few questions:
- Is there a way to list available block names? Or, to see what's the name of the block under cursor?
- How can I know where are X and Z axes oriented? I often don't know in what direction will stacking be done (except when going up or down).
- When loading something, what will be the orientation (probably related to previous question)?

Thanks for the mod update!
 

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

by Temperest » Sat Aug 18, 2012 17:44

zzarko wrote:Maybe this is not strictly mod-related, but I have a few questions:
- Is there a way to list available block names? Or, to see what's the name of the block under cursor?
- How can I know where are X and Z axes oriented? I often don't know in what direction will stacking be done (except when going up or down).
- When loading something, what will be the orientation (probably related to previous question)?

Thanks for the mod update!


1) Yep, any mod is capable of determining the name of a given node. An item can be made to display the name of the pointed block, in fact. They're all in the minetest.registered_nodes table, IIRC.
2) Press F5. The debug info will tell you your orientation and coordinates. If necessary, I can also add a mode where the axis is determined by the direction the player is facing. In fact, it's on the todo list now and will be added if it turns out it's easy to use. EDIT: done!
3) Loading a save will cause it to be oriented exactly the same way as it was when it was saved. You can use //rotate to rotate it afterwards, though.
Last edited by Temperest on Sat Aug 18, 2012 18:49, edited 1 time in total.
WorldEdit 1.0 released

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

Blackthorne
Member
 
Posts: 78
Joined: Tue Aug 14, 2012 07:38

by Blackthorne » Sat Aug 18, 2012 17:52

Definitely one of my fave mods right now. Makes building huge structures in my home world so fast. :3
 

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

by Temperest » Sat Aug 18, 2012 18:49

Face direction axes!

Where an axis is accepted as part of the chat command, just type ? instead of x/y/z and it will use the direction you are facing as the axis!

For example, //stack ? 5 will stack the region 5 times in whatever direction is "forwards" for you. If you are not facing exactly in one axis, that's OK too, it'll pick the closest one.
WorldEdit 1.0 released

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

User avatar
Echo
Member
 
Posts: 121
Joined: Tue Jul 31, 2012 08:11

by Echo » Sat Aug 18, 2012 20:52

cornernote wrote:[...]2) other shapes:
- spiralsquare - http://rosettacode.org/wiki/Spiral_matrix#Lua (i also requested this in multinode) -- great for floor/wall patterns, or perhaps mazes.
[...]


Just finished my first version of the maze-generator.
Feel free to modify and add to worldedit.
 

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

by sfan5 » Sun Aug 19, 2012 07:42

cornernote wrote:- spiralsquare - http://rosettacode.org/wiki/Spiral_matrix#Lua (i also requested this in multinode) -- great for floor/wall patterns, or perhaps mazes.

Here, look at this:
https://github.com/Uberi/MineTest-WorldEdit/commit/e39493e789d77f98af4cdc17de21ca1ef0547571
Image
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

Eazi98
New member
 
Posts: 3
Joined: Sat Jun 16, 2012 12:01

by Eazi98 » Mon Aug 20, 2012 05:25

Lighting error unfixable? Whats with that? when you have a layer above air on top of another layer there will be a lighting error when you replace the top layer with air. Can you tell me what to do?
 

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

by sfan5 » Mon Aug 20, 2012 05:55

Eazi98 wrote:Lighting error unfixable? Whats with that? when you have a layer above air on top of another layer there will be a lighting error when you replace the top layer with air. Can you tell me what to do?

Use //dig
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
tonyka
Member
 
Posts: 320
Joined: Sat Jun 16, 2012 04:08

by tonyka » Fri Aug 24, 2012 09:55

I'm trying to make a game mode based on Avatar ...
And I would ask, could create schemas in the generation of the world? ...
would be great to create the floating islands of Pandora and the mother tree ...
My mod: [MOD]3D Forniture 1.0
Download: 3DForniture_v_1.0.zip
Page development (European Castilian):
Moviliario 3D (proyecto 3D Forniture)
 

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

by sfan5 » Fri Aug 24, 2012 12:32

You can use it, use the WorldEdit API
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
tonyka
Member
 
Posts: 320
Joined: Sat Jun 16, 2012 04:08

by tonyka » Fri Aug 24, 2012 18:18

thank you!
I'll try ...
My mod: [MOD]3D Forniture 1.0
Download: 3DForniture_v_1.0.zip
Page development (European Castilian):
Moviliario 3D (proyecto 3D Forniture)
 

2cool4me4
Member
 
Posts: 16
Joined: Sat Aug 25, 2012 22:16

by 2cool4me4 » Thu Aug 30, 2012 21:26

Resurrection! Sorta.

Anyway, Worldedit newest git doesn't seem to like Mintest 0.4.2 rc1 or the newest git, giving an error on loading the init.lua. I just recently found the rest of the eror in the debug.txt. The text in the debug.txt:
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
INFO[main]:   [MineTest-WorldEdit] ["C:\Users\Dalton\Minetest\minetest-0.4.2-latest\bin\..\mods\minetest\MineTest-WorldEdit\init.lua"]
14:13:45: ERROR[main]: Error loading mod "MineTest-WorldEdit": modname does not follow naming conventions: Only chararacters [a-z0-9_] are allowed.
14:13:45: ERROR[main]: Server: Failed to load and run C:\Users\Dalton\Minetest\minetest-0.4.2-latest\bin\..\mods\minetest\MineTest-WorldEdit\init.lua
I have done NOTHING!
 

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

by Temperest » Thu Aug 30, 2012 21:37

Name the folder "worldedit", not whatever it is that you named it there.
WorldEdit 1.0 released

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

2cool4me4
Member
 
Posts: 16
Joined: Sat Aug 25, 2012 22:16

by 2cool4me4 » Fri Aug 31, 2012 00:44

That... works. Thanks, Temperest!
I have done NOTHING!
 

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Mon Sep 17, 2012 11:27

I have made an extension to the player inventory to allow the player access to additional GUI screens. I made a quick mod here as an example:
http://minetest.net/forum/viewtopic.php?id=3101

I am thinking about creating a GUI for worldedit, however im not sure i'll have the time. If someone wants to work on it, please make it work with Inventory Plus

EDIT, i made the GUI:
http://minetest.net/forum/viewtopic.php?id=3112
Last edited by cornernote on Tue Sep 18, 2012 07:14, edited 1 time in total.
 

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

by Temperest » Wed Sep 19, 2012 01:16

Neat! I think it should stay a separate mod to reduce dependencies and keep everything modular.

Will definitely be using that, very nifty.
WorldEdit 1.0 released

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

fgr
Member
 
Posts: 85
Joined: Mon Sep 17, 2012 08:22

by fgr » Wed Sep 19, 2012 08:02

you guys rock! but wouldnt it be better to merge the worldedit and worldedit gui into one? This could solve the depencies problem. Lets guess a new release will kicked out and the gui isnt able to handle for some reasons ... just a thinking of ...
Last edited by fgr on Wed Sep 19, 2012 08:02, edited 1 time in total.
 

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Wed Sep 19, 2012 08:24

i think its better to be modular, the only difference would be that you only have to download 1 file... but the gui has another dependency too (inventory_plus), and including all these things in WE would be messy.
 

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Mon Sep 24, 2012 00:35

[request]

can we have a sphere shape?

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
-- sphere or hollow sphere - (based on sphere+hollowsphere in multinode by mauvebic)
make_sphere =  function(pos,radius,nodename,hollow)
    pos.x = math.floor(pos.x+0.5)
    pos.y = math.floor(pos.y+0.5)
    pos.z = math.floor(pos.z+0.5)
    for x=-radius,radius do
    for y=-radius,radius do
    for z=-radius,radius do
        if hollow ~= nil then
            if x*x+y*y+z*z >= (radius-hollow) * (radius-hollow) + (radius-hollow) and x*x+y*y+z*z <= radius * radius + radius then
                minetest.env:add_node({x=pos.x+x,y=pos.y+y,z=pos.z+z},{name=nodename})
            end
        else
            if x*x+y*y+z*z <= radius * radius + radius then
                minetest.env:add_node({x=pos.x+x,y=pos.y+y,z=pos.z+z},{name=nodename})
            end
        end
    end
    end
    end
end
Last edited by cornernote on Mon Sep 24, 2012 00:36, edited 1 time in total.
 

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Mon Sep 24, 2012 00:44

[request]

i would like to be able to draw a cylinder with a negative length (eg, -100). at the moment this does not render any nodes, it should start from 0 and go backwards.

p.s. when i have some time i'll look at it if nobody else has by then, just noting these issues here so i dont forget.
 

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

by Temperest » Tue Sep 25, 2012 21:07

cornernote wrote:[request]

i would like to be able to draw a cylinder with a negative length (eg, -100). at the moment this does not render any nodes, it should start from 0 and go backwards.

p.s. when i have some time i'll look at it if nobody else has by then, just noting these issues here so i dont forget.


Done!

Edit: forgot about the sphere shape, I'm looking it over, feel free to make a pull request in the meantime.
Last edited by Temperest on Tue Sep 25, 2012 21:08, edited 1 time in total.
WorldEdit 1.0 released

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

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

by Temperest » Tue Sep 25, 2012 22:45

Spheres! Commit.

I sped up the spheres code significantly, but it could still use some improvements with larger dimensions. Thanks to cornernote for the original code.

Edit: thanks to mauvebic, for awesome spherical action!
Last edited by Temperest on Wed Sep 26, 2012 00:49, edited 1 time in total.
WorldEdit 1.0 released

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

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Wed Sep 26, 2012 00:38

Temperest wrote:Spheres! Commit.

I sped up the spheres code significantly, but it could still use some improvements with larger dimensions. Thanks to cornernote for the original code.


No, thanks to mauvebic. It's his code, I just merged 2 functions into 1. These lines are the keys:

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
-- detect sphere/hollow sphere area
if x*x+y*y+z*z >= (radius-hollow) * (radius-hollow) + (radius-hollow) and x*x+y*y+z*z <= radius * radius + radius then ... end
if x*x+y*y+z*z <= radius * radius + radius then ... end


Without those I wouldn't have a clue how to make a sphere.
Last edited by cornernote on Wed Sep 26, 2012 00:39, edited 1 time in total.
 

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Wed Sep 26, 2012 01:56

spiral does not seem to work: http://youtu.be/nLLyVpt2Ufw
 

PreviousNext

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 82 guests

cron