[Mod] Deploy Nodes [deploy_nodes] nodes that turn into big structures
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
[Mod] Deploy Nodes [deploy_nodes] nodes that turn into big structures
Deploy Nodes for Minetest
Craftable nodes that when placed turn into shapes or structures.
Documentation | GitHub Project
Requirements
About
This module is open source, so it's distributed freely. If you find it useful then I ask not for your wealth, but simply to spare your time to consider the world we share by watching Earthlings, a multi-award winning film available to watch online for free. A must-see for anyone who wishes to make the world a better place.
Credits
mauvebic - author of multinode which provided code for spheres and cylinders
Echo - author of maze which provided code for spheres
Temperest - autory of worldedit which provided code for pyramids
neko259 - author of livehouse which inspired building spawning
VanessaE - contributed buildings
kddekadenz - contributed buildings
ACDC - contributed buildings
Nanuk - contributed buildings
irksomeduck - contributed buildings
License
BSD-3-Clause, Copyright © 2014 Brett O'Donnell
Craftable nodes that when placed turn into shapes or structures.
Documentation | GitHub Project
Requirements
About
This module is open source, so it's distributed freely. If you find it useful then I ask not for your wealth, but simply to spare your time to consider the world we share by watching Earthlings, a multi-award winning film available to watch online for free. A must-see for anyone who wishes to make the world a better place.
Credits
mauvebic - author of multinode which provided code for spheres and cylinders
Echo - author of maze which provided code for spheres
Temperest - autory of worldedit which provided code for pyramids
neko259 - author of livehouse which inspired building spawning
VanessaE - contributed buildings
kddekadenz - contributed buildings
ACDC - contributed buildings
Nanuk - contributed buildings
irksomeduck - contributed buildings
License
BSD-3-Clause, Copyright © 2014 Brett O'Donnell
Last edited by cornernote on Tue Apr 08, 2014 05:30, edited 1 time in total.
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
its not really indended to call the shape function in lua, its more intended that you craft a sphere node, like this:
then you place it, and you get a sphere.
if you want to make a sphere using an API, worldedit will be better
Code: Select all
-M- M=dirt/wood/brick/cobble/stone/glass
MMM make bigger spheres by using small spere as the material
-M-
if you want to make a sphere using an API, worldedit will be better
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
- VanessaE
- Moderator
- Posts: 4655
- Joined: Sun Apr 01, 2012 12:38
- GitHub: VanessaE
- IRC: VanessaE
- In-game: VanessaE
- Location: Western NC
- Contact:
The suggested wood and glass sphere recipes conflict with round wood and glass tables in Homedecor, just FYI :-)
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
okay now check everything and its working, just some probs with the large building, cause i dont finde space to place that...
a suggestion from my side:
maybe its possible to choose a building with a kind of function. maybe have different recipies (paper or craftplan) so its possible to choose the building you want.
so you have a block for a bulding (small, medium, big) and then add a craftplan to choose the type of house.
anyway its a gread tool for minetest, somebody should programm a editor for the building.... i guess when i start doing this a lot of ppl are again faster then me....hehehe...
a suggestion from my side:
maybe its possible to choose a building with a kind of function. maybe have different recipies (paper or craftplan) so its possible to choose the building you want.
so you have a block for a bulding (small, medium, big) and then add a craftplan to choose the type of house.
anyway its a gread tool for minetest, somebody should programm a editor for the building.... i guess when i start doing this a lot of ppl are again faster then me....hehehe...
++++ Kung walang tiyaga, walang nilaga. ++++
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
i was thinking about a mod to add to this pack that kindof does that... very much the same as the deploy_building mod, except it does not auto-deploy. you have to right click it (it opens like a chest), and there is a button added for each building found in the folder. you click which one you want, it checks space then builds
sounds good, maybe you add a kind of function to organize buildings so its easy to add more buildings of the *we type.
maybe a textfile where the buildingstypes can be added. so at the start this file is read and then all availible builldingtypes.
in this way you dont need 3 different folders...
also you should check what kind of building type is placed, just imagine somebody take a big building in the small building folder, i am not sure how the checking works for the space... maybe thiss could be a problem.
can you pls explain the format of the *we fille a bit more..
-1 0 -1 default:wood 0 0 <= thats to place one block whats the 0 0 behind the wood ?
maybe a textfile where the buildingstypes can be added. so at the start this file is read and then all availible builldingtypes.
in this way you dont need 3 different folders...
also you should check what kind of building type is placed, just imagine somebody take a big building in the small building folder, i am not sure how the checking works for the space... maybe thiss could be a problem.
can you pls explain the format of the *we fille a bit more..
-1 0 -1 default:wood 0 0 <= thats to place one block whats the 0 0 behind the wood ?
++++ Kung walang tiyaga, walang nilaga. ++++
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
its even easier than that, no txt file needed... just put them in the folder and they will be detected and made into a button on the deploy node
the 0 0 is param1, param2
eg:
local node = {}
node.name = name
node.param1 = param1
node.param2 = param2
minetest.env:add_node(pos, node)
Oh, i should note... you make *.we files using worldedit mod.
the 0 0 is param1, param2
eg:
local node = {}
node.name = name
node.param1 = param1
node.param2 = param2
minetest.env:add_node(pos, node)
Oh, i should note... you make *.we files using worldedit mod.
Last edited by cornernote on Wed Sep 26, 2012 09:36, edited 1 time in total.
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
i have had a think about this and decided i probably wont do it. if you want to load a specific building in a specific place then worldedit is probably better.cornernote wrote:i was thinking about a mod to add to this pack that kindof does that... very much the same as the deploy_building mod, except it does not auto-deploy. you have to right click it (it opens like a chest), and there is a button added for each building found in the folder. you click which one you want, it checks space then builds
Could you implement... cones? 4:1, 3:1, 2:1, 1:1, 1:2, 1:3, 1:4 height to diameter ratios.
my mods: infrastructure_modpack | papyrus_bed | papyrus_door my blog: radekslowik.pl
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
I think there are three changes:
1. two more variables to detect dead ends (two new lines)
old:
new:
2. set generation direction "forward" (one new line)
old:
new:
3. dectect dead ends and remove them if possible with 20% chance (math.random(5) == 1 -- 100% would be too easy again)
old:
new:
Maybe it would be better to make it braid only for medium and large mazes. For small mazes it could open too many ways to the exit instead of confusing the player.
1. two more variables to detect dead ends (two new lines)
old:
Code: Select all
local pos = {x = 0, y = 0, l = 0}
table.insert(moves, {x = pos_x, y = pos_y, l = pos_l})
Code: Select all
local pos = {x = 0, y = 0, l = 0}
local forward = true
local dead_end = {}
table.insert(moves, {x = pos_x, y = pos_y, l = pos_l})
old:
Code: Select all
if #possible_ways > 0 then
direction = possible_ways[math.random(# possible_ways)]
Code: Select all
if #possible_ways > 0 then
forward = true
direction = possible_ways[math.random(# possible_ways)]
old:
Code: Select all
else
pos = table.remove(moves)
pos_x = pos.x
pos_y = pos.y
pos_l = pos.l
end
until pos_x == start_x and pos_y == start_y
-- create exit on opposite end of maze and make sure it is reachable
Code: Select all
else -- there is no possible way forward
if forward then -- the last step was forward, now back, so we're in a dead end
-- mark dead end for possible braid
if not maze[pos_l][pos_x - 1][pos_y] then -- dead end to E, only way is W
table.insert(dead_end, {x = pos_x, y = pos_y, l = pos_l, dx = 1, dy = 0})
elseif not maze[pos_l][pos_x + 1][pos_y] then -- dead end to W, only way is E
table.insert(dead_end, {x = pos_x, y = pos_y, l = pos_l, dx = -1, dy = 0})
elseif not maze[pos_l][pos_x][pos_y - 1] then -- dead end to S, only way is N
table.insert(dead_end, {x = pos_x, y = pos_y, l = pos_l, dx = 0, dy = 1})
elseif not maze[pos_l][pos_x][pos_y + 1] then -- dead end to N, only way is S
table.insert(dead_end, {x = pos_x, y = pos_y, l = pos_l, dx = 0, dy = -1})
end
forward = false
end
pos = table.remove(moves)
pos_x = pos.x
pos_y = pos.y
pos_l = pos.l
end
until pos_x == start_x and pos_y == start_y
-- create partial braid maze, about 20%
for _, braid_pos in pairs(dead_end) do
-- print(braid_pos.x.."/"..braid_pos.y.."/"..braid_pos.l.." "..braid_pos.dx.."/"..braid_pos.dy)
x = braid_pos.x + braid_pos.dx * 2
y = braid_pos.y + braid_pos.dy * 2
if math.random(5) == 1 and x > 0 and x < maze_size_x - 1 and y > 0 and y < maze_size_y - 1 and not maze[braid_pos.l][x][y] then
-- remove wall if behind is corridor with 20% chance
maze[braid_pos.l][braid_pos.x + braid_pos.dx][braid_pos.y + braid_pos.dy] = false
-- print("removed "..braid_pos.l.."/"..braid_pos.x + braid_pos.dx.."/"..braid_pos.y + braid_pos.dy)
end
end
-- create exit on opposite end of maze and make sure it is reachable
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
Who is online
Users browsing this forum: No registered users and 32 guests