Remove rlvl/clvl propaganda
This commit is contained in:
@@ -37,13 +37,11 @@ public class Bench
|
||||
CanUseManipulation = true,
|
||||
HasSplendorousBuff = false,
|
||||
IsSpecialist = false,
|
||||
CLvl = 560,
|
||||
},
|
||||
new()
|
||||
{
|
||||
IsExpert = false,
|
||||
ClassJobLevel = 90,
|
||||
RLvl = 560,
|
||||
ConditionsFlag = 0b1111,
|
||||
MaxDurability = 80,
|
||||
MaxQuality = 7200,
|
||||
@@ -65,13 +63,11 @@ public class Bench
|
||||
CanUseManipulation = true,
|
||||
HasSplendorousBuff = false,
|
||||
IsSpecialist = false,
|
||||
CLvl = 560,
|
||||
},
|
||||
new()
|
||||
{
|
||||
IsExpert = false,
|
||||
ClassJobLevel = 90,
|
||||
RLvl = 580,
|
||||
ConditionsFlag = 0b1111,
|
||||
MaxDurability = 70,
|
||||
MaxQuality = 10920,
|
||||
|
||||
@@ -54,13 +54,11 @@ internal static class Program
|
||||
CanUseManipulation = true,
|
||||
HasSplendorousBuff = false,
|
||||
IsSpecialist = false,
|
||||
CLvl = 560,
|
||||
},
|
||||
new RecipeInfo()
|
||||
{
|
||||
IsExpert = false,
|
||||
ClassJobLevel = 90,
|
||||
RLvl = 640,
|
||||
ConditionsFlag = 15,
|
||||
MaxDurability = 70,
|
||||
MaxQuality = 14040,
|
||||
@@ -102,13 +100,11 @@ internal static class Program
|
||||
CanUseManipulation = true,
|
||||
HasSplendorousBuff = false,
|
||||
IsSpecialist = false,
|
||||
CLvl = 560,
|
||||
},
|
||||
new RecipeInfo()
|
||||
{
|
||||
IsExpert = false,
|
||||
ClassJobLevel = 90,
|
||||
RLvl = 640,
|
||||
ConditionsFlag = 15,
|
||||
MaxDurability = 70,
|
||||
MaxQuality = 14040,
|
||||
|
||||
@@ -65,7 +65,6 @@ public sealed class Plugin : IDalamudPlugin
|
||||
// Trigger static constructors so a huge hitch doesn't occur on first RecipeNote frame.
|
||||
FoodStatus.Initialize();
|
||||
ActionUtils.Initialize();
|
||||
Gearsets.Initialize();
|
||||
|
||||
Service.PluginInterface.UiBuilder.Draw += WindowSystem.Draw;
|
||||
Service.PluginInterface.UiBuilder.OpenConfigUi += OpenSettingsWindow;
|
||||
@@ -95,7 +94,6 @@ public sealed class Plugin : IDalamudPlugin
|
||||
CanUseManipulation = false,
|
||||
HasSplendorousBuff = false,
|
||||
IsSpecialist = false,
|
||||
CLvl = 10,
|
||||
},
|
||||
stats.Recipe ?? new(1023),
|
||||
stats.Buffs ?? new(null)
|
||||
|
||||
@@ -20,24 +20,6 @@ public static unsafe class Gearsets
|
||||
public const int ParamCraftsmanship = 70;
|
||||
public const int ParamControl = 71;
|
||||
|
||||
private static readonly int[] LevelToCLvlLUT;
|
||||
|
||||
static Gearsets()
|
||||
{
|
||||
LevelToCLvlLUT = new int[100];
|
||||
for (uint i = 0; i < 80; ++i) {
|
||||
var level = i + 1;
|
||||
LevelToCLvlLUT[i] = LuminaSheets.ParamGrowSheet.GetRow(level)!.CraftingLevel;
|
||||
}
|
||||
for (var i = 80; i < 100; ++i)
|
||||
{
|
||||
var level = i + 1;
|
||||
LevelToCLvlLUT[i] = (int)LuminaSheets.RecipeLevelTableSheet.First(r => r.ClassJobLevel == level).RowId;
|
||||
}
|
||||
}
|
||||
|
||||
public static void Initialize() { }
|
||||
|
||||
public static GearsetItem[] GetGearsetItems(InventoryContainer* container)
|
||||
{
|
||||
var items = new GearsetItem[(int)container->Size];
|
||||
@@ -127,7 +109,6 @@ public static unsafe class Gearsets
|
||||
CanUseManipulation = canUseManipulation,
|
||||
HasSplendorousBuff = gearsetItems.Any(IsSplendorousTool),
|
||||
IsSpecialist = gearsetItems.Any(IsSpecialistSoulCrystal),
|
||||
CLvl = CalculateCLvl(characterLevel),
|
||||
};
|
||||
|
||||
public static bool IsItem(GearsetItem item, uint itemId) =>
|
||||
@@ -146,11 +127,6 @@ public static unsafe class Gearsets
|
||||
public static bool IsSplendorousTool(GearsetItem item) =>
|
||||
LuminaSheets.ItemSheetEnglish.GetRow(item.ItemId)!.Description.ToDalamudString().TextValue.Contains("Increases to quality are 1.75 times higher than normal when material condition is Good.", StringComparison.Ordinal);
|
||||
|
||||
public static int CalculateCLvl(int level) =>
|
||||
(level > 0 && level <= 100) ?
|
||||
LevelToCLvlLUT[level - 1] :
|
||||
throw new ArgumentOutOfRangeException(nameof(level), level, "Level is out of range.");
|
||||
|
||||
// https://github.com/ffxiv-teamcraft/ffxiv-teamcraft/blob/24d0db2d9676f264edf53651b21005305267c84c/apps/client/src/app/modules/gearsets/materia.service.ts#L265
|
||||
private static int CalculateParamCap(Item item, uint paramId)
|
||||
{
|
||||
|
||||
@@ -36,7 +36,6 @@ public sealed record RecipeData
|
||||
{
|
||||
IsExpert = Recipe.IsExpert,
|
||||
ClassJobLevel = Table.ClassJobLevel,
|
||||
RLvl = (int)Table.RowId,
|
||||
ConditionsFlag = Table.ConditionsFlag,
|
||||
MaxDurability = Table.Durability * Recipe.DurabilityFactor / 100,
|
||||
MaxQuality = (Recipe.CanHq || Recipe.IsExpert) ? (int)Table.Quality * Recipe.QualityFactor / 100 : 0,
|
||||
|
||||
@@ -45,7 +45,6 @@ public sealed class MacroEditor : Window, IDisposable
|
||||
Control = Math.Clamp(value.Control, 0, 9000),
|
||||
CP = Math.Clamp(value.CP, 180, 1000),
|
||||
Level = Math.Clamp(value.Level, 1, 100),
|
||||
CLvl = Gearsets.CalculateCLvl(value.Level),
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -299,8 +298,6 @@ public sealed class MacroEditor : Window, IDisposable
|
||||
? Math.Clamp(newLevel, 1, 100)
|
||||
: 1
|
||||
};
|
||||
if (ImGui.IsItemHovered())
|
||||
ImGuiUtils.Tooltip($"CLvl {Gearsets.CalculateCLvl(CharacterStats.Level)}");
|
||||
|
||||
var disabledTint = new Vector4(0.5f, 0.5f, 0.5f, 0.75f);
|
||||
var imageButtonPadding = (int)(ImGui.GetStyle().FramePadding.Y / 2f);
|
||||
@@ -776,8 +773,6 @@ public sealed class MacroEditor : Window, IDisposable
|
||||
|
||||
ImGui.SameLine(0, 5);
|
||||
ImGui.TextUnformatted(textLevel);
|
||||
if (ImGui.IsItemHovered())
|
||||
ImGuiUtils.Tooltip($"RLvl {RecipeData.RecipeInfo.RLvl}");
|
||||
|
||||
if (textStarsSize != Vector2.Zero)
|
||||
{
|
||||
|
||||
@@ -487,8 +487,6 @@ public sealed unsafe class RecipeNote : Window, IDisposable
|
||||
if (level != 0)
|
||||
{
|
||||
ImGui.TextUnformatted(levelText);
|
||||
if (ImGui.IsItemHovered())
|
||||
ImGuiUtils.Tooltip($"CLvl {Gearsets.CalculateCLvl(level)}");
|
||||
ImGui.SameLine(0, 3);
|
||||
}
|
||||
|
||||
@@ -684,8 +682,6 @@ public sealed unsafe class RecipeNote : Window, IDisposable
|
||||
|
||||
ImGui.SameLine(0, 5);
|
||||
ImGui.TextUnformatted(textLevel);
|
||||
if (ImGui.IsItemHovered())
|
||||
ImGuiUtils.Tooltip($"RLvl {RecipeData.RecipeInfo.RLvl}");
|
||||
|
||||
if (textStarsSize != Vector2.Zero)
|
||||
{
|
||||
@@ -1202,7 +1198,7 @@ public sealed unsafe class RecipeNote : Window, IDisposable
|
||||
var config = Service.Configuration.RecipeNoteSolverConfig;
|
||||
var mctsConfig = new MCTSConfig(config);
|
||||
var simulator = new SimulatorNoRandom();
|
||||
var macros = Service.CommunityMacros.RetrieveRotations(input.Recipe.RLvl, token).GetAwaiter().GetResult();
|
||||
var macros = Service.CommunityMacros.RetrieveRotations((int)RecipeData.Table.RowId, token).GetAwaiter().GetResult();
|
||||
|
||||
token.ThrowIfCancellationRequested();
|
||||
|
||||
|
||||
@@ -9,5 +9,4 @@ public sealed record CharacterStats
|
||||
public bool CanUseManipulation { get; init; }
|
||||
public bool HasSplendorousBuff { get; init; }
|
||||
public bool IsSpecialist { get; init; }
|
||||
public int CLvl { get; init; }
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ public sealed record RecipeInfo
|
||||
{
|
||||
public bool IsExpert { get; init; }
|
||||
public int ClassJobLevel { get; init; }
|
||||
public int RLvl { get; init; }
|
||||
public ushort ConditionsFlag { get; init; }
|
||||
public int MaxDurability { get; init; }
|
||||
public int MaxQuality { get; init; }
|
||||
|
||||
@@ -20,14 +20,14 @@ public sealed class SimulationInput
|
||||
// https://github.com/NotRanged/NotRanged.github.io/blob/0f4aee074f969fb05aad34feaba605057c08ffd1/app/js/ffxivcraftmodel.js#L88
|
||||
{
|
||||
var baseIncrease = (Stats.Craftsmanship * 10f / Recipe.ProgressDivider) + 2;
|
||||
if (Stats.CLvl <= Recipe.RLvl)
|
||||
baseIncrease *= Recipe.ProgressModifier / 100f;
|
||||
if (Stats.Level <= Recipe.ClassJobLevel)
|
||||
baseIncrease *= Recipe.ProgressModifier * 0.01f;
|
||||
BaseProgressGain = (int)baseIncrease;
|
||||
}
|
||||
{
|
||||
var baseIncrease = (Stats.Control * 10f / Recipe.QualityDivider) + 35;
|
||||
if (Stats.CLvl <= Recipe.RLvl)
|
||||
baseIncrease *= Recipe.QualityModifier / 100f;
|
||||
if (Stats.Level <= Recipe.ClassJobLevel)
|
||||
baseIncrease *= Recipe.QualityModifier * 0.01f;
|
||||
BaseQualityGain = (int)baseIncrease;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,13 +15,11 @@ public class SimulatorTests
|
||||
CanUseManipulation = true,
|
||||
HasSplendorousBuff = false,
|
||||
IsSpecialist = false,
|
||||
CLvl = 560,
|
||||
},
|
||||
new()
|
||||
{
|
||||
IsExpert = false,
|
||||
ClassJobLevel = 90,
|
||||
RLvl = 560,
|
||||
ConditionsFlag = 0b1111,
|
||||
MaxDurability = 80,
|
||||
MaxQuality = 7200,
|
||||
@@ -44,13 +42,11 @@ public class SimulatorTests
|
||||
CanUseManipulation = true,
|
||||
HasSplendorousBuff = false,
|
||||
IsSpecialist = false,
|
||||
CLvl = 560,
|
||||
},
|
||||
new()
|
||||
{
|
||||
IsExpert = false,
|
||||
ClassJobLevel = 90,
|
||||
RLvl = 580,
|
||||
ConditionsFlag = 0b1111,
|
||||
MaxDurability = 70,
|
||||
MaxQuality = 10920,
|
||||
|
||||
Reference in New Issue
Block a user