123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352 |
- -- 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 = {"whitestone:stone"},
- min_light = 0,
- max_light = 6,
- max_height = -25000,
- clearance = 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,
- })
- -- 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,
- })
- 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,
- })
- register({
- name = "stoneman:stoneman",
- nodes = {"default:stone", "default:cobble"},
- min_light = 0,
- max_light = 1,
- mob_limit = 10,
- max_height = -128,
- })
- 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,
- })
- -- Reinit per-player data.
- mob_spawn.players = {}
- 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
|