And do_custom overrides the default behaviour or inherited it?TenPlus1 wrote:npc uses the player model so sit and lay down animations are there to use, also the do_custom function can be added to any mob which let's you do anything Inc. flying, you just gotta code it.
[Mod] Mobs Redo [1.61] [mobs]
Re: [Mod] Mobs Redo [1.47] [mobs]
Re: [Mod] Mobs Redo [1.48] [mobs]
Updated to version 1.48:
- Added mobs:set_velocity(self, velocity) as global function
- Texture replacements for pork, mutton and rabbit in mobs_animal
runs: do_custom can both replace or suppliment mob api. check the api.txt for features.
- Added mobs:set_velocity(self, velocity) as global function
- Texture replacements for pork, mutton and rabbit in mobs_animal
runs: do_custom can both replace or suppliment mob api. check the api.txt for features.
Re: [Mod] Mobs Redo [1.48] [mobs]
Thanx.TenPlus1 wrote:Updated to version 1.48:
- Added mobs:set_velocity(self, velocity) as global function
- Texture replacements for pork, mutton and rabbit in mobs_animal
runs: do_custom can both replace or suppliment mob api. check the api.txt for features.
Re: Mobs Redo 0.3 [mod]
How to Breed Animals like kittens and bunnyTenPlus1 wrote:Lol, sadly no as I was aiming for a basic mob pack with default food items for the player... If enough people want it I can easily add it...
Here are the hunger values to be included in the Better HUD mod's hunger.lua file:
Code: Select all
if minetest.get_modpath("mobs") then if mobs.mod and mobs.mod == "redo" then overwrite("mobs:cheese", 4) overwrite("mobs:meat", 8) overwrite("mobs:meat_raw", 4) overwrite("mobs:rat_cooked", 4) overwrite("mobs:honey", 2) overwrite("mobs:pork_raw", 3, "", 3) overwrite("mobs:pork_cooked", 8) overwrite("mobs:chicken_cooked", 6) overwrite("mobs:chicken_raw", 2, "", 3) overwrite("mobs:chicken_egg_fried", 2) overwrite("mobs:bucket_milk", 3, "bucket:bucket_empty") else overwrite("mobs:meat", 4) overwrite("mobs:meat_raw", 1) overwrite("mobs:rat_cooked", 3) end end
Re: [Mod] Mobs Redo [1.48] [mobs]
Kittens breed by feeding them ethereal raw fish or rats, and bunny's by feeding them carrots or grass.
Re: [Mod] Mobs Redo [1.48] [mobs]
Whoops, a server crash:
latest git in a recent 5.x dev version (but not the newest)
The following patch seems to fix it. But I have no Idea what I'm doing here, just suppressing the error.
I also opened an issue on notabug. If you need more info, let me know.
latest git in a recent 5.x dev version (but not the newest)
Code: Select all
2018-12-09 08:34:04: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'mobs_animal' in callback luaentity_Step(): /home/mt/.minetest/mods/mobs_redo/api.lua:131: attempt to index a nil value
2018-12-09 08:34:04: ERROR[Main]: stack traceback:
2018-12-09 08:34:04: ERROR[Main]: /home/mt/.minetest/mods/mobs_redo/api.lua:131: in function 'collision'
2018-12-09 08:34:04: ERROR[Main]: /home/mt/.minetest/mods/mobs_redo/api.lua:152: in function 'set_velocity'
2018-12-09 08:34:04: ERROR[Main]: /home/mt/.minetest/mods/mobs_redo/api.lua:1822: in function 'do_states'
2018-12-09 08:34:04: ERROR[Main]: /home/mt/.minetest/mods/mobs_redo/api.lua:3036: in function </home/mt/.minetest/mods/mobs_redo/api.lua:2902>
The following patch seems to fix it. But I have no Idea what I'm doing here, just suppressing the error.
Code: Select all
--- a/api.lua
+++ b/api.lua
@@ -128,7 +128,7 @@ local collision = function(self)
for _,object in ipairs(minetest.get_objects_inside_radius(pos, width)) do
if object:is_player()
- or (object:get_luaentity()._cmi_is_mob == true and object ~= self.object) then
+ or (object:get_luaentity() and (object:get_luaentity()._cmi_is_mob == true and object ~= self.object)) then
local pos2 = object:get_pos()
local vec = {x = pos.x - pos2.x, z = pos.z - pos2.z}
Re: [Mod] Mobs Redo [1.48] [mobs]
Fixed :) thanks wziard...
Re: [Mod] Mobs Redo [1.48] [mobs]
Feature request: set_attribute(attribute, value) and get_attribute(attribute) like players.
Re: [Mod] Mobs Redo [1.48] [mobs]
get_attribute and set_attribute are now deprecated. Now, there's get_meta() with its methods, like get and set.
Objects are the only things that don't use get_meta() now, I believe. Anyway, Lua Entities can store arbitrary key/values already.
But, if there's a good reason for ObjectRef:get_meta() luaentity:get_meta(), I think the minetest GitHub repo is the place to post the feature request.
Edit: Sorry, I messed that up. ObjectRefs can have get_meta, but maybe LuaEntities cannot.
Update: However I think Lua Entities are just tables, and not like ObjectRefs. Now I'm wondering if you can ObjectRef:get_luaentity().object:get_meta() <-- haha, that's redundant perhaps. Maybe just ObjectRef:get_meta(). Now I thought I knew the answer here, but I'm left more curious than before! Thanks and bye. :)
Objects are the only things that don't use get_meta() now, I believe. Anyway, Lua Entities can store arbitrary key/values already.
But, if there's a good reason for ObjectRef:get_meta() luaentity:get_meta(), I think the minetest GitHub repo is the place to post the feature request.
Edit: Sorry, I messed that up. ObjectRefs can have get_meta, but maybe LuaEntities cannot.
Update: However I think Lua Entities are just tables, and not like ObjectRefs. Now I'm wondering if you can ObjectRef:get_luaentity().object:get_meta() <-- haha, that's redundant perhaps. Maybe just ObjectRef:get_meta(). Now I thought I knew the answer here, but I'm left more curious than before! Thanks and bye. :)
Re: [Mod] Mobs Redo [1.48] [mobs]
Yes, meta is better. Only a 'player' has metadata. Base LuaEntities not, but it could be implemented, so my request is this.jas wrote:get_attribute and set_attribute are now deprecated. Now, there's get_meta() with its methods, like get and set.
Objects are the only things that don't use get_meta() now, I believe. Anyway, Lua Entities can store arbitrary key/values already.
But, if there's a good reason for ObjectRef:get_meta() luaentity:get_meta(), I think the minetest GitHub repo is the place to post the feature request.
Edit: Sorry, I messed that up. ObjectRefs can have get_meta, but maybe LuaEntities cannot.
Update: However I think Lua Entities are just tables, and not like ObjectRefs. Now I'm wondering if you can ObjectRef:get_luaentity().object:get_meta() <-- haha, that's redundant perhaps. Maybe just ObjectRef:get_meta(). Now I thought I knew the answer here, but I'm left more curious than before! Thanks and bye. :)
Re: [Mod] Mobs Redo [1.48] [mobs]
I thought lua entities contain a reference to an object, but themselves are just tables. Thus, self.this = that. Maybe I'm misunderstanding. Anyway mobs_redo is great.
- Lone_Wolf
- Member
- Posts: 2576
- Joined: Sun Apr 09, 2017 05:50
- GitHub: LoneWolfHT
- IRC: LandarVargan
- In-game: LandarVargan
Re: [Mod] Mobs Redo [1.48] [mobs]
Yes. You can store variables in lua entities with things like self.this = thatjas wrote:I thought lua entities contain a reference to an object, but themselves are just tables. Thus, self.this = that. Maybe I'm misunderstanding. Anyway mobs_redo is great.
-
- Member
- Posts: 845
- Joined: Fri Jan 08, 2016 21:17
- In-game: Ghost
Re: [Mod] Mobs Redo [1.48] [mobs]
okay I just updated to mobs animal and mobs api
and just how many wheat sheaths tame cows and sheep because I just fed one cow over 200 wheat
and 99 wheat to one sheep at this point they're going explode before they are tamed
and just how many wheat sheaths tame cows and sheep because I just fed one cow over 200 wheat
and 99 wheat to one sheep at this point they're going explode before they are tamed
- davidthecreator
- Member
- Posts: 452
- Joined: Mon Aug 18, 2014 19:48
- GitHub: daviddoesminetest
- In-game: DavidDoesMinetest
- Location: Lithuania
Re: [Mod] Mobs Redo [1.48] [mobs]
This should actually be a feature, if it isn't already.Chibi ghost wrote: they're going explode before they are tamed
Re: [Mod] Mobs Redo [1.48] [mobs]
Chibi, are you sure it wasnt already tamed ? you can still feed them if they are :) Try right-clicking with an empty hand and it'll tell you who owns it.
-
- Member
- Posts: 845
- Joined: Fri Jan 08, 2016 21:17
- In-game: Ghost
Re: [Mod] Mobs Redo [1.48] [mobs]
even if I missed the notification I wouldn't have missed the hearts also when I tried to lasso them I got cow/sheep not tamed noteTenPlus1 wrote:Chibi, are you sure it wasn't already tamed? you can still feed them if they are :) Try right-clicking with an empty hand and it'll tell you who owns it.
Re: [Mod] Mobs Redo [1.48] [mobs]
davidthecreator wrote:This should actually be a feature, if it isn't already.Chibi ghost wrote: they're going explode before they are tamed
Code: Select all
on_rightclick = function(self, clicker)
local explosive_clicks = self.explosive_clicks or 1
if explosive_clicks == 50 then
self.explosive_clicks = 0
return tnt.boom(self.object:get_pos())
end
self.explosive_clicks = explosive_clicks + 1
... the rest of on_rightclick stuff (dye, feed/tame, etc) ...
end
Re: [Mod] Mobs Redo [1.48] [mobs]
I noticed this in Xanadu also; I presume it's the same issue.Chibi ghost wrote:okay I just updated to mobs animal and mobs api
and just how many wheat sheaths tame cows and sheep because I just fed one cow over 200 wheat
and 99 wheat to one sheep at this point they're going explode before they are tamed
-
- Member
- Posts: 845
- Joined: Fri Jan 08, 2016 21:17
- In-game: Ghost
Re: [Mod] Mobs Redo [1.48] [mobs]
it seems to be linked into the eat 8 grass to regenerate milk /wool add-on tenplus did
Re: [Mod] Mobs Redo [1.48] [mobs]
Mobs Animals has been updated with a fix for taming of cows and sheep, oops!
-
- Member
- Posts: 845
- Joined: Fri Jan 08, 2016 21:17
- In-game: Ghost
Re: [Mod] Mobs Redo [1.48] [mobs]
ta very much
-
- Member
- Posts: 845
- Joined: Fri Jan 08, 2016 21:17
- In-game: Ghost
Re: [Mod] Mobs Redo [1.48] [mobs]
got kicked twice when I tried to feed a lamb might be a problem
Code: Select all
2018-12-15 19:39:29: ACTION[Server]: Ghost joins game. List of players: Ghost
2018-12-15 19:39:38: ACTION[Server]: Ghost right-clicks object 1149: LuaEntitySAO at (135.683,12,543.113)
2018-12-15 19:39:38: ACTION[Server]: Ghost right-clicks object 1149: LuaEntitySAO at (135.683,12,543.113)
2018-12-15 19:39:38: ACTION[Server]: Ghost right-clicks object 1149: LuaEntitySAO at (135.683,12,543.113)
2018-12-15 19:39:39: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback luaentity_Rightclick(): ...inetest-0.4.17.1-win32\bin\..\mods\mobs_animal/sheep.lua:98: attempt to compare number with nil
2018-12-15 19:39:39: ERROR[Main]: stack traceback:
2018-12-15 19:39:39: ERROR[Main]: ...inetest-0.4.17.1-win32\bin\..\mods\mobs_animal/sheep.lua:98: in function <...inetest-0.4.17.1-win32\bin\..\mods\mobs_animal/sheep.lua:92>
2018-12-15 19:39:39: ACTION[Server]: Ghost leaves game. List of players:
- Lupercus
- Member
- Posts: 30
- Joined: Tue Jan 03, 2017 02:08
- GitHub: lupercus13
- IRC: Lupercus-Server
- In-game: Lupercus
Re: [Mod] Mobs Redo [1.48] [mobs]
latest version of minetest 5.0dev breaks mobs_redo
Re: [Mod] Mobs Redo [1.48] [mobs]
How can I check if capture_mob was successful? This function does not return true/false (I watched the code).
Suggestion: It returns the new entity or nil.
Suggestion 2: Add support for the upcoming 'fireflies:bug_net'
Suggestion: It returns the new entity or nil.
Suggestion 2: Add support for the upcoming 'fireflies:bug_net'
Re: [Mod] Mobs Redo [1.48] [mobs]
mobs:capture_mob() does indeed return true or false when attempting to capture a mob...
Chibi + Lupercus: mobs animals updated with fix for 5.0x error.
Chibi + Lupercus: mobs animals updated with fix for 5.0x error.
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 24 guests