Jump to content

Zombies Hunt Too: Allow Zombies to Attack Animals


Xaliber

Recommended Posts

Zombies Hunt Too

Allow Zombies to Attack Animals

 

A18 Compatible

 

 

I always find it weird each time I find zombies spawning near stags, they just stand there shambling around, doing nothing. Don't zombies prey on animal meat too?

 

This small modlet is my attempt to fix that issue. My first time modding 7 Days to Die, feedback is much appreciated.

 

[Download Link]

 

The mod is best used in conjunction with mods that add more animals

so you don't run out of animals to hunt.

 

e.g.:

Stallionsden's Invisible Animal FIX

or

MeanCloud's Increased Animals

 

 

 

------

 

TODO: Make zombies also hunt for boars.

 

I'm still trying to figure out how to add "entityAnimalBoar" class to animalBoar so they will be huntable. If I add the class the game says, "Object reference not set to an instance of an object"

Link to comment
Share on other sites

I get this in the console when loading new chunks, it just repeats over and over until I kill the game.

 

NullReferenceException: Object reference not set to an instance of an object

at Chunk.GetEntitiesInBounds (System.Type _class, UnityEngine.Bounds _bb, System.Collections.Generic.List`1[T] _list) [0x0009e] in <090ac70841964a1faa431f23e2b8e0e3>:0

at World.GetEntitiesInBounds (System.Type _class, UnityEngine.Bounds _bb, System.Collections.Generic.List`1[T] list) [0x00097] in <090ac70841964a1faa431f23e2b8e0e3>:0

at EAISetNearestEntityAsTarget.FindTarget () [0x001f4] in <090ac70841964a1faa431f23e2b8e0e3>:0

at EAISetNearestEntityAsTarget.CanExecute () [0x00022] in <090ac70841964a1faa431f23e2b8e0e3>:0

at EAITaskList.OnUpdateTasks () [0x000ce] in <090ac70841964a1faa431f23e2b8e0e3>:0

at EAIManager.Update () [0x0001b] in <090ac70841964a1faa431f23e2b8e0e3>:0

at EntityAlive.updateTasks () [0x00063] in <090ac70841964a1faa431f23e2b8e0e3>:0

at EntityAlive.OnUpdateLive () [0x00154] in <090ac70841964a1faa431f23e2b8e0e3>:0

at EntityEnemy.OnUpdateLive () [0x00000] in <090ac70841964a1faa431f23e2b8e0e3>:0

at EntityEnemyAnimal.OnUpdateLive () [0x00000] in <090ac70841964a1faa431f23e2b8e0e3>:0

at EntityAlive.OnUpdateEntity () [0x0001e] in <090ac70841964a1faa431f23e2b8e0e3>:0

at World.TickEntity (Entity e, System.Single _partialTicks) [0x0015d] in <090ac70841964a1faa431f23e2b8e0e3>:0

at World.TickEntitiesSlice (System.Int32 count) [0x00037] in <090ac70841964a1faa431f23e2b8e0e3>:0

at World.TickEntitiesSlice () [0x00000] in <090ac70841964a1faa431f23e2b8e0e3>:0

at GameManager.UpdateTick () [0x00026] in <090ac70841964a1faa431f23e2b8e0e3>:0

at GameManager.gmUpdate () [0x00297] in <090ac70841964a1faa431f23e2b8e0e3>:0

at GameManager.Update () [0x00000] in <090ac70841964a1faa431f23e2b8e0e3>:0

 

(Filename: <090ac70841964a1faa431f23e2b8e0e3> Line: 0)

Link to comment
Share on other sites

I get this in the console when loading new chunks, it just repeats over and over until I kill the game.

 

NullReferenceException: Object reference not set to an instance of an object

at Chunk.GetEntitiesInBounds (System.Type _class, UnityEngine.Bounds _bb, System.Collections.Generic.List`1[T] _list) [0x0009e] in <090ac70841964a1faa431f23e2b8e0e3>:0

at World.GetEntitiesInBounds (System.Type _class, UnityEngine.Bounds _bb, System.Collections.Generic.List`1[T] list) [0x00097] in <090ac70841964a1faa431f23e2b8e0e3>:0

at EAISetNearestEntityAsTarget.FindTarget () [0x001f4] in <090ac70841964a1faa431f23e2b8e0e3>:0

at EAISetNearestEntityAsTarget.CanExecute () [0x00022] in <090ac70841964a1faa431f23e2b8e0e3>:0

at EAITaskList.OnUpdateTasks () [0x000ce] in <090ac70841964a1faa431f23e2b8e0e3>:0

at EAIManager.Update () [0x0001b] in <090ac70841964a1faa431f23e2b8e0e3>:0

at EntityAlive.updateTasks () [0x00063] in <090ac70841964a1faa431f23e2b8e0e3>:0

at EntityAlive.OnUpdateLive () [0x00154] in <090ac70841964a1faa431f23e2b8e0e3>:0

at EntityEnemy.OnUpdateLive () [0x00000] in <090ac70841964a1faa431f23e2b8e0e3>:0

at EntityEnemyAnimal.OnUpdateLive () [0x00000] in <090ac70841964a1faa431f23e2b8e0e3>:0

at EntityAlive.OnUpdateEntity () [0x0001e] in <090ac70841964a1faa431f23e2b8e0e3>:0

at World.TickEntity (Entity e, System.Single _partialTicks) [0x0015d] in <090ac70841964a1faa431f23e2b8e0e3>:0

at World.TickEntitiesSlice (System.Int32 count) [0x00037] in <090ac70841964a1faa431f23e2b8e0e3>:0

at World.TickEntitiesSlice () [0x00000] in <090ac70841964a1faa431f23e2b8e0e3>:0

at GameManager.UpdateTick () [0x00026] in <090ac70841964a1faa431f23e2b8e0e3>:0

at GameManager.gmUpdate () [0x00297] in <090ac70841964a1faa431f23e2b8e0e3>:0

at GameManager.Update () [0x00000] in <090ac70841964a1faa431f23e2b8e0e3>:0

 

(Filename: <090ac70841964a1faa431f23e2b8e0e3> Line: 0)

 

It shouldn't cause that issue. Can you list other mods you use?

Link to comment
Share on other sites

I'm having the same issue (or something similar). I can't get the full output log to attach, but here's the part with the other mods I have...

 

2019-12-09T09:10:18 18.348 INF [MODS] Start loading

2019-12-09T09:10:18 18.350 INF [MODS] Trying to load from Aint Nobody Got Time For That

2019-12-09T09:10:18 18.378 INF [MODS] Loaded Mod: Aint Nobody Got Time For That (1.0)

2019-12-09T09:10:18 18.378 INF [MODS] Trying to load from BetterBirdnestLoot

2019-12-09T09:10:18 18.382 INF [MODS] Loaded Mod: Better Birdnest Loot (1.0)

2019-12-09T09:10:18 18.382 INF [MODS] Trying to load from Claymore_More_Options

2019-12-09T09:10:18 18.385 INF [MODS] Loaded Mod: More Options (1.0.1)

2019-12-09T09:10:18 18.385 INF [MODS] Trying to load from Claymore_Selling_Machines

2019-12-09T09:10:18 18.387 INF [MODS] Loaded Mod: Personal Selling Machine (1.0.0)

2019-12-09T09:10:18 18.387 INF [MODS] Trying to load from Craftworx Quicker Crossbow

2019-12-09T09:10:18 18.390 INF [MODS] Loaded Mod: Craftworx A18 Edition - Quicker Crossbow modlet (4.00)

2019-12-09T09:10:18 18.390 INF [MODS] Trying to load from Double Motherlode

2019-12-09T09:10:18 18.394 INF [MODS] Loaded Mod: Double Motherlode (1.0.0)

2019-12-09T09:10:18 18.394 INF [MODS] Trying to load from Dressed2Kill

2019-12-09T09:10:18 18.397 INF [MODS] Loaded Mod: Dressed2Kill (A18.b152)

2019-12-09T09:10:18 18.397 INF [MODS] Trying to load from Faster Melting and Crafting

2019-12-09T09:10:18 18.400 INF [MODS] Loaded Mod: Faster Melting and Crafting (1.0)

2019-12-09T09:10:18 18.400 INF [MODS] Trying to load from Faster_crafting_mod

2019-12-09T09:10:18 18.402 INF [MODS] Loaded Mod: FasterCraftingMod (18.0)

2019-12-09T09:10:18 18.402 INF [MODS] Trying to load from FlurryOfBlowsMiningTools

2019-12-09T09:10:18 18.405 INF [MODS] Loaded Mod: Flurry of Blows for Mining Tools a18! (1.0)

2019-12-09T09:10:18 18.405 INF [MODS] Trying to load from gameplay_Better harvesting

2019-12-09T09:10:18 18.409 INF [MODS] Loaded Mod: Better Harvesting (A18)

2019-12-09T09:10:18 18.409 INF [MODS] Trying to load from GoreMod

2019-12-09T09:10:18 18.412 INF [MODS] Loaded Mod: Gore Mod (1)

2019-12-09T09:10:18 18.412 INF [MODS] Trying to load from Harrys More Loot From Zombies 30%

2019-12-09T09:10:18 18.415 INF [MODS] Loaded Mod: Harry's_More_Zombie_Loot (A17)

2019-12-09T09:10:18 18.415 INF [MODS] Trying to load from Improvement_Harder spikes trap

2019-12-09T09:10:18 18.418 INF [MODS] Loaded Mod: Harder Spikes trap (A18)

2019-12-09T09:10:18 18.418 INF [MODS] Trying to load from increased mod DMG

2019-12-09T09:10:18 18.421 INF [MODS] Loaded Mod: increased mod DMG (18.0)

2019-12-09T09:10:18 18.421 INF [MODS] Trying to load from JaxTeller718_TougherFarming

2019-12-09T09:10:18 18.423 INF [MODS] Loaded Mod: JaxTeller718_TougherFarming (18.0b139)

2019-12-09T09:10:18 18.423 INF [MODS] Trying to load from Josh_ExtraEquipmentModSlot_A18

2019-12-09T09:10:18 18.427 INF [MODS] Loaded Mod: Joshs Extra Mod Slots for A18 (1.00)

2019-12-09T09:10:18 18.427 INF [MODS] Trying to load from KHA18-BackpackButtons

2019-12-09T09:10:18 18.430 INF [MODS] Loaded Mod: Custom Backpack Buttons (1.0)

2019-12-09T09:10:18 18.430 INF [MODS] Trying to load from MeanCloud__DontUseUpWater

2019-12-09T09:10:18 18.433 INF [MODS] Loaded Mod: MeanCloud's Don't Use Up Water! (A18 1.00)

2019-12-09T09:10:18 18.433 INF [MODS] Trying to load from MeanCloud__IncreasedAnimals

2019-12-09T09:10:18 18.436 INF [MODS] Loaded Mod: MeanCloud's Increased Animals (A18 1.00)

2019-12-09T09:10:18 18.436 INF [MODS] Trying to load from PhD Food_Water

2019-12-09T09:10:18 18.442 INF [MODS] Loaded Mod: PhD Food_Water (1.0)

2019-12-09T09:10:18 18.442 INF [MODS] Trying to load from Quasi's Quicker Scrapping

2019-12-09T09:10:18 18.445 INF [MODS] Loaded Mod: Quasi's Quicker Scrapping (1.0.0)

2019-12-09T09:10:18 18.445 INF [MODS] Trying to load from S420_SimpleUI-BiggerBackpack120-PlayerBuiltStorage

2019-12-09T09:10:18 18.449 INF [MODS] Loaded Mod: S420_SimpleUI-BiggerBackpack120-PlayerBuiltStorage (1.2)

2019-12-09T09:10:18 18.449 INF [MODS] Trying to load from S420_SimpleUI-LeftHUD-BuffTimers

2019-12-09T09:10:18 18.452 INF [MODS] Loaded Mod: S420_SimpleUI-LeftHUD-BuffTimers (1.6)

2019-12-09T09:10:18 18.452 INF [MODS] Trying to load from SpeedTweaks

2019-12-09T09:10:18 18.455 INF [MODS] Loaded Mod: SpeedTweaks (1.0)

2019-12-09T09:10:18 18.455 INF [MODS] Trying to load from Stallionsdens Invisible animal fix

2019-12-09T09:10:18 18.455 INF [MODS] Loaded Mod: Stallionsdens Invisible animal fix (A18)

2019-12-09T09:10:18 18.455 INF [MODS] Trying to load from Stallionsdens No Armor Encumberance

2019-12-09T09:10:18 18.458 INF [MODS] Loaded Mod: Stallionsdens No Armor Encumberance Modlet (B208)

2019-12-09T09:10:18 18.458 INF [MODS] Trying to load from Stallionsdens Pallets

2019-12-09T09:10:18 18.459 INF [MODS] Loaded Mod: Stallionsdens Pallets (A18)

2019-12-09T09:10:18 18.459 INF [MODS] Trying to load from Stallionsdens Stack Size Increaser

2019-12-09T09:10:18 18.460 INF [MODS] Loaded Mod: Stallionsdens Stack Size Increaser (A18)

2019-12-09T09:10:18 18.460 INF [MODS] Trying to load from stallionsdensweapons

2019-12-09T09:10:18 18.463 INF [MODS] Loaded Mod: Stallionsdens Weapons Modlet (A18)

2019-12-09T09:10:18 18.463 INF [MODS] Trying to load from StartingItemPlus

2019-12-09T09:10:18 18.463 INF [MODS] Loaded Mod: StartingItemPlus (1.0)

2019-12-09T09:10:18 18.463 INF [MODS] Trying to load from Valmars Buffed Supply Crate Drops

2019-12-09T09:10:18 18.466 INF [MODS] Loaded Mod: Valmars Buffed Supply Crate Drops (A18)

2019-12-09T09:10:18 18.466 INF [MODS] Trying to load from Valmars Door Lock Smash

2019-12-09T09:10:18 18.468 INF [MODS] Loaded Mod: Valmars Door Lock Smash (A18)

2019-12-09T09:10:18 18.468 INF [MODS] Trying to load from Valmars Expanded Player Storage

2019-12-09T09:10:18 18.471 INF [MODS] Loaded Mod: Valmars Expanded Player Storage (A18)

2019-12-09T09:10:18 18.471 INF [MODS] Trying to load from Valmars Reuseable Cooking Bowls

2019-12-09T09:10:18 18.475 INF [MODS] Loaded Mod: Valmars Reuseable Cooking Bowls (A18)

2019-12-09T09:10:18 18.475 INF [MODS] Trying to load from Valmars Survivor Notes Experience and Recipe Books

2019-12-09T09:10:18 18.479 INF [MODS] Loaded Mod: Valmars Survivor Notes Experience and Recipe Books (A18)

2019-12-09T09:10:18 18.479 INF [MODS] Trying to load from vehicle storage mod

2019-12-09T09:10:18 18.482 INF [MODS] Loaded Mod: vehicle storage mod (1.0)

2019-12-09T09:10:18 18.482 INF [MODS] Trying to load from Wa3zuk Biome Cleaner

2019-12-09T09:10:18 18.487 INF [MODS] Loaded Mod: Wa3zuk Biome Cleaner (1.1)

2019-12-09T09:10:18 18.487 INF [MODS] Trying to load from War3zuk Donnas Fubar Stew

2019-12-09T09:10:18 18.491 INF [MODS] Loaded Mod: War3zuk Donnas Fubar Stew (1.1)

2019-12-09T09:10:18 18.491 INF [MODS] Trying to load from War3zuk Find The Trader

2019-12-09T09:10:18 18.495 INF [MODS] Loaded Mod: War3zuk Find The Trader (1.0)

2019-12-09T09:10:18 18.495 INF [MODS] Trying to load from War3zuk Golden Ticket

2019-12-09T09:10:18 18.498 INF [MODS] Loaded Mod: War3zuk Golden Ticket (1.0)

2019-12-09T09:10:18 18.498 INF [MODS] Trying to load from War3zuk HD First Aid Kit

2019-12-09T09:10:18 18.502 INF [MODS] Loaded Mod: War3zuk HD First Aid Kit (1.0)

2019-12-09T09:10:18 18.502 INF [MODS] Trying to load from War3zuk HD Tools

2019-12-09T09:10:18 18.507 INF [MODS] Loaded Mod: War3zuk HD Tools (1.1)

2019-12-09T09:10:18 18.507 INF [MODS] Trying to load from War3zuk HD Wrench

2019-12-09T09:10:18 18.513 INF [MODS] Loaded Mod: HD Wrench (1.1)

2019-12-09T09:10:18 18.513 INF [MODS] Trying to load from War3zuk HD Xcalibur

2019-12-09T09:10:18 18.517 INF [MODS] Loaded Mod: HD Xcalibur (1.1)

2019-12-09T09:10:18 18.517 INF [MODS] Trying to load from War3zuk Healing Bedroll

2019-12-09T09:10:18 18.520 INF [MODS] Loaded Mod: War3zuk Healing Bedroll (1.0)

2019-12-09T09:10:18 18.520 INF [MODS] Trying to load from War3zuk Lootable Animals

2019-12-09T09:10:18 18.525 INF [MODS] Loaded Mod: War3zuk Lootable Animals (1.0)

2019-12-09T09:10:18 18.525 INF [MODS] Trying to load from War3zuk Move Speeds

2019-12-09T09:10:18 18.529 INF [MODS] Loaded Mod: War3zuk Move Speeds (1.0)

2019-12-09T09:10:18 18.529 INF [MODS] Trying to load from War3zuk Pro Points

2019-12-09T09:10:18 18.532 INF [MODS] Loaded Mod: War3zuk Improved Progression Points (1.0)

2019-12-09T09:10:18 18.532 INF [MODS] Trying to load from War3zuk Weed Wacker 5000

2019-12-09T09:10:18 18.536 INF [MODS] Loaded Mod: War3zuk Weed Wacker 5000 (1.0)

2019-12-09T09:10:18 18.536 INF [MODS] Trying to load from Xal_SetZombiesAttackAnimals

2019-12-09T09:10:18 18.541 INF [MODS] Loaded Mod: Xal_SetZombiesAttackAnimals (18.0.1)

2019-12-09T09:10:18 18.541 INF [MODS] Trying to load from z30K-itemstack

2019-12-09T09:10:18 18.544 INF [MODS] Loaded Mod: 30K-itemstack (1.1)

Link to comment
Share on other sites

Thanks for the list, CrypticGirl. My time is limited at the moment, so I'm going to downloads mods of your setup. However I'm only able to take a serious look on weekend.

 

In the mean time, if you have the time to test what might be conflicting with it (by binary testing: only having half of your setup + my mod, if error persists, try having only half of your half + my mod, and so on), it would help me very much.

 

Please excuse me; have experience modding other games but I'm a complete newbie here. :)

 

----

 

On the other news...

 

Updated to A18.0.2.

I've managed to make zombies attack boars, thanks for Tin's help on the other thread.

Link to comment
Share on other sites

  • 2 weeks later...

Also spamming red NREs here, but only when I get close to the snow biome. No errors on startup. I am not using any of CrypticGirl's modlets, except for "KHA18-BackpackButtons". Output is thus, repeating endlessly until I alt-F4:

NullReferenceException: Object reference not set to an instance of an object
 at Chunk.GetEntitiesInBounds (System.Type _class, UnityEngine.Bounds _bb, System.Collections.Generic.List`1[T] _list) [0x0009e] in <090ac70841964a1faa431f23e2b8e0e3>:0 
 at World.GetEntitiesInBounds (System.Type _class, UnityEngine.Bounds _bb, System.Collections.Generic.List`1[T] list) [0x00097] in <090ac70841964a1faa431f23e2b8e0e3>:0 
 at EAISetNearestEntityAsTarget.FindTarget () [0x001f4] in <090ac70841964a1faa431f23e2b8e0e3>:0 
 at EAISetNearestEntityAsTarget.CanExecute () [0x00022] in <090ac70841964a1faa431f23e2b8e0e3>:0 
 at EAITaskList.OnUpdateTasks () [0x000ce] in <090ac70841964a1faa431f23e2b8e0e3>:0 
 at EAIManager.Update () [0x0001b] in <090ac70841964a1faa431f23e2b8e0e3>:0 
 at EntityAlive.updateTasks () [0x00063] in <090ac70841964a1faa431f23e2b8e0e3>:0 
 at EntityAlive.OnUpdateLive () [0x00154] in <090ac70841964a1faa431f23e2b8e0e3>:0 
 at EntityEnemy.OnUpdateLive () [0x00000] in <090ac70841964a1faa431f23e2b8e0e3>:0 
 at EntityEnemyAnimal.OnUpdateLive () [0x00000] in <090ac70841964a1faa431f23e2b8e0e3>:0 
 at EntityAlive.OnUpdateEntity () [0x0001e] in <090ac70841964a1faa431f23e2b8e0e3>:0 
 at World.TickEntity (Entity e, System.Single _partialTicks) [0x0015d] in <090ac70841964a1faa431f23e2b8e0e3>:0 
 at World.TickEntitiesSlice (System.Int32 count) [0x00037] in <090ac70841964a1faa431f23e2b8e0e3>:0 
 at World.TickEntitiesSlice () [0x00000] in <090ac70841964a1faa431f23e2b8e0e3>:0 
 at GameManager.UpdateTick () [0x00026] in <090ac70841964a1faa431f23e2b8e0e3>:0 
 at GameManager.gmUpdate () [0x00297] in <090ac70841964a1faa431f23e2b8e0e3>:0 
 at GameManager.Update () [0x00000] in <090ac70841964a1faa431f23e2b8e0e3>:0 

(Filename: <090ac70841964a1faa431f23e2b8e0e3> Line: 0)

 

Removing your modlet and reloading clears all NREs, but adding its folder back in starts them immediately when in the snow biome.

Link to comment
Share on other sites

  • 2 weeks later...
It's almost certainly the edits to Mountain Lion and (possibly) the non-Zombie Bear. I disabled both edits in the .xml and have had no issues since.

 

Could this be due to edits being applied multiple times to the same entity from extends?

in example:

<entity_class name="animalMountainLion" extends="animalDireWolf">

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...