diff --git a/BGAnimations/ScreenEvaluation overlay.xml b/BGAnimations/ScreenEvaluation overlay.xml index e4d4151d..3a5f3af3 100644 --- a/BGAnimations/ScreenEvaluation overlay.xml +++ b/BGAnimations/ScreenEvaluation overlay.xml @@ -20,7 +20,7 @@ /> @@ -42,7 +42,7 @@ Font="_misobold small" OnCommand="y,87;zoom,.5;shadowlength,1;diffuse,#FFFFFF" InitCommand="animate,0;playcommand,Update" - UpdateCommand="%function(self) RateBPMlabel(self) end" + UpdateCommand="%function(self) SongOptionsLabel(self) end" /> diff --git a/Languages/english.ini b/Languages/english.ini index e6b7fbe8..263f8019 100644 --- a/Languages/english.ini +++ b/Languages/english.ini @@ -150,6 +150,9 @@ NoteSkin=Choose a different appearance for the arrows. Handicap=Removes notes. Using these may invalidate a high score. Handicap2=Removes notes. Using these may invalidate a high score. Hide=Adjust the visibility of the targets. +MetaMods1=Apply mods that is not affected by mods in the chart. +MetaMods2=Apply mods that is not affected by mods in the chart. +MetaMods3=Apply mods that is not affected by mods in the chart. Persp=Change the viewing angle of the arrow stream. Perspective=Change the viewing angle of the arrow stream. Steps=Adjust the difficulty of the steps. @@ -283,6 +286,9 @@ Accel=Acceleration Effect=Effect Mini=Mini Appearance=Fade +MetaMods1=MetaMods 1 +MetaMods2=MetaMods 2 +MetaMods3=MetaMods 3 Turn=Turn InsertTaps=Insert InsertOther=Other @@ -449,6 +455,17 @@ Tornado=Tornado Tipsy=Float Beat=Beat +MetaFlip=MetaFlip +MetaInvert=MetaInvert +MetaVideogames=MetaVideogames +MetaMonocolumn=MetaMonocolumn +MetaReverse=MetaReverse +MetaDizzy=MetaDizzy +MetaOrient=MetaOrient +MetaBrake=MetaBrake +MetaHidden=MetaHidden +50% MetaStealth=50% MetaStealth + Normal=Normal -30% Mini=Huge 20% Mini=20% diff --git a/Scripts/Mods.lua b/Scripts/Mods.lua index 7c55f8f0..59fc9fb8 100644 --- a/Scripts/Mods.lua +++ b/Scripts/Mods.lua @@ -114,7 +114,7 @@ -- These will be the option rows available on the [nth] option screen. The 'NextScreen' row will be automatically added as long as there is more than 1 option screen. playerOptions = {} playerOptions[1] = { 'SpeedType','SpeedNumber','Mini','Perspective','NoteSkin','Turn','LifeBar','Compare','Rate' } - playerOptions[2] = { 'Turn','Accel','Scroll','Effect','Appearance','Handicap','InsertTaps','InsertOther','Hide','Ghost' } + playerOptions[2] = { 'MetaMods1','MetaMods2','MetaMods3','Turn','Accel','Scroll','Effect','Appearance','Handicap','InsertTaps','InsertOther','Hide','Ghost' } playerOptions.Edit = { 'SpeedType','SpeedNumber','Mini','Perspective','NoteSkin','Turn' } ShowAllInRow = false @@ -729,10 +729,51 @@ end -- BPM format and display functions ------------------------------------- +-- Intended to be used from ScreenEvaluation. +-- It will return a human-readable string consists of metamods and rate mods currently being used. +-- If BitmapText is given, this function will set the string to the BitmapText. +function SongOptionsLabel(self) + local t = {} + + local bpm = RateBPMlabel() + if bpm ~= '' then table.insert(t, bpm) end + + local meta = MetaModsText() + if meta ~= '' then table.insert(t, meta) end + + s = table.concat(t, ', ') + + if self then + self:settext(s) + else + return s + end +end + function BPMlabelRate(self) s = AdjustedBPM() .. ' BPM ' .. RateModAppend() if self then self:settext(s) else return s end end function BPMandRate(self) s = AdjustedBPM() .. ' ' .. RateModAppend() if self then self:settext(s) else return s end end function RateBPMlabel(self) s = RateModText() if s ~= '' then s = s .. ' (' .. AdjustedBPM() .. ' BPM)' end if self then self:settext(s) else return s end end +function MetaModsText(self) + mods = {} + + for _, metaModsRow in ipairs(metaModsRows) do + for i, v in ipairs(metaModsRow.mods) do + if CheckMod(0, v) then + table.insert(mods, metaModsRow.modlist[i]) + end + end + end + + s = table.concat(mods, ', ') + + if self then + self:settext(s) + else + return s + end +end + function RateModText(self) s = '' if modRate ~= 1 then s = string.format('%01.1f',modRate) .. 'x Music Rate' end if self then self:settext(s) else return s end end function RateModAppend(self) s = RateModText() if s ~= '' then s = '(' .. s .. ')' end if self then self:settext(s) else return s end end @@ -774,6 +815,24 @@ end baseSpeed = { "C700", "C800", "C900", "C1000", "C1100", "C1200", "C1300", "C1400", "1x", "2x", "3x", "4x", "5x", "6x", "7x", "C400", "C500", "C600" } extraSpeed = { "0", "+C10", "+C20", "+C30", "+C40", "+C50", "+C60", "+C70", "+C80", "+C90", "+.75x", "+.50x", "+.25x" } +metaModsRows = { + { + modlist = {'MetaFlip', 'MetaInvert', 'MetaVideogames', 'MetaMonocolumn'}, + default = 'no metaflip, no metainvert, no metavideogames, no metamonocolumn', + mods = {'metaflip', 'metainvert', 'metavideogames', 'metamonocolumn'} + }, + { + modlist = {'MetaReverse', 'MetaDizzy', 'MetaOrient', 'MetaBrake'}, + default = 'no metareverse, no metadizzy, no metaorient, no metabrake', + mods = {'metareverse', 'metadizzy', 'metaorient', 'metabrake'} + }, + { + modlist = {'MetaHidden', '50% MetaStealth'}, + default = 'no metahidden, no metastealth', + mods = {'metahidden', '50% metastealth'} + } +} + rateMods = { "1.0x", "1.1x", "1.2x", "1.3x", "1.4x", "1.5x", "1.6x", "1.7x", "1.8x", "1.9x", "2.0x" } rateModsEdit = { "1.0x", "1.1x", "1.2x", "1.3x", "1.4x", "1.5x", "1.6x", "1.7x", "1.8x", "1.9x", "2.0x", "0.3x", "0.4x", "0.5x", "0.6x", "0.7x", "0.8x", "0.9x" } @@ -816,6 +875,9 @@ ModsMaster.Tipsy = { float = true } ModsMaster.Beat = { float = true } ModsMaster.Mini = { float = true } +ModsMaster.MetaMods1 = { fnctn = 'MetaMods1' } +ModsMaster.MetaMods2 = { fnctn = 'MetaMods2' } +ModsMaster.MetaMods3 = { fnctn = 'MetaMods3' } ModsMaster.SpeedType = { fnctn = 'SpeedType' } ModsMaster.SpeedNumber = { fnctn = 'SpeedNumber' } ModsMaster.Next = { fnctn = 'NextScreenOption' } @@ -998,6 +1060,45 @@ do end end +function MetaMods( s, iRow ) + local metaModsRow = metaModsRows[ iRow ] + local t = OptionRowBase('MetaMods' .. iRow, metaModsRow.modlist) + + t.SelectType = 'SelectMultiple' + t.OneChoiceForAllPlayers = true + + t.LoadSelections = function(self, list, pn) + for i, v in ipairs(metaModsRow.mods) do + list[i] = CheckMod(pn, v) + end + end + + t.SaveSelections = function(self, list, pn) + if pn ~= 0 then return end -- in OneChoiceForAllPlayers row, list in other players than player 1 is not valid + + ApplyMod(metaModsRow.default, pn+1) + for i, v in ipairs(list) do + if v then + ApplyMod(metaModsRow.mods[i], pn+1) + end + end + end + + return t +end + +function MetaMods1( s ) + return MetaMods( s, 1 ) +end + +function MetaMods2( s ) + return MetaMods( s, 2 ) +end + +function MetaMods3( s ) + return MetaMods( s, 3 ) +end + function NextScreenOption() local t = OptionRowBase('Next Screen',{'Gameplay','Select Music','More Options'}) t.OneChoiceForAllPlayers = true diff --git a/Scripts/Theme.lua b/Scripts/Theme.lua index 32b446b6..b85fd5cb 100644 --- a/Scripts/Theme.lua +++ b/Scripts/Theme.lua @@ -14,7 +14,7 @@ rateModsFree = { "1.0x", "1.1x", "1.2x", "1.3x", "1.4x", "1.5x", "1.6x", "1.7x", screenList = { Gameplay = 'ScreenStage' , SelectMusic = 'ScreenSelectMusic' , PlayerOptions = 'ScreenPlayerOptions' , TitleMenu = ScreenTitleBranch , NameEntry = 'ScreenNameEntryTraditional' , Evaluation = SelectEvaluationScreen , Summary = 'Summary' , Ending = SelectEndingScreen } playerOptions[1] = { 'SpeedType','SpeedNumber','Mini','Perspective','NoteSkin','Turn','JudgmentFont','Voice','Rate' } -playerOptions[2] = { 'Accel','Scroll','Effect','Appearance','Handicap','InsertTaps','InsertOther','Hide','Ghost','Compare','Measure','LifeBar' } +playerOptions[2] = { 'MetaMods1','MetaMods2','MetaMods3','Accel','Scroll','Effect','Appearance','Handicap','InsertTaps','InsertOther','Hide','Ghost','Compare','Measure','LifeBar' } function CompareTextFormat(self,n) self:zoom(.3) end -- This is added on top of the base positioning etc.