LVM/PM conversion

master
paramat 2013-12-29 09:08:39 +00:00
parent 765c182542
commit 221be80854
5 changed files with 738 additions and 760 deletions

View File

@ -1,54 +1,10 @@
Moonrealm 0.4.2 by paramat
For latest stable Minetest compatible back to 0.4.6
Moonrealm 0.5.0 by paramat
For latest stable Minetest and back to 0.4.8
Depends default
Licenses: Code WTFPL, textures CC BY-SA
Moonstone and moondust textures are recoloured default textures: sand by VanessaE and stone by Perttu Ahola
Pine sapling, needles and ice textures by Splizard.
Fly and teleport up to y = 15000, it will generate below you.
The top 2 chunk layers (160m depth) contain the surface and are lua generated. Underground i have used Pilzadam's nether mod method to quickly turn air to stone, after that lua generates fissure type cave systems. The underground part of this realm is of unlimited depth.
Moondust depth is determined by 3D perlin noise and has smooth transitions / randomness at edges.
The cave systems become narrower as they approach the surface and often intersect the surface at low altitudes creating twisting ravines.
Underground the optional lux ore creates basic cave illumination. Mined lux ore drops lux crystals, 9 can be crafted into a bright lux node.
Maximum chunk generation time on my old slow laptop is 40 seconds for the lower surface chunks, underground chunks are much faster. Progress is printed to terminal to ease the wait.
New stuff in version 0.3.0:
New mapgen using the sum of 2 perlin noises having scales in the golden ratio (207/128).
5 colours of moondust (grey, brown, orange, yellow, white) pattern defined by perlin noise.
The average terrain level (noise offset centre) is now varied by perln noise.
Orange tinted atmosphere nodes return:
Now generated fast using 'register ore' method.
Simplified to 1 node instead of 5, tint is subtle and constant throughout atmosphere and caves.
Optional.
Parameters for tint colour and alpha.
Atmosphere fills holes created by digging nodes.
New stuff in version 0.4.1:
Moondusts are no longer falling nodes.
Mese blocks and iron ore.
Water ice at high altitudes in moondust and glows gently in the moonlight (light source = 1).
Water ice can be crafted to default:water_source.
Moonstone brick node and slabs.
Lux crystals are defined as a fuel with a longer burntime than coal.
Moonstone can be crafted into default:furnace.
Moonglass cooked from moondust1.
Life support air nodes that spread by abm, replacing tinted atmosphere and default "air" but do not pass through thick walls. Beware diagonal leaks, a single leak can spread out of control and cause abm meltdown, the air spread abm can be disabled by parameter if this happens.
Life support air generators add nodes around itself when placed.
Airlock nodes with illumination.
Hydroponic liquid crafted from old leaves and water ice, slightly more viscous than water.
Only moondust5 is suitable as hydroponic bedding, hydroponic liquid 'source' or 'flowing' will saturate neighbouring moondust5 nodes turning them into moonsoil, in this you can plant a space pine sapling, this will only grow when planted in moonsoil beneath either "air" or "moonrealm:air".
Removing hydroponic liquid will cause moonsoil to dry out and revert to moondust5.
Space pines are specially bred compact evergreens for oxygen regeneration and general cool vibage.
New stuff in version 0.4.2:
Liquid hydrocarbon lakes, parameters for colour, transparency, surface level y.
Lakebeds are a few nodes thick and seal the lake from flowing into the fissures ... which is fun but needs to be done carefully because the structure of the fissures creates a giant underground spreading of waterfalls from a single leak.
Licenses: code WTFPL, textures CC BY-SA
Crafting
--------
default water source
I
I = waterice
@ -86,6 +42,11 @@ MM
MM
M = moonstone
moonstonestair x 4
M
MM
M = moonstone
moonstoneslab x 4
MM
M = moonstone

43
functions.lua Normal file
View File

@ -0,0 +1,43 @@
function moonrealm_pine(pos)
local env = minetest.env
local x = pos.x
local y = pos.y
local z = pos.z
local t = math.random(6, 9)
for j = -3, -1 do
local nodename = env:get_node({x=x,y=y+j,z=z}).name
if nodename ~= "moonrealm:moonsoil" then
return
end
end
for j = 1, t do
local nodename = env:get_node({x=x,y=y+j,z=z}).name
if nodename ~= "moonrealm:air" and nodename ~= "air" then
return
end
end
for j = -3, t - 2 do
env:add_node({x=x,y=y+j,z=z},{name="default:tree"})
if j >= 1 and j <= t - 4 then
for i = -1, 1 do
for k = -1, 1 do
if i ~= 0 or k ~= 0 then
env:add_node({x=x+i,y=y+j,z=z+k},{name="moonrealm:needles"})
end
end
end
elseif j >= t - 3 then
for i = -1, 1 do
for k = -1, 1 do
if (i == 0 and k ~= 0) or (i ~= 0 and k == 0) then
env:add_node({x=x+i,y=y+j,z=z+k},{name="moonrealm:needles"})
end
end
end
end
end
for j = t - 1, t do
env:add_node({x=x,y=y+j,z=z},{name="moonrealm:needles"})
end
print ("[moonrealm] Pine sapling grows ("..x.." "..y.." "..z..")")
end

954
init.lua

File diff suppressed because it is too large Load Diff

444
nodes.lua Normal file
View File

@ -0,0 +1,444 @@
minetest.register_node("moonrealm:moonstone", {
description = "Moon Stone",
tiles = {"moonrealm_moonstone.png"},
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("moonrealm:ironore", {
description = "Iron Ore",
tiles = {"moonrealm_moonstone.png^default_mineral_iron.png"},
groups = {cracky=2},
drop = "default:iron_lump",
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("moonrealm:moondust1", {
description = "Moon Dust 1",
tiles = {"moonrealm_moondust1.png"},
groups = {crumbly=3},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_gravel_footstep", gain=0.09},
}),
})
minetest.register_node("moonrealm:moondust2", {
description = "Moon Dust 2",
tiles = {"moonrealm_moondust2.png"},
groups = {crumbly=3},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_gravel_footstep", gain=0.08},
}),
})
minetest.register_node("moonrealm:moondust3", {
description = "Moon Dust 3",
tiles = {"moonrealm_moondust3.png"},
groups = {crumbly=3},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_gravel_footstep", gain=0.07},
}),
})
minetest.register_node("moonrealm:moondust4", {
description = "Moon Dust 4",
tiles = {"moonrealm_moondust4.png"},
groups = {crumbly=3},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_gravel_footstep", gain=0.06},
}),
})
minetest.register_node("moonrealm:moondust5", {
description = "Moon Dust 5",
tiles = {"moonrealm_moondust5.png"},
groups = {crumbly=3},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_gravel_footstep", gain=0.05},
}),
})
minetest.register_node("moonrealm:luxore", {
description = "MR Lux Ore",
tiles = {"moonrealm_luxore.png"},
light_source = 13,
groups = {cracky=2},
drop = "moonrealm:luxcrystal 9",
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("moonrealm:luxnode", {
description = "MR Lux Node",
tiles = {"moonrealm_luxnode.png"},
light_source = 14,
groups = {cracky=1},
sounds = default.node_sound_glass_defaults(),
})
minetest.register_node("moonrealm:atmos", {
drawtype = "airlike",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
post_effect_color = {a=16, r=255, g=148, b=0},
})
minetest.register_node("moonrealm:air", {
drawtype = "airlike",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
})
minetest.register_node("moonrealm:airgen", {
description = "Air Generator",
tiles = {"moonrealm_airgen.png"},
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
on_construct = function(pos)
local env = minetest.env
local x = pos.x
local y = pos.y
local z = pos.z
for i = -1,1 do
for j = -1,1 do
for k = -1,1 do
if not (i == 0 and j == 0 and k == 0) then
local nodename = env:get_node({x=x+i,y=y+j,z=z+k}).name
if nodename == "moonrealm:atmos" then
env:add_node({x=x+i,y=y+j,z=z+k},{name="moonrealm:air"})
print ("[moonrealm] Added air node")
end
end
end
end
end
end
})
minetest.register_node("moonrealm:waterice", {
description = "Water Ice",
tiles = {"moonrealm_waterice.png"},
light_source = 1,
paramtype = "light",
sunlight_propagates = true,
groups = {cracky=3,melts=1},
sounds = default.node_sound_glass_defaults(),
})
minetest.register_node("moonrealm:hlflowing", {
description = "Flowing HL",
inventory_image = minetest.inventorycube("moonrealm_hl.png"),
drawtype = "flowingliquid",
tiles = {"moonrealm_hl.png"},
special_tiles = {
{
image="moonrealm_hlflowing_animated.png",
backface_culling=false,
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2}
},
{
image="moonrealm_hlflowing_animated.png",
backface_culling=true,
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2}
},
},
alpha = 224,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
liquidtype = "flowing",
liquid_alternative_flowing = "moonrealm:hlflowing",
liquid_alternative_source = "moonrealm:hlsource",
liquid_viscosity = 1,
post_effect_color = {a=224, r=115, g=55, b=24},
groups = {water=3, liquid=3, puts_out_fire=1, not_in_creative_inventory=1},
})
minetest.register_node("moonrealm:hlsource", {
description = "HL Source",
inventory_image = minetest.inventorycube("moonrealm_hl.png"),
drawtype = "liquid",
tiles = {"moonrealm_hl.png"},
alpha = 224,
paramtype = "light",
walkable = false,
pointable = false,
buildable_to = true,
liquidtype = "source",
liquid_alternative_flowing = "moonrealm:hlflowing",
liquid_alternative_source = "moonrealm:hlsource",
liquid_viscosity = 1,
post_effect_color = {a=224, r=115, g=55, b=24},
groups = {water=3, liquid=3, puts_out_fire=1},
})
minetest.register_node("moonrealm:moonsoil", {
description = "Moon Soil",
tiles = {"moonrealm_moonsoil.png"},
groups = {crumbly=3},
drop = "moonrealm:moondust5",
sounds = default.node_sound_dirt_defaults(),
})
minetest.register_node("moonrealm:airlock", {
description = "Airlock",
tiles = {"moonrealm_airlock.png"},
light_source = 14,
walkable = false,
post_effect_color = {a=255, r=0, g=0, b=0},
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("moonrealm:moonstonebrick", {
description = "Moonstone Brick",
tiles = {"moonrealm_moonstonebricktop.png", "moonrealm_moonstonebrickbot.png", "moonrealm_moonstonebrick.png"},
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("moonrealm:moonglass", {
description = "Moon Glass",
drawtype = "glasslike",
tiles = {"moonrealm_moonglass.png"},
paramtype = "light",
sunlight_propagates = true,
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
sounds = default.node_sound_glass_defaults(),
})
minetest.register_node("moonrealm:needles", {
description = "MR Pine Needles",
visual_scale = 1.3,
tiles = {"moonrealm_needles.png"},
paramtype = "light",
groups = {snappy=3, flammable=2},
drop = {
max_items = 1,
items = {
{items = {"moonrealm:psapling"}, rarity = 20},
{items = {"moonrealm:needles"}}
}
},
sounds = default.node_sound_leaves_defaults(),
})
minetest.register_node("moonrealm:psapling", {
description = "MR Pine Sapling",
drawtype = "plantlike",
visual_scale = 1.0,
tiles = {"moonrealm_psapling.png"},
inventory_image = "moonrealm_psapling.png",
wield_image = "moonrealm_psapling.png",
paramtype = "light",
walkable = false,
groups = {snappy=2,dig_immediate=3,flammable=2},
sounds = default.node_sound_defaults(),
})
minetest.register_node("moonrealm:moonstoneslab", {
description = "Moonstone Slab",
tiles = {"moonrealm_moonstonebricktop.png", "moonrealm_moonstonebrickbot.png", "moonrealm_moonstonebrick.png"},
drawtype = "nodebox",
paramtype = "light",
sunlight_propagates = true,
buildable_to = true,
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0, 0.5}
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0, 0.5}
},
},
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("moonrealm:moonstonestair", {
description = "MR Moonstone Stair",
tiles = {"moonrealm_moonstonebricktop.png", "moonrealm_moonstonebrickbot.png", "moonrealm_moonstonebrick.png"},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky=3},
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
{-0.5, 0, 0, 0.5, 0.5, 0.5},
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
{-0.5, 0, 0, 0.5, 0.5, 0.5},
},
},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("moonrealm:lhcflowing", {
description = "Flowing Liquid Hydrocarbons",
inventory_image = minetest.inventorycube("moonrealm_lhc.png"),
drawtype = "flowingliquid",
tiles = {"moonrealm_lhc.png"},
special_tiles = {
{
image="moonrealm_lhcflowing_animated.png",
backface_culling=false,
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2}
},
{
image="moonrealm_lhcflowing_animated.png",
backface_culling=true,
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2}
},
},
alpha = LHCALP,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
liquidtype = "flowing",
liquid_alternative_flowing = "moonrealm:lhcflowing",
liquid_alternative_source = "moonrealm:lhcsource",
liquid_viscosity = 1,
post_effect_color = {a=192, r=140, g=19, b=0},
groups = {water=3, liquid=3, puts_out_fire=1, not_in_creative_inventory=1},
})
minetest.register_node("moonrealm:lhcsource", {
description = "Liquid Hydrocarbon Source",
inventory_image = minetest.inventorycube("moonrealm_lhc.png"),
drawtype = "liquid",
tiles = {"moonrealm_lhc.png"},
alpha = LHCALP,
paramtype = "light",
walkable = false,
pointable = false,
buildable_to = true,
liquidtype = "source",
liquid_alternative_flowing = "moonrealm:lhcflowing",
liquid_alternative_source = "moonrealm:lhcsource",
liquid_viscosity = 1,
post_effect_color = {a=192, r=140, g=19, b=0},
groups = {water=3, liquid=3, puts_out_fire=1},
})
-- Item
minetest.register_craftitem("moonrealm:luxcrystal", {
description = "MR Lux Crystal",
inventory_image = "moonrealm_luxcrystal.png",
})
-- Crafting
minetest.register_craft({
output = "moonrealm:luxnode",
recipe = {
{"moonrealm:luxcrystal", "moonrealm:luxcrystal", "moonrealm:luxcrystal"},
{"moonrealm:luxcrystal", "moonrealm:luxcrystal", "moonrealm:luxcrystal"},
{"moonrealm:luxcrystal", "moonrealm:luxcrystal", "moonrealm:luxcrystal"},
},
})
minetest.register_craft({
output = "moonrealm:airgen",
recipe = {
{"default:steel_ingot", "moonrealm:waterice", "default:steel_ingot"},
{"moonrealm:waterice", "moonrealm:luxnode", "moonrealm:waterice"},
{"default:steel_ingot", "moonrealm:waterice", "default:steel_ingot"},
},
})
minetest.register_craft({
output = "default:water_source",
recipe = {
{"moonrealm:waterice"},
},
})
minetest.register_craft({
output = "moonrealm:hlsource",
recipe = {
{"moonrealm:needles", "moonrealm:needles", "moonrealm:needles"},
{"moonrealm:needles", "moonrealm:waterice", "moonrealm:needles"},
{"moonrealm:needles", "moonrealm:needles", "moonrealm:needles"},
},
})
minetest.register_craft({
output = "moonrealm:moonstonebrick 4",
recipe = {
{"moonrealm:moonstone", "moonrealm:moonstone"},
{"moonrealm:moonstone", "moonrealm:moonstone"},
}
})
minetest.register_craft({
output = "moonrealm:moonstonestair 4",
recipe = {
{"moonrealm:moonstone", ""},
{"moonrealm:moonstone", "moonrealm:moonstone"},
}
})
minetest.register_craft({
output = "moonrealm:airlock",
recipe = {
{"default:steel_ingot", "", "default:steel_ingot"},
{"default:steel_ingot", "moonrealm:luxnode", "default:steel_ingot"},
{"default:steel_ingot", "", "default:steel_ingot"},
},
})
minetest.register_craft({
output = "default:furnace",
recipe = {
{"moonrealm:moonstone", "moonrealm:moonstone", "moonrealm:moonstone"},
{"moonrealm:moonstone", "", "moonrealm:moonstone"},
{"moonrealm:moonstone", "moonrealm:moonstone", "moonrealm:moonstone"},
},
})
minetest.register_craft({
output = "moonrealm:moonstoneslab 4",
recipe = {
{"moonrealm:moonstone", "moonrealm:moonstone"},
}
})
-- Cooking
minetest.register_craft({
type = "cooking",
output = "moonrealm:moonglass",
recipe = "moonrealm:moondust1",
})
-- Fuel
minetest.register_craft({
type = "fuel",
recipe = "moonrealm:luxcrystal",
burntime = 50,
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 590 B

After

Width:  |  Height:  |  Size: 718 B