Run Config

In short

RunConfig holds the global numbers for a run: 9 innings at one park, a boss every 3rd inning, 3 outs, a 500-point first goal growing x1.25 per inning, and the coin economy. DefaultContent creates it with the class defaults (it sets none of them), so the values below are the live values.

How it works

  • DefaultContent.Build() does db.runConfig = ScriptableObject.CreateInstance<RunConfig>() and changes nothing, so every field keeps the default written in RunConfig.cs.
  • Each Difficulty then scales some of these (goals, pitch speed, prices, outs). See the table below.
  • To tune in the Inspector, export the content (Tools > Home Run Derby > Export Default Content To Assets) and edit the asset.

Numbers

FieldValueUsed byWhat it does
inningsPerRun9RunMapGeneratorInnings in a run (minimum 1)
bossEvery3RunMapGeneratorEvery Nth inning is a boss inning: 3, 6, 9
outsPerInning3RunManager.OutsPerInningOuts per inning before Extra Outs (Hard: -1, never below 1)
inningGoal500RunState.InningGoalGoal of inning 1 on the first map, Normal
inningGoalGrowth1.25RunState.InningGoalx the goal per inning after the first
bossGoalMultiplier1.25RunState.InningGoalx the goal in boss innings
mapGoalGrowth1.15RunState.InningGoalx every goal per map along the unlock order
pitchSpeedScale0.6RunManager.InningContext, BattingCageSlows pitch flight to be playable with a mouse (1 = real time)
extraPauseBetweenPitches1 sRunManager.InningContextAdded to each pitcher’s own time between pitches
startingCoins5RunStateCoins at the start of a run
coinsPerHomeRun1RunManager.InningCoinsCoins per home run, before Coins per HR
coinsPerInning4RunManager.InningCoinsPaid for clearing an inning
coinsPerLeftoverOut1RunManager.InningCoinsPaid per unused out when you clear an inning
bossBonusCoins5RunManager.InningCoins, Intro/OutroCardExtra for clearing a boss inning (also shown on the BOSS DOWN cutscene)
shopOfferCount3ShopService.RollOffers per shop visit
baseRerollCost2ShopService.RerollCostFirst reroll in a visit
rerollCostIncrease1ShopService.RerollCostAdded per reroll already made this visit

Formulas

  • Inning goal (inning is 0-based, order is the park’s index in db.ballparks): round25(500 x 1.25^inning x (1.25 if boss) x 1.15^order x difficulty goal multiplier), minimum 25.
  • Inning coins: homeRuns x (1 + Coins per HR) + $$$ bonus coins, plus on a clear 4 + 1 x outs left + (5 if boss).
  • Reroll cost: max(0, ceil((2 + 1 x rerolls this visit) x shop multiplier) - Reroll Discount).
  • Pitch flight speed scale: 0.6 x difficulty pitch speed.

Difficulty multipliers (Data/Difficulty.cs)

NormalMediumHard
Inning goalsx1x1.4x1.9
Pitch speedx1x1.08x1.15
Special ball chancex1x1.5x2
Shop prices and rerollsx1x1.25x1.5
Outs per inning+0+0-1
Meta points (and run XP)x1x1.5x2.5

Normal goals on the first map (Sandlot Field): 500, 625, 975 (boss), 975, 1225, 1900 (boss), 1900, 2375, 3725 (boss). Each park note lists its own goals for all three difficulties (see Ballparks).

In the code

FileWhat it does
Assets/_Project/Scripts/Data/RunConfig.csThe fields and their defaults
Assets/_Project/Scripts/Data/Difficulty.csDifficulties multipliers
Assets/_Project/Scripts/Run/RunState.csInningGoal, PriceOf, starting coins
Assets/_Project/Scripts/Run/RunManager.csOutsPerInning, InningContext, InningCoins
Assets/_Project/Scripts/Upgrades/ShopService.csOffers and RerollCost

Gotchas

  • Rounding to 25 uses Mathf.RoundToInt, which rounds exact halves to even (e.g. Sandlot Hard inning 2: 1187.5 → 1200).
  • Changing bossEvery or inningsPerRun changes which innings the bosses land in and their minRound logic (see Pitchers and Bosses).
  • Reroll cost resets each shop visit (RerollsThisVisit = 0 on open).
  • The coins and outs here are per player; co-op has its own rules for outs (see Co-op Rules).
  • Inning 9 is a boss inning twice over: every 3rd inning, and every run map now has a finalBossId, which also forces the last inning to be a boss inning. The goals above already count it as a boss inning (x1.25).