Pitching
TL;DR Remember the order of operations here - 1. HBP 2. Walk 3. K’s 4. Home runs
Now for the pitching side. We handle this like the hitting part. OOTP assumes pitching is DIPS. Pitchers don’t affect BABIP much except groundball rate. This means we can look at pitching pretty much only as 4 outcomes: 1. Walk 2. Strikeout 3. Home run 4. Ball in play (where the defense takes over). Pitchers affect the first 3 outcomes. The defense affects the 4th.
First, OOTP determines whether the batter is hit by pitch. This is based on a hidden rating. After that OOTP determines if there was a walk.This checks the pitcher’s control rating vs. the batter’s eye rating. After, the game checks for a strikeout, checking the pitcher’s stuff rating vs. the batter’s avoid K rating. Then, there's contact, so the game checks the movement rating vs. the power rating to see if there was a home run. Finally, there must be a ball in play. OOTP checks both the gb% for the pitcher and the batting profile for the pitcher. These are both at least semi-hidden ratings. If the defense doesn’t make an out, then it’s a hit.
In OOTP the control rating is the premium one. A minimum movement generally expected, and a higher minimum stuff rating. Handedness matters here.
Based on the same way we determine hitting, we can run similar code to calculate FIP for pitchers. Here’s the
output.
HBP rate
TL;DR Double-check pitcher’s HBP rates because they can be up to 25 extra batters walked a year.
I talked about HBP rate for batter’s but the more important one is the HBP rate for pitchers. Batters vary a little (from 3-12 walks a year or so), but pitchers can vary a lot (from 3-25ish). This is worth several points of control and can make a huge difference. When your pitcher is playing, double check that they aren’t underperforming because of HBP. HBP stats already in the previous post's code.
Edit: I forgot to mention wild pitches. Pitchers have a hidden wild pitch rate, and that affects how many bases are stolen on them too. Haven't included it in code, but a useful extension if you're looking at that data specifically.