Pitchers and Bosses
In short
Four regular pitchers, two roaming bosses (The Ace, Knuckle Sandwich) and five park bosses, one per run map, who only ever pitch inning 9 of their own park (
BallparkDefinition.finalBossId). Innings 3, 6 and 9 are boss innings. Bosses can handicap the batter (batterModifiers), throw their own special ball (balls) or throw decoys (decoys).
How it works
RunMapGenerator.Generatebuilds the 9 innings when the run starts, from the run seed.- Boss inning when
(i + 1) % bossEvery == 0(bossEvery= 3), or the last inning if the park has afinalBossId. - Regular innings pick at random among non-boss pitchers with
minRound <= i. - The last inning is the park’s own boss (
finalBossId) when it has one. Every run map has one. - Innings 3 and 6 pick at random among bosses that are nobody’s park boss (every park’s
finalBossIdis excluded, not just this park’s), not used yet this run, withminRound <= i. Fallbacks loosen in order: dropminRound, then allow reuse, then allow park bosses, then any pitcher. - During an at-bat,
PitcherAIpicks each pitch by weight from the pitcher’s mix (see the lean below), never the same pitch more than twice in a row (three times for a special-ball pitch). It throws a strike with chancestrikeRate. Speed =pitch speedMph x speedMultiplier x random 0.97..1.03(x1.15 more on a Super Fast ball). See Pitching. - The boss’s
batterModifiersare added to the batter’s stats for that inning only (RunManager,CoopRun). - Two special-ball slots stack on every pitch: the map’s ball (
PitchData.effect, from the park’sballs) and the pitcher’s own (PitchData.bossEffect, fromPitcherDefinition.balls), each rolled on its own seeded stream. The pitcher’s sets the colour, glow, sound and pill colour (PitchData.Primary); the pill names both, e.g. “WIFFLE GHOST FASTBALL”. See Special Balls. - Decoys (The Phantom): on a pitch that wins the
decoyChanceroll,decoysfake balls leave the hand with the real one, peel away from 30% of the flight to their own spot near the zone and vanish at 97%. They can’t be hit and cast no shadow: the shadow is the tell (Batting/DecoyBalls). Decoys combine with either ball slot. - The lean: when a ball (park or boss) rides only some pitch types, the pitcher draws from those types 80% of the
time (
PitcherAI.FavouredShare), so about 67 to 72% of his pitches can carry it. A pitcher who throws none of them (Knuckle Sandwich at Windy City) doesn’t lean.
With the default content this gives:
| Inning | Who can pitch |
|---|---|
| 1 | Coach Pete only |
| 2 | Coach Pete, The Junkballer, Groundball Gus |
| 3 (boss) | BOSS: The Ace (Knuckle Sandwich’s minRound 4 is too late; park bosses are excluded) |
| 4, 5 | any of the four regulars (Flamethrower from here on) |
| 6 (boss) | BOSS: Knuckle Sandwich (The Ace is used) |
| 7, 8 | any of the four regulars |
| 9 (final boss) | the park’s own boss: Backyard Benny (Sandlot), Farmer Fitz (Farmyard), The Gale (Windy City), The Phantom (Midnight), The Alien (Moon) |
Where they show up besides the mound: the map screen briefing and the HUD list a boss’s own balls (”• His own …”,
DescribeBalls), the main menu INDEX lists every pitcher under PITCHERS or BOSSES (Index Screen), the match intro
shows inning 1’s pitcher card (Cutscenes), and clearing inning 3 or 6 plays the BOSS DOWN! cutscene before the shop (unless CUTSCENES is off).
Numbers
Pitchers
| id | Name | Boss | minRound | Speed x | Strike rate | Time between pitches | Colour |
|---|---|---|---|---|---|---|---|
coach | Coach Pete | no | 0 (inning 1) | 0.8 | 0.9 | 1.3 s | (0.5, 0.5, 0.5) |
junkballer | The Junkballer | no | 1 (inning 2) | 0.95 | 0.75 | 1.2 s | (0.6, 0.4, 0.8) |
sinkerballer | Groundball Gus | no | 1 (inning 2) | 1 | 0.75 | 1.15 s | (0.2, 0.6, 0.9) |
flamethrower | Flamethrower | no | 2 (first used in 4) | 1.05 | 0.7 | 1.1 s | (0.9, 0.3, 0.2) |
ace | BOSS: The Ace | roaming | 0 | 1.1 | 0.65 | 1.0 s | (0.9, 0.75, 0.1) |
knuckler | BOSS: Knuckle Sandwich | roaming | 4 (inning 5) | 1 | 0.8 | 1.0 s | (0.3, 0.8, 0.6) |
phantom | BOSS: The Phantom | Midnight Yard | 5 (unused) | 1 | 0.8 | 1.15 s | (0.7, 0.9, 1) |
benny | BOSS: Backyard Benny | Sandlot Field | 8 | 0.95 | 0.8 | 1.15 s | (1, 0.85, 0.35) |
farmer | BOSS: Farmer Fitz | Farmyard | 8 | 0.95 | 0.8 | 1.2 s | (0.6, 0.45, 0.25) |
gale | BOSS: The Gale | Windy City Yard | 8 | 1.05 | 0.75 | 1.1 s | (0.5, 0.8, 1) |
alien | BOSS: The Alien | Moon Stadium | 8 | 1.05 | 0.75 | 1.1 s | (0.55, 1, 0.5) |
RunConfig.extraPauseBetweenPitches (1 s) is added on top of every pitcher’s own time. A park boss’s minRound never
matters: he is placed by finalBossId, not drawn.
Pitch mixes (weight, share)
| Pitcher | Mix |
|---|---|
| Coach Pete | Fastball 4 (66.7%), Curveball 1 (16.7%), Changeup 1 (16.7%) |
| The Junkballer | Changeup 2 (25%), Curveball 2 (25%), Sinker 2 (25%), Knuckleball 1 (12.5%), Fastball 1 (12.5%) |
| Groundball Gus | Sinker 3 (50%), Slider 2 (33.3%), Fastball 1 (16.7%) |
| Flamethrower | Fastball 3 (50%), Slider 2 (33.3%), Sinker 1 (16.7%) |
| The Ace | Fastball 3 (28.6%), Sinker 2 (19%), Slider 2 (19%), Curveball 2 (19%), Changeup 1 (9.5%), Knuckleball 0.5 (4.8%) |
| Knuckle Sandwich | Knuckleball 1 (100%) |
| The Phantom | Fastball 2 (40%), Changeup 2 (40%), Curveball 1 (20%) |
| Backyard Benny | Fastball 2 (40%), Changeup 2 (40%), Curveball 1 (20%) |
| Farmer Fitz | Sinker 3 (50%), Changeup 2 (33.3%), Knuckleball 1 (16.7%) |
| The Gale | Fastball 3 (50%), Slider 2 (33.3%), Changeup 1 (16.7%) |
| The Alien | Curveball 2 (33.3%), Slider 2 (33.3%), Fastball 1 (16.7%), Knuckleball 1 (16.7%) |
These are the base shares. At a park whose ball rides only some pitches (Farmyard, Windy City, Moon), the lean moves most pitches onto those types.
Boss tricks (on the batter while facing them, or on his pitches)
| Boss | Handicap / ball / decoys | Description in game |
|---|---|---|
| The Ace | -15% Timing Window (Percent, -0.15) | “Throws everything and paints the corners. Shrinks your timing window.” |
| Knuckle Sandwich | -20% Contact (Percent, -0.2) | “Throws only knuckleballs. Your contact zone shrinks.” |
| The Phantom | 2 decoys, 1 in 4 pitches (decoys = 2, decoyChance = 1/4) | “Three balls leave his hand. Only one is real: watch the shadows.” |
| Backyard Benny | Wiffle ball, any pitch, 1 in 4 | ”The neighbourhood legend. His wiffle ball drifts one way, then cuts back hard at the plate.” |
| Farmer Fitz | none yet (code: “his own special ball: still to be decided”) | “Slow, steady and dirty: sinkers and changeups off the back of the barn.” |
| The Gale | Headwind / Tailwind, any pitch, 1 in 8 (then 50/50 which) | “Pitches into the wind. Some stall at the plate, some get blown right past you.” |
| The Alien | none yet (code: “his own special ball: still to be decided”) | “Learned the game from satellite TV. Throws everything, from very far away.” |
The boss ball and decoy chances are multiplied by the difficulty’s special-ball scale (x1 / x1.5 / x2), like park balls: The Phantom’s decoys come 1 in 4 on Normal, 3 in 8 on Medium, 1 in 2 on Hard.
Decoy numbers (PitchData, PitcherAI)
| What | Value | Where to tune |
|---|---|---|
| Decoys split off at | 30% of the flight | PitchData.DecoySplit |
| Decoys vanish at | 97% of the flight | PitchData.DecoyFade |
| Distance from the real ball at the plate | 0.25 to 0.42 m, one per slice of the circle | PitcherAI.DecoyMinOffset, DecoyMaxOffset |
| Kept near the zone | x -0.55..0.55 m, y 0.2..1.4 m | PitcherAI.ClampNearZone |
| Seeded stream | 0xDEC0 (never shifts the pitches) | PitcherAI.DecoyStream |
Pitch choice (PitcherAI)
| What | Value | Where to tune |
|---|---|---|
| Same pitch in a row, max | 2 | MaxSamePitchInARow |
| Same special-ball pitch in a row, max | 3 | MaxFavouredInARow |
| Share drawn from the special-ball pitches | 0.8 | FavouredShare |
Batting cage machine (built at runtime in BattingCage.BuildMachine, not in the content): id pitching_machine,
“Pitching Machine”, strike rate 0.85, 0.8 s between pitches, speed x1, every pitch type at weight 1 (or one chosen type).
In the code
| File | What it does |
|---|---|
Assets/_Project/Scripts/Data/DefaultContent.cs | Pitcher(id, name, description, boss, minRound, speedMult, strikeRate, timeBetween, color, mix...); boss balls, decoys, finalBossId lines |
Assets/_Project/Scripts/Data/PitcherDefinition.cs | Fields (balls, decoys, decoyChance), WeightedPitch, DescribeBalls |
Assets/_Project/Scripts/Run/RunMapGenerator.cs | Picks each inning’s pitcher; park bosses kept out of innings 3 and 6 |
Assets/_Project/Scripts/Pitching/PitcherAI.cs | Pitch choice and lean, strike roll, speed, both ball rolls, MakeDecoys |
Assets/_Project/Scripts/Pitching/PitchData.cs | bossEffect, Primary, Has, decoys, DecoyPositionAt |
Assets/_Project/Scripts/Batting/DecoyBalls.cs | Draws the decoys (same look as the real ball, no shadow) |
Assets/_Project/Scripts/Run/RunManager.cs | Adds pitcher.batterModifiers to the inning’s stats |
Gotchas
- The Phantom only pitches at Midnight Yard. A
DefaultContentcomment says he “can turn up as a late boss (inning 6 on)” elsewhere and that decoys fly “with every pitch”; the code does neither.RunMapGeneratorkeeps every park’s boss out of innings 3 and 6 everywhere (checked byBallEffectTest.EveryParkHasItsOwnBoss), anddecoyChanceis 1/4. - Farmer Fitz and The Alien have no special ball, handicap or decoys yet: they differ only in numbers and mix. The
README marks their own balls as planned. “From very far away” is flavour text:
PitcherDefinitionhas no release distance field. - None of the five park bosses has
batterModifiers. - Knuckle Sandwich has one pitch, so the in-a-row limits do not apply to him.
- Flamethrower has
minRound2 but inning index 2 is always a boss inning, so he first shows up in inning 4. - With only two roaming bosses, innings 3 and 6 are always The Ace then Knuckle Sandwich: no randomness is left.
- Boss names include the “BOSS: ” prefix in
displayName. - The lean draws from the pitch random stream, so adding a ball that rides only some pitches changes which pitches come (the ball’s own roll still never does).
Related
- Pitch Types: speeds, breaks and arcs of every pitch
- Pitching: how a pitch is thrown and flies
- Special Balls: the park and boss balls
- Run Structure: innings and boss innings
- Ballparks: which park has which boss
- Cutscenes: BOSS DOWN! after innings 3 and 6
- Index Screen: the PITCHERS and BOSSES tabs
- Add a Pitcher or Boss, Add a Final Boss