Page 1 of 1

Help for mod!!!!![SOLVED]

PostPosted: Wed Mar 30, 2016 11:39
by azekill_DIABLO
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
-- Dungeon Master by PilzAdam

mobs:register_mob("mobs:dungeon_master", {
   type = "monster",
   passive = false,
   damage = 4,
   attack_type = "dogshoot",
   reach = 3,
   shoot_interval = 2.5,
   arrow = "mobs:fireball",
   shoot_offset = 1,
   hp_min = 12,
   hp_max = 35,
   armor = 60,
   collisionbox = {-0.7, -1, -0.7, 0.7, 1.6, 0.7},
   visual = "mesh",
   mesh = "mobs_dungeon_master.b3d",
   textures = {
      {"mobs_dungeon_master.png"},
      {"mobs_dungeon_master2.png"},
      {"mobs_dungeon_master3.png"},
   },
   makes_footstep_sound = true,
   sounds = {
      random = "mobs_dungeonmaster",
      shoot_attack = "mobs_fireball",
   },
   walk_velocity = 1,
   run_velocity = 3,
   jump = true,
   view_range = 15,
   drops = {
      {name = "default:mese_crystal_fragment", chance = 1, min = 1, max = 3},
      {name = "default:diamond", chance = 4, min = 1, max = 1},
      {name = "default:mese_crystal", chance = 2, min = 1, max = 2},
      {name = "default:diamondblock", chance = 30, min = 1, max = 1},
   },
   water_damage = 1,
   lava_damage = 1,
   light_damage = 0,
   fear_height = 3,
   animation = {
      stand_start = 0,
      stand_end = 19,
      walk_start = 20,
      walk_end = 35,
      punch_start = 36,
      punch_end = 48,
      speed_normal = 15,
      speed_run = 15,
   },
})

mobs:register_spawn("mobs:dungeon_master", {"default:mossycobble"}, 7, 0, 7000, 2, -7000)

mobs:register_egg("mobs:dungeon_master", "Dungeon Master", "fire_basic_flame.png", 1)

-- fireball (weapon)
mobs:register_arrow("mobs:fireball", {
   visual = "sprite",
   visual_size = {x = 1, y = 1},
   textures = {"mobs_fireball.png"},
   velocity = 6,

   -- direct hit, no fire... just plenty of pain
   hit_player = function(self, player)
      player:punch(self.object, 1.0, {
         full_punch_interval = 1.0,
         damage_groups = {fleshy = 8},
      }, nil)
   end,

   hit_mob = function(self, player)
      player:punch(self.object, 1.0, {
         full_punch_interval = 1.0,
         damage_groups = {fleshy = 8},
      }, nil)
   end,

   -- node hit, bursts into flame
   hit_node = function(self, pos, node)
      mobs:explosion(pos, 1, 1, 0)
   end
})


how cna i modify this to make dungeon master spawn on mossy cobble, in the dark?

Re: Help for mod!!!!!URGENT

PostPosted: Thu Mar 31, 2016 14:21
by Wuzzy
Weird, it looks like your mod already does. This is the line in your code to configure mob spawning:

mobs:register_spawn("mobs:dungeon_master", {"default:mossycobble"}, 7, 0, 7000, 2, -7000)

This basically means to spawn dungeon masters on mossy cobble at light levels 0-7, between a height of -7000 and 7000. Chance is set to 2 which should be pretty common IMO.

Maybe you have to play a little bit longer to see a dungeon master.

Which mobs mod do you use? Mobs Redo by TenPlus1?

Here's the API documentation: https://github.com/tenplus1/mobs/wiki/Mob-Api
If not, you should look for the API documentation.

Re: Help for mod!!!!!URGENT

PostPosted: Thu Mar 31, 2016 15:34
by azekill_DIABLO
yes it's mob redo....

but i tested it,they don't spawn on mossy cobble

Re: Help for mod!!!!!URGENT

PostPosted: Thu Mar 31, 2016 15:35
by azekill_DIABLO
ps i played an hour without seeing any!

Re: Help for mod!!!!!URGENT

PostPosted: Fri Apr 01, 2016 00:08
by MineYoshi
first try "spawn_entity" to know that the dungeon_master works!

Then try to know the configurations you wrote in there, and then try to make a similar condition, put 1 mossy cobble node, and that spawns in the node don't works!

Re: Help for mod!!!!!URGENT

PostPosted: Fri Apr 01, 2016 00:54
by maikerumine
You mist be below -7000 to see them.

Re: Help for mod!!!!!URGENT

PostPosted: Fri Apr 01, 2016 04:28
by Wuzzy
Oh, maikerumine is right. I must be blind, can't I read the API documentation anymore? xD Forget what I a have said in my previous post.

mobs:register_spawn("mobs:dungeon_master", {"default:mossycobble"}, 7, 0, 7000, 2, -7000)

The final parameter is max_height, it is -7000 so they spawn very very deep only.
You can fix this by setting the final parameter to a much higher value (decide for yourself below which Y height you want them to spawn. If you don't care, you can enter 31000).

Re: Help for mod!!!!!URGENT

PostPosted: Fri Apr 01, 2016 16:34
by azekill_DIABLO
oh really?it's only that??!

thank you i didn't noticed the height...

Re: Help for mod!!!!!URGENT

PostPosted: Fri Apr 01, 2016 16:36
by azekill_DIABLO
and yes Mine yoshi if it works, i will put [SOLVED] on the title of the topic ;)

Re: Help for mod!!!!!URGENT

PostPosted: Fri Apr 01, 2016 20:26
by MineYoshi
ok, i will see what to do if you can't fix this problem!

Re: Help for mod!!!!![SOLVED]

PostPosted: Sat Apr 02, 2016 16:24
by azekill_DIABLO
SOLVED!

thanks guys...