Page 1 of 1

Talent unlearning problems - updated 2013-02-07

Posted: Mon Jan 28, 2013 12:00 am
by aardvark
Lately I've been investigating the cause(s) of the talent unlearning bug(s). I won't link to the bug forum posts--there are too many. I have a good idea of the cause and what may be a partial fix.

Players' ability to unlearn their last 4 class and 3 generic talent points is being interfered with by "corruption" of the unlearn stacks. Donning/doffing certain items and rearranging talent point investment are oft cited precursors to the problem. I think both of these, indeed, contribute.

The root cause is calls to learnTalent() and unlearnTalent() without protection from unlearn stack modification. I've identified 5 definite or possible causes:
  1. Changes to talent mastery, either via category point spend or item bonuses. darkgod fixed this one back in December (r6170).
  2. Changes to talent levels from item bonuses. I think I've got this one fixed.
  3. Removing points from a talent on the levelup dialog may also cause problems since the talent is unlearned, checked to ensure it can be unlearned, and relearned if not. All without unlearn stack protection. I think I've got this sorted, too.
  4. Missing no_unlearn_last = true fields in side-effect talent declarations. I don't know where the difference lies between class, generic, and a possible "other" kind of talent. Talents I've identified that suffer from this problem are:
    • Celestial talents T_JUMPGATE_TWO, T_JUMPGATE_TELEPORT, and T_JUMPGATE_TELEPORT_TWO
    • All chronomancy anomaly talents
    • Solipsist thought-form talents T_TF_BOWMAN, T_TF_WARRIOR, and T_TF_DEFENDER
  5. Non-side-effect talents granted by other talents to controllable actors (i.e., the player and golem, if any) that omit {no_unlearn = true} as the extra parameter to learnTalent(). I'm not sure about this one, either, but strongly suspect it given that I've verified 4. Includes:
    • T_CORRUPTED_STRENGTH given to golem by Blighted Summoning prodigy
    • T_SPIT_POISON and T_EXOTIC_WEAPONS_MASTERY from Legacy of the Naloren prodigy
My question for the group: what's missing?

Edit: Updated the patch.

Re: Talent unlearning problems

Posted: Wed Jan 30, 2013 1:05 am
by aardvark
Here's a patch that addresses 2-5 above and also the new numbers 6-8:
  • Learning a Prodigy removes unlearnability from a class talent.
  • Passives still give bonuses when unlearned fully.
  • Passives leave bonuses when changing player control to other party members.
It adds an extra parameter to unlearnTalent() that bypasses the unlearn stacks identical to the one in learnTalent(), adds no_unlearn_last = true fields to side-effect talents (talents learned only as a side-effect of learning another talent, i.e. thought forms, poisons, traps, reloading, etc.), and adds unlearn stack bypassing (via the extra parameter) to non-side-effect talents learned indirectly through other talents. It should fix all currently known talent unlearning bugs (2-7 as noted above and here).

An addon version is available for testing.

Edit: Removed the extra bug fix for 1 above since it turns out darkgod's December change did fix that one, I just didn't dig deep enough into the chain of function calls. Also, fixed a bug in the fix for 3 above.

Edit 2: Added a fix for stuck passive bonuses when changing player control to other party members.

Edit 3: Removed inscription function changes since no_unlearn_last = true is inserted automatically by newInscription().

Re: Talent unlearning problems - updated 2013-02-07

Posted: Tue Feb 12, 2013 12:15 am
by R_D
Not entirely sure if this is relevant, but I discovered that paying to learn how to use a bow/sling in Last Hope locks you out of one point to unlearn (I had 4 points in a skill and I could take out all 4. I learned how to shoot, and now I suddenly can only take out 3. I re-tested the scenario and confirmed it was learning how to shoot that caused it). Now, whether this is a bug or intentional idk, but in case it is a bug, I figured I'd give you folks a heads up.

Re: Talent unlearning problems - updated 2013-02-07

Posted: Tue Feb 12, 2013 12:28 am
by aardvark
Not learning to shoot, but rather learning to reload. And, yes, it's covered in the patch and the addon.

And thank you for the feedback!

Re: Talent unlearning problems - updated 2013-02-07

Posted: Wed Feb 13, 2013 11:35 pm
by darkgod
fixed thanks