123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694 |
- -- Clear registration table afresh. Allows loading file multiple times.
- mob_spawn.registered = {}
- local register = mob_spawn.register_spawn
- -- This is not working, for some reason.
- -- Anyway, the wisp mob has special spawning code.
- --[[
- register({
- name = "pm:follower",
- nodes = {
- "basictrees:jungletree_leaves2",
- },
- min_height = 3111-16,
- max_height = 3115+16,
- clearance = 1,
- mob_limit = 1,
- absolute_mob_limit = 5,
- mob_range = 100,
- -- After a successful spawn, wait a lot of time before spawning another one.
- success_time_min = 60*5,
- success_time_max = 60*10,
- min_count = 1,
- max_count = 3,
- add_entity_func = function(...) pm.spawn_random_wisp(...) end,
- })
- --]]
- register({
- name = "nssm:white_werewolf",
- nodes = {
- "default:snow",
- "snow:footprints",
- },
- min_height = -10,
- max_height = 300,
- clearance = 3,
- mob_limit = 1,
- absolute_mob_limit = 100,
- mob_range = 100,
- -- After a successful spawn, wait a lot of time before spawning another one.
- success_time_min = 60*5,
- success_time_max = 60*10,
- -- Never spawn more than 1 mob at a time.
- min_count = 1,
- max_count = 1,
- -- Matches noise params for the ambiant wolf sound.
- noise_params = {
- offset = 0,
- scale = 1,
- spread = {x=256, y=256, z=256},
- seed = 381783,
- octaves = 2,
- persist = 0.5,
- lacunarity = 1.5,
- flags = "",
- },
- noise_threshold = 0.6, -- Higher than noise_threshold for ambiant sound.
- })
- register({
- name = "dm:dm",
- nodes = {
- "default:stone",
- "cavestuff:cobble_with_moss",
- "cavestuff:cobble_with_lichen",
- "cavestuff:cobble_with_algae",
- },
- min_light = 0,
- max_light = 2,
- min_height = -26000,
- max_height = -2048,
- clearance = 3,
- noise_params = {
- offset = 0,
- scale = 1,
- spread = {x=512, y=512, z=512},
- seed = 48912,
- octaves = 3,
- persist = 0.5,
- lacunarity = 1.5,
- flags = "",
- },
- noise_threshold = 0.5,
- })
- register({
- name = "dm:dm",
- nodes = {
- "rackstone:rackstone",
- "rackstone:redrack",
- "rackstone:mg_rackstone",
- "rackstone:mg_redrack",
- },
- min_light = 0,
- max_light = 4,
- max_height = -25000,
- clearance = 3,
- noise_params = {
- offset = 0,
- scale = 1,
- spread = {x=512, y=512, z=512},
- seed = 48912,
- octaves = 3,
- persist = 0.5,
- lacunarity = 1.5,
- flags = "",
- },
- noise_threshold = 0.3,
- })
- register({
- name = "golem:stone_golem",
- nodes = {"rackstone:rackstone"},
- min_light = 0,
- max_light = 6,
- max_height = -25000,
- clearance = 3,
- })
- -- Naraxen.
- register({
- name = "golem:stone_golem",
- nodes = {"darkage:basaltic_rubble", "darkage:basaltic"},
- min_light = 0,
- max_light = 6,
- min_height = 5150,
- max_height = 8150,
- clearance = 3,
- noise_params = {
- offset = 0,
- scale = 1,
- spread = {x=512, y=512, z=512},
- seed = 25206,
- octaves = 3,
- persist = 0.5,
- lacunarity = 1.5,
- flags = "",
- },
- noise_threshold = -0.3,
- })
- -- Caverealm griefer mob.
- -- Spawning behavior is similar to icemen on the surface.
- register({
- name = "griefer:griefer",
- nodes = {
- "cavestuff:dark_obsidian",
- "cavestuff:cobble_with_moss",
- "cavestuff:cobble_with_algae",
- },
- min_light = 0,
- max_light = 4,
- min_height = -31000,
- max_height = -5000,
- day_toggle = true,
- })
- register({
- name = "iceman:iceman",
- nodes = {
- -- Does not spawn on tree snow or ice.
- "default:snow",
- "snow:footprints",
- },
- min_light = 0,
- max_light = 4,
- mob_limit = 10,
- min_height = -21,
- max_height = 70,
- day_toggle = false,
- spawn_chance = 1,
- mob_range = 30,
- absolute_mob_limit = 20,
- player_min_range = 5,
- player_max_range = 20,
- spawn_radius = 20,
- node_skip = 4,
- node_jitter = 4,
- success_time_min = 1,
- success_time_max = 20,
- min_count = 1,
- max_count = 4,
- })
- register({
- name = "obsidianmonster:obsidianmonster",
- nodes = {"air"},
- min_light = 0,
- max_light = 0,
- max_height = -256,
- clearance = 2, -- Wants a 3x3x3 area.
- flyswim = "flyswim",
- noise_params = {
- offset = 0,
- scale = 1,
- spread = {x=512, y=512, z=512},
- seed = 2837189,
- octaves = 3,
- persist = 0.5,
- lacunarity = 1.5,
- flags = "",
- },
- noise_threshold = 0.3,
- })
- -- Naraxen.
- register({
- name = "obsidianmonster:obsidianmonster",
- nodes = {"air"},
- min_light = 0,
- max_light = 0,
- min_height = 5150,
- max_height = 8150,
- clearance = 2, -- Wants a 3x3x3 area.
- flyswim = "flyswim",
- noise_params = {
- offset = 0,
- scale = 1,
- spread = {x=512, y=512, z=512},
- seed = 25206,
- octaves = 3,
- persist = 0.5,
- lacunarity = 1.5,
- flags = "",
- },
- noise_threshold = -0.3,
- })
- -- That flying thing.
- register({
- name = "oerkki:oerkki",
- nodes = {"air"},
- min_light = 0,
- max_light = 0,
- min_height = -31000,
- max_height = -10,
- clearance = 2, -- Wants a 3x3x3 area.
- flyswim = "flyswim",
- noise_params = {
- offset = 0,
- scale = 1,
- spread = {x=512, y=512, z=512},
- seed = 27192,
- octaves = 3,
- persist = 0.5,
- lacunarity = 1.5,
- flags = "",
- },
- noise_threshold = 0.3,
- })
- -- Naraxen.
- register({
- name = "oerkki:oerkki",
- nodes = {"air"},
- min_light = 0,
- max_light = 0,
- min_height = 5150,
- max_height = 8150,
- clearance = 2, -- Wants a 3x3x3 area.
- flyswim = "flyswim",
- noise_params = {
- offset = 0,
- scale = 1,
- spread = {x=512, y=512, z=512},
- seed = 25206,
- octaves = 3,
- persist = 0.5,
- lacunarity = 1.5,
- flags = "",
- },
- noise_threshold = -0.3,
- })
- -- Night Master.
- register({
- name = "oerkki:night_master",
- nodes = {"air"},
- min_light = 0,
- max_light = 15,
- day_toggle = false,
- min_height = 3080,
- max_height = 3280,
- clearance = 3,
- flyswim = "flyswim",
- mob_limit = 1,
- absolute_mob_limit = 5,
- mob_range = 50,
- -- Never spawn more than 1 mob at a time.
- min_count = 1,
- max_count = 1,
- -- After a successful spawn, wait before spawning another one.
- success_time_min = 60*5,
- success_time_max = 60*10,
- -- Same as moonheron, with higher threshold.
- noise_params = {
- offset = 0,
- scale = 1,
- spread = {x=512, y=512, z=512},
- seed = 2852,
- octaves = 5,
- persist = 0.5,
- lacunarity = 1.5,
- flags = "",
- },
- noise_threshold = 0.8,
- })
- register({
- name = "nssm:moonheron",
- nodes = {"air"},
- min_light = 0,
- max_light = 15,
- day_toggle = false,
- min_height = 3060,
- max_height = 3280,
- clearance = 3,
- flyswim = "flyswim",
- mob_limit = 3,
- absolute_mob_limit = 5,
- mob_range = 50,
- -- Never spawn more than 1 mob at a time.
- min_count = 1,
- max_count = 1,
- -- Same as night master, with lower threshold.
- noise_params = {
- offset = 0,
- scale = 1,
- spread = {x=512, y=512, z=512},
- seed = 2852,
- octaves = 5,
- persist = 0.5,
- lacunarity = 1.5,
- flags = "",
- },
- noise_threshold = 0.7,
- })
- register({
- name = "rat:rat",
- nodes = {"default:stone"},
- min_light = 0,
- max_light = default.LIGHT_MAX,
- min_height = -128,
- max_height = 31000,
- clearance = 1,
- })
- register({
- name = "sheep:sheep",
- nodes = {"default:dirt_with_grass", "moregrass:darkgrass", "default:dirt_with_dry_grass"},
- min_light = 10,
- max_light = default.LIGHT_MAX,
- min_height = -30,
- max_height = 31000,
- day_toggle = nil, -- They spawn anytime.
- })
- register({
- name = "skeleton:skeleton",
- nodes = {
- "rackstone:rackstone",
- "rackstone:redrack",
- "rackstone:mg_rackstone",
- "rackstone:mg_redrack",
- },
- min_light = 0,
- max_light = 6,
- mob_limit = 10,
- max_height = -25000,
- clearance = 3,
- noise_params = {
- offset = 0,
- scale = 1,
- spread = {x=512, y=512, z=512},
- seed = 4817889,
- octaves = 3,
- persist = 0.5,
- lacunarity = 1.5,
- flags = "",
- },
- noise_threshold = 0.3,
- })
- -- Naraxen.
- register({
- name = "skeleton:skeleton",
- nodes = {"darkage:basaltic_rubble", "darkage:basaltic"},
- min_light = 0,
- max_light = 0,
- min_height = 5150,
- max_height = 8150,
- clearance = 3,
- noise_params = {
- offset = 0,
- scale = 1,
- spread = {x=512, y=512, z=512},
- seed = 25206,
- octaves = 3,
- persist = 0.5,
- lacunarity = 1.5,
- flags = "",
- },
- noise_threshold = -0.3,
- })
- register({
- name = "stoneman:stoneman",
- nodes = {"default:stone", "default:cobble"},
- min_light = 0,
- max_light = 1,
- mob_limit = 10,
- max_height = -128,
- })
- -- Naraxen.
- register({
- name = "stoneman:stoneman",
- nodes = {"darkage:basaltic_rubble", "darkage:basaltic"},
- min_light = 0,
- max_light = 1,
- min_height = 5150,
- max_height = 8150,
- clearance = 3,
- noise_params = {
- offset = 0,
- scale = 1,
- spread = {x=512, y=512, z=512},
- seed = 25206,
- octaves = 3,
- persist = 0.5,
- lacunarity = 1.5,
- flags = "",
- },
- noise_threshold = -0.3,
- })
- -- Naraxen.
- -- Disgusting eldritch.
- register({
- name = "nssm:morde",
- nodes = {"darkage:basaltic_rubble", "darkage:basaltic"},
- min_light = 0,
- max_light = 1,
- min_height = 5150,
- max_height = 8150,
- clearance = 3,
- mob_limit = 1,
- min_count = 1,
- max_count = 1,
- mob_range = 40,
- noise_params = {
- offset = 0,
- scale = 1,
- spread = {x=512, y=512, z=512},
- seed = 16804,
- octaves = 3,
- persist = 0.5,
- lacunarity = 1.5,
- flags = "",
- },
- noise_threshold = 0.3,
- })
- register({
- name = "warthog:warthog",
- nodes = {
- "rackstone:rackstone",
- "rackstone:redrack",
- "rackstone:mg_rackstone",
- "rackstone:mg_redrack",
- },
- min_light = 0,
- max_light = 3,
- mob_limit = 10,
- max_height = -25000,
- min_count = 7,
- max_count = 16,
- noise_params = {
- offset = 0,
- scale = 1,
- spread = {x=512, y=512, z=512},
- seed = 423821,
- octaves = 3,
- persist = 0.5,
- lacunarity = 1.5,
- flags = "",
- },
- noise_threshold = 0.3,
- })
- register({
- name = "sandman:sandman",
- nodes = {
- "default:desert_sand",
- },
- min_light = 0,
- max_light = 4,
- mob_limit = 10,
- min_height = 3700,
- max_height = 3800,
- day_toggle = false,
- spawn_chance = 1,
- mob_range = 30,
- absolute_mob_limit = 20,
- player_min_range = 5,
- player_max_range = 20,
- spawn_radius = 20,
- node_skip = 4,
- node_jitter = 4,
- success_time_min = 1,
- success_time_max = 20,
- min_count = 1,
- max_count = 4,
- })
- register({
- name = "sandman:stoneman",
- nodes = {"default:desert_stone"},
- min_light = 0,
- max_light = 4,
- mob_limit = 10,
- min_height = 3600,
- max_height = 3800,
- spawn_chance = 1,
- })
- register({
- name = "nssm:phoenix",
- nodes = {"air"},
- min_light = 12,
- max_light = 15,
- day_toggle = true,
- min_height = 3735,
- max_height = 3800,
- clearance = 3,
- flyswim = "flyswim",
- mob_limit = 1,
- absolute_mob_limit = 5,
- mob_range = 40,
- min_count = 1,
- max_count = 1,
- -- After a successful spawn, wait before spawning another one.
- success_time_min = 60*5,
- success_time_max = 60*10,
- noise_params = {
- offset = 0,
- scale = 1,
- spread = {x=512, y=512, z=512},
- seed = 10548,
- octaves = 5,
- persist = 0.5,
- lacunarity = 1.5,
- flags = "",
- },
- noise_threshold = 0.8,
- })
- register({
- name = "nssm:scrausics",
- nodes = {"air"},
- min_light = 12,
- max_light = 15,
- day_toggle = true,
- min_height = 3735,
- max_height = 3800,
- clearance = 3,
- flyswim = "flyswim",
- mob_limit = 3,
- absolute_mob_limit = 5,
- mob_range = 40,
- min_count = 1,
- max_count = 2,
- noise_params = {
- offset = 0,
- scale = 1,
- spread = {x=512, y=512, z=512},
- seed = 48727,
- octaves = 5,
- persist = 0.5,
- lacunarity = 1.5,
- flags = "",
- },
- noise_threshold = 0.8,
- })
- -- Pigs in the Outback.
- register({
- name = "animalworld:suboar",
- nodes = {"rackstone:cobble"},
- min_light = 0,
- max_light = 15,
- day_toggle = false,
- min_height = 4160+400,
- max_height = 4200+400,
- clearance = 2,
- mob_limit = 2,
- absolute_mob_limit = 6,
- mob_range = 40,
- realm_restriction = true,
- -- After a successful spawn, wait before spawning another one.
- success_time_min = 60*5,
- success_time_max = 60*10,
- -- Never spawn more than 1 mob at a time.
- min_count = 1,
- max_count = 1,
- })
- -- A very rare, very hard mob.
- register({
- name = "griefer:elite_griefer",
- nodes = {
- "bedrock:bedrock",
- "cavestuff:dark_obsidian",
- },
- min_height = -35000,
- max_height = 35000,
- clearance = 2,
- mob_limit = 2,
- absolute_mob_limit = 10,
- mob_range = 40,
- -- After a successful spawn, wait a lot of time before spawning another one.
- -- Between 1 and 4 hours.
- success_time_min = 60*60,
- success_time_max = 60*60*4,
- -- Min/max amount of mobs to spawn at one time.
- min_count = 1,
- max_count = 2,
- -- Because it is allowed to spawn in the Abyss, at the bedrock layer.
- realm_restriction = true,
- })
- -- Reinit per-player data.
- mob_spawn.players = {}
- local function re_init()
- local players = minetest.get_connected_players()
- for k, v in ipairs(players) do
- -- This is an indexed array.
- local pname = v:get_player_name()
- mob_spawn.reinit_player(pname)
- end
- end
- minetest.after(1, re_init)
|