Let you easily fully customize the prize list of Prize Machine.
You just need to create a content pack (see : https://stardewvalleywiki.com/Modding:Content_packs) for this mod containing an assets/prizeList.json file, here is a sample :
{
"1": {
"prizeType": "simple",
"itemRequest": "(O)GoldenMysteryBox",
"quantity": 1,
"perItemCondition": ""
},
"infinite": {
"prizeType": "query",
"itemRequest": "RANDOM_ITEMS (O)",
"quantity": "2-7",
"perItemCondition": ""
}
}
And here is the documentation :
Configuration documentation
The configuration consist of an associative array of key -> subarray in the JSON format.
rule key
- A number : The nth of the prize in the list, is 0 based so the first prize is the key "0".
- "infinite" : The rule that will be applied for each prize if there is no key found for the current prize number, for example if my JSON contain 5 prizes + an "infinite" rule, when i pull the 6th, 7th, etc... prize, the rule applied will be the "infinite" one each time.
If there is no "infinite" rule and if there is no key in the array corresponding to the current prize we try to get, the native rule will be used, so you can patch only one prize if you want.
prizeType
- simple : A simple unique item identifier
- list : A list of unique items identifiers, comma separated
- query : An item query, please see the documentation at : https://stardewvalleywiki.com/Modding:Item_queries
- vanilla : Simply the vanilla prize for this prize number, if you set type to vanilla you can omit itemRequest, quantity and perItemCondition for a more simple json file.
itemRequest
- The current item request, depending of the prizeType value it must be an unique item identifier, a comma separated list of uniques items identifier or an item query
quantity
- The quantity of item to be given as prize, if integer it give the quantity as is, if string you can define a range which the mod pick randomly between like : "1-5"
perItemCondition
- The per item condition to apply to filter items returned by the item query when using it, else leave it empty
Note : Each content pack is taken into account and all json are "merged", but if a key is in common, the one used is the key from the content pack loaded the most lately.
Advanced usage : adding in game configuration
You can offer to players to configure which object/list of object/item query to use with given rule(s).
You need to create an assets/config.json file in your contentPack like this :

The configuration consist of an associative array of key -> subarray in the JSON format.
rule key
- The rule number of the rule you want to configure (same as in the prizeList.json)
itemList
- The list of object identifier, comma separated list of object identifiers or item queries depending of prizeType of the rule, separated by "|". The choice of user will replace itemRequest of the rule.
itemListDisplay
- The list of texts to display in the selector, separated by "|", must match the order of itemList value to correctly match.
For translation, you can add one or multiple itemListDisplay_langCode (for example : itemListDisplay_fr-FR), the mod will use correct line accordingly and default to the normal itemListDisplay if the one corresponding to the player language doesn't exist.
It will display something like :

If user didn't choose an option it default to the prizeList.json settings (as if the entry wasn't in config.json)
Require SMAPI :
https://smapi.io/
My mods :
SWAPI - Stardew Valley Web API : Let your game send events to a custom web server.
highRollerSlots : Add possibility to bet more in slots machines.
geodeCrusherPlus : Add ability to geode crusher to crush any geode, including mysteryboxes, Artifact Trove and golden coconuts.
TV Shopping channel : Add a TV shopping channel.
Prize Machine Custom Prizes : Let you easily fully customize the prize list of Prize Machine.
Better Statue Of Blessings : Allow you to get one blessing by statue per day instead of only one blessing per day.
Custom Blessings Framework : Allow mod developers to easily add blessings from statues of blessings.
Custom Wake Up Time : Let you configure the wake up time for each day.
Anti Tool Exhaustion : Prevent you to become exhausted from an accidental tool use.