Page 1 of 1
[mod] livehouse [0.1.0]

Posted:
Sun Apr 15, 2012 17:18
by neko259
This mod is for creating starting house kits (or not starting...). You can craft a kit block and place it somewhere in the world. In ~10min it will spawn to a random house taken from structures.txt (example definition is included). You can write any house structure to that file (even mountain, river or forest :3).
Download: https://bitbucket.org/neko259/livehouse/downloads/livehouse-0.1.0.tar.bz2Repository: https://bitbucket.org/neko259/livehouse/overviewLicense: GPLv3.
Crafting
Some screens
Please give me your structure schemes. If they will be really good, I will add them to the example structures.txt file :)

Posted:
Sun Apr 15, 2012 17:25
by RabbiBob
Sweet!
Is "0 0 0" relative to where the is dropped livehouse:kit, and then goes out directionally (x,y.z) from there?

Posted:
Sun Apr 15, 2012 17:26
by neko259
RabbiBob wrote:Sweet!
Is "0 0 0" relative to where the is dropped livehouse:kit, and then goes out directionally (x,y.z) from there?
Yes. For example, 0 1 0 is a node above the kit.

Posted:
Sun Apr 15, 2012 17:28
by RabbiBob
Great, thanks. Very interested in prefab distribution and this may do what I want perfectly.
BTW, one more post and you're evil (666).

Posted:
Sun Apr 15, 2012 17:31
by neko259
RabbiBob wrote:Great, thanks. Very interested in prefab distribution and this may do what I want perfectly.
BTW, one more post and you're evil (666).
EEEVVVIIIILLLLLLLL!

Posted:
Sun Apr 15, 2012 17:39
by neko259
BTW, I can add commands to place a specific structure (not random) from structures file, if somebody needs that. But not this week, I'm too tired today :)

Posted:
Mon Apr 16, 2012 17:17
by lkjoel
I'm basing my mod (nether) on this :). Except it uses arrays and objects instead of parsing a file.

Posted:
Mon Apr 16, 2012 17:18
by neko259
lkjoel wrote:I'm basing my mod (nether) on this :). Except it uses arrays and objects instead of parsing a file.
Can you give me an example?

Posted:
Mon Apr 16, 2012 17:56
by lkjoel
Structures.lua:
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
...
STRUCTURE = {
{pos={x=0,y=0,z=0}, block="default:mese"},
{pos={x=0,y=1,z=0}, block="default:stone"},
}
...
STRUCTURES = {
STRUCTURE,
}
Parser:
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
...
dofile (minetest.get_modpath("MOD") .. "/structures.lua") -- Notice ".lua"
...
for i,v in ipairs(STRUCTURES[structure]) do -- Replace structure with the structure ID
minetest.env:add_node(v.pos, {name=v.block})
end
...

Posted:
Mon Apr 16, 2012 17:58
by neko259
Nice. But it requires more text and results in larger file. I think I also need to add a possibility to define geometric shapes, cause there will be too much points for large structures.

Posted:
Mon Apr 16, 2012 18:14
by lkjoel
Yeah, it does require more text. The good side is that it's a LOT faster, because it doesn't have to parse anything.

Posted:
Mon Apr 16, 2012 18:26
by neko259
lkjoel wrote:Yeah, it does require more text. The good side is that it's a LOT faster, because it doesn't have to parse anything.
But you have to hold the structures in memory all the time, and I parse the file on every ABM run. I can move the 'parsing' code to mod loading, but then it will consume more memory.

Posted:
Mon Apr 16, 2012 20:07
by lkjoel
yeah, it's a tradeoff.

Posted:
Thu Jul 26, 2012 17:14
by cornernote
I made some additional structures...
3x the same as the default, with different door opening directions
4x the same as the default with a castle roof
4x the same as the default with a pointed roof
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
# Wooden cross - direction 1
; Floor 1
-1 0 -1 default:wood
-1 0 0 default:wood
-1 0 1 default:wood
0 0 -1 default:wood
0 0 0 default:wood
0 0 1 default:wood
1 0 -1 default:wood
1 0 0 default:wood
1 0 1 default:wood
; Floor 2
-1 1 -1 default:wood
-1 1 1 default:wood
0 1 -1 default:wood
0 1 1 default:wood
1 1 -1 default:wood
1 1 0 default:wood
1 1 1 default:wood
; Floor 3
-1 2 -1 default:wood
-1 2 1 default:wood
0 2 -1 default:glass
0 2 1 default:glass
1 2 -1 default:wood
1 2 0 default:wood
1 2 1 default:wood
; Floor 4
-1 3 -1 default:stone
-1 3 0 default:stone
-1 3 1 default:stone
0 3 -1 default:stone
0 3 0 default:stone
0 3 1 default:stone
1 3 -1 default:stone
1 3 0 default:stone
1 3 1 default:stone
# Wooden cross - direction 2
; Floor 1
-1 0 -1 default:wood
-1 0 0 default:wood
-1 0 1 default:wood
0 0 -1 default:wood
0 0 0 default:wood
0 0 1 default:wood
1 0 -1 default:wood
1 0 0 default:wood
1 0 1 default:wood
; Floor 2
-1 1 -1 default:wood
-1 1 0 default:wood
-1 1 1 default:wood
0 1 -1 default:wood
0 1 1 default:wood
1 1 -1 default:wood
1 1 1 default:wood
; Floor 3
-1 2 -1 default:wood
-1 2 0 default:wood
-1 2 1 default:wood
0 2 -1 default:glass
0 2 1 default:glass
1 2 -1 default:wood
1 2 1 default:wood
; Floor 4
-1 3 -1 default:stone
-1 3 0 default:stone
-1 3 1 default:stone
0 3 -1 default:stone
0 3 0 default:stone
0 3 1 default:stone
1 3 -1 default:stone
1 3 0 default:stone
1 3 1 default:stone
# Wooden cross - direction 3
; Floor 1
-1 0 -1 default:wood
-1 0 0 default:wood
-1 0 1 default:wood
0 0 -1 default:wood
0 0 0 default:wood
0 0 1 default:wood
1 0 -1 default:wood
1 0 0 default:wood
1 0 1 default:wood
; Floor 2
-1 1 -1 default:wood
-1 1 0 default:wood
-1 1 1 default:wood
0 1 1 default:wood
1 1 -1 default:wood
1 1 0 default:wood
1 1 1 default:wood
; Floor 3
-1 2 -1 default:wood
-1 2 0 default:glass
-1 2 1 default:wood
0 2 1 default:wood
1 2 -1 default:wood
1 2 0 default:glass
1 2 1 default:wood
; Floor 4
-1 3 -1 default:stone
-1 3 0 default:stone
-1 3 1 default:stone
0 3 -1 default:stone
0 3 0 default:stone
0 3 1 default:stone
1 3 -1 default:stone
1 3 0 default:stone
1 3 1 default:stone
# Wooden cross - direction 4
; Floor 1
-1 0 -1 default:wood
-1 0 0 default:wood
-1 0 1 default:wood
0 0 -1 default:wood
0 0 0 default:wood
0 0 1 default:wood
1 0 -1 default:wood
1 0 0 default:wood
1 0 1 default:wood
; Floor 2
-1 1 -1 default:wood
-1 1 0 default:wood
-1 1 1 default:wood
0 1 -1 default:wood
1 1 -1 default:wood
1 1 0 default:wood
1 1 1 default:wood
; Floor 3
-1 2 -1 default:wood
-1 2 0 default:glass
-1 2 1 default:wood
0 2 -1 default:wood
1 2 -1 default:wood
1 2 0 default:glass
1 2 1 default:wood
; Floor 4
-1 3 -1 default:stone
-1 3 0 default:stone
-1 3 1 default:stone
0 3 -1 default:stone
0 3 0 default:stone
0 3 1 default:stone
1 3 -1 default:stone
1 3 0 default:stone
1 3 1 default:stone
# Wooden cross - with castle roof - direction 1
; Floor 1
-1 0 -1 default:wood
-1 0 0 default:wood
-1 0 1 default:wood
0 0 -1 default:wood
0 0 0 default:wood
0 0 1 default:wood
1 0 -1 default:wood
1 0 0 default:wood
1 0 1 default:wood
; Floor 2
-1 1 -1 default:wood
-1 1 1 default:wood
0 1 -1 default:wood
0 1 1 default:wood
1 1 -1 default:wood
1 1 0 default:wood
1 1 1 default:wood
; Floor 3
-1 2 -1 default:wood
-1 2 1 default:wood
0 2 -1 default:glass
0 2 1 default:glass
1 2 -1 default:wood
1 2 0 default:wood
1 2 1 default:wood
; Floor 4
-1 3 -1 default:stone
-1 3 0 default:stone
-1 3 1 default:stone
0 3 -1 default:stone
0 3 0 default:stone
0 3 1 default:stone
1 3 -1 default:stone
1 3 0 default:stone
1 3 1 default:stone
; Floor 5
-1 4 -1 default:stone
-1 4 1 default:stone
1 4 -1 default:stone
1 4 1 default:stone
# Wooden cross - with castle roof - direction 2
; Floor 1
-1 0 -1 default:wood
-1 0 0 default:wood
-1 0 1 default:wood
0 0 -1 default:wood
0 0 0 default:wood
0 0 1 default:wood
1 0 -1 default:wood
1 0 0 default:wood
1 0 1 default:wood
; Floor 2
-1 1 -1 default:wood
-1 1 0 default:wood
-1 1 1 default:wood
0 1 -1 default:wood
0 1 1 default:wood
1 1 -1 default:wood
1 1 1 default:wood
; Floor 3
-1 2 -1 default:wood
-1 2 0 default:wood
-1 2 1 default:wood
0 2 -1 default:glass
0 2 1 default:glass
1 2 -1 default:wood
1 2 1 default:wood
; Floor 4
-1 3 -1 default:stone
-1 3 0 default:stone
-1 3 1 default:stone
0 3 -1 default:stone
0 3 0 default:stone
0 3 1 default:stone
1 3 -1 default:stone
1 3 0 default:stone
1 3 1 default:stone
; Floor 5
-1 4 -1 default:stone
-1 4 1 default:stone
1 4 -1 default:stone
1 4 1 default:stone
# Wooden cross - with castle roof - direction 3
; Floor 1
-1 0 -1 default:wood
-1 0 0 default:wood
-1 0 1 default:wood
0 0 -1 default:wood
0 0 0 default:wood
0 0 1 default:wood
1 0 -1 default:wood
1 0 0 default:wood
1 0 1 default:wood
; Floor 2
-1 1 -1 default:wood
-1 1 0 default:wood
-1 1 1 default:wood
0 1 1 default:wood
1 1 -1 default:wood
1 1 0 default:wood
1 1 1 default:wood
; Floor 3
-1 2 -1 default:wood
-1 2 0 default:glass
-1 2 1 default:wood
0 2 1 default:wood
1 2 -1 default:wood
1 2 0 default:glass
1 2 1 default:wood
; Floor 4
-1 3 -1 default:stone
-1 3 0 default:stone
-1 3 1 default:stone
0 3 -1 default:stone
0 3 0 default:stone
0 3 1 default:stone
1 3 -1 default:stone
1 3 0 default:stone
1 3 1 default:stone
; Floor 5
-1 4 -1 default:stone
-1 4 1 default:stone
1 4 -1 default:stone
1 4 1 default:stone
# Wooden cross - with castle roof - direction 4
; Floor 1
-1 0 -1 default:wood
-1 0 0 default:wood
-1 0 1 default:wood
0 0 -1 default:wood
0 0 0 default:wood
0 0 1 default:wood
1 0 -1 default:wood
1 0 0 default:wood
1 0 1 default:wood
; Floor 2
-1 1 -1 default:wood
-1 1 0 default:wood
-1 1 1 default:wood
0 1 -1 default:wood
1 1 -1 default:wood
1 1 0 default:wood
1 1 1 default:wood
; Floor 3
-1 2 -1 default:wood
-1 2 0 default:glass
-1 2 1 default:wood
0 2 -1 default:wood
1 2 -1 default:wood
1 2 0 default:glass
1 2 1 default:wood
; Floor 4
-1 3 -1 default:stone
-1 3 0 default:stone
-1 3 1 default:stone
0 3 -1 default:stone
0 3 0 default:stone
0 3 1 default:stone
1 3 -1 default:stone
1 3 0 default:stone
1 3 1 default:stone
; Floor 5
-1 4 -1 default:stone
-1 4 1 default:stone
1 4 -1 default:stone
1 4 1 default:stone
# Wooden cross - with pointy roof - direction 1
; Floor 1
-1 0 -1 default:wood
-1 0 0 default:wood
-1 0 1 default:wood
0 0 -1 default:wood
0 0 0 default:wood
0 0 1 default:wood
1 0 -1 default:wood
1 0 0 default:wood
1 0 1 default:wood
; Floor 2
-1 1 -1 default:wood
-1 1 1 default:wood
0 1 -1 default:wood
0 1 1 default:wood
1 1 -1 default:wood
1 1 0 default:wood
1 1 1 default:wood
; Floor 3
-1 2 -1 default:wood
-1 2 1 default:wood
0 2 -1 default:glass
0 2 1 default:glass
1 2 -1 default:wood
1 2 0 default:wood
1 2 1 default:wood
; Floor 4
-1 3 -1 default:stone
-1 3 0 default:stone
-1 3 1 default:stone
0 3 -1 default:stone
0 3 0 default:stone
0 3 1 default:stone
1 3 -1 default:stone
1 3 0 default:stone
1 3 1 default:stone
; Floor 5
0 4 0 default:stone
# Wooden cross - with pointy roof - direction 2
; Floor 1
-1 0 -1 default:wood
-1 0 0 default:wood
-1 0 1 default:wood
0 0 -1 default:wood
0 0 0 default:wood
0 0 1 default:wood
1 0 -1 default:wood
1 0 0 default:wood
1 0 1 default:wood
; Floor 2
-1 1 -1 default:wood
-1 1 0 default:wood
-1 1 1 default:wood
0 1 -1 default:wood
0 1 1 default:wood
1 1 -1 default:wood
1 1 1 default:wood
; Floor 3
-1 2 -1 default:wood
-1 2 0 default:wood
-1 2 1 default:wood
0 2 -1 default:glass
0 2 1 default:glass
1 2 -1 default:wood
1 2 1 default:wood
; Floor 4
-1 3 -1 default:stone
-1 3 0 default:stone
-1 3 1 default:stone
0 3 -1 default:stone
0 3 0 default:stone
0 3 1 default:stone
1 3 -1 default:stone
1 3 0 default:stone
1 3 1 default:stone
; Floor 5
0 4 0 default:stone
# Wooden cross - with pointy roof - direction 3
; Floor 1
-1 0 -1 default:wood
-1 0 0 default:wood
-1 0 1 default:wood
0 0 -1 default:wood
0 0 0 default:wood
0 0 1 default:wood
1 0 -1 default:wood
1 0 0 default:wood
1 0 1 default:wood
; Floor 2
-1 1 -1 default:wood
-1 1 0 default:wood
-1 1 1 default:wood
0 1 1 default:wood
1 1 -1 default:wood
1 1 0 default:wood
1 1 1 default:wood
; Floor 3
-1 2 -1 default:wood
-1 2 0 default:glass
-1 2 1 default:wood
0 2 1 default:wood
1 2 -1 default:wood
1 2 0 default:glass
1 2 1 default:wood
; Floor 4
-1 3 -1 default:stone
-1 3 0 default:stone
-1 3 1 default:stone
0 3 -1 default:stone
0 3 0 default:stone
0 3 1 default:stone
1 3 -1 default:stone
1 3 0 default:stone
1 3 1 default:stone
; Floor 5
0 4 0 default:stone
# Wooden cross - with pointy roof - direction 4
; Floor 1
-1 0 -1 default:wood
-1 0 0 default:wood
-1 0 1 default:wood
0 0 -1 default:wood
0 0 0 default:wood
0 0 1 default:wood
1 0 -1 default:wood
1 0 0 default:wood
1 0 1 default:wood
; Floor 2
-1 1 -1 default:wood
-1 1 0 default:wood
-1 1 1 default:wood
0 1 -1 default:wood
1 1 -1 default:wood
1 1 0 default:wood
1 1 1 default:wood
; Floor 3
-1 2 -1 default:wood
-1 2 0 default:glass
-1 2 1 default:wood
0 2 -1 default:wood
1 2 -1 default:wood
1 2 0 default:glass
1 2 1 default:wood
; Floor 4
-1 3 -1 default:stone
-1 3 0 default:stone
-1 3 1 default:stone
0 3 -1 default:stone
0 3 0 default:stone
0 3 1 default:stone
1 3 -1 default:stone
1 3 0 default:stone
1 3 1 default:stone
; Floor 5
0 4 0 default:stone

Posted:
Thu Oct 18, 2012 17:38
by pompom
why don't use world edit file (.we)

Posted:
Thu Oct 18, 2012 19:00
by OryHara
what i usually do in minecraft, same as minetest, i build a 7x7x10 2 floor house with cobblestone acting as a foundation, lol.
wood walls and floors, and cobblestone after the wood walls are 3 blocks high

Posted:
Wed Oct 24, 2012 18:34
by Dragonop
what is the brown block behind the glass in the crafting screenshot

Posted:
Wed Oct 24, 2012 19:03
by Topywo
Dragonop wrote:what is the brown block behind the glass in the crafting screenshot
The brown block under the glass is an older texture version of mese of the standard minetest textures.

Posted:
Wed Oct 24, 2012 20:25
by Dragonop
O: tanks

Posted:
Wed Oct 24, 2012 20:30
by Dragonop
there is an error with init.lua D:

Posted:
Mon Jan 28, 2013 00:01
by Jalo
Why no update?

Posted:
Mon Jan 28, 2013 05:31
by neko259
Jalo wrote:Why no update?
I don't have enough time to work on both mods, so I work only on nature for now. Sorry.

Posted:
Tue Apr 08, 2014 12:12
by JPRuehmann
Hello
Like to try it out but get the following error.
22:47:01: ERROR[main]: ========== ERROR FROM LUA ===========
22:47:01: ERROR[main]: Failed to load and run script from
22:47:01: ERROR[main]: /home/ruehmann/.minetest/mods/livehouse/init.lua:
22:47:01: ERROR[main]: /home/ruehmann/.minetest/mods/livehouse/kit.lua:9: attempt to index global 'default' (a nil value)
22:47:01: ERROR[main]: stack traceback:
22:47:01: ERROR[main]: /home/ruehmann/.minetest/mods/livehouse/kit.lua:9: in main chunk
22:47:01: ERROR[main]: [C]: in function 'dofile'
22:47:01: ERROR[main]: /home/ruehmann/.minetest/mods/livehouse/init.lua:8: in main chunk
22:47:01: ERROR[main]: ======= END OF ERROR FROM LUA ========
22:47:01: ERROR[main]: Server: Failed to load and run /home/ruehmann/.minetest/mods/livehouse/init.lua
22:47:01: ERROR[main]: ModError: ModError: Failed to load and run /home/ruehmann/.minetest/mods/livehouse/init.lua
Could you please fix it?
tganks,
JPR