diff --git a/.gitignore b/.gitignore index 04a3981..d19296a 100644 --- a/.gitignore +++ b/.gitignore @@ -163,3 +163,4 @@ dmypy.json # Cython debug symbols cython_debug/ +Cargo.lock \ No newline at end of file diff --git a/.ignore b/.ignore new file mode 100644 index 0000000..91cdc0f --- /dev/null +++ b/.ignore @@ -0,0 +1,2 @@ +*.ico +*.png \ No newline at end of file diff --git a/Todo.md b/Todo.md index 17d54e4..e4431bf 100644 --- a/Todo.md +++ b/Todo.md @@ -16,7 +16,15 @@ ### Features 🟩 (GUI) Refactor code 🟩 (GUI) Restore GUI state - + 🟩 (GUI) Bugfix the gui and clean it up + 🟩 (LIB) Restructure code, cleanup the mess + 🟩 (LIB) Have an autoretry + 🟩 (LIB) Have the autoretry be smart and/or threaded with interrupts + 🟩 (LIB) Cleanup the Toml to have one unique Food/Receipe/Craftsman with the gui + 🟩 (LIB) Be more aggressive with the mem optimisations + 🟩 (LIB) Have a thread interrupt mode for fast mode + 🟩 (LIB) Cleanup features (verbose doesn't really make sense) + # Roadmap ## v1.0.0 diff --git a/python/src/xiv_csolver/configs/recipes.yaml b/python/src/xiv_csolver/configs/recipes.yaml index ab50162..3dbdcd4 100644 --- a/python/src/xiv_csolver/configs/recipes.yaml +++ b/python/src/xiv_csolver/configs/recipes.yaml @@ -4,5 +4,9 @@ # If this seems super convoluted, and you'd rather it was just the three in-game values, know that me too. # Unfortunately that is how the craft system works in FFXIV. -Grade 7 Tincture of Strength: [5060, 12628, 70, 130, 115, 80, 70] -Grade 5 Strength Alkahest: [1300, 6200, 40, 123, 107, 100, 100] +Lvl88: [1650, 7000, 40, 128, 112, 100, 100] +Patch6.3_precrafts: [3696, 8200, 35, 130, 115, 80, 70] +Patch6.3_gear: [5060, 12628, 70, 130, 115, 80, 70] +Patch6.3_gatherer: [5720, 12900, 70, 130, 115, 80, 70] +Patch6.4_precrafts: [4488, 9090, 35, 130, 115, 80, 70] +Patch6.4_gear: [6600, 14040, 70, 130, 115, 80, 70] \ No newline at end of file diff --git a/python/src/xiv_csolver/configs/users.yaml b/python/src/xiv_csolver/configs/users.yaml index 02c7a0c..9b0c4ce 100644 --- a/python/src/xiv_csolver/configs/users.yaml +++ b/python/src/xiv_csolver/configs/users.yaml @@ -4,6 +4,5 @@ # The top line will always be selected by default -Vicky Crosia: [4021, 3933, 587] -Dandaedre Zadiel: [0, 0, 0] -Sekundes Dullahan: [2566, 2443, 522] +Vicky Crosia: [4021, 3987, 601] +Ladisla Kociann: [4021, 3951, 580] \ No newline at end of file diff --git a/python/src/xiv_csolver/modules/solver.py b/python/src/xiv_csolver/modules/solver.py index c4ec249..31c9d67 100644 --- a/python/src/xiv_csolver/modules/solver.py +++ b/python/src/xiv_csolver/modules/solver.py @@ -67,8 +67,9 @@ Remaining CP: {self.remaining_cp}""" if self.steps != 15 and self.steps != 29 and self.steps != 44: saved_lines.append('/echo Craft complete ! ') - else: - self.loggers.log(f'No completion message in macro because rotation is exactly {self.steps} steps.') + # else: + # TODO: Add a callback to the parent object for logging + # self.loggers.add_log(f'No completion message in macro because rotation is exactly {self.steps} steps.') if self.steps > 15: saved_lines.insert(14, '/echo Macro 1 complete ') @@ -170,5 +171,3 @@ class Solver: self.least_steps = Result(output, 'Least steps') return self.least_steps - - diff --git a/src/lib.rs b/src/lib.rs index 02b7eb8..07d8792 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -168,9 +168,25 @@ pub fn solve_craft<'a>( let phase2_routes = arc_phase2_routes.lock().unwrap(); let nb_p2 = phase2_routes.len(); - // Drop on empty results + // Drop on empty results. // TODO: Retry automatically with better parameters if phase2_routes.len() == 0 { - return None; + // No solutions were found + if params.desperate { + // But everything was tested + return Some((Vec::::new(), Info::new(0, 0, false))); + } else { + // And not everything was tested + return solve_craft( + recipe, + stats, + Parameters { + depth: 11, + byregot_step: 6, + desperate: true, + ..params + }, + ); + } } // Print the results if verbose @@ -378,7 +394,7 @@ mod test { craft.recipe.progress = 0; let res = solve_craft(craft.recipe, craft.stats, craft.args); println!("{:?}", res); - assert!(res.is_none()); + assert!(res.unwrap().0.len() == 0); craft.recipe.progress = 100; craft.stats.max_cp = 0; diff --git a/src/python_bindings.rs b/src/python_bindings.rs index ea492a1..a2b4cd1 100644 --- a/src/python_bindings.rs +++ b/src/python_bindings.rs @@ -130,7 +130,7 @@ impl SolverResult { progression: craft.progression, quality: craft.quality, durability: craft.durability, - actions: actions, + actions, total_progression: craft.recipe.progress, total_quality: craft.recipe.quality, total_durability: craft.recipe.durability,