Stardew Valley
0 of 0

File information

Last updated

Original upload

Created by

Digus

Uploaded by

Digus

Virus scan

Safe to use

About this mod

Framework to add custom rules for producing objects. Supports code and content pack interfaces.

Requirements
Permissions and credits
Translations
  • Portuguese
  • Polish
  • French
Changelogs
Donations
Objective:
To create a simple way to add new producing rules into the game.

Installation:

Change Log:

1.9.2
  • Fix to not consuming fairy dust item when using on machines.
  • Fix warnings when producing colored objects and torches.
  • Possible fix to improper sounds when automating.
1.9.1
  • Fix to animation not showing properly for textures with width different from vanilla's bigcraftable file.
1.9.0
  • Automate support for vanilla and content patcher machines without needing PFMAutomate
  • New property to enable of disable Fairy Dust on machines.
  • Support to hoppers
  • Fix to Fairy Dust not being applied to PFM machines after SV 1.6
  • Fix rules being loaded before the items.
  • Change to some warning messages so user don't report them as bugs.
  • Fix bug were items with 0 stack would be left in the inventory.
  • Multiple fixes to fuel consumption.
1.8.0
  • Updating mod to be compatible with Stardew Valley 1.6
  • Support to Qualified Item Ids on all identifiers.
  • New properties for producer qualified item ids and additional producers qualified item ids.
  • Adding support to honey as a preserved type.
  • Adding support to new PreserveTypes
  • Fix to price increment and multiply properties combined
Spoiler:  
Show
1.7.4
  • Fix to bouncing happening when not supposed to.
  • Fix to giving errors when machines had animations but the item supposed to be held diapered.
  • Upgrade to hamony 2 and Stardew Valley 1.5.5
  • Spanish i18n. (Thanks to bpsys)
1.7.3
  • Hungarian i18n. (Thanks to martin66789)
  • Fix to object not stacking properly when the output had a preserved type and the input also had a preservedParentIndex.
1.7.2
  • Fix incompatibility with the way translation worked before.
1.7.1
  • Fix to some output names not working properly when there is no i18n key for the name.
1.7.0
  • Animations can now be different based on the output inside the machine, identified by Name, Index or category.
  • Internationalization of output names aren't restricted to one per index anymore. Will only apply to new produced items.
  • New rule property to make the output index be replaced by the preserved parent index, so you can reverse produce items. (ex. fish from fish roe)
  • New properties to increment stats label on input and output. Status label can be any string and can be used with Mail Framework Mod.
  • New properties AdditionalProducerNames, to let rules and configs work for more than one producer name.
  • Korean i18n. (Thanks to wally232)
  • Turkish i18n. (Thanks to KeDili)
1.6.0
  • Outputs can now have restrictions for Input Stack. The required stack will be the value consumed.
  • New property compatible with Lookup Anything.
  • Fix bug when a "preserved item" parent index could not be found.
  • Fix to input stack not displaying correctly on Lookup Anything.
  • Japanese i18n. (Thanks to TwelveYO)
  • Chinese i18n. (Thanks to irischerish)

1.5.0
  • Outputs can now have restrictions for Mail and Events.
  • New API method to let SMAPI mods to load content packs directly. (Thanks to Amy Nagle)
  • Russian i18n. (Thanks to Dmitrey Kupcov)
  • New property on producer rules to let the creator define the log level that should be used to warn the player about rule conflicts.
  • New config.json file that let you change the default log level of conflict warns for all producer rules.
  • Season condition and requirement now uses the season of the location the machine is placed.
  • Performance improvement when hovering over machines, on certain occasions.
1.4.2
  • Fix to animations not working properly on Stardew Valley 1.5.
  • Fix to SubtractTimeOfDay property not working as intended.
  • Fix to light sources not starting when loading the first save.
  • Fix to animations not stopping if production was on hold because of a season, weather or time condition.
1.4.1
  • Fix to bee house to work indoors even when configured.
  • Deutsch i18n. (Thanks zirolive69)
1.4.0
  • Producers can now produce colored outputs. Like Aged Roes.
  • Color can be chosen based on input color, input dye color or a defined color in the output config.
  • Producer can now keep the input "parent" for the output. Like Salmon Roe become Aged Salmon Roe.
  • Output can now have restrictions based on input parent. Like Sturgeon Roe become Caviar and not Aged Sturgeon Roe.
  • Producers can now look for an near by object to affect name, price and parent. Like Honey is affected by flowers in the bee house.
  • Object looked for can be the harvest product of a crop in the field or garden pot, a fruit from a tree or an object inside a machine.
  • Producer light source can no be based on output color or dye color.
  • Light source color definition is now inverted to reflect the actual light color.
  • Stone name is now fixed to the proper index.
  • Better log messages when loading rules and configs.
  • Producer can now have animations when producing or when ready. (Needs version 1.6.2 of Json Asset or content patcher to load texture in sprite sheet)
  • Fix to producer config override property.
  • Fix to condition validation on vanilla machines.
  • Fix to AlwaysOn property on the light source config.
1.3.2
  • Fix to price multiplayer not being applied to the output.
  • Better random variety.
1.3.1
  • Fix to producer light always being lit.
  • New property to let the producer light always be lit.
1.3.0
  • Producer can now be set to no input start. (On placement or on day start)
  • Producer can now have a number of conditions for producing. (Time, Location, Weather and Season)
  • Producer can now configure a light source for while producing.
  • Producer can now disable the bouncing animation while producing.
  • Producer can now increase game stats on product removing per output.
  • Outputs can now have restrictions for producing. (Fuel, Location, Weather and Season)
  • Each output can now have different production time, overriding the default value for the rule.
  • Time to produce can be subtracted from time of the day.
  • Rules now need to state they can override a specific mod.
  • Mod files should now load despite case and system OS.
1.2.0
  • Modifications to support the new PFMAutomate.
  • Using PFMAutomate, the producer rules added with the framework will integrate with Automate mod.
1.1.0
  • New animation for Charcoal Kiln Smoke
  • New offset property to better position animations.
  • Property to add sounds with a delay.
  • Property to increment a game stats on input.
  • Support to the creation of Torches as output.
  • Fix to max stack working with one less amount than it should.
1.0.0
  • Initial release.
  • Support to content pack configuration.
  • Support to method calling configuration.
  • All basic vanilla rules implemented for production from input.

For Modders to use content pack:
  • There is a template inside the mod folder with commented instructions on what each property do.
  • The same object used for the content pack is used for the methods in the framework. There should be no difference between using the method or creating a content pack.
  • There is two files for configuration. One for the rules, and another for the new producers added. The rules file cover most things, but stuff like the sprite frame that should be shown when the machine is producing or ready, should be configured per machine, not per producing rule. Vanilla machines are configured by default, but it can be changed.
  • Here is the template for the custom rules as added in the mod file(ProducerRules.json):
Spoiler:  
Show
[
    { // All lines that have a default value can be removed and that value will be used.
        "ProducerName": "ProducerName", //Name of the producer to look for. It will match the first big craftable it finds. Will be ignored if ProducerQualifiedItemId is defined. It's a legacy property, you should use ProducerQualifiedItemId instead.
        "ProducerQualifiedItemId": "(BC)12", //The QualifiedItemId of the producer. It's required if no ProducerName is defined.
        "AdditionalProducerNames": [ "ProducerName2", "ProducerName3" ], //Additional names of the producer. The rule will be completely copied to the producer names in the list.
        "AdditionalProducerQualifiedItemId": [ "(BC)15", "(BC)16" ], //Additional qualified item ids of the producer. The rule will be completely copied to the producer qualified item ids in the list.
        "InputIdentifier": "fruit_tree_item", //The identifier of the input. Can be the Qualified Item Id, Index of the object, the category of the object if it's a negative value. Can be the name of the object, or a context_tag of the object. Can be null only if there is a NoInputStartMode for the producer. Default is null.
        "InputStack": 2, //The required stack of the input. Default value is 1.
        "ExcludeIdentifiers": [ "Peach" ], //List of identifiers to exclude from the rule. Follow the same rules for InputIdentifier. Default value is null.
        "FuelIdentifier": "Coal", //The identifier of the Fuel. Fuel is the extra item used when producing. Can be the Qualified Item Id, Index, the Name or the category of the object. Default is null.
        "FuelStack": 4, //The required stack of the Fuel. Only used if fuel is not null. Default is 1.
        "AdditionalFuel": {
            "-6": 2,
            "Coal": 1,
            "246": 5
        }, //Additional fuel if needed. You don't need to set a Fuel to use AdditionalFuel. The format is a pair of identifier and stack amount, following the same rules of the other fuel property. Default is null.
        "MinutesUntilReady": 120, //The amount of minutes it takes to produce. Stardew days have 1600 minutes. 1200 minutes from 6 am to 2am and 400 minutes from 2am to 6am. Should be divisible by 10. Required.
        "SubtractTimeOfDay": true, //If MinutesUntilReady should be subtracted by the current time of day. It always add 360 to the formula, since the day start at 6 am. So if you set MinutesUntilReady to 1600, it will always produce at 6 am of the next day. Never set to true if MinutesUntilReady is smaller than 1600.
        "OutputIdentifier": "Beer", //The identifier of the output. Can be the Qualified Item Id, Index or the Name of the object. Required.
        "OutputName": "{farmerName}'s {inputName} {outputName} from {farmName}", //The Name of the object. This will replace the basic output name. It accepts 4 tags that are dynamically replaced. Default is null.
        "OutputTranslationKey": "MyMod.MyOutput", //The translation key. This is the key in the i18n file where the mod will look for the format of the OutputName in other languages. The value of this key follows the same rules of the OutputName property above. Default is null.
        "OutputGenericParentName": "Wild", //The generic parent name is for when there is no parent name for the object that needs a parent, like Wild for Honey. Default is blank.
        "OutputGenericParentNameTranslationKey": "MyMod.MyOutput", //The translation key. This is the key in the i18n file where the mod will look for the OutputGenericParentName in other languages. Default is null.
        "PreserveType": "Wine", //[Wine|Jelly|Pickle|Juice|Roe|AgedRoe|Honey|Bait|DriedFruit|DriedMushroom|SmokedFish] - If the output is one of the vanilla game Preserves Type. Default is null. Using this will override the OutputName property.
        "KeepInputParentIndex": true, // When true the input of the preserved parent index will be used as the parent index of the output.
        "ReplaceWithInputParentIndex": true, // When true the input of the preserved parent index will be used as the output index.
        "InputPriceBased": true, //If the base price of the output should be replaced with the base price of the input. Default is false.
        "OutputPriceIncrement": 200, //Increment the base price by this amount. Default is 0.
        "OutputPriceMultiplier": 2.5, //Multiply the base price by this amount. Default is 1.
        "KeepInputQuality": false, //If the output should have the same quality as the input. Default is false.
        "OutputQuality": 2, //Set the output quality. Default is 0.
        "OutputStack": 2, //Set the output stack. Default is 1.
        "OutputMaxStack": 2, //Set the max output stack, if you want a random output stack. It'll be ignored if smaller than OutputStack. Default is 1.
        "SilverQualityInput": { //Define an alternative stack if they input is silver quality. Removing will ignore this since probability will be 0.
            "Probability": 0.2, //Probability to use the alternative stack. Default is 0.
            "OutputStack": 2, //Same as others.
            "OutputMaxStack": 4 //Same as others.
        },
        "GoldQualityInput": { //Define an alternative stack if they input is gold quality. Removing will ignore this since probability will be 0.
            "Probability": 0.4, //Same as others.
            "OutputStack": 3, //Same as others.
            "OutputMaxStack": 4 //Same as others.
        },
        "IridiumQualityInput": { //Define an alternative stack if they input is iridium quality. Removing will ignore this since probability will be 0.
            "Probability": 1, //Same as others.
            "OutputStack": 4, //Same as others.
            "OutputMaxStack": 4 //Same as others.
        },
        "OutputColorConfig": { // If set, the output will be a Colored Object. Remember that colored objects need the next sprite in the sheet to be a pallet for the color. Default is null.
            "Type": "DefinedColor", // [ObjectColor|ObjectDyeColor|DefinedColor] If ObjectColor and the input is a colored object, it will use the color of the input. If ObjectDyeColor and the input has a dye color, it will use this color. If DefinedColor or it does find the color on the other options, it will create the color based on the Red, Green and Blue values. Default is DefinedColor.
            "Red": 255, // The red value of the color. Default is 255.
            "Green": 255, // The green value of the color. Default is 255.
            "Blue": 255 // The blue value of the color. Default is 255.
        },
        "AdditionalOutputs": [ // Define a list of additional outputs. You don't need to set a default output to use the additional ones, the first additional output will be the default in that case. Only one output is given, randomly chosen between the options. Default is an empty list.
            {
                "OutputProbability": 0.2, //The absolute probability of getting that output, from 0 to 1. Default is 0. If 0 the remain percent not defined will be equally divided between all outputs with 0 probability. Probability are checked from the first to the last output, so with the total is bigger than 1, the remaining outputs will be ignored.
                "OutputIdentifier": "Apple", //This is required. Works the same as the OutputIdentifier described in the rule.
                "MinutesUntilReady": 100, //The amount of minutes it takes to produce this output. This will override the default MinutesUntilReady set in the rule. Should be divisible by 10.
                "RequiredInputQuality": [ 0, 1 ], // Required input quality for the output to be possible. Default is no required quality.
                "RequiredInputStack": 8, // Required input stack to be equal or greater to this value for the output to be possible. This amount will be consumed instead of InputStack value. It can be less than the InputStack value, but the player still need to have at least the value set on InputStack for the rule to be triggered. Default is no required stack.
                "RequiredFuel": { "Coal": 1 }, //Required fuel for the output to be possible. These fuels will be consumed in additional to the rule defined fuels. The format is a pair of identifier and stack amount, following the same rules of the other fuel property. Default is no required fuel.
                "RequiredSeason": [ "spring", "summer" ], // Required season for the output to be possible. Default is no required season.
                "RequiredWeather": [ "Sunny", "Windy" ], // [Sunny|Rainy|Stormy|Snowy|Windy] Required weather for the output to be possible. Default is no required weather.
                "RequiredLocation": [ "Cellar", "FarmCave" ], // Required location for the output to be possible. Default is no required location.
                "RequiredMail": [ "BackpackTip" ], // Required one of the mails to have been received by the player for the output to be possible. Default is no required mail.
                "RequiredEvent": [ 611439 ], // Required one of events to have been seen by the player for the output to be possible. Default is no required event.
                "RequiredOutdoors": true, // [true|false|null] If true, the output can only be produced outdoors. If false, the output can only be produced indoors. If the line is removed or the value is null, it there is no restriction.
                "RequiredInputParentIdentifier": [ "22", "-80" ] // Required input parent for the output to be possible. Parent is the item that originated the input.(ex. Salmon Roe has Salmon as parent) The identifier is compared with the input parent on this order: Index, Name, Category, Context_Tag.
                // All other properties that refer to the output can be used in the AdditionalOutputs. Remember to use commas to separate properties.
            }
        ],
        "Sounds": [ "furnace" ], //List of sound to make when an input is placed. Default is an empty list.
        "DelayedSounds": [ { "bubbles": 50 } ], //List of sounds to make after a delay. Default is an empty list.
        "PlacingAnimation": "Fire", //[Bubbles|Fire|CharcoalKilnSmoke] //Animation to make when placing the input. Default is null.
        "PlacingAnimationColorName": "White", //The color of the animation.[http://www.foszor.com/blog/xna-color-chart/] Default White.
        "PlacingAnimationOffsetX": 0, //The offset of the X axis. The offset is relative to the animation default location, not the position of the machine. Default is 0.
        "PlacingAnimationOffsetY": -32, //The offset of the Y axis. The offset is relative to the animation default location, not the position of the machine. Default is 0.
        "IncrementStatsOnInput": [ "PiecesOfTrashRecycled" ], // Game stats to increment when a input is placed. Will increment the stats by the amount of the stack. Vanilla machines already increment stats when an item is removed from the machine. Only the Recycle Machine increment the stats on input. Default is an empty list.
        "IncrementStatsLabelOnInput": [ "ModId.MyCustomProduct" ], // Game stats label to increment when a input is placed. Will increment the stats by the amount of the stack. Can be any label text you want. MFM also support stats label for conditions. Check vanilla stats label at the end of the file. Default is an empty list.
        "OverrideMod": [ "IdOfTheMod.ToOverride" ], //If defined, this rule can override rules with the same producer/input combination from the mods in the list. Otherwise the first one to be loaded will be used.
        "LookForInputWhenReady": { // Set this config if you want to look for a specific object when ready. If the rule has an input, it will consume the input on placement, check restrictions to choose the output, but won't apply name, price, quality and similar modifications based on that input. The found object when ready will be used for these modifications instead.
            "Range": 5, //Max range the input will be looked for. A negative number will be considered no limit (will stop at 150 to avoid crash). Default is -1.
            "InputIdentifier": [ "Orange", "-80" ], //Identifier of the input. Can be the Qualified Item Id, index, name or category.
            "Crop": true, //If should look up for crops. The identifier will be compared with the harvest object. Default is false.
            "ExcludeForageCrops": true, //If it should ignore Forage crops. Default is false.
            "GardenPot": true, //If it should look for crops inside garden pots. Default is false.
            "FruitTree": true, //If it should look up for fruit trees. The identifier will be compared with the fruit. Default is false.
            "BigCraftable": false //If it should look up for BigCraftables. The identifier will be compared with the held object. Default is false.
        },
        "WarningsLogLevel": "Warn" //[Warn|Info|Debug|Trace] Log level of messages warning the player that something was missing when loading the rule. Default is what is set on the content pack config.
    }
]
/* Additional Notes
 * Possible stats: [SeedsSown|ItemsShipped|ItemsCooked|ItemsCrafted|ChickenEggsLayed|DuckEggsLayed|CowMilkProduced|GoatMilkProduced|RabbitWoolProduced|SheepWoolProduced|CheeseMade|GoatCheeseMade|TrufflesFound|StoneGathered|RocksCrushed|DirtHoed|GiftsGiven|TimesUnconscious|AverageBedtime|TimesFished|FishCaught|BouldersCracked|StumpsChopped|StepsTaken|MonstersKilled|DiamondsFound|PrismaticShardsFound|OtherPreciousGemsFound|CaveCarrotsFound|CopperFound|IronFound|CoalFound|CoinsFound|GoldFound|IridiumFound|BarsSmelted|BeveragesMade|PreservesMade|PiecesOfTrashRecycled|MysticStonesCrushed|DaysPlayed|WeedsEliminated|SticksChopped|NotesFound|QuestsCompleted|StarLevelCropsShipped|CropsShipped|ItemsForaged|SlimesKilled|GeodesCracked|GoodFriends|IndividualMoneyEarned]
 * Vanilla stats label: [exMemoriesWiped|childrenTurnedToDoves|trashCansChecked|boatRidesToIsland|beachFarmSpawns|hardModeMonstersKilled|timesEnchanted]
 * Note that not all stats are correctly counted by the game.
 */

  • Here is the template for the producers as added in the mod file (ProducersConfig.json):
Spoiler:  
Show
[
    {
        "ProducerName": "ProducerName", //Name of the producer
        "AdditionalProducerNames": [ "ProducerName2", "ProducerName3" ], //Additional names of the producer. The config will be completely copied to the producer names in the list.
        "AlternateFrameProducing": true, //If the producer should use the alternate frame when producing.
        "AlternateFrameWhenReady": true, //If the producer should use the alternate frame and ready for harvest.
        "DisableBouncingAnimationWhileWorking": false, // If the producer bouncing animation while working should be disabled.
        "NoInputStartMode": "Placement", // [Placement|DayUpdate] //If the machine has a value for this property, it can only have one ProducerRule without a InputIdentifier. If Placement, the machine will start on placement, and will restart every time the produced object is taken out. If DayUpdate, the machine will start at the begin of the day. Default is null.
        "IncrementStatsOnOutput": { //Pairs of "stats:object" that identify what should be incremented.
            "GoatCheeseMade": "Goat Cheese", //First value is the stats to be incremented, second value is which output should be produced for the stat to be incremented. The identifier can be the index, name, category or context tag of the output. Will increment the stats by the amount of the stack.
            "CheeseMade": null //If the identifier is null, any output will match.
        },
        "IncrementStatsLabelOnOutput": { //Pairs of "statsLabel:object" that identify what should be incremented. You can add your own custom stats label. MFM also support stats label for conditions. Default is null.
            "timesEnchanted": "Magic Bait", //First value is the stats label to be incremented, second value is which output should be produced for the stat to be incremented. The identifier can be the index, name, category or context tag of the output. Will increment the stats label by the amount of the stack.
            "modId.myItemProduced": null //If the identifier is null, any output will match.
        },
        "MultipleStatsIncrement": true, //If all stats that match should be incremented. If false, just the first match will be increased. Default is false.
        "LightSource": { // Defines the light source the producer should use when working. Default is null.
            "TextureIndex": 4, // Shape of the light source. All vanilla machines uses "sconceLight". 1=lantern, 2=windowLight, 4=sconceLight, 5=cauldronLight, 6=indoorWindowLight, 7=projectorLight. Default is 4.
            "Radius": 1.5, // The actual size of the light source depends on the texture used. Default is 1.5 (the size of the furnace light source with the sconceLight texture)
            "OffsetX": 0, // The horizontal offset from the center of the producer tile. Default is 0.
            "OffsetY": 0, // The vertical offset from the top of the producer tile. Default is 0.
            "ColorType": "DefinedColor", // [ObjectColor|ObjectDyeColor|DefinedColor] If ObjectColor and the output is a colored object, it will use the color of the output. If ObjectDyeColor and the output has a dye color, it will use this color. If DefinedColor or it doesn't find the color on the other options, it will create the color based on the Red, Green and Blue values.
            "ColorRed": 255, // The red value of the light color. Default is 255.
            "ColorGreen": 255, // The green value of the light color. Default is 255.
            "ColorBlue": 255, // The blue value of the light color. Default is 255.
            "ColorAlpha": 255, // The transparency value of the light color. 0 is fully transparent, 255 is fully opaque. Default is 255.
            "ColorFactor": 0.75, // The factor that will multiply all other colors parameters. Default is 1.
            "AlwaysOn": true // If true, the light source will be lit even while not producing. Default is false.
        },
        "WorkingTime": { // If a value is defined, the machine will only produce during this period. Production will be on hold out of this period. Default is working any time.
            "Begin": 600, //Format [HHmm]. The time from which the machine can start producing. Default is 0
            "End": 1800 //Format [HHmm]. The time at which the machine stop producing. Default is 0
        },
        "WorkingWeather": [ "Rainy", "Stormy" ], // [Sunny|Rainy|Stormy|Snowy|Windy] The weathers in which the machine works. Default is working in any weather.
        "WorkingLocation": [ "Barn", "Big Barn", "Deluxe Barn" ], // The locations in which the machine will work. Can be any map of building. Default is working in any location.
        "WorkingOutdoors": true, // [true|false|null] If true, the machine will only work outdoor. If false, the machine will only work indoor. If the line is removed or the value is null, it will work on both kind of location.
        "WorkingSeason": [ "spring", "summer", "fall" ], // The seasons in which the machine will work. Different than other conditions, season clean the machine at the start of the day if in a not working season. The default is working in any season.
        "OverrideMod": [ "IdOfTheMod.ToOverride" ], //If defined, this config can override the configs for the same producer from the mods in the list. Otherwise the first one to be loaded will be used.
        "ProducingAnimation": { // Set a configuration for animating the producing state of the machine. Default is null.
            "RelativeFrameIndex": [ 2, 3, 4, 5, 6, 7 ], //Index and order of the frames that should be used for the animation. Index start at zero, the base frame and index of the non producing state. Extra frames are content from that frame. Extra frames can be added with Json Assets or Content Patcher.
            "FrameInterval": 10, // Amount of game ticks between frames. Default is 10
            "AdditionalAnimations": { //Animation that should be played depending on the object inside the machine. Pair of output identifier and list of frames. Identifier can be Name, Index or Category. Default is null.
                "Salmon": [ 8, 9, 10 ],
                "131": [ 8, 11, 12 ],
                "-4": [ 8, 13, 14 ]
            }
        },
        "ReadyAnimation": null //Set a configuration for animating the ready state of the machine. Same format of configuration as WorkingAnimation. Default is null.
    }
]
/* Additional Notes
 * Possible stats: [SeedsSown|ItemsShipped|ItemsCooked|ItemsCrafted|ChickenEggsLayed|DuckEggsLayed|CowMilkProduced|GoatMilkProduced|RabbitWoolProduced|SheepWoolProduced|CheeseMade|GoatCheeseMade|TrufflesFound|StoneGathered|RocksCrushed|DirtHoed|GiftsGiven|TimesUnconscious|AverageBedtime|TimesFished|FishCaught|BouldersCracked|StumpsChopped|StepsTaken|MonstersKilled|DiamondsFound|PrismaticShardsFound|OtherPreciousGemsFound|CaveCarrotsFound|CopperFound|IronFound|CoalFound|CoinsFound|GoldFound|IridiumFound|BarsSmelted|BeveragesMade|PreservesMade|PiecesOfTrashRecycled|MysticStonesCrushed|DaysPlayed|WeedsEliminated|SticksChopped|NotesFound|QuestsCompleted|StarLevelCropsShipped|CropsShipped|ItemsForaged|SlimesKilled|GeodesCracked|GoodFriends|IndividualMoneyEarned]
 * Vanilla stats label: [exMemoriesWiped|childrenTurnedToDoves|trashCansChecked|boatRidesToIsland|beachFarmSpawns|hardModeMonstersKilled|timesEnchanted]
 * Note that not all stats are correctly counted by the game.
 */

  • Here is the template for the config properties as added in the mod file(Config.json):
Spoiler:  
Show

{
    "DefaultWarningsLogLevel": "Warn" //[Warn|Info|Debug|Trace] Default log level of messages warning the playing that something was missing when loading the rule. Default is Warn.
}


For Modder to code:

  • Reference the ProducerFrameworkMod.dll on your SMAPI project.
  • Use the ProducerController class to add the rules and configs.
  • The parameters have the same properties as the template from content packs.
  • You can also call the API method "AddContentPack" with the directory where your content pack files are and they will be loaded by the mod.
Special thanks:
  • minervamaga, SpringsSong, ParadigmNomad, Trent, spacechase0 - They were directly involved on the producing of this framework.
  • Everybody at the Stardew Valley Discord #modding channel - They are all very supportive and were the inspiration for this project.

My Other Mods: