Run Config
In short
RunConfigholds 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.DefaultContentcreates it with the class defaults (it sets none of them), so the values below are the live values.
How it works
DefaultContent.Build()doesdb.runConfig = ScriptableObject.CreateInstance<RunConfig>()and changes nothing, so every field keeps the default written inRunConfig.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
| Field | Value | Used by | What it does |
|---|---|---|---|
inningsPerRun | 9 | RunMapGenerator | Innings in a run (minimum 1) |
bossEvery | 3 | RunMapGenerator | Every Nth inning is a boss inning: 3, 6, 9 |
outsPerInning | 3 | RunManager.OutsPerInning | Outs per inning before Extra Outs (Hard: -1, never below 1) |
inningGoal | 500 | RunState.InningGoal | Goal of inning 1 on the first map, Normal |
inningGoalGrowth | 1.25 | RunState.InningGoal | x the goal per inning after the first |
bossGoalMultiplier | 1.25 | RunState.InningGoal | x the goal in boss innings |
mapGoalGrowth | 1.15 | RunState.InningGoal | x every goal per map along the unlock order |
pitchSpeedScale | 0.6 | RunManager.InningContext, BattingCage | Slows pitch flight to be playable with a mouse (1 = real time) |
extraPauseBetweenPitches | 1 s | RunManager.InningContext | Added to each pitcher’s own time between pitches |
startingCoins | 5 | RunState | Coins at the start of a run |
coinsPerHomeRun | 1 | RunManager.InningCoins | Coins per home run, before Coins per HR |
coinsPerInning | 4 | RunManager.InningCoins | Paid for clearing an inning |
coinsPerLeftoverOut | 1 | RunManager.InningCoins | Paid per unused out when you clear an inning |
bossBonusCoins | 5 | RunManager.InningCoins, Intro/OutroCard | Extra for clearing a boss inning (also shown on the BOSS DOWN cutscene) |
shopOfferCount | 3 | ShopService.Roll | Offers per shop visit |
baseRerollCost | 2 | ShopService.RerollCost | First reroll in a visit |
rerollCostIncrease | 1 | ShopService.RerollCost | Added per reroll already made this visit |
Formulas
- Inning goal (
inningis 0-based,orderis the park’s index indb.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 clear4 + 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)
| Normal | Medium | Hard | |
|---|---|---|---|
| Inning goals | x1 | x1.4 | x1.9 |
| Pitch speed | x1 | x1.08 | x1.15 |
| Special ball chance | x1 | x1.5 | x2 |
| Shop prices and rerolls | x1 | x1.25 | x1.5 |
| Outs per inning | +0 | +0 | -1 |
| Meta points (and run XP) | x1 | x1.5 | x2.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
| File | What it does |
|---|---|
Assets/_Project/Scripts/Data/RunConfig.cs | The fields and their defaults |
Assets/_Project/Scripts/Data/Difficulty.cs | Difficulties multipliers |
Assets/_Project/Scripts/Run/RunState.cs | InningGoal, PriceOf, starting coins |
Assets/_Project/Scripts/Run/RunManager.cs | OutsPerInning, InningContext, InningCoins |
Assets/_Project/Scripts/Upgrades/ShopService.cs | Offers 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
bossEveryorinningsPerRunchanges which innings the bosses land in and theirminRoundlogic (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).
Related
- Run Structure: innings, goals, the run loop
- Difficulty: what each difficulty changes
- Shop and Economy: coins and the shop
- Ballparks: map order and goals