[sm130futures] Add judged segments to PSS.
LUA DDR Extreme scoring is more accurate, but needs hold tweaks.
This commit is contained in:
@@ -63,12 +63,11 @@ r['DDR Extreme'] = function(params, pss)
|
|||||||
local steps = GAMESTATE:GetCurrentSteps(params.Player);
|
local steps = GAMESTATE:GetCurrentSteps(params.Player);
|
||||||
local radarValues = steps:GetRadarValues(params.Player);
|
local radarValues = steps:GetRadarValues(params.Player);
|
||||||
local baseScore = (steps:IsAnEdit() and
|
local baseScore = (steps:IsAnEdit() and
|
||||||
5 or steps:GetMeter()) * 10000000;
|
5 or steps:GetMeter()) * 1000000;
|
||||||
if not Shared.CurrentStep then Shared.CurrentStep = -1 end;
|
local currentStep = pss:GetJudgedSegments();
|
||||||
Shared.CurrentStep = Shared.CurrentStep + 1;
|
|
||||||
local totalItems = GetTotalItems(radarValues);
|
local totalItems = GetTotalItems(radarValues);
|
||||||
local singleStep = (1 + totalItems) * totalItems / 2;
|
local singleStep = (1 + totalItems) * totalItems / 2;
|
||||||
local stepLast = math.floor(baseScore / singleStep) * (Shared.CurrentStep + 1);
|
local stepLast = math.floor(baseScore / singleStep) * (currentStep);
|
||||||
local judgeScore = 0;
|
local judgeScore = 0;
|
||||||
if (params.HoldNoteScore == 'HoldNoteScore_Held') then
|
if (params.HoldNoteScore == 'HoldNoteScore_Held') then
|
||||||
judgeScore = judgmentBase['TapNoteScore_W1'];
|
judgeScore = judgmentBase['TapNoteScore_W1'];
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ void PlayerStageStats::Init()
|
|||||||
m_iCurScoreMultiplier = 1;
|
m_iCurScoreMultiplier = 1;
|
||||||
m_iScore = 0;
|
m_iScore = 0;
|
||||||
m_iMaxScore = 0;
|
m_iMaxScore = 0;
|
||||||
|
m_iJudgedSegments = 0;
|
||||||
m_iCurMaxScore = 0;
|
m_iCurMaxScore = 0;
|
||||||
m_iSongsPassed = 0;
|
m_iSongsPassed = 0;
|
||||||
m_iSongsPlayed = 0;
|
m_iSongsPlayed = 0;
|
||||||
@@ -87,6 +88,7 @@ void PlayerStageStats::AddStats( const PlayerStageStats& other )
|
|||||||
m_iCurMissCombo += other.m_iCurMissCombo;
|
m_iCurMissCombo += other.m_iCurMissCombo;
|
||||||
m_iScore += other.m_iScore;
|
m_iScore += other.m_iScore;
|
||||||
m_iMaxScore += other.m_iMaxScore;
|
m_iMaxScore += other.m_iMaxScore;
|
||||||
|
m_iJudgedSegments += other.m_iJudgedSegments;
|
||||||
m_iCurMaxScore += other.m_iCurMaxScore;
|
m_iCurMaxScore += other.m_iCurMaxScore;
|
||||||
m_radarPossible += other.m_radarPossible;
|
m_radarPossible += other.m_radarPossible;
|
||||||
m_radarActual += other.m_radarActual;
|
m_radarActual += other.m_radarActual;
|
||||||
@@ -328,6 +330,7 @@ void PlayerStageStats::ResetScoreForLesson()
|
|||||||
m_iScore = 0;
|
m_iScore = 0;
|
||||||
m_iCurMaxScore = 0;
|
m_iCurMaxScore = 0;
|
||||||
m_iMaxScore = 0;
|
m_iMaxScore = 0;
|
||||||
|
m_iJudgedSegments = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayerStageStats::SetLifeRecordAt( float fLife, float fStepsSecond )
|
void PlayerStageStats::SetLifeRecordAt( float fLife, float fStepsSecond )
|
||||||
@@ -679,6 +682,7 @@ public:
|
|||||||
DEFINE_METHOD( GetCurrentMissCombo, m_iCurMissCombo )
|
DEFINE_METHOD( GetCurrentMissCombo, m_iCurMissCombo )
|
||||||
DEFINE_METHOD( GetCurrentScoreMultiplier, m_iCurScoreMultiplier )
|
DEFINE_METHOD( GetCurrentScoreMultiplier, m_iCurScoreMultiplier )
|
||||||
DEFINE_METHOD( GetScore, m_iScore )
|
DEFINE_METHOD( GetScore, m_iScore )
|
||||||
|
DEFINE_METHOD( GetJudgedSegments, m_iJudgedSegments )
|
||||||
DEFINE_METHOD( GetTapNoteScores, m_iTapNoteScores[Enum::Check<TapNoteScore>(L, 1)] )
|
DEFINE_METHOD( GetTapNoteScores, m_iTapNoteScores[Enum::Check<TapNoteScore>(L, 1)] )
|
||||||
DEFINE_METHOD( GetHoldNoteScores, m_iHoldNoteScores[Enum::Check<HoldNoteScore>(L, 1)] )
|
DEFINE_METHOD( GetHoldNoteScores, m_iHoldNoteScores[Enum::Check<HoldNoteScore>(L, 1)] )
|
||||||
DEFINE_METHOD( FullCombo, FullCombo() )
|
DEFINE_METHOD( FullCombo, FullCombo() )
|
||||||
@@ -735,6 +739,7 @@ public:
|
|||||||
ADD_METHOD( GetCurrentMissCombo );
|
ADD_METHOD( GetCurrentMissCombo );
|
||||||
ADD_METHOD( GetCurrentScoreMultiplier );
|
ADD_METHOD( GetCurrentScoreMultiplier );
|
||||||
ADD_METHOD( GetScore );
|
ADD_METHOD( GetScore );
|
||||||
|
ADD_METHOD( GetJudgedSegments );
|
||||||
ADD_METHOD( GetTapNoteScores );
|
ADD_METHOD( GetTapNoteScores );
|
||||||
ADD_METHOD( GetHoldNoteScores );
|
ADD_METHOD( GetHoldNoteScores );
|
||||||
ADD_METHOD( FullCombo );
|
ADD_METHOD( FullCombo );
|
||||||
|
|||||||
+34
-8
@@ -51,14 +51,28 @@ public:
|
|||||||
int m_iPossibleGradePoints;
|
int m_iPossibleGradePoints;
|
||||||
int m_iTapNoteScores[NUM_TapNoteScore];
|
int m_iTapNoteScores[NUM_TapNoteScore];
|
||||||
int m_iHoldNoteScores[NUM_HoldNoteScore];
|
int m_iHoldNoteScores[NUM_HoldNoteScore];
|
||||||
|
/** @brief The Player's current combo. */
|
||||||
int m_iCurCombo;
|
int m_iCurCombo;
|
||||||
|
/** @brief The Player's max combo. */
|
||||||
int m_iMaxCombo;
|
int m_iMaxCombo;
|
||||||
|
/** @brief The Player's current miss combo. */
|
||||||
int m_iCurMissCombo;
|
int m_iCurMissCombo;
|
||||||
int m_iCurScoreMultiplier;
|
int m_iCurScoreMultiplier;
|
||||||
int m_iScore;
|
int m_iScore;
|
||||||
int m_iCurMaxScore;
|
int m_iCurMaxScore;
|
||||||
int m_iMaxScore;
|
int m_iMaxScore;
|
||||||
RadarValues m_radarPossible; // filled in by ScreenGameplay on start of notes
|
|
||||||
|
/**
|
||||||
|
* @brief How many rows/holds/rolls were judged?
|
||||||
|
*
|
||||||
|
* This is meant to be reset at the start of every song. */
|
||||||
|
int m_iJudgedSegments;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The possible RadarValues for a song.
|
||||||
|
*
|
||||||
|
* This is filled in by ScreenGameplay on the start of the notes. */
|
||||||
|
RadarValues m_radarPossible;
|
||||||
RadarValues m_radarActual;
|
RadarValues m_radarActual;
|
||||||
/** @brief How many songs were passed by the Player? */
|
/** @brief How many songs were passed by the Player? */
|
||||||
int m_iSongsPassed;
|
int m_iSongsPassed;
|
||||||
@@ -83,18 +97,30 @@ public:
|
|||||||
|
|
||||||
struct Combo_t
|
struct Combo_t
|
||||||
{
|
{
|
||||||
/* Start and size of this combo, in the same scale as the combo list
|
/**
|
||||||
* mapping and the life record. */
|
* @brief The start time of the combo.
|
||||||
float m_fStartSecond, m_fSizeSeconds;
|
*
|
||||||
|
* This uses the same scale as the combo list mapping. */
|
||||||
|
float m_fStartSecond;
|
||||||
|
/**
|
||||||
|
* @brief The size time of the combo.
|
||||||
|
*
|
||||||
|
* This uses the same scale as the life record. */
|
||||||
|
float m_fSizeSeconds;
|
||||||
|
|
||||||
// Combo size, in steps.
|
/** @brief The size of the Combo, in steps. */
|
||||||
int m_cnt;
|
int m_cnt;
|
||||||
|
|
||||||
/* Size of the combo that didn't come from this stage (rollover from the
|
/**
|
||||||
* last song). (This is a subset of cnt.) */
|
* @brief The size of the combo that didn't come from this stage.
|
||||||
|
*
|
||||||
|
* This is generally rolled over from the last song.
|
||||||
|
* It is also a subset of m_cnt. */
|
||||||
int m_rollover;
|
int m_rollover;
|
||||||
|
|
||||||
// Get the size of the combo that came from this song.
|
/**
|
||||||
|
* @brief Retrieve the size of the combo that came from this song.
|
||||||
|
* @return this song's combo size. */
|
||||||
int GetStageCnt() const { return m_cnt - m_rollover; }
|
int GetStageCnt() const { return m_cnt - m_rollover; }
|
||||||
|
|
||||||
Combo_t(): m_fStartSecond(0), m_fSizeSeconds(0), m_cnt(0), m_rollover(0) { }
|
Combo_t(): m_fStartSecond(0), m_fSizeSeconds(0), m_cnt(0), m_rollover(0) { }
|
||||||
|
|||||||
@@ -369,6 +369,7 @@ void ScoreKeeperNormal::AddScoreInternal( TapNoteScore score )
|
|||||||
{
|
{
|
||||||
int &iScore = m_pPlayerStageStats->m_iScore;
|
int &iScore = m_pPlayerStageStats->m_iScore;
|
||||||
int &iCurMaxScore = m_pPlayerStageStats->m_iCurMaxScore;
|
int &iCurMaxScore = m_pPlayerStageStats->m_iCurMaxScore;
|
||||||
|
m_pPlayerStageStats->m_iJudgedSegments++;
|
||||||
/*
|
/*
|
||||||
Regular scoring:
|
Regular scoring:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user