How to Increase Traitor Chance per Round.

I am wondering how I would go about making code that increases the chance of becoming a traitor each round by 15% if you were not a traitor last round.

I currently have this code:

if IsValid(pply) and
((not table.HasValue(prev_roles[ROLE_TRAITOR], pply)) or (math.random(1, 3) == 2)) then
pply:SetRole(ROLE_TRAITOR)

table.remove(choices, pick)
ts = ts + 1
end
end

But this only works for the last round.

Any help would be appreciated.

Currently it makes it more difficult for traitors of previous rounds to become traitor; so that increases chances throughout all the innocents. I’d recommend altering that, and making it even more difficult which will reduce the changes of double-triple and 14x in a row traitor rounds ( it’s happened to me :slight_smile: ).

Otherwise, you’d really need to rewrite the entire way it does it to add “weight” to individual players, or to the list because of the way it actually selects them.

There are mathematical equations readily available on the G for calculating weight.

Let me know if this helps; if you need more help feel free to ask.