more ores with json

master
A. Demant 2019-07-20 10:18:14 +02:00
parent 226f19e8e7
commit bd15e50351
12 changed files with 503 additions and 800 deletions

View File

@ -135,31 +135,33 @@ minerdream.register_ore=function(i,tdef)
local orelump={ore="lump",poorore="nugget"}
for o,l in pairs(orelump) do
-- register ore
if tdef[o] ~= nil then
tdef[o].ore_name=ore_name.."_"..o
tdef[o].lump_name=tdef[o].ore_name
if tdef[l] ~= nil then
tdef[o].lump_name=tdef[l].lump_name or ore.."_"..l
tdef[l].lump_name=tdef[o].lump_name
end
minerdream.register_node_ore(tdef,tdef[o],l)
minerdream.register_node_mapgen(tdef,tdef[o])
end
--register lump, if needed
if (tdef[o].lump_name ~= tdef[o].ore_name) and (tdef[l] ~= nil) then
if tdef[l].lump_name == nil then
tdef[l].lump_name=tdef[o].lump_name
else
if tdef[l].lump_name ~= tdef[o].lump_name then
tdef[l].lump_name = tdef[o].lump_name
if tdef[o] ~= nil and tdef[l] ~= nil then
-- register ore
if tdef[o] ~= nil then
tdef[o].ore_name=ore_name.."_"..o
tdef[o].lump_name=tdef[o].ore_name
if tdef[l] ~= nil then
tdef[o].lump_name=tdef[l].lump_name or ore.."_"..l
tdef[l].lump_name=tdef[o].lump_name
end
minerdream.register_node_ore(tdef,tdef[o],l)
minerdream.register_node_mapgen(tdef,tdef[o])
end
if tdef[l].lump_node_name == nil then
tdef[l].lump_node_name=tdef[o].lump_node_name
--register lump, if needed
if (tdef[o].lump_name ~= tdef[o].ore_name) and (tdef[l] ~= nil) then
if tdef[l].lump_name == nil then
tdef[l].lump_name=tdef[o].lump_name
else
if tdef[l].lump_name ~= tdef[o].lump_name then
tdef[l].lump_name = tdef[o].lump_name
end
end
if tdef[l].lump_node_name == nil then
tdef[l].lump_node_name=tdef[o].lump_node_name
end
tdef[l].ore_name=tdef[o].ore_name
minerdream.register_node_lump(tdef,tdef[l])
end
tdef[l].ore_name=tdef[o].ore_name
minerdream.register_node_lump(tdef,tdef[l])
end
end
if tdef.nugget ~= nil and tdef.lump ~= nil then
@ -187,173 +189,7 @@ minerdream.register_ore=function(i,tdef)
print("test")
minerdream.register_3d_armor(tdef,tdef["3d_armor"])
end
print(dump(tdef))
end
end
local commentfunction=function(i)
if true then
-- local tierd=tier_definition[tostring(tdef.tier)]
-- register ores within stone
if tdef.ore ~= nil and tdef.lump ~= nil then
if tdef.ore.crack ~= nil then
minerdream.register_ore_lump(i,tdef)
end
end
if tdef.ore ~= nil then
if tdef.ore.crack ~= nil then
minerdream.register_ore_lump(i,tdef)
else
-- if not already defined, then add mapgen parameter
if tdef.ore.scarcity ~= nil then
needs_mapgen = true
mapgen_name=minerdream.modname..":"..i
end
end
end
-- define mapgeneration for ores
if needs_mapgen then
minerdream.register_mapgen(i,tdef,mapgen_name,tdef.ore)
if tdef.nugget ~= nil then
minerdream.register_mapgen(i,tdef,mapgen_name.."_poor",tdef.nugget)
end
end
-- define ore dust
-- only makes sense if it can be grinded
if tdef.dust~= nil and minetest.get_modpath("technic") then
minerdream.register_dust(i,tdef)
end
-- register ingots
if tdef.ingot ~= nil then
minerdream.register_ingot(i,tdef)
end
if tdef.block ~= nil then
minerdream.register_block(i,tdef)
end
-- define armor and weapons
if minerdream.items[i].ingot_def ~= nil then
minerdream.register_weapons(i,tdef)
end
if tdef.tools~=nil then
local adef=tdef.tools
local ingot_name=minerdream.items[i].ingot_def.name
for _,tool in pairs({"pick","axe","sword","shovel","spear"}) do
if tdef.tools[tool] ~= nil then
local ttv=tdef.tools[tool]
for _,it in pairs({"range","maxlevel","tool_stick","fleshy","level","cracky","crumbly","choppy","snappy","use"}) do
if ttv[it] == nil and adef[it] ~= nil then
ttv[it] = adef[it]
end
end
local fleshy=ttv.fleshy or tdef.tools.fleshy or 4
local uses=ttv.use or tdef.tools.use
local tdesc=core.colorize("#"..tdef.tierd.color, S(i:gsub("^%l", string.upper)).." "..S(tool:gsub("^%l", string.upper)).."\n")..
core.colorize("#A0A0A0", "tier: "..tdef.tierd.name.." ("..tdef.tierd.desc..")")
-- check special attributes of tool definition and use fallback definitions
if uses then
tdesc=tdesc.."\n"..core.colorize("#A0A0A0",S("Uses")..": "..uses)
end
if ttv.maxlevel then
tdesc=tdesc.."\n"..core.colorize("#A0A0A0",S("Max. Level")..": "..ttv.maxlevel)
end
if ttv.fleshy then
tdesc=tdesc.."\n"..core.colorize("#A0A0A0",S("Damage")..": "..fleshy)
end
tt_def={description=tdesc,uses=uses,
inventory_image=ttv.inventory_image or minerdream.modname.."_"..tool.."_"..i..".png",
range=ttv.range or tdef.tools.range or 2,
groups={weapon=1},
tool_capabilities={max_drop_level = 1,groupcaps={},
damage_groups = {fleshy = fleshy},},
}
-- check if values for capabitlites exist
for _,gc in pairs({"cracky","crumbly","choppy","snappy"}) do
if ttv[gc] ~= nil then
local ml = ttv.maxlevel or tdef.tools.maxlevel or 1
tt_def.tool_capabilities.groupcaps[gc]={times=table.copy(ttv[gc]),
uses=tdef.uses,maxlevel=ml}
end
end
toolname=minerdream.modname..":"..tool.."_"..i
minetest.register_tool(toolname,tt_def)
local stick = ttv.tool_stick or "group:stick"
minetest.register_craft({
output=toolname,
recipe=local_get_recipe(tool,ingot_name,stick)
})
end
end
end
if tdef["3d_armor"] ~= nil then
local ingot_name=minerdream.items[i].ingot_def.name
local adef=tdef["3d_armor"]
for _,tool in pairs({"helmet","chestplate","boots","leggings","shield"}) do
if tdef["3d_armor"][tool] ~= nil then
local ttv=tdef["3d_armor"][tool]
for _,it in pairs({"fleshy","heal","speed","gravity","jump","level","cracky","crumbly","choppy","snappy","use"}) do
if ttv[it] == nil and adef[it] ~= nil then
ttv[it] = adef[it]
end
end
local tdesc=core.colorize("#"..tdef.tierd.color, S(i:gsub("^%l", string.upper)).." "..S(tool:gsub("^%l", string.upper)).."\n")..
core.colorize("#A0A0A0", "tier: "..tdef.tierd.name.." ("..tdef.tierd.desc..")")
if ttv.fleshy then
tdesc=tdesc.."\n"..core.colorize("#A0A0A0",S("Defense")..": "..ttv.fleshy)
end
if ttv.heal then
tdesc=tdesc.."\n"..core.colorize("#A0A0A0",S("Heal")..": "..ttv.heal)
end
if ttv.speed then
tdesc=tdesc.."\n"..core.colorize("#A0A0A0",S("Walking speed")..": "..(ttv.speed*100).."%")
end
if ttv.gravity then
tdesc=tdesc.."\n"..core.colorize("#A0A0A0",S("Gravity")..": "..(ttv.gravity*100).."%")
end
if ttv.jump then
tdesc=tdesc.."\n"..core.colorize("#A0A0A0",S("Jump force")..": "..(ttv.jump*100).."%")
end
tt_def={description=tdesc,
inventory_image=ttv.inventory_image or minerdream.modname.."_inv_"..tool.."_"..i..".png",
damage_groups = {level = ttv.level or 2},
armor_groups={fleshy=ttv.fleshy or 10},
groups={armor_heal=ttv.heal,armor_use=ttv.use,
physics_jump=ttv.jump,physics_speed=ttv.speed,physics_gravity=ttv.gravity}
}
for _,gc in pairs({"cracky","crumbly","choppy","snappy"}) do
tt_def.damage_groups[gc]=ttv[gc]
end
if tool == "helmet" then
tt_def.groups.armor_head=1
elseif tool == "chestplate" then
tt_def.groups.armor_torso=1
elseif tool == "leggings" then
tt_def.groups.armor_legs=1
elseif tool == "boots" then
tt_def.groups.armor_feet=1
elseif tool == "shield" then
tt_def.groups.armor_shield=1
end
toolname=minerdream.modname..":"..tool.."_"..i
armor:register_armor(toolname,tt_def)
local stick = ttv.tool_stick or "group:stick"
minetest.register_craft({
output=toolname,
recipe=local_get_recipe(tool,ingot_name,stick)
})
end
end
end
-- print(dump(tdef))
end
end
@ -415,7 +251,7 @@ minerdream.register_node_ore=function(tdef,odef,ltype)
odef.wherein="stone"
end
-- for each stone create definition table and register node
for _,wi in pairs(odef.wherein) do
for _,wi in ipairs(odef.wherein) do
local oredef=table.copy(ore_def)
oredef.name=minerdream.modname..":"..wi.."_with_"..odef.ore_name
oredef.tiles={"default_"..wi..".png^"..odef.inventory_image}
@ -592,27 +428,6 @@ minerdream.register_node_mapgen=function(tdef,odef)
end
end
minerdream.register_mapgen=function(ore_name,tdef,mapgen_name,odef)
local wherein={"default:stone"}
if tdef.groups.in_desert ~= nil then -- check, if ore can be found in desert stone
if minetest.registered_items["default:desert_stone"] ~= nil then
wherein={"default:stone","default:desert_stone"}
end
end
local tscar=odef.scarcity or 13
local map_def={ore_type = "scatter",
ore = mapgen_name,
wherein = wherein,
clust_scarcity = tscar * tscar * tscar,
clust_num_ores = odef.num_ores or 1,
clust_size = odef.clust_size or 1,
y_min = odef.y_min or (-31000),
y_max = odef.y_max or 0,
}
local_item_insert(ore_name,"map_def",map_def)
minetest.register_ore(map_def)
end
minerdream.register_ingot=function(tdef,idef)
if idef ~= nil then
if idef.node_name == nil then
@ -641,17 +456,6 @@ minerdream.register_ingot=function(tdef,idef)
end
end
minerdream.register_brick=function(ore_name,tdef)
local brick_def=local_create_def(ore_name,"brick",tdef.groups.has_brick,tdef)
minetest.register_node(minerdream.modname..":"..ore_name.."_brick",brick_def)
brick_def.name=minerdream.modname..":"..ore_name.."_brick"
local_item_insert(ore_name,"brick_def",brick_def)
if minerdream.items[ore_name].lump_def ~= nil then
local lump_def=table.copy(minerdream.items[ore_name].lump_def)
local_craft_brick(lump_def.name,brick_def.name)
end
end
minerdream.register_block=function(tdef)
local block_def=local_create_def(tdef.ore.ore_name,"block",1,tdef)
if tdef.block.node_name == nil then
@ -667,19 +471,6 @@ minerdream.register_block=function(tdef)
local_craft_block(tdef.ingot.node_name,tdef.block.node_name)
end
minerdream.register_bar_block=function(ore_name,tdef)
local bar_def=local_create_def(ore_name,"bar_block",tdef.groups.has_bar_block,tdef)
bar_def.paramtype="light"
bar_def.is_ground_content=true
bar_def.groups={snappy=tdef.groups.has_bar,dig_immediate=3}
local_item_insert(ore_name,"bar_block_def",bar_def)
minetest.register_node(minerdream.modname..":"..ore_name.."_bar_block",bar_def)
local ingot_def=minerdream.items[ore_name].ingot_def
if ingot_def ~= nil then
local_craft_stack(ingot_def.name,minerdream.modname..":"..ore_name.."_bar_block")
end
end
minerdream.register_weapons=function(ore_name,tdef)
local ingot_name=minerdream.items[ore_name].ingot_def.name
for _,tool in ipairs(minerdream.tools_to_register) do
@ -712,7 +503,7 @@ minerdream.register_dust=function(tdef,ddef)
if ddef.node_name == nil then
ddef.node_name = minerdream.modname..":"..tdef.name.."_dust"
end
local dust_def=local_create_def(tdef.name,"dust",ddef.cracky or (tdef.ore.cracky-1),tdef)
local dust_def=local_create_def(tdef.name,"dust",ddef.crack or (tdef.ore.crack-1),tdef)
dust_def.name=ddef.node_name
local dustimg=ddef.inventory_image or ddef.node_name:gsub(":","_") or minerdream.modname.."_"..ore_name.."_dust.png"
dust_def.tiles={dustimg}
@ -802,9 +593,10 @@ end
minerdream.register_3d_armor=function(tdef,adef)
if adef ~= nil then
print("test2")
for _,tool in pairs({"helmet","chestplate","boots","leggings","shield"}) do
if adef.tool ~= nil then
local ttv=adef.tool
if adef[tool] ~= nil then
local ttv=adef[tool]
ttv.item_name=minerdream.modname..":"..tdef.name.."_"..tool
for _,it in pairs({"fleshy","heal","speed","gravity","jump","level","cracky","crumbly","choppy","snappy","use"}) do
if ttv[it] == nil and adef[it] ~= nil then
@ -843,7 +635,6 @@ minerdream.register_3d_armor=function(tdef,adef)
print(agroup[tool])
tt_def.groups[agroup[tool]]=1
toolname=minerdream.modname..":"..tool.."_"..i
armor:register_armor(ttv.item_name,tt_def)
local stick = ttv.tool_stick or "group:stick"

View File

@ -10,8 +10,24 @@
"inventory_image":"minerdream_adamantite_ingot.png"
},
"ore":{
"wherein":["stone"],
"crack":5,
"inventory_image":"minerdream_adamantite_ore.png"
"inventory_image":"minerdream_adamantite_ore.png",
"clust_size":3,
"num_ores":4,
"scarcity":15,
"y_max":-2300,
"y_min":-31000
},
"poorore":{
"wherein":["stone","desert_stone"],
"crack":4,
"inventory_image":"minerdream_adamantite_poorore.png",
"clust_size":3,
"num_ores":4,
"scarcity":15,
"y_max":-200,
"y_min":-31000
},
"lump":{
"crack":5,
@ -20,21 +36,14 @@
"cooking_time":58
},
"dust":{
"cracky":3,
"crack":3,
"grind_time":32,
"cooking_time":28,
"inventory_image":"minerdream_adamantite_dust.png"
},
"mapgen":{
"clust_size":3,
"num_ores":4,
"scarcity":15,
"y_max":-2300,
"y_min":-31000
},
"nugget":{
"inventory_image":"minerdream_adamantite_poorore.png",
"cracky":3,
"crack":3,
"clust_size":3,
"num_ores":5,
"scarcity":13,

View File

@ -1,36 +1,45 @@
{
"block":{
"inventory_image":"minerdream_adamantite_block.png"
"inventory_image":"minerdream_cobalt_block.png"
},
"ingot":{
"inventory_image":"minerdream_adamantite_ingot.png"
"inventory_image":"minerdream_cobalt_ingot.png"
},
"ore":{
"wherein":["stone"],
"crack":4,
"inventory_image":"minerdream_adamantite_ore.png"
},
"lump":{
"crack":4,
"inventory_image":"minerdream_adamantite_lump.png",
"stack_max":99,
"cooking_time":32
},
"dust":{
"cracky":2,
"grind_time":18,
"cooking_time":20,
"inventory_image":"minerdream_adamantite_dust.png"
},
"mapgen":{
"inventory_image":"minerdream_cobalt_ore.png",
"clust_size":3,
"num_ores":3,
"scarcity":15,
"y_max":-500,
"y_min":-31000
},
"poorore":{
"wherein":["stone","desert_stone"],
"crack":3,
"inventory_image":"minerdream_cobalt_poorore.png",
"clust_size":3,
"num_ores":3,
"scarcity":15,
"y_max":-350,
"y_min":-31000
},
"lump":{
"crack":4,
"inventory_image":"minerdream_cobalt_lump.png",
"stack_max":99,
"cooking_time":32
},
"dust":{
"crack":2,
"grind_time":18,
"cooking_time":20,
"inventory_image":"minerdream_cobalt_dust.png"
},
"nugget":{
"inventory_image":"minerdream_adamantite_poorore.png",
"cracky":2,
"inventory_image":"minerdream_cobalt_poorore.png",
"crack":2,
"clust_size":3,
"num_ores":3,
"scarcity":13,
@ -38,9 +47,7 @@
},
"color":"3F7390D0",
"groups":{"drop_as_lump":1,
"has_bar":1,
"has_bow":1,
"has_brick":3,
"in_desert":1,
"is_metall":5},
"name":"cobalt",

View File

@ -1,19 +1,55 @@
{"clust_size":3,
"color":"c4b16ed0",
"crack":1,
{"color":"C4B16ED0",
"groups":{"drop_as_lump":1,
"has_bar":1,
"has_block":1,
"has_dust":1,
"has_lump":1,
"has_nugget":3,
"in_desert":1,
"is_metall":2},
"lump_cooking_time":5,
"is_metall":6},
"block":{
"inventory_image":"minerdream_lithium_block.png"
},
"ingot":{
"inventory_image":"minerdream_lithium_ingot.png"
},
"ore":{
"wherein":["stone"],
"crack":5,
"inventory_image":"minerdream_lithium_ore.png",
"clust_size":3,
"num_ores":5,
"scarcity":14,
"y_max":-100,
"y_min":-31000
},
"poorore":{
"wherein":["stone","desert_stone"],
"crack":4,
"inventory_image":"minerdream_lithium_poorore.png",
"clust_size":3,
"num_ores":5,
"scarcity":14,
"y_max":-50,
"y_min":-31000
},
"lump":{
"crack":5,
"inventory_image":"minerdream_lithium_lump.png",
"stack_max":99,
"cooking_time":5
},
"dust":{
"crack":3,
"grind_time":3,
"cooking_time":3,
"inventory_image":"minerdream_lithium_dust.png"
},
"nugget":{
"inventory_image":"minerdream_lithium_poorore.png",
"crack":3,
"clust_size":3,
"num_ores":5,
"scarcity":13,
"y_max":-2000
},
"name":"lithium",
"num_ores":5,
"ore_modname":"minerdream",
"scarcity":14,
"tier":2,
"y_max":-100,
"y_min":-31000}
"tier":2
}

View File

@ -1,88 +1,66 @@
{"axe":{"choppy":[2.275,1.2,0.75],
"fleshy":6.75,
"maxlevel":2},
"boots":{"choppy":2,
"cracky":2,
"crumbly":1,
"fleshy":11,
"gravity":0.01,
"heal":5,
"level":2,
"snappy":3,
"speed":-0.01,
"use":350},
"chestplate":{"choppy":2,
"cracky":2,
"crumbly":1,
"fleshy":16,
"gravity":0.04,
"heal":5,
"level":2,
"snappy":3,
"speed":-0.04,
"use":350},
"clust_size":3,
"color":"A5AA8CD0",
"crack":2,
"groups":{"drop_as_lump":1,
"has_bar":1,
"has_bar_block":3,
"has_block":1,
{"color":"A5AA8CD0",
"groups":{
"has_bow":1,
"has_brick":3,
"has_dust":1,
"has_lump":1,
"has_nugget":2,
"has_shovel":1,
"in_desert":1,
"is_metall":2},
"helmet":{"choppy":2,
"cracky":2,
"crumbly":1,
"fleshy":11,
"gravity":0.01,
"heal":5,
"level":2,
"snappy":3,
"speed":0.01,
"use":350},
"leggings":{"choppy":2,
"cracky":2,
"crumbly":1,
"fleshy":16,
"gravity":0.03,
"heal":5,
"level":2,
"snappy":3,
"speed":-0.03,
"use":350},
"lump_cooking_time":4,
"is_metall":5},
"name":"nickel",
"num_ores":7,
"ore_modname":"minerdream",
"pick":{"cracky":[3.4,1.3,0.65],
"fleshy":5.25,
"maxlevel":2},
"scarcity":13,
"shields":{"choppy":2,
"cracky":2,
"crumbly":1,
"fleshy":11,
"gravity":0.03,
"heal":5,
"level":2,
"snappy":3,
"speed":-0.03,
"use":350},
"shovel":{"crumbly":[1.3,0.75,0.325],
"fleshy":3.75,
"maxlevel":2},
"spear":{"fleshy":7.75,
"range":6.2,
"snappy":[2.2,0.95,0.275]},
"sword":{"fleshy":6.75,
"maxlevel":2,
"snappy":[2.2,0.95,0.275]},
"block":{
"inventory_image":"minerdream_nickel_block.png"
},
"ingot":{
"grind_time":28,
"inventory_image":"minerdream_nickel_ingot.png"
},
"ore":{
"wherein":["stone","desert_stone"],
"crack":2,
"inventory_image":"minerdream_nickel_ore.png",
"clust_size":3,
"num_ores":7,
"scarcity":15,
"y_max":-40,
"y_min":-31000
},
"lump":{
"crack":1,
"inventory_image":"minerdream_nickel_lump.png",
"stack_max":99,
"cooking_time":4,
"grind_time":3
},
"dust":{
"crack":2,
"cooking_time":2,
"inventory_image":"minerdream_nickel_dust.png"
},
"nugget":{
"crack":1,
"inventory_image":"minerdream_nickel_nugget.png",
"stack_max":99,
"cooking_time":2
},
"poorore":{
"wherein":["stone","desert_stone"],
"inventory_image":"minerdream_nickel_poorore.png",
"crack":1,
"clust_size":3,
"num_ores":7,
"scarcity":13,
"y_max":-20
},
"tier":2,
"y_max":-40,
"y_min":-31000}
"tools":{"maxlevel":2,"tool_stick":"group:stick","use":80,
"axe":{"choppy":[2.275,1.2,0.75],"fleshy":6.75},
"shovel":{"crumbly":[1.3,0.75,0.325],"fleshy":3.75},
"spear":{"range":6.2,"fleshy":7.75,"snappy":[2.2,0.95,.0275]},
"sword":{"fleshy":6.75,"snappy":[2.2,0.95,0.275]},
"pick":{"cracky":[3.4,1.3,0.65],"fleshy":5.25}
},
"3d_armor":{"cracky":2,"crumbly":1,"heal":5,"use":350,"snappy":3,"level":2,"choppy":2,"tool_cotton":"steel_wire",
"boots":{"fleshy":11,"gravity":0.01,"speed":-0.01},
"chestplate":{"fleshy":16,"gravity":0.04,"speed":-0.04},
"helmet":{"fleshy":11,"gravity":0.01,"speed":-0.01},
"leggings":{"fleshy":16,"gravity":0.04,"speed":-0.04},
"shields":{"fleshy":11,"gravity":0.01,"speed":-0.01}
}
}

View File

@ -1,89 +1,65 @@
{"axe":{"choppy":[0.95,0.28,0.19],
"fleshy":16,
"maxlevel":5},
"boots":{"choppy":2,
"cracky":2,
"crumbly":1,
"fleshy":17,
"gravity":-0.1,
"heal":9,
"jump":0.1,
"level":2,
"snappy":3,
"speed":0.13,
"use":150},
"chestplate":{"choppy":2,
"cracky":2,
"crumbly":1,
"fleshy":17,
"gravity":-0.1,
"heal":9,
"jump":0.1,
"level":2,
"snappy":3,
"speed":0.13,
"use":150},
"clust_size":3,
"color":"903F86D0",
"crack":6,
"groups":{"drop_as_lump":1,
"has_bar":1,
"has_block":1,
"has_brick":1,
"has_dust":1,
"has_lump":1,
"has_nugget":3,
{"color":"903F86D0",
"groups":{
"has_bow":1,
"in_desert":1,
"is_metall":8},
"helmet":{"choppy":2,
"cracky":2,
"crumbly":1,
"fleshy":17,
"gravity":-0.1,
"heal":9,
"jump":0.1,
"level":2,
"snappy":3,
"speed":0.13,
"use":150},
"leggings":{"choppy":2,
"cracky":2,
"crumbly":1,
"fleshy":17,
"gravity":-0.1,
"heal":9,
"jump":0.1,
"level":2,
"snappy":3,
"speed":0.13,
"use":150},
"lump_cooking_time":86,
"is_metall":5},
"name":"orichalcum",
"num_ores":3,
"ore_modname":"minerdream",
"pick":{"cracky":[0.9,0.45,0.1,2.5,3.25,4.75],
"crumbly":[0.45,0.18,0.1],
"fleshy":16,
"maxlevel":5},
"scarcity":17,
"shields":{"choppy":2,
"cracky":2,
"crumbly":1,
"fleshy":17,
"gravity":-0.1,
"heal":9,
"jump":0.1,
"level":2,
"snappy":3,
"speed":0.13,
"use":150},
"spear":{"fleshy":19,
"range":8,
"snappy":[1.15,0.46,0.03]},
"sword":{"fleshy":17,
"maxlevel":4,
"snappy":[1,0.5,0.04]},
"block":{
"inventory_image":"minerdream_orichalcum_block.png"
},
"ingot":{
"grind_time":28,
"inventory_image":"minerdream_orichalcum_ingot.png"
},
"ore":{
"wherein":["stone","desert_stone"],
"crack":6,
"inventory_image":"minerdream_orichalcum_ore.png",
"clust_size":3,
"num_ores":3,
"scarcity":17,
"y_max":-6500,
"y_min":-31000
},
"lump":{
"crack":6,
"inventory_image":"minerdream_orichalcum_lump.png",
"stack_max":99,
"cooking_time":86,
"grind_time":80
},
"dust":{
"crack":4,
"cooking_time":44,
"inventory_image":"minerdream_orichalcum_dust.png"
},
"nugget":{
"crack":6,
"inventory_image":"minerdream_orichalcum_nugget.png",
"stack_max":99,
"cooking_time":44
},
"poorore":{
"wherein":["stone","desert_stone"],
"inventory_image":"minerdream_orichalcum_poorore.png",
"crack":6,
"clust_size":3,
"num_ores":3,
"scarcity":17,
"y_max":-6250
},
"tier":8,
"tool_stick":"minerdream:expensivestick",
"y_max":-6500,
"y_min":-31000}
"tools":{"maxlevel":5,"tool_stick":"minerdream:expensivestick","use":80,
"axe":{"choppy":[0.95,0.28,0.19],"fleshy":16},
"spear":{"range":8,"fleshy":19,"snappy":[1.15,0.46,0.03]},
"sword":{"fleshy":17,"snappy":[1,0.5,0.04]},
"pick":{"cracky":[0.9,0.45,0.1,2.5,3.25,4.75],"fleshy":16,"crumbly":[0.45,0.18,0.1]}
},
"3d_armor":{"cracky":2,"crumbly":1,"heal":9,"use":150,"snappy":3,"level":2,"choppy":2,"tool_cotton":"steel_wire",
"boots":{"fleshy":17,"gravity":-0.1,"jump":0.1,"speed":0.13},
"chestplate":{"fleshy":17,"gravity":-0.1,"jump":0.1,"speed":0.13},
"helmet":{"fleshy":17,"gravity":-0.1,"jump":0.1,"speed":0.13},
"leggings":{"fleshy":17,"gravity":-0.1,"jump":0.1,"speed":0.13},
"shields":{"fleshy":17,"gravity":-0.1,"jump":0.1,"speed":0.13}
}
}

View File

@ -1,89 +1,65 @@
{"axe":{"choppy":[1,0.3,0.2],
"fleshy":14,
"maxlevel":4},
"boots":{"choppy":2,
"cracky":2,
"crumbly":1,
"fleshy":15,
"gravity":-0.09,
"heal":8.5,
"jump":0.09,
"level":2,
"snappy":3,
"speed":0.13,
"use":60},
"chestplate":{"choppy":2,
"cracky":2,
"crumbly":1,
"fleshy":15,
"gravity":-0.09,
"heal":8.5,
"jump":0.09,
"level":2,
"snappy":3,
"speed":0.13,
"use":60},
"clust_size":3,
"color":"1D4144D0",
"crack":6,
"groups":{"drop_as_lump":1,
"has_bar":1,
"has_block":1,
"has_dust":1,
"has_lump":1,
"has_nugget":3,
{"color":"1D4144D0",
"groups":{
"has_bow":1,
"in_desert":1,
"is_metall":7},
"helmet":{"choppy":2,
"cracky":2,
"crumbly":1,
"fleshy":15,
"gravity":-0.09,
"heal":8.5,
"jump":0.09,
"level":2,
"snappy":3,
"speed":0.13,
"use":60},
"leggings":{"choppy":2,
"cracky":2,
"crumbly":1,
"fleshy":15,
"gravity":-0.09,
"heal":8.5,
"jump":0.09,
"level":2,
"snappy":3,
"speed":0.13,
"use":60},
"lump_cooking_time":64,
"name":"osmium",
"num_ores":3,
"ore_modname":"minerdream",
"pick":{"cracky":[1,0.45,0.125,2.75,3.5,5],
"crumbly":[0.5,0.2,0.1],
"fleshy":14,
"maxlevel":4},
"scarcity":16,
"shields":{"choppy":2,
"cracky":2,
"crumbly":1,
"fleshy":15,
"gravity":-0.09,
"heal":8.5,
"jump":0.09,
"level":2,
"snappy":3,
"speed":0.13,
"use":60},
"spear":{"fleshy":17,
"range":7.5,
"snappy":[1.2,0.5,0.04]},
"sword":{"fleshy":16,
"maxlevel":4,
"snappy":[1,0.5,0.04]},
"block":{
"inventory_image":"minerdream_osmium_block.png"
},
"ingot":{
"grind_time":28,
"inventory_image":"minerdream_osmium_ingot.png"
},
"ore":{
"wherein":["stone","desert_stone"],
"crack":6,
"inventory_image":"minerdream_osmium_ore.png",
"clust_size":3,
"num_ores":3,
"scarcity":16,
"y_max":-2500,
"y_min":-31000
},
"poorore":{
"wherein":["stone","desert_stone"],
"inventory_image":"minerdream_osmium_poorore.png",
"crack":4,
"clust_size":3,
"num_ores":3,
"scarcity":16,
"y_max":-2050
},
"lump":{
"crack":6,
"inventory_image":"minerdream_osmium_lump.png",
"stack_max":99,
"cooking_time":64,
"grind_time":34
},
"dust":{
"crack":4,
"cooking_time":34,
"inventory_image":"minerdream_osmium_dust.png"
},
"nugget":{
"crack":6,
"inventory_image":"minerdream_osmium_nugget.png",
"stack_max":99,
"cooking_time":64
},
"tier":7,
"tool_cotton":"steel_wire",
"tool_stick":"minerdream:expensivestick",
"y_max":-2500,
"y_min":-31000}
"tools":{"maxlevel":4,"tool_stick":"minerdream:expensivestick","use":60,
"axe":{"choppy":[1,0.3,0.2],"fleshy":14},
"spear":{"range":7.5,"fleshy":17,"snappy":[1.2,0.5,0.04]},
"sword":{"fleshy":16,"snappy":[1,0.5,0.04]},
"pick":{"cracky":[1,0.45,0.125,2.75,3.5,5],"fleshy":14,"crumbly":[0.5,0.2,0.1]}
},
"3d_armor":{"cracky":2,"crumbly":1,"heal":8.5,"use":60,"snappy":3,"level":2,"choppy":2,"tool_cotton":"steel_wire",
"boots":{"fleshy":15,"gravity":-0.09,"jump":0.09,"speed":0.13},
"chestplate":{"fleshy":15,"gravity":-0.09,"jump":0.09,"speed":0.13},
"helmet":{"fleshy":15,"gravity":-0.09,"jump":0.09,"speed":0.13},
"leggings":{"fleshy":15,"gravity":-0.09,"jump":0.09,"speed":0.13},
"shields":{"fleshy":15,"gravity":-0.09,"jump":0.09,"speed":0.13}
}
}

View File

@ -1,85 +1,65 @@
{"axe":{"choppy":[1.1,0.35,0.225],
"fleshy":12,
"maxlevel":3},
"boots":{"choppy":2,
"cracky":2,
"crumbly":1,
"fleshy":15,
"gravity":-0.08,
"heal":8.35,
"jump":0.09,
"level":2,
"snappy":3,
"speed":0.12,
"use":80},
"chestplate":{"choppy":2,
"cracky":2,
"crumbly":1,
"fleshy":15,
"gravity":-0.08,
"heal":8.35,
"jump":0.09,
"level":2,
"snappy":3,
"speed":0.12,
"use":80},
"clust_size":4,
"color":"AC976FD0",
"crack":5,
"groups":{"drop_as_lump":1,
"has_bar":1,
"has_block":1,
"has_dust":1,
"has_lump":1,
"has_nugget":3,
{"color":"AC976FD0",
"groups":{
"has_bow":1,
"in_desert":1,
"is_metall":6},
"helmet":{"choppy":2,
"cracky":2,
"crumbly":1,
"fleshy":15,
"gravity":-0.08,
"heal":8.35,
"jump":0.09,
"level":2,
"snappy":3,
"speed":0.12,
"use":80},
"leggings":{"choppy":2,
"cracky":2,
"crumbly":1,
"fleshy":15,
"gravity":-0.08,
"heal":8.35,
"jump":0.09,
"level":2,
"snappy":3,
"speed":0.12,
"use":80},
"lump_cooking_time":58,
"is_metall":7},
"name":"palladium",
"num_ores":5,
"ore_modname":"minerdream",
"pick":{"cracky":[1.2,0.45,0.175,3,4,6],
"crumbly":[0.55,0.225,0.1],
"fleshy":12,
"maxlevel":3},
"scarcity":14,
"shields":{"choppy":2,
"cracky":2,
"crumbly":1,
"fleshy":15,
"gravity":-0.08,
"heal":8.35,
"jump":0.09,
"level":2,
"snappy":3,
"speed":0.12,
"use":80},
"sword":{"fleshy":14.5,
"maxlevel":3,
"snappy":[1.25,0.55,0.05]},
"block":{
"inventory_image":"minerdream_palladium_block.png"
},
"ingot":{
"grind_time":28,
"inventory_image":"minerdream_palladium_ingot.png"
},
"ore":{
"wherein":["stone","desert_stone"],
"crack":5,
"inventory_image":"minerdream_palladium_ore.png",
"clust_size":3,
"num_ores":5,
"scarcity":16,
"y_max":-3700,
"y_min":-31000
},
"poorore":{
"wherein":["stone","desert_stone"],
"inventory_image":"minerdream_palladium_poorore.png",
"crack":4,
"clust_size":3,
"num_ores":3,
"scarcity":16,
"y_max":-3500
},
"lump":{
"crack":5,
"inventory_image":"minerdream_palladium_lump.png",
"stack_max":99,
"cooking_time":58,
"grind_time":30
},
"dust":{
"crack":4,
"cooking_time":25,
"inventory_image":"minerdream_palladium_dust.png"
},
"nugget":{
"crack":5,
"inventory_image":"minerdream_palladium_nugget.png",
"stack_max":99,
"cooking_time":24
},
"tier":6,
"tool_stick":"minerdream:expensivestick",
"y_max":-3700,
"y_min":-31000}
"tools":{"maxlevel":3,"tool_stick":"minerdream:expensivestick","use":80,
"axe":{"choppy":[1.1,0.35,0.225],"fleshy":12},
"spear":{"range":7.5,"fleshy":17,"snappy":[1.2,0.5,0.04]},
"sword":{"fleshy":14.5,"snappy":[1.25,0.55,0.05]},
"pick":{"cracky":[1.2,0.45,0.175,2.75,3,4,6],"fleshy":12,"crumbly":[0.55,0.225,0.1]}
},
"3d_armor":{"cracky":2,"crumbly":1,"heal":8.35,"use":80,"snappy":3,"level":2,"choppy":2,"tool_cotton":"steel_wire",
"boots":{"fleshy":15,"gravity":-0.08,"jump":0.09,"speed":0.12},
"chestplate":{"fleshy":15,"gravity":-0.08,"jump":0.09,"speed":0.12},
"helmet":{"fleshy":15,"gravity":-0.08,"jump":0.09,"speed":0.12},
"leggings":{"fleshy":15,"gravity":-0.08,"jump":0.09,"speed":0.12},
"shields":{"fleshy":15,"gravity":-0.08,"jump":0.09,"speed":0.12}
}
}

View File

@ -1,93 +1,66 @@
{"axe":{"choppy":[1.7,0.65,0.35],
"fleshy":8,
"maxlevel":3},
"boots":{"choppy":2,
"cracky":2,
"crumbly":1,
"fleshy":13.5,
"gravity":-0.03,
"heal":7.75,
"jump":0.03,
"level":2,
"snappy":3,
"speed":0.03,
"use":100},
"chestplate":{"choppy":2,
"cracky":2,
"crumbly":1,
"fleshy":18.5,
"gravity":-0.03,
"heal":7.75,
"jump":0.03,
"level":2,
"snappy":3,
"speed":0.03,
"use":100},
"clust_size":3,
"color":"A5B49DD0",
"crack":1,
"groups":{"drop_as_lump":1,
"has_bar":1,
"has_bar_block":3,
"has_block":1,
{"color":"A5B49DD0",
"groups":{
"has_bow":1,
"has_brick":3,
"has_dust":1,
"has_lump":1,
"has_nugget":3,
"has_shovel":1,
"in_desert":1,
"is_metall":4},
"helmet":{"choppy":2,
"cracky":2,
"crumbly":1,
"fleshy":13.5,
"gravity":-0.03,
"heal":7.75,
"jump":0.03,
"level":2,
"snappy":3,
"speed":0.03,
"use":100},
"leggings":{"choppy":2,
"cracky":2,
"crumbly":1,
"fleshy":18.5,
"gravity":-0.03,
"heal":7.75,
"jump":0.03,
"level":2,
"snappy":3,
"speed":0.03,
"use":100},
"lump_cooking_time":16,
"is_metall":7},
"name":"platinum",
"num_ores":4,
"ore_modname":"minerdream",
"pick":{"cracky":[1.7,0.8,0.3,3.8],
"fleshy":8,
"maxlevel":3},
"scarcity":14,
"shields":{"choppy":2,
"cracky":2,
"crumbly":1,
"fleshy":13.5,
"gravity":-0.03,
"heal":7.75,
"jump":0.03,
"level":2,
"snappy":3,
"speed":0.03,
"use":100},
"shovel":{"crumbly":[0.8,0.3,0.15],
"fleshy":7,
"maxlevel":3},
"spear":{"fleshy":10,
"range":6.7,
"snappy":[1.5,0.7,0.1]},
"sword":{"fleshy":9,
"maxlevel":3,
"snappy":[1.5,0.7,0.1]},
"block":{
"inventory_image":"minerdream_platinum_block.png"
},
"ingot":{
"grind_time":28,
"inventory_image":"minerdream_platinum_ingot.png"
},
"ore":{
"wherein":["stone","desert_stone"],
"crack":1,
"inventory_image":"minerdream_platinum_ore.png",
"clust_size":3,
"num_ores":4,
"scarcity":16,
"y_max":-300,
"y_min":-31000
},
"poorore":{
"wherein":["stone","desert_stone"],
"inventory_image":"minerdream_platinum_poorore.png",
"crack":1,
"clust_size":3,
"num_ores":4,
"scarcity":16,
"y_max":-250
},
"lump":{
"crack":1,
"inventory_image":"minerdream_platinum_lump.png",
"stack_max":99,
"cooking_time":16,
"grind_time":30
},
"dust":{
"crack":1,
"cooking_time":25,
"inventory_image":"minerdream_platinum_dust.png"
},
"nugget":{
"crack":5,
"inventory_image":"minerdream_platinum_nugget.png",
"stack_max":99,
"cooking_time":24
},
"tier":4,
"y_max":-300,
"y_min":-31000}
"tools":{"maxlevel":3,"tool_stick":"minerdream:expensivestick","use":80,
"axe":{"choppy":[1.7,0.65,0.35],"fleshy":8},
"shovel":{"crumbly":[0.8,0.3,0.15],"fleshy":7},
"spear":{"range":6.7,"fleshy":10,"snappy":[1.5,0.7,0.1]},
"sword":{"fleshy":9,"snappy":[1.5,0.7,0.1]},
"pick":{"cracky":[1.7,0.8,0.3,2.8],"fleshy":8}
},
"3d_armor":{"cracky":2,"crumbly":1,"heal":7.75,"use":100,"snappy":3,"level":2,"choppy":2,"tool_cotton":"steel_wire",
"boots":{"fleshy":13.5,"gravity":-0.03,"jump":0.03,"speed":0.03},
"chestplate":{"fleshy":18.5,"gravity":-0.03,"jump":0.03,"speed":0.03},
"helmet":{"fleshy":13.5,"gravity":-0.03,"jump":0.03,"speed":0.03},
"leggings":{"fleshy":18.5,"gravity":-0.03,"jump":0.03,"speed":0.03},
"shields":{"fleshy":13.5,"gravity":-0.03,"jump":0.03,"speed":0.03}
}
}

View File

@ -1,89 +1,65 @@
{"axe":{"choppy":[1,0.3,0.2],
"fleshy":14,
"maxlevel":4},
"boots":{"choppy":2,
"cracky":2,
"crumbly":1,
"fleshy":15,
"gravity":-0.07,
"heal":8.55,
"jump":0.09,
"level":2,
"snappy":3,
"speed":0.1,
"use":100},
"chestplate":{"choppy":2,
"cracky":2,
"crumbly":1,
"fleshy":15,
"gravity":-0.07,
"heal":8.55,
"jump":0.09,
"level":2,
"snappy":3,
"speed":0.1,
"use":100},
"clust_size":3,
"color":"D95000D0",
"crack":6,
"groups":{"drop_as_lump":1,
"has_bar":1,
"has_block":1,
"has_brick":1,
"has_dust":1,
"has_lump":1,
"has_nugget":3,
{"color":"D95000D0",
"groups":{
"has_bow":1,
"in_desert":1,
"is_metall":7},
"helmet":{"choppy":2,
"cracky":2,
"crumbly":1,
"fleshy":15,
"gravity":-0.07,
"heal":8.55,
"jump":0.09,
"level":2,
"snappy":3,
"speed":0.1,
"use":100},
"leggings":{"choppy":2,
"cracky":2,
"crumbly":1,
"fleshy":15,
"gravity":-0.07,
"heal":8.55,
"jump":0.09,
"level":2,
"snappy":3,
"speed":0.1,
"use":100},
"lump_cooking_time":72,
"is_metall":5},
"name":"rarium",
"num_ores":2,
"ore_modname":"minerdream",
"pick":{"cracky":[1,0.45,0.125,2.75,3.5,5],
"crumbly":[0.5,0.2,0.1],
"fleshy":14,
"maxlevel":4},
"scarcity":16,
"shields":{"choppy":2,
"cracky":2,
"crumbly":1,
"fleshy":15,
"gravity":-0.07,
"heal":8.55,
"jump":0.09,
"level":2,
"snappy":3,
"speed":0.1,
"use":100},
"spear":{"fleshy":17,
"range":7.5,
"snappy":[1.2,0.5,0.04]},
"sword":{"fleshy":16,
"maxlevel":4,
"snappy":[1,0.5,0.04]},
"block":{
"inventory_image":"minerdream_rarium_block.png"
},
"ingot":{
"grind_time":28,
"inventory_image":"minerdream_rarium_ingot.png"
},
"ore":{
"wherein":["stone","desert_stone"],
"crack":6,
"inventory_image":"minerdream_rarium_ore.png",
"clust_size":3,
"num_ores":2,
"scarcity":17,
"y_max":-5000,
"y_min":-31000
},
"lump":{
"crack":6,
"inventory_image":"minerdream_rarium_lump.png",
"stack_max":99,
"cooking_time":72,
"grind_time":68
},
"dust":{
"crack":4,
"cooking_time":38,
"inventory_image":"minerdream_rarium_dust.png"
},
"nugget":{
"crack":6,
"inventory_image":"minerdream_rarium_nugget.png",
"stack_max":99,
"cooking_time":38
},
"poorore":{
"wherein":["stone","desert_stone"],
"inventory_image":"minerdream_rarium_poorore.png",
"crack":6,
"clust_size":3,
"num_ores":2,
"scarcity":17,
"y_max":-5500
},
"tier":7,
"tool_stick":"minerdream:expensivestick",
"y_max":-5000,
"y_min":-31000}
"tools":{"maxlevel":4,"tool_stick":"minerdream:expensivestick","use":80,
"axe":{"choppy":[1,0.3,0.2],"fleshy":14},
"spear":{"range":7.5,"fleshy":17,"snappy":[1.2,0.5,0.04]},
"sword":{"fleshy":16,"snappy":[1,0.5,0.04]},
"pick":{"cracky":[1,0.45,0.125,2.75,3.5,5],"fleshy":14,"crumbly":[0.5,0.2,0.1]}
},
"3d_armor":{"cracky":2,"crumbly":1,"heal":8.55,"use":100,"snappy":3,"level":2,"choppy":2,"tool_cotton":"steel_wire",
"boots":{"fleshy":15,"gravity":-0.07,"jump":0.09,"speed":0.1},
"chestplate":{"fleshy":15,"gravity":-0.07,"jump":0.09,"speed":0.1},
"helmet":{"fleshy":15,"gravity":-0.07,"jump":0.09,"speed":0.1},
"leggings":{"fleshy":15,"gravity":-0.07,"jump":0.09,"speed":0.1},
"shields":{"fleshy":15,"gravity":-0.07,"jump":0.09,"speed":0.1}
}
}

View File

@ -29,7 +29,7 @@
"grind_time":32
},
"dust":{
"cracky":3,
"crack":3,
"cooking_time":25,
"inventory_image":"minerdream_ruthenium_dust.png"
},
@ -42,17 +42,17 @@
"poorore":{
"wherein":["stone","desert_stone"],
"inventory_image":"minerdream_ruthenium_poorore.png",
"cracky":3,
"crack":3,
"clust_size":3,
"num_ores":3,
"scarcity":13,
"y_max":-250
},
"tier":5,
"tools":{"range":6.9,"maxlevel":3,"tool_stick":"minerdream:steelstick","use":80,
"tools":{"maxlevel":3,"tool_stick":"minerdream:steelstick","use":80,
"axe":{"choppy":[1.5,0.5,0.3],"fleshy":11},
"shovel":{"crumbly":[0.8,0.3,0.15],"fleshy":9},
"spear":{"fleshy":12,"snappy":[1.5,0.7,0.1]},
"spear":{"range":6.9,"fleshy":12,"snappy":[1.5,0.7,0.1]},
"sword":{"fleshy":11,"snappy":[1.5,0.7,0.1]},
"pick":{"cracky":[1.5,0.7,0.25,3.5,5],"fleshy":10}
},

View File

@ -6,6 +6,7 @@ local tier_cols={
local tier_definition = basic_functions.import_csv(minerdream.path.."/tiers.txt",tier_cols)
local ore_configs=minetest.get_dir_list(minerdream.path..'/config')
print(dump(ore_configs))
for i,oc in pairs(ore_configs) do
ore=string.split(oc,'.')[1]
local inconfig=basic_functions.read_file(minerdream.path..'/config/'..oc)