So my first step into DLL modding has been getting a new carnivore animal to spawn, hunt, and eat other animals.(and yes, even humans)
So far it is a success, though it still needs plenty of tweeking.
At this moment I don't feel the mod is ready for release.
But I will post this to prep for a future release, and to let you guys drop opinions on the info so far:
EDIT: Also as a place to leave a to-do list. :P
So far the mod adds:
-new animal:
Wulf
Health - 70
Walk speed - 1.15
Melee damage - 15
-JobGiver Class:
JobGiver_HuntAnimals
When Urgently Hungry will seek out a corpse and butcher it on the spot.
Corpse can not be another Wulf, unless Starving.
Corpse must be 'Flesh'.(no mechinoids)
Corpse must be within X squares.
If no corpses are within X squares the Wulf will hunt the closest living animal.
Prey must be within Y squares.
Prey must be 'Flesh'.(no mechinoids)
Prey can not be another Wulf, even if Starving.
Prey may be Humanoid.
Attack and Butcher positions are reserved so the Wulves will not stack on the same square.
-JobGiver Class:
JobGiver_RangedDefense
When Health is >= 65% will seek out and attack targets. (meant to be territory defense)
Targets must be withing X squares.
Targets can not be incapacitated.
Targets can not be another Wulf.
When Health is < 65% will evade nearby Enemies.
Wulves do not count as Enemies.
If the Enemy is an Animal, it must be within X squares.
If the Enemy is a Human or Mechanoid, it must be within Y squares.
If the Enemy is a Human or Mechanoid, it must be in 'Line of Sight'.
Each Evade Destination is reserved so the Wulves will not stack on the same square.
Plans:
-Implement a 'disengage attack' if enemies in JobGiver_RangedDefense get too far away, or too low on health. -Targets below 45% health are ignored. Needs testing
-Implement 'Flee when Attacked' mentality in other animals. -Muffalos now flee when attacked.
-Fleeing from humans will depend on if they are armed.
-Better evasion from an enemy when fleeing.(currently they just wander at sprinting movespeed) - second pass on fleeing away rather than fast wander
-Implement pack mentality. - framework in place. Herd's/Pack's Alpha is generated and recognized
-Expose variables. -9 expose variables, 6 used
-Whatever else I can think of.
Changes 7.14.14-
-Targets below 45% health are ignored when defending territory. Needs testing
-Muffalos now flee when attacked.
-First pass on fleeing away rather than fast wander
-9 exposed variables, 6 used
JobGiver_RangedDefense
territoryRange - unused
personalSpaceRange - max range to check for encroaching enemies
fleeFromThreatRange - max range to check for enemies to flee from
fleeFromArmedThreatRange - max range to check for armed enemies to flee from
evasionRange - unused
fleeToDistance - max range to flee to when fleeing
shouldEvade - should evade? or flee
JobGiver_HuntAnimals
huntForCorpseRange - max range to check for corpses
huntForAnimalRange - max range to check for prey
Changes 7.15.14-
-Second pass on fleeing away rather than fast wander
-New Map Generation Step to support spawning Herd/Pack Animals
-New ThinkNode for Herd/Pack Animals
Is the melee damage a little much if its faster than most humans? Another issue may be the fact when a person starts their guns suck. either the health should be lower to like 50-25 or I'll be seeing an empty map pretty soon I'd think.
Still It'd be interesting to see these guys roaming about.
Yea. I probably still need to do some balancing.
I forgot I had them currently balanced against a stronger set of Muffalos. :-[
Ill edit the opening post to reflect how I would balance them against vanilla animals.
EDIT:
Also, as mentions in my plans, they are going to mostly flee from armed humans.
This looks like it will be a good mod to have. I always thought it was strange how muffalo just stood there and got shot.