Files 1
Downloads 191,042
Favorites 316
View Bug Report
Classification of Witches Festival (and New Life) recipes
Bug #: 1841
File: CraftStore Fixed and Improved
Date: 10/20/16 02:24 AM
By: code65536
Status: Fixed
You added the new IDs for the Witches Festival recipes, but did not update the heuristics used to sort the recipes into classifications. Ideally, they should all be classified as "Delicacies" since they are special recipes that don't follow the standard pattern of the base-game recipes.

The best way to do this would be the make the following change:
Code:
--- CraftStore.lua	Tue Oct 18 04:30:00 2016
+++ CraftStore.lua	Thu Oct 20 03:04:30 2016
@@ -430,23 +430,23 @@
     local numlevel = level+levelcp
     if levelcp>0 then
       level = CS.ChampionPointsTexture..levelcp
     end
     local function statcheck(stat) if string.find(text,stat) then return true else return false end end
     local function namecheck(stat) if string.find(name,stat) then return true else return false end end
-    local fm,fs,fh,ozo = statcheck(CS.MagickaName), statcheck(CS.StaminaName), statcheck(CS.HealthName), namecheck('Orzorg')
+    local fm,fs,fh = statcheck(CS.MagickaName), statcheck(CS.StaminaName), statcheck(CS.HealthName)
     if fm and fh and fs then stat = 7
     elseif fs and fh then stat = 5
     elseif fm and fh then stat = 4
     elseif fm and fs then stat = 6
     elseif fm then stat = 2
     elseif fh then stat = 1
     elseif fs then stat = 3
     else stat = 8 end
     if itype == ITEMTYPE_DRINK then stat = stat + 7 end
-    if ozo then stat = 15 end
+    if id > 70000 then stat = 15 end
     table.insert(CS.Cook.recipe,{name = ZOSF('<<C:1>>',GetItemLinkName(reslink)), stat = stat, quality = quality, level = level, numlevel = numlevel, link = link, result = reslink, known = known, id = id})
   end
   local function tsort(a,b) return a.numlevel > b.numlevel end
   table.sort(CS.Cook.recipe,tsort)
   CS.UpdateIngredientTracking()
 end
This would replace the name-based check for Orzorga with a simpler ID check: all recipes added since the Orzorga ones have been delicacies.

Also, here are the ID codes for the New Life recipes: 96960, 96961, 96962, 96963, 96964, 96965, 96966, 96967, and 96968.

Although the New Life Festival won't start for another couple of months, I recommend adding these codes now, since the data is already in the game and the achievements for the New Life Festival (which refer to these recipes) are already visible, and this way people can see and anticipate what recipes are coming.

RSS 2.0 Feed for Bug CommentsNotes Sort Options
By: BlackSwan - 10/20/16 09:35 AM
Thanks for ID's for new recipes, I will add it later, when return to home.
But your point about making them delicateses need to be investigayed, cause ZOS put put that recipes to that categories and I belive they have sual set of stat (atleast several of them, what I looked... )

Other point - my next priority is whole rewriting of recipes system, to get rid of predefined recipe list. So that part, probably, will be rewrited too. Will track progress in that report.
By: code65536 - 10/21/16 05:19 AM
The base game classifies them as Delicacies in the cooking interface. It's AlphaLemming's old heuristics (that were made before these recipes existed) that are incorrectly classifying them as something other than Delicacies.
By: code65536 - 10/21/16 05:22 AM
Also, the predefined recipe list is a necessity. Because the only alternative is to do a runtime datamine of the itemization table, and that's very expensive and slow.
By: BlackSwan - 10/21/16 06:58 AM
As a good man I must say you that I appreciate that you trying to help. BUT, please, have a good manners to and not try to force your vision. Just report strange behavior and stop at that point. I spending my own time on add-on that even not mine cause I need it working, and NOBODY tried to fix it before me.
By: code65536 - 10/21/16 08:48 AM
I'm just trying to help and have zero intention of trying to "force" a vision. Maybe it's an issue of the language barrier, and if something I said comes across poorly to you, I apologize.

To clarify, the classification is a bug, and the ZOS classifies all of the new recipes are Delicacies. I had interpreted your response as you believing that it was not a bug (and maybe that was a misinterpretation), so I wanted to clarify what the base game does versus what the addon's code was doing.

And for the other point of removing the predefined recipe list, I had already looked at ways to get a list of recipes, and there is no way aside from a slow brute-force search. I'm just letting you know to save you from spending time chasing that idea.
By: BlackSwan - 10/21/16 02:33 PM
As I said earlier: first that Igoing to is review how that recipes end up in that category. If you take a look in to the CS.CookShowCategory(if I am right about method name) you can find out that atleast in one place code does not depends on those heuristic for splitting to categories. It's possible when you using method based on RecipeLists. An I going to use this to get rid of recipes. Belive me, I already know good way to get rid of predefined list. Just wait untill I release it
By: BlackSwan - 10/21/16 02:47 PM
or even better: I give you a little hint.

1. You only need recipeItemLink if you want to check is it know. In otherbcases you can use RecipeListId that you can easily obtain via method I named before.
2. For both llink and id you can get link to consumable that will be created by this recipe.
3. Take a look to add-on code and find how I made magick with raw and refined materials to connect them, cause game do not giving you good way to do that.

Anything else is an easy

P.S. once again, thanks for trying to help. I little bid dissapointed that I am to far of mine PC those days so I was over-reacting. I want to take keyboard and investigate and code, instead of that I reading peoples reports about things I can't fix right now I happy that I will have things to do later, but I want it now
By: code65536 - 10/21/16 04:09 PM
I think we're talking about two different features. You're talking about the cooking fire feature, and I'm talking about the global recipe list feature.

The game does have a set of built-in functions to enumerate recipes: GetNumRecipeLists, GetRecipeListInfo, and GetRecipeInfo (also GetRecipeResultItemLink, which returns a link to the resulting consumable), and this is what gets used at the cooking station by the game's default UI. The list IDs are also how the game classifies recipes into categories.

These functions have two downsides, however. First, you can't get a recipe link from them--only a recipe name and a link for the resulting food/drink. But not a link for the recipe. Second, it will only enumerate recipes that your character knows--it returns empty results for unknown recipes. This isn't a problem for the cooking station, since you can't cook a recipe that you don't know.

But for CraftStore's recipe list feature, for showing all of the in-game recipe links regardless of whether your character knows it or not, there is no way to obtain recipe links for recipes that your character does not know without a brute-force search, so for that feature, a pre-defined list will still be needed. This is also why AlphaLemming used heuristics for classification for the global recipe list; since you don't have access to a list ID for this feature, the in-game classifier is unavailable.
By: BlackSwan - 10/22/16 05:17 AM
Oh crap. That's what I was missing: that that function not listing unknown recipes Thanks
By: BlackSwan - 10/25/16 01:52 PM
Ok. For now I implemented your fix. Thanks