Post #21 · Posted at 2017-09-18 02:47:47pm 6.5 years ago
Jousway | |
---|---|
Member | |
137 Posts | |
Reg. 2011-07-12 | |
"Noteskins !== Quality " |
Quote: Kyzentun
As for anyone wondering why leadbman's first post had "PROFILEMAN:set_preferred_noteskin", well, that's closer to the right way to do it on the current master branch. Noteskin has been moved out of the PlayerOptions structure into the profile. "PROFILEMAN:GetProfile(pn):set_preferred_noteskin(player_skin)" is the way to set the noteskin that will be used, if it is called before gameplay starts.
The profile keeps a list of preferred noteskins (any noteskin that has been set with set_preferred_noteskin), and set_preferred_noteskin bumps that noteskin to the top. Then when gameplay starts, it finds the top noteskin that works with the current stepstype and uses that. (there's also unprefer_noteskin, for bumping a skin out of the list)
If there isn't a fitting skin in the list, the alphabetically first skin that works is used.
Post #22 · Posted at 2017-09-18 02:52:45pm 6.5 years ago
Kyzentun | |
---|---|
Member | |
3,209 Posts | |
Reg. 2008-02-20 | |
"I'm honestly pissed off." |
The example with a noteskin named "drunk" (or any modifier name, a list MrThatKid has been expanding) shows that GetPlayerOptionsString and SetPlayerOptions don't work in some cases.
The example with a space in the noteskin name shows that GetPlayerOptions always works, because it doesn't go through string parsing and can't be mistaken for something else.
It should be clear to everyone which method works better in general.
The example with a space in the noteskin name shows that GetPlayerOptions always works, because it doesn't go through string parsing and can't be mistaken for something else.
It should be clear to everyone which method works better in general.
Post #23 · Posted at 2017-09-18 03:03:56pm 6.5 years ago
so yeah tldr, if you use 5.2/master use
PROFILEMAN:GetProfile(PLAYER_1):set_preferred_noteskin("solo")
PROFILEMAN:GetProfile(PLAYER_2):set_preferred_noteskin("solo")
else use
GAMESTATE:GetPlayerState(PLAYER_1):GetPlayerOptions('ModsLevel_Preferred'):NoteSkin("solo")
GAMESTATE:GetPlayerState(PLAYER_2):GetPlayerOptions('ModsLevel_Preferred'):NoteSkin("solo")
unless you use a really really old version of sm5, that doesnt have the GetPlayerOptions, then use the discusting broken ass SetPlayerOptionsString lol
PROFILEMAN:GetProfile(PLAYER_1):set_preferred_noteskin("solo")
PROFILEMAN:GetProfile(PLAYER_2):set_preferred_noteskin("solo")
else use
GAMESTATE:GetPlayerState(PLAYER_1):GetPlayerOptions('ModsLevel_Preferred'):NoteSkin("solo")
GAMESTATE:GetPlayerState(PLAYER_2):GetPlayerOptions('ModsLevel_Preferred'):NoteSkin("solo")
unless you use a really really old version of sm5, that doesnt have the GetPlayerOptions, then use the discusting broken ass SetPlayerOptionsString lol