


This mod is based off of PetProtection thunderstore github. Rather than protecting all pets, it only protects pets you choose individually to protect. Pets can either be immortal or stunnable, akin to V+'s immortal and essential options. "Immortal" means, that pets will be completely unfazed by damage. "Stunnable" means that rather than dying, pets become stunned for a custom period of time where they will simply freeze in their spot and recover. I don't think essential/stunnable actually works (anymore) in PetProtection/V+ so I made sure it works for Selective Pet Protection.
To make a pet immortal or stunnable, you simply rename them with the commands !god or !stun respectively. This will not actually rename the pet, but just add the protection. You can always tell the state of protection by the shield icon after the pets name. By default, gold means immortal, light blue means stunnable. You can change the colors to your liking in the config.

You can change the shield color for !god and !stun. You can set the time a pet will be stunned for.
When a pet is stunned and there is no other valid target around, the attacker will keep attacking the stunned pet. This has no effects on the pet, but rather than the attacker roaming around, he will be fixated on the pet. This might be somewhat of a fringe case, since usually a player will be around.
magnus.jpg on the Valheim Modding Discord