Batting Cage

In short

Practice: a pitching machine throws forever, there are effectively no outs and no goal, and nothing is saved or rewarded. You pick the park and drill one pitch type or all of them. It reuses AtBatController unchanged by giving it a round that can never be won or lost in practice.

How it works

  1. Top bar BATTING CAGE opens a popup: “Pick a ballpark to practice in.” One PRACTICE button per park (the last one used is green). Every run map is listed, then the practice parks such as Scoreboard Smash.
  2. BattingCage.Enter stores the selected batter and park and calls StartSession:
    • builds the park,
    • stats = the batter’s modifiers + their level perks + their starting upgrades + the park’s batterModifiers (no shop upgrades, no synergies, no pitcher modifiers),
    • the bat model comes from the batter’s starting Bat upgrade,
    • a runtime “Pitching Machine” pitcher is created with the chosen pitch types,
    • an inning node with targetScore = int.MaxValue, 999 outs, a random seed, and inning 0 (the HUD shows no inning).
  3. When a session ends (after 999 outs) it simply starts again.
  4. Controls in the cage: Tab cycles the pitch (MIXED, then each pitch type, then MIXED) and M cycles the park. Both restart the session. The pause menu has PITCH: name, PARK: name and LEAVE CAGE.
  5. The cage switches itself off whenever the game leaves the AtBat state.

Numbers

WhatValueWhere to tune
Outs999BattingCage.EndlessOuts
Machine strike rate0.85BattingCage.MachineStrikeRate
Time between pitches0.8 sBattingCage.MachinePitchGap
Machine speed multiplier1 (default)PitcherDefinition.speedMultiplier
Pitch speed scale0.6 (no difficulty)RunConfig.pitchSpeedScale
Special-ball chance multiplier1 (the RoundContext default)RoundContext.ballChanceScale
Score goalint.MaxValue (never)BattingCage.StartSession

In the code

FileWhat it does
Assets/_Project/Scripts/Modes/BattingCage.csEnter, NextPitch, NextPark, StartSession, BuildMachine, Parks
Assets/_Project/Scripts/UI/LobbyNav.csThe BATTING CAGE popup (DrawCageParks)
Assets/_Project/Scripts/UI/UIRoot.csPause menu buttons for the cage
Assets/_Project/Scripts/Batting/AtBatController.csThe same at-bat loop runs, see At-Bat Loop

Gotchas

  • The cage never touches RunManager, the shop, saves, XP, meta points or leaderboards.
  • Every park is open in the cage, even maps you have not unlocked yet.
  • The pitching machine keeps the PitcherDefinition default speedMultiplier of 1, weights every pitch type equally, and adds no extraPauseBetweenPitches (runs add 1 s), so the cage is quicker than a run.
  • The seed is random, so a practice session is not reproducible.
  • The dev menu’s PITCHING section can force a special ball or pitch type here too. See Dev Menu and Shortcuts.
  • The README only mentions Tab; M (change park) also works.
  • No cutscenes: the cage never plays the match intro or an outro (they belong to RunManager and CoopRun).
  • The top bar’s INDEX lists the practice parks first under BALLPARKS with the subtitle “Batting cage” (Index Screen).