Skip to content

Commit

Permalink
stream pmod changes, roll hard cutoff thing | 489
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed Aug 17, 2022
1 parent d7593e0 commit 2ab44f2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
19 changes: 13 additions & 6 deletions src/Etterna/MinaCalc/Dependent/HD_PatternMods/Roll.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ struct RollMod

#pragma region params

float min_mod = 0.9F;
float min_mod = 0.6F;
float max_mod = 1.F;
float base = 0.1F;
float jj_scaler = .5F;
float base = 0.F;
float jj_scaler = 1.4F;

// ms apart for 2 taps to be considered a jumpjack
// 0.075 is 200 bpm 16th trills
Expand All @@ -25,7 +25,9 @@ struct RollMod
// as the jumpjack width is between 0 and ms_threshold
// a higher number here makes numbers closer to ms_threshold
// worth more -- the falloff occurs late
float diff_falloff_power = 1.F;
float diff_falloff_power = 6.F;

float required_notes_before_nerf = 6.F;

const std::vector<std::pair<std::string, float*>> _params{
{ "min_mod", &min_mod },
Expand All @@ -35,6 +37,7 @@ struct RollMod
{ "jj_scaler", &jj_scaler },
{ "ms_threshold", &ms_threshold },
{ "diff_falloff_power", &diff_falloff_power },
{ "required_notes_before_nerf", &required_notes_before_nerf },
};
#pragma endregion params and param map

Expand Down Expand Up @@ -151,8 +154,12 @@ struct RollMod
return;
}

pmod =
1 - (((current_problems * 2.F) * jj_scaler) / itvhi.get_taps_nowf());
if (itvhi.get_taps_nowf() < required_notes_before_nerf) {
pmod = neutral;
return;
}

pmod = itvhi.get_taps_nowf() / ((current_problems * 2.F) * jj_scaler);
pmod = std::clamp(base + pmod, min_mod, max_mod);
}

Expand Down
8 changes: 4 additions & 4 deletions src/Etterna/MinaCalc/MinaCalc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -732,10 +732,10 @@ Calc::InitAdjDiff(Calc& calc, const int& hand)
WideRangeJumptrill,
WideRangeJJ,
FlamJam,
OHJumpMod,
Balance,
// OHJumpMod,
// Balance,
// RanMan,
WideRangeBalance,
// WideRangeBalance,
},

// js
Expand Down Expand Up @@ -1012,7 +1012,7 @@ MinaSDCalcDebug(
}
}

int mina_calc_version = 488;
int mina_calc_version = 489;
auto
GetCalcVersion() -> int
{
Expand Down

0 comments on commit 2ab44f2

Please sign in to comment.