ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Sat Oct 21, 2017 1:13 am

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Sat Oct 15, 2016 9:47 pm 
Offline
Sher'Tul

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1398
Location: A shallow water area south of Bree
So, recently fired up my first Arcane Blade since… [checks notes] 1.0.5. Most obvious change so far is the Arcane Combat talent's new configuration dialog. That has a few annoying wrinkles, though:
  • The dialog comes up every time you activate Arcane Combat, which is presumably why it doesn't automatically reset when you exit the levelup dialog — which, in turn, means you have to bounce the talent manually every time you level up.
  • Conversely, the only way to get to the dialog is by deactivating Arcane Combat, waiting for it to cool down, and reactivating it.
  • The only things you can configure Arcane Combat to do is use a single talent or use all talents. What if, say, I'm in Tempest Peak and I want Arcane Combat to use Flame and Earthen Missiles but not Lightning?

To fix these, I've whipped up a new addon, creatively named Arcane Combat Tweaks. :wink: It resolves these problems as follows:
  • The new game option "Arcane Combat configure on activate" can be disabled to suppress the configuration dialog on talent activation (hence the name), allowing the talent to auto-reset as needed.
  • Whether the above option is enabled or disabled, the configuration dialog is always available via the talent's right-click popup menu.
  • The configuration dialog itself is improved: each applicable talent can be enabled or disabled separately (you have to leave at least one enabled, though, or the dialog won't let you exit). You can configure talents that you haven't learned yet, so you don't have to remember to go back to the dialog and enable Earthen Missiles when you learn it; obviously, Arcane Combat will only randomly choose from talents you have learned and can cast.

Note that for now, Arcane Combat Tweaks is incompatible with Use Alchemist Gems From Inventory, as they both overload the UseTalents:use() method to modify the talent right-click menu. I'm hopeful that a future engine version will add hooks to modify this menu or some other suitable method; in the meantime, the character creation dialog will warn you if you try to create a character with both addons enabled.

[Technical notes:]
Code:
Hooks:
  ToME:load [to modify the Arcane Combat talent]
  GameOptions:generateList [to add our game option]
Superload:
  mod.dialog.UseTalents:
    use() [overloaded, to add config option to Arcane Combat]

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


Top
 Profile  
 
PostPosted: Sat Oct 15, 2016 10:14 pm 
Offline
Perspiring Physicist

Joined: Sun Sep 09, 2012 7:43 am
Posts: 5506
Zizzo wrote:
[*] The only things you can configure Arcane Combat to do is use a single talent or use all talents. What if, say, I'm in Tempest Peak and I want Arcane Combat to use Flame and Earthen Missiles but not Lightning?[/list]
Why would you want to do that? Gwelgoroths are weak to fire. :P

_________________
My feedback meter decays into coding. Give me feedback and I make mods.


Top
 Profile  
 
PostPosted: Mon Oct 17, 2016 4:24 pm 
Offline
Uruivellas

Joined: Mon Jan 27, 2014 10:40 am
Posts: 669
...are applicable talents found manually, or does it look for the arcane combat flag? cause if so this will be Messy if used along with my arcane combat addon. xD


Top
 Profile  
 
PostPosted: Mon Oct 17, 2016 11:22 pm 
Offline
Sher'Tul

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1398
Location: A shallow water area south of Bree
HousePet wrote:
Why would you want to do that? Gwelgoroths are weak to fire. :P

(shrug) If Flame is on cooldown, better to have something proc than nothing.

astralInferno wrote:
...are applicable talents found manually, or does it look for the arcane combat flag? cause if so this will be Messy if used along with my arcane combat addon. xD

I made an effort to collect applicable talents the same way Arcane Combat itself does, involving… [sound F/X: source diving] checking for the 'allow_for_arcane_combat' field and using Arcane Combat's canUseTalent() method. If that's the wrong way to do it, I'm happy to fix it.

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


Top
 Profile  
 
PostPosted: Tue Oct 18, 2016 3:48 pm 
Offline
Uruivellas

Joined: Mon Jan 27, 2014 10:40 am
Posts: 669
It's absolutely the right method! I'm just amused; my tweak sets like half the talents in the game to be allowed for arcane combat, so the list will end up Very Long if you use both. Not sure if that's a problem, and certainly not worth the effort it would take to fix, unless someone pipes up who's finding it an issue.


Top
 Profile  
 
PostPosted: Sat Oct 22, 2016 1:26 am 
Offline
Sher'Tul

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1398
Location: A shallow water area south of Bree
astralInferno wrote:
It's absolutely the right method! I'm just amused; my tweak sets like half the talents in the game to be allowed for arcane combat, so the list will end up Very Long if you use both. Not sure if that's a problem, and certainly not worth the effort it would take to fix, unless someone pipes up who's finding it an issue.

[sound F/X: source diving] Well, the new configuration dialog defaults to 80% game window height, and all the relevant bits have 'scrollbar=true' set, so I think it should scale up reasonably well.

In the meantime, pushing out the first bugfix release, v1a: I was botching the list of configured spells in Arcane Combat's talent tooltip, listing all of them instead of just the ones that are currently enabled. We Apologize for the Confusion.™

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


Top
 Profile  
 
PostPosted: Tue Nov 01, 2016 12:42 am 
Offline
Sher'Tul

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1398
Location: A shallow water area south of Bree
I thought that logic seemed hinky… :oops: See, the way I was doing it before, if you had, say, everything but Lightning configured for Arcane Combat proc, and everything but Lightning was on cooldown (or you hadn't learned them yet), we were telling the underlying Arcane Combat trigger function to just trigger anything at random — which, of course, could result in Lightning triggering, which is not what we want.

v1a.1, just pushed out, fixes this as follows: if all the enabled spells are unavailable, we pretend to the underlying trigger function that one of the unavailable spells was your sole trigger choice, so that the trigger code will think, "hmm, the configured spell's not available; oh well, guess we can't proc this turn after all", which works out to the intended behavior. We Apologize for the Inconvenience.™

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


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

Joined: Thu Jan 23, 2003 8:13 pm
Posts: 1398
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 "Configure Arcane Combat spells" command to Arcane Combat's right-click talent menu. There should be no visible change in functionality, but we're now compatible with Use Alchemist Gems From Inventory (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.]

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


Top
 Profile  
 
PostPosted: Fri Jun 23, 2017 8:11 pm 
Offline
Wayist

Joined: Tue Feb 14, 2017 9:08 pm
Posts: 21
Went slightly more insane than usual and kludged together an unholy-but-highly-magical fusion that combines Arcane Combat Tweaks with AstralInferno's Adventurous Arcane Combat and also threw in parts of Grayswandir's Arcane Blade Tweak for giggles.

Figured it would be decent to ask around for permission before I publish it separately, and also noticed that I can barely parse a lot of your code with all the hacks and workarounds, but one of the changes I made that makes your ACT run more smoothly was to have it not add unknown candidate talents to the list, because when using ACT and with Adventurous Arcane Combat it needlessly tries to cast a bunch of spells the player hasn't learned.

(edit: the attached file should be stable but is a few revisions out of date, but I'd rather not clutter up the entire forum uploading alpha versions I'm still not quite satisfied with enough to call them release-worthy)

edit2: finally got around to posting something - viewtopic.php?f=50&t=48220


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 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:  
Powered by phpBB® Forum Software © phpBB Group