-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[script][combat-trainer] Stop training untrainable weapon skills in CT - optional feature #7068
base: main
Are you sure you want to change the base?
Conversation
What happens if all weapons fail to gain mindstates? What happens if all weapons are at 34/34? |
All weaps already at 34/34 is already accounted for (already observed before this PR and this PR would not change the existing behaviour of using the same weapon when 34 for all weaps was reached). update update2 |
You angle to the side and retract your arm. Your palm lands a massive strike (11/23) to a snowbeast's head! [You're adeptly balanced]
[combat-trainer: updated @no_gain_list: {"Small Blunt"=>0, "Brawling"=>6}]
You get a steel throwing club from inside your carryall. Example of feature in action. Brawling had exceeded its gain_check threshold, is suppressed (removed from the training list), and switches to another weapon. |
combat-trainer.lic
Outdated
@@ -174,6 +174,7 @@ class SetupProcess | |||
echo('new skill needed for training') if $debug_mode_ct | |||
|
|||
game_state.reset_action_count | |||
@last_exp = -1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this assignment for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've just switched weapons so the old @last_exp is no longer valid. The new weapon's @last_exp = -1 guarantees it will pass the mindstate portion of the check. Its not strictly necessary, worst case is new weapon gets a mark against it, only to be reset to 0 at the cycle after. But its nice to reset properly on weapon change, seeing as line 176 does something similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, you can add an attr reader for it in GameState, then just reference game_state.last_exp
here instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aaah right, scoping, i'll fix that. it mustn't have been working before?
Please hold review for a bit. I've discovered an edge case where a weapon can get prematurely blacklisted. |
Ok fixed, please continue :) What I was seeing was actually masking an underlying issue with bows... it was more than an edge case. Its fixed now by checking action_count so that the mindstate check only occurs when there has been some action, and not assume a CT cycle = attack action performed. It seems to work well in test. |
Extra logic to stop training a weapon that can't be trained, due to:
It will do so before the action_count threshold (eventually) takes effect; target_increment is not applicable here.
For 1, the logic will simply speed up weapon switch to something else that needs training
For 2 and 3, the logic will blacklist the weapon skill for a given run of CT, and move onto next weapon
The logic is turned on by declaring "combat_trainer_gain_check: <value>" in char-setup
initial setting of 5 is suggested pending further experience. Enabling gain_check will allow some finetuning of existing action_count threshold to reduce unnecessary weapon switch.
If the setting is not included in the yaml, the new logic will not be activated.