From 8d8307baa8edeb97306d6bcd2828fcd9bbae0005 Mon Sep 17 00:00:00 2001 From: kno10 Date: Sat, 14 Dec 2024 01:28:30 +0100 Subject: [PATCH] additional structures --- mods/MAPGEN/vl_extra_structures/CREDITS.md | 4 ++ .../vl_extra_structures/forest_grave.lua | 17 +++++++++ .../vl_extra_structures/forest_well.lua | 18 +++++++++ mods/MAPGEN/vl_extra_structures/graveyard.lua | 12 +++--- mods/MAPGEN/vl_extra_structures/init.lua | 4 ++ mods/MAPGEN/vl_extra_structures/obelisks.lua | 4 +- .../schematics/forest_grave.mts | Bin 0 -> 225 bytes .../schematics/forest_well_1.mts | Bin 0 -> 349 bytes .../schematics/forest_well_2.mts | Bin 0 -> 231 bytes .../mcl_extra_structures_graveyard_2.mts | Bin 614 -> 753 bytes .../schematics/statue_1.mts | Bin 0 -> 333 bytes .../schematics/statue_2.mts | Bin 0 -> 522 bytes .../schematics/tree_hideout.mts | Bin 0 -> 865 bytes mods/MAPGEN/vl_extra_structures/statue.lua | 33 +++++++++++++++++ .../vl_extra_structures/tree_hideout.lua | 35 ++++++++++++++++++ 15 files changed, 120 insertions(+), 7 deletions(-) create mode 100644 mods/MAPGEN/vl_extra_structures/forest_grave.lua create mode 100644 mods/MAPGEN/vl_extra_structures/forest_well.lua create mode 100644 mods/MAPGEN/vl_extra_structures/schematics/forest_grave.mts create mode 100644 mods/MAPGEN/vl_extra_structures/schematics/forest_well_1.mts create mode 100644 mods/MAPGEN/vl_extra_structures/schematics/forest_well_2.mts create mode 100644 mods/MAPGEN/vl_extra_structures/schematics/statue_1.mts create mode 100644 mods/MAPGEN/vl_extra_structures/schematics/statue_2.mts create mode 100644 mods/MAPGEN/vl_extra_structures/schematics/tree_hideout.mts create mode 100644 mods/MAPGEN/vl_extra_structures/statue.lua create mode 100644 mods/MAPGEN/vl_extra_structures/tree_hideout.lua diff --git a/mods/MAPGEN/vl_extra_structures/CREDITS.md b/mods/MAPGEN/vl_extra_structures/CREDITS.md index db1e75c31..205f0df65 100644 --- a/mods/MAPGEN/vl_extra_structures/CREDITS.md +++ b/mods/MAPGEN/vl_extra_structures/CREDITS.md @@ -10,3 +10,7 @@ Schematics * Obelisks - kno10 * Cocoon - kno10 * Witches Circle - kno10 +* Statues - kno10 +* Forest Hideout - kno10 +* Forest Well - kno10 +* Forest Grave - kno10 diff --git a/mods/MAPGEN/vl_extra_structures/forest_grave.lua b/mods/MAPGEN/vl_extra_structures/forest_grave.lua new file mode 100644 index 000000000..6176c171a --- /dev/null +++ b/mods/MAPGEN/vl_extra_structures/forest_grave.lua @@ -0,0 +1,17 @@ +local modname = minetest.get_current_modname() +local S = minetest.get_translator(modname) +local modpath = minetest.get_modpath(modname) + +vl_structures.register_structure("forest_grave",{ + place_on = {"group:grass_block","group:dirt","mcl_core:dirt_with_grass"}, + flags = "place_center_x, place_center_z", + prepare = { tolerance = 3, clear_bottom = 0, padding = 0, corners = 0, foundation = -2 }, + chunk_probability = 20, + y_max = mcl_vars.mg_overworld_max, + y_min = 1, + biomes = { "Forest", "RoofedForest", "BirchForest", "FlowerForest", "CherryGrove", "ExtremeHills+" }, -- TODO: also add to some other biomes? + filenames = { + modpath.."/schematics/forest_grave.mts", + }, +}) + diff --git a/mods/MAPGEN/vl_extra_structures/forest_well.lua b/mods/MAPGEN/vl_extra_structures/forest_well.lua new file mode 100644 index 000000000..6657abac7 --- /dev/null +++ b/mods/MAPGEN/vl_extra_structures/forest_well.lua @@ -0,0 +1,18 @@ +local modname = minetest.get_current_modname() +local S = minetest.get_translator(modname) +local modpath = minetest.get_modpath(modname) + +vl_structures.register_structure("forest_well",{ + place_on = {"group:grass_block","group:dirt","mcl_core:dirt_with_grass"}, + flags = "place_center_x, place_center_z", + prepare = { tolerance = 3, clear_bottom = 1, clear_top = 0, padding = 0, corners = 1, foundation = -2 }, + chunk_probability = 20, + y_max = mcl_vars.mg_overworld_max, + y_min = 1, + biomes = { "Forest", "FlowerForest", "BirchForest", "CherryGrove", "RoofedForest", "MesaPlateauF", "ExtremeHills+", "Taiga", "MegaTaiga", "MegaSpruceTaiga" }, + filenames = { + modpath.."/schematics/forest_well_1.mts", + modpath.."/schematics/forest_well_2.mts", + }, +}) + diff --git a/mods/MAPGEN/vl_extra_structures/graveyard.lua b/mods/MAPGEN/vl_extra_structures/graveyard.lua index 1746a86b3..8541a6f28 100644 --- a/mods/MAPGEN/vl_extra_structures/graveyard.lua +++ b/mods/MAPGEN/vl_extra_structures/graveyard.lua @@ -2,12 +2,13 @@ local modname = minetest.get_current_modname() local S = minetest.get_translator(modname) local modpath = minetest.get_modpath(modname) +-- TODO: the schematics could use ignore/air to ensure a nice headroom and open entranceway, then we could reduce terraforming? vl_structures.register_structure("graveyard",{ place_on = {"group:grass_block","group:dirt","mcl_core:dirt_with_grass"}, flags = "place_center_x, place_center_z", - prepare = { tolerance = 3, clear_bottom = 1, clear_top = 0, padding = 0, corners = 1, foundation = -2 }, - y_offset = function(pr) return -(pr:next(3,3)) end, + prepare = { tolerance = 2, clear_bottom = 0, clear_top = -2, padding = 1, corners = 2, foundation = -2 }, chunk_probability = 40, + y_offset = -3, y_max = mcl_vars.mg_overworld_max, y_min = 1, biomes = { "BirchForest", "Forest", "Plains", "Taiga" }, @@ -37,8 +38,9 @@ vl_structures.register_structure("graveyard",{ for _,n in pairs(minetest.find_nodes_in_area(p1,p2,{"group:wall"})) do mcl_walls.update_wall(n) end - local sp = minetest.find_nodes_in_area(pos,vector.offset(pos,0,3,0),{"mcl_mobspawners:spawner"}) - if not sp[1] then return end - mcl_mobspawners.setup_spawner(sp[1], "mobs_mc:zombie", 0, minetest.LIGHT_MAX+1, 10, 3, -1) + local sp = minetest.find_nodes_in_area(p1,p2,{"mcl_mobspawners:spawner"}) + if #sp > 0 then + mcl_mobspawners.setup_spawner(sp[1], "mobs_mc:zombie", 0, 10, 10, 10, 2) + end end }) diff --git a/mods/MAPGEN/vl_extra_structures/init.lua b/mods/MAPGEN/vl_extra_structures/init.lua index 289f77caf..8d18ce748 100644 --- a/mods/MAPGEN/vl_extra_structures/init.lua +++ b/mods/MAPGEN/vl_extra_structures/init.lua @@ -8,3 +8,7 @@ dofile(modpath.."/graveyard.lua") dofile(modpath.."/obelisks.lua") dofile(modpath.."/spider_cocoon.lua") dofile(modpath.."/witches_circle.lua") +dofile(modpath.."/statue.lua") +dofile(modpath.."/tree_hideout.lua") +dofile(modpath.."/forest_well.lua") +dofile(modpath.."/forest_grave.lua") diff --git a/mods/MAPGEN/vl_extra_structures/obelisks.lua b/mods/MAPGEN/vl_extra_structures/obelisks.lua index b757c1597..c34778669 100644 --- a/mods/MAPGEN/vl_extra_structures/obelisks.lua +++ b/mods/MAPGEN/vl_extra_structures/obelisks.lua @@ -4,7 +4,7 @@ local modpath = minetest.get_modpath(modname) vl_structures.register_structure("obelisk_sand",{ place_on = {"group:sand"}, flags = "place_center_x, place_center_z", - chunk_probability = 12, + chunk_probability = 20, y_max = mcl_vars.mg_overworld_max, y_min = 1, y_offset = -3, @@ -38,7 +38,7 @@ vl_structures.register_structure("obelisk_light",{ vl_structures.register_structure("obelisk_cobble",{ place_on = {"group:grass_block", "group:dirt"}, flags = "place_center_x, place_center_z", - chunk_probability = 25, + chunk_probability = 35, y_max = mcl_vars.mg_overworld_max, y_min = 1, y_offset = -2, diff --git a/mods/MAPGEN/vl_extra_structures/schematics/forest_grave.mts b/mods/MAPGEN/vl_extra_structures/schematics/forest_grave.mts new file mode 100644 index 0000000000000000000000000000000000000000..4fc3c59e2e5f84029e01190cfe22aad00450c29e GIT binary patch literal 225 zcmeYb3HD`RVPFD6mil@IRtCM?pYBu;#BNq$~xQc-4dc5+c- za&~G8gAz!6aYt)u zi_b3wx~*bPasmUBn*s}?8e5vdY)OvD1_6)j&J4@~jfMe+#yu%aNeojCvn~Jt{IX9| literal 0 HcmV?d00001 diff --git a/mods/MAPGEN/vl_extra_structures/schematics/forest_well_1.mts b/mods/MAPGEN/vl_extra_structures/schematics/forest_well_1.mts new file mode 100644 index 0000000000000000000000000000000000000000..98d0934d03eb4a554dbf36d0a48125294d9ea73b GIT binary patch literal 349 zcmeYb3HD`RVPFQq`uchXE(VF*?`ldxNzmXlwe3N!+2bWUbYWyKuZo|C)`3Ot8n)*ZUC#?Mo*Z^~og0~%L8 isC~^~PT#a8=-=!u@_RT^JP)2xdj0pBA7AY&_HO{Ke~E_x literal 0 HcmV?d00001 diff --git a/mods/MAPGEN/vl_extra_structures/schematics/forest_well_2.mts b/mods/MAPGEN/vl_extra_structures/schematics/forest_well_2.mts new file mode 100644 index 0000000000000000000000000000000000000000..49d36037f340e0f67dbaf24b3ec25c5343f5326b GIT binary patch literal 231 zcmeYb3HD`RVPIxpVqmGSXJBKH$W6|PPtGq&wJI*j&r3}z%1qAA%`YylWKaOf6qh7s z78L{KfE18}szL^+q5`71D6=fJD84+g1V|R=mlh?bGRR_=P0PtI&&*3_UHCyHb$nJ~!bCg;Q#mn3Eu65@0Fp!O5vPw}|y?E<1lU-Gj<+24k;`io;RHr@vwwG^>yv2Im-d*aV zxv%@bJ5P16-%w>}Y`MfrzRXCn_|4NcnUp9wQyD*Iwm-5V=C7S4DxbXNcpG%L_=T)m S!S;mrR!5!}uWnVEec%1E2(GG(k46H-P5H`2@!Ta?|10lxKtlLmxyi=-u=$*AdBtQjuB1Lte z3T)^s;HS{+;W99;F&b*QQX4AzXtH>i?}G(Z|LZ}IJe1l8r01a46=rWj4{^mFI?>ms z|Mq(y&^+9s+5=`g-GZW?yy1DUh0a4x52fylC!dVzjPy^v#KY^rf!#s0v%ZAli|>^% Wm0I7!=1`-MlAHG-zlS$U#&V|YxoYeH diff --git a/mods/MAPGEN/vl_extra_structures/schematics/statue_1.mts b/mods/MAPGEN/vl_extra_structures/schematics/statue_1.mts new file mode 100644 index 0000000000000000000000000000000000000000..bbc3715ece4835d240ce22947a824e721f09f5d6 GIT binary patch literal 333 zcmeYb3HD`R0YY{Lwt5HvGMN)Iix`x0lXK#WOMuK`D=-D*Z&A78T@|6k9=<@j!NbQch`Ve11`KMrKOIoa6)sCO5WE48k*iC44h% zG!&ka#^$8PCT4J!NhFcgiA_an{@W8dCAB^oSrclxlQ%ysRP|g?*TGQqhmA4mNj58^ QnoipTPj`mD3xl5l0BCxBWdHyG literal 0 HcmV?d00001 diff --git a/mods/MAPGEN/vl_extra_structures/schematics/statue_2.mts b/mods/MAPGEN/vl_extra_structures/schematics/statue_2.mts new file mode 100644 index 0000000000000000000000000000000000000000..4c63531cc4bc3e04d7082818dccbeedaa2f97bc4 GIT binary patch literal 522 zcmeYb3HD`RVPIomXJD&`00tfg=ETe*2HxD{ocQGYqExH0%)C?vDG)a|F)zI+zbw@X z#)vN|N=;>u#wwSSnpl=v%pi|d609*kDX}P~yLbj#(hUTnp$zutOrW9p3VAU-RF zN%y2Dp2(1${c`P38xNT+=fByU;heqv`9 literal 0 HcmV?d00001 diff --git a/mods/MAPGEN/vl_extra_structures/schematics/tree_hideout.mts b/mods/MAPGEN/vl_extra_structures/schematics/tree_hideout.mts new file mode 100644 index 0000000000000000000000000000000000000000..09961014a4029d2ab397983595ba46e91d4141c2 GIT binary patch literal 865 zcmeYb3HD`RVc=%qV&JNW10bI{F|&w)H#a#aJ~_WA)v7ErFO`8G&do_pEK4m$k}oMr zO=S>*%Y(S_Nr^?-3}RrhjMU>= zsl}E}1$He&pkmJ1@a{>?1{^F~@5Nrte|BA8pF{D-ipwvj z%oDuclFE5Y?!auGvpeG!9{kbQUf0fh*R)=T%le1hGxvW}BF#c7dD&zy{|S8PyfZJb zAel$+)%9n6eRGz(Eh}1ZC}~;n$(d7oUovN2(YSx|=fWpeU0Hp1wO*UXZ=Tb7)pXXa zwAAEFhMIQ;Yg<0gx!`!AO!ZWp-v{NXD{du;+!b|xzWvm?Ro0iTl{v5OHJ<&zyrRBo zUS_q`t&(SZ+55JwzP5k6QStvAf5y2E4K#VS2LtrhuvRY29ONrCq? zJ01HPd-m9|Uv#~np8b0H$!|Azd`M+zDl^Xgxn`TyOo!IH>*Jn=d}Z7|W!~wOAnp3c zv+f11tIN}y5qw{5#@b!6UniMXWmkso*=~3H>b0UJmv@ELe0_f3_@}z2)b0f}Z&#k& zzT?y;b*~K%&NUcw<$JC;ci`2koW3tQH)kGB*DSnl!Lli2x8=?W7Y$g2vx{bi&p5wh zheh_C=@Q%jOybg>UsPOqOhnExBdvQkR5f;C6lc%yly-Ave+<9R2j`830!XA^S{ zwatF>ZO>HRN3)*hMh6QO8Y^?PGKr>N4r*U|#cHW>&@At!XJ6Vcsl?b_xvI^}y#9~E iiqs9V%WDkuWZqv{mwW4Jcf|AD*Xc1^>m{qsm;eB0GoHu* literal 0 HcmV?d00001 diff --git a/mods/MAPGEN/vl_extra_structures/statue.lua b/mods/MAPGEN/vl_extra_structures/statue.lua new file mode 100644 index 000000000..5ce6a64e9 --- /dev/null +++ b/mods/MAPGEN/vl_extra_structures/statue.lua @@ -0,0 +1,33 @@ +local modname = minetest.get_current_modname() +local S = minetest.get_translator(modname) +local modpath = minetest.get_modpath(modname) + +vl_structures.register_structure("statue",{ + place_on = {"group:grass_block","group:dirt","mcl_core:dirt_with_grass"}, + flags = "place_center_x, place_center_z", + prepare = { tolerance = 3, clear_bottom = 0, clear_top = 0, padding = -2, corners = 0, foundation = -2 }, + chunk_probability = 20, + y_max = mcl_vars.mg_overworld_max, + y_min = 1, + biomes = { "MegaTaiga", "MegaSpruceTaiga", "CherryGrove", "Swampland", "ExtremeHills+", "MesaPlateauF" }, -- TODO: also add to some other biomes? + filenames = { + modpath.."/schematics/statue_1.mts", + modpath.."/schematics/statue_2.mts", + }, + loot = { + ["mcl_chests:chest_small" ] ={{ + stacks_min = 1, + stacks_max = 2, + items = { + { itemstring = "mcl_core:iron_nugget", weight = 15, amount_min = 1, amount_max = 10 }, + { itemstring = "mcl_core:iron_ingot", weight = 5, amount_min = 1, amount_max = 5 }, + { itemstring = "mcl_core:gold_nugget", weight = 4, amount_min = 1, amount_max = 8 }, + { itemstring = "mcl_core:gold_ingot", weight = 3, amount_min = 2, amount_max = 7 }, + { itemstring = "mcl_core:diamond", weight = 1, amount_min = 2, amount_max = 5 }, + { itemstring = "mcl_core:emerald", weight = 1, amount_min = 2, amount_max = 5 }, + { itemstring = "mcl_core:lapis", weight = 3, amount_min = 2, amount_max = 10 }, + } + }} + } +}) + diff --git a/mods/MAPGEN/vl_extra_structures/tree_hideout.lua b/mods/MAPGEN/vl_extra_structures/tree_hideout.lua new file mode 100644 index 000000000..8946e6001 --- /dev/null +++ b/mods/MAPGEN/vl_extra_structures/tree_hideout.lua @@ -0,0 +1,35 @@ +local modname = minetest.get_current_modname() +local S = minetest.get_translator(modname) +local modpath = minetest.get_modpath(modname) + +vl_structures.register_structure("tree_hideout",{ + place_on = {"group:grass_block","group:dirt","mcl_core:dirt_with_grass"}, + flags = "place_center_x, place_center_z", + prepare = { tolerance = 6, clear = false, clear_bottom = 10, padding = -3, corners = 5, foundation = 2 }, + chunk_probability = 20, + y_max = mcl_vars.mg_overworld_max, + y_min = 1, + biomes = { "Forest", "ExtremeHills+", "MesaPlateauF" }, -- TODO: also add to some other biomes, with biome adaptation? + filenames = { + modpath.."/schematics/tree_hideout.mts", + }, + loot = { + ["mcl_chests:chest_small" ] ={{ + stacks_min = 2, + stacks_max = 4, + items = { + { itemstring = "mcl_mobitems:rotten_flesh", weight = 16, amount_min = 3, amount_max = 7 }, + { itemstring = "mcl_core:gold_ingot", weight = 3, amount_min = 2, amount_max = 6 }, + { itemstring = "mcl_core:gold_nugget", weight = 3, amount_min = 1, amount_max = 8 }, + { itemstring = "mcl_core:iron_ingot", weight = 5, amount_min = 1, amount_max = 5 }, + { itemstring = "mcl_core:iron_nugget", weight = 5, amount_min = 1, amount_max = 6 }, + { itemstring = "mcl_core:diamond", weight = 1, amount_min = 1, amount_max = 3 }, + { itemstring = "mcl_tools:sword_stone", weight = 15, }, + { itemstring = "mcl_tools:pick_stone", weight = 15, }, + { itemstring = "mcl_tools:shovel_stone", weight = 15, }, + { itemstring = "mcl_torches:torch", weight = 15, amount_min = 3, amount_max = 7 }, + }} + } + } +}) +