Forums » General Questions » Changing difficulty rating threshold for 'red songs'

1
I've been wondering whether it's possible to change the threshold that determines which songs are colored red in the song wheel.
When my friends come to play some StepMania on my PC, the red songs tends to scare them off haha (looking at those X-Scale DDR simfiles).
The only thing I managed to find in the metrics of _fallback was the following:
# Legacy metric: how difficult a song has to be for it to glow.

ExtraColorMeter=GetExtraColorThreshold()
ExtraColor=color("#ff0000") -- red


Kind of stuck here since I'm not sure what to do with GetExtraColorThreshold(). Would it be possible to simply replace this with an integer of choice? Or am I looking at the wrong thing completely?
Reply
You're on the right track, which is great! Rather than just saying "here's what you should do," I think this is a good opportunity to help you learn to help yourself. (Hopefully that is okay!)

So, you know that there is a metric ExtraColorMeter that is passed a function GetExtraColorThreshold() in the _fallback theme, but you're unsure where to go from there...

If you have a text editor that allows project-wide searching (SublimeText 2, Textmate 2, Notepad++, etc.), you can load the entire /Themes/ directory and search through it for any instances of GetExtraColorThreshold()

If you do that, you'll see that the function is defined in _fallback/Scripts/03 Gameplay.lua. It's a fairly straightforward function that returns an integer depending on current Game type (dance, pump, kickbox, etc.)

It is generally (strongly) discouraged to modify the _fallback theme directly (since one small change could potentially have unintended consequences on other themes that rely on it). The way to do it, then, is to override settings as you need in whatever theme you are using (or making). Thus, you have two options:

A. In your current theme, include ExtraColorMeter under [SongManager] and directly set it to some integer that you like.
B. In your current theme, make a new function in one of the Scripts called GetExtraColorThreshold() and model it after the one in _fallback, but change values to your liking there. Your own version of this function will override _fallback's version of the function.

Let me know if you have any other questions about this!
Reply
It's not just okay, it's a way better kind of answer than I would've expected haha!
I very much prefer to understand the clockworks behind the solution rather than the solution by itself, so I really appreciate the extensive explanation :)
And on top of that, I learned about some neat features in Notepad++ that I wasn't aware of before ^^
Oh and of course, I managed to make things work the way I want it now ;p

I made the modification to the default theme in this case, appending the following at the end of its 03 Gameplay.lua (correct me if I could've done this in a more optimal way):

local function CurGameName()

return GAMESTATE:GetCurrentGame():GetName()
end

function GetExtraColorThreshold()
local Modes = {
dance = 15, -- X-Scale threshold
pump = 21,
beat = 12,
kb7 = 10,
para = 10,
techno = 10,
lights = 10, -- lights shouldn't be playable
kickbox= 100, -- extra color is lame
}
return Modes[CurGameName()] or 10
end

(It appears I had to add CurGameName() as well, otherwise SM5 would give an error about it when launched)

Huge thanks dbk2!
Reply