User:VeganCritter/Templates To Import or Create/Inventory

Inventory
Create a data template that stores each inventory transaction. Perhaps arranged like this: Timecode | Adjustment | Count | Item | Source | Destination | Notes (including refs) | Alternative Owner | Canon Group e0560p01h01m02s03 e056ap01h01m02s03 e056bp01h01m02s03 e056cp01h01m02s03
 * Template Draft:  Template:Inventory/sandbox
 * Add adjustment type "l" for "Lost" (used in ) for Garmelie's quill.
 * Add a ref parameter next to the adjustment (e.g., "Acquired[1]").
 * Test Output:  Template:Inventory/sandbox/testoutput
 * Consider whether it would be better to switch to Inventory Episode and Inventory Character instead of a combined template.
 * Consider updating draft to a bifurcated template, with Inventory Episode being the wikitable, and Inventory Episode/Row being invoked for each individual transaction row.  Obviously, a module could do this whole thing more effectively.
 * Allison's Version:
 * Template:Inventory
 * Template:Inventory/item
 * Database Version:
 * Database:
 * The would be a complete timecode for chronological sorting, so something like e0560p01h01m02s03 for episode 56, part 1, hour 1, minute 2, second 3.  For consistent user input, maybe we should just use the ep ref input format, then have the template automatically convert that to the desired  format.
 * Special episodes are denoted in the "0" or letter after the ep num:
 * Task:  Ask for help in Wikia Community Central for how to strip wikimarkup from a parameter that contains a template transclusion call.   My test attempts all failed because the nesting order means that the ep ref gets evaluated and transcluded before StringFunctions has access to strip the curly braces and pipes.
 * The parameter would essentially allow the one database to autofilter data based on the intended universe.  If  =Vox Machina (or, if it's empty, then we default it to Vox Machina), then those transaction records will apply only to the main Vox Machina canon.  Alternative  s could be Vox Moronica or To the Poop or Deadlands, for example.  Then, when implementing an inventory on a page, the data template can be queried for only the records belonging to the desired canon group(s).
 * The "Alternative Owner" field would be used when generating a character inventory.  If exists, then include that transaction in the character's inventory.  If it does not exist, then check  to see if it matches the character's name; if so, then add it to the character's inventory.
 * The functionality of the inventory database can be greatly improved by configuring the templates to accept multiple owners in (probably using #explode with a separator value?), which would cause the transaction to be included in any of the listed owners.  For example, we might want an acquisition to be counted both for Vex'ahlia and for the Bag of Colding.
 * Add an option for of "set".  When adjustment=set, then disregard previous transactions for that type and use the count listed on that row, then proceed with adding/subtracting the following transactions to/from it.  This will be useful when we don't have inventory transaction records for earlier episodes, but we do have records starting at a particular episode.  We would set the initial record as of the first mention of the accurate  of.
 * We could even use adjustment=set multiple times.  For example, imagine that Laura Bailey states in that she has two dragon eyes in her inventory from before the stream began.  We would set the item count at .  Then suppose we keep accurate transaction records for Chapter 1, but then our records are inaccurate/incomplete for Chapters 2–4, then we have accurate records again for Chapter 5.  In this case, we would set the item count a second time at Chapter 5 when we learn the current number of dragon eyes Vex has.
 * Using this database method, it may be important to have Count Text and Count Code, Item Text and Item Code, Source Text and Source Code, and Destination Text and Destination Code.  In this setup, "Alternative Owner" would really be "Destination Code".  Using a text/code distinction, we could have text appear in the inventory tables while using the code for the behind-the-scenes data manipulation.
 * When pulling transaction records from the database to compile a character's inventory table, would not be displayed, the sum of  s would be displayed,  would be #switched to an appropriate item name, and  would be inserted into paragraph DIVs in the same table cell, so that there's a history with refs.
 * Maybe modify ep ref to create inv ref, which would create a [+] that expands to an inline ep ref, turning into [–] to allow for collapse.
 * Character Inventory:
 * Character Inventory would also be used on the pages for storage items/places, such as Bag of Holding and Greyskull Keep.
 * On pageload, the default collapse status would show only the current items and item counts.  By clicking a "show all" button (like I did with errors for combat logs), all transactions would become visible.  The wikitable autosort would then allow for sorting chronologically, by transaction type, by item name, by item source, etc.
 * Episode Inventory:
 * On pageload, the default collapse status would show all transactions from that episode only, with a button to show only the final episode adjustments (if Vex gains 20 arrows and uses 7, then the final episode adjustment is +13 arrows), and a button to show the complete series inventory as of the end of the episode.