Skip to content

andraemon/SlimeProduce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slime Produce Mod

Slime Produce Mod repository.

Thanks to Pathoschild for their amazing Stardew Valley modding framework, SMAPI!

Enjoy!

Overview

This mod adds customizable color-based drops to slime balls, as well as changing the color of the balls themselves to reflect this. Whenever a slime ball spawns in the world, it will be assigned a randomly chosen slime in the same location. When broken, it will drop items based on the characteristics of the chosen slime. By default, these items are essentially the same as the color-specific drops for slimes in vanilla.

Config File Entries

Slime ball drops are fully customizable (though they will always drop slime and have a chance to drop petrified slime). The fields in the config files are as follows:

  • EnableSpecialColorDrops (default false) - When enabled, this allows slime balls with colors corresponding to one of the dye colors to drop a random item from the list of items which share that dye color. This may or may not be balanced, so it's disabled by default, but I considered it a fun enough feature to keep it.

  • SpecialColorMinDrop (default 1) - This is an integer which represents the minimum number of colored items which have the chance to drop if EnableSpecialColorDrops is true. As always, please exercise caution with extremely large values. This value is inclusive.

  • SpecialColorMaxDrop (default 1) - Same as above, but this is the maximum number of items that can drop. This value is inclusive.

  • SpecialColorDropChance (default 0.05) - The chance a colored item will drop if EnableSpecialColorDrops is true. This should be a value between 0 and 1 inclusive.

Drop Tables

The final entry in the configuration file is a list of drop tables. Each drop table has three fields: Expression, ItemDrops, and Exclusive.

The Expression field contains a string representing a boolean expression which a slime ball may or may not satisfy. For example, the expression "R > 230 AND G > 230 AND B > 230 AND R % 2 = 1" will be satisfied only by a slime ball whose associated slime has a color whose red, green, and blue components are all strictly greater than 230, and whose red component is odd. The syntax of expressions is covered in more detail here. The Slime Produce-specific variables which can be used in expressions are

  • R - An integer representing the red component of a slime's color.
  • G - An integer representing the green component of a slime's color.
  • B - An integer representing the blue component of a slime's color.
  • Tiger - A boolean representing whether a slime is a tiger slime.
  • Prismatic - A boolean representing whether a slime is a prismatic slime. As far as I know, it's impossible to get prismatic slimes in the Slime Hutch in vanilla, so this is probably useless if you don't have a mod which allows that.
  • Cute - A boolean representing whether a slime is Cute. Of course, we all know that every slime is cute, but what Cuteness actually determines in the game's code is whether or not a slime has a pom-pom above its head. Cuteness is determined randomly at birth, and about 49% of slimes are Cute.
  • FirstGeneration - A boolean representing whether a slime was hatched from an egg (in which case it's a first-generation slime) or bred from existing slimes (in which case it's not).
  • SpecialNumber - An integer ranging from 0 to 99, which is randomly assigned to a slime when it spawns.
  • Name - A string representing a slime's name.

The ItemDrops field is a list of objects, each of which contains four values: QualifiedItemId, MinDrop, MaxDrop, and DropChance. The QualifiedItemId represents the item ID of the item dropped, as enumerated here. The MinDrop and MaxDrop represent the minimum and maximum number of this item which can drop. The DropChance is a number between 0 and 1 which represents the chance the specified item will drop at all.

When a slime ball is broken, it will go through each drop table in the config file one by one in order. For each drop table, it checks if it satisfies the associated expression. If so, the associated item drops will be added to the list of attempted drops. If the Exclusive field is set to True, then it will stop looking through the list of drop tables and immediately proceed to drop its items; otherwise, it will keep going.

Default Drops

Below are the default drops for each color of slime, in order of priority. All are mutually exclusive; for example, a slime ball whose red, green, and blue components are all greater than 230 will never drop any stone, because the white slime drop tables come before the grey slime drop table in the config file, and the final white slime drop table is marked as exclusive.

  • Tiger Slime Drops

    • 15-25 Sap
    • 1-2 Jade
    • 4-8 Ginger (65%)
    • 5-10 Cinder Shards (50%, first-generation only)
    • 1-2 Magma Caps (33%, first-generation only)
    • 1-2 Dragon Teeth (33%, first-generation only)
  • Brown Slime Drops (49 < R < 101, 24 < G < 51, B < 26)

    • 30-60 Wood
    • 5-10 Hardwood
  • Black Slime Drops (R,G,B < 80)

    • 5-10 Coal
    • 1-2 Neptunite (5%)
    • 1-2 Bixite (5%)
  • Yellow Slime Drops (R > 200, Green > 180, Blue < 50)

    • 10-20 Gold Ore
  • Red Slime Drops (R > 220, 150 > G > 90, B < 50)

    • 10-20 Copper Ore
  • White Slime Drops (R,G,B > 230)

    • 2-4 Refined Quartz (only if R is odd)
    • 2-4 Refined Quartz (only if G is odd)
    • 10-20 Iron Ore (only if both R and G are even)
    • 1-2 Diamonds (only if R,G,B are all even OR R,G,B are all 255)
  • Grey Slime Drops (R,G,B > 150)

    • 20-40 Stone
  • Purple Slime Drops (R > 150, G < 50, B > 180)

    • 5-10 Iridium Ore (only if special number is divisible by 4 (if first-generation) or is even (otherwise))
    • 1 Iridium Bar (7.2%, only if first-generation and special number satisfies condition above)

Contact

Please feel free to contact me here or on Discord (@exotico) to make requests, suggest balance changes/improvements, or report any issues you may have!

About

A Stardew Valley mod which makes slime balls drop unique resources based on the color of slimes in the hutch, according to the color-specific slime drops in vanilla.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages