[b41-1.0.5] Talent Point Planner

A place to post your add ons and ideas for them

Moderator: Moderator

Message
Author
Zizzo
Sher'Tul Godslayer
Posts: 2517
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [b41-1.0.5] Talent Point Planner

#136 Post by Zizzo »

A few tweaks going out in v11b.1:
  • For the Technomancer evolution, we have three talent sources, depending on which Technomancy tree you want unlocked. You can only receive one of these, of course, but previously the planner dialog would let you select all three. We now enforce mutual exclusion on those, like a radio button group. We even borrow my custom radio-button graphics from the T2 module: :mrgreen:
    techno-radio.png
    techno-radio.png (36.91 KiB) Viewed 43836 times
  • I had an ulterior motive for this change, of course; :twisted: I've got another planner-related project in the works that has its own mutually exclusive talent sources, and I wanted a way to enforce that. Addon developers who want to get in on this new hotness should check the documentation in dev-notes/hooks.txt for the new 'only_one' flag.
  • Small QoL tweak for using the planner with Wanderers: the internal :randventurerLearn() method that gives them talent trees on levelup apparently doesn't apply the 'silent_levelup' flag used elsewhere in the levelup process, with the result that when you open a planner dialog for a Wanderer character, you'll get a bunch of spurious "As you level up you gain a talent tree" messages as the planner clone gets force-leveled to level 50 (or whatever :wink: ). Easy enough to fix with a little surgery on the planner clone, though.
"Blessed are the yeeks, for they shall inherit Arda..."

Zizzo
Sher'Tul Godslayer
Posts: 2517
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [b41-1.0.5] Talent Point Planner

#137 Post by Zizzo »

I know, sorry, but that mysterious planner-related project I'm working on keeps needing more hooks into the planner, and in the process of implementing those, I keep finding things that I should have done better. So here's what we've got so far in v11c, just pushed out:
  • A lot of the stuff we track is given to the player via chat dialogs (staff training from Angolwen, mindstar training from Zigur, trees from Worldly Knowledge, stuff from the Old Psi-Machine in Embers, stuff like that), and to keep track of whether the player knows about or has received these various sources, we were doing clumsy meatball surgery on the various chat dialogs to insert our own code. I was really not looking forward to having to do that for new stuff, and I finally thought of a better way. :twisted: We now add a new hook 'TalentPointPlanner:chatAnswer', which is called when the player selects a choice from a chat dialog, just before the usual handling. Now we can get pinged when the player buys Combat training in Last Hope without having to modify half a dozen chat definitions on the fly. :mrgreen: This should also be much more resilient against other addons rearranging the same chat definitions out from under us, and much easier for downstream addon developers to use. :wink:
  • Along the same lines, talent-related stuff given to the player via using an object like Wyrm Bile used to require the same sort of evil and fragile surgery on the objects' .use() methods. We have a hook for that now too, 'TalentPointPlanner:playerUseObject'. Which is a huge relief for me, as I'm sure you can imagine. 8)
  • In the process of converting all the old code to use our new hooks, of course, I ran into a lot of places where the old code really needed to be improved:
    • Remember how we improved our handling of trees from the Worldly Knowledge prodigy to include escort quest trees included by addons? Well, we missed a spot; turns out we also need to add that new handling to the part of the code that detects that we've taken one of those trees.
    • Along the same lines, the trees that can be bought from Arcanum's Angolwen Academy are also available in an addon-provided list, which we now use instead of hard-coding. We also include talent sources for the "mastery" level of training, which unlocks the tree and increases the tree multiplier; I had previously thought that was irrelevant, since it didn't change where you can spend points, but on reflection, the tree multipler would matter if you're looking for talent level breakpoints. We also add a new code "arcanum_angolwen_academy" for the Mark as Seen dialog to expose all the trees that the Academy teaches.
    • The Old Psi-Machine's list of offered talent trees is, alas, buried in a local variable in the chat definition and has defied all my efforts to extract it, :evil: so we still have to hard-code the list ourself, but it also gets the new treatment.
  • Another new feature for addon developers: the 'show_if_done' field in a talent source definition can now be a function that returns true when you want the relevant handling.
And since this is yet another massive overhaul, I fully expect this to break badly. :oops: As always, here is a good place to report whatever bugs I just introduced.
"Blessed are the yeeks, for they shall inherit Arda..."

Zizzo
Sher'Tul Godslayer
Posts: 2517
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [b41-1.0.5] Talent Point Planner

#138 Post by Zizzo »

I know, I know, sorry. :oops: v11c.1 should be the last change we need in this addon to support that mysterious side project I've been hinting at. :mrgreen: Just a few tweaks to the developer-side API for other addons to add talent sources (is it pretentious to describe one's addon as having an API? :? ); should be no change in functionality.
"Blessed are the yeeks, for they shall inherit Arda..."

Zizzo
Sher'Tul Godslayer
Posts: 2517
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [b41-1.0.5] Talent Point Planner

#139 Post by Zizzo »

v11c.2 fixes a bug in the vault plan loading feature we added earlier. As we showed, the plan selector will highlight (or not show at all) plans from characters of a different race or class than the current character, which we determine by checking the race/class descriptors of the vault character with the corresponding descriptors of the current character. We can also load vault plans for sidekicks like worms that walk, though, and those don't have race or class descriptors… :oops: Obviously in this case we should be using the summoner's race/class descriptors for the comparison, as we now do. We Apologize for the Inconvenience.™
"Blessed are the yeeks, for they shall inherit Arda..."

Zizzo
Sher'Tul Godslayer
Posts: 2517
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [b41-1.0.5] Talent Point Planner

#140 Post by Zizzo »

v11c.3 adds a small feature I've occasionally wanted. Sometimes you'd like to have your talent point plan in the form of a text file — if you're writing a build guide, for instance, or if you're making a new character that's almost but not quite like one of your old characters. Well, it took a bit of work, but I finally figured out how to hook that in. In the planner's levelup dialog, you can type <Ctrl-U> to generate the file, which will go into the same directory where character dumps go. You can generate either a short-form or a long-form dump; short form lists talent trees with all their talent levels grouped together:

Code: Select all

  Technique / Hit Things (x1.30)    3/1/3/1
  Spell / Zap Things (x1.30)        5/4/4/5
while long form lists all talents, with current and max levels:

Code: Select all

  Technique / Hit Things (x1.30)
    Hit Things Very Hard           3/5
    Hit Things Way Over There      1/5
    Hit Things With Other Things   3/5
    Hit All the Things             1/5
  Spell / Zap Things (x1.30)
    Ka-Zot!                        5/5
    Pew Pew Pew!                   4/5
    Ekke Ekke Ekke Ekke            4/5
    P'tang Zuu Boing!              5/5
Both forms also include a list of the talent sources you enabled on the main planner dialog.
"Blessed are the yeeks, for they shall inherit Arda..."

Zizzo
Sher'Tul Godslayer
Posts: 2517
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [b41-1.0.5] Talent Point Planner

#141 Post by Zizzo »

Most if not all player-visible talents in the main game have a maximum raw level of 5. Some addon classes, though, like Tradewind_Rider's Simple Man, have talents with maximum raw levels of 10 or 20, and I suppose if you go deep enough into the Infinite Dungeon, your regular talents might also develop a maximum raw level of 10 or higher.

When we add the planner annotations for number of points we plan to spend in these talents, though, that ends up with text wider than the talent icons, which gets messy:
pts2line-before.png
pts2line-before.png (20.13 KiB) Viewed 23666 times
So for v11d, if any of the current points, max points or planner point allocation are 10 or higher (which seems to be enough to cause the problem), we split the main current/max points text and the planner annotation text onto two lines:
pts2line-after.png
pts2line-after.png (22.51 KiB) Viewed 23666 times
Trust me, that's not nearly as easy as it looks like it ought to be. :?
"Blessed are the yeeks, for they shall inherit Arda..."

Zizzo
Sher'Tul Godslayer
Posts: 2517
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [b41-1.0.5] Talent Point Planner

#142 Post by Zizzo »

Two small bugfixes in v11d.1:
  • Well, duh, obviously the Heart and corrupted-Heart talent sources should be mutually exclusive. :oops:
  • Was fiddling around with ooli's "bumping predator" Adventurer build, but I had no way to add the Cursed aura tree talent source, since the planner previously keyed off the Afflicted class group for that. Now we make that source available to any character that knows the Cursed form tree, locked or unlocked, which covers our Adventurer case.
"Blessed are the yeeks, for they shall inherit Arda..."

Zizzo
Sher'Tul Godslayer
Posts: 2517
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [b41-1.0.5] Talent Point Planner

#143 Post by Zizzo »

And speaking of Tradewind_Rider's Simple Man addon, :wink: the level-up dialog's "advanced display" mode (as toggled via the 'x' key) by default only shows info for talent levels 1 thru 5, which is less than useful for the various Simple Man talents with max levels of 10 or 20. So, in v11d.2 we adjust that level range to go from current level minus 1 to current level plus 3, as bounded above and below by minimum and maximum talent level:
advanced-display.png
advanced-display.png (70.27 KiB) Viewed 23222 times
"Blessed are the yeeks, for they shall inherit Arda..."

Zizzo
Sher'Tul Godslayer
Posts: 2517
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [b41-1.0.5] Talent Point Planner

#144 Post by Zizzo »

So, y'know those talents like Unified Body that passively increase your stats? The effects of increasing the talent level are reflected "live" in-dialog for purposes of stat requirements (increasing Unified Body, for instance, might boost your CON enough to get that next level of Thick Skin without having to exit and re-enter the levelup dialog), but the stats display isn't updated to reflect those effects. Easy enough to fix; in v11d.3, in both the regular levelup dialog and the planner dialog, every time you spend or unspend a talent point, we redraw the stats tree and all the talent trees (since you may now meet the stat requirements for some talents).
"Blessed are the yeeks, for they shall inherit Arda..."

Zizzo
Sher'Tul Godslayer
Posts: 2517
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [b41-1.0.5] Talent Point Planner

#145 Post by Zizzo »

Couple bugfixes in v11d.4:
  • Fixed a couple places where the "live" state of the point plan as represented by the state of the planner levelup dialog was out of sync with the "official" state of the plan as stored in the addon data. Notably, for instance, remember our new <Ctrl-U> binding to write out your point plan to a text file? Well, before this fix, if you tried doing that from the initial planner dialog at character creation, it would throw an error, because it was trying to use the "official" data that wasn't there yet. :?
  • Tried setting up a plan recently for a Vorloth character from Tradewind_Rider's Quantum Slider addon, and discovered a bit more under-the-hood setup work that needs to be done on the planner clone before we can safely level it up. As always, We Apologize for the Omission.™
"Blessed are the yeeks, for they shall inherit Arda..."

Zizzo
Sher'Tul Godslayer
Posts: 2517
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [b41-1.0.5] Talent Point Planner

#146 Post by Zizzo »

Adding talent sources for Bloodriver Adherents turned out to be harder than I was expecting; there was annoying ad hoc handling I needed to do that the planner API¹ really wasn't designed for. So v11d.5 adds a new hook, TalentPointPlanner:postProcess (see the bundled developer documentation for details); I think it's general-purpose enough not to stick out as an obvious special-case hack. :oops: No changes to in-game functionality; We Apologize for the Interruption.™

----
¹ It still feels weird describing one of my addons as having an API…
"Blessed are the yeeks, for they shall inherit Arda..."

Black_HobbiT
Posts: 4
Joined: Fri Dec 06, 2024 3:00 pm

Re: [b41-1.0.5] Talent Point Planner

#147 Post by Black_HobbiT »

Hi there, thanks for your addons.
Found, that adding psy-machine options in the EoR campaign shoot an error on every tried combination.

Code: Select all

Lua Error: /mod/dialogs/PointPlanDialog.lua:1518: attempt to index global 'def' (a nil value)
  At [C]:-1 __index
  At /mod/dialogs/PointPlanDialog.lua:1518 use
  At /mod/dialogs/PointPlanDialog.lua:2113 startPlanDialog
  At /mod/dialogs/PointPlanDialog.lua:973 fct
  At /engine/ui/Button.lua:63 fct
  At /engine/Mouse.lua:71 receiveMouse
  At /engine/Mouse.lua:111 delegate
  At /engine/ui/Dialog.lua:817 mouseEvent
  At /engine/ui/Dialog.lua:510 fct
  At /engine/Mouse.lua:71
I run a bunch of addons, but was unable to find if any caused this error.
Full log attached
Attachments
2024-12-06_11-55-46.txt
(131.91 KiB) Downloaded 57 times

Zizzo
Sher'Tul Godslayer
Posts: 2517
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [b41-1.0.5] Talent Point Planner

#148 Post by Zizzo »

[We Apologize for the Delay;™ was out of town dealing with some family medical issues.]
Black_HobbiT wrote: Fri Dec 06, 2024 3:08 pm Found, that adding psy-machine options in the EoR campaign shoot an error on every tried combination.
[sound F/X: source diving] …ah, I knew that massive overhaul earlier was going to cause problems. :? Yet another small typo, of the sort that I so frequently lament that Lua doesn't catch at compile time. :oops: Fixed in v11d.6; We Apologize for the Error.™
"Blessed are the yeeks, for they shall inherit Arda..."

Post Reply