Have you ever accidentally sold something, only to find out too late that you have, and that there's no way to get it back? Have you worried about this and stressed out a bit too much whilst selling things, just to be absolutely sure you don't sell your valuables? Have you triple-checked the things you're destroying just to make sure that you're not destroying a valuable whilst cleaning out your bags? If this sounds like you, then this mod is for you.
How does it work?
Essentially, you can build a list of items that you want protected by Vault, and then, when you go to a vendor, if you accidentally sell an item, it'll buy it back for you right away, tell you that it did, and play a sound to warn you that you're not paying attention to what you're selling. If you try to destroy an item that's in your Vault, then Vault will stop you from doing so.
The elements of Vault are split up into modules. This is so that you can pick and choose the parts that you want and only those parts. You can enable/disable modules via the addons menu at the character select screen, or if you prefer, you could just remove the folders entirely. Pick and mix, use what you want, the choice is yours.
In this section, I'll go through the various modules that vault has, and what they do.
-- AntiDestroy Module
This module stops you from destroy items in your vault. If you drag an item outside your bag and it's in your vault, then vault will automatically clear your cursor and warn you, thus keeping your valuable items safe. This only affects items in your vault, so to keep what you want safe, simply add it to your vault and never worry about accidentally destroying your best items ever again!
-- AntiSell Module
This module checks what you're selling to vendors. If you try to sell an item that's in your vault to a vendor, then it will automatically be bought back for you. Even if an addon tries to sell all greys, this module will ensure that any item that's in your vault remains in your bags, and not with teh vendor. So to protect your items, just add them to your vault list, and never worry whilst selling at a vendor again!
-- Slash Command Module
The commands for this are as follows:
/vault [Item Link] - adds or removes an item from the vault as a toggle.
/vault check [Item Link] - checks whether the item is already in the vault or not.
/vault wipe - removes all your current character's items from the vault.
/vault restore - restores your vault from its last backup state.
/vault help - brings up a printout with this information.
Not supplying an item link works the same as the latter option, there. It just gives the player a help printout.
-- DataBroker Module
To add or remove an item, drag the item to the DataBroker plugin and click on it to to do so. It acts as a toggle, so to remove the item you do the same thing. To remove the item from your cursor when you're done, press esc or right-click (same as the default UI).
The DataBroker plugin has a tooltip which contains a list of all the items already in your vault, so just mouseover it to find out what you have in your vault. And finally, this module also has features pertaining to the database: If you wish to clear the database, hold alt, then click the plugin. If you wish to restore your database from a backup, hold alt and shift, then click the button.
-- Blizz Options Module
To access this, head into the Interface options panel and click the AddOns tab. Scroll down in the left panel until you see Vault and click on it there.
You are presented with three elements.
The first of which allows you to add an item. There's a button present where, if you drag an item to it and click on it, it'll add that item to the vault. You can dismiss the icon from your cursor with either esc or right-click (same as the default UI).
The next element is a list of items in your vault - this will show up as blank if there are none. To remove an item from your vault, just click one of the item names in this vault. The list should update immediately to reflect this.
Finally, the last two elements pertain to database control. The first button will allow you to empty your current character's vault, and the second button will allow you to restore your vault from its last backed up state.
-- Tooltip Module
This adds 'Vault Protected' to your item tooltip where the item is in the vault. So, if you have an item in the vault, and you mouseover an item, right below the item name you'll see 'Vault Protected,' if the item is not in the vault, then that text will not be there.
I have also taken this opportunity to make the tooltips a little easier to read by putting a blank line under the title in both instances. If this is something that people don't like, I'll remove it. I actually find it makes the tooltips easier to skim though, but maybe that's just me subjectively.
-- Other Modules
I don't have any others at this moment in time, and with the Blizz Options, DataBroker, Tooltip, and the Slash Command modules, I think I've covered all the bases. I'm very open to suggestions, however, and if you'd like to see a new module coded, then poke me, and I'll see what I can do.
I'd like to offer my thanks to everyone in the comments section, here. It's been a long road for Vault with a lot of experimentation. I'll keep trying to make it better, and hopefully without so many bugs.
But the users of my mod have been polite, patient, and just really stand up people. I appreciate that.
None currently known.
* Fix: Should fix issues with databases not updating to the new database style.
* Hotfix: I accidentally broke StaticPopup, so some buttons on popup dialogues were broken. If you experienced this issue, this version will fix it. Sorry about that.
* Note: Due to the restructuring that happened in Vault 018, please remove your Vault folder before installing this version if you hadn't done so with 018.
* A bug was fixed regarding near-clone IDs that could have Vault get confused about what was in your vault or not. If you've mysteriously had Vault insist that an item is protected when it isn't showing up as such, then this update will fix that issue.
* New module that stops items from being destroyed if they're in your vault. This new feature essentially renders the need to use Blizzard's item restore unnecessary! If you use Vault to protect all your valued items, you'll now never accidentally sell them or destroy them!
* The selling functionality has now been separated out into its own module, so if you only want the functionality which stops you from accidentally destroying items or vice versa, then you have that choice.
* The confirmation dialogues for the Blizz Options module wipe button tended to appear behind the options dialogue sometimes, depending on where on your screen it was. This isn't great design. So I've taken the confirmation dialogues away for now, they work on first click.
* In relation to the above, the BlizzOptions, SlashCommand, and DataBroker modules all now have a way to restore your Vault database. It keeps a backup of the session vault, so if you accidentally wipe it (as a friend of mine did) or you mess it up somehow, you can just restore from that backup.
* A number of other bug fixes and optimisations to deal with possible erroneous Vault item lists. And just a general code cleanup overall. Getting Vault to where I want it to be, now.
I've reorganised the folder so that disabling modues is easier, you no longer have to delete them, you can instead just turn them off in the Addons menu panel before logging in.
Please delete the Vault folder before upgrading to this version. Thanks.
I've added a tooltip module. This adds 'Vault Protected' to the tooltips of items which are in your vault so that you can see that even when selling.
So, I tried loading Vault on its own to see if I had the embeds right. Everything but the Blizzard Options module - of course. So I've fixed up the embeds for that.
So now Vault will load on its own without issue. I had a FUN TIME going through AceGUI to see exactly which elements were necessary and which weren't, because I'll be damned if I'll load files that I don't need to. :|
There's even a part in AceConfig that tries to force you to load AceConfigCmd and that's just not cool. They really need to modularise that stuff so that AceConfigCmd is optional. Well, that's dealt with.
I kind of wish that there were a library for Blizz Options stuff out there that wasn't like pulling teeth.
Had a useless line of code in the Blizzard Options module. It was bothering me.
Ffff. I screwed up the zip. The previous version was actually working for me, so there are no changes in this. I just happened to screw up the zip. Derp. I blame it being version 13. So it is no longer version 13!
Small optimisation for the Blizzard Options Module. I realised that there was one table I could nil once I was done with it (once the options frame closed). No need to leave that hanging around in memory if it's not being used.
In this version I've made the Blizzard Options Module a bit more responsive. Essentially, the following will occur:
- Add button will update to notify you of a successful addition.
- Add button will tell you if you're trying to add an item that's already in your vault.
- Wipe button tells you that your vault has been successfully wiped.
- Buttons return to their original names when the Blizz Options frame closes.
I already had the add button tell you if you were clicking it without an item on your cursor, so it wasn't a big issue to update the module to include this extra functionality.
Oh, and in the previous version, the add button would work like an add/remove toggle, that was an unintended 'feature' that isn't in this version - this version behaves how you would expect it to, given what the UI says.
I wasn't satisfied with the quarter-arsed way I implemented the slash command system for controlling Vault, and I also wasn't happy that the slash command stuff was part of the core mod. So I ripped that out, redid it, modularised everything, and now? Now there's a prettified and far better slash command system, and a Blizzard Options module (AceConfig-3.0 based) too, because I could.
See the description for details!
I dislike code detritius, and I noticed that there were a couple of variables lying around from teh previous rewrite that were no longer being used, so I got rid of those.
There was also an issue with supplying /vault with no link. It's supposed to give you instructions as to what to do with the mod, as is /vault help, but instead it just threw an error. Whoops. This was due to me not passing things properly to my own inform function thanks to having had a 'derp' moment.
So that's 010.
Vault's DataBroker component had the same icon as Atlas. I've remedied this by using a different lockbox icon. INV Box 04, the purple one, if you're curious!
I also took the time to poke the code and make sure that I replaced all my tabs with eight spaces, to make for ease of reading in viewers other than Windows notepad. (I keep forgetting that, and I like to keep my mods as readable as possible so that if people want to poke stuff to see how it works, they can do that with the least amount of hassle.)
I'm going from a clean slate with this version, as the last couple of versions have seen some bug or another getting in the way. However, I've done a lot of testing of this version. At one point I got a little nuts and decided to just sell my entire bag by right-click spamming.
The code is so solid now that it bought back every item in my list, and it left the items that weren't in my list sold. So right now? I can't see any issues. And after a bumpy road, I finally feel I've reached the end of what I can do with Vault.
From here on out I suspect the only changes will be minor ones as they're necessary, if any. But after having rapidly sold my entire bag and having seen Vault buy back things without any errors, and having done a good hour or two of testing sitting at a vendor and sell-spamming, I can't imagine that any bugs will arise.
If they do, I'll fix them in short order. But right now I'm feeling pretty good about this.