07-31-2010, 10:31 PM
|
#1 |
|
Member
|
Post rating: rate
I had to format the readme part and put the code in a pastie because it reached the 10000 chars limit
Custom Code Detector by Daisuke Master Whats this? Just that, a custom codedetector, you can add the codenames as exact mods and this thingy will do whatever you wanted to do with the oh-so-known harcoded codedetector. I kind of don't like the codedetector for various reasons, that's why I made this (also the remaining stuff happened by accident lol), anyway, if you feel like wanting this in your theme, go ahead! no problem, just let me know that you're using it and that this was useful for you ^^ How to use First of all, put this lua module under the Scripts folder of your theme. Using codeset, put this in a CodeMessageCommand, inside a function command, under ScreenSelectMusic, like this: Code:
CodeMessageCommand=function(self) CustomCodeDetector() end; Code:
CodeMessageCommand=function(self,params) CustomCodeDetector(params.Name, params.PlayerNumber) end; Code:
CodeMessageCommand=function(self,params) local code = params.Name local player = params.PlayerNumber if not GAMESTATE:IsHumanPlayer(player) then return end; CustomCodeDetector(code, player) end; Code:
CodeMessageCommand=function(self,params)
local code = params.Name
local player = params.PlayerNumber
if not GAMESTATE:IsHumanPlayer(player) then return end;
if CustomCodeDetector(code, player, true) then
--idk what to put here so eh...
else
--handle here other codes for misc purposes
end
SOUND:PlayOnce(THEME:GetPathS("ScreenSelectMusic","Options"))
end;
What more? Oh yes, you'll need a CodeNames line under ScreenSelectMusic Code:
[ScreenSelectMusic] CodeNames="Noteskin,Speed,Cancel,Dark,Mirror" ;main codes CodeNoteskin="Up,Up,Down,Down,Left,Right,Left,Right" CodeSpeed="Left,Right,Left,Right,Down" CodeCancel="Select,Select" ;secondary codes CodeDark="Down,Down,Left,Right,Down" CodeMirror="Down,Left,Up,Down,Right,Up" rest are optional (dark and mirror as examples) Caveats
TODO list
Licensing IMO it's important, I don't like to see my work being hijacked by someone else and claiming as it's own (others don't like that either) so here we go: I'm licensing this under Creative Commons by-sa 3.0 This means that: You can share and adapt this code as you like/need/want withouth worry, but you must attribute me, and if you release your modified work you must license it with the same license as this. Credits
Thanks
Final notes That's all you should need to know for now, and as I said, feel free to use this and let me know if this was useful for you ^^ And the code itself (along with the previous notes but in an ASCII format) 02 CustomCodeDetector.lua Hope you like it :)
__________________
Last edited by Daisuke Master; 08-04-2010 at 09:12 PM.. |
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Region Code | NeoSpearBlade | General Video Games | 1 | 05-22-2010 01:13 AM |
| Help with code | goofwear | General questions | 3 | 02-14-2010 06:50 AM |
| help with this code please... | Daisuke Master | Theme/Noteskin Help/Questions/Requests | 2 | 12-08-2008 06:29 PM |
| source code | orsela | General StepMania | 4 | 08-14-2008 11:14 AM |
| hello. This is code. | Sniper257 | General questions | 13 | 12-06-2007 06:30 AM |