I noticed that there is no category for crafting stations in the vanilla trading house interface.
After some investigation I found that GetFurnitureCategoryInfo returns availableInTradingHouse=false for the "Services" category, even though it contains subcategories that return true.
The function InitializeHouseFurnitureCategoryTypeData then just ignores the whole category and doesn't even check the subcategories.
Changing it to look into subcategories regardless of the state of the parent category solves the problem:
Lua Code:
local function InitializeHouseFurnitureCategoryTypeData()
for categoryIndex = 1, GetNumFurnitureCategories() do
local categoryId = GetFurnitureCategoryId(categoryIndex)
local categoryDisplayName, _, categoryAvailableInTradingHouse = GetFurnitureCategoryInfo(categoryId)
local numSubcategories = GetNumFurnitureSubcategories(categoryIndex)
if numSubcategories > 0 then
local subcategoryContainer = {}
---subcategoryInfo arguments: nil, nil, text
local subcategoryInfo = {nil, nil, SI_TRADING_HOUSE_BROWSE_ITEM_TYPE_ALL}
table.insert(subcategoryContainer, subcategoryInfo)
for subcategoryIndex = 1, numSubcategories do
local subcategoryId = GetFurnitureSubcategoryId(categoryIndex, subcategoryIndex)
local subcategoryDisplayName, _, subcategoryAvailableInTradingHouse = GetFurnitureCategoryInfo(subcategoryId)
if subcategoryAvailableInTradingHouse then
---subcategoryInfo arguments: filterKey, nil, text
subcategoryInfo = {subcategoryId, nil, subcategoryDisplayName}
table.insert(subcategoryContainer, subcategoryInfo)
categoryAvailableInTradingHouse = true
end
end
ZO_TRADING_HOUSE_FILTER_FURNITURE_CATEGORY_TYPE_DATA[categoryId] = subcategoryContainer
end
if categoryAvailableInTradingHouse then
--categoryInfo arguments: filterKey, nil, text, childKey
local categoryInfo = {categoryId, nil, categoryDisplayName, categoryId}
table.insert(ZO_TRADING_HOUSE_FILTER_FURNITURE_CATEGORY_TYPE_DATA["root"], categoryInfo)
end
end
end
What I was actually looking for was how crafting stations and attunable stations are found in the vanilla store interface, but unfortunately they don't have any common ground and cannot be found in the same search.
Normal Crafting Stations:
Furniture Category / Subcategory: Services(25) > Crafting Stations(104)
Itemtype: ITEMTYPE_FURNISHING
Specialized Itemtype: SPECIALIZED_ITEMTYPE_FURNISHING_ORNAMENTAL
Attunable Crafting Stations:
Furniture Category / Subcategory: ??? (shows in "All Furnishings")
Itemtype: ITEMTYPE_TROPHY
Specialized Itemtype: SPECIALIZED_ITEMTYPE_FURNISHING_CRAFTING_STATION
I hope you can change it so the specialized itemtype and/or furniture category is identical for both.