Jump to content

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


arramus

Recommended Posts

4 hours ago, arramus said:

Testing is going well. All guards and animals could be recovered. Even the piggy which we expected to be removed by now.

 

ggKkEZq.jpg

Awesome! This has become one of our must have mods on our server! Still going to start a Throwback server & as soon as this & a few other mods are updated we will start a server for A21 as well. Thanks so much for all you're doing!

Link to comment
Share on other sites

  • arramus changed the title to (A21-A20-A19) Oak's Pet Animals and Guards

Oak's Pet Animals and Guards have been updated to A21...

https://github.com/arramus/ServerSideOnly-Oaks-Pets-and-Guards

 

However, and this could be a game changer for some servers.

 

Human Guard Mesh Collision

The Human Guards do not have a surrounding mesh collision. This means they are impervious to attack and are pretty much immortal.
A21 removed a number of features related to how the guards are made and this is one of them.

If this is a problem for your server or play through, the Human Guards can be removed from the loot.xml to allow only the Animal Guards to be accessible.
Unfortunate, but this is a TFP asset and one that keeps it Server Side Only.

 

BdJiLmG.jpg

Link to comment
Share on other sites

7 hours ago, arramus said:

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 

Link to comment
Share on other sites

13 minutes ago, Sheriff said:

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

5 hours ago, Black_Taipan said:

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.


 

    <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>

 

Link to comment
Share on other sites

3 hours ago, arramus said:

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!

Link to comment
Share on other sites

On 7/9/2023 at 7:34 AM, 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! 

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

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!

Link to comment
Share on other sites

4 hours ago, MandyCMoore said:

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.

Link to comment
Share on other sites

26 minutes ago, arramus said:

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!!

Link to comment
Share on other sites

  • 2 months later...

@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.

spacer.png

 

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.
spacer.png

 

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

spacer.png

 

spacer.png

Link to comment
Share on other sites

  • 6 months later...

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 months later...

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.

spacer.png

 

spacer.png

 

NpcUMA not found.

spacer.png

Link to comment
Share on other sites

On 7/1/2024 at 9:24 PM, arramus said:

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.

spacer.png

 

spacer.png

 

NpcUMA not found.

spacer.png

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.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...