Yossi / cwtgbot

1 stars 4 forks source link

Add Command to view all craftable resources and quantities #48

Open the-daveman opened 4 years ago

the-daveman commented 4 years ago

Much like how /w currently works with displaying all craftable equipment based on current rec/parts/res quantities, I would like a command that will display all craftable resources based on current res quantities.

/c 38 Artisan mold x 0 (0) 37 Blacksmith mold x 2 (3) 36 Quality Cloth x 10 (5) 35 Crafted leather x 9 (220) 34 Metallic fiber x 6 (616) 33 Metal plate x 12 (304) 31 Rope x 52 (336) 30 Artisan frame x 4 (4) 29 Blacksmith frame x 8 (6) 28 Silver mold x 52 (73) 27 Steel mold x 18 (41) 25 Silver alloy x 18 (15) 24 Purified powder x 18 (25) 23 Coke x 53 (168) 21 Bone powder x 43 (349) 14 Wooden shaft x 35 (71) 19 Steel x 18 (149) 12 Cord x 149 (9)

Currently, the generalized output format is essentially: [id] [*][item-name] x [craftable-qty] ([current-stock-qty]) Where '*' denotes whether or not a craft is essentially Blacksmith only (requiring a Crafting Level 2 or higher) Note there is additional spacing between the two quantity fields for clarity. Note that QTY 0 items may be desirable to see even if materials to craft them are currently unavailable (see 38 in above example).

Additional implementation: Derived quantities are not taken into account here, i.e. craftability recursion, that is, calculating how many intermediate crafts using the current stock quantities could be created in order to create higher-level crafts (e.g. Artisan/Blacksmith molds). This aspect should likely be added but then a treed output may be desirable to show a more detailed breakdown for the more complex crafts (ones that are comprised of intermediate crafts and not just basic resources).

the-daveman commented 4 years ago

A more desirable output format may be preferred in the future, this is merely something that covers most of the needs upfront in order to get the feature rolled out.

Edit: Denoting Crafting Level (e.g. C0-C5, according to the wiki), may be desirable here as well if the output ever matures, in order to help individuals realize what they can and cannot craft. For simplicity sake, an asterisk (preferable to that of 'B') was used in order to indicate what are essentially Blacksmith-only crafts.

Yossi commented 3 years ago

2da772d726cee733e08ff9ca0c624d7fbf5bc141 covers most of this