Rabbit's don't use Rabbit fur_pelt?

So I was trying to make my own version of a rabbit for my biome instead of the default one. I basically copied how Rayya’s Children change the red_fox into a fennec_fox. The problem arises when noticing that rabbit’s don’t use their own pelts. So when trying to replace it I’ve come across a few problems.

{
   "mixins": "stonehearth:mixins:resources:fur_pelt",
   "type": "entity",
   "components": {},
   "entity_data": {
      "stonehearth:net_worth": {
         "value_in_gold": 3,
         "rarity": "common",
         "shop_info": {
            "buyable": true,
            "sellable": true,
            "shopkeeper_level": 1,
            "shopkeeper_type": "caravan"
         }
      },
      "stonehearth:catalog": {
         "display_name": "i18n(stonehearth:entities.resources.pelt.rabbit_pelt.display_name)",
         "description": "i18n(stonehearth:entities.resources.pelt.rabbit_pelt.description)",
         "icon": "file(rabbit_pelt.png)"
      },
      "stonehearth:appeal": {
         "appeal": -2
      }
   }
}

I tried to simply mixinto rabbit_pelt.json with this:

{
   "components": {
      "model_variants": {
         "default": {
            "models": [
               "file(fur_pelt.qb)"
            ]
         }
      }
   }
}

At which point the game crashes whenever I spawn in my camp and the game tries to spawn in rabbits.

I’ve located the “stonehearth/mixins/resources/fur_pelt/fur_pelt.qb” in which the rabbits do use, and when trying to override it the way you would another animals pelt, the game crashes again.

It seems like the game really doesn’t want me to change rabbit pelts lol

The correct and easiest way is to override just the .qb file. (Unless you don’t want it to affect other items that use the same model, in that case you need to change the rabbit pelt json)

A mixinto with a new model will not replace the old one, it will be an addition to it, making the item have two models at the same time. Because the models are in an array, and arrays are always additive, instead of string and number that get replaced in a mixinto.

Your crash can be from a bugged model then. Try exporting it again.

1 Like

ACE does change most animal pelts for each biome without having to create new entities - just by using overrides as Bruno suggests.

But the method you use is also used to “fix” the Deer horn item. In vanilla, the Deer Horn comes with the fur model on top of it because it has a fur pelt mixin that makes both models (horn and fur) spawn at the same time. ACE fixes this by doing a mixintypes: override on the models component. So feel free to check both of these out as an example on how to do it :slight_smile:

1 Like

thanks! I seemed to have not unchecked compressed when exporting the .qb

Next Question: How do I limit which animals spawn naturally around the map? I assume once I know what to change I can add it to my biome manifest in order to only change them when playing in my biome. I just need to know what to look for. Please and thanks :smiley:

Animal spawns are actually controlled by the scenarios system.
Wild spawns are determined by a type of scenario called nest, each nest (for example, deer nest) contains a list of biomes in which that nest can spawn, like this:

"biomes": [
      "stonehearth:biome:arctic"
   ],

To control spawns on your biome, you can do one of these two things:

  1. Create your own nests - even if for repeated animals - but at least you have total control over other nest settings like the amount of animals, the area they’ll occupy, etc…
  2. Mix into the default nest files in the game and add your own biome. Since they’re arrays, you can easily add biomes without interfering with other mods that also change these - unless they override the array to remove a biome, for example.

You can find the scenarios (like nests) in the stonehearth/scenarios folder. Please note that for your scenarios to show up in the game, you also need to mix and add them inside the stonehearth/scenarios/scenarios_index.json file!

Also:
https://stonehearth.github.io/modding_guide/modding_guide/basic/static_scenarios/nests_ruins/index.html

1 Like

Goshfsjdfshhshfdhfdh

I always forget about how useful SH modding guide articles are (especially lately with all the additions/updates) and end up typing a lot when I could just post a link :sob: