xanthics / gw2craft

Driving force behind gw2crafts
http://gw2crafts.net
MIT License
68 stars 16 forks source link

Guides for Free Accounts #48

Closed tylercrompton closed 3 years ago

tylercrompton commented 3 years ago

These guides are mostly unusable for free accounts because they call for purchasing non-whitelisted items from the Trading Post. This is painfully obvious when looking the “Mixed” section of the item list. However, in some cases, one or more of the items in the “Collectibles” section also aren't whitelisted. How would one go about forcing the guides to not require non-whitelisted items from the TP? I'm not familiar enough with the codebase to try something out.

xanthics commented 3 years ago

It would involve creating a recipe/item list that only contains whitelisted items. I'm taking a look around the API now to determine what flag needs to be checked.

tylercrompton commented 3 years ago

The “/v2/commerce/prices/{id}” endpoint includes a whitelisted flag. I think that the difficult part is determining whether or not a recipe should be excluded based on this information.

For example, Mighty Chain Boots use the Mighty Jute Insignia; this isn't whitelisted. However, that shouldn't necessarily preclude the use of the Mighty Chain Boot recipe because the Mighty Jute Insignia can be acquired via crafting. In this particular example, the item can be crafted, exclusively using items accessible to free accounts, though it requires “nested” crafting.

An example of an item that can't be crafted, exclusively using items accessible to free accounts is Minor Rune of the Fire. Though all three ingredients are accessible to free accounts, none of them can be acquired from a vendor, from the TP, or via crafting, exclusively using items accessible to free accounts. (Piles of Lucent Crystal can be crafted, but Lucent Motes have the same problem that Molten Slivers and Charms of Potence have.)

xanthics commented 3 years ago

Via https://api.guildwars2.com/v2/commerce/prices/19740 there is a whitelisted flag.

To implement this MyPrices>gw2apilistworker would need to also check if the item is whitelisted at line 62. I'm unsure how much code rewriting would need to occur to have both guides created on the site. As the original site design was very flat in nature.

tylercrompton commented 3 years ago

I'm unsure of what the demand for free account guides would be. Who knows how many people have run into this problem before I did? Personally, I'd be perfectly content if I could be pointed in the write direction to replace the standard guides on my machine with free-account-friendly guides. I understand how to track the whitelisted flag. What I'm having trouble with is how to use that information to determine the optimal path.

xanthics commented 3 years ago

it should be enough to change

        if sitem[u'sells'][u'quantity'] <= 50:

to

        if sitem[u'sells'][u'quantity'] <= 50 or not sitem[u'whitelisted']:

at line 62 in MyPrices>gw2apilistworker. I can't guarantee that usable guides will be created however, as I don't know that all tiers have items unlocked. Additionally the recovery information will be off if you can't sell something.

tylercrompton commented 3 years ago

Line 37 of “MakeGuide.py” saw lots of use, to put it lightly. But at first glance at the resulting guide, it appears accurate. I'll follow it and report back on how it went. Many thanks!

tylercrompton commented 3 years ago

I followed the armorsmithing 1–400 guide and it worked like a charm. I can't speak to its optimism beyond your remark about not being able to sell certain items. It was of course more expensive than the paid account path but that was to be expected. At the end of the day, it was a usable guide with an affordable path, which is what matters the most. That said, the path in the armorsmithing 400–500 guide for free accounts costs over eight times the cost of the path in the equivalent guide for paid accounts. Lol. Glancing through it, it seemed correct. Idk. Anyway, thanks again!