File information

Last updated

Original upload

Created by

SlayerDharok

Uploaded by

SlayerDharok

Virus scan

Safe to use

About this mod

Adds augmentor items that can be attached to machines to upgrade them.

Requirements
Permissions and credits
Translations
  • German
Changelogs
Donations
Adds 6 different Augmentors that each have different effects when attached to a machine:



How to use:
Select an augmentor item on your toolbar, then click on a valid machine to attach it. You can only attach augmentors to machines that are placed on a tile, not to ones in your inventory. Hold shift to attach 1 of the held augmentor, control to attach half, neither to attach all.



How to obtain:
Spoiler:  
Show

Augmentors can be bought from the Travelling Merchant. The amount and types of sold augmentors is random each day the merchant visits Stardew Valley. Prices are also slightly randomized but generally between 5,000-20,000 each. You can also get them as *very* rare monster drops.




What can I augment?
The following machines can be augmented:
  • All artisan equipment: Mayonnaise Machine, Bee House, Preserves Jar, Cheese Press, Loom, Keg, Oil Maker, Cask
  • Most refining equipment: Charcoal Kiln, Crystalarium, Furnace, Recycling Machine, Seed Maker, Tapper, Worm Bin
  • Some machines can only be augmented by certain augmentors. For example, machines that don't require input items cannot be augmented by Efficiency Augmentors.



Modded machines:
  • If you want to augment a modded machine, you will need to edit the custom_machines.json file in this mod's installation directory. My mod needs a little bit of metadata about the machine in order to recognize it.

Here's a brief example of the data that file needs for Machine Augmentors to recognize the machines in-game:
Spoiler:  
Show
{
"Machines": [
// You can specify some basic metadata about modded machines so that Machine Augmentors is able to recognize them and let you attach augmentors to them.
/* EXAMPLE:
{
"RequiredModUniqueId": "Hadi.JASoda", // This is the "UniqueID" value in the manifest.json of the mod that contains the machine
"Name": "Syrup Maker", // Optional (Not required if you specify a value for "Id"). This is the internal "Name" of the machine, NOT the "DisplayName".
// (So if the mod has support for multiple languages, use the name specified in i18n\default.json)
"Id": 379, // Optional (Not required if you specify a value for "Name"). This is the "ParentSheetIndex" value for the machine
"HasQualityProducts": false, // This should be set to true if the machine produces items that can have multiple different Quality values (Regular/Silver/Gold/Iridium)
"RequiresInput": true, // This should be set to true if the machine requires 1 or more input items to produce an output. False if it automatically keeps producing outputs like a Crystalarium, Bee House, Tapper etc.
"AttachableAugmentors": [ // This is the names of all Augmentors that should be attachable to the machine
"Output", "Speed", "Efficiency", "Quality", "Production", "Duplication"
]
}
*/
// Here's another example that lets you attach Speed Augmentors to Incubators.
/*
{
"RequiredModUniqueId": "SlayerDharok.MachineAugmentors",
"Name": "Incubator",
"HasQualityProducts": false,
"RequiresInput": true,
"AttachableAugmentors": [
"Speed"
]
}
*/
]
}


More samples:
Spoiler:  
Show
(Thanks to kzintiwife for making these)

Vanilla machines:
Spoiler:  
Show
// incubator
{
"RequiredModUniqueId": "SlayerDharok.MachineAugmentors",
"Name": "Incubator",
"HasQualityProducts": false,
"RequiresInput": true,
"AttachableAugmentors": [ "Output", "Speed", "Duplication" ]
},
// Slime egg-incubator
{
"RequiredModUniqueId": "SlayerDharok.MachineAugmentors",
"ID": 156,
"HasQualityProducts": false,
"RequiresInput": true,
"AttachableAugmentors": [ "Output", "Speed", "Duplication" ]
},
//slime egg press
{
"RequiredModUniqueId": "SlayerDharok.MachineAugmentors",
"ID": 158,
"HasQualityProducts": false,
"RequiresInput": true,
"AttachableAugmentors": [ "Output", "Speed", "Efficiency", "Production", "Duplication" ]
}


Artisan valley machines:
Spoiler:  
Show
{
"RequiredModUniqueId":"ppja.artisanvalleymachinegoods",
"Name":"Alembic",
"HasQualityProducts":"false",
"RequiresInput":"true",
"AttachableAugmentors":
"AttachableAugmentors": [ "Output", "Speed", "Efficiency", "Production", "Duplication" ]
},
{
"RequiredModUniqueId":"ppja.artisanvalleymachinegoods",
"Name":"Butter Churn",
"HasQualityProducts":"false",
"RequiresInput":"true",
"AttachableAugmentors":
"AttachableAugmentors": [ "Output", "Speed", "Efficiency", "Production", "Duplication" ]
},
{
"RequiredModUniqueId":"ppja.artisanvalleymachinegoods",
"Name":"Dehydrator",
"HasQualityProducts":"false",
"RequiresInput":"true",
"AttachableAugmentors":
"AttachableAugmentors": [ "Output", "Speed", "Efficiency", "Production", "Duplication" ]
},
{
"RequiredModUniqueId":"ppja.artisanvalleymachinegoods",
"Name":"Drying Rack",
"HasQualityProducts":"false",
"RequiresInput":"true",
"AttachableAugmentors":
"AttachableAugmentors": [ "Output", "Speed", "Efficiency", "Production", "Duplication" ]
},
{
"RequiredModUniqueId":"ppja.artisanvalleymachinegoods",
"Name":"Espresso Machine",
"HasQualityProducts":"false",
"RequiresInput":"true",
"AttachableAugmentors":
"AttachableAugmentors": [ "Output", "Speed", "Efficiency", "Production", "Duplication" ]
},
{
"RequiredModUniqueId":"ppja.artisanvalleymachinegoods",
"Name":"Extruder",
"HasQualityProducts":"false",
"RequiresInput":"true",
"AttachableAugmentors":
"AttachableAugmentors": [ "Output", "Speed", "Efficiency", "Production", "Duplication" ]
},
{
"RequiredModUniqueId":"ppja.artisanvalleymachinegoods",
"Name":"Foreign Cask",
"HasQualityProducts":"false",
"RequiresInput":"true",
"AttachableAugmentors":
"AttachableAugmentors": [ "Output", "Speed", "Efficiency", "Production", "Duplication" ]
},
{
"RequiredModUniqueId":"ppja.artisanvalleymachinegoods",
"Name":"Glass Jar",
"HasQualityProducts":"false",
"RequiresInput":"true",
"AttachableAugmentors":
"AttachableAugmentors": [ "Output", "Speed", "Efficiency", "Production", "Duplication" ]
},
{
"RequiredModUniqueId":"ppja.artisanvalleymachinegoods",
"Name":"Grinder",
"HasQualityProducts":"false",
"RequiresInput":"true",
"AttachableAugmentors":
"AttachableAugmentors": [ "Output", "Speed", "Efficiency", "Production", "Duplication" ]
},
{
"RequiredModUniqueId":"ppja.artisanvalleymachinegoods",
"Name":"Ice Cream Machine",
"HasQualityProducts":"false",
"RequiresInput":"true",
"AttachableAugmentors":
"AttachableAugmentors": [ "Output", "Speed", "Efficiency", "Production", "Duplication" ]
},
{
"RequiredModUniqueId":"ppja.artisanvalleymachinegoods",
"Name":"Infuser",
"HasQualityProducts":"false",
"RequiresInput":"true",
"AttachableAugmentors":
"AttachableAugmentors": [ "Output", "Speed", "Efficiency", "Production", "Duplication" ]
},
{
"RequiredModUniqueId":"ppja.artisanvalleymachinegoods",
"Name":"Juicer",
"HasQualityProducts":"false",
"RequiresInput":"true",
"AttachableAugmentors":
"AttachableAugmentors": [ "Output", "Speed", "Efficiency", "Production", "Duplication" ]
},
{
"RequiredModUniqueId":"ppja.artisanvalleymachinegoods",
"Name":"Pepper Blender",
"HasQualityProducts":"false",
"RequiresInput":"true",
"AttachableAugmentors":
"AttachableAugmentors": [ "Output", "Speed", "Efficiency", "Production", "Duplication" ]
},
{
"RequiredModUniqueId":"ppja.artisanvalleymachinegoods",
"Name":"Smoker",
"HasQualityProducts":"false",
"RequiresInput":"true",
"AttachableAugmentors":
"AttachableAugmentors": [ "Output", "Speed", "Efficiency", "Production", "Duplication" ]
},
{
"RequiredModUniqueId":"ppja.artisanvalleymachinegoods",
"Name":"Soap Press",
"HasQualityProducts":"false",
"RequiresInput":"true",
"AttachableAugmentors":
"AttachableAugmentors": [ "Output", "Speed", "Efficiency", "Production", "Duplication" ]
},
{
"RequiredModUniqueId":"ppja.artisanvalleymachinegoods",
"Name":"Still",
"HasQualityProducts":"false",
"RequiresInput":"true",
"AttachableAugmentors":
"AttachableAugmentors": [ "Output", "Speed", "Efficiency", "Production", "Duplication" ]
},
{
"RequiredModUniqueId":"ppja.artisanvalleymachinegoods",
"Name":"Vinegar Cask",
"HasQualityProducts":"false",
"RequiresInput":"true",
"AttachableAugmentors":
"AttachableAugmentors": [ "Output", "Speed", "Efficiency", "Production", "Duplication" ]
},
{
"RequiredModUniqueId":"ppja.artisanvalleymachinegoods",
"Name":"Wax Barrel",
"HasQualityProducts":"false",
"RequiresInput":"true",
"AttachableAugmentors":
"AttachableAugmentors": [ "Output", "Speed", "Efficiency", "Production", "Duplication" ]
},
{
"RequiredModUniqueId":"ppja.artisanvalleymachinegoods",
"Name":"Yogurt Jar",
"HasQualityProducts":"false",
"RequiresInput":"true",
"AttachableAugmentors":
"AttachableAugmentors": [ "Output", "Speed", "Efficiency", "Production", "Duplication" ]
}



You can place several different augmentors on the same machine. You can also place multiples of the same augmentor on the same machine, to increase its effect.

Automate mod compatibility - most of the augmentors work with Automate as of v1.0.4. Output, Speed, and Duplication augmentors work. Quality augmentors will almost always work with Automate (except for on furnaces). Efficiency and Production augmentors DO NOT work with Automate. Doesn't cause a crash or anything, these augmentors just won't be able to apply their effects when Automate mod inserts items into machines, because my mod doesn't have access to what the input items were. Note that Duplication augmentors spawn the duplicate machines around the machine it's attached to. So you still actually need to be near the machine to pick up the duplicates!

Can I reclaim augmentors?
Spoiler:  
Show

Yes, hit the augmented machine with a tool to "un-place" it, and you'll be refunded any augmentors that were attached to it.




Augmentor formulas:
Spoiler:  
Show

The augmentors generally follow a standard "Exponential Decay (Increasing Form)" graph given by:
Effect = C * (1.0 - e ^ (-x * k))
  • C is a constant value that determines the upper limits of the bonus
  • x is the quantity of the augmentor attached to the machine
  • k is a constant value that determines the rate of decay

The effects are all configurable.
  • Output Augmentors: Produced Quantity Multiplier = 1.0 + C * (1.0 - e ^ (-x * k))
  • Speed Augmentors: Processing Time = [OriginalTime] * (1.0 - C * (1.0 - e ^ (-x * k)))
  • Efficiency Augmentors: Required Input Quantity = [OriginalQuantity] * (1.0 - C * (1.0 - e ^ (-x * k)))
  • Quality Augmentors: Chance to Increase Quality by 1 Star = C * (1.0 - e ^ (-x * k))
  • Production Augmentors: Input/Output Multiplier = 1.0 + (C * (1.0 - e ^ (-x * k)))
  • Duplication Augmentors: Duplication Chance = ProcessingTime / MinutesPerDay / (DaysPerDuplicate * (1.0 - C * (1.0 - e ^ (-(x - 1) * k))))
  • ProcessingTime is how many minutes the output item takes to finish processing (EX: 30 for copper bars)
  • MinutesPerDay is a constant, 60*24=1440
  • DaysPerDuplicate is a configurable value in the mod's config.json
Some effects need to be rounded to an integer. When this happens, the % chance of rounding down or up depends on the value. For example: if the value is 3.25, then there is a 25% chance it rounds up to 4, 75% chance it rounds down to 3, so on average you'll still receive 3.25 (3 * 0.75 + 4 * 0.25 = 3.25).

For Speed Augmentors, the values are rounded to 10 minutes intervals (since that's how often the game updates placed machines) using the same weighted random chance (EX: 28.5 has 85% chance of rounding to 30, 15% chance of rounding to 20).


Config file:
Spoiler:  
Show

You can re-balance this mod to your liking by editing the values in this mod's "config.json" file.
  • Run Stardew Valley at least once with this mod installed so it creates a default config.json file
  • Close Stardew Valley
  • Open config.json (in the mod's installation directory, usually: <GameInstallPath>\Mods\Machine Augmentors\config.json) in any text editor

If you want to test out various settings, I recommend going here, type in the exponential decay formula, go to the Table tab, click Create Table, set Start=0, Interval=1. Example formula: For Output Augmentors, use "y = 1.0 + MaxEffect * (1.0 - e ^ (-x * DecayRate))" to get the multiplier for the produced item's stack. (So if y=1.5, then you'd get +50% products on average). Use whatever values you want for MaxEffect and DecayRate. X refers to how many of the augmentor are attached to the machine to get the bonus represented by Y.

Each Augmentor has a set of configurable values:
  • BasePrice - the default shop price when purchasing augmentors from the Travelling Merchant. Note that the BasePrice is slightly randomized
  • ShopAppearanceWeight - how likely the augmentor is to appear in the Travelling Merchant's shop. The odds are given by: ShopAppearanceWeight / Sum(All ShopAppearanceWeights)
  • ShopMultiplier - affects how many of the augmentor the merchant will sell on average
  • MaxAttachmentsPerMachine - maximum quantity of this augmentor that can be placed on the same machine
  • MaxEffectPerStandardMachine/MaxEffectPerInputlessMachine - The 'C' value in the exponential decay (increasing form) formula. The higher this value is, the more powerful the augmentor's effect becomes. InputlessMachine refers to things like Bee Houses, Worm bins, Tappers etc. While StandardMachines are things like furnaces, mayonnaise machines, seed makers etc
  • StandardDecayRate/InputlessDecayRate - The 'k' value in the exponential decay (increasing form) formula. The higher this value is, the more quickly you will reach the MaxEffectPerMachine values. (So you need less quantity of an augmentor to receive a more powerful effect)

DaysPerStandardDuplicate/DaysPerInputlessDuplicate - the average number of days that a machine (that has been augmented with a single duplication augmentor) must be processing an item before it generates a duplicate of itself. If more than 1 augmentor is attached, then duplicates will be generated more frequently.


Console commands:
Spoiler:  
Show

If you want to give yourself an augmentor for cheating or testing purposes, use the "player_addaugmentor" SMAPI console command. Type "help player_addaugmentor" into the console for example usage.


Source Code:
Available here
  翻译: