
Description
<p>Shared library for <a href="https://mods.vintagestory.at/crbutterflies"><span style="color: #3598db; --darkreader-inline-color: var(--darkreader-text-3598db, #46a1de);" data-darkreader-inline-color="">Catch and Release: Butterflies</span></a> and <span style="color: #3598db; --darkreader-inline-color: var(--darkreader-text-3598db, #46a1de);" data-darkreader-inline-color=""><a style="color: #3598db; --darkreader-inline-color: var(--darkreader-text-3598db, #46a1de);" href="https://mods.vintagestory.at/crfish" data-darkreader-inline-color="">Catch and Release: Fish</a></span>.</p> <p>Contains common code for "cages" and storing creatures within those cages.</p> <p><img src="https://moddbcdn.vintagestory.at/Display_aa0c42d43a5f1f06c5117fb956a2884d.png" alt="image" width="378" height="208"> <img src="https://moddbcdn.vintagestory.at/2026-07-05_11-12-08_c8f60ac520577a5a86bed2c78727543b.png" alt="" width="400" height="207"></p> <p> </p> <p><a href="https://ko-fi.com/mortalitygames"><img src="https://i.ibb.co/mFtHctqV/Kofi-Banner.png" alt="" width="301" height="139"></a></p> <p> </p> <hr style="size: 5px;"> <h2><span style="color: #e03e2d;" data-darkreader-inline-color="">Below is for modders who want to extend the mod or create their own caged creatures</span></h2> <p> </p> <p><strong>TODO:</strong> Documentation on API. If anyone is interested in using this for further mods, come and discuss in <a href="https://discord.com/channels/302152934249070593/1476930968085463122"><em>Catch and Release post in the VS Discord.</em></a></p> <h2>Example how to setup new cages:</h2> <ol start="1"> <li>Create shape + animations for caged creature entities</li> <li>Entity definition for caged creature(s). Including:</li> </ol> <div class="spoiler"> <div class="spoiler-toggle">Caged creature behaviour snipped</div> <div class="spoiler-text">behaviors: [<br> {<br> code: "taskai",<br> aitasks: [{<br> code: "crlib.CreatureCaged",<br> priority: 0,<br> movespeed: 0.6, <- How fast caged creature moves<br> turnspeed: 2.5, <- How fast caged creature turns to target position<br> moveAnim: "fly", <- Name of animation for when moving<br> restAnim: "feed", <- Name of animation for when sleeping<br> restTime: "Day", <- Creature sleeps during "Day" "Night" or "None" (to not rest)<br> restDaylightLevel: 0.7, <- Daylight amount to trigger sleeping (basically, time of day)<br> groundOnRest: true <- When resting, does the creature find the ground first<br> }]<br> }<br>]</div> </div> <ol start="3"> <li>Shape for your cage(s) (plus textures if needed)</li> <li>Custom cage block(s). Including:</li> </ol> <div class="spoiler"> <div class="spoiler-toggle">Cage config attribute</div> <div class="spoiler-text">attributes: {<br> cageConfig: {<br> cageName: "crbutterfly:cage_name", <- Just some display test when refering to this type of cage<br> fits: 4, <- How many creatures fit in the cage<br> radius: 0.3, <- Size of the cage (for the purpose of determining creatures walking around)<br> height: 0.5, <- Height of the cage (for the purpose of flying creatures - 0 for walking creatures)<br> bottom: 0.05, <- Offset the 'floor' of the cage<br> validItems: "game:creature-butterfly-*", <- What creature items can be placed in the cage<br> dropsEntity: "game:butterfly-", <- What creature items fall out of a broken cage<br> spawnEntity: "crbutterfly:cagedbutterfly-", <- What creature entities 'wander' in the cage<br> displays: 1 <- How many items to display in a cage<br> },<br>}</div> </div> <ol start="5"> <li>Recipe(s) for cage(s)</li></ol>
Ratings & reviews
Sign in to leave a rating or comment.
