loathers / autoscend

An ascension script for KoLMafia
Other
45 stars 70 forks source link

Restore code not finding # null #382

Closed taltamir closed 4 years ago

taltamir commented 4 years ago

Context

Current Behavior

On avatar of sneaky pete I often have restore code causing a mafia error on skill # null the number varies. after said mafia error, it seems to stop for a second, then just goes ahead and casts shake it off This happens quite often when trying to restore in sneaky pete.

This error does not seem to actually disrupt anything in a pete run.

Failure Logs

[INFO] - Target hp => 221 - Considering restore options at 189/221 HP with 36/124 MP
[INFO] - Active Negative Effects => []
[DEBUG] - Recalculating cached restore objective values.
[DEBUG] - Applying constraints to 93 objective values.
[DEBUG] - Removed 90 restore options from consideration.
[DEBUG] - Sorting 3 options by primary objectives.
[DEBUG] - Beginning optimization of 3 restoration options.
[DEBUG] - 3 options before optimization: 0 - __RestorationOptimization(name: ancient magi-wipes, vars: {blood_skill_opportunity_casts_goal: 0.0, blood_skill_opportunity_casts_max: 0.0, hard_reserve_limit: 0.0, hp_goal: 221.0, hp_max: 221.0, hp_max_restorable: 55.0, hp_restored_per_use: 55.0, hp_starting: 189.0, hp_uses_needed_for_goal: 1.0, meat_available_to_spend: 0.0, meat_per_use: 0.0, mp_goal: 36.0, mp_max: 124.0, mp_max_restorable: 55.0, mp_restored_per_use: 55.0, mp_starting: 36.0, mp_uses_needed_for_goal: 1.0, soft_reserve_limit: 0.0, total_uses_remaining: 1.0}, constraints: {have_required_resources: true, is_currently_useable: true, is_ever_useable: true, meets_hard_reserve_limit: true, restores_needed_resources: true}, objective_values: {hp_per_coinmaster_token_spent: -1.0, hp_per_meat_spent: -1.0, hp_per_mp_spent: -1.0, hp_total_restored: 32.0, hp_total_short_goal: 0.0, hp_total_short_max: 0.0, hp_total_wasted_goal: 23.0, hp_total_wasted_max: 23.0, mp_per_coinmaster_token_spent: -1.0, mp_per_meat_spent: -1.0, mp_total_restored: 55.0, mp_total_short_goal: 0.0, mp_total_short_max: 33.0, mp_total_wasted_goal: 55.0, mp_total_wasted_max: 0.0, negative_status_effects_remaining: 0.0, soft_reserve_limit_uses: 0.0, total_coinmaster_tokens_used: 0.0, total_meat_used: -1.0, total_mp_used: -1.0, total_uses_available: 2.0, total_uses_needed: 1.0}); 1 - __RestorationOptimization(name: shake it off, vars: {blood_skill_opportunity_casts_goal: 0.0, blood_skill_opportunity_casts_max: 0.0, hard_reserve_limit: 0.0, hp_goal: 221.0, hp_max: 221.0, hp_max_restorable: 221.0, hp_restored_per_use: 221.0, hp_starting: 189.0, hp_uses_needed_for_goal: 1.0, meat_available_to_spend: 0.0, meat_per_use: 0.0, mp_goal: 36.0, mp_max: 124.0, mp_max_restorable: 0.0, mp_restored_per_use: 0.0, mp_starting: 36.0, mp_uses_needed_for_goal: 0.0, soft_reserve_limit: 0.0, total_uses_remaining: 0.0}, constraints: {have_required_resources: true, is_currently_useable: true, is_ever_useable: true, meets_hard_reserve_limit: true, restores_needed_resources: true}, objective_values: {hp_per_coinmaster_token_spent: -1.0, hp_per_meat_spent: -1.0, hp_per_mp_spent: 1.0666666666666667, hp_total_restored: 32.0, hp_total_short_goal: 0.0, hp_total_short_max: 0.0, hp_total_wasted_goal: 0.0, hp_total_wasted_max: 0.0, mp_per_coinmaster_token_spent: -1.0, mp_per_meat_spent: -1.0, mp_total_restored: 0.0, mp_total_short_goal: 0.0, mp_total_short_max: 88.0, mp_total_wasted_goal: 0.0, mp_total_wasted_max: 0.0, negative_status_effects_remaining: 0.0, soft_reserve_limit_uses: 0.0, total_coinmaster_tokens_used: -1.0, total_meat_used: -1.0, total_mp_used: 30.0, total_uses_available: 1.0, total_uses_needed: 1.0}); 2 - __RestorationOptimization(name: scroll of drastic healing, vars: {blood_skill_opportunity_casts_goal: 0.0, blood_skill_opportunity_casts_max: 0.0, hard_reserve_limit: 0.0, hp_goal: 221.0, hp_max: 221.0, hp_max_restorable: 221.0, hp_restored_per_use: 221.0, hp_starting: 189.0, hp_uses_needed_for_goal: 1.0, meat_available_to_spend: 0.0, meat_per_use: 0.0, mp_goal: 36.0, mp_max: 124.0, mp_max_restorable: 0.0, mp_restored_per_use: 0.0, mp_starting: 36.0, mp_uses_needed_for_goal: 0.0, soft_reserve_limit: 0.0, total_uses_remaining: 3.0}, constraints: {have_required_resources: true, is_currently_useable: true, is_ever_useable: true, meets_hard_reserve_limit: true, restores_needed_resources: true}, objective_values: {hp_per_coinmaster_token_spent: -1.0, hp_per_meat_spent: -1.0, hp_per_mp_spent: -1.0, hp_total_restored: 32.0, hp_total_short_goal: 0.0, hp_total_short_max: 0.0, hp_total_wasted_goal: 0.0, hp_total_wasted_max: 0.0, mp_per_coinmaster_token_spent: -1.0, mp_per_meat_spent: -1.0, mp_total_restored: 0.0, mp_total_short_goal: 0.0, mp_total_short_max: 88.0, mp_total_wasted_goal: 0.0, mp_total_wasted_max: 0.0, negative_status_effects_remaining: 0.0, soft_reserve_limit_uses: 0.0, total_coinmaster_tokens_used: 0.0, total_meat_used: -1.0, total_mp_used: -1.0, total_uses_available: 4.0, total_uses_needed: 1.0})
[DEBUG] - Rank 1 optimization, prefer to... remove negative status effects
[DEBUG] - Rank 2 optimization, prefer to... maintain soft reserve limit (keep at least N on hand if possible)
[DEBUG] - Rank 3 optimization, prefer to... try not to spend coinmaster tokens, maximizing hp/mp restored per token spent if we must spend
[DEBUG] - Rank 4 optimization, prefer to... try not to spend meat, maximizing hp/mp restored per meat spent if we must spend
[DEBUG] - Rank 5 optimization, prefer to... try to spend less mp, maximizing hp restored per mp spent if we must spend
[DEBUG] - Rank 6 optimization, prefer to... minimize hp/mp shortage to goal and wasted hp/mp over max
[DEBUG] - Removed from consideration: (ancient magi-wipes, hp: 32.0, mp: 55.0, negative effects remaining: 0.0)
[DEBUG] - Rank 7 optimization, prefer to... minimize number of uses needed to reach goal
Could not find a known, usable skill of yours uniquely matching "6 null"
[INFO] - Using skill shake it off as restore.
Casting Shake It Off 1 times...
You gain 32 hit points
Shake It Off was successfully cast.
Preference auto_diag_round changed from 5 to 0

the line of note is Could not find a known, usable skill of yours uniquely matching "6 null"

taltamir commented 4 years ago

A full list of all the restore code bugs are IIRC

  1. it does not know how to heal boris
  2. in pete it often gives an error of not finding a skill named # null where number is variable
  3. it does not multiuse items or skills. also our data is all in averages, which needs to be changed to min and max restored so that we could write a multiuse code.
  4. even though it takes the info as float, it actually rounds down somehow.
  5. lasagna bandages uses the figures for combat healing instead of NC healing. i am pretty sure we only do healing out of combat.... restore code is not built to handle in combat healing anyways and would need to be a separate set of code for in combat healing.

Need to reorgnize the issues related to it to make sure all show up. I will prioritize learning how that code even works and making this my next big project

taltamir commented 4 years ago

Alright. I got X null error on my main doing class act II. so this is not a sneaky pete only thing.

Malibu-Stacey commented 4 years ago

I've seen it in Ed and LKS runs so I think its happening for every class & path.

taltamir commented 4 years ago

accidentally closed it. we did not yet merge the fix