Passive Aggressive Mobs
#1
Hi Guys,

I've been messing around with the code and noticed that PassiveAggressiveMonster inherits directly from AggressiveMonster and hence there's no tidy way to override Tick and PlayerSeen such that passive aggressive mobs don't attack unless provoked.

I was going to propose that PassiveAggressiveMonster inherit from the general Monster class but wanted to know if there's a good reason that this isn't already the case?

I'll have a go at implementing passive/aggressive behaviour later depending on what you tell me.
Reply
Thanks given by:
#2
It was coded that way only because it's then quite easy to implement the aggressiveness. No need to keep it that way at all.

As for the AI and monster behavior, we had a brainstorming with Keyboard once, we came up with an elegant solution to implementing the AI, but it never got completed; I have no idea whether Keyboard is working on it at all, might be worth it contacting him before you do something in this regard.
Here's the brainstorming thread: https://forum.cuberite.org/showthread.php?tid=820

Personally, I think the inheritance through PassiveMonster, AggressiveMonster etc is wrong, we should instead inherit through classes that provide some kind of extra values, such as TameableMob, and have the aggressiveness handled by the AI subsystem entirely.
Reply
Thanks given by:
#3
Cool, thanks for that I'll have a look and talk to Keyboard - don't want to reinvent any wheels Smile
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)