Page 1 of 1

NWN Buff Watcher

Posted: Tue Jun 01, 2021 3:57 am
by Mattamue
I've made an open-source standalone program that watches the chatlog output of NWN and tracks buffs, abilities, and cooldown durations. The Watcher window is set as topmost so it will hover over a windowed session of NWN and allow the game to be played as normal. Think of it like a UI enhancement.

To download the current version, go to (https://github.com/Mattamue/NWN-Buff-Wa ... s/tag/v1.1) for the source code and compiled version (windows)!

Image

Image

Updates:
v1.1 time update, a few features, and bugfixes.
  • feature: update for Arelith time change enhancement #66
  • bugfix: domain spells added #64
  • bugfix: added Divine Power #63
  • bugfix: regenerate corrected to turns per level #62
  • bugfix: chatlog days single digit ability error fixed #60
  • bugfix: opening locks (or any skill check) causes dispel window bug fixed #57
  • feature: intimidate added as a trigger #56
  • feature: taunt added as a trigger #55
  • bugfix: One With The Land corrected to One with the Land #54
  • bugfix: wand of freedom corrected to Wand of Freedom of Movement #53
Features:
  • Durations of buffs from potions, scrolls, and wands based on in-game item level
  • Tracking durations and spells from items like Dust of Disappearance; I’m sure this list could be expanded if anyone wants to share more items, but I’ve captured most everything crafting and the few module items I’m aware of
  • Enter character information for more accurate durations from modifiers
  • Loremaster levels calculate increased durations for wands and scrolls
  • Spell Focus feats are calculated for things like Invisibility, True Seeing, and Aura of Vitality
  • Caster levels and extend meta-magic for casted buffs
  • Specialist wizard signature spell cooldowns and unique durations for Illusion and Divination
  • Class ability cooldowns are tracked and thankfully, because Arelith outputs are sane and similar, cooldowns for complex things like Blinding Speed are accurate
  • Enter charisma modifier and Divine Champion levels for accurate Wrath, Might, and Shield durations
  • Tracking of staggered Bard Song, Turn Undead, and Smite cooldowns (with the caveat that the cooldowns themselves in-game are not exactly 10 minutes, so these will drift)
  • Tracking innate ability cooldowns and duration of abilities like Duergar Invisibility; this is the first example of the limitations of the Watcher as it can only collect the “uses Innate Ability” from the chatlog and cannot know what ability the player is using, but this is solved by allowing the user to select the ability they wish to track from the buff window itself with a drop-down menu
  • Tracking Knockdown duration on a single target, subject to the same limitations of the chatlog
  • Handling player-made potions (and hence a longer duration) with a toggle on the character window depending on what type of potions you use
  • Tracks durations of summons and tracks durations of cooldowns for those classes that have refreshed summon casting
  • Spell cooldowns like Clarity, Time Stop, and Greater Restoration are captured
  • Edge cases for things like Improved Invisibility actually being two spells in Arelith and how the Invisibility duration can be adjusted in like three different ways, are handled
  • User can destroy a buff that was removed in some way that’s not capturable, for example if a summon is killed or unsummoned
  • Rest button to quickly clear all buffs and cooldowns, except for the Scry and godsave cooldowns
  • When dispelled and breached, removed spells are removed from the Watcher and displayed in another pop-up
  • Damage shields not stacking
  • Ability to add your own custom triggers. Requires JSON editing. Player-made items are sometimes branded and change in the chatlog. That means they’ll be missed by the normal triggers looking for “Bull’s Strength” if the potion is renamed to “Maggie’s Magical Strong Juice”. Today, it would be possible for you to simply add another entry to the JSON -- trust me it isn’t hard -- but in the future I have it on my todo list to make it possible to add these custom items from the Watcher.
Setting up the Watcher:
  • Get the Watcher (or the source code) from https://github.com/Mattamue/NWN-Buff-Watcher
  • Unzip the exe and its JSON and graphics sub-folders anywhere
  • Have your chat logging turned on Image
  • Setup the watcher and open the "nwclientLog1" (the location of the log for you is probably in the same directory as mine in this screen shot): Image
FAQ/Other:
I'm sure I will expand the with edits as questions come up. Please let me know of any bugs or issues. I'm open to the idea of people helping with the code if you want to add a feature or fix a bug. That can all be handled on the GitHub. Python is a pretty easy language to learn. I know because I've learned it these past few months and I've added lots of comments to the source code about how it works.
  • How do I extend spells?
    You've keyed in into a limitation of using the chatlog. There's not way to tell from "User casts Bull's Strength" it it's maximized, extended, empowered, still, or silent. To address this, click on the buff in the Watcher and choose if its extended:

    Image

    So after you cast an extended spell you have to go into the Watcher and set if its extended. If you mis-click you can un-check or re-check as needed. The Watcher will remember the duration either way.

Re: NWN Buff Watcher

Posted: Tue Jun 01, 2021 4:42 am
by Diegovog
That's solid work, thank you!

Re: NWN Buff Watcher

Posted: Tue Jun 01, 2021 4:46 am
by Dreams
I can see this being particularly useful with recent bugs in the latest updates. Nice work!

Re: NWN Buff Watcher

Posted: Tue Jun 01, 2021 6:38 am
by Karris the Anarchist
Oh wow. This looks amazing.

Re: NWN Buff Watcher

Posted: Tue Jun 01, 2021 7:57 am
by Pala
This is AMAZING. Thanks so much, man.

Just a heads up from the wands I could test: Freedom of Movement and One With The Land don't seem to come up.

Re: NWN Buff Watcher

Posted: Tue Jun 01, 2021 10:58 am
by Archnon
Having watched the development of this project from the start, I can attest that the program is awesome and a tremendous amount of work went into it. A real gift to the community! Thanks!

Re: NWN Buff Watcher

Posted: Tue Jun 01, 2021 11:37 am
by Good Character
Yes! YES! Especially the class cooldowns!

Does it track Taunt and Intimidate?

Re: NWN Buff Watcher

Posted: Tue Jun 01, 2021 12:17 pm
by Vestmore
Absolute gamechanger. Appreciate the hard work;

Top man!

Re: NWN Buff Watcher

Posted: Tue Jun 01, 2021 1:19 pm
by Mattamue
Pala wrote:
Tue Jun 01, 2021 7:57 am
This is AMAZING. Thanks so much, man.

Just a heads up from the wands I could test: Freedom of Movement and One With The Land don't seem to come up.
Thank you!

The trigger for Freedom wands didn't spell out "Freedom of Movement". On the list to be fixed.

The trigger for One with the Land in the Watcher is "One With The Land" and it should be "One with the Land". On the list to be fixed.

In the meantime, before I make another release, those are super easy to fix. Go into the use_items.json with any text editor. Find "uses Wand of Freedom" and change it to "uses Wand of Freedom of Movement". Find "uses Wand of One With The Land" and change it to "uses Wand of One with the Land."
Good Character wrote:
Tue Jun 01, 2021 11:37 am
Yes! YES! Especially the class cooldowns!

Does it track Taunt and Intimidate?
No, it doesn't track taunt or intimidate. I've added to the list. Intimidate is trickier because it doesn't have any feedback in the chatlog that it actually worked. It could assume that it did work on everyone in AoE and track off that assumption.

Re: NWN Buff Watcher

Posted: Tue Jun 01, 2021 2:28 pm
by Zariu
Very very neat, though one thing I did notice is that it doesn't seem to be able to tell if I have spells extended. I extend a lot of my buffs so if there is some way to track that awesome, though I'm unsure how easy that is.

Re: NWN Buff Watcher

Posted: Tue Jun 01, 2021 3:37 pm
by Mattamue
Zariu wrote:
Tue Jun 01, 2021 2:28 pm
Very very neat, though one thing I did notice is that it doesn't seem to be able to tell if I have spells extended. I extend a lot of my buffs so if there is some way to track that awesome, though I'm unsure how easy that is.
You've keyed in into a limitation of using the chatlog. There's not way to tell from "Zariu casts Bull's Strength" it it's maximized, extended, empowered, still, or silent.

I attempt to address this by allowing you to click on the buff in the Watcher and choose if its extended:

Image

So after you cast an extended spell you have to go into the Watcher and set if its extended. If you mis-click you can un-check or re-check as needed and it'll remember the duration either way.

Re: NWN Buff Watcher

Posted: Tue Jun 01, 2021 11:21 pm
by donarek
This is amazing!
I was thinking about making something like this in Autohotkey script, but your implementation is super! Great that data .jsons are editable.

Re: NWN Buff Watcher

Posted: Fri Jun 04, 2021 10:06 am
by TooManyPotatoes
Thanks for this!

I've been doing some testing.

It doesnt seem to register Divine Power cleric spell and it registers Regenerate as a rounds/lvl spell instead of turns/level.

Re: NWN Buff Watcher

Posted: Fri Jun 04, 2021 2:47 pm
by Mattamue
TooManyPotatoes wrote:
Fri Jun 04, 2021 10:06 am
Thanks for this!

I've been doing some testing.

It doesnt seem to register Divine Power cleric spell and it registers Regenerate as a rounds/lvl spell instead of turns/level.
Good catch! Yes, I missed Divine Power. It's on the list to fix.

I checked and regen and monstrous regen are both turns/level on Arelith and I missed. Also on the list to fix.

Also, I was counting spaces for the ability triggers and didn't realize that the chat log does dates for single-digit dates a little oddly:

Code: Select all

May 27, 2021
June  1, 2021
So that extra space is throwing things off. Will be fixed when I release a bugfix for all these little things. Or, it'll start working correctly again on June 10th!

Re: NWN Buff Watcher

Posted: Mon Jun 07, 2021 3:55 am
by Mattamue
Update: https://github.com/Mattamue/NWN-Buff-Wa ... s/tag/v1.1
v1.1 time update, a few features, and bugfixes.
  • feature: update for Arelith time change enhancement #66
  • bugfix: domain spells added #64
  • bugfix: added Divine Power #63
  • bugfix: regenerate corrected to turns per level #62
  • bugfix: chatlog days single digit ability error fixed #60
  • bugfix: opening locks (or any skill check) causes dispel window bug fixed #57
  • feature: intimidate added as a trigger #56
  • feature: taunt added as a trigger #55
  • bugfix: One With The Land corrected to One with the Land #54
  • bugfix: wand of freedom corrected to Wand of Freedom of Movement #53

Re: NWN Buff Watcher

Posted: Wed Jun 09, 2021 11:59 pm
by Mupkin
Amazing work! Been dreaming of such application for a long long time... props to you for actually creating it!

Re: NWN Buff Watcher

Posted: Thu Jun 10, 2021 11:55 pm
by godhand-
does this track buffs on others as well? if so how does it differentiate between targets on ui?

Re: NWN Buff Watcher

Posted: Fri Jun 11, 2021 2:52 am
by Mattamue
godhand- wrote:
Thu Jun 10, 2021 11:55 pm
does this track buffs on others as well? if so how does it differentiate between targets on ui?
No, only your own buffs. You track your own buffs by entering your character name into the settings.

Re: NWN Buff Watcher

Posted: Fri Jun 11, 2021 12:26 pm
by Opustus
w00ty, this is neat! You are a treasure.

Is it possible to choose which buffs to track? Or do I simply customise the json to my liking? I would personally only want to track round-based stuff so this kind of categorisation would be great if not already featured.

Re: NWN Buff Watcher

Posted: Fri Jun 11, 2021 1:27 pm
by Mattamue
Opustus wrote:
Fri Jun 11, 2021 12:26 pm
w00ty, this is neat! You are a treasure.

Is it possible to choose which buffs to track? Or do I simply customise the json to my liking? I would personally only want to track round-based stuff so this kind of categorisation would be great if not already featured.
Thanks, was a lot of fun to make. Not built-in feature to choose which buffs to track, but yes you keyed in on how you can make it that way.

Re: NWN Buff Watcher

Posted: Fri Jul 02, 2021 2:07 pm
by TooManyPotatoes
I've found that I get a popup every time I disable a trap or unlock a chest alerting me that these properties have been dispelled. O.o
I see there was a bugfix made for this but doesnt seem to have applied? All the other bugfixes appear to have worked (Divine power, regen changes). I suppose it could just be an issue on my end and I'll reinstall for next time I play.

I keep having to select the client log at the start of every session (and server transition I think). I assume this is unavoidable based on how NWN generates the logs but I just thought I'd check if there was a workaround?

Otherwise I've been having a lot of fun with it. Actually it's been awesome. Thanks!

Re: NWN Buff Watcher

Posted: Fri Jul 02, 2021 4:07 pm
by Mattamue
TooManyPotatoes wrote:
Fri Jul 02, 2021 2:07 pm
I've found that I get a popup every time I disable a trap or unlock a chest alerting me that these properties have been dispelled. O.o
I see there was a bugfix made for this but doesnt seem to have applied? All the other bugfixes appear to have worked (Divine power, regen changes). I suppose it could just be an issue on my end and I'll reinstall for next time I play.
Are you on version 1.1?
TooManyPotatoes wrote:
Fri Jul 02, 2021 2:07 pm
I keep having to select the client log at the start of every session (and server transition I think). I assume this is unavoidable based on how NWN generates the logs but I just thought I'd check if there was a workaround?
There may be something. Here's some insight. The chat log will always have the same "nwclientLog1" name, so I should be able to save that as a default. Then, the program could see if you have a default saved, and just attempt to open that file at program start and start watching. The user would have to only open the watcher after NWN is already running in that case. So I'd also have to have a case for when the user opens the Watcher before NWN is running, and then when NWN starts it creates or replaces that file, so the user would still have to interact or click something... maybe just clicking "watch" will use the saved location and file and forget about having it run at startup. I'll think about how to solve it.

And thanks, glad you like it! I'm simmering on the next feature. Probably AC/AB of the last few attack-ers and attack-ees. I was told I may also be able to add some basic timers to the buffs in-game with NWNX. Still very early on that front.

Re: NWN Buff Watcher

Posted: Tue Jul 06, 2021 7:23 pm
by TooManyPotatoes
Mattamue wrote:
Fri Jul 02, 2021 4:07 pm
TooManyPotatoes wrote:
Fri Jul 02, 2021 2:07 pm
I've found that I get a popup every time I disable a trap or unlock a chest alerting me that these properties have been dispelled. O.o
I see there was a bugfix made for this but doesnt seem to have applied? All the other bugfixes appear to have worked (Divine power, regen changes). I suppose it could just be an issue on my end and I'll reinstall for next time I play.
Are you on version 1.1?
Haven't been able to reproduce since reinstalling so I guess it was just a problem my end. My bad!

Unfortunately if an enemy dispels you unsuccessfully, nwns logs will still sometimes show bless weapon as being dispelled (even though that is impossible). Is it possible to add an exception in your dispel pop up if bless weapon is "dispelled" in the combat log?
There may be something. Here's some insight. The chat log will always have the same "nwclientLog1" name, so I should be able to save that as a default. Then, the program could see if you have a default saved, and just attempt to open that file at program start and start watching. The user would have to only open the watcher after NWN is already running in that case. So I'd also have to have a case for when the user opens the Watcher before NWN is running, and then when NWN starts it creates or replaces that file, so the user would still have to interact or click something... maybe just clicking "watch" will use the saved location and file and forget about having it run at startup. I'll think about how to solve it.
That would be super cool. It's pretty much the only hassle with the program.
And thanks, glad you like it! I'm simmering on the next feature. Probably AC/AB of the last few attack-ers and attack-ees. I was told I may also be able to add some basic timers to the buffs in-game with NWNX. Still very early on that front.
The AB/AC would be really useful. Especially for my own character as it can be hard to spot it at a glance if there are a lot of enemies. For some enemies I've had to record the last few minutes of gameplay and go through them after the fight to get an idea of their AC/AB. Saving me this effort would be a dream. At any rate I'll be keeping an eye out for the next update!