nikkisaurus / FarmingBar

4 stars 1 forks source link

Feature Request - Expanded mixed items or shopping list #2

Closed whyttedragun closed 1 year ago

whyttedragun commented 4 years ago

I'm not sure which type of button this would work better on, but would it be possible to have a button that updates based on if you have the mats to make the item you're tracking? Maybe by having an option to tell the button that X of item A is equal to Y of item B? For example, if I'm tracking S.P.A.R.E. Crates and I have 2 already plus 500 spare parts, the button would indicate I have 4 crates since I can make 2 more with what I have (assuming I correctly told FB that 250 spare parts are used to make one crate).

niketa-wow commented 3 years ago

This is a good idea. It would be a little involved to implement as the addon is right now, but I will definitely keep it in mind for the future. I've been trying to add as many ways to track exactly what it is you want, but it gets a little complicated the more scenarios like this that pop up.

I'm thinking that maybe I could look into something similar to WeakAuras, where you can basically build more complex objectives instead of just making several "types" of objectives. However, this would be a very big undertaking and would have to happen on the next major rewrite or version. Most likely rewrite since it'd be easier than changing all the code.

But I'll try to think of an easy way to implement it before it gets to that point, because knowing me a rewrite could be a year out. lol

rbpaiett commented 3 years ago

This is very similar to a comment I made before. I'm all for it as well.

Bast73 commented 3 years ago

I was thinking of it for the current farming I am doing, and tried to modify it quickly, but didn't achieve it (was unable to find how to retrieve item objective)

The way I was thinking of it is change the Shopping List to find the lower maximum and do math to calculate count based on this number.

Let say I need 200 of Item A, and 10 Item B gives 1 Item A. I would have created a Shopping List with 200 Item A, 2000 Item B. Then, if I have 50 Item A and 33 Item B, The count is equal to : (50 200 (min item obj) / 200 (current item obj) ) + ( 33 200 (min Item Obj) / 2000 (current item obj) )

niketa-wow commented 3 years ago

I was thinking of it for the current farming I am doing, and tried to modify it quickly, but didn't achieve it (was unable to find how to retrieve item objective)

The way I was thinking of it is change the Shopping List to find the lower maximum and do math to calculate count based on this number.

Let say I need 200 of Item A, and 10 Item B gives 1 Item A.

I would have created a Shopping List with 200 Item A, 2000 Item B.

Then, if I have 50 Item A and 33 Item B, The count is equal to :

(50 200 (min item obj) / 200 (current item obj) ) + ( 33 200 (min Item Obj) / 2000 (current item obj) )

I have an alpha version released that allows you to create more complex objectives but as it is only an alpha (and I've been very busy and not had a lot of time recently), there are many customizations that aren't currently available. These are mainly things about the style of the bars.

The objectives themselves are working in it though and you can create one that allows you to make this comparison.

As far as making your personal edits, the database structure can be found in Core/Core.lua

It should be something like barDB.objectives[buttonID]. objective

But you may want to double-check as this is just off the top of my head.

whyttedragun commented 3 years ago

Once again, you're awesome! This is almost exactly what I was looking for, and I'm sure that it'll get even closer as you get it closer to a release version.

jmmeye2 commented 3 years ago

It doesn't require a rewrite for what I want. Just add a "ratio" value for each item in mixed item list. For example:

Knothide Leather List Quantity = 1000 Knothide Leather, ratio = 1 Knothide Leather Scraps, ratio = 0.2

With this list, I can shoot for 1000 Knothide Leather, knowing that any leather scraps can be changed into Knothide leather but it takes 5. So if I collect 300 Knothide Leather and 500 Knothide Leather Scraps, the list would show as 300 1 + 500 0.2 = 400

whyttedragun commented 3 years ago

Just add a "ratio" value for each item in mixed item list.

That's already in the Alpha.

rbpaiett commented 2 years ago

Did this ever get moved from Alpha to Beta or Release?

niketa-wow commented 2 years ago

Did this ever get moved from Alpha to Beta or Release?

Not yet. I've been busy with school and work, so I haven't been able to work on it very often. There are still a lot of core features and kinks to work out before I move to beta.

rbpaiett commented 2 years ago

All good, better to get it right than to rush it.