Thread Tools Display Modes
08/16/14, 02:01 PM   #1
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
[outdated] Recipe Indices

It would be very nice to be able to get the RecipeListIndex & the RecipeIndex from an item link !!
 
08/16/14, 11:09 PM   #2
Fyrakin
 
Fyrakin's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 129
Originally Posted by circonian View Post
It would be very nice to be able to get the RecipeListIndex & the RecipeIndex from an item link !!
There is a provisioning revamp planned in the nearest future, who knows, maybe then we will see some api changes in that direction.
 
09/14/15, 03:01 PM   #3
zgwortz
Join Date: Jun 2015
Posts: 23
This may be an older request, but it's something I would find *really* useful. Currently there are two sets of functions for getting recipe related info - one based on the item link, and one based on the recipe list index and recipe index.

You *can* connect the two if the current player knows the recipe, by comparing the recipe result links, but that's not very useful when the current player does NOT know the recipe. In that instance, there's simply no possible way to connect the two pieces of data, which is rather frustrating when you're trying to put together a dynamic recipe list.
 
09/14/15, 03:10 PM   #4
Wandamey
Guest
Posts: n/a
except that the indexes depend on the filters at the cooking station afaik.
so you'll have them only for known recipes.


maybe you want to have a look at this mod :
http://www.esoui.com/downloads/info1034-CookeryWiz.html
it has a full list of recipes.
it is still maintained and developped.

Last edited by Wandamey : 09/14/15 at 03:17 PM.
 
09/14/15, 03:38 PM   #5
zgwortz
Join Date: Jun 2015
Posts: 23
Originally Posted by Wandamey View Post
except that the indexes depend on the filters at the cooking station afaik.
so you'll have them only for known recipes.


maybe you want to have a look at this mod :
http://www.esoui.com/downloads/info1034-CookeryWiz.html
it has a full list of recipes.
it is still maintained and developped.
Actually, my desire is specifically to create a mod which does this without requiring a full list of recipes so it doesn't NEED to be changed at all when they add/remove recipes and recipe lists to the game.

I can come close to what I want -- known recipes can be obtained from the indices, but you cannot get the original recipe link from them. Unknown recipes can be obtained from recipe links in inventories, guild stores, and the like, but you then have no way at all to connect them to the indices in the cooking station. You're simply missing the connecting piece, which is the indices corresponding to the recipe links. With that I could have code which builds the entire recipe table purely from in-game data as you see recipe links and learn recipes.

And from the data I've gotten from those APIs, it seems the indices don't actually change based on the filters at all. They appear to be fixed, and if a character doesn't know a particular recipe, they simply return empty data for a particular index.

I'm slightly tempted to make a libRecipe.lua which just has each Recipe Link and it's corresponding recipeListIndex and recipeIndex (from which *everything* else can be derived through in game APIs), but it detracts a lot from my original no-maintenance-required concept.
 
09/14/15, 03:43 PM   #6
Wandamey
Guest
Posts: n/a
they didn't use a table because they sucked at developping, they used it after generating it from browsing all item id and collecting useful data in a tool they made themselves probably. Then they copied the table.

Why?
because if you run the game on a toaster and do such a browsing at startup, you crash.
so yes it is possible.
and no, it's not worth the processing to avoid to copy paste your resulting table twice a year for major updates.
 
09/14/15, 04:03 PM   #7
zgwortz
Join Date: Jun 2015
Posts: 23
Heh. I'm actually running a pretty slow machine right now and doing just that kind of browsing at startup, and no, it doesn't come close to crashing. I actually don't notice the extra time it takes, which isn't all that surprising since when you think about it -- there aren't thousands and thousands of recipes - there are only a bit over 500 of them currently. Even at the relatively slow speed Lua runs, it's still a pretty short loop.

And using a table doesn't even save you anything time wise - pretty much all of these are scanning every single recipe in their list to find out if the player knows it from the start. Doing so from the indices using GetRecipeInfo() is actually quite likely to be faster than doing so from IsItemLinkRecipeKnown() because in the latter case it has to parse the item link string, whereas in the first case it's more likely going directly to it's internal recipe tables. (Best educated guess, in fact, is that the latter function internally turns the recipe link into the indices, and then uses an equivalent to GetRecipeInfo() to do it's work…)

So no, the excuse that it saves processing doesn't wash one bit. Nor am I implying that they "sucked at developing" -- they simply had a different design requirement than I do. Yes, I could base it on a table like CookeryWiz or ESO Master Recipe List, but that isn't my design goal.
 
09/14/15, 04:12 PM   #8
Wandamey
Guest
Posts: n/a
i'm not speaking of browsing only 500 recipes here.

to manage what you want to do you'll have to check every item (around 70000 of them, more if you want it "future proof") to test if they are recipes and get the links.
 
09/14/15, 04:21 PM   #9
zgwortz
Join Date: Jun 2015
Posts: 23
If that were the approach I wanted to take, yes, I might do that, but it's not. Honestly, I'd never even considered the idea of scanning the entire item list for recipes (If that's even possible to do -- is there an item link iterator for all items in the API? I didn't see one...) -- my design concept here is a sparsely filled data set.

I'm currently loading known recipes as each character loads, and as recipes are learned. As unknown recipes get spotted by the add-on in the bank/inventory/guild stores, I add them to my data set -- that's hardly a lot of effort as I'm catching these in the tooltip hook during mouseover currently.

But right now I have no easy way to connect the two - I can't positively identify the indices for a recipe I'm adding to my data set, so until a player actually *learns* the recipe, i don't know which list it belongs to or where it belongs in that list. Hence my wish for a way to get the recipeListIndex and recipeIndex from an itemLink.

Frankly, I'm confused at the resistance to the idea. It doesn't seem like a particularly unreasonable thing to ask for.
 
09/14/15, 04:28 PM   #10
Wandamey
Guest
Posts: n/a
I'm sorry, i thought you just wanted to update Phinix master List at first then you said oh pouark he made a table.
I'm sure he tried your way in every possible maners first, then made a table. Because in the end it's the saviest with the current API

Now if you can wait until such a function like the one you want is added to the API, you'll have a highway to make it up to your design requirements

and browsing all ids require to build a tool first, it's not an API function.
 
09/14/15, 04:36 PM   #11
zgwortz
Join Date: Jun 2015
Posts: 23
I'll be honest - an update to Phinix's ESO Master Recipe List was in fact my initial inspiration… but as I investigated, I realized I wanted to do things in a completely different fashion, and came up with my current approach.

I'm not even sure I want an actual list window -- I'm far more concerned with showing which of your characters knows which recipe in the tooltip (already working) and marking which recipes in inventory / store lists aren't known by your character and/or other characters (in progress).

But if I ever decide to do a list window, a recipe itemLink to recipe indices API function would be *immensely* helpful in providing a consolidated list of recipes known and unknown.
 
09/14/15, 04:41 PM   #12
Wandamey
Guest
Posts: n/a
that would be so awsome that i already made this btw, and others :

Recipe Info
Sous-Chef
Do I keep It for Alts
Cookery Wiz
CraftStore
ESO master List

probably others, I didn't count.
 
09/14/15, 05:12 PM   #13
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
This does not solve the problem of getting the indices for uknown recipes, but if you are going to try and keep track of what they know you might want to look at this: LibNeed4Research

I don't know if just knowing if they need the trait/recipe is enough for your needs, but it is a library to keep track of which characters know what (traits & recipes). At the very least it centralizes all of the work & shares it among addons so everyone does not need to do the same work trying to figure out & keep track of who knows what.

It keeps track of all characters, not just the active character.

Originally Posted by zgwortz View Post
As unknown recipes get spotted by the add-on in the bank/inventory/guild stores, I add them to my data set -- that's hardly a lot of effort as I'm catching these in the tooltip hook during mouseover currently.
You could just grab that information here:
Lua Code:
  1. EVENT_INVENTORY_SINGLE_SLOT_UPDATE (integer eventCode, integer bagId, integer slotId, boolean isNewItem, integer itemSoundCategory, integer updateReason)
and just check: if isNewItem == true, if so check to see if it is a recipe, if so then check to see if it is already know, if not, do whatever with it. That would catch every new recipe they pick up and you would not have to hook anything or wait for a tooltip to be created for the item OnMouseOver. Just a thought.
 
09/15/15, 02:35 AM   #14
@AlphaLemming
 
@AlphaLemming's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 122
In CraftStore i have the same "problem". For the provisioning interface you have a list and recipe id with all informations about known recipes ... but empty if unknown. I have also made a overview for all recipes to see which are missing ... therefor you need a table with recipe id's to construct links.

Made this so (this are all recipe id's including IC) for the account saved var to indicate which recipe is known (a lot of data but until better API support necessary):

Code:
CS.account.recipe[player]={[45535]=false,[45539]=false,[45540]=false,[45541]=false,[45542]=false,[45543]=false,[45544]=false,[45545]=false,[45546]=false,[45547]=false,[45548]=false,[45549]=false,[45551]=false,
	[45552]=false,[45553]=false,[45554]=false,[45555]=false,[45556]=false,[45557]=false,[45559]=false,[45560]=false,[45561]=false,[45562]=false,[45563]=false,[45564]=false,[45565]=false,[45567]=false,[45568]=false,[45569]=false,
	[45570]=false,[45571]=false,[45572]=false,[45573]=false,[45574]=false,[45575]=false,[45576]=false,[45577]=false,[45579]=false,[45580]=false,[45581]=false,[45582]=false,[45583]=false,[45584]=false,[45587]=false,[45588]=false,
	[45589]=false,[45590]=false,[45591]=false,[45592]=false,[45594]=false,[45595]=false,[45596]=false,[45597]=false,[45598]=false,[45599]=false,[45600]=false,[45601]=false,[45602]=false,[45603]=false,[45604]=false,[45607]=false,
	[45608]=false,[45609]=false,[45610]=false,[45611]=false,[45612]=false,[45614]=false,[45615]=false,[45616]=false,[45617]=false,[45618]=false,[45619]=false,[45620]=false,[45621]=false,[45622]=false,[45623]=false,[45624]=false,
	[45625]=false,[45626]=false,[45627]=false,[45628]=false,[45629]=false,[45630]=false,[45631]=false,[45632]=false,[45633]=false,[45634]=false,[45636]=false,[45637]=false,[45638]=false,[45639]=false,[45640]=false,[45641]=false,
	[45642]=false,[45643]=false,[45644]=false,[45645]=false,[45646]=false,[45647]=false,[45648]=false,[45649]=false,[45650]=false,[45651]=false,[45652]=false,[45653]=false,[45654]=false,[45655]=false,[45656]=false,[45657]=false,
	[45658]=false,[45659]=false,[45660]=false,[45661]=false,[45662]=false,[45663]=false,[45664]=false,[45665]=false,[45666]=false,[45667]=false,[45668]=false,[45670]=false,[45671]=false,[45672]=false,[45673]=false,[45674]=false,
	[45675]=false,[45676]=false,[45677]=false,[45678]=false,[45679]=false,[45680]=false,[45681]=false,[45682]=false,[45683]=false,[45684]=false,[45685]=false,[45686]=false,[45687]=false,[45688]=false,[45689]=false,[45690]=false,
	[45691]=false,[45692]=false,[45693]=false,[45694]=false,[45695]=false,[45696]=false,[45697]=false,[45698]=false,[45699]=false,[45700]=false,[45701]=false,[45702]=false,[45703]=false,[45704]=false,[45705]=false,[45706]=false,
	[45707]=false,[45708]=false,[45709]=false,[45710]=false,[45711]=false,[45712]=false,[45713]=false,[45714]=false,[45715]=false,[45716]=false,[45717]=false,[45718]=false,[45719]=false,[45791]=false,[45887]=false,[45888]=false,
	[45889]=false,[45890]=false,[45891]=false,[45892]=false,[45893]=false,[45894]=false,[45895]=false,[45896]=false,[45897]=false,[45898]=false,[45899]=false,[45900]=false,[45901]=false,[45902]=false,[45903]=false,[45904]=false,
	[45905]=false,[45906]=false,[45907]=false,[45908]=false,[45909]=false,[45910]=false,[45911]=false,[45912]=false,[45913]=false,[45914]=false,[45915]=false,[45916]=false,[45917]=false,[45918]=false,[45919]=false,[45920]=false,
	[45921]=false,[45922]=false,[45923]=false,[45924]=false,[45925]=false,[45926]=false,[45927]=false,[45928]=false,[45929]=false,[45930]=false,[45931]=false,[45932]=false,[45933]=false,[45934]=false,[45935]=false,[45936]=false,
	[45937]=false,[45938]=false,[45939]=false,[45940]=false,[45941]=false,[45942]=false,[45943]=false,[45944]=false,[45945]=false,[45946]=false,[45947]=false,[45948]=false,[45949]=false,[45950]=false,[45951]=false,[45952]=false,
	[45953]=false,[45954]=false,[45955]=false,[45956]=false,[45957]=false,[45958]=false,[45959]=false,[45960]=false,[45961]=false,[45962]=false,[45963]=false,[45964]=false,[45965]=false,[45966]=false,[45967]=false,[45968]=false,
	[45969]=false,[45970]=false,[45971]=false,[45972]=false,[45973]=false,[45974]=false,[45975]=false,[45976]=false,[45977]=false,[45978]=false,[45979]=false,[45980]=false,[45981]=false,[45982]=false,[45983]=false,[45984]=false,
	[45985]=false,[45986]=false,[45987]=false,[45988]=false,[45989]=false,[45990]=false,[45991]=false,[45992]=false,[45993]=false,[45994]=false,[45995]=false,[45996]=false,[45997]=false,[45998]=false,[45999]=false,[46000]=false,
	[46001]=false,[46002]=false,[46003]=false,[46004]=false,[46005]=false,[46006]=false,[46007]=false,[46008]=false,[46009]=false,[46010]=false,[46011]=false,[46012]=false,[46013]=false,[46014]=false,[46015]=false,[46016]=false,
	[46017]=false,[46018]=false,[46019]=false,[46020]=false,[46021]=false,[46022]=false,[46023]=false,[46024]=false,[46025]=false,[46026]=false,[46027]=false,[46028]=false,[46029]=false,[46030]=false,[46031]=false,[46032]=false,
	[46033]=false,[46034]=false,[46035]=false,[46036]=false,[46037]=false,[46038]=false,[46039]=false,[46040]=false,[46041]=false,[46042]=false,[46043]=false,[46044]=false,[46045]=false,[46046]=false,[46047]=false,[46048]=false,
	[46049]=false,[46050]=false,[46051]=false,[46052]=false,[46053]=false,[46054]=false,[46055]=false,[46056]=false,[46079]=false,[46081]=false,[46082]=false,[54241]=false,[54242]=false,[54243]=false,[54369]=false,[54370]=false,
	[54371]=false,[56943]=false,[56944]=false,[56945]=false,[56946]=false,[56947]=false,[56948]=false,[56949]=false,[56950]=false,[56951]=false,[56952]=false,[56953]=false,[56954]=false,[56955]=false,[56956]=false,[56957]=false,
	[56958]=false,[56959]=false,[56961]=false,[56962]=false,[56963]=false,[56964]=false,[56965]=false,[56966]=false,[56967]=false,[56968]=false,[56969]=false,[56970]=false,[56971]=false,[56972]=false,[56973]=false,[56974]=false,
	[56975]=false,[56976]=false,[56977]=false,[56978]=false,[56979]=false,[56980]=false,[56981]=false,[56982]=false,[56983]=false,[56984]=false,[56985]=false,[56986]=false,[56987]=false,[56988]=false,[56989]=false,[56990]=false,
	[56991]=false,[56992]=false,[56993]=false,[56994]=false,[56995]=false,[56996]=false,[56997]=false,[56998]=false,[56999]=false,[57000]=false,[57001]=false,[57002]=false,[57003]=false,[57004]=false,[57005]=false,[57006]=false,
	[57007]=false,[57008]=false,[57009]=false,[57010]=false,[57011]=false,[57012]=false,[57013]=false,[57014]=false,[57015]=false,[57016]=false,[57017]=false,[57018]=false,[57019]=false,[57020]=false,[57021]=false,[57022]=false,
	[57023]=false,[57024]=false,[57025]=false,[57026]=false,[57027]=false,[57028]=false,[57029]=false,[57030]=false,[57031]=false,[57032]=false,[57033]=false,[57034]=false,[57035]=false,[57036]=false,[57037]=false,[57038]=false,
	[57039]=false,[57040]=false,[57041]=false,[57042]=false,[57043]=false,[57044]=false,[57045]=false,[57046]=false,[57047]=false,[57048]=false,[57049]=false,[57050]=false,[57051]=false,[57052]=false,[57053]=false,[57054]=false,
	[57055]=false,[57056]=false,[57057]=false,[57058]=false,[57059]=false,[57060]=false,[57061]=false,[57062]=false,[57063]=false,[57064]=false,[57065]=false,[57066]=false,[57067]=false,[57068]=false,[57069]=false,[57070]=false,
	[57071]=false,[57072]=false,[57073]=false,[57074]=false,[57075]=false,[57076]=false,[57077]=false,[57078]=false,[57079]=false,[64223]=false,[68189]=false,[68190]=false,[68191]=false,[68192]=false,[68193]=false,[68194]=false,
	[68195]=false,[68196]=false,[68197]=false,[68198]=false,[68199]=false,[68200]=false,[68201]=false,[68202]=false,[68203]=false,[68204]=false,[68205]=false,[68206]=false,[68207]=false,[68208]=false,[68209]=false,[68210]=false,
	[68211]=false,[68212]=false,[68213]=false,[68214]=false,[68215]=false,[68216]=false,[68217]=false,[68218]=false,[68219]=false,[68220]=false,[68221]=false,[68222]=false,[68223]=false,[68224]=false,[68225]=false,[68226]=false,
	[68227]=false,[68228]=false,[68229]=false,[68230]=false,[68231]=false,[68232]=false
 

ESOUI » Developer Discussions » Wish List » [outdated] Recipe Indices


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