So while I was digging through antag code for my own antag idea, I hit a brick wall in that it seems that a lot of the math is dense, undocumented, and poorly designed. I could not for the life of me understand what the hell it was supposed to be doing, or why it was doing it this way. Here is the example of the antag cap for the traitor gamemode.
Code: Select all
var/num_traitors = 1
var/tsc = CONFIG_GET(number/traitor_scaling_coeff)
if(tsc)
num_traitors = max(1, min(round(num_players() / (tsc * 2)) + 2 + num_modifier, round(num_players() / tsc) + num_modifier))
else
num_traitors = max(1, min(num_players(), traitors_possible))
I can't even begin to decipher this or what any of it is trying to do. This is a major problem, not only for long term code maintenance, but for any balance changes that involve this kind of complicated math. Since I don't understand how this behaves I don't know if it is working properly or how it is working at all.