Speed Type=Speed Type
Accel=Acceleration
JudgeSkin=Judgement Skin
+Playfield=Playfield Mod
Effect=Effect
Appearance=Fade
Turn=Turn
if Params.SelectType ~= "SelectMultiple" and list[i] then return end
end
- if Params.Default then list[Params.Default] = true else if Params.SelectType ~= "SelectMultiple" then list[1] = true end end
+ if Params.Default then list[Params.Default] = true else if (Params.SelectType ~= "SelectMultiple" and Params.SelectType ~= "SelectNone") then list[1] = true end end
end
local function Save(self, list, pn)
-- creates a row list given a list of names and values
function CreateProfileRow( Params, Choices, Values )
local pref = ProfileTable[Params.Name]
- if type(pref) ~= "table" and Params.SelectType == "SelectMultiple" then pref = {} end
+ if type(pref) ~= "table" and Params.SelectType == "SelectMultiple" then pref = {} ProfileTable[Params.Name] = {} end
Params.LoadCallback = function(List, Value) if Params.SelectType ~= "SelectMultiple" then return Value == pref else return pref[Value] end end
Params.SaveCallback = function(List, Value)
local AppliedModsTable = {}
-- For resetting mods
-local WasInOptions = {PLAYER_1 = false, PLAYER_2 = false}
+local WasInOptions = {}
-- Holds the mods
local ModsTable = {}
if not AppliedModsTable[PLAYER_1] then AppliedModsTable[PLAYER_1] = {} end
if not AppliedModsTable[PLAYER_2] then AppliedModsTable[PLAYER_2] = {} end
- AppliedModsTable[PLAYER_1][Name] = false
- AppliedModsTable[PLAYER_2][Name] = false
-
+ WasInOptions[Name] = false
+
NullMod(Name)
end
function NullMod( Name )
- SCREENMAN:SystemMessage('nulling ' .. Name)
-
local Choices = ModsTable[Name].Choices
local Params = ModsTable[Name].Params
local Params = ModsTable[Name].Params
Params.LoadCallback = function(List, Value, pn)
- WasInOptions[pn] = true
+ WasInOptions[Name] = true
-- If this is the first round, reset the skin as it may still be set from earlier
if GAMESTATE:StageIndex() == 0 then NullMod(Name) end
function DoCustomMod(Name, pn, Params)
--if this is the first stage and the user was NOT in the options, reset the mod to default
- if GAMESTATE:StageIndex() == 0 and not WasInOptions[pn] then NullMod(Name) end
- WasInOptions[pn] = false
+ if GAMESTATE:StageIndex() == 0 and not WasInOptions[Name] then NullMod(Name) end
+ WasInOptions[Name] = false
Params.Value = AppliedModsTable[pn][Name]
ModsTable[Name].Callback(Params)
end
function CustomModLines()
-
+ local PrefTable = GetProfilePref("CustomMods")
+ local lines = ''
+
+ if type(PrefTable) ~= "table" then return nil end
+
+ for ModName,Enabled in pairs(PrefTable) do
+ if Enabled then
+ if ModsTable[ModName].Params.LineNumber then lines = lines .. ',' .. ModsTable[ModName].Params.LineNumber end
+ end
+ end
+
+ if lines ~= '' then return lines else return nil end
end
end
function SongModifiers()
+ local CustomModLines = CustomModLines()
+
-- this is very basic right now, but it can be modified to take in to account OITG specific stuff
- return SpeedLines() .. "4,5,25,26,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24"
+ if CustomModLines then
+ return SpeedLines() .. "4,5" .. CustomModLines .. ",6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24"
+ else
+ return SpeedLines() .. "4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24"
+ end
end
function SpeedLines()
-- custom mods
local function LoadJudgeSkin(Params)
- if Params.Value ~= nil and Params.Value ~= "GrooveNights" then
+ if Params.Value and Params.Value ~= "GrooveNights" then
Params.Actor:Load( THEME:GetPath( EC_GRAPHICS, '', '_Judgements/' .. Params.Value ))
end
end
local function PlayfieldMods(Params)
- -- if type(Params.Value) == "table" then SCREENMAN:SystemMessage('got a table!') end
+ local a = Params.Actor
+
+ if Params.Value == "Bob" then a:bob() a:effectclock('beat') a:effectmagnitude(0,-30,0) end
+ if Params.Value == "Vibrate" then a:vibrate() a:effectmagnitude(20,20,20) end
+ if Params.Value == "Pulse" then a:pulse() a:effectclock('beat') end
+ if Params.Value == "Wag" then a:wag() a:effectclock('beat') end
+ if Params.Value == "Spin" then a:spin() a:effectclock('beat') a:effectmagnitude(0,0,45) end
end
RegisterCustomMod( "JudgeSkin", LoadJudgeSkin, { OneChoiceForAllPlayers = false, LineNumber = 25 }, { "GrooveNights", "Love", "Tactics", "Chromatic", "Deco", "FP", "ITG2" } )
-RegisterCustomMod( "Playfield", PlayfieldMods, { OneChoiceForAllPlayers = false, LineNumber = 26, SelectType = "SelectMultiple" }, { "Vibrate", "Wag", "Bob", "Pulse" } )
+RegisterCustomMod( "Playfield", PlayfieldMods, { OneChoiceForAllPlayers = false, LineNumber = 26 }, { "Off", "Vibrate", "Wag", "Bob", "Pulse", "Spin" } )
--actor setters