Upgrades and Synergies
In short
An upgrade is a shop item in one of four slots: Bat, Glove, Cleats or Charm. Bat, Glove and Cleats hold one item (buying another replaces it); Charms stack. Every upgrade is a list of stat modifiers plus tags. Own enough items with the same tag and a synergy switches on with its own bonus.
How it works
-
Upgrades (
UpgradeDefinition):slot,rarity(Common, Rare, Epic),cost,tags,modifiers, andunlockedByDefault/unlockCostfor the meta unlock. -
Owning one:
RunState.AddUpgraderemoves anything in the same slot unless the itemStacks(only Charms stack), adds it, then recalculates stats. -
Starting kit: each batter lists
startingUpgradeIdsthat are owned from the start of every run (Peapod: Maple Bat, String Bean: Sweet Spot Tape, Pinto: Lucky Penny). They count for slots and synergies like bought items. -
Stats:
RunState.RecalculateStatsrebuilds the list in this order: batter modifiers, batter level perks, every upgrade’s modifiers, then every active synergy’s bonus. Each inning then adds the park’s and the pitcher’s modifiers on a copy. -
Stacking rule (
PlayerStats.Get), the one formula for everything:final = (base + sum of Add values) x max(0, 1 + sum of Percent values)Percents add together, they do not multiply: +20% and +8% make +28%.
-
Synergies (
SynergyResolver.GetActive): for each synergy, count owned upgrades whosetagscontain itstag. If the count is at leastrequiredCount, it is active and itsbonusmodifiers apply. Duplicate charms each count. -
The build panel on the map and shop screens lists EQUIPMENT by slot, SYNERGIES (“None active yet. Collect items that share a tag.”) and STATS.
Numbers
| What | Value | Where to tune |
|---|---|---|
| Slots | Bat, Glove, Cleats (replace), Charm (stacks) | EquipmentSlot, UpgradeDefinition.Stacks |
| Default upgrade cost | 5 | UpgradeDefinition.cost |
| Default synergy requirement | 2 items | SynergyDefinition.requiredCount |
| Rarity weights in the shop | Common 6, Rare 3, Epic 1 | ShopService.RarityWeight |
Small example of the default synergies (full list in Synergies):
| Synergy | Tag | Needs | Bonus |
|---|---|---|---|
| Slugger | Power | 3 | +50% HR Multiplier |
| Clockwork | Timing | 2 | +20% Timing Window |
| High Roller | Greed | 2 | +2 Coins per HR |
In the code
| File | What it does |
|---|---|
Assets/_Project/Scripts/Data/UpgradeDefinition.cs | EquipmentSlot, Rarity, UpgradeDefinition, Stacks, Describe |
Assets/_Project/Scripts/Data/SynergyDefinition.cs | tag, requiredCount, bonus |
Assets/_Project/Scripts/Upgrades/SynergyResolver.cs | CountTag, GetActive |
Assets/_Project/Scripts/Run/RunState.cs | AddUpgrade, Equipped(slot), RecalculateStats, ActiveSynergies |
Assets/_Project/Scripts/Stats/PlayerStats.cs | The stacking formula |
Assets/_Project/Scripts/Data/DefaultContent.cs | The default upgrades and synergies |
Gotchas
- Replacing a slot item drops its tags too, which can switch a synergy off.
- A synergy’s own bonus can never feed another synergy: synergies have no tags.
- The Bat-slot upgrade also picks the 3D bat model, unless a cosmetic bat is worn (Customization).
GetIntrounds a stat to the nearest whole number (Coins per HR, Extra Outs, Reroll Discount).- Two upgrades are locked until bought with meta points on the PERKS screen (Pocket Metronome, Titanium Bat). Locked upgrades never appear in the shop. See Meta Progression.
- The main menu’s INDEX lists every upgrade under EQUIPMENT (sub tabs Bats, Cleats, Gloves, Charms) with its modifiers and tags. See Index Screen.
- The match intro’s batter card lists your ITEMS and SYNERGY: chips before inning 1 (Cutscenes).
- Dev menu can clear all upgrades or reset to the starting kit (
RunState.ResetUpgrades). See Dev Menu and Shortcuts.
Related
- Upgrades: every upgrade with its stats and price
- Synergies: every synergy
- Stats: what each stat does
- Stats System: the modifier code path
- Shop and Economy: how upgrades are offered and bought
- Add an Upgrade and Add a Synergy