+ Fix stupid glow, 1/3rd of MIGS/StepMania Online Display.
This commit is contained in:
@@ -50,6 +50,8 @@ function ScreenSelectMusic:setupmusicstagemods()
|
||||
GAMESTATE:SetPreferredDifficulty( pn, difficulty )
|
||||
MESSAGEMAN:Broadcast( "PlayerOptionsChanged", {PlayerNumber = pn} )
|
||||
end
|
||||
|
||||
-- if PREFSMAN:GetPreference("
|
||||
|
||||
GAMESTATE:SetSongOptions( "ModsLevel_Stage", so )
|
||||
MESSAGEMAN:Broadcast( "SongOptionsChanged" )
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
local vStats = STATSMAN:GetCurStageStats();
|
||||
local function CreateStats( pnPlayer )
|
||||
-- Actor Templates
|
||||
local aLabel = LoadFont("Common Normal") .. { Text="..."; InitCommand=cmd(zoom,0.5;shadowlength,1;horizalign,left); };
|
||||
local aText = LoadFont("Common Normal") .. { Text="..."; InitCommand=cmd(zoom,0.5;shadowlength,1;horizalign,left); };
|
||||
-- DA STATS, JIM!!
|
||||
local pnStageStats = vStats:GetPlayerStageStats( pnPlayer );
|
||||
-- Organized Stats.
|
||||
local tStats = {
|
||||
W1 = pnStageStats:GetTapNoteScores('TapNoteScore_W1');
|
||||
W2 = pnStageStats:GetTapNoteScores('TapNoteScore_W2');
|
||||
W3 = pnStageStats:GetTapNoteScores('TapNoteScore_W3');
|
||||
W4 = pnStageStats:GetTapNoteScores('TapNoteScore_W4');
|
||||
W5 = pnStageStats:GetTapNoteScores('TapNoteScore_W5');
|
||||
Miss = pnStageStats:GetTapNoteScores('TapNoteScore_Miss');
|
||||
HitMine = pnStageStats:GetTapNoteScores('TapNoteScore_HitMine');
|
||||
AvoidMine = pnStageStats:GetTapNoteScores('TapNoteScore_AvoidMine');
|
||||
Held = pnStageStats:GetHoldNoteScores('HoldNoteScore_Held');
|
||||
LetGo = pnStageStats:GetHoldNoteScores('HoldNoteScore_LetGo');
|
||||
};
|
||||
-- Organized Equation Values
|
||||
local tValues = {
|
||||
-- marvcount*7 + perfcount*6 + greatcount*5 + goodcount*4 + boocount*2 + okcount*7
|
||||
ITG = ( tStats["W1"]*7 + tStats["W2"]*6 + tStats["W3"]*5 + tStats["W4"]*4 + tStats["W5"]*2 + tStats["Held"]*7 ),
|
||||
-- (marvcount + perfcount + greatcount + goodcount + boocount + misscount + okcount + ngcount)*7
|
||||
ITG_MAX = ( tStats["W1"] + tStats["W2"] + tStats["W3"] + tStats["W4"] + tStats["W5"] + tStats["Miss"] + tStats["Held"] + tStats["LetGo"] )*7,
|
||||
-- marvcount*3 + perfcount*2 + greatcount*1 - boocount*4 - misscount*8 + okcount*6
|
||||
MIGS = ( tStats["W1"]*3 + tStats["W2"]*2 + tStats["W3"] - tStats["W5"]*4 - tStats["Miss"]*8 + tStats["Held"]*6 ),
|
||||
-- (marvcount + perfcount + greatcount + goodcount + boocount + misscount)*3 + (okcount + ngcount)*6
|
||||
MIGS_MAX = ( (tStats["W1"] + tStats["W2"] + tStats["W3"] + tStats["W4"] + tStats["W5"] + tStats["Miss"])*3 + (tStats["Held"] + tStats["LetGo"])*6 ),
|
||||
|
||||
};
|
||||
--
|
||||
local t = Def.ActorFrame {};
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
InitCommand=cmd(y,-16);
|
||||
LoadActor(THEME:GetPathG("ScreenTitleMenu","PreferenceFrame")) .. {
|
||||
InitCommand=cmd(zoom,0.875;diffuse,PlayerColor( pnPlayer ));
|
||||
};
|
||||
aLabel .. { Text="ITG DP:"; InitCommand=cmd(x,-64) };
|
||||
aText .. { Text=string.format("%04i",tValues["ITG"]); InitCommand=cmd(x,-8;y,5;vertalign,bottom;zoom,0.675); };
|
||||
aText .. { Text="/"; InitCommand=cmd(x,28;y,5;vertalign,bottom;zoom,0.5;diffusealpha,0.5); };
|
||||
aText .. { Text=string.format("%04i",tValues["ITG_MAX"]); InitCommand=cmd(x,32;y,5;vertalign,bottom;zoom,0.5); };
|
||||
};
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
InitCommand=cmd(y,16);
|
||||
LoadActor(THEME:GetPathG("ScreenTitleMenu","PreferenceFrame")) .. {
|
||||
InitCommand=cmd(zoom,0.875;diffuse,PlayerColor( pnPlayer ));
|
||||
};
|
||||
aLabel .. { Text="MIGS DP:"; InitCommand=cmd(x,-64) };
|
||||
aText .. { Text=string.format("%04i",tValues["MIGS"]); InitCommand=cmd(x,-8;y,5;vertalign,bottom;zoom,0.675); };
|
||||
aText .. { Text="/"; InitCommand=cmd(x,28;y,5;vertalign,bottom;zoom,0.5;diffusealpha,0.5); };
|
||||
aText .. { Text=string.format("%04i",tValues["MIGS_MAX"]); InitCommand=cmd(x,32;y,5;vertalign,bottom;zoom,0.5); };
|
||||
};
|
||||
return t
|
||||
end;
|
||||
local t = Def.ActorFrame {};
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
InitCommand=cmd(x,math.floor(SCREEN_CENTER_X*0.5)-8;y,SCREEN_CENTER_Y);
|
||||
--
|
||||
CreateStats( PLAYER_1 );
|
||||
};
|
||||
return t
|
||||
@@ -0,0 +1,86 @@
|
||||
local ss = STATSMAN:GetCurStageStats();
|
||||
local pss = ss:GetPlayerStageStats('PlayerNumber_P1');
|
||||
local misscount = pss:GetTapNoteScores('TapNoteScore_Miss');
|
||||
local boocount = pss:GetTapNoteScores('TapNoteScore_W5');
|
||||
local goodcount = pss:GetTapNoteScores('TapNoteScore_W4');
|
||||
local greatcount = pss:GetTapNoteScores('TapNoteScore_W3');
|
||||
local perfcount = pss:GetTapNoteScores('TapNoteScore_W2');
|
||||
local marvcount = pss:GetTapNoteScores('TapNoteScore_W1');
|
||||
local minehitcount = pss:GetTapNoteScores('TapNoteScore_HitMine');
|
||||
local minemisscount = pss:GetTapNoteScores('TapNoteScore_AvoidMine');
|
||||
local okcount = pss:GetHoldNoteScores('HoldNoteScore_Held');
|
||||
local ngcount = pss:GetHoldNoteScores('HoldNoteScore_LetGo');
|
||||
local ITGdp = marvcount*7 + perfcount*6 + greatcount*5 + goodcount*4 + boocount*2 + okcount*7
|
||||
local ITGdpmax = (marvcount + perfcount + greatcount + goodcount + boocount + misscount + okcount + ngcount)*7
|
||||
local MIGSdp = marvcount*3 + perfcount*2 + greatcount*1 - boocount*4 - misscount*8 + okcount*6
|
||||
local MIGSdpmax = (marvcount + perfcount + greatcount + goodcount + boocount + misscount)*3 + (okcount + ngcount)*6
|
||||
local histogram = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
|
||||
local total = 0
|
||||
local maxValue = 0;
|
||||
print("John11length: "..#histogram);
|
||||
|
||||
for i=1,#tTotalJudgmentsSigned do
|
||||
print("John11Timings: "..i.." - "..tTotalJudgmentsSigned[i])
|
||||
local index = math.floor((0.18-tTotalJudgmentsSigned[i])*(#histogram/.36));
|
||||
print("John11Index: "..i.." - "..index)
|
||||
if index >= 0 and index <= #histogram - 1 then
|
||||
histogram[index] = histogram[index] + 1
|
||||
total = total + 1
|
||||
if histogram[index] > maxValue then
|
||||
maxValue = histogram[index]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for i=1,#histogram do
|
||||
print("John11Judgments: "..i.." - "..histogram[i])
|
||||
end
|
||||
|
||||
local t = Def.ActorFrame {}
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
InitCommand=cmd(x,SCREEN_CENTER_X/3;y,SCREEN_CENTER_Y);
|
||||
LoadFont("Common Normal") .. {
|
||||
Text="MIGS DP: "..tostring(MIGSdp).."/"..tostring(MIGSdpmax).."\nITG DP: "..tostring(ITGdp).."/"..tostring(ITGdpmax).."\nOffset Avg: "..RoundTo(tTimingDifferenceAverage,5).."\nAbs Offset Avg: "..RoundTo(tTimingDifferenceAbsAverage,5).."\nEarly Taps: "..tEarlyHits.."\nLate Taps: "..tLateHits;
|
||||
InitCommand=cmd(y,-4;shadowlength,1;diffuse,Color("Red");zoom,0.5)
|
||||
};
|
||||
}
|
||||
|
||||
for i=1,#histogram do
|
||||
local offset = -1
|
||||
if i > #histogram/2 then
|
||||
offset = 1
|
||||
end
|
||||
t[#t+1] = Def.Quad {
|
||||
InitCommand=cmd(diffuse,Color("Red");zoomtowidth,300/#histogram-1;zoomtoheight,histogram[#histogram-i]/maxValue*150;x,SCREEN_CENTER_X+100+300/#histogram*i+offset;y,SCREEN_CENTER_Y-histogram[#histogram-i]/maxValue*150/2);
|
||||
}
|
||||
end
|
||||
|
||||
t[#t+1] = Def.Quad {
|
||||
InitCommand=cmd(x,SCREEN_CENTER_X+250;y,SCREEN_CENTER_Y+3;zoomtowidth,300;zoomtoheight,5;diffuse,color("#FFFFFF"));
|
||||
}
|
||||
|
||||
t[#t+1] = Def.Quad {
|
||||
InitCommand=cmd(x,SCREEN_CENTER_X+252;y,SCREEN_CENTER_Y-75;zoomtowidth,1;zoomtoheight,150;diffuse,color("#000000"));
|
||||
}
|
||||
|
||||
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
InitCommand=cmd(x,SCREEN_CENTER_X+125;y,SCREEN_CENTER_Y+15);
|
||||
LoadFont("Common Normal") .. {
|
||||
Text="Early";
|
||||
InitCommand=cmd(shadowlength,1;diffuse,Color("#FF0000");zoom,0.5)
|
||||
};
|
||||
}
|
||||
|
||||
t[#t+1] = Def.ActorFrame {
|
||||
InitCommand=cmd(x,SCREEN_CENTER_X+375;y,SCREEN_CENTER_Y+15);
|
||||
LoadFont("Common Normal") .. {
|
||||
Text="Late";
|
||||
InitCommand=cmd(shadowlength,1;diffuse,Color("#FF0000");zoom,0.5)
|
||||
};
|
||||
}
|
||||
|
||||
print("John11Total: "..total)
|
||||
print("John11MaxValue: "..maxValue)
|
||||
|
||||
return t
|
||||
@@ -638,7 +638,7 @@ ShowMeter=true
|
||||
ZeroMeterString="0"
|
||||
MeterX=56
|
||||
MeterY=0
|
||||
MeterOnCommand=shadowlength,1;zoom,0.65
|
||||
MeterOnCommand=shadowlength,1;zoom,0.65;textglowmode,'TextGlowMode_Inner';
|
||||
MeterOffCommand=
|
||||
MeterSetCommand=%function(self,param) \
|
||||
if param.CustomDifficulty then \
|
||||
|
||||
Reference in New Issue
Block a user