[mod] livehouse [0.1.0]
[mod] livehouse [0.1.0]
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 ... .0.tar.bz2
Repository: https://bitbucket.org/neko259/livehouse/overview
License: 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
Download: https://bitbucket.org/neko259/livehouse ... .0.tar.bz2
Repository: https://bitbucket.org/neko259/livehouse/overview
License: 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
Last edited by neko259 on Sun Apr 15, 2012 17:40, edited 1 time in total.
s3tuPDfUv2IyvXHzPmE31MQvnWULv1zj
I'm basing my mod (nether) on this . Except it uses arrays and objects instead of parsing a file.
My mods: The Nether | Doctor Who (WIP)
I have quit minetest ... again. I am heavily unimpressed by both the game and the community.
I have quit minetest ... again. I am heavily unimpressed by both the game and the community.
Structures.lua:
Parser:
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,
}
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
...
My mods: The Nether | Doctor Who (WIP)
I have quit minetest ... again. I am heavily unimpressed by both the game and the community.
I have quit minetest ... again. I am heavily unimpressed by both the game and the community.
Yeah, it does require more text. The good side is that it's a LOT faster, because it doesn't have to parse anything.
My mods: The Nether | Doctor Who (WIP)
I have quit minetest ... again. I am heavily unimpressed by both the game and the community.
I have quit minetest ... again. I am heavily unimpressed by both the game and the community.
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.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.
s3tuPDfUv2IyvXHzPmE31MQvnWULv1zj
yeah, it's a tradeoff.
My mods: The Nether | Doctor Who (WIP)
I have quit minetest ... again. I am heavily unimpressed by both the game and the community.
I have quit minetest ... again. I am heavily unimpressed by both the game and the community.
-
- Member
- Posts: 844
- Joined: Wed Jul 11, 2012 15:02
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
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
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
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
wood walls and floors, and cobblestone after the wood walls are 3 blocks high
Last edited by OryHara on Thu Oct 18, 2012 19:01, edited 1 time in total.
- JPRuehmann
- Member
- Posts: 334
- Joined: Fri Mar 21, 2014 21:40
- Location: Germany
- Contact:
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
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
Who is online
Users browsing this forum: No registered users and 55 guests