I assume you are drawing this in 2D.
User would need to input pitch of main roof, pitch of cricket.
Rafter size (2x6)
Rafter spacing 16-24
Ridge board size
Ridge height above main roof end point or ridge run distance.
Bevel cut or butt at the rafter to roof plane joint.
Given this info I think you could draw the needed parts.