Quantcast
Download
(2 Kb)
Download
Updated: 10/22/18 12:03 PM
Compatibility:
Murkmire (4.2)
Updated:10/22/18 12:03 PM
Created:07/07/18 11:56 AM
Monthly downloads:684
Total downloads:2,043
Favorites:9
MD5:
4.2
WeaponCharger
Version: 0.2.3
by: zeroIndex [More]
--Weapon Charger--

This addon is meant to be minimal. If you want something simple that auto charges weapons, then this is what you're looking for. There is no need to set up anything after installing the addon. Just install it and ignore the need to ever charge a weapon manually again. It does output what weapon was charged in the chat box, other than that it's quiet.

This addon will use the soul gem setting you have selected under gameplay settings to charge your weapons.

There are other addons that charge weapons along with other added features. If you would rather have all the other functionality, then this addon is not for you and a different addon would better suit your needs. Personally, I didn't need all the other extra stuff with other addons, so I made this one. I thought I would post it incase there are others that feel the same way.
-- Version 0.2.3 --
Updated API to Murkmire

-- Version 0.2.2 --
Updated API to Wolfhunter

-- Version 0.2.1 --
Based the soul gem checks on item id instead of names, since languages vary per client. A thanks to code65536 for pointing that out.
Fixed an issue with the version number

-- Version 0.2 --
Will now consume soul gems based on what you choose for your default setting under the gameplay options.
Removed an extra space in the name so the addon will now appear in the correct order in the addon list.
Optional Files (0)


Post A Reply Comment Options
Unread 08/11/18, 05:00 PM  
zeroIndex
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 11
Uploads: 2
NAN

Originally Posted by code65536
Thanks for the update. One minor problem: "WeaponCharger.version = 0.2.1" is throwing an error because 0.2.1 is not a valid number; you need to enclose that in quotes.
Whoops, I guess I fixed that after I zipped it up Uploading the fix now, thanks
Last edited by zeroIndex : 08/11/18 at 05:00 PM.
Report comment to moderator  
Reply With Quote
Unread 08/11/18, 03:44 PM  
code65536
AddOn Author - Click to view AddOns

Forum posts: 16
File comments: 93
Uploads: 13
Thanks for the update. One minor problem: "WeaponCharger.version = 0.2.1" is throwing an error because 0.2.1 is not a valid number; you need to enclose that in quotes.
Report comment to moderator  
Reply With Quote
Unread 08/11/18, 10:36 AM  
zeroIndex
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 11
Uploads: 2
Item Id

Originally Posted by code65536
Checking the name of the item is a bit fragile, since the text will vary based on the language of the client.

It's better to check against the itemId instead. 33265 is an unfilled Soul Gem, 33271 is a filled Soul Gem, and 61080 is a Crown Soul Gem. Checking the itemId also allows you to simplify the code significantly.

Warning: Spoiler
I found where to pull the name of the item and thought it was good enough, but I failed to realize that english is not what everyone uses. I feel ignorant for missing that, thanks for pointing it out. I ran it with the code you posted and everything seems to be working fine so I don't see the need to adjust anything further. If you have any other suggestions feel free to let me know.
Report comment to moderator  
Reply With Quote
Unread 08/10/18, 06:07 PM  
code65536
AddOn Author - Click to view AddOns

Forum posts: 16
File comments: 93
Uploads: 13
Checking the name of the item is a bit fragile, since the text will vary based on the language of the client.

It's better to check against the itemId instead. 33265 is an unfilled Soul Gem, 33271 is a filled Soul Gem, and 61080 is a Crown Soul Gem. Checking the itemId also allows you to simplify the code significantly.

I've tested the following code, which uses just one loop:
Lua Code:
  1. local function WeaponChargerGetSoulGemIndex()
  2.     local gemSetting = GetSetting(SETTING_TYPE_IN_WORLD, IN_WORLD_UI_SETTING_DEFAULT_SOUL_GEM)
  3.     local normalIndex = nil
  4.     local crownIndex = nil
  5.  
  6.     for index = 0, GetBagSize(BAG_BACKPACK) do
  7.         local itemId = GetItemId(BAG_BACKPACK, index)
  8.         if (itemId == 33271) then
  9.             if gemSetting == "0" then
  10.                 return index
  11.             else
  12.                 normalIndex = index
  13.             end
  14.         elseif (itemId == 61080) then
  15.             if gemSetting == "1" then
  16.                 return index
  17.             else
  18.                 crownIndex = index
  19.             end
  20.         end
  21.     end
  22.  
  23.     -- if we reached this point, the preferred gem type was not found, so return any gem found, if available
  24.     return normalIndex or crownIndex
  25. end
Last edited by code65536 : 08/11/18 at 07:36 AM.
Report comment to moderator  
Reply With Quote
Unread 08/07/18, 05:59 PM  
zeroIndex
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 11
Uploads: 2
Added

Originally Posted by code65536
If you want your addon to use the game's soul gem setting (one of the base game options under Gameplay)...

Code:
GetSetting(SETTING_TYPE_IN_WORLD, IN_WORLD_UI_SETTING_DEFAULT_SOUL_GEM)
...will return either:
DEFAULT_SOUL_GEM_CHOICE_GOLD
DEFAULT_SOUL_GEM_CHOICE_CROWN
Also... in WeaponCharger.txt, you have two spaces between the colon and the title, which causes the addon to appear as " WeaponCharger" (with leading space) in the game's addon list and not in the expected space alphabetically.
The addon will now use whichever soul gem type you have selected under the settings menu first before using the other type.
I removed the space in the name, thanks.
Report comment to moderator  
Reply With Quote
Unread 08/02/18, 11:23 PM  
Crusism

Forum posts: 0
File comments: 19
Uploads: 0
Originally Posted by code65536
If you want your addon to use the game's soul gem setting (one of the base game options under Gameplay)...

Code:
GetSetting(SETTING_TYPE_IN_WORLD, IN_WORLD_UI_SETTING_DEFAULT_SOUL_GEM)
...will return either:
DEFAULT_SOUL_GEM_CHOICE_GOLD
DEFAULT_SOUL_GEM_CHOICE_CROWN
Also... in WeaponCharger.txt, you have two spaces between the colon and the title, which causes the addon to appear as " WeaponCharger" (with leading space) in the game's addon list and not in the expected space alphabetically.
This would be super nice. :3
Report comment to moderator  
Reply With Quote
Unread 07/19/18, 12:32 PM  
code65536
AddOn Author - Click to view AddOns

Forum posts: 16
File comments: 93
Uploads: 13
If you want your addon to use the game's soul gem setting (one of the base game options under Gameplay)...

Code:
GetSetting(SETTING_TYPE_IN_WORLD, IN_WORLD_UI_SETTING_DEFAULT_SOUL_GEM)
...will return either:
DEFAULT_SOUL_GEM_CHOICE_GOLD
DEFAULT_SOUL_GEM_CHOICE_CROWN
Also... in WeaponCharger.txt, you have two spaces between the colon and the title, which causes the addon to appear as " WeaponCharger" (with leading space) in the game's addon list and not in the expected space alphabetically.
Last edited by code65536 : 07/19/18 at 01:04 PM.
Report comment to moderator  
Reply With Quote
Unread 07/10/18, 11:04 AM  
zeroIndex
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 11
Uploads: 2
Re: Great Addon

Originally Posted by Majulook
I have this addon, and it works very well.

I have found no hiccups, delays, lag, or other ill effects created by this addon.

Great Job by zeroIndex
Thanks Majulook, I appreciate the comment.
Report comment to moderator  
Reply With Quote
Unread 07/10/18, 11:01 AM  
zeroIndex
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 11
Uploads: 2
Originally Posted by Crusism
This doesn't use crown soul gems, right? Or is there an option for us to choose the default soul gem used to charge our weapons?
If the only soul gems you have are crown soul gems, then it will use them. I do not have an options to choose between the two, but it will use them if you have nothing else.
Report comment to moderator  
Reply With Quote
Unread 07/10/18, 10:46 AM  
Majulook

Forum posts: 0
File comments: 49
Uploads: 0
Thumbs up Great Addon

I have this addon, and it works very well.

I have found no hiccups, delays, lag, or other ill effects created by this addon.

Great Job by zeroIndex
Report comment to moderator  
Reply With Quote
Unread 07/09/18, 11:09 PM  
Crusism

Forum posts: 0
File comments: 19
Uploads: 0
This doesn't use crown soul gems, right? Or is there an option for us to choose the default soul gem used to charge our weapons?
Report comment to moderator  
Reply With Quote
Unread 07/09/18, 10:35 AM  
zeroIndex
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 11
Uploads: 2
Originally Posted by Majulook
When it recharges at 4 charges left and in battle does it cause any hiccups or any fraction of time slowdown?
I have not noticed any kind of a slow down and my friends that helped me test have not noticed any either. One reason I set the recharge to 4 instead of when it's empty is due to a slight hiccup I notice in game when a weapon is depleted of all charges.
Report comment to moderator  
Reply With Quote
Unread 07/09/18, 10:16 AM  
Majulook

Forum posts: 0
File comments: 49
Uploads: 0
When it recharges at 4 charges left and in battle does it cause any hiccups or any fraction of time slowdown?
Report comment to moderator  
Reply With Quote
Unread 07/08/18, 01:12 PM  
zeroIndex
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 11
Uploads: 2
Originally Posted by Crusism
"It does output what weapon was charged in the chat box, other than that it's quiet."

Can there be a screenshot for this? I won't really get to test this mod until a few days later since I'm too busy fishing. ><'

Also, when does it recharge? At 0% or...? Also, only unsheathed weapon or both weapons or anything equipped in the weapon slots?

It will recharge anything that is equipped when there are 4 charges left on the weapon.

Next time it recharges a weapon, ill grab a screenshot and upload it to the description.
Report comment to moderator  
Reply With Quote
Unread 07/07/18, 09:38 PM  
Crusism

Forum posts: 0
File comments: 19
Uploads: 0
"It does output what weapon was charged in the chat box, other than that it's quiet."

Can there be a screenshot for this? I won't really get to test this mod until a few days later since I'm too busy fishing. ><'

Also, when does it recharge? At 0% or...? Also, only unsheathed weapon or both weapons or anything equipped in the weapon slots?
Last edited by Crusism : 07/07/18 at 09:47 PM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: