[Mod] Mobs Redo [1.50] [mobs]

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

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

by TenPlus1 » Tue Feb 14, 2017 08:57

redblade7 - are you in creative mode ? if so then you will have unlimited items and they remain in your inventory, but... I've just added a change where tamed eggs will be removed even in creative so please update mobs redo api.
 

redblade7
Member
 
Posts: 297
Joined: Sun Feb 15, 2015 07:14
IRC: redneonglow redblade7
In-game: redblade7 redblade7_owner

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

by redblade7 » Tue Feb 14, 2017 23:05

TenPlus1 wrote:redblade7 - are you in creative mode ? if so then you will have unlimited items and they remain in your inventory, but... I've just added a change where tamed eggs will be removed even in creative so please update mobs redo api.


Thank you! Tested on all of mobs_animal and a customized mobs_water containing only tropical fish and clownfish. Works on all of these except bees and rats from mobs_animal, those aren't tameable but you might want to look into something.

I wish this was possible for saplings too. I already have saplings removed from creative inventory on my server, and it's running 0.4.15 which has the "plant griefing" fix applied, but once you have one sapling you can just repeatedly drop the same one.
-redblade7, admin of: THE CREATIVE GARDENS (creative), THE VALLEYS (sandbox), and THE DIGITAL FARMS (farming/hunger/shops)
 

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

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

by TenPlus1 » Wed Feb 15, 2017 08:40

redblade7 - remember that 'creative' mode is for players to build without having to collect items at all, so placing any item and having it still remain in their inventory is normal... If this is not the intended use then I'd recommend disabling creative and moving to survival instead where you can still grant 'creative' privs to certain players if needed by using my github.com/tenplus1/creative mod replacement.
 

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

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

by burli » Sun Feb 19, 2017 09:55

Can we make a modpack for the mods? Al least the mobs who don't have a github repo? I is tedious to install them by hand and the creeper has still the model bug
 

User avatar
Wuzzy
Member
 
Posts: 3786
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Mobs Redo review

by Wuzzy » Fri Feb 24, 2017 22:28

The good
- Reasonably powerful API
- Simple-to use API
- Many of the core mobs from Minecraft can be re-implemented and the code looks relatively clean
- Support for tons of sounds
- Support for a ton of animations
- Use of callback functions allow for easy extensibility, even complex mobs like traders are possible without breaking Mobs Redo!
- Easy access to everyday stuff. Very easy to use
- Seems pretty stable so far
- Mob spawners
- Support for knockback
- Animal breeding and following
- Interesting unique ideas such as the mob protection rune or the lasso
- Monsters infighting + customization
- Damage immunity
- With the right mods which add mobs, greatly enhances the gameplay
- Popular, has a long history and support

The bad
- Apparently rather weak shooting AI. Or at least I apparently can't customize it. I can't make mobs which try to stay at a distance so they can attack from afar and be safe from melee attacks
- Weak floating AI. They never change height, making use of floating mobs rather limited
- Documentation has many holes
- Water and lava damage are pretty much hardcoded, there i
- Not many options to customize hostility and/or likelihood to attack (agressiveness)
- No customization options for children or breeding behaviour (apparently there are many hardcoded values)
- Children seem to grow VERY fast
- Can't use it verbatim in my subgame (MineClone 2), I still have to modify it. :-( The reason is that it contains a couple of craftable items. For an API mod, it has still too much clutter which should go in a separate mod.
- Attacking strategies, especially shooting does not leave much room for customization
- Mob spawners don't contain the mobs they spawn (only via infotext) :-( (I know this is possible, see tsm_pyramids for an example)
- Knockback is weird and feels laggy and not fluid / unnatural

The ugly
- Hard and totally avoidable dependency on default
- I don't seem to be able to set 0 damage for hostile mobs. I need this to reimplement the tiny slimes from Minecraft, which attempt to attack the player but never deal damage. But instead, my tiny slimes deal 1 damage. :-(
- A LOT of chat abuse, also often with poor spelling
- Children have the same drops as the adults
- replace_with and replace_what are limited in use. It is not possible to make a mob replace a particular node with another particular node. E.g. sheep replace Dirt with Grass with Dirt and Grass with Air. Current API forces me to pick one.
- I am not sure, but documentation seems to be partially inconsistent or wrong about true/false vs 1/0 values. Can you please check these fields?: pathfinding, floats
- follows: It seems this is also used for feeding and breeding. I don't like this as this conflates different things. IMO this should be split into several fields, one for following, and one for feeding.
- Only probabilities of form 1/x are allowed.
- fall_speed is very weird. A low fall_speed increases the jump height! I expected a terminal velocity here, was disappointed.


Suggestions (everything I need for MineClone 2):
- on_breed: Callback function for custom breeding. Is called when a new child mob is created, parameters are the objects of both parents, and the child itself. This can be useful to further customize the child when it was born.
- https://github.com/tenplus1/mobs_redo/issues/38
- Rework the current replace_with and replace_what logic by allowing the modder to use a 1:1 mapping between replaced node and new node. I suggest to allow a table for replace_what, then both tables will be seen as a “mapping”, where item 1 from replace_with will be replaced by item 1 from replace_what. Like so:

Code: Select all
replace_with = {"default:dirt_with_grass", "default:grass_5", "air"},
replace_what = {"default:dirt_with_grass", "air", "air"},

Meaning, dirt with grass becomes dirt, and high grass and jungle grass become air. If a table is used for replace_what, it must have the equal length of replace_with, of course. The single string value can still be supported, it just means that ANY value from replace_with will be replaced with this (current behaviour)
- on_replace: Callback function which gets called whenever a mob replaces a node. Params: Position, old node, new node. Use case: Sheep regrow their wool after “eating” (read: replacing) grass.
- Allow to set how fast children grow
- Allow to set custom nodes in which mobs take damage. It is basically a more generalized version of lava_damage and water_damage
- Add an optional terminal velocity for falling mobs. Use case: Minecraft-style chicken which slowly decend to the ground at a maximum constant (!) speed because they flap their wings

Questions:
- How do I spawn a child?
- Can I customize children?
- Can I reuse an existing entity as an arrow? Or am I forced to call register_arrow?

Holes in the docs
In general:
Many of the core mechanics are not explained at all (this info is crucial to better predict the behvaiour of the mobs):
- Breeding
- Feeding
- Damage/armor
- Mob types
- Default behaviour/hostility
How to spawn a mob
- Yes, I know it is just minetest.add_entity but it is not neccessarily obvious, because the modder doesn't know how
- It is not clear how animations are used and what the various animation names mean
- Many parameters are just very roughly explained, leaving many questions open. Underlying concepts are often without explanation
register_mob:
- The different mob types as well as their typical behaviour are not explained at all. IMO this is VERY important to understand
- Mob hostility is confusing and scattered through many different parameters, their interaction is not always clear
- It is often not clear which fields are optional and which aren't
- The default values for optional fields sometimes missing
- What on Earth does “armor” do and how does it work? What do the values mean? And why do I find values like 100, 90, etc. in many Mobs Redo mods although the docs say only 1-3 are valid values
differences
- walk_chance, jump_chance: The valid value range is missing
- jump: No default value
- do_custom: It is not clear how often this is called
- self.gotten: This is just an example, but not a proper definition
- self.owner: It is not clear what it means to be the owner
- jump_height is confusing. It has nothing to do with the actual height the mobs jump. No explanation why.
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

User avatar
BrunoMine
Member
 
Posts: 1070
Joined: Thu Apr 25, 2013 17:29
Location: SP-Brasil
GitHub: BrunoMine

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

by BrunoMine » Fri Feb 24, 2017 22:59

Wow. You can analyze it very critically. Congrats on that.
I believe it would be a major breakthrough if we could work in detail on the presented problems.
I advise opening a issue in github.
 

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

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

by TenPlus1 » Sat Feb 25, 2017 09:58

Updated to 1.34

- New flying mode added to ride api which follows player look direction and can fire arrows.

Wuzzy - Thanks for the in-depth review, I have saved it locally so I can go through each point and see what can be done to make things better :) I do agree however that documentation is lacking in many areas although finding time to re-write is the problem just now.

Much of what cannot be done with mobs redo api right now relies on players and modders using the do_custom function to fill in the gaps for special features (which is called every tick) and I do try to add new features here and there but still remain compatible with PilzAdam's simple mobs.

Thankfully many users have contributed ideas and code to this project which helps make it better, and is very welcome.
 

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

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

by burli » Sat Feb 25, 2017 10:36

To be honest all mob API's have some big issues. e.g. if the server is lagging, mobs jump forward and backward. If I punch them nothing happens, but they can attack me. I had this situation more than once. I was dead without the chance to fight.

And I would propose to change spawning of animals and NPCs. Animals should spawn only once if the map is loaded the first time and live forever. If you want food from animals you have to tame and breed them. It is pretty useless to play survival if a sheep spawns every other minute.

I also want to propose to add the function to spawn mobs in groups like a herd of cows

Sadly I lost the code from my steering mobs. I have to start from scratch
 

User avatar
Wuzzy
Member
 
Posts: 3786
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

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

by Wuzzy » Sat Feb 25, 2017 11:31

Much of what cannot be done with mobs redo api right now relies on players and modders using the do_custom function to fill in the gaps for special features (which is called every tick) and I do try to add new features here and there but still remain compatible with PilzAdam's simple mobs.

Great!

Oh, the fact that do_custom is called every tick should also be added into api.txt. ;-)
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

mase
Member
 
Posts: 54
Joined: Tue Feb 21, 2017 20:16
In-game: mase

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

by mase » Sat Feb 25, 2017 12:22

What is the prefered method to set the spawning rate and amount of mobs in minetest.conf?
mobs_animal:cow = 1000,5
or
mobs_animal:sheep_chance 11000
What are the dimensions of those numbers?
 

User avatar
Andrey01
Member
 
Posts: 2346
Joined: Wed Oct 19, 2016 15:18
Location: Russia, Moscow
GitHub: Andrey2470T
In-game: Andrey01

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

by Andrey01 » Sat Feb 25, 2017 13:50

I am wanting to ask to you, "Oerkki" - is that orc from The Lord Of The Rings?
 

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

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

by TenPlus1 » Sat Feb 25, 2017 15:00

mase - setting 'mobs_animal:cow = 1000,5' has a spawn chance of 1000 with 5 cows per map block and setting 'mobs_animal:cow = 5000' only sets the spawn chance.

Andrey01 - PilzAdam added Oerkki way back in Simple Mobs, am not sure but I think it was a japanese spirit.
 

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

User avatar
firefox
Member
 
Posts: 1527
Joined: Wed Jan 14, 2015 07:34
Location: Xanadu
In-game: Red_Fox

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

by firefox » Sat Feb 25, 2017 15:47

burli wrote:Örkki is the finish word for Ork

that was unexpected...
it sounds so much cuter than orc =(^.^)=
building inspiration: viewtopic.php?f=3&t=15550 --- my game: viewtopic.php?f=49&t=15860 --- =(^.^)= nyan~
 

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

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

by burli » Sat Feb 25, 2017 15:52

firefox wrote:
burli wrote:Örkki is the finish word for Ork

that was unexpected...
it sounds so much cuter than orc =(^.^)=


https://translate.google.com/#fi/en/%C3%96rkki

;-)
 

User avatar
Wuzzy
Member
 
Posts: 3786
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

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

by Wuzzy » Thu Mar 02, 2017 13:33

How can I create a mob which walks around water when chasing the player?
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

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

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

by TenPlus1 » Thu Mar 02, 2017 20:29

wuzzy - use the 'pathfinding = 1,' setting in mobs registry to have it pathfind player and climb/avoid obstacles, also setting to 2 allows mob to break down doorways and build to find player. I have avoidance settings to add as yet also.
 

User avatar
Wuzzy
Member
 
Posts: 3786
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

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

by Wuzzy » Fri Mar 03, 2017 00:32

OK, thanks. This solved my problems.
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

User avatar
D00Med
Member
 
Posts: 943
Joined: Sat Feb 07, 2015 22:49
Location: Australia...somewhere
GitHub: D00Med

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

by D00Med » Fri Mar 03, 2017 21:00

Is there a way to make mobs go to a specific place? (like the inside of a building if it is night-time)
 

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

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

by TenPlus1 » Sat Mar 04, 2017 10:38

you could use do_custom to check time and have a pathfind function to move mob towards a pos.
 

User avatar
ExeterDad
Member
 
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
Location: New Hampshire U.S.A
In-game: ExeterDad

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

by ExeterDad » Sat Mar 04, 2017 11:54

TenPlus1 I've had several players question me about the lava flans. In their relentless quest to posses a Lava Pick they've been wanting to collect lava orbs that can only be gotten by the hunting of Lava Flan. They've been frustrated because after finally finding Flans, they've noted that are dying long before they can even get a selection box on them. It's true. I can watch them spawn in the lava as expected and then immediately I can watch their health start to fall. And then they died. Most cases, less than a second.
I'm pretty sure I haven't modified anything, nor have anything in my minetest.conf added to cause this. Has lava changed somehow in very recent Minetest-dev to cause this? I can't figure this out.
 

User avatar
Insurrection
New member
 
Posts: 6
Joined: Sun Mar 05, 2017 02:13
In-game: Insurrection

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

by Insurrection » Sun Mar 05, 2017 02:59

Question about mob behaviors- I'm trying to make a new "skittish" tag for mobs (so to speak) that makes them run away from the player once they spot the player. I've tried copying and modifying some of the existing code in API.lua, but no luck. I'm a bit code-dumb, so any help would be appreciated. I'd imagine this would be a useful feature altogether for other modders, too.

I started by adding

Code: Select all
skittish = def.skittish,
   skittish_timer = 0,


to the mobs:register_mob function.

Next, I added

Code: Select all
   -- skittish when player spotted
   elseif self.state == "skittish" then

      self.skittish_timer = self.skittish_timer + 1

      -- stop after 5 seconds or when at cliff
      if self.skittish_timer > 5
      or is_at_cliff(self) then
         self.skittish_timer = 0
         set_velocity(self, 0)
         self.state = "stand"
         set_animation(self, "stand")
      else
         set_velocity(self, self.run_velocity)
         set_animation(self, "walk")
      end


by copying similar code for "runaway when punched" in the do_states function.

Then I added mob_scared

Code: Select all
--mob, find closest player to run away from
local mob_scared = function(self)

   local s = self.object:getpos()
   local min_dist = self.view_range + 1
   local obj, min_player = nil, nil
   local objs = minetest.get_objects_inside_radius(s, self.view_range)

   for n = 1, #objs do

      obj = objs[n]:get_luaentity()

      if obj and obj.type == "player" then

         p = obj.object:getpos()

         dist = get_distance(p, s)

         if dist < min_dist then
            min_dist = dist
            min_player = obj.object
         end
      end
   end

   if min_player then
      do_scaredrun(self, min_player)
   end
end


Added

Code: Select all
mob_scared(self)


to the mob_step block

Copied "do_attack" function:

Code: Select all
do_scaredrun = function(self, player)

   if self.state == "skittish" then
      return
   end

   self.state = "skittish"

   if random(0, 100) < 90 then
      mob_sound(self, self.sounds.war_cry)
   end
end


Lastly, I added "skittish = true," to the bunny.lua.

It doesn't crash, but it just... doesn't work. What am I doing wrong? Or is there already a way/a better way to achieve the same effect?
 

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

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

by TenPlus1 » Sun Mar 05, 2017 09:42

ExeterDad - I've fixed that problem now, lava flan should swim around happily inside lava for now.
 

User avatar
ExeterDad
Member
 
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
Location: New Hampshire U.S.A
In-game: ExeterDad

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

by ExeterDad » Sun Mar 05, 2017 15:32

TenPlus1 wrote:ExeterDad - I've fixed that problem now, lava flan should swim around happily inside lava for now.

Woot!! Thanks Man! Didn't expect you to go through the trouble of fixing. I was just hoping for a clue of what to do.
Now we can see just how fast they can tear the place up with the Lava Pick. :)
 

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

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

by TenPlus1 » Mon Mar 06, 2017 14:23

Update:

- Added new animation function to handle built-in AND custom animations for mob e.g.

walk_start = 16, walk_end = 24, walk_speed = 15,
punch_start = 16, punch_end = 24, punch_speed = 20,
twerk_start = 25, twerk_end = 40, twerk_speed = 3000,

- New replace function added which can use tables e.g.

replace_what = {"default:grass_3", "default:grass_4", "default:grass_5"},
replace_with = "air",
replace_rate = 10,
replace_offset = 0,

... now becomes:

replace_what = {{"group:grass", "air", 0}, {"default:dirt_with_grass", "default:dirt", -1}},
replace_rate = 10,

... and adds additional node checks with their own y_offset :)
 

PreviousNext

Return to Mod Releases



Who is online

Users browsing this forum: Google [Bot] and 7 guests