• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

(A21-A20-A19) Oak's Pet Animals and Guards

  • Thread starter Thread starter Guest
  • Start date Start date
The archetypes are a mixture of trial and error, and past knowledge of how they were used many Alphas ago. There really is no magic to those beyond making incremental changes in the archetypes.xml.

 
The archetypes are a mixture of trial and error, and past knowledge of how they were used many Alphas ago. There really is no magic to those beyond making incremental changes in the archetypes.xml.
Damn, well thanks for getting back, sadly nothing like Alpha 16 with the Dev tool archetype preview 

 
Damn, well thanks for getting back, sadly nothing like Alpha 16 with the Dev tool archetype preview 
The player profiles area is potentially the fastest route to check archetype updates from a front on view, and in most cases that is enough until reaching finalisation checks.

511eUP1.jpg


 
So I was trying to add this to my server for A21 but I wanted to remove the guards but no matter what I removed from the loot XML it would cause red log game breaking bugs if theres a very specific thing I need to do or if it doesn't work properly i would appreciate any form of help please and thank you. An example of how it needs to be removed would be greatly appreciated as idk if im dumb and dont know what im doing or if it cant be done without breaking the overall game.

 
So I was trying to add this to my server for A21 but I wanted to remove the guards but no matter what I removed from the loot XML it would cause red log game breaking bugs if theres a very specific thing I need to do or if it doesn't work properly i would appreciate any form of help please and thank you. An example of how it needs to be removed would be greatly appreciated as idk if im dumb and dont know what im doing or if it cant be done without breaking the overall game.
To delete all guards from loot, and they are only appearing on air supply drop containers, delete all of this in the loot.xml

<insertBefore xpath="/lootcontainers/lootgroup[@name='groupApparelSuit']">
<lootgroup name="petanimals">
<item name="PetPig1"/>
<item name="PetStag1"/>
<item name="PetBoar1"/>
<item name="PetBear1"/>
<item name="PetWolf1"/>
<item name="PetCoyote1"/>
<item name="PetDoe1"/>
</lootgroup>
<lootgroup name="turretguards">
<item name="TurretGuardSim1"/>
<item name="GuardTurretDre1"/>
<item name="GuardTurretFox1"/>
<item name="GuardTurretLizzy1"/>
<item name="GuardTurretBandit1"/>
<item name="GuardTurretBanditFoxy1"/>
<item name="TurretGuardLeader1"/>
<item name="TurretGuardCompoundBowMan1"/>
<item name="TurretGuardDarkstardragon1"/>
<item name="TurretGuardJoJo1"/>
<item name="TurretGuardLezabel1"/>
<item name="TurretGuardOakraven1"/>

</lootgroup>

</insertBefore>

<append xpath="/lootcontainers/lootcontainer[@name='airDrop']"> <!-- Supply Crate General, the normal airdrop -->
<item group="petanimals" count="1,3" loot_prob_template="medLow"/>
<item group="turretguards" count="1,3" loot_prob_template="medLow"/>
</append>




To delete only the Human Guards but leave the Animal Guards, change it to look like this.
 

<insertBefore xpath="/lootcontainers/lootgroup[@name='groupApparelSuit']">
<lootgroup name="petanimals">
<item name="PetPig1"/>
<item name="PetStag1"/>
<item name="PetBoar1"/>
<item name="PetBear1"/>
<item name="PetWolf1"/>
<item name="PetCoyote1"/>
<item name="PetDoe1"/>
</lootgroup>
</insertBefore>


<append xpath="/lootcontainers/lootcontainer[@name='airDrop']"> <!-- Supply Crate General, the normal airdrop -->
<item group="petanimals" count="1,3" loot_prob_template="medLow"/>
</append>




Since the Animal Guards are also appearing in the Trader loot...

Change traders.xml to remove them.

Code:
    <insertBefore xpath="/traders/trader_item_groups/trader_item_group[@name='groupMeleeMods']">
    
        <trader_item_group name="petanimals">
            <item name="PetPig1"/>
            <item name="PetStag1"/>
            <item name="PetBoar1"/>
            <item name="PetBear1"/>
            <item name="PetWolf1"/>
            <item name="PetCoyote1"/>
            <item name="PetDoe1"/>            
        </trader_item_group>
        
    </insertBefore>

    <append xpath="/traders/trader_item_groups/trader_item_group[@name='traderAlways']">
        <item group="petanimals" count="1,5"/>        
    </append>
 
To delete all guards from loot, and they are only appearing on air supply drop containers, delete all of this in the loot.xml

<insertBefore xpath="/lootcontainers/lootgroup[@name='groupApparelSuit']">
<lootgroup name="petanimals">
<item name="PetPig1"/>
<item name="PetStag1"/>
<item name="PetBoar1"/>
<item name="PetBear1"/>
<item name="PetWolf1"/>
<item name="PetCoyote1"/>
<item name="PetDoe1"/>
</lootgroup>
<lootgroup name="turretguards">
<item name="TurretGuardSim1"/>
<item name="GuardTurretDre1"/>
<item name="GuardTurretFox1"/>
<item name="GuardTurretLizzy1"/>
<item name="GuardTurretBandit1"/>
<item name="GuardTurretBanditFoxy1"/>
<item name="TurretGuardLeader1"/>
<item name="TurretGuardCompoundBowMan1"/>
<item name="TurretGuardDarkstardragon1"/>
<item name="TurretGuardJoJo1"/>
<item name="TurretGuardLezabel1"/>
<item name="TurretGuardOakraven1"/>

</lootgroup>

</insertBefore>

<append xpath="/lootcontainers/lootcontainer[@name='airDrop']"> <!-- Supply Crate General, the normal airdrop -->
<item group="petanimals" count="1,3" loot_prob_template="medLow"/>
<item group="turretguards" count="1,3" loot_prob_template="medLow"/>
</append>




To delete only the Human Guards but leave the Animal Guards, change it to look like this.
 

<insertBefore xpath="/lootcontainers/lootgroup[@name='groupApparelSuit']">
<lootgroup name="petanimals">
<item name="PetPig1"/>
<item name="PetStag1"/>
<item name="PetBoar1"/>
<item name="PetBear1"/>
<item name="PetWolf1"/>
<item name="PetCoyote1"/>
<item name="PetDoe1"/>
</lootgroup>
</insertBefore>


<append xpath="/lootcontainers/lootcontainer[@name='airDrop']"> <!-- Supply Crate General, the normal airdrop -->
<item group="petanimals" count="1,3" loot_prob_template="medLow"/>
</append>




Since the Animal Guards are also appearing in the Trader loot...

Change traders.xml to remove them.

<insertBefore xpath="/traders/trader_item_groups/trader_item_group[@name='groupMeleeMods']">

<trader_item_group name="petanimals">
<item name="PetPig1"/>
<item name="PetStag1"/>
<item name="PetBoar1"/>
<item name="PetBear1"/>
<item name="PetWolf1"/>
<item name="PetCoyote1"/>
<item name="PetDoe1"/>
</trader_item_group>

</insertBefore>

<append xpath="/traders/trader_item_groups/trader_item_group[@name='traderAlways']">
<item group="petanimals" count="1,5"/>
</append>

That worked thank you very much!

 
arramus said:
This works client side for Single Player mode very well.

All of the assets are already in 7D2D which is why it can work for Server Side Only on a dedicated server, but SP is also very acceptable.


Thank you so much for confirming! 

 
I have discovered a couple of issues I was wondering if you could help me sort out. The first, with the NPC Mod & the Guards there must me some sort of conflict because the animal guards still work fine, but the human guards will not work. They still look great & all, but they don't fire at any zombies. Been pulling my hair out trying to figure out what the conflict may be, but I am at a loss. The second, vanilla turrets target the animal guards. Damn thing almost killed my babies! Lol. Is there a way to stop this or a way to heal the animal guards? Thanks so much!

 
Kynion said:
I was wondering if it is possible to make the guard animals able to pick up , due to wandering off very far away sometimes !?
I love this idea. Would be great to be able to pick them up & move them around the base.

 
I have discovered a couple of issues I was wondering if you could help me sort out. The first, with the NPC Mod & the Guards there must me some sort of conflict because the animal guards still work fine, but the human guards will not work. They still look great & all, but they don't fire at any zombies. Been pulling my hair out trying to figure out what the conflict may be, but I am at a loss. The second, vanilla turrets target the animal guards. Damn thing almost killed my babies! Lol. Is there a way to stop this or a way to heal the animal guards? Thanks so much!
magejosh shared a workaround on the NPC Mod conflict a while back and I'll share the original post here. It was for A20 NPC Mod though and the NPC Mod may well have changed things since then as well.



Basically..

NPC Mod uses its own ai package. This post suggests you change the utilityai.xml on line 3 in the A21-ServerSideOnly-Oaks-Pets-and-Guards/Config folder where it says:

 <insertBefore xpath="/utility_ai/ai_packages/ai_package[@name='Zombie_Dumb']" >

to

<insertBefore xpath="/utility_ai/ai_packages/ai_package[@name='Zombie Dumb']" >

just that Zombie_Dumb to Zombie Dumb without the connecting underbar will match how the NPC Mod does it and have somewhere to add the Oak guards to.

However, I'm not totally sure which version you are using and for A21, I don't believe that still exists. Try changing it to:

<insertBefore xpath="/utility_ai/ai_packages">

instead.

And if that doesn't work, you can try something very specific to the NPC Mod with:

<insertBefore xpath="/utility_ai/ai_packages/ai_package[@name='NPCModCore']" >

As for the turrets shooting the pets guards, it's just the way the two classes interact and is a TFP feature. For a Server Side Only mod, classes is very much a hard coding thing. We could stop the Turrets from shooting the NPC guards by changing the human guard class settings but not the animals as there was no real alternative.

It would also be nice to be able to pick up the pet guards in the same way we can with vehicles, but their class does not appear to accept it under normal circumstances for such an xml mod. It may be possible, but without the input of an xml expert, it's not within my capabilities.

 
magejosh shared a workaround on the NPC Mod conflict a while back and I'll share the original post here. It was for A20 NPC Mod though and the NPC Mod may well have changed things since then as well.



Basically..

NPC Mod uses its own ai package. This post suggests you change the utilityai.xml on line 3 in the A21-ServerSideOnly-Oaks-Pets-and-Guards/Config folder where it says:

 <insertBefore xpath="/utility_ai/ai_packages/ai_package[@name='Zombie_Dumb']" >

to

<insertBefore xpath="/utility_ai/ai_packages/ai_package[@name='Zombie Dumb']" >

just that Zombie_Dumb to Zombie Dumb without the connecting underbar will match how the NPC Mod does it and have somewhere to add the Oak guards to.

However, I'm not totally sure which version you are using and for A21, I don't believe that still exists. Try changing it to:

<insertBefore xpath="/utility_ai/ai_packages">

instead.

And if that doesn't work, you can try something very specific to the NPC Mod with:

<insertBefore xpath="/utility_ai/ai_packages/ai_package[@name='NPCModCore']" >

As for the turrets shooting the pets guards, it's just the way the two classes interact and is a TFP feature. For a Server Side Only mod, classes is very much a hard coding thing. We could stop the Turrets from shooting the NPC guards by changing the human guard class settings but not the animals as there was no real alternative.

It would also be nice to be able to pick up the pet guards in the same way we can with vehicles, but their class does not appear to accept it under normal circumstances for such an xml mod. It may be possible, but without the input of an xml expert, it's not within my capabilities.
Thanks so much for the quick reply. Both NPC Mod & the Guards are a must for us, & we didn't want to have to give up either of them. Luckily, your last suggestion, <insertBefore xpath="/utility_ai/ai_packages/ai_package[@name='NPCModCore']" > , made it work! Thanks so very much!!

 
@Bigmatt76

Ah yes. This is a biggie for A21. We weren't going to release this Mod for A21 at all due to how much of an issue it would cause, but the requests remained and it was released with a warning.

The chunk reset feature is quite bugged on dedi servers and corrupts the whole region. I learned that the hard way. We knew Admin would know about that way to purge the area and guards but that is doing more damage than helping.

Here is an alternative for Admin in debugmenu mode. It will be shared in the opening post.

1. Visit the area you'd like the purge guards.

JtVO4r8.jpg


2. In debugmenu mode use the F1 console command 'killall all'. 'killall' purges only zombies. 'killall all' will purge these guards.

Testing 'killall' alone. It is insufficient.
hubz5Mz.jpg


Testing 'killall all'. It is appropriate for Admin to clear recalcitrant guards.

i5HQgst.jpg


WmQTGXo.jpg


 
I love this mod, and it does help from the random hordes that keep popping up from destroying my base. One question, is there a way to have the guards ignore a certain entity/enemy? I play with sorcery, and the only thing that kills the guards are the wisps. They damage whatever attacks them, so the guards will shoot them and end up dying.

 
The Sorcery developer requested that no support/patching support be offered for things related to the Sorcery mod, and I suggest visiting the Sorcery thread/Discord for support with this issue. This was a request made with a similar issue for the Not Medieval Mod that Darkstardragon and I worked on for A20. The same will apply for this mod.

 
Will this be updated for 1.0? I assume if there are plans on an update it will be after stable is released. Keeping my fingers crossed because this has become a must-have. Lol. Love this mod!

 
Attempting to spawn in an Animal Guard is successful.

However, attempting to spawn in a Turret Guard is not successful. It appears more of the older, and no longer applicable, assets have been removed from the game or made non functional.

Bringing in a Turret Guard brings in the following error.

Exception: Model class 'NpcUMA' not found!
at Entity.InitEModel () [0x00044] in <34a370e167474eb1949fe72b029cec58>:0
at Entity.Init (System.Int32 _entityClass) [0x0000d] in <34a370e167474eb1949fe72b029cec58>:0
at EntityAlive.Init (System.Int32 _entityClass) [0x00000] in <34a370e167474eb1949fe72b029cec58>:0
at EntityFactory.CreateEntity (EntityCreationData _ecd) [0x00474] in <34a370e167474eb1949fe72b029cec58>:0
at EntityFactory.CreateEntity (System.Int32 _et, System.Int32 _id, ItemValue _itemValue, System.Int32 _count, UnityEngine.Vector3 _transformPos, UnityEngine.Vector3 _transformRot, System.Single _lifetime, System.Int32 _playerId, System.String _skinName, System.Int32 _spawnById, System.String _spawnByName) [0x0001b] in <34a370e167474eb1949fe72b029cec58>:0
at EntityFactory.CreateEntity (System.Int32 _et, System.Int32 _id, UnityEngine.Vector3 _transformPos, UnityEngine.Vector3 _rotation) [0x0000c] in <34a370e167474eb1949fe72b029cec58>:0
at EntityFactory.CreateEntity (System.Int32 _et, UnityEngine.Vector3 _transformPos, UnityEngine.Vector3 _rotation) [0x00000] in <34a370e167474eb1949fe72b029cec58>:0
at BlockSpawnEntity.UpdateTick (WorldBase _world, System.Int32 _clrIdx, Vector3i _blockPos, BlockValue _blockValue, System.Boolean _bRandomTick, System.UInt64 _ticksIfLoaded, GameRandom _rnd) [0x0012b] in <34a370e167474eb1949fe72b029cec58>:0
at WorldBlockTicker.execute (WorldBlockTickerEntry _wbte, GameRandom _rnd, System.UInt64 _ticksIfLoaded) [0x0002e] in <34a370e167474eb1949fe72b029cec58>:0
at WorldBlockTicker.tickScheduled (GameRandom _rnd) [0x0016b] in <34a370e167474eb1949fe72b029cec58>:0
at WorldBlockTicker.Tick (System.ArraySegment`1[T] _activeChunks, EntityPlayer _thePlayer, GameRandom _rnd) [0x00015] in <34a370e167474eb1949fe72b029cec58>:0
at World.OnUpdateTick (System.Single _partialTicks, System.ArraySegment`1[T] _activeChunks) [0x00052] in <34a370e167474eb1949fe72b029cec58>:0
at GameManager.UpdateTick () [0x00073] in <34a370e167474eb1949fe72b029cec58>:0
at GameManager.gmUpdate () [0x0038a] in <34a370e167474eb1949fe72b029cec58>:0
at GameManager.Update () [0x00000] in <34a370e167474eb1949fe72b029cec58>:0


The NpcUMA not found error infers that it no longer exists for how it is being used. Under the current system, based on that error, I'm not in a position to update to V1.0. There may be another way to resolve it, such as replacing human guards with armed animals, but that will ultimately be a decision for Oakraven to make.

E8MmWEO.jpeg


CNWbYzq.jpeg


NpcUMA not found.

MN8T3h5.jpeg


 
Attempting to spawn in an Animal Guard is successful.

However, attempting to spawn in a Turret Guard is not successful. It appears more of the older, and no longer applicable, assets have been removed from the game or made non functional.

Bringing in a Turret Guard brings in the following error.

Exception: Model class 'NpcUMA' not found!
at Entity.InitEModel () [0x00044] in <34a370e167474eb1949fe72b029cec58>:0
at Entity.Init (System.Int32 _entityClass) [0x0000d] in <34a370e167474eb1949fe72b029cec58>:0
at EntityAlive.Init (System.Int32 _entityClass) [0x00000] in <34a370e167474eb1949fe72b029cec58>:0
at EntityFactory.CreateEntity (EntityCreationData _ecd) [0x00474] in <34a370e167474eb1949fe72b029cec58>:0
at EntityFactory.CreateEntity (System.Int32 _et, System.Int32 _id, ItemValue _itemValue, System.Int32 _count, UnityEngine.Vector3 _transformPos, UnityEngine.Vector3 _transformRot, System.Single _lifetime, System.Int32 _playerId, System.String _skinName, System.Int32 _spawnById, System.String _spawnByName) [0x0001b] in <34a370e167474eb1949fe72b029cec58>:0
at EntityFactory.CreateEntity (System.Int32 _et, System.Int32 _id, UnityEngine.Vector3 _transformPos, UnityEngine.Vector3 _rotation) [0x0000c] in <34a370e167474eb1949fe72b029cec58>:0
at EntityFactory.CreateEntity (System.Int32 _et, UnityEngine.Vector3 _transformPos, UnityEngine.Vector3 _rotation) [0x00000] in <34a370e167474eb1949fe72b029cec58>:0
at BlockSpawnEntity.UpdateTick (WorldBase _world, System.Int32 _clrIdx, Vector3i _blockPos, BlockValue _blockValue, System.Boolean _bRandomTick, System.UInt64 _ticksIfLoaded, GameRandom _rnd) [0x0012b] in <34a370e167474eb1949fe72b029cec58>:0
at WorldBlockTicker.execute (WorldBlockTickerEntry _wbte, GameRandom _rnd, System.UInt64 _ticksIfLoaded) [0x0002e] in <34a370e167474eb1949fe72b029cec58>:0
at WorldBlockTicker.tickScheduled (GameRandom _rnd) [0x0016b] in <34a370e167474eb1949fe72b029cec58>:0
at WorldBlockTicker.Tick (System.ArraySegment`1[T] _activeChunks, EntityPlayer _thePlayer, GameRandom _rnd) [0x00015] in <34a370e167474eb1949fe72b029cec58>:0
at World.OnUpdateTick (System.Single _partialTicks, System.ArraySegment`1[T] _activeChunks) [0x00052] in <34a370e167474eb1949fe72b029cec58>:0
at GameManager.UpdateTick () [0x00073] in <34a370e167474eb1949fe72b029cec58>:0
at GameManager.gmUpdate () [0x0038a] in <34a370e167474eb1949fe72b029cec58>:0
at GameManager.Update () [0x00000] in <34a370e167474eb1949fe72b029cec58>:0


The NpcUMA not found error infers that it no longer exists for how it is being used. Under the current system, based on that error, I'm not in a position to update to V1.0. There may be another way to resolve it, such as replacing human guards with armed animals, but that will ultimately be a decision for Oakraven to make.





NpcUMA not found.

I was just coming to say I had tested it & what my findings were, but ya beat me to it. Lol! You got the same results I did. Fingers crossed for an update if Oakraven has the time.

 
Any word on if this will be updated to 1.0? Missing my dogs. Lol!
Hmmm may have to just swap out templates with latest vanilla and NPCcore ones as a temp fix til something official is put out.
I've gotten a quite a bit of packs updated but still not up to this one yet.  Im actually amazed at how many different mob packs have come out over the years since A4.
Currently been reworking spawn ID's and an issue with flying mobs atm. I always did like finding the guards as loot, lol, in some older packs. 
Im wondering if we could do something similar too... using some of the toy ARMY MEN loot... and have them placed and turned into guards and stuff.
Could even do different colors of green, olive drab, tan, brown, and even red & blue. Then setup factions and incorporate NPCcores pre-existing color army factions and just add another npc.xml for the new colors... meh, I'm getting carried away again.  This is why it takes me forever... everything is *shiny*

 
Back
Top