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

  1. Upgrades (UpgradeDefinition): slot, rarity (Common, Rare, Epic), cost, tags, modifiers, and unlockedByDefault / unlockCost for the meta unlock.

  2. Owning one: RunState.AddUpgrade removes anything in the same slot unless the item Stacks (only Charms stack), adds it, then recalculates stats.

  3. Starting kit: each batter lists startingUpgradeIds that 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.

  4. Stats: RunState.RecalculateStats rebuilds 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.

  5. 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%.

  6. Synergies (SynergyResolver.GetActive): for each synergy, count owned upgrades whose tags contain its tag. If the count is at least requiredCount, it is active and its bonus modifiers apply. Duplicate charms each count.

  7. 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

WhatValueWhere to tune
SlotsBat, Glove, Cleats (replace), Charm (stacks)EquipmentSlot, UpgradeDefinition.Stacks
Default upgrade cost5UpgradeDefinition.cost
Default synergy requirement2 itemsSynergyDefinition.requiredCount
Rarity weights in the shopCommon 6, Rare 3, Epic 1ShopService.RarityWeight

Small example of the default synergies (full list in Synergies):

SynergyTagNeedsBonus
SluggerPower3+50% HR Multiplier
ClockworkTiming2+20% Timing Window
High RollerGreed2+2 Coins per HR

In the code

FileWhat it does
Assets/_Project/Scripts/Data/UpgradeDefinition.csEquipmentSlot, Rarity, UpgradeDefinition, Stacks, Describe
Assets/_Project/Scripts/Data/SynergyDefinition.cstag, requiredCount, bonus
Assets/_Project/Scripts/Upgrades/SynergyResolver.csCountTag, GetActive
Assets/_Project/Scripts/Run/RunState.csAddUpgrade, Equipped(slot), RecalculateStats, ActiveSynergies
Assets/_Project/Scripts/Stats/PlayerStats.csThe stacking formula
Assets/_Project/Scripts/Data/DefaultContent.csThe 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).
  • GetInt rounds 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.