Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- This file is created and is viewed best in Notepad++ or similar programs.
- USW Noteskin.lua Version 3 -All In One Support Edition-
- Made for Stepmania 5
- --------------------
- I am the bone of my noteskin
- Arrows are my body, and explosions are my blood
- I have created over a thousand noteskins
- Unknown to death
- Nor known to life
- Have withstood pain to create many noteskins
- Yet these hands will never hold anything
- So as I pray, Unlimited Stepman Works
- --------------------
- Main XML page with lua Commands http://kki.ajworld.net/lua/sm5/Lua.xml
- --]]
- local USWN = ... or {};
- --cuz I can.
- local var = Var;
- --Defining locals for later calling, DONT EDIT THIS!!!
- local nGamestate = GAMESTATE:GetCurrentGame():GetName();
- local nButton = Var "Button";
- local nElement = Var "Element";
- local nSprite = Var "SpriteOnly"; --We use this for holds because they are sprites because compatibility issues.
- local nPlayer = Var "Player";
- local nFolder = nGamestate.."/";
- --[[
- Name | Description
- --------|------------
- dance | Dance Dance Revolution + Solo (3, 4, 6 and 8(Double) Panels)
- pump | Pump It Up (5, 3(Double), 10(Double))
- kb7 | DJMax 7 Keys/O2Jam (6 Keys + 1 Center)
- ez2 | Ez2Dancer (3 Panels with 2 Hands, 3 Panels with 4 Hands and 6 Panels with 4 Hands(Double))
- para | Para Para Paradise (5 Panels)
- ds3ddx | Dance Station 3DDX (4 Panels with 4 Hands)
- beat | Beatmania (5,7 and 14(double) Keys + Scratch, "10(double) Keys Gameplay Broken")
- maniax | Dance Maniax (4 and 8(Double) Hand Receptors)
- techno | TechnoMotion (4, 5, 8, 8(Double), 10(Double) and 16(Double) Panels)
- popn | Pop'n Music (5 and 9 Keys)
- lights | Lights (For Arcade Cab Lights, Unused)
- karaoke | Karaoke (Unimplemented)
- --]]
- --Unimplemented Define Supported Gametypes for Noteskin
- --GameTypes = { dance,pump,kb7,ez2,para,ds3ddx,beat,maniax,techno,popn };
- --Start Direction Redirect
- --Direction Redirect and Rotation for Dance Dance Revolution/In The Groove Gameplay.
- if nGamestate == "dance" then
- --Here you can define which direction you want the direction to fallback/use images from.
- USWN.RedirDirection = {
- Left = "Down", --Define Left Pad Panel Fallback
- UpLeft = "DownLeft", --Define Up Left Pad Panel Fallback
- Down = "Down", --Define Down Pad Panel Fallback
- Up = "Down", --Define Up Pad Panel Fallback
- UpRight = "DownLeft", --Define Up Right Pad Panel Fallback
- Right = "Down", --Define Right Pad Panel Fallback
- };
- USWN.RotateDirection = {
- Left = 90,
- UpLeft = 90,
- Down = 0,
- Up = 180,
- UpRight = 180,
- Right = -90,
- };
- USWN.StyleCode = function(nButton, nElement, nFolder)
- nButton = USWN.RedirDirection[nButton]; -- loading redirect directions
- if Var "Button" == "UpLeft" or Var "Button" == "UpRight" then
- nFolder = "pump/";
- if string.find(Var "Element", "Body") or string.find(Var "Element", "Bottomcap") or string.find(Var "Element", "Topcap") then
- nButton = "Center";
- end;
- if Var "Element" == "Tap Note" or string.find(Var "Element", "Head") then
- nButton = "UpLeft";
- end;
- end;
- return nButton, nElement, nFolder;
- end;
- --Direction Redirect and Rotation for Pump It Up.
- elseif nGamestate == "pump" then
- USWN.RedirDirection = {
- DownLeft = "DownLeft", --Define Down Left Pad Panel Fallback
- UpLeft = "DownLeft", --Define Up Left Pad Panel Fallback
- Center = "Center", --Define Center Pad Panel Fallback
- UpRight = "DownLeft", --Define Up Right Pad Panel Fallback
- DownRight = "DownLeft", --Define Down Right Pad Panel Fallback
- };
- USWN.RotateDirection = {
- DownLeft = 0,
- UpLeft = 90,
- Center = 0,
- UpRight = 180,
- DownRight = -90,
- };
- USWN.StyleCode = function(nButton, nElement, nFolder)
- nButton = USWN.RedirDirection[nButton]; -- loading redirect directions
- if string.find(Var "Element", "Body") or string.find(Var "Element", "Bottomcap") or string.find(Var "Element", "Topcap") then
- nButton = "Center";
- end;
- if Var "Button" == "UpLeft" or Var "Button" == "UpRight" then
- if Var "Element" == "Tap Note" or string.find(Var "Element", "Head") then
- nButton = "UpLeft";
- end;
- end;
- return nButton, nElement, nFolder;
- end;
- --Direction Redirect and Rotation for DJMax 7 Keys/O2Jam.
- elseif nGamestate == "kb7" then
- USWN.RedirDirection = {
- Key1 = "Key1", --Define Key 1 Fallback (Most Left)
- Key2 = "Key2", --Define Key 2 Fallback
- Key3 = "Key1", --Define Key 3 Fallback
- Key4 = "Key3", --Define Key 4 Fallback (Center)
- Key5 = "Key1", --Define Key 5 Fallback
- Key6 = "Key2", --Define Key 6 Fallback
- Key7 = "Key1", --Define Key 7 Fallback (Most Right)
- };
- USWN.RotateDirection = {
- Key1 = 0,
- Key2 = 0,
- Key3 = 0,
- Key4 = 0,
- Key5 = 0,
- Key6 = 0,
- Key7 = 0,
- };
- USWN.StyleCode = function(nButton, nElement, nFolder)
- nButton = USWN.RedirDirection[nButton]; -- loading redirect directions
- if Var "Element" ~= "Tap Note" and nButton == "Key2" then
- if string.find(Var "Element", "Hold") or string.find(Var "Element", "Roll") then
- if string.find(Var "Element", "Explosion") then
- nButton = "Key1";
- end;
- if string.find(Var "Element", "Head") or string.find(Var "Element", "Roll") then
- else
- nButton = "Key1";
- end;
- elseif Var "Element" ~= "Receptor" then
- nButton = "Key1";
- end;
- end;
- return nButton, nElement, nFolder;
- end;
- --Direction Redirect and Rotation for Ez2Dancer.
- elseif nGamestate == "ez2" then
- USWN.RedirDirection = {
- FootUpLeft = "DownLeft", --Define Up Left Pad Panel Fallback
- HandLrLeft = "Real", --Define Lower Left Hand Sensor Fallback
- HandUpLeft = "Normal", --Define Up Left Hand Sensor Fallback
- FootDown = "Down", --Define Down Pad Panel Fallback
- HandUpRight = "Normal", --Define Up Right Hand Sensor Fallback
- HandLrRight = "Real", --Define Lower Right Hand Sensor Fallback
- FootUpRight = "DownLeft", --Define Up Right Pad Panel Fallback
- };
- USWN.RotateDirection = {
- FootUpLeft = 90,
- HandLrLeft = 0,
- HandUpLeft = 0,
- FootDown = 0,
- HandUpRight = 0,
- HandLrRight = 0,
- FootUpRight = 180,
- };
- USWN.StyleCode = function(nButton, nElement, nFolder)
- nButton = USWN.RedirDirection[nButton]; -- loading redirect directions
- if Var "Button" == "FootUpLeft" or Var "Button" == "FootUpRight" then
- nFolder = "pump/";
- if string.find(Var "Element", "Body") or string.find(Var "Element", "Bottomcap") or string.find(Var "Element", "Topcap") then
- nButton = "Center";
- end;
- if Var "Element" == "Receptor" then
- nFolder = "ez2/";
- end;
- end;
- if Var "Button" == "FootDown" then
- if Var "Element" == "Tap Note" or string.find(Var "Element", "Head") or Var "Element" == "Receptor" then
- else
- nFolder = "dance/";
- end;
- end;
- if nButton == "Real" then
- if Var "Element" == "Tap Note" or string.find(Var "Element", "Head") then
- else
- nButton = "Normal";
- end;
- end;
- return nButton, nElement, nFolder;
- end;
- --Direction Redirect and Rotation for Para Para Paradise.
- elseif nGamestate == "para" then
- USWN.RedirDirection = {
- Left = "Up", --Define Left Fallback
- UpLeft = "Up", --Define Up Left Fallback
- Up = "Up", --Define Up Fallback
- UpRight = "Up", --Define Up Right Fallback
- Right = "Up", --Define Right Fallback
- };
- USWN.RotateDirection = {
- Left = -90,
- UpLeft = -45,
- Up = 0,
- UpRight = 45,
- Right = 90,
- };
- USWN.StyleCode = function(nButton, nElement, nFolder)
- nButton = USWN.RedirDirection[nButton]; -- loading redirect directions
- --Really nothing needed here for para para paradise???
- --I know it even amazes myself!
- --Also if you wonder why I didnt do the bottomcap's to be like para para paradise
- --I hate a load of files, And people dont pay me enough!
- return nButton, nElement, nFolder;
- end;
- --Direction Redirect and Rotation for Dance Station 3DDX.
- elseif nGamestate == "ds3ddx" then
- USWN.RedirDirection = {
- HandLeft = "HandLeft", --Define Left Hand Sensor Fallback
- FootDownLeft = "DownLeft", --Define Down Left Pad Panel Fallback
- FootUpLeft = "DownLeft", --Define Up Left Pad Panel Fallback
- HandUp = "HandDown", --Define Front Hand Sensor Fallback
- HandDown = "HandDown", --Define Back Hand Sensor Fallback
- FootUpRight = "DownLeft", --Define Up Right Pad Panel Fallback
- FootDownRight = "DownLeft", --Define Down Right Pad Panel Fallback
- HandRight = "HandLeft", --Define Right Hand Sensor Fallback
- };
- USWN.RotateDirection = {
- HandLeft = 0,
- FootDownLeft = 0,
- FootUpLeft = 90,
- HandUp = 180,
- HandDown = 0,
- FootUpRight = 180,
- FootDownRight = -90,
- HandRight = 180,
- };
- USWN.StyleCode = function(nButton, nElement, nFolder)
- nButton = USWN.RedirDirection[nButton]; -- loading redirect directions
- if Var "Button" == "FootUpLeft" or Var "Button" == "FootUpRight" or Var "Button" == "FootDownLeft" or Var "Button" == "FootDownRight" then
- nFolder = "pump/";
- if Var "Button" == "FootDownLeft" or Var "Button" == "FootDownRight" then
- if Var "Element" == "Tap Note" or string.find(Var "Element", "Head") then
- nButton = "UpLeft";
- end;
- end;
- if string.find(Var "Element", "Body") or string.find(Var "Element", "Bottomcap") or string.find(Var "Element", "Topcap") then
- nButton = "Center";
- end;
- if Var "Element" == "Receptor" then
- nFolder = "ds3ddx/";
- end;
- end;
- if string.find(Var "Button", "Hand") then
- if string.find(Var "Element", "Body") or string.find(Var "Element", "Bottomcap") or string.find(Var "Element", "Topcap") then
- nFolder = "";
- nButton = "";
- nElement = "_Blank"; --There are no holds for hands silly
- end;
- end;
- return nButton, nElement, nFolder;
- end;
- --Direction Redirect and Rotation for Beatmania.
- elseif nGamestate == "beat" then
- USWN.RedirDirection = {
- Key1 = "Key1", --Define Key 1 Gray Fallback (Most Left)
- Key2 = "Key2", --Define Key 2 Blue Fallback
- Key3 = "Key1", --Define Key 3 Gray Fallback
- Key4 = "Key2", --Define Key 4 Blue Fallback (Center)
- Key5 = "Key1", --Define Key 5 Gray Fallback
- Key6 = "Key2", --Define Key 6 Blue Fallback
- Key7 = "Key1", --Define Key 7 Gray Fallback (Most Right)
- --Scratch = "Scratch", --Use if you want to define up and down globaly
- ["Scratch up"] = "Scratch", --Define Scratch Up Fallback
- ["Scratch down"] = "Scratch", --Define Scratch Down Fallback
- };
- USWN.RotateDirection = {
- Key1 = 0,
- Key2 = 0,
- Key3 = 0,
- Key4 = 0,
- Key5 = 0,
- Key6 = 0,
- Key7 = 0,
- --Scratch = 0, --Use if you want to define up and down globaly
- ["Scratch up"] = 0,
- ["Scratch down"] = 0,
- };
- USWN.StyleCode = function(nButton, nElement, nFolder)
- nButton = USWN.RedirDirection[nButton]; -- loading redirect directions
- return nButton, nElement, nFolder;
- end;
- --Direction Redirect and Rotation for Dance Maniax.
- elseif nGamestate == "maniax" then
- USWN.RedirDirection = {
- HandLrLeft = "HandLrLeft", --Define Bottom Left Hand Sensor Fallback
- HandUpLeft = "HandLrLeft", --Define Top Left Hand Sensor Fallback
- HandUpRight = "HandLrLeft", --Define Top Right Hand Sensor Fallback
- HandLrLeft = "HandLrLeft", --Define Bottom Right Hand Sensor Fallback
- };
- USWN.RotateDirection = {
- HandLrLeft = 0,
- HandUpLeft = 0,
- HandUpRight = 0,
- HandLrLeft = 0,
- };
- USWN.StyleCode = function(nButton, nElement, nFolder)
- nButton = USWN.RedirDirection[nButton]; -- loading redirect directions
- return nButton, nElement, nFolder;
- end;
- --Direction Redirect and Rotation for TechnoMotion.
- elseif nGamestate == "techno" then
- USWN.RedirDirection = {
- DownLeft = "DownLeft", --Define Down Left Pad Panel Fallback
- Left = "Left", --Define Left Pad Panel Fallback
- UpLeft = "UpLeft", --Define Up Left Pad Panel Fallback
- Down = "Down", --Define Down Pad Panel Fallback
- Up = "Up", --Define Up Pad Panel Fallback
- UpRight = "UpRight", --Define Up Right Pad Panel Fallback
- Right = "Right", --Define Right Pad Panel Fallback
- DownRight = "DownRight", --Define Down Right Pad Panel Fallback
- };
- USWN.RotateDirection = {
- DownLeft = 0,
- Left = 0,
- UpLeft = 0,
- Down = 0,
- Up = 0,
- UpRight = 0,
- Right = 0,
- DownRight = 0,
- };
- USWN.StyleCode = function(nButton, nElement, nFolder)
- nButton = USWN.RedirDirection[nButton]; -- loading redirect directions
- return nButton, nElement, nFolder;
- end;
- --Direction Redirect and Rotation for Pop'n Music.
- elseif nGamestate == "popn" then
- USWN.RedirDirection = {
- ["Left White"] = "White", --Left White Button Fallback
- ["Left Yellow"] = "Yellow", --Left Yellow Button Fallback
- ["Left Green"] = "Green", --Left Green Button Fallback
- ["Left Blue"] = "Blue", --Left Blue Button Fallback
- Red = "Red", --Center Red Button Fallback
- ["Right Blue"] = "Blue", --Right Blue Button Fallback
- ["Right Green"] = "Green", --Right Green Button Fallback
- ["Right Yellow"] = "Yellow", --Right Yellow Button Fallback
- ["Right White"] = "White", --Right White Button Fallback
- };
- USWN.RotateDirection = {
- ["Left White"] = 0,
- ["Left Yellow"] = 0,
- ["Left Green"] = 0,
- ["Left Blue"] = 0,
- Red = 0,
- ["Right Blue"] = 0,
- ["Right Green"] = 0,
- ["Right Yellow"] = 0,
- ["Right White"] = 0,
- };
- USWN.StyleCode = function(nButton, nElement, nFolder)
- nButton = USWN.RedirDirection[nButton]; -- loading redirect directions
- return nButton, nElement, nFolder;
- end;
- --Global fallback incase of non known gametype.
- else
- USWN.RedirDirection = {};
- USWN.RotateDirection = {};
- USWN.StyleCode = function(nButton, nElement, nFolder)
- return nButton, nElement, nFolder;
- end;
- end;
- --/!\Lights is not a valid Gamemode./!\
- --End Direction Redirect
- USWN.ElementToRotate = {
- ["Receptor"] = true,
- ["Tap Explosion Bright"] = true,
- ["Tap Explosion Dim"] = true,
- ["Tap Note"] = true,
- ["Tap Fake"] = true,
- ["Tap Addition"] = true,
- ["Hold Explosion"] = true,
- ["Hold Head Active"] = true,
- ["Hold Head Inactive"] = true,
- ["Roll Explosion"] = true,
- ["Roll Head Active"] = true,
- ["Roll Head Inactive"] = true,
- };
- --Use in case we want a part to have a blank image.
- USWN.Blank = {
- ["Hold Tail Active"] = true,
- ["Hold Tail Inactive"] = true,
- ["Roll Tail Active"] = true,
- ["Roll Tail Inactive"] = true,
- };
- --here we define extra code and the main stuff
- USWN.MainCode = function(nButton, nElement, nFolder)
- nButton, nElement, nFolder = USWN.StyleCode(nButton,nElement,nFolder);
- if Var "Element" == "Explosion" then
- USWN.BaseRotationZ = nil;
- end;
- if Var "Element" == "Tap Explosion Dim" or
- Var "Element" == "Hold Explosion" or
- Var "Element" == "Roll Explosion" then
- nElement = "Tap Explosion Bright";
- end;
- if nGamestate ~= "para" then
- if string.find(Var "Element", "Head") then
- nElement = "Tap Note";
- end;
- end;
- --We put mines at end because we dont want it to be overwriten by other stuff.
- if Var "Element" == "Tap Mine" then
- nButton = "Down";
- nFolder = "";
- end;
- return nButton, nElement, nFolder;
- end;
- --Closing, /!\Dont edit/!\.
- local function Call()
- local nButton = Var "Button";
- local nElement = Var "Element";
- if USWN.Blank[nElement] then
- local blk;
- if nSprite then
- blk = LoadActor( "_blank" );
- else
- blk = Def.Actor {};
- end;
- return blk .. {
- cmd(visible,false);
- };
- end;
- local nButtonToLoad, nElementToLoad, nFolderToLoad = USWN.MainCode(nButton,nElement,nFolder);
- local nPath = NOTESKIN:GetPath(nFolderToLoad..nButtonToLoad,nElementToLoad);
- local n = LoadActor( nPath );
- if USWN.ElementToRotate[nElement] then
- n.BaseRotationZ = USWN.RotateDirection[nButton];
- end;
- return n;
- end;
- USWN.Load = Call;
- USWN.CommonLoad = Call;
- return USWN;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement