From 00c7838e40319d26f48b10b45063d9d3460cd171 Mon Sep 17 00:00:00 2001 From: KonaeAkira Date: Sun, 29 Dec 2024 12:44:07 +0100 Subject: [PATCH] Disable quality probability analysis for expert recipes & Adjust normal recipe condition probabilities --- game_data/build/main.rs | 2 +- game_data/build/records.rs | 2 ++ game_data/src/lib.rs | 1 + simulator/src/probabilities.rs | 6 +++--- src/app.rs | 1 + src/widgets/analysis.rs | 11 ++++++++--- 6 files changed, 16 insertions(+), 7 deletions(-) diff --git a/game_data/build/main.rs b/game_data/build/main.rs index d368562..0b4a8a8 100644 --- a/game_data/build/main.rs +++ b/game_data/build/main.rs @@ -41,7 +41,7 @@ fn import_rlvl_records() -> Result, Box &'static [(Condition, f32)] { match current_condition { Condition::Normal => &[ - (Condition::Normal, 0.80), - (Condition::Good, 0.15), - (Condition::Excellent, 0.05), + (Condition::Normal, 0.86), + (Condition::Good, 0.12), + (Condition::Excellent, 0.02), ], Condition::Good => &[(Condition::Normal, 1.00)], Condition::Excellent => &[(Condition::Poor, 1.00)], diff --git a/src/app.rs b/src/app.rs index d2a32dd..afbcf97 100644 --- a/src/app.rs +++ b/src/app.rs @@ -391,6 +391,7 @@ impl MacroSolverApp { initial_quality, target_quality, &self.actions, + self.recipe_config.recipe.is_expert, )); } diff --git a/src/widgets/analysis.rs b/src/widgets/analysis.rs index 7b61c3c..75dcc75 100644 --- a/src/widgets/analysis.rs +++ b/src/widgets/analysis.rs @@ -10,6 +10,7 @@ pub struct SolutionAnalysis<'a> { initial_quality: u16, target_quality: u16, actions: &'a [Action], + is_expert: bool, } impl<'a> SolutionAnalysis<'a> { @@ -18,6 +19,7 @@ impl<'a> SolutionAnalysis<'a> { initial_quality: u16, target_quality: u16, actions: &'a [Action], + is_expert: bool, ) -> Self { Self { settings: Settings { @@ -27,6 +29,7 @@ impl<'a> SolutionAnalysis<'a> { initial_quality, target_quality, actions, + is_expert, } } } @@ -48,8 +51,10 @@ impl egui::Widget for SolutionAnalysis<'_> { ui.horizontal(|ui| { collapsed = util::collapse_button(ui, egui::Id::new("analysis_collapsed")); ui.label(egui::RichText::new("Analysis").strong()); - if self.actions.is_empty() { - ui.label("N/A"); + if self.is_expert { + ui.label("N/A (Expert recipes not supported)"); + } else if self.actions.is_empty() { + ui.label("N/A (No macro to analyze)"); } else { ui.label(format!( "{:.2}% chance to reach target Quality ({})", @@ -58,7 +63,7 @@ impl egui::Widget for SolutionAnalysis<'_> { )); } }); - if collapsed { + if collapsed || self.is_expert { return; } ui.separator();