ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Sun Apr 23, 2017 8:02 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Jul 14, 2016 11:24 pm 
Offline
Sher'Tul

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1305
Location: A shallow water area south of Bree
Dunno if anyone else does this, but I like to keep some low-tier alchemist gems around to use for talents like Gem Portal or Refit Golem, saving my high-tier gems for bombs. It's kind of annoying swapping wielded gems every time, so I whipped up a new addon Use Alchemist Gems from Inventory. This affects the talents:
  • Refit Golem
  • Gem Portal
  • Throw Bomb
  • Shockwave Bomb
  • Thunderclap
(Let me know if I've missed any…) On the right-click binding menu for the talent (or via the Talents dialog), you can choose the new option "Prompt for alchemist gems to use with this talent"; with that in place, when you use the talent, an inventory dialog will pop up listing your alchemist gems in inventory and in your quiver, allowing you to choose which ones to use. Canceling out of this dialog will cancel the talent usage.

Now, to make this work, the internal implementation has to actually physically swap the selected gems into the quiver before using the talent and back out afterward, so you'll see log messages to that effect (I've tried to make an effort to avoid triggering Swift Hands' cooldown; let me know if I got that wrong or missed something related). And yes, technically this is probably sort of cheating, so it probably won't be going into ZOmnibus.

[And for addon developers, if your addon adds talents that use alchemist gems and you want them to be bindable with this talent, all you need to do is add a 'uses_alchemist_gems' field to your talent definition; its value should be either the number of gems needed or a function(self,t) that returns the number of gems needed.]

[Technical notes:]
Code:
Hooks:
  ToME:load [to mark talents that use alchemist gems]
Superload:
  mod.class.Actor:
    hasAlchemistWeapon() [to change alchemist gems for talent description purposes]
    preUseTalent() [to prompt for and wield alchemist gems]
    postUseTalent() [to re-wield original alchemist gems]
  mod.dialog.UseTalents:
    use() [overloaded, to add our binding to the appropriate talents]

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Top
 Profile  
 
PostPosted: Sat Oct 15, 2016 9:49 pm 
Offline
Sher'Tul

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1305
Location: A shallow water area south of Bree
Quickie release 1a, adding a warning popup to the character creation dialog to prevent this addon from being used with the (for now) mutually incompatible Arcane Combat Tweaks addon.

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Top
 Profile  
 
PostPosted: Fri Mar 10, 2017 12:36 am 
Offline
Sher'Tul

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1305
Location: A shallow water area south of Bree
Release v2 uses the new UseTalents:generate and UseTalents:use hooks added by DarkGod (thanks again!) to add our "Prompt for alchemist gems to use with this talent" command to the right-click menu of talents that use alchemist gems. There should be no visible change in functionality, but we're now compatible with Arcane Combat Tweaks (for all your really eclectic Adventurer needs :wink: ) — if you upgrade both addons at the same time.

[And another reminder here: if you're using this addon together with Restart Sustains or ZOmnibus, be sure to upgrade those addons when you upgrade this one.]

Also, as long as I was in the neighborhood, I added markers to the hotkey icons of any talents that you've bound to prompt for alchemist gems, as a convenient reminder:

Attachment:
bind-mark.png
bind-mark.png [ 26.94 KiB | Viewed 53 times ]

_________________
"Blessed are the yeeks, for they shall inherit Arda..."


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: jdisk, rexorcorum and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group