Just an update, I've been working on this some more, and I think I've got it figured out. Basically, every time we double our weight, our AGI is cut in half. That also means that when we triple our weight, that puts us at 0. Here's the rough equation:
Code:
//linear equation: y = m * x + b
//m = (-(val + mod)) / (GetSTR() * 2)
//x = (weight / 10) - GetSTR()
//b = val + mod
sint16 str = GetSTR();
sint16 total_agi = val + mod;
AGI = ((-total_agi) / (str * 2)) * ((weight / 10) - str) + total_agi;