Mobs you can tame & advanced mob triggers and behavior
I plan to make my own mods at some point. I haven't started doing so yet, but there's one thing I haven't seen in existing mods that I wanted to know if it's possible.
There are mods that add mobs which follow and attack the player (like zombies) as well as mods that add animals (they roam around and don't attack, even give you items when you kill them). But is it possible to make mobs that can be tamed by the player and will only attack those who threaten him? Also can mobs be scripted to turn against players, other mobs or even objects when triggered by an action?
One example is the wolves in MineCraft. Wild ones just roam around, don't attack anything except certain animals to feed themselves (like sheep). If you hit them, they turn against you and attack the player. If you feed them with a bone item instead, there is a chance they will be tamed and follow you around. Right clicking them also tells them to follow you or stay in place once tamed. Also, when a tamed wolf is near, the player attacking any mob (and possibly any other player in PvP) will cause the wolf to join in and attack it too. Wolves can also be healed by right clicking them with raw or cooked meat, restoring their health.
How much of this can be done with the current LUA API and its hooks and possibilities? If it is doable, are there any example mods already that are available to test and look at?
There are mods that add mobs which follow and attack the player (like zombies) as well as mods that add animals (they roam around and don't attack, even give you items when you kill them). But is it possible to make mobs that can be tamed by the player and will only attack those who threaten him? Also can mobs be scripted to turn against players, other mobs or even objects when triggered by an action?
One example is the wolves in MineCraft. Wild ones just roam around, don't attack anything except certain animals to feed themselves (like sheep). If you hit them, they turn against you and attack the player. If you feed them with a bone item instead, there is a chance they will be tamed and follow you around. Right clicking them also tells them to follow you or stay in place once tamed. Also, when a tamed wolf is near, the player attacking any mob (and possibly any other player in PvP) will cause the wolf to join in and attack it too. Wolves can also be healed by right clicking them with raw or cooked meat, restoring their health.
How much of this can be done with the current LUA API and its hooks and possibilities? If it is doable, are there any example mods already that are available to test and look at?