Jump to content

Capture Animals


DArkHekRoMaNT

Recommended Posts

For those who are tired of driving hens or sheep for thousands of blocks 😄

Cage case can be crafted on an anvil using all tool materials, to turn it into an empty cage, add resin. By default, it captures with a 10 to 25% chance. If you hit and could not capture, then the cage will be downgrade to case, or it will break with a 50-5% chance. The chance depends on the material and is written in the cage tooltip.

You can increase the cage capture chance in two ways:

  1. Decrease the health of the mob. This will give +1% chance for every -2% of the mob's health (50% efficiency). 
  2. Use bait. By default, these types of baits are available in the mod, but you can change, add (or patch with your mod) in config/baits.json, the rest of the cages settings are in the itemtypes/cage.json attributes.

The first and second methods can be used together. 

Default baits:

  • All chicken: any grain, capture chance: 100%
  • All rabbits: carrot, capture chance: 100%
  • All pigs: turnip, capture chance: 50%
  • All sheep: cabbage, capture chance: 50%
  • All foxes: raw poultry, capture chance: 25%
  • All wolf: raw redmeat, capture chance: 25%
     

Below 2.0.0:

Spoiler

After that, you can find some animal and catch it (chance to catch 10% or less than 10% hp). When you throw a cage into an animal, it can be captured. But if you luck is not on your side, the cage may break with an 25% chance when it enters an animal and it didn't captured. If hp of the animal is below the limit - 100% chance of capture. You can free the animal if you drop the cage again (consumed). Also, to increase the chance of catching an animal, you can add bait to the cage. By default, the following baits are available:

       - All chicken: any grain, chance: 100%, min health: 100%
       - All rabbits: carrot, chance: 100%, min health: 100%
       - All pigs: turnip, chance: 50%, min health: 50%
       - All sheep: cabbage, chance: 50%, min health: 25%
       - All foxes: raw poultry, chance: 25%, min health: 25%
       - All wolf: raw redmeat, chance: 25%, min health: 25%

To add bait, simply craft it with cage. Unfortunately, at the moment the manual does not show recipes if the result of the recipe is an item with custom attributes. But you can see the available lures in the "Used for" of any cage.

Spoiler

image.thumb.png.13c53e69bbe7bca749d6fdf33940c8c0.png  image.thumb.png.9c02c61b517b93ee41f3f5e3818fecd3.png

manual.png.aff22ade60a76037379550871ab7a259.png

Mods compatibility:

Spoiler

To add the bait for a new animal, you need to add something like this to the entity (class: EntityAgent) attributes:

captureanimals: { type: "item", code: "game:grains-*", chance: 0.75, minhealth: 0.5 }

WARNING! At the moment, adding an bait to the animal with the same code and OTHER chance and minhealth will be ignored, because will cause a duplicate recipe name error. Maybe I will fix it, but I have to rework the display on the cage.

 

Download: ModDB or GitHub

 

Edited by DArkHekRoMaNT
  • Like 7
  • Thanks 1
Link to comment
Share on other sites

Pretty cool, thanks for sharing. I'll try it out!

Idea make having a lure based on the type of animal you want increase chance of getting it? Just idea. Meat for wolf, grains for pigs and chickens, dry grass for sheep, honey or fruits for racoon then you can get them trapped with 50% hp perhaps?

  • Like 1
Link to comment
Share on other sites

6 minutes ago, Aledark said:

Pretty cool, thanks for sharing. I'll try it out!

Idea make having a lure based on the type of animal you want increase chance of getting it? Just idea. Meat for wolf, grains for pigs and chickens, dry grass for sheep, honey or fruits for racoon then you can get them trapped with 50% hp perhaps?

Good idea, I’ll add different baits :)

Link to comment
Share on other sites

I'll try it out. Perhaps hit them with a special weapon that damages them but doesnt kill them too? Like a whip or some other kind to "tame" them...like getting a chicken to 25% hp with a good weapon might be hard and need to hit them with a stick? They have like what 3-4 hp?

Link to comment
Share on other sites

3 minutes ago, Aledark said:

I'll try it out. Perhaps hit them with a special weapon that damages them but doesnt kill them too? Like a whip or some other kind to "tame" them...like getting a chicken to 25% hp with a good weapon might be hard and need to hit them with a stick? They have like what 3-4 hp?

For such weak animals, an additional threshold of less than 3 hp is set now.  In new versions, specialized cages will catch "runaway" animals with any hp.

  • Like 1
Link to comment
Share on other sites

Release v1.1
  - Added baits
  - Added baits recipes registration system based on animal attributes (EntityAgent)
  - The size of the Cage entity has been reduced, and the shelvable attribute has been added so that cages can be placed on the shelf (but size is still a problem)
  - Added hover info on cage
  - Cage now do not break when hit in the wall. This error was due to the use of part of the code from EntityTrownStone, Cage’s flight mechanics will be rewritten, as now it is flying weird... as stone :)
  - Cage now have a chance to break if an attempt to catch an animal is unsuccessful ("breakchance" in cage attributes, default - 25%)
  - Animals are now always caught with some "chance" (default without bait: 10%)
  - Animals are caught 100% if their health percentage is lower than "minhealth"  (default without bait: 10%)
  - Patched vanilla animals to add baits:
       - All chicken: any grain, chance: 100%, min health: 100%
       - All rabbits: carrot, chance: 100%, min health: 100%
       - All pigs: turnip, chance: 75%, min health: 50%
       - All sheep: cabbage, chance: 75%, min health: 50%
       - All foxes: raw poultry, chance: 50%, min health: 50%
       - All wolf: any grain, chance: 50%, min health: 50%

Known Issues:
  - You can't add baits with the same code and different chance and minhealth
  - In the manual you can’t see the recipe for the cell with the bait, because it has custom attributes, but the recipe exists and can be seen through its ingredients

Edited by DArkHekRoMaNT
Link to comment
Share on other sites

  • 1 month later...
1 hour ago, Susanne Dembowski said:
 

Please update for the 1.13 version.
Many thanks

Have you tried running on 1.13?  I do not have the opportunity to update mods yet, but this is not Minecraft, theopetically, it can work on 1.13.

If you have errors at startup, write here or in the Issue on GitHub, this will simplify (and speed up) porting.

Link to comment
Share on other sites

  • 1 month later...
14 minutes ago, Tanisha Buchholz said:

Tried on the newest version of VS, this mod interferes with the knapping recipes; The knapping window box shows up, but there's no listed options to choose from for the tool heads. (as far as I've tested it)

CaptureAnimals and TemporalMirror are currently not working on 1.13 (API changes need to be fixed).
Recently I had to switch from Linux to Window because of work. And unfortunately the whole IDE remained in Linux and there is actually no normal MonoDevelop for Windows. I want to switch to VSCode, but it takes time to set up which I don't have yet :(

Link to comment
Share on other sites

8 hours ago, Aidan Case said:

cant seem to find the cages after i installed the mod. it also says its for 1.11. any ideas?

Vintage Story version? On 1.13.4 this is tested and should work (as indicated in the mod file name). On VS 1.11 this 100% doesn't work with 1.13.4 version, but maybe 1.12.14 version can work.

If you have version 1.13.4, then try to enable Developer Mode and Error Reporter in the settings, as well as type the command /errorreporter 1 and reload the world. Does anything appear in the reporter window after entering into the world?

Link to comment
Share on other sites

2 hours ago, Stefano Da Giau said:

So the cage breaks if you release the animal? Why? They are way too fragile for the materials they're made of, and too expensive. An ingot lost for sure anyway either you catch the animal or not. That's not worth it..

Are you going to catch all the animals in the world? :D It is unlikely that you will need so many animals that 1 ingot per 1 animal is expensive (imo, it's too cheap, especially since the metal of the cage doesn't matter).

I also wrote the mod for a long time ago, maybe I removed it, but cages definitely dropped out before. 

But you can break an empty cage if you can't catch the animal.  The chance to catch and the chance to break are indicated in the description of the cage, you can also increase the chance of catching a certain animal if you use its bait

Link to comment
Share on other sites

On 10/18/2020 at 8:05 PM, DArkHekRoMaNT said:

Are you going to catch all the animals in the world? :D It is unlikely that you will need so many animals that 1 ingot per 1 animal is expensive (imo, it's too cheap, especially since the metal of the cage doesn't matter).

I also wrote the mod for a long time ago, maybe I removed it, but cages definitely dropped out before. 

But you can break an empty cage if you can't catch the animal.  The chance to catch and the chance to break are indicated in the description of the cage, you can also increase the chance of catching a certain animal if you use its bait

Well luckily I found a deep sinkhole crossing like 5 copper veins, so it just solved itself anyway :3

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.