[Mod] Mobs Redo [1.61] [mobs]

Astrobe
Member
Posts: 571
Joined: Sun Apr 01, 2018 10:46

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

by Astrobe » Post

Lone_Wolf wrote:Why not set it up so that when a mob loses sight of a player it walks to the last position it saw the player?
Because the "keep walking/running" feature achieves mostly the same effect with much simpler means: the mob doesn't have to memorize the last position, it doesn't have to check if it has reached it and it won't do silly things when it cannot reach it. Actually if one improves the "walking" state in some way (like the cheat-ish "turn towards the nearest player, visible or not", or the jump probe improvement), the attack behavior may benefit from it.

User avatar
acidzebra
Member
Posts: 75
Joined: Sun Sep 10, 2017 09:11

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

by acidzebra » Post

1. Is there any way to prevent mobs from dropping their goodies on death when killed by another mob (as opposed to being killed by a player)? I've gone through the API a few times but can't find any way to identify the attacker and act accordingly. I have my mobs hunting each other (wolves attack sheep, turtles attack jellyfish etc) but I don't want them to drop anything when killed by another mob (alternatively, is there a way to have mobs pick up something another mob drops?)

2. I'm not sure if feeding and breeding only applies to tame mobs but it would be interesting if mobs in the wild had some kind of internal "hunger" variable - this would modify their chance to attack other mobs (wolf kills sheep > wolf is sated/docile for a while) and maybe affect their chance to breed (well fed animals breed). The attack_chance variable does a little to prevent the "this mob is a continuous murder machine" effect but overall not that much.

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

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

by TenPlus1 » Post

mobs drop common items like meat when killed but will only drop rare items like leather or gems if killed by player.

Chibi ghost
Member
Posts: 845
Joined: Fri Jan 08, 2016 21:17
In-game: Ghost

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

by Chibi ghost » Post

ah that explains the leather hide I got when I killed a dungeon master

User avatar
acidzebra
Member
Posts: 75
Joined: Sun Sep 10, 2017 09:11

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

by acidzebra » Post

TenPlus1 wrote:mobs drop common items like meat when killed but will only drop rare items like leather or gems if killed by player.
that gave me the info I needed to change it for my game thank you! (no free drops for anyone, don't care about rarity)
Is self.cause_of_death.puncher:is_player() something I can use in setting up checks when creating a specific mob?
I guess I was really asking if something like this was exposed in the API.

For the record, I changed

Code: Select all

if random(1, self.drops[n].chance) == 1 then
to

Code: Select all

if random(1, self.drops[n].chance) == 1 and death_by_player then
and that did what I wanted ^^

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

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

by runs » Post

Astrobe wrote:Sorry for the delay, I was tuning and testing various things.
Well, I'm using your API and the animals show a better behaviour, not till perfect, but now they're not crazy jumping, are able to avoid obstacles in a better way. I feel them all more natural.

I don't want to belittle Tenplus1, of course, don't misunderstand me, cos thanks to him we have the best minetest mobs engine. :-)

Code: Select all

THE ATTACHED FILE IS FOR REFERENCE ONLY. Do not use as-is.
I didn't listen, hahaha :-D

User avatar
Milan*
Member
Posts: 255
Joined: Thu May 28, 2015 06:45
GitHub: tchncs
IRC: Passant
In-game: Milan Passant
Location: Germany
Contact:

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

by Milan* » Post

Hi there, i've got a problem with this mod and didn't find anything helpful with the searchfunction - maybe i am bad at searching though:

As soon as a mod as mesecons/pipeworks keep an area loaded, it gets flooded by mobs.
You quickly find yourself cleaning hundreds (100-400) mobs in an area of like ... maybe four or five chunks.

If i understand the entries of active_object_count of my subgame correctly, there shouldn't be more than five mobs within one chunk (and it works in normally activated areas just fine).

Code: Select all

mods/geomoria/init.lua:        active_object_count = 5,
mods/mobs_animal/chicken.lua:   active_object_count = 2,
mods/mobs_animal/rat.lua:       active_object_count = 2,
mods/mobs_monster/dirt_monster.lua:     active_object_count = 2,
mods/mobs_monster/dungeon_master.lua:   active_object_count = 1,
mods/mobs_monster/lava_flan.lua:        active_object_count = 2,
mods/mobs_monster/mese_monster.lua:     active_object_count = 1,
mods/mobs_monster/sand_monster.lua:     active_object_count = 2,
mods/mobs_monster/spider.lua:   active_object_count = 1,
mods/mobs_redo/api.lua: local active_object_count = def.active_object_count or 1
(this 'grep' snipped shows me actually that most of the mobs in the game don't have this setting set at all but it should default to 1 then, as the api returns, right?

Any help would be amazing.^.^

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

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

by TenPlus1 » Post

Milan: Before a mob spawns it checks to see how many of the same mob are in the loaded area and if it's over the active_object_count limit it will not spawn, so I don't know why all these mobs are showing up cause it checks quite a large area to be sure ?!?! Will look into it more...

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

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

by runs » Post

TenPlus1 can you send me your npc blender model for the trader. I would desire to make bit modifications to it.

I need a 3d blender model. How can I get it?

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

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

by TenPlus1 » Post

traders use the default player models

User avatar
Lone_Wolf
Member
Posts: 2576
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

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

by Lone_Wolf » Post

TenPlus1 wrote:traders use the default player models
/Minetest/games/minetest_game/mods/default/models
IIRC
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

Astrobe
Member
Posts: 571
Joined: Sun Apr 01, 2018 10:46

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

by Astrobe » Post

I suspect there's something wrong in the engine: mob display is controlled by the engine parameter active_object_send_range_blocks) and is apparently related to do the fact that a client (i.e. a player) is there. ABMs usually work this way too, except perhaps for force-loaded areas.

If I'm correct that the game does not report the mobs that cannot be seen by any player, then that would explain your problem. I have strong suspicions that this is the case because I've seen similar things happen without force-load, when the spawning ABM is between the player and the mobs (the ABM is within active_object_range, but the mobs are outside of active_object_send_range_blocks).

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

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

by TenPlus1 » Post

That sounds plausable Astrobe, might have to rethink how mobs are spawned in that case, with a global counter maybe.

As a temporary measure you could protect the areas around machines and set the 'mobs_spawn_protected' setting to false so that mobs will never spawn inside protected areas.

User avatar
Lord_Vlad
Member
Posts: 112
Joined: Thu Jul 20, 2017 07:58

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

by Lord_Vlad » Post

My favorite games are zombie games, so I changed a zombies mod to suit my needs except a few.

There are no hordes... I'd like zombies to meet up and have tea parties... I mean wander as a horde, and attack all at once. It would be perfect if they could destroy fences and doors too, like, hordes that can go through defenses... OK MAYBE not... I mean that is probably asking too much.

If these can't happen, I would like to test having omniscient/nearly omniscient zombies that always know where to find me, and do hoard around my position, guided by the smell or something. How do I get this ?
Will they find their way out of caves and tricky paths in the process or will they get stuck like idiots ?

Also, I have a problem with my weapons not really wearing out against zombies. Even a wooden sword can last for quite long, so I had to up their HP quite a lot and they take forever to kill. It looks like a noob question so sorry for that.
What determines how resistant they are to damage ?
What determines how much a weapon breaks when hitting them ?

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

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

by runs » Post

Please some code to spawn a mob close to a particular node? I need in my mod a mob appearing in a certain site not randomly.

And also how can I check if a if a mob (entity) is spawned and get its ObjectRef.

Chibi ghost
Member
Posts: 845
Joined: Fri Jan 08, 2016 21:17
In-game: Ghost

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

by Chibi ghost » Post

you can get a mob spawner from creative

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

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

by TenPlus1 » Post

Update:

- Added new 'self.disable_falling' switch for custom routines
- Spiders can now climb vertical facings :)
- Cows can reproduce milk themselves by eating 8x grass
- Sheep can regrow wool themselves by eating 8x grass

u34

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

by u34 » Post

TenPlus1 wrote:Update:

- Added new 'self.disable_falling' switch for custom routines
- Spiders can now climb vertical facings :)
- Cows can reproduce milk themselves by eating 8x grass
- Sheep can regrow wool themselves by eating 8x grass
nice features, keep on the good work of this mobs..

Chibi ghost
Member
Posts: 845
Joined: Fri Jan 08, 2016 21:17
In-game: Ghost

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

by Chibi ghost » Post

TenPlus1 wrote:Update:

- Added new 'self.disable_falling' switch for custom routines
- Spiders can now climb vertical facings :)
- Cows can reproduce milk themselves by eating 8x grass
- Sheep can regrow wool themselves by eating 8x grass
spiders climb you say err eap err the giant eight legged nopes can climb walls

wziard
Member
Posts: 127
Joined: Mon Oct 29, 2018 19:12

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

by wziard » Post

Hi, I installed DOOMed's mobs (dmobs) and somehow there's now a true infestation of dragons. They spawn way too much. Like I see one every 30 meters or something like that. However, when I look in the code I see the spawnrate is set to 64000, so the should be very rare.

Any clues on how to debug?

Could it have something to do with my server being the 5.x dev version? Or maybe an overflow somewhere (64000 maybe gets wrapped around because maybe the rate is signed 16bit?)

I really like this collection of mobs but my children complain about the amount of dragons :-)

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

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

by TenPlus1 » Post

Do you have technic/mesecons active in an area with a world anchor ? this has been found to cause over spawning.

wziard
Member
Posts: 127
Joined: Mon Oct 29, 2018 19:12

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

by wziard » Post

The mesecons mod is loaded. But nothing from it has been build yet. No world anchors.

But strangely enough it seems to have been a temporary phenomenon. Now that it has been running for a few hours I rarely see any dragons. Maybe mobs_redo keeps track of how many of each animal have been spawned in the last X hours? And then when you add a new set of animals all the counters are still zero and mobs_redo 'catches up'?

I didn't look at any code here, just wild theories :-)

User avatar
Lord_Vlad
Member
Posts: 112
Joined: Thu Jul 20, 2017 07:58

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

by Lord_Vlad » Post

XXX
Last edited by Lord_Vlad on Tue Dec 04, 2018 23:50, edited 1 time in total.

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

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

by runs » Post

A request:
- Support for 'sit' and 'rest' animations for NPC, like in default player.

How can I override the default behaviour. I want my flying NPC alight?

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

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

by TenPlus1 » Post

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests