Stardew Valley
warning Scheduled Downtime - On 3 August 2021 starting from 09:30 (GMT+1) until approximately 13:30 (GMT+1) our site and forums will be undergoing maintenance.
0 of 0

File information

Last updated

Original upload

Created by

elbe

Uploaded by

elbebeta

Virus scan

Safe to use

Tags for this mod

About this mod

Extends the animal produce system (aka, regular drops) to allow for a random selection from an arbitrarily sized weighted list, plus optional bonus drop.

Requirements
Permissions and credits
Changelogs
Look who's back with another in their line of unasked for animal mods!

Today I've got my most ambitious undertaking to date: a mod to allow regular animal drops (not truffles, that's different code apparently and I haven't gone into it yet) to be expanded to an arbitrary size! What does this add? Umm, I guess you could put feathers or rare eggs into the chicken drop lists or something. Maybe seeds, that feels like something a chicken would have.

Config example!
{
  "AnimalDrops": [
    {
      "Animal": "White Chicken",  // Name of animal
      "Drops": [
        {
          "Item": "176",          // Item number or name
          "Weight": 10.0          // Weight given to this drop in the collection
        },{
          "Item": "174",
          "Weight": 2.0
        }],
      "ChanceForExtraDrops": 0.2, // value between 0 (no chance) and 1 (100% chance)
      "ExtraDrops": [             // if ChanceForExtraDrops is > 0 and this list is empty it will pick from Drops
        {
          "Item": "Blue Egg",
          "Weight": 10.0
        }]}]}
You put the name of the animal and a list of weighted drops you'd like to see in game. If you aren't familiar with them, a weighted list gives each item "weight" into being chosen. In the example above a regular egg has a weight of 10 while a large egg has a weight of 2, so you have around a 5 in 6 chance of getting a regular egg there. You can put whatever you want, number wise, but you probably shouldn't go crazy: having one item at weight 1000000000 and another at 0.0000001 is valid but come on.

After that we have the ChanceForExtraDrops value. That's a percentage chance of a second drop occurring, you can put any number between 0 and 1.0, if it's larger than that it'd just still treat it as 1.0.

And then we have the ExtraDrops collection that works exactly the same as the Drops collection, but you can put rarer items in their if you want. If ExtraDrops is empty but the ChanceForExtraDrops is > 0 it'll choose the second drop form the Drops list.

I'm considering this a beta right now. Getting it to work with the base game wasn't hard but working around BFAV just made things difficult. If you want to try it out, with or without BFAV, please send me bug reports if you find anything wrong.

Mechanically, in vanilla, it sets the default drop to whatever it rolled up and the deluxe drop to -1 and then allows the base code to handle it's conditions and item placement. BFAV ended up requiring me to just overrule BFAV's own drop logic - and I wasn't going to update BFAV again just for my benefit. I have found you may not always reliably get the bonus drop if you don't have a grabber as the game probably tried to put it somewhere it couldn't, so the more animals you have the more likely the floor will get filled.

It's far from perfect but sometimes other people trying things out can find problems you never saw or even thought to try. If you're interested give it a try.

Source is in the source hole
Or you can start an army of large birds or tell Marnie you don't want her damn cows or, you know, whatever.

My next plans don't involve animals. I'll probably fall flat on my face trying.