This occurred while playing the Game of Thrones mod for Crusader Kings II and I'm not sure if this is a feature of the mod or the game itself.
I was playing as the Starks, things were going normally. About a year into it, suddenly every title not in my kingdom joins Joffery and declares on me. Crap hits the fan I lose much of the Riverlands. I decided to plot to kill Joffery and succeeded. Shortly after killing Joffery, my warscore was in the -90s and then I randomly surrendered. I was imprisoned, lost all my titles and that was pretty much game over.
I can't figure why I just surrendered all of a sudden. Was this due to a CK2 mechanic or something random in the mod?