spawn_example.lua 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. --[[ Spawn Template, defaults to values shown if line not provided
  2. mobs:spawn({
  3. name = "",
  4. - Name of mob, must be provided e.g. "mymod:my_mob"
  5. nodes = {"group:soil, "group:stone"},
  6. - Nodes to spawn on top of.
  7. neighbors = {"air"},
  8. - Nodes to spawn beside.
  9. min_light = 0,
  10. - Minimum light level.
  11. max_light = 15,
  12. - Maximum light level, 15 is sunlight only.
  13. interval = 30,
  14. - Spawn interval in seconds.
  15. chance = 5000,
  16. - Spawn chance, 1 in every 5000 nodes.
  17. active_object_count = 1,
  18. - Active mobs of this type in area.
  19. min_height = -31000,
  20. - Minimum height level.
  21. max_height = 31000,
  22. - Maximum height level.
  23. day_toggle = nil,
  24. - Daytime toggle, true to spawn during day, false for night, nil for both
  25. on_spawn = nil,
  26. - On spawn function to run when mob spawns in world
  27. on_map_load = nil,
  28. - On map load, when true mob only spawns in newly generated map areas
  29. })
  30. ]]--
  31. -- Dirt Monster
  32. mobs:spawn({
  33. name = "mobs_monster:dirt_monster",
  34. nodes = {"default:dirt_with_grass"},
  35. min_light = 0,
  36. max_light = 7,
  37. chance = 6000,
  38. active_object_count = 2,
  39. min_height = 0,
  40. day_toggle = false,
  41. })
  42. -- Dungeon Master
  43. mobs:spawn({
  44. name = "mobs_monster:dungeon_master",
  45. nodes = {"default:stone"},
  46. max_light = 5,
  47. chance = 9000,
  48. active_object_count = 1,
  49. max_height = -70,
  50. })
  51. -- Lava Flan
  52. mobs:spawn({
  53. name = "mobs_monster:lava_flan",
  54. nodes = {"default:lava_source"},
  55. chance = 1500,
  56. active_object_count = 1,
  57. max_height = 0,
  58. })
  59. -- Mese Monster
  60. mobs:spawn({
  61. name = "mobs_monster:mese_monster",
  62. nodes = {"default:stone"},
  63. max_light = 7,
  64. chance = 5000,
  65. active_object_count = 1,
  66. max_height = -20,
  67. })
  68. -- Oerkki
  69. mobs:spawn({
  70. name = "mobs_monster:oerkki",
  71. nodes = {"default:stone"},
  72. max_light = 7,
  73. chance = 7000,
  74. max_height = -10,
  75. })
  76. -- Sand Monster
  77. mobs:spawn({
  78. name = "mobs_monster:sand_monster",
  79. nodes = {"default:desert_sand"},
  80. chance = 7000,
  81. active_object_count = 2,
  82. min_height = 0,
  83. })
  84. -- Spider (above ground)
  85. mobs:spawn({
  86. name = "mobs_monster:spider",
  87. nodes = {
  88. "default:dirt_with_rainforest_litter", "default:snowblock",
  89. "default:snow", "ethereal:crystal_dirt", "ethereal:cold_dirt"
  90. },
  91. min_light = 0,
  92. max_light = 8,
  93. chance = 7000,
  94. active_object_count = 1,
  95. min_height = 25,
  96. max_height = 31000,
  97. })
  98. -- Spider (below ground)
  99. mobs:spawn({
  100. name = "mobs_monster:spider",
  101. nodes = {"default:stone_with_mese", "default:mese", "default:stone"},
  102. min_light = 0,
  103. max_light = 7,
  104. chance = 7000,
  105. active_object_count = 1,
  106. min_height = -31000,
  107. max_height = -40,
  108. })
  109. -- Stone Monster
  110. mobs:spawn({
  111. name = "mobs_monster:stone_monster",
  112. nodes = {"default:stone", "default:desert_stone", "default:sandstone"},
  113. max_light = 7,
  114. chance = 7000,
  115. max_height = 0,
  116. })
  117. -- Tree Monster
  118. mobs:spawn({
  119. name = "mobs_monster:tree_monster",
  120. nodes = {"default:leaves", "default:jungleleaves"},
  121. max_light = 7,
  122. chance = 7000,
  123. min_height = 0,
  124. day_toggle = false,
  125. })