[Mod] Mobs Redo [1.50] [mobs]

User avatar
duane
Member
 
Posts: 1611
Joined: Wed Aug 19, 2015 19:11
Location: Oklahoma City
GitHub: duane-r

Re: [Mod] Mobs Redo [1.30] [mobs]

by duane » Sat Aug 06, 2016 01:17

KCoombes wrote:I have checked everything I can think of, but can't find anything missing that would cause this error. Here's my frog:

Code: Select all
mobs.register_mob("test:frog",{
   })


As the error specifies 'def.stepheight' in the api.lua, I double-checked the code I based the frog on - it doesn't contain 'stepheight' either, and runs fine.


Make that first period into a colon. Mobs is a pseudo-object, and expects self as the first argument. The colon supplies that.


@TenPlus1: There are also a couple of undeclared globals in the api.

Code: Select all
2016-08-05 20:02:47: WARNING[Server]: Assignment to undeclared global "p" inside a function at ...ng/minetest/minetest/bin/../mods/duane/mobs_redo/api.lua:1058.
2016-08-05 20:02:47: WARNING[Server]: Assignment to undeclared global "dist" inside a function at ...ng/minetest/minetest/bin/../mods/duane/mobs_redo/api.lua:1060.
Believe in people and you don't need to believe anything else.
 

KCoombes
Member
 
Posts: 412
Joined: Thu Jun 11, 2015 23:19
Location: SW Florida, USA
In-game: Knatt

Re: [Mod] Mobs Redo [1.30] [mobs]

by KCoombes » Sat Aug 06, 2016 01:51

duane wrote:
KCoombes wrote:-snip-


Make that first period into a colon. Mobs is a pseudo-object, and expects self as the first argument. The colon supplies that.


Wow, I can't believe I missed that - must be tired eyes :) Thanks!
 

alundra55
New member
 
Posts: 4
Joined: Sat Aug 06, 2016 03:14
In-game: ultra
 

User avatar
TenPlus1
Member
 
Posts: 2671
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Mobs Redo [1.30] [mobs]

by TenPlus1 » Sat Aug 06, 2016 06:21

KCoombes, try this:

Code: Select all
mobs:register_mob("test:frog",{
    type = "animal",
    passive = true,
    -- group_attack = true, -- won't do anything unless passive = false
    hp_min = 3,
    hp_max = 8,
    visual = "mesh",
    visual_size = {x=4.0,y=4.0},
    mesh = "frog.obj",
    textures = {
       {"frog_back.png","frog_back.png","frog_right.png",
       "frog_right.png","frog_back.png","frog_front.png"},
    },
    collisionbox = {-0.3, -0.75, -0.3, 0.3, 0.1, 0.3},
    child_texture = {
       {"frog_back.png","frog_back.png","frog_right.png",
       "frog_right.png","frog_back.png","frog_front.png"},
    }, -- child texture not required, will use default textures above unless different
    makes_footstep_sound = false,
    sounds = {
       random = "frog",
    },
    walk_chance = 0,
    jump_chance = 5,
    walk_velocity = 1,
    run_velocity = 4,
    runaway = true,
    jump = true,
    jump_height = 8,
    water_damage = 0,
    lava_damage = 5,
    light_damage = 0,
    fall_damage = 0,
    fall_speed = -8,
    fear_height = 4,
    animation = {
       speed_normal = 15,
       stand_start = 0,
       stand_end = 1,
       walk_start = 20,
       walk_end = 40,
    },
    view_range = 7,
    floats = 1,
    on_rightclick = function(self, clicker)
       mobs:capture_mob(self, clicker, 25, 80, 0, true, nil)
    end,
})
 

ph8jPf9M
Member
 
Posts: 77
Joined: Sat Jul 16, 2016 10:29
GitHub: 22i

Re: [Mod] Mobs Redo [1.30] [mobs]

by ph8jPf9M » Sat Aug 06, 2016 07:24

Can you implement the ability to spawn mobs by putting blocks in certain way
the blocks disappear and certain mob spawns like 3 webs on top of each other to spawn spider.

add an ability to make a certain ritual to summon a mob. Like first making the 3x3 floor of messe blocks then droping items on it like a tribute.

this post can help you out a bit https://forum.minetest.net/viewtopic.php?id=7128
 

User avatar
TenPlus1
Member
 
Posts: 2671
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Mobs Redo [1.30] [mobs]

by TenPlus1 » Sat Aug 06, 2016 08:21

Special spawns using blocks set in a certain way is up to mod makers to define :)
 

User avatar
taikedz
Member
 
Posts: 692
Joined: Sun May 15, 2016 11:11
Location: Scotland, UK
GitHub: taikedz
IRC: DuCake
In-game: DuCake

Re: [Mod] Mobs Redo [1.30] [mobs]

by taikedz » Sat Aug 06, 2016 09:38

I am attaching the latest ZIP taken from the github master, for someone who was asking.

NOTE - I completely missed the ability to geenrate a ZIP directly on github. Mea culpa.
Attachments
minetest-mobs_redo.zip
From master branch 2016-08-06 10:30 UTC
(41 KiB) Downloaded 27 times
Last edited by taikedz on Mon Aug 15, 2016 14:16, edited 1 time in total.
 

KCoombes
Member
 
Posts: 412
Joined: Thu Jun 11, 2015 23:19
Location: SW Florida, USA
In-game: Knatt
 

ph8jPf9M
Member
 
Posts: 77
Joined: Sat Jul 16, 2016 10:29
GitHub: 22i

Re: [Mod] Mobs Redo [1.30] [mobs]

by ph8jPf9M » Sat Aug 06, 2016 11:53

TenPlus1 wrote:Special spawns using blocks set in a certain way is up to mod makers to define :)

can you make an example on how to do it?
 

blert2112
Member
 
Posts: 244
Joined: Sat Apr 25, 2015 04:05
GitHub: blert2112

Re: [Mod] Mobs Redo [1.30] [mobs]

by blert2112 » Sat Aug 06, 2016 14:54

ph8jPf9M wrote:
TenPlus1 wrote:Special spawns using blocks set in a certain way is up to mod makers to define :)

can you make an example on how to do it?

Take a look at my mobs_dragon mod that I threw together for DOOMed. You can spawn a ridable dragon by building a 3x3 platform and placing a dragon egg on top. The type of dragon you get depends on the material the platform is made of.
 

User avatar
burli
Member
 
Posts: 1641
Joined: Fri Apr 10, 2015 13:18

Re: [Mod] Mobs Redo [1.30] [mobs]

by burli » Sun Aug 07, 2016 13:54

'replace_offset' +/- value to check specific node to replace


What does that mean?
 

ph8jPf9M
Member
 
Posts: 77
Joined: Sat Jul 16, 2016 10:29
GitHub: 22i

Re: [Mod] Mobs Redo [1.30] [mobs]

by ph8jPf9M » Mon Aug 08, 2016 08:27

Why are zombies spawning during daytime in full sunlight? i think it must be something with min_light, max_light but dont know exact values to only spawn them at night and in the darkness during day but never in full sunlight and how do i check light level ingame?

Code: Select all
if mobs.mod and mobs.mod == "redo" then

   local ENABLE_MINI_ZOMBIE = true

-- zombie
   mobs:register_mob("mobs_zombie:zombie", {
      type = "monster",
      visual = "mesh",
      mesh = "creatures_mob.x",
      textures = {
         {"mobs_zombie.png"},
      },
      collisionbox = {-0.25, -1, -0.3, 0.25, 0.75, 0.3},
      animation = {
         speed_normal = 10,      speed_run = 15,
         stand_start = 0,      stand_end = 79,
         walk_start = 168,      walk_end = 188,
         run_start = 168,      run_end = 188
      },
      makes_footstep_sound = true,
      sounds = {
         random = "mobs_zombie.1",
         war_cry = "mobs_zombie.3",
         attack = "mobs_zombie.2",
         damage = "mobs_zombie_hit",
         death = "mobs_zombie_death",
      },
      hp_min = 12,
      hp_max = 35,
      armor = 200,
      knock_back = 1,
      lava_damage = 10,
      damage = 4,
      reach = 2,
      attack_type = "dogfight",
      group_attack = true,
      view_range = 50,
      walk_chance = 75,
      walk_velocity = 2,
      run_velocity = 2, --0.5
      jump = true,
      drops = {
         {name = "mobs_zombie:rotten_flesh", chance = 1, min = 1, max = 3,}
      },
      lifetimer = 180,      -- 3 minutes
      shoot_interval = 135,   -- (lifetimer - (lifetimer / 4)), borrowed for do_custom timer
      do_custom = function(self)
         if ENABLE_MINI_ZOMBIE and self.lifetimer <= self.shoot_interval then
            if math.random(100) <= 50 then
               minetest.add_entity(self.object:getpos(), "mobs_zombie:zombie_mini")
            end
            self.shoot_interval = self.shoot_interval - 45
         end
      end
   })

   --name, nodes, neighbors, min_light, max_light, interval, chance, active_object_count, min_height, max_height
   mobs:spawn_specific("mobs_zombie:zombie",
      {"default:stone", "default:snowblock", "default:desert_sand", "default:dirt_with_grass"},
      {"air"},
      0, 1, 30, 1, 2, -31000, 31000
   )
   mobs:register_egg("mobs_zombie:zombie", "Zombie", "zombie_head.png", 0)
   
-- mini zombie
   if ENABLE_MINI_ZOMBIE then
      mobs:register_mob("mobs_zombie:zombie_mini", {
         type = "monster",
         visual = "mesh",
         mesh = "creatures_mob.x",
         textures = {
            {"mobs_zombie.png"},
         },
         visual_size = {x = 0.5, y = 0.5},
         collisionbox = {-0.125, -0.5, -0.15, 0.125, 0.375, 0.15},
         animation = {
            speed_normal = 10,      speed_run = 15,
            stand_start = 0,      stand_end = 79,
            walk_start = 168,      walk_end = 188,
            run_start = 168,      run_end = 188
         },
         makes_footstep_sound = true,
         sounds = {
            random = "mobs_zombie.1",
            war_cry = "mobs_zombie.3",
            attack = "mobs_zombie.2",
            damage = "mobs_zombie_hit",
            death = "mobs_zombie_death"
         },
         hp_min = 20,
         hp_max = 45,
         armor = 150,
         knock_back = 1,
         lava_damage = 10,
         damage = 6,
         reach = 1,
         attack_type = "dogfight",
         group_attack = true,
         view_range = 10,
         walk_chance = 75,
         walk_velocity = 0.8,
         run_velocity = 0.8,
         jump = false,
         drops = {
            {name = "mobs_zombie:rotten_flesh", chance = 1, min = 1, max = 1,}
         }
      })
   end

-- rotten flesh
   minetest.register_craftitem("mobs_zombie:rotten_flesh", {
      description = "Rotten Flesh",
      inventory_image = "mobs_rotten_flesh.png",
      on_use = minetest.item_eat(1),
   })

end
 

MoNTE48
Member
 
Posts: 293
Joined: Sat Apr 06, 2013 11:58
GitHub: MoNTE48
In-game: MoNTE48

Re: [Mod] Mobs Redo [1.30] [mobs]

by MoNTE48 » Mon Aug 08, 2016 09:30

Hello everybody. It seems to me, or just the first punch causes damage? If you continue to beat the mob without releasing the left mouse button, it will not receive any damage.
 

User avatar
burli
Member
 
Posts: 1641
Joined: Fri Apr 10, 2015 13:18

Re: [Mod] Mobs Redo [1.30] [mobs]

by burli » Mon Aug 08, 2016 09:32

Martin_Devil wrote:Hello everybody. It seems to me, or just the first punch causes damage? If you continue to beat the mob without releasing the left mouse button, it will not receive any damage.

That is the weapon cool down. You can only make damage every second
 

MoNTE48
Member
 
Posts: 293
Joined: Sat Apr 06, 2013 11:58
GitHub: MoNTE48
In-game: MoNTE48

Re: [Mod] Mobs Redo [1.30] [mobs]

by MoNTE48 » Mon Aug 08, 2016 09:34

burli wrote:
Martin_Devil wrote:Hello everybody. It seems to me, or just the first punch causes damage? If you continue to beat the mob without releasing the left mouse button, it will not receive any damage.

That is the weapon cool down. You can only make damage every second

Hmm. I held the button for 3-4 seconds and the damage is not applied any more.
 

User avatar
TenPlus1
Member
 
Posts: 2671
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Mobs Redo [1.30] [mobs]

by TenPlus1 » Mon Aug 08, 2016 09:40

You cannot spam attack mobs anymore you have to wait for weapon punch intervals before next attack...

...also, ph8jPf9M, try this to spawn zombie:

Code: Select all
mobs:spawn({
   name = "mobs_zombie:zombie",
   nodes = {"default:stone", "default:snowblock", "default:desert_sand", "default:dirt_with_grass"},
   neighbors = {"air"},
   min_light = 0,
   max_light = 5,
   interval = 30,
   chance = 1,
   active_object_count = 2,
   min_height = -31000,
   max_height = 31000,
   day_toggle = false, -- true for day only, false for night only, nil for both
})
 

MoNTE48
Member
 
Posts: 293
Joined: Sat Apr 06, 2013 11:58
GitHub: MoNTE48
In-game: MoNTE48

Re: [Mod] Mobs Redo [1.30] [mobs]

by MoNTE48 » Mon Aug 08, 2016 09:42

TenPlus1 wrote:You cannot spam attack mobs anymore you have to wait for weapon punch intervals before next attack...

Can you tell me where I can set it up in api.lua? It is too lazy to look :) Thank you
 

User avatar
burli
Member
 
Posts: 1641
Joined: Fri Apr 10, 2015 13:18

Re: [Mod] Mobs Redo [1.30] [mobs]

by burli » Mon Aug 08, 2016 09:54

Cool, thx for adding my suggestion. But you don't need to add default values. This would be enough

TenPlus1 wrote:
Code: Select all
mobs:spawn({
   name = "mobs_zombie:zombie",
   nodes = {"default:stone", "default:snowblock", "default:desert_sand", "default:dirt_with_grass"},
   max_light = 5,
   chance = 1,
   active_object_count = 2,
   day_toggle = false, -- true for day only, false for night only, nil for both
})
 

User avatar
TenPlus1
Member
 
Posts: 2671
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Mobs Redo [1.30] [mobs]

by TenPlus1 » Mon Aug 08, 2016 12:53

burli: yup, I know... was just showing all the settings for those who wanna use 'em :)

Martin: please do not edit the mob api, if you define a weapon with a very low punch interval it'll let you spam attack any mod instead.
 

ph8jPf9M
Member
 
Posts: 77
Joined: Sat Jul 16, 2016 10:29
GitHub: 22i

Re: [Mod] Mobs Redo [1.30] [mobs]

by ph8jPf9M » Mon Aug 08, 2016 19:28

i was trying to replace sheep and chicken models and textures from Animals for Mobs Redo https://github.com/tenplus1/mobs_animal with the ones from blockmens https://forum.minetest.net/viewtopic.php?t=8638 cretures mob engine. When i tested them out they came out not as i was expecting. The textures were messed up chicken was walking backwards and both animals were floating one block in the air. But then again i did just small changes to the init.lua like textures and mesh. Can you make creatures from blockmen avaivable for mobs redo? If they already are avaivable for mobs redo can you link me to em.
Attachments
sheep.png
sheep
(267.54 KiB) Not downloaded yet
chicken.png
chicken
(260.85 KiB) Not downloaded yet
 

KCoombes
Member
 
Posts: 412
Joined: Thu Jun 11, 2015 23:19
Location: SW Florida, USA
In-game: Knatt

Re: [Mod] Mobs Redo [1.30] [mobs]

by KCoombes » Mon Aug 08, 2016 22:05

ph8jPf9M wrote:-snip-
. Can you make creatures from blockmen avaivable for mobs redo? If they already are avaivable for mobs redo can you link me to em.


Probably better to ask Blockman to change his stuff, rather than having TenPlus1 hijack Blockman's stuff...
 

User avatar
duane
Member
 
Posts: 1611
Joined: Wed Aug 19, 2015 19:11
Location: Oklahoma City
GitHub: duane-r

Re: [Mod] Mobs Redo [1.30] [mobs]

by duane » Tue Aug 09, 2016 01:58

KCoombes wrote:
ph8jPf9M wrote:-snip-
. Can you make creatures from blockmen avaivable for mobs redo? If they already are avaivable for mobs redo can you link me to em.


Probably better to ask Blockman to change his stuff, rather than having TenPlus1 hijack Blockman's stuff...


It sure would be nice if the folks who make all the various mobs would post blender models of them with their code. As far as I know, there's no free software that can modify a .b3d model. I've found a few of the blender files from not so simple mobs, but that's about it.
Believe in people and you don't need to believe anything else.
 

User avatar
Christian9
Member
 
Posts: 337
Joined: Fri Sep 19, 2014 20:29
Location: Hell Creek
In-game: Christian9

Re: [Mod] Mobs Redo [1.30] [mobs]

by Christian9 » Tue Aug 09, 2016 02:48

Im working on an import for .b3d files in blender
 

blert2112
Member
 
Posts: 244
Joined: Sat Apr 25, 2015 04:05
GitHub: blert2112

Re: [Mod] Mobs Redo [1.30] [mobs]

by blert2112 » Tue Aug 09, 2016 03:17

ph8jPf9M wrote:...chicken was walking backwards...

try...
Code: Select all
...
rotate=180,
...

ph8jPf9M wrote:...both animals were floating one block in the air...

Try adjusting the collision box.
 

ph8jPf9M
Member
 
Posts: 77
Joined: Sat Jul 16, 2016 10:29
GitHub: 22i

Re: [Mod] Mobs Redo [1.30] [mobs]

by ph8jPf9M » Tue Aug 09, 2016 12:28

ty rotating the chicken for 180 degress helped and managed to fix most of the errors.

Is there a way to make mobs dance (constantly rotating) via right click with an item?
 

PreviousNext

Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 41 guests