Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Ok now its time for the Noteskin.lua, Normaly first make the metric.ini and then the Noteskin.lua, Which I also did with this noteskin.
- The Noteskin.lua fallsback on the noteskin thats been defined in the metric.ini, Which is common in this case.
- The Noteskin.lua is a file which we used for lets say advanced defining how noteskins act, While the metric.ini uses pre-defined code.
- In the Noteskin.lua we can do a load of cool stuff to a noteskins, And add redirects and everything, So we dont have to use a load of redir/duplicate files.
- Also to edit a code out there are two ways, there is -- and then just he code behind it, Or --[[ --]], which can be used with enters.
- We dont have to add -- to the last brackets but we still do it incase we remove the --[[ and leave the ]] because that will break the code and result in errors.
- --]]
- --Okey lets start with defining everything as ret, so we can return it at the end.
- local ret = ... or {};
- --Also I'm gonna add a extra local, It might be silly but it helps me and people when this mistake of using var instead of Var because its case sensetive.
- local var = Var;
- --And now we define the redirect table, We use this table so we dont have to use massive code for all the directions redirecting on to Down.
- --Because the images are basicly the same, It just needs to rotate a bit, In the 3.9 line we used .redir files eveywere, Which used a load of space.
- --.redir files still work but most people that use sm5 and know how to work with lua dont use them anymore, Also with this code.
- --You might wonder what is calling some of the code, Check out the Noteskin.lua in the common noteskin, Because they are defined there.
- --I recomend you to not touch or play with the common Noteskin.lua tough, You might break the code and be confused for hours.
- ret.RedirTable =
- {
- Left = "Down",
- UpLeft = "Down",
- Down = "Down",
- Up = "Down",
- UpRight = "Down",
- Right = "Down",
- };
- --Anyways lets start with the redirects shall we, So first we are going to define the stuff he that we defined in the common Noteskin.lua so we can use them.
- --We define the ret.Redir to be called OldRedir, So we dont get problems, We can also call it OneDoesNotSimpelyRedir, Or whatever we want.
- --But we are used to OldRedir, so we use that, same with the local ret = ... or {};, You can call it whatever you want, But still using the standards are best.
- local OldRedir = ret.Redir;
- --I always wondered why we use this to define sButton and sElement, Because we also have the Var option, So we could basicly use.
- --local sButton - Var "Button";, Same for element, But this also works, And it has been used for some time, And I dont feel like changing it ;)
- ret.Redir = function(sButton, sElement)
- sButton, sElement = OldRedir(sButton, sElement);
- --I'm going to define some stuff here for my silly testing code, Its nothing important.
- 4thPreColour = NOTESKIN:GetMetricA("JousDefine", "4thColour");
- if 4thPreColour == "Red" then 4thColour = "ff0000";
- elseif 4thPreColour == "Blue" then 4thColour = "0000ff";
- elseif 4thPreColour == "Purple" then 4thColour = "662d91";
- elseif 4thPreColour == "Yellow" then 4thColour = "ffff00";
- elseif 4thPreColour == "Pink" then 4thColour = "ff00ff";
- elseif 4thPreColour == "Orange" then 4thColour = "f7941d";
- elseif 4thPreColour == "Aqua" then 4thColour = "00ffff";
- elseif 4thPreColour == "Green" then 4thColour = "00c600";
- elseif 4thPreColour == "Gray" then 4thColour = "848484";
- else 4thColour = 4thPreColour; end
- 8thPreColour = NOTESKIN:GetMetricA("JousDefine", "8thColour");
- if 8thPreColour == "Red" then 8thColour = "ff0000";
- elseif 8thPreColour == "Blue" then 8thColour = "0000ff";
- elseif 8thPreColour == "Purple" then 8thColour = "662d91";
- elseif 8thPreColour == "Yellow" then 8thColour = "ffff00";
- elseif 8thPreColour == "Pink" then 8thColour = "ff00ff";
- elseif 8thPreColour == "Orange" then 8thColour = "f7941d";
- elseif 8thPreColour == "Aqua" then 8thColour = "00ffff";
- elseif 8thPreColour == "Green" then 8thColour = "00c600";
- elseif 8thPreColour == "Gray" then 8thColour = "848484";
- else 8thColour = 8thPreColour; end
- 12thPreColour = NOTESKIN:GetMetricA("JousDefine", "12thColour");
- if 12thPreColour == "Red" then 12thColour = "ff0000";
- elseif 12thPreColour == "Blue" then 12thColour = "0000ff";
- elseif 12thPreColour == "Purple" then 12thColour = "662d91";
- elseif 12thPreColour == "Yellow" then 12thColour = "ffff00";
- elseif 12thPreColour == "Pink" then 12thColour = "ff00ff";
- elseif 12thPreColour == "Orange" then 12thColour = "f7941d";
- elseif 12thPreColour == "Aqua" then 12thColour = "00ffff";
- elseif 12thPreColour == "Green" then 12thColour = "00c600";
- elseif 12thPreColour == "Gray" then 12thColour = "848484";
- else 12thColour = 12thPreColour; end
- 16thPreColour = NOTESKIN:GetMetricA("JousDefine", "16thColour");
- if 16thPreColour == "Red" then 16thColour = "ff0000";
- elseif 16thPreColour == "Blue" then 16thColour = "0000ff";
- elseif 16thPreColour == "Purple" then 16thColour = "662d91";
- elseif 16thPreColour == "Yellow" then 16thColour = "ffff00";
- elseif 16thPreColour == "Pink" then 16thColour = "ff00ff";
- elseif 16thPreColour == "Orange" then 16thColour = "f7941d";
- elseif 16thPreColour == "Aqua" then 16thColour = "00ffff";
- elseif 16thPreColour == "Green" then 16thColour = "00c600";
- elseif 16thPreColour == "Gray" then 16thColour = "848484";
- else 16thColour = 16thPreColour; end
- 24thPreColour = NOTESKIN:GetMetricA("JousDefine", "24thColour");
- if 24thPreColour == "Red" then 24thColour = "ff0000";
- elseif 24thPreColour == "Blue" then 24thColour = "0000ff";
- elseif 24thPreColour == "Purple" then 24thColour = "662d91";
- elseif 24thPreColour == "Yellow" then 24thColour = "ffff00";
- elseif 24thPreColour == "Pink" then 24thColour = "ff00ff";
- elseif 24thPreColour == "Orange" then 24thColour = "f7941d";
- elseif 24thPreColour == "Aqua" then 24thColour = "00ffff";
- elseif 24thPreColour == "Green" then 24thColour = "00c600";
- elseif 24thPreColour == "Gray" then 24thColour = "848484";
- else 24thColour = 24thPreColour; end
- 32ndPreColour = NOTESKIN:GetMetricA("JousDefine", "32ndColour");
- if 32ndPreColour == "Red" then 32ndColour = "ff0000";
- elseif 32ndPreColour == "Blue" then 32ndColour = "0000ff";
- elseif 32ndPreColour == "Purple" then 32ndColour = "662d91";
- elseif 32ndPreColour == "Yellow" then 32ndColour = "ffff00";
- elseif 32ndPreColour == "Pink" then 32ndColour = "ff00ff";
- elseif 32ndPreColour == "Orange" then 32ndColour = "f7941d";
- elseif 32ndPreColour == "Aqua" then 32ndColour = "00ffff";
- elseif 32ndPreColour == "Green" then 32ndColour = "00c600";
- elseif 32ndPreColour == "Gray" then 32ndColour = "848484";
- else 32ndColour = 32ndPreColour; end
- 48thPreColour = NOTESKIN:GetMetricA("JousDefine", "48thColour");
- if 48thPreColour == "Red" then 48thColour = "ff0000";
- elseif 48thPreColour == "Blue" then 48thColour = "0000ff";
- elseif 48thPreColour == "Purple" then 48thColour = "662d91";
- elseif 48thPreColour == "Yellow" then 48thColour = "ffff00";
- elseif 48thPreColour == "Pink" then 48thColour = "ff00ff";
- elseif 48thPreColour == "Orange" then 48thColour = "f7941d";
- elseif 48thPreColour == "Aqua" then 48thColour = "00ffff";
- elseif 48thPreColour == "Green" then 48thColour = "00c600";
- elseif 48thPreColour == "Gray" then 48thColour = "848484";
- else 48thColour = 48thPreColour; end
- 64thPreColour = NOTESKIN:GetMetricA("JousDefine", "64thColour");
- if 64thPreColour == "Red" then 64thColour = "ff0000";
- elseif 64thPreColour == "Blue" then 64thColour = "0000ff";
- elseif 64thPreColour == "Purple" then 64thColour = "662d91";
- elseif 64thPreColour == "Yellow" then 64thColour = "ffff00";
- elseif 64thPreColour == "Pink" then 64thColour = "ff00ff";
- elseif 64thPreColour == "Orange" then 64thColour = "f7941d";
- elseif 64thPreColour == "Aqua" then 64thColour = "00ffff";
- elseif 64thPreColour == "Green" then 64thColour = "00c600";
- elseif 64thPreColour == "Gray" then 64thColour = "848484";
- else 64thColour = 64thPreColour; end
- 192ndPreColour = NOTESKIN:GetMetricA("JousDefine", "192ndColour");
- if 192ndPreColour == "Red" then 192ndColour = "ff0000";
- elseif 192ndPreColour == "Blue" then 192ndColour = "0000ff";
- elseif 192ndPreColour == "Purple" then 192ndColour = "662d91";
- elseif 192ndPreColour == "Yellow" then 192ndColour = "ffff00";
- elseif 192ndPreColour == "Pink" then 192ndColour = "ff00ff";
- elseif 192ndPreColour == "Orange" then 192ndColour = "f7941d";
- elseif 192ndPreColour == "Aqua" then 192ndColour = "00ffff";
- elseif 192ndPreColour == "Green" then 192ndColour = "00c600";
- elseif 192ndPreColour == "Gray" then 192ndColour = "848484";
- else 192ndColour = 192ndPreColour; end
- ITGHolds = NOTESKIN:GetMetricA("JousDefine", "ITGHolds");
- ColourHoldHeads = NOTESKIN:GetMetricA("JousDefine", "ColourHoldHeads");
- --more of my silly code so ;)
- if ITGHolds == "False" then
- --if we dont have it on ITG mode, we use holds for every direction like ddr
- if not string.find(sElement, "Head") and
- not string.find(sElement, "Explosion") then
- if string.find(sElement, "Hold") or
- string.find(sElement, "Roll") then
- return sButton, sElement;
- end
- end
- else end
- --If you have looked at midi-note for example you have noticed that this is at the bottom of the ret.Redir parent, But I put it on top for a reason.
- --When we put it at the bottom, All directions we defined for sButton will be overwrited, In other words, They will be ignored, And we dont want that.
- sButton = ret.RedirTable[sButton];
Add Comment
Please, Sign In to add comment