Quantcast
Download
(12 Kb)
Download
Updated: 03/18/17 06:02 AM
Pictures
File Info
Compatibility:
Homestead (2.7)
Updated:03/18/17 06:02 AM
Created:03/11/17 08:38 PM
Monthly downloads:51
Total downloads:3,058
Favorites:13
MD5:
FurnitureShoppingList
Version: 1.3.0
by: Noobanidus [More]
This requires Furniture Catalogue by Manavortex to function.

This is a very simple add-on written for a friend. Typing /sl (can be bound) brings up the shopping list window. Right clicking on a furnishing object allows you to add 1 of that to the list, or remove 1 of that from the list. It then adds or removes the relevant materials required to make that item to the list. A summay of all items needed is displayed in the window.

You can press "Subtract owned" to remove any materials on you, in your bank or in your craft bags from the list. This step is irreversible.

You can press "Print" to output a shopping list to the chat box, allowing you to send it to someone. If the list is too long for a single message, and you have a blank outgoing mail open, it will instead output to that.

While in the crafting interfact, keybinds/keybind strip buttons are included for "add 1" and "remove 1" (represented as +SL and -SL respectively). Pressing these is the equivalent to right clicking on an item, but it can be done from within the crafting interface.

Right-click menu should function for items linked in chat as well as in your inventory.

When MasterMerchant is installed, it will display the total price for the number of each item required in the "Price" column, as well as a total for all of the items in the lower left corner.

Current issues:
- It's still not possible to sort either of the columns.

Potential future changes:
- Track purchases made and subtract these from the need column.
- Localisation.
(1.2.1) Fix stuff.

(1.2.0) Break stuff.

(March 13, 1.1.0) Now the keybindings actually work because I can't type. Added a keybinding for opening the shopping list window and made it give a more straightforward error message when Furniture Catalogue isn't installed.
Optional Files (1)
File Name
Version
Size
Author
Date
Type
1.4.1
14kB
12/09/17 01:46 PM
Patch


Archived Files (4)
File Name
Version
Size
Uploader
Date
1.2.1
12kB
Noobanidus
03/14/17 06:27 PM
1.2.0
12kB
Noobanidus
03/14/17 01:15 AM
1.1.0
12kB
Noobanidus
03/13/17 05:28 AM
1.0.0
11kB
Noobanidus
03/11/17 08:38 PM


Post A Reply Comment Options
Unread 09/22/18, 10:12 PM  
RavenMind
 
RavenMind's Avatar

Forum posts: 0
File comments: 336
Uploads: 0
mana: Since it doesn't look like this is getting an update, do you recommend we change the code as per your examples below? Thanks!
Report comment to moderator  
Reply With Quote
Unread 11/06/17, 03:58 AM  
manavortex
 
manavortex's Avatar
AddOn Author - Click to view AddOns

Forum posts: 137
File comments: 452
Uploads: 46
Me again:

For calling the AddOn from FurC, it would be awesome if you could change the function FurnitureShoppingListAdd as follows:

Lua Code:
  1. function FurnitureShoppingListAdd (link, f)
  2.     if not FurC then
  3.         CHAT_SYSTEM:AddMessage(GetString(FSL_REQUIRES_FC))
  4.         return
  5.     end
  6.  
  7.     if not f then f = FurC.Find(link) end
  8.     if not f or not f["ingredients"] then
  9.         CHAT_SYSTEM:AddMessage(GetString(FSL_NOT_VALID_ITEM))
  10.         return
  11.     end

That way, I could pass the array already, and we'd save one call.
Report comment to moderator  
Reply With Quote
Unread 10/09/17, 11:56 PM  
manavortex
 
manavortex's Avatar
AddOn Author - Click to view AddOns

Forum posts: 137
File comments: 452
Uploads: 46
Error

Hello there,
a guildmate of mine managed to run into an error:


The offending line is actually line 77 in FurnitureShoppingList.lua.

here's the fix:
if need > 0 then

Lua Code:
  1. if need > 0 then
  2.     local cost = getMM(name) or 0 -- <<<<<<<<<<<<<<<<<<<<<<<<<<<<
  3.     local this_row = zo_floor(cost*need)
  4.     mm_total = mm_total + this_row
  5.     table.insert(self.masterList, {name=name, need=need, price=this_row})
  6. end

If you're MIA, I will push a fix tomorrow or so.
See you around!
Last edited by manavortex : 10/09/17 at 11:58 PM.
Report comment to moderator  
Reply With Quote
Unread 06/29/17, 08:44 PM  
Shadowshire

Forum posts: 1
File comments: 280
Uploads: 0
Arrow Furniture Shopping List 1.3.5 Shown by ESO as "Out of Date"

FYI
__________________
---- Shadowshire ..... nil carborundum illegitimi
Report comment to moderator  
Reply With Quote
Unread 06/29/17, 08:38 PM  
Shadowshire

Forum posts: 1
File comments: 280
Uploads: 0
Unclear as to the purpose of Furniture Shopping List

First, what I want to do is to create a "shopping list" for some of the Blueprints, Plans, Diagrams, etc. which my character has not learned, so that I can "go shopping" for them at Guild Stores or Guild Traders. How can I compose a "shopping list" of them while using Furniture Catalog?

Second, it might also be useful to compose a list of furnishing items which my character does not have, but which I want to acquire, perchance I decide to "go shopping" for them at Guild Stores or Guild Traders (instead of crafting them). How can I compose a "shopping list" of them while using Furniture Catalog?

Although it might be useful to have separate lists for each of those two usages, I suppose that there shouldn't be any confusion as to which is which if they are on the same list.

For Furniture Shopping List (FSL), quote: " .... Right clicking on a furnishing object allows you to add 1 of that to the list, or remove 1 of that from the list. It then adds or removes the relevant materials required to make that item to the list. A summay of all items needed is displayed in the window."

That statement assumes that there are "furnishing objects" on which to place the mouse cursor and press the RMB. So, what is the source of the "furnishing objects"? Also, I have no idea as to what "window" to which the second statement refers.

While I am using the Guild Store / Guild Trader UI, FSL evidently displays an option to add an item to, and another to remove an item from, the current FSL list. Although I haven't bound a key to either action, I can use the LMB on the corresponding "Not Bound" widget that is shown instead of the key-bind for the respective option. At this point, it is unclear as to why I would want to add (or remove) an item offered for sale to or from the list.

Granted, if I buy an item that is on the existing list, then I would want to remove it, but I don't see any feature which allows me to see the FSL list while I am viewing Guild Store / Guild Trader UI output.

By the way, I think you need to shorten the respective prompts for the key-binds that are shown on the Guild Store / Guild Trader UI. For example "+1 to Shopping List" and "-1 from Shopping List" should suffice. Since those will appear only when FSL is loaded, the player should realize that they are adding items to its list or removing items from its list.

Please offer some instructions as to how to use this add-on with Furniture Catalog, on the FSL Addon tab. Thanks for your time and attention to these comments and my questions.
__________________
---- Shadowshire ..... nil carborundum illegitimi
Report comment to moderator  
Reply With Quote
Unread 06/24/17, 08:41 AM  
manavortex
 
manavortex's Avatar
AddOn Author - Click to view AddOns

Forum posts: 137
File comments: 452
Uploads: 46
Hey here Nooby,

I noticed an exception when trying to add something to the FurnitureShoppingList - can't divide by nil, or some such.

caused here:
Lua Code:
  1. local function getMM (itemLink)
  2.    [b] if not MasterMerchant then return end[/b]
  3.  
  4.     local theIID = string.match(itemLink, '|H.-:item:(.-):')
  5.     local itemIndex = MasterMerchant.makeIndexFromLink(itemLink)
  6.     local tipStats = MasterMerchant:toolTipStats(tonumber(theIID), itemIndex, true, true)
  7.     if tipStats.avgPrice then return tipStats.avgPrice else return 0 end
  8. end

My fix:

Lua Code:
  1. function FurnitureShoppingListRecipients:BuildMasterList()
  2.     ZO_ClearNumericallyIndexedTable(self.masterList)
  3.  
  4.     local mm_total = 0
  5.  
  6.     for mat, need in pairs(FurnitureShoppingListData) do
  7.         local name = FurnitureShoppingListDataLookup[mat]
  8.  
  9.         if need > 0 then
  10.             local cost = getMM(name)
  11.             local this_row = zo_floor(cost*need)
  12.             mm_total = mm_total + this_row
  13.             table.insert(self.masterList, {name=name, need=need, price=this_row})
  14.         end
  15.     end
  16.      
  17.     [b]self.mm:SetText((nil ~= MasterMerchant and "MM: " .. mm_total .. "g") or "")[/b]
  18. end
Lua Code:
  1. local function getMM (itemLink)
  2.       [b] if not MasterMerchant then return 0 end[/b]
  3.  
  4.        local theIID = string.match(itemLink, '|H.-:item:(.-):')
  5.        local itemIndex = MasterMerchant.makeIndexFromLink(itemLink)
  6.        local tipStats = MasterMerchant:toolTipStats(tonumber(theIID), itemIndex, true, true)
  7.        if tipStats.avgPrice then return tipStats.avgPrice else return 0 end
  8.    end

Cheers,
manavortex
Report comment to moderator  
Reply With Quote
Unread 03/18/17, 08:40 AM  
manavortex
 
manavortex's Avatar
AddOn Author - Click to view AddOns

Forum posts: 137
File comments: 452
Uploads: 46
Originally Posted by Noobanidus
One of these days I will get a more accurate picture of how the syntax for those files works properly. I keep forgetting that things like this exist -- plus optionaldepends for things like libaddonmenu. Partial knowledge is useful sometimes but "oh I didn't even think to check" isn't a particularly good excuse.
Last edited by manavortex : 03/18/17 at 08:41 AM.
Report comment to moderator  
Reply With Quote
Unread 03/14/17, 09:23 PM  
silvereyes
 
silvereyes's Avatar
AddOn Author - Click to view AddOns

Forum posts: 58
File comments: 242
Uploads: 14
Originally Posted by Noobanidus
Ooooooooooooooops! Fixed.
Hey, at least it was a relevant image. Could have been much, much worse....
Report comment to moderator  
Reply With Quote
Unread 03/14/17, 07:31 PM  
Noobanidus
 
Noobanidus's Avatar
AddOn Author - Click to view AddOns

Forum posts: 23
File comments: 55
Uploads: 23
Originally Posted by silvereyes
Looks like someone accidentally had a text window open when copy/pasting an image link

user:/AddOns/FurnitureShoppingList/FurnitureShoppingList.lua:243: <name> expected near '/'

Code:
243. function FurnitureShoppingListAdd_Crafting ()http://i.imgur.com/vkxzgFQ.png
Ooooooooooooooops! Fixed.
Report comment to moderator  
Reply With Quote
Unread 03/14/17, 03:10 PM  
silvereyes
 
silvereyes's Avatar
AddOn Author - Click to view AddOns

Forum posts: 58
File comments: 242
Uploads: 14
Looks like someone accidentally had a text window open when copy/pasting an image link

user:/AddOns/FurnitureShoppingList/FurnitureShoppingList.lua:243: <name> expected near '/'

Code:
243. function FurnitureShoppingListAdd_Crafting ()http://i.imgur.com/vkxzgFQ.png
Report comment to moderator  
Reply With Quote
Unread 03/13/17, 07:36 PM  
Noobanidus
 
Noobanidus's Avatar
AddOn Author - Click to view AddOns

Forum posts: 23
File comments: 55
Uploads: 23
Originally Posted by silvereyes
Just add this to the FurnitureShoppingList.txt manifest:
Code:
## DependsOn: FurnitureCatalogue
This will make it so that Furniture Catalogue is required and loads first.
One of these days I will get a more accurate picture of how the syntax for those files works properly. I keep forgetting that things like this exist -- plus optionaldepends for things like libaddonmenu. Partial knowledge is useful sometimes but "oh I didn't even think to check" isn't a particularly good excuse.
Report comment to moderator  
Reply With Quote
Unread 03/13/17, 10:45 AM  
silvereyes
 
silvereyes's Avatar
AddOn Author - Click to view AddOns

Forum posts: 58
File comments: 242
Uploads: 14
Just add this to the FurnitureShoppingList.txt manifest:
Code:
## DependsOn: FurnitureCatalogue
This will make it so that Furniture Catalogue is required and loads first.
Report comment to moderator  
Reply With Quote
Unread 03/13/17, 12:57 AM  
manavortex
 
manavortex's Avatar
AddOn Author - Click to view AddOns

Forum posts: 137
File comments: 452
Uploads: 46
Originally Posted by Noobanidus
The most important thing is probably checking to see if Furniture Catalogue is actually installed, given I think the addon currently just assumes FurC exists... and I'm not sure if I noted anywhere in the addon when I uploaded it that it requires Furniture Catalogue to run... oops!
Simple:

Code:
if nil == FurC then
   d("FurnitureCatalogue needs to be installed")
end
Report comment to moderator  
Reply With Quote
Unread 03/12/17, 06:44 PM  
Noobanidus
 
Noobanidus's Avatar
AddOn Author - Click to view AddOns

Forum posts: 23
File comments: 55
Uploads: 23
Originally Posted by manavortex
I love it!
Will add it to the Furniture Catalogue rightclick menu! However, that would require you to make
Lua Code:
  1. local function FurnitureShoppingListAdd (link)
  2.     ...
  3. end
global.

BTW; concerning key binds: I'm missing a keybind to toggle the window, and the key binds don't show up in my settings list. I fixed that for now with the following changes:

Strings.lua: Registered the strings for the menu entries
Lua Code:
  1. ZO_CreateStringId("SI_BINDING_NAME_SL_ADD", "Add to furniture shopping list")
  2. ZO_CreateStringId("SI_BINDING_NAME_SL_DEL", "Remove from furniture shopping list")
  3. ZO_CreateStringId("SI_BINDING_NAME_SL_TOGGLE", "Toggle furniture shopping list")

FurnitureShoppingList.txt: Made sure that Strings.lua is loaded before Bindings, changed bindings.txt to bindings.xml
Lua Code:
  1. Strings.lua
  2. Bindings.xml

FurnitureShoppingList.lua: Hooked up dummy functions for you to fill in - the XML would complain otherwise.
Lua Code:
  1. function FurnitureShoppingListAddButton()
  2.    
  3. end
  4. function FurnitureShoppingListDelButton()
  5.    
  6. end

Great work, great addition to FurnitureCatalogue!
This also needs a "print to chat" function, by the way. Feel free to check out FurCDataParser.lua, especially GetMats(...) and the functions below for inspiration.

o/
I am caught out, uploading what is really only a partially-finished addon. Other requests that have been made include MM prices and an MM total. Definitely changes that I can do some time this week, including modifying the scope of the functions for other addons to hook into.

The most important thing is probably checking to see if Furniture Catalogue is actually installed, given I think the addon currently just assumes FurC exists... and I'm not sure if I noted anywhere in the addon when I uploaded it that it requires Furniture Catalogue to run... oops!
Report comment to moderator  
Reply With Quote
Unread 03/12/17, 03:43 AM  
manavortex
 
manavortex's Avatar
AddOn Author - Click to view AddOns

Forum posts: 137
File comments: 452
Uploads: 46
I love it!
Will add it to the Furniture Catalogue rightclick menu! However, that would require you to make
Lua Code:
  1. local function FurnitureShoppingListAdd (link)
  2.     ...
  3. end
global.


BTW; concerning key binds: I'm missing a keybind to toggle the window, and the key binds don't show up in my settings list. I fixed that for now with the following changes:

Strings.lua: Registered the strings for the menu entries
Lua Code:
  1. ZO_CreateStringId("SI_BINDING_NAME_SL_ADD", "Add to furniture shopping list")
  2. ZO_CreateStringId("SI_BINDING_NAME_SL_DEL", "Remove from furniture shopping list")
  3. ZO_CreateStringId("SI_BINDING_NAME_SL_TOGGLE", "Toggle furniture shopping list")

FurnitureShoppingList.txt: Made sure that Strings.lua is loaded before Bindings, changed bindings.txt to bindings.xml
Lua Code:
  1. Strings.lua
  2. Bindings.xml

FurnitureShoppingList.lua: Hooked up dummy functions for you to fill in - the XML would complain otherwise.
Lua Code:
  1. function FurnitureShoppingListAddButton()
  2.    
  3. end
  4. function FurnitureShoppingListDelButton()
  5.    
  6. end

Great work, great addition to FurnitureCatalogue!
This also needs a "print to chat" function, by the way. Feel free to check out FurCDataParser.lua, especially GetMats(...) and the functions below for inspiration.

o/
Last edited by manavortex : 03/12/17 at 06:00 AM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: