Re: [Mod] MOB Framework [2.1.2] [mobf] self defence?
have a look at http://minetest.net/forum/viewtopic.php?pid=43237
You are not logged in. Please login or register.
Minetest Forums → Mod Releases → [Mod] MOB Framework [2.1.2] [mobf] self defence?
have a look at http://minetest.net/forum/viewtopic.php?pid=43237
Changes 1.4.4:
-added breeding of cow and chicken
Dude that's just sick.
LOL ...
ok ok it's breeding cow+steer and chicken + rooster
but there's a bug, steers wont get spawned, I'll fix this for next version.
Good idea, there's only one problem the bigger animals are the more anoying is missing animation support for 3d animals.but as 2d only they might look good.
It seems to work well now - no more crashes and the animals behave (mostly - I still saw quite a lot of sheep committing suicide by jumping off cliffs). The amount of animals is good as well - many chicken and sheep, few cows and deers. Fishes work well. Gulls in the sky are a very nice sight. Finally I may keep the mod running and enjoy the animals :-) I didn't see a wolf, but maybe they where hiding.
Animals won't get spawned. Only vombies. Where should I search issue?
debug.txt 1.6MB
@Ragnarok
Most animals will only get spawned on mapgen. Animal abm spawning most likely was cause of lag complains with this modpack.
Vombies fish and gulls still spawn with old mechanisms e.g. at night because their spawning mechanism hasn't been changed. I guess there will still remain some lag at night.
If you need more animals try breeding them. And if this still ain't enough probably I'll add a secondary spawning mechanism (to be enabled/disabled per config file setting)
Setting really low chances to reduce lag. This way you could get at least some animals in already generated areas.
Thanks for the tip :) I breeding them now (after changing spawn mechanism to at_night for a while - lots of cows and other animals). I think another spawning mechanism can be very useful. Is there a way to spawn MOBs manually?
Thanks for the tip :) I breeding them now (after changing spawn mechanism to at_night for a while - lots of cows and other animals). I think another spawning mechanism can be very useful. Is there a way to spawn MOBs manually?
/spawnentity [entityname]/spawnmob [mobname] [coordinates]
works too ... seems I've reinvented a command already existing in minetest
is it possible to register a callback on mob death? i'd like to do something whenever each player kills an animal/monster.
this callback is already available generic -> "on_kill_callback" return true to skip normal handling false to do it additionally
for further information look at documentation mob_template
this callback is already available generic -> "on_kill_callback" return true to skip normal handling false to do it additionally
cool, but i'd like to use a global callback register function that lets any mod register a callback for a killing event. It's the same idea as registering a callback for each node that gets dug:
minetest.register_on_dignode(function(pos, node, player)
local name = player:get_player_name()
gainxp(name, "digging", 1)
end)you can look at the string value of node.name, and do cool stuff with that. it would be good to be able to access the specific mob's max hp and damage per attack with attack rate, or damage per second. this is so that another mod knows how strong this monster is. thanks, and great mod!
Do I understand correctly that you want to register a function mobf calls for any mob on kill of a mob?
Do I understand correctly that you want to register a function mobf calls for any mob on kill of a mob?
yes. Ideally, there could be any number of registered functions by different mods. (or even multiple ones by the same mod.) I think this could be done by adding a reference to the to-be-called function in a table that is in your mob mod. Then when a mob dies, all of those functions get called, with the appropriate parameters.
Technically it's no problem all data defining a mob are stored in a single structure. It's just if a mod changes those data it might cause very bad behaviour.
I need to think about what side effects this will cause a little bit more.
What exactly is your purpose for doing this?
There are some other situations adding a mod <-> mod interface may interesting too but some of those may be redundant calls that can be done by other means too.
Technically it's no problem all data defining a mob are stored in a single structure. It's just if a mod changes those data it might cause very bad behaviour.
I need to think about what side effects this will cause a little bit more.What exactly is your purpose for doing this?
There are some other situations adding a mod <-> mod interface may interesting too but some of those may be redundant calls that can be done by other means too.
the purpose is for expanding upon the xp mod that me and my friends are making. if a callback becomes available, then we could give the player experience points when they kill a monster or an animal. Here's the current progress:
https://gitorious.org/minetest-xpmod/xp
I see what you say about the danger of changing variables used by another mod, but that is par for the course, i believe. i think we both know that if any mod is poorly written, it can cause the game to crash, or cause other problems. so, maybe you could make a note in the documentation, and know that mods that cause problems will have to be skipped by those choosing mods for their server, as always.
I'm not sure what you have in mind for possible mod <-> mod interfaces, but either way, I'd like to know whatever route you choose in the end.
thanks.
Hello,
next mobf version will contain following api enhancements:
API:
mobf_register_on_death_callback(callback) register a callback on death of ANY mob
mobf_get_mob_definition(mobname) get COPY of mob definition
Function declaration called on death
callback(mobname,pos,hitter)
Hello,
next mobf version will contain following api enhancements:
API:
mobf_register_on_death_callback(callback) register a callback on death of ANY mob
mobf_get_mob_definition(mobname) get COPY of mob definitionFunction declaration called on death
callback(mobname,pos,hitter)
thanks, sapier! : )
NICE!
I can't kill the mobs! otherwise the mod is great. It was little boring to play with no mobs at all
I can't kill the mobs! otherwise the mod is great. It was little boring to play with no mobs at all
my friend and i have tested this out a bit. he found that you can only kill mobs and other players if you're moving around. otherwise, each attack does zero damage. we both think this is silly, but i think that this is celeron's choice (or bug).
also, you might need a better weapon than the one you're using, like a sword.
paduggio wrote:I can't kill the mobs! otherwise the mod is great. It was little boring to play with no mobs at all
my friend and i have tested this out a bit. he found that you can only kill mobs and other players if you're moving around. otherwise, each attack does zero damage. we both think this is silly, but i think that this is celeron's choice (or bug).
also, you might need a better weapon than the one you're using, like a sword.
I think you both didnt understand the damage system of MT. In my wiki of my mobs mod is a little description of it: https://github.com/PilzAdam/mobs/wiki.
Minetest Forums → Mod Releases → [Mod] MOB Framework [2.1.2] [mobf] self defence?
Powered by PunBB, supported by Informer Technologies, Inc.
Currently installed 3 official extensions. Copyright © 2003–2009 PunBB.
Generated in 0.064 seconds (85% PHP - 15% DB) with 11 queries