Hello! I've been looking for hours an answer to this, but I simply couldn't find it.
I run a TTT server, I modified maximum karma and now it's 10k instead of 1k, but I left the inicial karma at 1k since I want players to make it to 10k. The problem is that now, all the new players are tagged with the liability, dangerous and trigger happy tags, even at 5000 they aren't reputable. What I want is that everyone gets reputable at 1k, keeping the max at 10k. I know this is possible, I've seen it in another server, there's just not a cvar to configure this.
Also, the values to define low karma are at a lower number than 1000.
garrysmod/util.lua at master · Facepunch/garrysmod · GitHub
Its all based off of the Max karma. Now if we follow those calculations you see below
1000 karma is considered min which returns "liability". If you wanted your players to show up as healthy they'd need at least 8900 karma. (10000 * 0.89)
At 5000 they would be marked as " dangerous"
There's no real way to fix it without probably editing the core file.
local karmacolors = {
max = Color(255, 255, 255, 255),
high = Color(255, 240, 135, 255),
med = Color(245, 220, 60, 255),
low = Color(255, 180, 0, 255),
min = Color(255, 130, 0, 255),
};
function util.KarmaToString(karma)
local maxkarma = GetGlobalInt("ttt_karma_max", 1000)
if karma > maxkarma * 0.89 then
return "karma_max", karmacolors.max
elseif karma > maxkarma * 0.8 then
return "karma_high", karmacolors.high
elseif karma > maxkarma * 0.65 then
return "karma_med", karmacolors.med
elseif karma > maxkarma * 0.5 then
return "karma_low", karmacolors.low
else
return "karma_min", karmacolors.min
end
end
Thank you so much, I now know what to do! Just apply some Big Shaquian quick maths:
local karmacolors = {
max = Color(255, 255, 255, 255),
high = Color(255, 240, 135, 255),
med = Color(245, 220, 60, 255),
low = Color(255, 180, 0, 255),
min = Color(255, 130, 0, 255),
};
function util.KarmaToString(karma)
local maxkarma = GetGlobalInt("ttt_karma_max", 1000)
if karma > maxkarma * 0.1 then
return "karma_max", karmacolors.max
elseif karma > maxkarma * 0.08 then
return "karma_high", karmacolors.high
elseif karma > maxkarma * 0.065 then
return "karma_med", karmacolors.med
elseif karma > maxkarma * 0.05 then
return "karma_low", karmacolors.low
else
return "karma_min", karmacolors.min
end
end
Sorry, you need to Log In to post a reply to this thread.