Thread Tools Display Modes
02/17/21, 12:37 PM   #1
CyberOnEso
 
CyberOnEso's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2017
Posts: 18
Post Jack of all Trades


Jack of all Trades is an addon I am looking to release with U29.
It will only work on the PTS for now

Automatically adjusts your green champion bar loadout depending on what you are attempting to achieve and restores back your old CP setup when you are done.

Crafting
  • Automatically slots Master Gatherer and Plentiful Harvest when you start harvesting a crafting node.
  • Automatically slots Meticulous Disassembly when you start crafting, ensuring you always get optimal refining results!

Riding
  • Automatically slots Gifted Rider, and War Mount whenever your mount up!

Looting
  • Automatically slots Treasure Hunter, and Homemaker whenever you are looting the relevant container.

Fishing
  • Slots Reel Technique and Angler's Instincts whenever you start fishing.

Thieving
  • Slots Sustaing Shadows whenever you start sneaking, keeping you in the dark for longer!
  • Slots Infamous whenever you interact with a fence, helping you always get the best selling price.
  • Slots Cutpurse's Art whenever you pickpocket someone.
  • Slots Shadowstrike when you can use the Blade of Woe.

Miscellaneous
  • Slots Professional Upkeep when you talk with a merchant, ensuring you always get your gear repaired for less!

This addon will not respec your champion points, and will not charge you 3000 gold etc.
It will only equip the skills if you have enough points into them already.
It is intended to be a seamless quality of life improvement, not a CP respec addon.

Optional Features
  • Get a notification whenver any skill you wish to be notifed for is slotted
  • Receive a warning message whenever you don't have enough points into a star for it to be automatically slotted
  • Disable automatically slotting any skill you wish
  • Remap where on your champion bar skills will be automatically slotted to.

If anyone has time to test this addon or can provide me with any thoughts, additions, or improvements I would be very grateful.

Many thanks

Update v0.1
  • If you run the addon on the live server it will not cause any errors. It simply will not register any events or try to call anything from the CP 2.0 System.
Update v0.2
  • Fixed the undefined variable in the AddonLoaded function, thank you Votan!
Update v0.3
  • Rewrote CP assigning functions to use an object-oriented paradigm. Should help in the future
  • Separated Events and Skill functions into separate files to keep things clean.
Update v0.4
  • Added settings menu allowing you to customize when and how warnings will be shown if you do not have enough CP points allocated into the skill to slot it.
  • Added support for localization.
Update v0.5
  • When we are unable to slot CP points into a node, due to being in combat etc. We will attempt to slot the node again once combat ends.
  • Will remember which skill should be set back afer a reload UI!
  • If you reload UI whilst in combat with it will slot your original CP back after combat ends after the reload UI ends, this took more effort than it is probably worth.
  • Added method of finding names, discipline data automatically.
  • Improved localization support
Update v0.5.1
  • Fixes for issues created with PTS v6.3.4
  • Added a Pre Hook that stops the camera shake whenever you confirm a skill, this was throwing errors when we allocate a champion node via the addon.
  • Improvements to comments.
  • Improvements to load order.
Update v0.7
  • Added all remaining CP stars and can automatically slot all of them when they would prove useful.
  • Large improvements to the menu
  • Improvements to ensure that your old skills are always put back exactly where you left them!
Attached Files
File Type: zip JackOfAllTrades v0.7.zip (19.1 KB, 1439 views)

Last edited by CyberOnEso : 02/27/21 at 07:07 PM. Reason: Update v0.7
 
02/18/21, 04:20 AM   #2
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Thumbs up

I love the idea already!

As you requested to test it, I did a leaking globals check.
The only minor thing found is, that disciplineIndex in line 43 (JackOfAllTrades.AddonLoaded) is undefined. Not sure, if the line could be simplified to just assign 1.

votan
 
02/18/21, 04:55 AM   #3
CyberOnEso
 
CyberOnEso's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2017
Posts: 18
Smile

Thank you very much, I do really appreciate it!
Originally Posted by votan View Post
disciplineIndex in line 43 (JackOfAllTrades.AddonLoaded) is undefined.
Fixed that and uploaded a new version, thank you very much!
 
02/27/21, 06:57 PM   #4
CyberOnEso
 
CyberOnEso's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2017
Posts: 18
Hey'a, over the past week or so I have made large improvements to the addon, getting it ready for release.
I have tested the changes myself and with a friend, but would appreciate any testing or feedback any of you could provide on the latest version.

Thank you very much!
 
03/01/21, 05:33 AM   #5
Gabriel_H
 
Gabriel_H's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2021
Posts: 11
Loving the addon. Brilliant work.

The one ask/suggestion I have is having 'Fade Away' automatically slot when entering sneak mode or when selecting flee from a guard. The only issue might be that triggering the guard (entering combat) might come after the sneak state is broken.

The reason I suggest it is because it's only likely to be needed when performing nefarious deeds that tend to only happen when sneaking. It would also mean only 4 stars remain that are not situational being:

Friends in Low Places
Rationer
Liquid Efficiency
Steed's Blessing

Which would mean that they could become the 4 defaults slotted.

Last edited by Gabriel_H : 03/01/21 at 05:45 AM.
 
03/01/21, 06:52 AM   #6
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
Originally Posted by Gabriel_H View Post
Loving the addon. Brilliant work.

The one ask/suggestion I have is having 'Fade Away' automatically slot when entering sneak mode or when selecting flee from a guard. The only issue might be that triggering the guard (entering combat) might come after the sneak state is broken.

The reason I suggest it is because it's only likely to be needed when performing nefarious deeds that tend to only happen when sneaking. It would also mean only 4 stars remain that are not situational being:

Friends in Low Places
Rationer
Liquid Efficiency
Steed's Blessing

Which would mean that they could become the 4 defaults slotted.
Somehow sounds like a use case for "profiles" instead of "switch on demand". You already said that getting into combat will block any chance changing the CP slots. Should be the same as changing gear etc. as you will be in combat before the addon can react on it. The guard is not raising his finger And if so he is not telling the API he will pull you into combat soon so the addon could react before you get pulled into combat.
Either something for a CP profile changing the slots before you try to steal/sneak etc. or a keybind change maybe?
 
03/01/21, 11:01 AM   #7
Gabriel_H
 
Gabriel_H's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2021
Posts: 11
Originally Posted by Baertram View Post
Somehow sounds like a use case for "profiles" instead of "switch on demand". You already said that getting into combat will block any chance changing the CP slots. Should be the same as changing gear etc. as you will be in combat before the addon can react on it. The guard is not raising his finger And if so he is not telling the API he will pull you into combat soon so the addon could react before you get pulled into combat.
Either something for a CP profile changing the slots before you try to steal/sneak etc. or a keybind change maybe?
But the combat only initates after selecting the "Flee" dialogue option. If you walk into a guard while already having an active bounty, and not already in sneak mode, before combat starts then that's on you to have had it slotted.
 
03/01/21, 11:18 AM   #8
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
Originally Posted by Gabriel_H View Post
But the combat only initates after selecting the "Flee" dialogue option. If you walk into a guard while already having an active bounty, and not already in sneak mode, before combat starts then that's on you to have had it slotted.
A right, this should be detectable then via event_chatter_begin or similar. Maybe there even is an extra chatter type or something like an own event for it.
In the esoui txt API documentation you'll find e.g. MsgInteractTypes CHATTER_...

Btw: The infamy level does not decrease if you successfully flee afaik. It will lower itsself over time, but not necessarily fter fleeing already, isn't it?

Last edited by Baertram : 03/01/21 at 11:23 AM.
 
03/01/21, 07:58 AM   #9
CyberOnEso
 
CyberOnEso's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2017
Posts: 18
Originally Posted by Gabriel_H View Post
The one ask/suggestion I have is having 'Fade Away' automatically slot when entering sneak mode or when selecting flee from a guard. The only issue might be that triggering the guard (entering combat) might come after the sneak state is broken.
Hey'a, thank you very much for your suggestion.

I don't use the Justice system that often, however, one way I think it may be doable is by using the event EVENT_JUSTICE_INFAMY_UPDATED, this will tell the addon your new and old infamy values, which would be increased when you first commit a crime and decreased whenever you successfully flee from guards? Is that correct?

So I could slot the 'Fade Away' star whenever you increase in infamy state and remove it whenever you decrease in infamy state. As long as the crime you are committing doesn't put you in combat this should work?

Alternatively, I could add a toggle in the setting menu to automatically slot Fade Away whenever you start sneaking

Would love to hear your thoughts.

Many thanks!

Last edited by CyberOnEso : 03/01/21 at 08:04 AM.
 
03/01/21, 11:13 AM   #10
Gabriel_H
 
Gabriel_H's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2021
Posts: 11
Originally Posted by CyberOnEso View Post
Hey'a, thank you very much for your suggestion.

I don't use the Justice system that often, however, one way I think it may be doable is by using the event EVENT_JUSTICE_INFAMY_UPDATED, this will tell the addon your new and old infamy values, which would be increased when you first commit a crime and decreased whenever you successfully flee from guards? Is that correct?

So I could slot the 'Fade Away' star whenever you increase in infamy state and remove it whenever you decrease in infamy state. As long as the crime you are committing doesn't put you in combat this should work?

Alternatively, I could add a toggle in the setting menu to automatically slot Fade Away whenever you start sneaking

Would love to hear your thoughts.

Many thanks!
As I just said to Baertram, really the only time it comes into play is when selecting "Flee" from the dialogue option - but cutting into that is a tricky beast for coding.

Which is why I was thinking about it being slotted when you sneak. The problem I'm causing you though is Sustaining Shadows would need to be slotted at the same time, and Cutpurse's Art, Shadowstrike, Treasure Hunter, and Homemaker could come into play at some point too.

So I guess my question is, if Sustaining Shadows is auto-slotted by sneak mode, does it use Slot 1 and Cutpurse's Art, Shadowstrike, Treasure Hunter, and Homemaker then use Slot 2 when they come into play?

If so, then if both Shadow & Fade Away slot when sneaking, Shadow using Slot 1, and Fade using Slot 2, the others would have to use Slot 3 when they come into play.

Edit: Not trying to create work for you, but just a passing thought, adding in an option as to which slot each star will use?

Last edited by Gabriel_H : 03/01/21 at 11:17 AM.
 
03/01/21, 11:27 AM   #11
CyberOnEso
 
CyberOnEso's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2017
Posts: 18
Originally Posted by Gabriel_H View Post
Which is why I was thinking about it being slotted when you sneak. The problem I'm causing you though is Sustaining Shadows would need to be slotted at the same time, and Cutpurse's Art, Shadowstrike, Treasure Hunter, and Homemaker could come into play at some point too.
The way I have it set up now is that whenever you sneak it will slot 'Sustaining Shadows' in slot 1.

Whenever you attempt to pickpocket someone (Press E when the pickpocket reticle message is shown) it will slot 'Cutpurse's Art' in slot 2.
Whenever you attempt to loot a container (Press E when the 'search' reticle message is shown) it will slot 'Homemaker' in slot 2.
Whenever you attempt to loot a treasurechest (Press E when the 'use'/ 'unlock' reticle message is shown) it will slot 'Treasure Hunter' in slot 2.

Neither of these 3 events can happen at the same time, so we're okay.

Whenever you see the 'Blade of Woe' synergy it will slot 'Shadowstrike' in slot 3. (This is a problematic one and the Blade of Woe synergy is ****y so it gets its own slot).

With 'Fade Away' I am thinking of slotting it in slot 4 whenever something that would trigger it would happen.
But that would overwrite someone's speed buff star, which isn't really ideal.

I have an implementation now where when you start getting arrested it will slot 'Fade Away' in slot 4 and then when your heat is decreased by 25% (When the passive is activated) it will unslot it.

Originally Posted by Baertram View Post
Btw: The infamy level does not decrease if you successfully flee afaik. It will lower itself over time, but not necessarily after fleeing already, isn't it?
Ahh okay, thank you very much.
I am looking into how to find which dialog option the user selects.

Last edited by CyberOnEso : 03/01/21 at 12:55 PM.
 
03/01/21, 06:01 PM   #12
Gabriel_H
 
Gabriel_H's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2021
Posts: 11
Originally Posted by CyberOnEso View Post
With 'Fade Away' I am thinking of slotting it in slot 4 whenever something that would trigger it would happen.
But that would overwrite someone's speed buff star, which isn't really ideal.

I have an implementation now where when you start getting arrested it will slot 'Fade Away' in slot 4 and then when your heat is decreased by 25% (When the passive is activated) it will unslot it.


Ahh okay, thank you very much.
I am looking into how to find which dialog option the user selects.
I have had a look at your code and can see how you've set up the slots - very elegant btw.

If you are going down the dialogue option, you'll have to put checks in for "Not Fleeing", so that might cause you some hassle. Sadly I wish it could be a little simpler on the mechs, as in you can't pickpocket while in-combat (triggered by fleeing) but you can still loot chests/containers in combat if you outsmart the dumb guards.

As for the options, it was just a passing thought, and I know people would have issues, but categories sounds an interesting option if you ever feel like implementing. For me personally, I'm just going to look at where your code puts them and decide my 4 non-auto slottables.

The only one I would want to sure was always available when moving would be Steed's Blessing, so as it stands slot 3 is where that would live. Friends in Low Places in slot 4 and Rationer and Liquid Efficiency slots 1 & 2 respectively.

Thanks for your time and the addon.
 
03/01/21, 03:13 PM   #13
CyberOnEso
 
CyberOnEso's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2017
Posts: 18
Originally Posted by Gabriel_H View Post
Edit: Not trying to create work for you, but just a passing thought, adding in an option as to which slot each star will use?
That's a good idea, however, sadly it creates issues where users don't know the problems it can cause if they change it, for example, if you set Sustaining Shadows and Cutpurses Art to the same slot that potentially cause cause issues with regards to remembering the users old skills.
However, you can change which place each category of stars replaces. Just not change the category of each star.
 
03/01/21, 07:27 PM   #14
CyberOnEso
 
CyberOnEso's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2017
Posts: 18
Originally Posted by Gabriel_H View Post
But just a passing thought, adding in an option as to which slot each star will use?
Hey'a, I added this feature, I am only going to send the build as an attachment to this message for now. Just because I am scared at how unstable it may be.
If the user sets two skills that are slotted together to the same value then that may affect returning old skills etc.
It did require quite a bit of refactoring, but 'should' work as you intended it to. Please give it a go, I hope it's what you were looking for.
Attached Files
File Type: zip JackOfAllTrades.zip (257.7 KB, 1561 views)

Last edited by CyberOnEso : 03/01/21 at 07:32 PM.
 
03/02/21, 03:58 AM   #15
CyberOnEso
 
CyberOnEso's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2017
Posts: 18
If you are going down the dialogue option, you'll have to put checks in for "Not Fleeing", so that might cause you some hassle.
I am not sure you would need to, as when you press the first two options your heat is also reduced, if I put the check on unslotting 'Fade Away' when your heat is reduced (when the passive is activated) then it will just remove itself when you press the first two, or remove itself after you escape from the guards.

Last edited by CyberOnEso : 03/02/21 at 04:16 AM.
 
03/02/21, 05:05 PM   #16
Gabriel_H
 
Gabriel_H's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2021
Posts: 11
Originally Posted by CyberOnEso View Post
Hey'a, I added this feature, I am only going to send the build as an attachment to this message for now. Just because I am scared at how unstable it may be.
If the user sets two skills that are slotted together to the same value then that may affect returning old skills etc.
It did require quite a bit of refactoring, but 'should' work as you intended it to. Please give it a go, I hope it's what you were looking for.
It is unslotting Fade Away after fleeing as intended, and unslotting it on paying the bounty, but it is not unslotting it on clemency even though heat is reduced.

That said. Absolutely love it beyond words.

Sadly I cannot give it the full test that it deserves without respeccing. My meager pool of 900 CP is not enough.
 
03/02/21, 05:29 PM   #17
Gabriel_H
 
Gabriel_H's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2021
Posts: 11
Just spotted an error on Line 514 in Events.lua

Code:
local sustainingShadowsResult = sustainingShadows:AttemptToSlot()
Presuming it is supposed to be:

Code:
local sustainingShadowsResult = JackOfAllTrades.sustainingShadows:AttemptToSlot()
There also seems to be an issue where if you sneak up to pickpocket and you are able to pickpocket, but the victim then moves out of pickpocket range, it is re-slotting the original star for Sustaining Shadows. SS then gets re-slotted once the stealth state event fires again.

Last edited by Gabriel_H : 03/02/21 at 05:40 PM.
 
03/02/21, 05:33 PM   #18
CyberOnEso
 
CyberOnEso's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2017
Posts: 18
Yeah, there are a few of those errors in the version you are using.

Don't worry about them for now, after sending it to you I went back and made all the skills local, and fixed all issues like that that I could find.

Currently am working on a fix for the issue with clemency, where it will check your clemency cooldown and reset it when it goes above 0.

Edit: I have made adjustments and published a release here. This should fix the issue with Clemency.

Once I have tested the new skill category changes I will push this to the main build.

Many thanks!

Last edited by CyberOnEso : 03/02/21 at 06:01 PM.
 
03/03/21, 02:59 AM   #19
Gabriel_H
 
Gabriel_H's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2021
Posts: 11
I was feeling a little guilty about creating work for you, so I wanted to say thanks the best way I could.

I was thinking about the slot options, and the likelihood of it causing problems. I took some code I have been working on and played around a bit. Basically it starts with a table (choiceConflicts) that stores the skillId and puts it against the raw name and any skillId's that you want to flag as "conflicting".

That allows for a function which I have called choiceConflict to be set that takes the starting choice tables (by number and text) and returns new tables (by number and text) excluding the conflicts. I have put that function instead of the tables listed against choices and choicesValues for each of the dropdowns.

So for example, Gifted Rider is set to slot 1, which means that the dropdown list for War Mount won't include slot 1 - thereby making conflict between them impossible. If you change Gifted Rider to slot 3, then War Mount dropdown will restore slot 1 to its list but remove slot 3.

LAM is a great library, but one of the things it doesn't do is refresh the dropdown lists if you play around with them like I have above. So there is a second function called refreshConflict, that fires on the setFunc parameter after the original save variable function has done it's thing. The purpose of the second function is to rebuild the dropdown list for the ones that conflict with the value you just changed.

I have attached the menu.lua I have been playing with.

Feel free to use it, ignore it, change it, whatever you want to do with it.

Thanks,
Gab
Attached Files
File Type: zip Menu.zip (5.8 KB, 1316 views)
 
03/03/21, 03:34 AM   #20
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
About LAM and the resfresh:
Set your addon panel to listen for refreshs like described in the LAM documentaion ->

local panelData = {
...
registerForRefresh = true,
}

There is a clear callback for LAM-RefreshPanel of the lam panel where you register your function and check if the panel is your LAM panel
(local myAddonPanel = LibAddonMenu2:RegisterAddonPanel(gAddonName .. "_LAM", panelData) -> in the callback function if panel (1st param of the callback func) ~= myAddonPanel then return end)
, and then you should call your refreshConflict function for the needed dropdown controls (predefined in a table "for _, dropdownControl in ipairs(updateThisControls)").

Using the setfunc will get you into trouble earlier than you might think off.


Originally Posted by Gabriel_H View Post
I was feeling a little guilty about creating work for you, so I wanted to say thanks the best way I could.

I was thinking about the slot options, and the likelihood of it causing problems. I took some code I have been working on and played around a bit. Basically it starts with a table (choiceConflicts) that stores the skillId and puts it against the raw name and any skillId's that you want to flag as "conflicting".

That allows for a function which I have called choiceConflict to be set that takes the starting choice tables (by number and text) and returns new tables (by number and text) excluding the conflicts. I have put that function instead of the tables listed against choices and choicesValues for each of the dropdowns.

So for example, Gifted Rider is set to slot 1, which means that the dropdown list for War Mount won't include slot 1 - thereby making conflict between them impossible. If you change Gifted Rider to slot 3, then War Mount dropdown will restore slot 1 to its list but remove slot 3.

LAM is a great library, but one of the things it doesn't do is refresh the dropdown lists if you play around with them like I have above. So there is a second function called refreshConflict, that fires on the setFunc parameter after the original save variable function has done it's thing. The purpose of the second function is to rebuild the dropdown list for the ones that conflict with the value you just changed.

I have attached the menu.lua I have been playing with.

Feel free to use it, ignore it, change it, whatever you want to do with it.

Thanks,
Gab

Last edited by Baertram : 03/03/21 at 03:39 AM.
 

ESOUI » AddOns » Alpha/Beta AddOns » Jack of all Trades

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off