[b41-1.0.5] Talent Point Planner

A place to post your add ons and ideas for them

Moderator: Moderator

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

[b41-1.0.5] Talent Point Planner

#1 Post by Zizzo »

As promised, I've rewritten my previous talent point planner addon to be fully in-game and not require the separate Build Order Maker addon.. I'm starting this thread for bug reports (on the off chance ayone but me ever uses this... :oops: ) and upgrade announcements (as I find more sources of talent points to be accounted for).

Notes:
  • As obliquely noted above, the planner allows you to factor certain non-leveling-up sources of talent points and talent tree unlocks into your plan -- but only if it can confirm that you've seen them in-game (don't want to be too spoily, after all... :wink: ) It also tries to detect if your current character has already obtained points from said sources.
  • Point plans are not currently preserved across a die/restart; still trying to figure out how and where in the code that happens. We Apologize for the Inconvenience.(TM)
The Talent Point Planner plugin is now available on the Addons page. We hope you find it useful.

[edit 2013-11-13 12:39am] Technical info:

Code: Select all

Hooks:
  ToME:load [to add our keybinding]
  ToME:runDone [to add our action to the keybinding]
  Chat:load [to wedge our 'seen/done-this' checks into various store chats]
Superload:
  mod.class.Game:
    setAllowedBuild() [to detect that we know the Heart bonuses]
  mod.class.Player:
    on_quest_status() [to detect that we know various quest bonuses]
  mod.dialogs.LevelupDialog:
    createDisplay() [to make room for our plan annotations on stat icons]
    cancel() [to tell the planner not to save the point plan]
    finish() [to tell the planner to save the point plan]
    generateList() [to add our plan annotations to talent and stat icons]
Last edited by Zizzo on Wed Nov 13, 2013 5:39 am, edited 10 times in total.
"Blessed are the yeeks, for they shall inherit Arda..."

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

Re: [b42] Talent Point Planner

#2 Post by Zizzo »

Oh, my. I've been lazy about reporting updated version of this addon, but I just checked the Characters Vault and it turns out people are actually using it... :oops: :mrgreen:

So, in the versions since my last post, I've adapted it to b42's changes to the levelup dialog, and added annotations to the stat numbers to show the stat levels required to complete your points plan, so that you have an idea of where to allocate stat points. Also some bug fixes.

Also, the new version I just uploaded a few minutes ago finally supports migrating a points plan across a die/restart. Now, in addition to be being saved in the save file, points plans for a character are persisted to the file "/vault/<char-name>/pointplan.lua" (for lack of an obvious better place to put it; if this clobbers anything in the engine, I can try to find someplace else). If you die and restart your character, the first time you launch the point planner dialog, there will be a new button to load the plan from the vault and edit it.

For future development, I want to add handling for any sources of talent points and talent tree unlocks that aren't already covered. Currently the addon handles [trying not to be too spoily here]:
  • The Arena
  • The source in the Sandworm Lair
  • The optional tree that Cursed characters can get
If I'm missing any, please let me know (if possible without spoiling me too much... :oops: ).

So. We Apologize for the Delay.(TM) The Talent Point planner, as before, is available on the Addons pages. Enjoy.
"Blessed are the yeeks, for they shall inherit Arda..."

lukep
Sher'Tul Godslayer
Posts: 1712
Joined: Mon Mar 14, 2011 10:32 am
Location: Canada

Re: [b41/b42] Talent Point Planner

#3 Post by lukep »

Other sources of talent points/categories that can be found (trying to be a bit circumspect in the descriptions...):

Guaranteed (with correct choices):
- The one from Zigur (plus the other one, from later in Zigur)
- The quite late, other one you get in (but not from) Zigur
- later SWL

Random (sorted roughly most control to least)
- Alchemist rewards
- graves
- escort rewards
- rare artifact in one orc pride, it's in white =>(Vor Pride, the tomes of Uttercold and Wildfire)
Some of my tools for helping make talents:
Melee Talent Creator
Annotated Talent Code (incomplete)

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

Re: [b41/b42] Talent Point Planner

#4 Post by Zizzo »

Hmm, a lot of those I haven't seen yet. [I've only taken one character to Zigur so far IIRC, and that was back in b38 or so.] Alchemists and escorts I've seen, so I could take a stab at those.

One thing I'm trying to be careful about, though... well, two things, really:
  • I don't want to show the player a source that they haven't already seen with some character (not necessarily this one).
  • Where possible, the addon tries to detect if the character has already received the bonus from a given source.
For instance, the Arena is associated with an achievement, so if the character has that achievement, the addon replaces the "Include Arena bonus" checkbox with a note that "You've already received the Arena bonus", and if that achievement doesn't appear in the world achievement list, it doesn't show the checkbox at all. For the alchemist or escort sources, I don't see any obvious way of doing that. I may just have to have the addon start keeping its own notes, like I did with the new plan file in the vault.

That's starting to get kind of involved, though; I think I'll shelve this for a while and focus more on the T2 module.
"Blessed are the yeeks, for they shall inherit Arda..."

darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: [b41/b42] Talent Point Planner

#5 Post by darkgod »

Nice!

As for non levelup things, just either say the full desc if know or just "unknown -- gain 2 class points".

For alchs & escorts you can analyze the player's quests.

And yay for T2 !
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

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

[b41-b43] Talent Point Planner

#6 Post by Zizzo »

Version 6 is now up. New in this release:
  • Migrated to b43. Includes a small UI fix so that our extended status text for stats doesn't get cut off at the left.
  • The planner dialog now remembers which talent sources you had selected to be reflected in your plan and re-selects them the next time you edit the plan. For newly restarted characters, this will reflect what you had selected in the previous incarnation's plan, as saved in the vault.
  • The planner dialog now allows you to include talent rewards from alchemist and escort quests, if it can confirm that you've seen them.
Now, that last one is the slightly tricky one. See, it's relatively straightforward to determine whether a particular character is aware of the talent-related rewards of a particular alchemist or escort quest by examining the character's quest data; but that doesn't help if we're working on the plan of a different character. On the other hand, we don't want to show rewards that the player hasn't seen with any character (spoilers, after all). To resolve this, I've added a notes file (/save/pointplanner-seen.lua; I briefly tried to wedge it into world.teaw, but I couldn't make head or tail of how that worked...). The addon observes quests that you've done and quests that you receive and complete, and saves notes to that file about which ones it can show in its dialog. Of course, that means you may well know about a quest source that the addon doesn't know you know about and thus won't let you factor into your plan; for now, that's unavoidable.

TL/DR; any time you receive an alchemist quest or complete an escort quest, or load a character who has already done so, the addon will make a note that you know about the associated talent reward and will make it available in the planner dialog for this character and all subsequent characters.

On a side note, the planner doesn't currently make any attempt to track or reflect prodigies, as they don't appear to interact with talent points in any obvious way.

As always, the Talent Point Planner addon is available on the Addons page.
"Blessed are the yeeks, for they shall inherit Arda..."

darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: [b41-b43] Talent Point Planner

#7 Post by darkgod »

Nice!!

As for world.teag, it's quite easy: jsut place something into world.foo and it'll always be there
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

tarantoga
Low Yeek
Posts: 5
Joined: Mon Sep 10, 2012 11:41 pm

Re: [b41-b43] Talent Point Planner

#8 Post by tarantoga »

hello, with the newest version i get error every time i want to finish arena quest, this happens every time you get the popup saying you finished arena quest and you are awarded generic talent point, if you try to close it it gives error angain

Image

simply disabling the addon didnt work i so had to delete it

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

Re: [b41-b43] Talent Point Planner

#9 Post by Zizzo »

darkgod wrote:As for world.teag, it's quite easy: jsut place something into world.foo and it'll always be there
[tests] So it is. I've uploaded a new version of the addon that incorporates this. It will attempt to load your old notes file, but I believe there were some bugs in writing that file, so I'm not sure how successful will be. We Apologize for the Inconvenience.(TM)
tarantoga wrote:hello, with the newest version i get error every time i want to finish arena quest, this happens every time you get the popup saying you finished arena quest and you are awarded generic talent point, if you try to close it it gives error angain
[checks code] [sound F/X: forehead repeatedly striking desk] Stupid typo... That bug is also fixed in this upload. We Apologize Again for the Error.(TM) :oops:
"Blessed are the yeeks, for they shall inherit Arda..."

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

Re: [b41-b43] Talent Point Planner

#10 Post by Zizzo »

Just uploaded a new version of this addon, migrated to RC1; no other changes.
"Blessed are the yeeks, for they shall inherit Arda..."

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

Re: [b41-b43] Talent Point Planner

#11 Post by Zizzo »

And migrated again to RC2; no other changes.
"Blessed are the yeeks, for they shall inherit Arda..."

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

Re: [b41-b43] Talent Point Planner

#12 Post by Zizzo »

*pant* *wheeze* And migrated yet again to RC4.
"Blessed are the yeeks, for they shall inherit Arda..."

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

Re: [b41-b43] Talent Point Planner

#13 Post by Zizzo »

And again for v1.0.0. And I'm hoping that now that we're out of the release candidates, it'll be a bit longer before I have to do this again... :wink:
"Blessed are the yeeks, for they shall inherit Arda..."

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

Re: [b41-1.0.0] Talent Point Planner

#14 Post by Zizzo »

A request for a small upstream tweak: Users of this addon will no doubt have noticed by now the spurious "Welcome to level 50" dialog generated by the addon's internal scratch clone being leveled up for planning purposes. My investigation of the code suggests that to suppress this dialog, I would need to entirely override the mod.class.Actor:levelup() method, which would be fragile and would clobber any later upstream changes to the method.

Now, the addon already uses the actor.silent_levelup flag to suppress the spurious level-10/20/30/40/50 achievements that were the bane of its obsolete Build-Order-Maker-based predecessor. Ideally the level-50 dialog would also be conditioned on the absence of said flag (and it would seem to make sense to do so), but currently it isn't, and it's not in a place where it can be easily overridden by the addon to do so, hence the necessity of wholesale method replacement. Might I humbly request this small change in upstream code? The relevant code is at line 2502 of mod/class/Actor.lua, as of SVN r6365. TIA. [bows]
"Blessed are the yeeks, for they shall inherit Arda..."

Noel
Thalore
Posts: 121
Joined: Fri Dec 15, 2006 1:49 am

Re: [b41-1.0.0] Talent Point Planner

#15 Post by Noel »

Here's a quick patch that adds the Antimagic and Fungus trees (Zigur quest and Myssil-based Urkis quest) to the point planner.

Would be better if the Fungus tree could be made dependent on the Antimagic tree, but it works okay like this...

PS. 'Twould also be nice if the main code provided an is_spellcaster() function so that we don't have to maintain duplicate code...

Code: Select all

diff --git a/overload/mod/dialogs/PointPlanDialog.lua b/overload/mod/dialogs/PointPlanDialog.lua
index f1789cf..9b0c128 100644
--- a/overload/mod/dialogs/PointPlanDialog.lua
+++ b/overload/mod/dialogs/PointPlanDialog.lua
@@ -61,6 +61,12 @@ local function has_done(tag)
 	 game.player.addon.pointplanner.done[tag]
 end
 
+-- Returns true if the specified player is a spellcaster
+-- (Logic duplicated from maps/wilderness/eyal.lua, for Zigur visibility)
+local function is_spellcaster(player)
+  return player:knowTalent(player.T_MANA_POOL) or player:knowTalent(player.T_VIM_POOL) or player:knowTalent(player.T_VIM_POOL) or player:knowTalent(player.T_NEGATIVE_POOL) or player:knowTalent(player.T_POSITIVE_POOL) or player:knowTalent(player.T_PARADOX_POOL) or player:attr("undead")
+end
+
 -- All known sources of talent points or talent trees.  Initially contains
 -- only fixed sources; below we will add sources from escort quests.
 -- Function fields:
@@ -136,6 +142,34 @@ local all_sources = {
     end,
   },
   {
+    tag = 'antimagic',
+    desc = 'the Wild-Gift/Antimagic tree, from Zigur quest',
+    known = function()
+      -- per maps/wilderness/eyal.lua, only non-casters can see Zigur
+      return is_campaign("Maj'Eyal") and world:hasAchievement('ANTIMAGIC') and game.player and not is_spellcaster(game.player)
+    end,
+    done = function()
+      return game.player and game.player:knowTalentType('wild-gift/antimagic')
+    end,
+    use = function(p)
+      p:learnTalentType('wild-gift/antimagic', true)
+    end,
+  },
+  {
+    tag = 'antimagic_fungus',
+    desc = 'the Wild-Gift/Fungus tree, from Myssil quest',
+    known = function()
+      -- only non-casters can see Zigur
+      return is_campaign("Maj'Eyal") and world:hasAchievement('ANTIMAGIC') and game.player and not is_spellcaster(game.player)
+    end,
+    done = function()
+      return game.player and game.player:knowTalentType('wild-gift/fungus')
+    end,
+    use = function(p)
+      p:learnTalentType('wild-gift/fungus', false)
+    end,
+  },
+  {
     tag = 'elixir_of_focus',
     desc = [[2 class talent points from Agrimley's Elixir of Focus]],
     known = function()

Post Reply