Mods / Animal cages

Category: #Creatures #Storage #Utility
Author: Gerste
Side: Both
Created: Aug 23rd 2021 at 9:49 PM
Last modified: Jan 30th at 4:13 PM
Downloads: 11416
Follow Unfollow 94

Disclaimer: Version 2.0.1 is not downward-compatible, as I changed the domain from smallanimalcage to animalcages!

Russian translation provided by Samotarus.

French translation by Cendar.

Small utility mod that adds cages for capturing, transporting and releasing animals. 

Contents:

Spoiler!

Adds two new Blocks to the game:

  • Small animal cage:
    • Attack a small animal with the cage equipped to catch it
    • Place the cage and break it to release the animal. Right click to pick it back up
  • Medium animal cage:
    • Attack an animal with the cage equipped to catch it
    • Animal can only be catched, if it is either a small animal, a domesticated animal or has less then one third hp
    • A full medium cage can only be placed in a backpack slot

Supported animals:

Spoiler!

Supports a variety of vanilla and modded animals:

  • Small animals:
    • sheep-bighorn-lamb
    • deer-fawn
    • chicken-baby
    • chicken-hen
    • chicken-henpoult
    • chicken-rooster
    • chicken-roosterpoult
    • hare-baby
    • pig-wild-piglet
    • wolf-pup
    • fox-pup-forest
    • fox-pup-arctic
    • aurochs-lamb
    • raccoon-male
    • raccoon-female
    • raccoon-pub
    • hyena-pup
    • hare-female-arctic
    • hare-female-ashgrey
    • hare-female-darkbrown
    • hare-female-desert
    • hare-female-gold
    • hare-female-lightbrown
    • hare-female-lightgrey
    • hare-female-silver
    • hare-female-smokegrey
    • hare-male-arctic
    • hare-male-ashgrey
    • hare-male-darkbrown
    • hare-male-desert
    • hare-male-gold
    • hare-male-lightbrown
    • hare-male-lightgrey
    • hare-male-silver
    • hare-male-smokegrey
  • Medium animals:
    • wolf-male
    • wolf-female
    • pig-wild-male
    • pig-wild-female
    • sheep-bighorn-male
    • sheep-bighorn-female
    • hyena-male
    • hyena-female
    • fox-male
    • fox-female
    • fox-arctic-male
    • fox-arctic-female
    • aurochs-female
    • aurochs-male
    • deer-female
    • deer-male
    • white-hart

Config:

Spoiler!

You can configure which entities are catchable by modifying the configuration file.

For example, if you want to make the buildingmaterials trader catchable, you have to do the following things:

  • open the animalcagesconfig.json file, located in your ModConfig folder
  • add the new animal:
    • ...{
      "name": "humanoid-trader-buildmaterials", // entity code of the new "animal"
      "scale": 0.4 // display scale (as the trader is to big for the small cage, we scale him down to 40% size)
      },...
  • Restart the game and capture the new entity
    • image

Version For Game version Downloads Release date Changelog Download
v2.0.6 7304 Jan 30th at 4:13 PM Show animalcages_v2.0.6.zip
v2.0.5 1134 Jan 5th at 7:38 PM Show animalcages_v2.0.5.zip
v2.0.4 260 Jan 2nd at 8:13 PM Show animalcages_v2.0.4.zip
v2.0.3 829 Oct 8th 2021 at 1:16 PM Show animalcages_v2.0.3.zip
v2.0.2 583 Sep 10th 2021 at 7:53 PM Show animalcages_v2.0.2.zip
v2.0.1 284 Sep 8th 2021 at 11:14 PM Show animalcages_v2.0.1.zip
v2.0.0 226 Sep 8th 2021 at 11:13 PM Show animalcages_v2.0.0.zip
v1.0.1 499 Aug 24th 2021 at 10:32 PM Show animalcages_v1.0.1.zip
v1.0.0 297 Aug 23rd 2021 at 9:50 PM Show animalcages_v1.0.0.zip

32 Comments (oldest first | newest first)

💬 Karidwen, 5 days ago

Doesnt seem to work in 1.17.9. Chicken just gets hit by it and doesnt get captured.

💬 Ziru, Nov 28th at 3:39 PM

🇪🇸 Spanish traduction:

save as "es-es.json" in %SYSTEMDRIVE%\Users\%USERNAME%\AppData\Roaming\VintagestoryData\Mods\animalcages_v2.0.6\assets\animalcages\lang

pastebin.com/7eS5cfzS

💬 Gerste, Nov 1st at 7:11 PM

It goes in a backpack slot Akzombie

💬 Akzombie, Nov 1st at 5:02 PM

if you drop cage with bighorn ram and ewe you cant pick it up

 

💬 McLenwe, Sep 25th at 3:28 PM

From my testing the mod still seem to work in 1.17.4. Only the bears and gazelle can´t be caged out of the box and have to be added via the mod config file.

💬 Hugues_de_Payns, Sep 19th at 1:02 PM

Hello! On game version 1.17.3 Animals are not caught in cages.
In v2.0.6 on game version 1.16x, if you catch a wolf of a certain color and then release it, then its color becomes standard.
If you have time to fix it please.

💬 DanteTorn, Sep 18th at 6:57 AM

I can confirm that this mod is functioning in 1.17.3.

💬 Amigurumi, Mar 19th at 6:47 PM

Typo, I meant 1.1.8. Removing the lambs from small didn't resolve it. I tried making them larger and that seemed to work, but smaller like I have for elephants, not so much.

💬 Minni6in, Mar 17th at 5:35 AM

@ Amigurumi   I just tested it on a baby alpaca and it changed size when I set it to be really big, idk where your conflict is coming from, you do have alpaca lamb in both small and medium cages though, I removed it from the small cage and was using it in the medium

edit : also you've stated you are using Creatures & Critters 1.0.8 but alpacas weren't added until 1.1.6 so now I'm even more confused

💬 Amigurumi, Mar 17th at 12:19 AM

The scale attribute does not seem to be affecting the Critters and Creatures mobs. Not sure which mod that would count as a bug on. @Gerste @Minni6in (below is the config I'm currently using with Animal Cages v2.0.6 and Critters and Creatures v1.0.8)

```

{
"smallCatchableEntities": [
{
"name": "alpaca-lamb",
"scale": 0.4
},
{
"name": "aurochs-lamb",
"scale": 1.0
},
{
"name": "bullfrog",
"scale": 1.0
},
{
"name": "capercaillie-chick",
"scale": 1.0
},
{
"name": "capercaillie-cock",
"scale": 1.0
},
{
"name": "capercaillie-cockpoult",
"scale": 1.0
},
{
"name": "capercaillie-hen",
"scale": 1.0
},
{
"name": "capercaillie-henpoult",
"scale": 1.0
},
{
"name": "cassowary-chick",
"scale": 1.0
},
{
"name": "cassowary-youngling",
"scale": 0.8
},
{
"name": "cat-female",
"scale": 1.0
},
{
"name": "cat-male",
"scale": 1.0
},
{
"name": "chicken-baby",
"scale": 1.0
},
{
"name": "chicken-hen",
"scale": 1.0
},
{
"name": "chicken-henpoult",
"scale": 1.0
},
{
"name": "chicken-rooster",
"scale": 1.0
},
{
"name": "chicken-roosterpoult",
"scale": 1.0
},
{
"name": "deer-fawn",
"scale": 0.85
},
{
"name": "foal",
"scale": 0.85
},
{
"name": "fox-pup-forest",
"scale": 0.85
},
{
"name": "fox-pup-arctic",
"scale": 0.85
},
{
"name": "fox-male",
"scale": 0.9
},
{
"name": "fox-female",
"scale": 0.9
},
{
"name": "fox-arctic-male",
"scale": 0.9
},
{
"name": "fox-arctic-female",
"scale": 0.9
},
{
"name": "gecko",
"scale": 1.0
},
{
"name": "gemsbok-calf",
"scale": 0.8
},
{
"name": "goldenpheasant-chick",
"scale": 1.0
},
{
"name": "goldenpheasant-cock",
"scale": 1.0
},
{
"name": "goldenpheasant-cockpoult",
"scale": 1.0
},
{
"name": "goldenpheasant-hen",
"scale": 1.0
},
{
"name": "goldenpheasant-henpoult",
"scale": 1.0
},
{
"name": "hamster-baby",
"scale": 1.0
},
{
"name": "hamster-female",
"scale": 1.0
},
{
"name": "hamster-male",
"scale": 1.0
},
{
"name": "hare-baby",
"scale": 1.0
},
{
"name": "hare-female-arctic",
"scale": 1.0
},
{
"name": "hare-female-ashgrey",
"scale": 1.0
},
{
"name": "hare-female-darkbrown",
"scale": 1.0
},
{
"name": "hare-female-desert",
"scale": 1.0
},
{
"name": "hare-female-gold",
"scale": 1.0
},
{
"name": "hare-female-lightbrown",
"scale": 1.0
},
{
"name": "hare-female-lightgrey",
"scale": 1.0
},
{
"name": "hare-female-silver",
"scale": 1.0
},
{
"name": "hare-female-smokegrey",
"scale": 1.0
},
{
"name": "hare-male-arctic",
"scale": 1.0
},
{
"name": "hare-male-ashgrey",
"scale": 1.0
},
{
"name": "hare-male-darkbrown",
"scale": 1.0
},
{
"name": "hare-male-desert",
"scale": 1.0
},
{
"name": "hare-male-gold",
"scale": 1.0
},
{
"name": "hare-male-lightbrown",
"scale": 1.0
},
{
"name": "hare-male-lightgrey",
"scale": 1.0
},
{
"name": "hare-male-silver",
"scale": 1.0
},
{
"name": "hare-male-smokegrey",
"scale": 1.0
},
{
"name": "hyena-pup",
"scale": 1.0
},
{
"name": "kiwi-baby",
"scale": 1.0
},
{
"name": "kiwi-hen",
"scale": 1.0
},
{
"name": "kiwi-henpoult",
"scale": 1.0
},
{
"name": "kiwi-rooster",
"scale": 1.0
},
{
"name": "kiwi-roosterpoult",
"scale": 1.0
},
{
"name": "pheasant-chick",
"scale": 1.0
},
{
"name": "pheasant-cock",
"scale": 1.0
},
{
"name": "pheasant-cockpoult",
"scale": 1.0
},
{
"name": "pheasant-hen",
"scale": 1.0
},
{
"name": "pheasant-henpoult",
"scale": 1.0
},
{
"name": "pig-wild-piglet",
"scale": 1.0
},
{
"name": "puma-cub",
"scale": 1.0
},
{
"name": "raccoon-male",
"scale": 1.0
},
{
"name": "raccoon-female",
"scale": 1.0
},
{
"name": "salamander",
"scale": 1.0
},
{
"name": "squirrel-baby",
"scale": 1.0
},
{
"name": "squirrel-female",
"scale": 1.0
},
{
"name": "squirrel-male",
"scale": 1.0
},
{
"name": "sheep-bighorn-lamb",
"scale": 0.85
},
{
"name": "tiger-cub",
"scale": 1.0
},
{
"name": "toad",
"scale": 1.0
},
{
"name": "tortoise-baby",
"scale": 0.25
},
{
"name": "tortoise-female",
"scale": 1.0
},
{
"name": "tortoise-male",
"scale": 1.0
},
{
"name": "wolf-pup",
"scale": 1.0
}
],
"mediumCatchableEntities": [
{
"name": "alpaca-female",
"scale": 0.65
},
{
"name": "alpacapackanimal-female",
"scale": 0.65
},
{
"name": "alpaca-male",
"scale": 0.65
},
{
"name": "alpacapackanimal-male",
"scale": 0.65
},
{
"name": "alpaca-lamb",
"scale": 0.65
},
{
"name": "alpacapackanimal-lamb",
"scale": 0.65
},
{
"name": "aurochs-female",
"scale": 0.75
},
{
"name": "aurochs-male",
"scale": 0.75
},
{
"name": "cassowary-female",
"scale": 0.75
},
{
"name": "cassowary-male",
"scale": 0.75
},
{
"name": "crocodile",
"scale": 0.45
},
{
"name": "deer-female",
"scale": 0.9
},
{
"name": "deer-male",
"scale": 0.8
},
{
"name": "elephant-baby",
"scale": 0.75
},
{
"name": "elephant-female",
"scale": 0.25
},
{
"name": "elephant-male",
"scale": 0.25
},
{
"name": "gemsbok-female",
"scale": 0.75
},
{
"name": "gemsbok-male",
"scale": 0.75
},
{
"name": "hippo-female",
"scale": 0.5
},
{
"name": "hippo-baby",
"scale": 0.25
},
{
"name": "hippo-male",
"scale": 0.5
},
{
"name": "horse-foal",
"scale": 0.5
},
{
"name": "horse-female",
"scale": 0.5
},
{
"name": "horse-male",
"scale": 0.5
},
{
"name": "hyena-male",
"scale": 0.9
},
{
"name": "hyena-female",
"scale": 0.9
},
{
"name": "komododragon",
"scale": 0.75
},
{
"name": "pig-wild-male",
"scale": 1.0
},
{
"name": "pig-wild-female",
"scale": 1.0
},
{
"name": "puma-female",
"scale": 0.75
},
{
"name": "puma-male",
"scale": 0.75
},
{
"name": "tiger-female",
"scale": 0.65
},
{
"name": "tiger-cub",
"scale": 0.65
},
{
"name": "tiger-male",
"scale": 0.65
},
{
"name": "sheep-bighorn-male",
"scale": 0.9
},
{
"name": "sheep-bighorn-female",
"scale": 1.0
},
{
"name": "wolf-male",
"scale": 0.9
},
{
"name": "wolf-female",
"scale": 0.9
},
{
"name": "white-hart",
"scale": 0.8
}
],
"woundedMultiplicator": 5
}

```

💬 Timber4Life, Feb 16th at 11:36 AM

Using v2.0.6 and once ive captured a animal, if i drop the cage with an animal in it, i cannot pick it up again. Can only pick up cages, not cages with animal inside. Hope you can fix this soon. TY. Keep up the great work. Great mod otherwise.

💬 Lumber, Feb 12th at 4:52 AM

If a cage is in a backpack slot, use the standard game mechanic of ctrl+mouse wheel to select it. This lets you pick your backpack slots like any other hotbar item. Then just click the ground to place it. RustyKnight

💬 Cendar, Jan 19th at 4:27 AM

Hi! I made a french translation for your mod, feel free to add it if you want. 😊

fr.json - Animal cages 2.0.5

💬 RustyKnight, Jan 10th at 10:44 PM

Either putting the fact it'd have to be used as a backpack in the description of the cage, or changing it would probably be for the best- either way works, we just had no idea that it was a backpack slot item.

The only problem I foresee with it being a back item is that you can't place it down like the other cages while you're preparing other things for the animals- like a barn, field, or just getting a stock of animal feed in general first.  I also have no idea how we'd release the animal from the cage on our back either, though that might just be me forgetting a mechanic that is very seldon used if at all.  If you were to solve those issues or enlighten the player to the mechanics to use the larger cage (maybe in the handbook), it'd probably be alright as a back slot item.  Gerste

💬 Gerste, Jan 9th at 2:42 PM

I initially wanted to make the medium cage have a havier feel to it, so I thought it schould be placed inside of a backpack slot if an animal is trapped inside.

However maybe I should remove that system because it seems to be confusing and unintuitive? RustyKnight

💬 RustyKnight, Jan 9th at 1:04 AM

My friend trapped a bull in a copper cage, but when he went to change where it was in his inventory he couldn't put it back down- when he closed his inventory it dropped on the ground, and while we can see the cage, we can't pick it up (either of us).  Not sure sure why, and it isn't crashing us or anything, so there's no error report.

edit: happened again, this time with a ewe.  Seems like it happens in general with the medium animal cage.

💬 WickedSchnitzel, Oct 8th 2021 at 6:15 PM

Could you add an option to define for each animal if it has to be hurt to be able to catch it? Because i dont think that players would like to beat up their private dogs until they are able to pick them up in order to replace them. :) Gerste

💬 melodelic, Oct 8th 2021 at 4:23 PM

Yeah, the chickens are running away from me so I'll try to catch it while not moving.

💬 Gerste, Oct 8th 2021 at 1:12 PM

The first time this issue arised I had a conversation with Fulgen in the VintageStory discord, he told about how to use the different mod paths.

I uploaded a new precompiled version to hopefully fix this as i can not reproduce the error. If the issue persists, feel free to contact me on discord WickedSchnitzel

💬 WickedSchnitzel, Oct 8th 2021 at 12:40 PM

I am running a server for one and a half years and always dropped our mods into VintageStory/Mods and we never had any problems. So far i thought the VintageStoryData folder is for singleplayer servers. Gerste

💬 Gerste, Oct 8th 2021 at 7:33 AM

Domesticated means the animal has a generation greater than zero, so yes, you should be able to catch your pigs with generation 1 or greater without nearly killing them.

Are your chicken standing still or running around while you are trying to catch them? When the chicken are moving, sometimes the server does not calculate a hit while the client does (so you need to consistently bash it until the server registers a hit).
If the chicken are standing still, please look inside the logs, if you can find any error-messages regarding cages. You can find the logs under /VintagestoryData/logs.

💬 melodelic, Oct 7th 2021 at 11:17 PM

I've got two questions on how the cage works. The first is if wondering what "Animal can only be catched, if it is either a small animal, a domesticated animal or has less then one third hp"? means for large cages (and if that means I can make my gen 1+ pigs or sheep go in them without beating them to almost death). And the second is why I can't cage my gen 1 chickens into a small cage?
💬 Gerste, Oct 7th 2021 at 8:04 PM

Do you keep your Mods in /VintageStory/Mods or /VintageStoryData/Mods?
Please make sure your Mods are placed in VintageStoryData/Mods as /VintageStory/Mods is only for the base game mods.

If this doesnt work, you can try this workaround right here.

I hope I get to releasing a precompiled version soon as I heard this might make things more stable.

💬 WickedSchnitzel, Oct 6th 2021 at 4:57 PM

If i try to catch one of my modded pets (dog, cat etc) i'll get disconnected from the server with the following error message:

18:53:41 [Server Error] System.IO.FileNotFoundException: Could not load file or assembly 'VSEssentials, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'VSEssentials, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
   at Animalcages.BlockMediumCage.isCatchable(Entity attackedEntity)
   at Animalcages.BlockCage.OnAttackingWith(IWorldAccessor world, Entity byEntity, Entity attackedEntity, ItemSlot itemslot) in Data\Cache\unpack\animalcages_v2.0.2.zip_ff3664438b4f\src\blockcage.cs:line 38
   at Vintagestory.API.Common.EntityAgent.OnInteract(EntityAgent byEntity, ItemSlot slot, Vec3d hitPosition, EnumInteractMode mode)
   at Vintagestory.Server.ServerSystemEntitySimulation.HandleEntityInteraction(_pZfqca2BJhMktch0CcWjLhsEFXc packet, ConnectedClient client)
   at Vintagestory.Server.ServerMain.ProcessNetMessage(NetIncomingMessage msg, NetServer mainSocket)

I have already included them in the config file of your mod.
💬 Gerste, Oct 2nd 2021 at 1:16 PM

You can find all trader files in your game folder under \assets\survival\entities\humanoid.
Then you need to open each of the files and copy the text labeled "code" into the modconfig as shown in the tutorial.

If you run into any problems, feel free to hit me up on discord: G3rste#1850

💬 Malfiros, Oct 2nd 2021 at 12:38 PM

Whenever I edit the config file, it reverts back to the original file after loading the game. What am I doing wrong?

UPDATE: I was forgetting to put a comma after the last creature before adding any new ones.

What would you do if you wanted to be able to capture ALL traders? Would you have to list each type individually? If so, what are each of those entity names?

UPDATE: Thanks for your help! I've configured the file to my liking now. Great mod, thanks again!

💬 Gerste, Sep 8th 2021 at 11:21 PM

I added a short tutorial on how to configure the mod.
I have tested around with some creatures. Mechanoids are not supported but drifters, traders and modded creatures should work fine.

Hope this helps :)

💬 Braleth, Sep 6th 2021 at 3:21 PM

Neither of the posted versions contain a sample config file. Can you post a completed animalcagesconfig.json config file. The source code for the CageConfig class lists various animals, but would like to see what options you made availble via the config file.

💬 Juliusvanvern, Sep 2nd 2021 at 10:40 AM

Would you like to know how you use it, whatch mei Video (german): 
https://www.youtube.com/watch?v=6XE5DUprSSA

Thanks for the Mod 😀

💬 Gerste, Aug 25th 2021 at 9:15 PM

I have not played with XSkills myself. I know that Capture Animals by DArkHekRoMaNT implements something similar as well as Farm Life by jakecool19. I really liked the idea of DArkHekRoMaNT (in fact, i use the same method to capture the animal i learned by reading his code), but i wanted to try a more vanilla approach than his pokeball implementation.
Putting the animals in the already existing Cage Models just seemed right for me.

💬 animatiV, Aug 25th 2021 at 10:19 AM

Is something like this not included in the XSkills modification?

💬 Neerak, Aug 24th 2021 at 12:50 PM

I was just talking about needing a feature like this and bam!

(edit comment delete)