Something I've been putting off for a while but it's starting to bite us in the butt.
My thought is that, the monster or event or gift box which drops an item should be the source of truth for the drop information. Then items query for where they're dropped from. Similarly, for sold items, the source of truth should be the NPC/event page where the shop is defined, or more likely a subpage of that which only contains the shop data (better for PageForms).
The complexities of drops/shops are as follows (please add more if I miss one):
- Dropped gear can have enchants, and these enchants must be queryable and must be associated with the item they're enchanted on. It's fair to say that enchants are always enchanted on an item and one of those items just happens to be called Enchant Scroll, too.
- Certain items, particularly rewards, will have variations applied to the base item, such has having an increased trade limit. Typically expiration time is tied to a specific name, but sometimes it isn't. For reward items (from gachas, hot times, etc), color or smith grade may be fixed. There are others that are possible, too, but I'm not sure what has actually been done. Which variant is dropped/sold must be able to be specified...or the variations must be able to be specified with the dropped/sold item in its listing.
- Sold items have a sale price which is distinct from the item's value (BuyPrice), such as when the item is discounted in a specific NPC's shop (normally, not just Wednesdays etc). This price could be in currencies besides gold, as well, of course. Same as what's currently in any gear page's SellList section.
I think it's probably pretty clear that this should be done via sub-objects... but this introduces some complexity via PageForms. Essentially every form that can have dropped items (including items, ie. gift boxes) will need to have a section for adding dropped items. I think we're able to have a standard section for this that we can transclude into the form code, but it will definitely look weird on some forms. We'll maybe need different forms for the different items (like a specific one for gift boxes, gacha, etc with a separate one for gear..)
Before I start prototyping anything, I want to be sure we have all the edge cases written down. If anyone else has any other design ideas tho, feel free to post.
|Posted by Kadalyn (administrator) on 29 November 2020 at 18:56.|