-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added calculation of crafting reagents needed for uncollected Things for selected item #923
base: master
Are you sure you want to change the base?
Conversation
Any progress on this? |
One note is (in my opinion) pretty much all of the 'future improvements' are out of scope for ATT and potentially would be better suited as a separate addon which could integrate with/rely on the base ATT addon. Currently, ATT tries to give a consolidated 'what/where/how' for collection of a Thing. Expanding that into actual planning of the means by which to get Things is a little out of scope I would say (as far as checking characters for reagent counts and modifying tooltip values based on existing items, integrated with TSM for shopping lists, etc.)
This is done because sometimes Items have additional values defined (which makes life more terrible) that potentially should cause the Item to be treated differently. This value is called a modItemID internally in ATT, and denotes the ItemID, ModID, BonusID of a given Item. Using the function
This would need to be handled similar to the logic in
We can detect and force the data to be re-generated by the user if the structure needs to be changed for the storage of reagent/recipe data, since with this technique you are definitely duplicating a lot of the already-existing information (though it is harder to access in the way it is currently stored). So if another structure is desired that efficiently meets the needs of existing logic as well as this new logic, we can incorporate that 'alert' to the user. For instance the current check of it being out of date expects a version of -- Verify that reagent cache is of the correct format by checking a special key
local reagentCache, reagentCacheVer = app.GetDataMember("Reagents", {}), 2;
if not reagentCache[-1] or reagentCache[-1] < reagentCacheVer then
C_Timer.After(30, function() app.print(L["REAGENT_CACHE_OUT_OF_DATE"]); end);
wipe(reagentCache);
reagentCache[-1] = reagentCacheVer;
end
This is because you are basing your calculations from the I haven't gotten to testing this myself yet, and it looks like there are further adjustments still planned. I will try to keep a better eye on any changes here 👍 |
Having this feature as a separate addon is definitely a great idea given the possible spectrum of features. If it were up to me, I would add this as Experimental given few limitations related to accuracy of calculation and the fact that the calculation is based off of what can be displayed in tooltip. I'd maybe even add a tooltip saying something along the lines of "Looking for developers willing to move this feature in a separate addon". Although players feedback will likely help with the decision |
@ImUnicke, any updates on this? |
Features
How to debug
There is a TypeScript implementation of the calculation logic available to ATTCraftCalcSandbox repo. Follow a README there for details.
Problems and considerations
"Reagents"
data.Future improvements
calculateNested
parameter - untested).Examples
Shal'dorei Silk
River's Heart
TODO