>[!tldr]- Changelog and Roadmap
># Changelog
> ### New Item Template v1.0 - Mar. 6, 2025
> - It works
> - Sorts into VVunderlore Compendium folders and creates folders that don't exist (in the right place and when asked).
> - Decent set of type and subtype values for optimal sorting
> - Formats those item notes just so nice
>
># Roadmap
>### Current Encounters:
>- building instructions on how to modify the code for unique file structures and forms
>### Future Encounters:
>- more granular organization for magical items (but not homebrew)
>- "Copy" button for some kind of item quick-view module that you can drop on any page (maybe a one-line Dataview table or an Infobox)
>- Make use of the "shopkeep" frontmatter field
# Creating New Items
As you can see in the [[Introduction to the Vault|Templated Vault]], I split my items up pretty granularly. You can do it however you want, of course. Either way you'll need to decide *how* you'd like to organize that part of the compendium before using the New Item template.
### Note Format
Below is the general format used for all items. There may be variation on the frontmatter or body of the note because of the type of item such as omissions of certain elements (rope doesn't need a line that says you don't have to attune to it), additions of front-matter properties for different types of filtering you want to do, etc.
>[!example]- image of a note created with this template
>![[new item render example.png]]
### New Item Form
Using the plugin [[Modal Forms]], you can create a dialogue that opens what you [[Templates Introduction#Activating the Templates|click on a button]]. That dialogue, run via a [[Templater]] template (found below), collects the form data and applies it to said templated format and creates a new note in the correct folder.
>[!code]- New Item Form Code
>
>```json
> {
> "title": "New Item",
> "name": "new-item-form",
> "customClassname": "items",
> "fields": [
> {
> "name": "itemName",
> "label": "Item Name",
> "description": "Make it a good one",
> "isRequired": true,
> "input": {
> "type": "text",
> "hidden": false
> }
> },
> {
> "name": "narrativeDesc",
> "label": "Narrative Description",
> "description": "A brief description that doesn't give too much away",
> "isRequired": false,
> "input": {
> "type": "textarea",
> "hidden": false
> }
> },
> {
> "name": "details",
> "label": "Item Description",
> "description": "and details!",
> "isRequired": true,
> "input": {
> "type": "textarea",
> "hidden": false
> }
> },
> {
> "name": "price",
> "label": "Price",
> "description": "in GP",
> "isRequired": true,
> "input": {
> "type": "number",
> "hidden": false
> }
> },
> {
> "name": "rarity",
> "label": "Rarity",
> "description": "Select rarity",
> "isRequired": false,
> "input": {
> "type": "select",
> "source": "fixed",
> "options": [
> {
> "value": "Common",
> "label": "Common"
> },
> {
> "value": "Uncommon",
> "label": "Uncommon"
> },
> {
> "value": "Rare",
> "label": "Rare"
> },
> {
> "value": "Very Rare",
> "label": "Very Rare"
> },
> {
> "value": "Legendary",
> "label": "Legendary"
> },
> {
> "value": "Artifact",
> "label": "Artifact"
> }
> ]
> }
> },
> {
> "name": "magical",
> "label": "Magical",
> "description": "Is the item magical? (this doesn't include +1 armor and weapons)",
> "isRequired": false,
> "input": {
> "type": "toggle",
> "hidden": false
> }
> },
> {
> "name": "magicalitemtype",
> "label": "Magical Item Type",
> "description": "What kind of magical item is it?",
> "isRequired": false,
> "condition": {
> "dependencyName": "magical",
> "type": "boolean",
> "value": true
> },
> "input": {
> "type": "select",
> "source": "fixed",
> "options": [
> {
> "value": "",
> "label": ""
> },
> {
> "value": "Weapon",
> "label": "Weapon"
> },
> {
> "value": "Armor",
> "label": "Armor"
> },
> {
> "value": "Potion",
> "label": "Potion"
> },
> {
> "value": "Ring",
> "label": "Ring"
> },
> {
> "value": "Rod",
> "label": "Rod"
> },
> {
> "value": "Scroll",
> "label": "Scroll"
> },
> {
> "value": "Staff",
> "label": "Staff"
> },
> {
> "value": "Wand",
> "label": "Wand"
> },
> {
> "value": "Wondrous Item",
> "label": "Wondrous Item"
> }
> ]
> }
> },
> {
> "name": "folder",
> "label": "Item Home",
> "description": "Homebrew or just magical?",
> "isRequired": false,
> "condition": {
> "dependencyName": "magical",
> "type": "boolean",
> "value": true
> },
> "input": {
> "type": "select",
> "source": "fixed",
> "options": [
> {
> "value": "Compendium/Items/Homebrew Items",
> "label": "Homebrew"
> },
> {
> "value": "Compendium/Items/Magical Items",
> "label": "Magical"
> }
> ]
> }
> },
> {
> "name": "itemtype",
> "label": "Item Type",
> "description": "What kind of item is it?",
> "isRequired": false,
> "condition": {
> "dependencyName": "magical",
> "type": "boolean",
> "value": false
> },
> "input": {
> "type": "select",
> "source": "fixed",
> "options": [
> {
> "value": "",
> "label": ""
> },
> {
> "value": "Consumable",
> "label": "Consumable"
> },
> {
> "value": "Valuable",
> "label": "Valuable"
> },
> {
> "value": "Gear",
> "label": "Gear"
> },
> {
> "value": "Compendium/Items/Tools",
> "label": "Tool"
> },
> {
> "value": "Compendium/Items/Instruments",
> "label": "Instrument"
> },
> {
> "value": "Weapon",
> "label": "Weapon"
> },
> {
> "value": "Armor",
> "label": "Armor"
> }
> ]
> }
> },
> {
> "name": "consumable",
> "label": "Consumable",
> "description": "What type of consumable is it?",
> "isRequired": false,
> "condition": {
> "dependencyName": "itemtype",
> "type": "isExactly",
> "value": "Consumable"
> },
> "input": {
> "type": "select",
> "source": "fixed",
> "options": [
> {
> "value": "Compendium/Items/Consumables/Potions",
> "label": "Potion"
> },
> {
> "value": "Compendium/Items/Consumables/Food",
> "label": "Food"
> }
> ]
> }
> },
> {
> "name": "valuable",
> "label": "Valuable Type",
> "description": "What type of valuable is it?",
> "isRequired": false,
> "condition": {
> "dependencyName": "itemtype",
> "type": "isExactly",
> "value": "Valuable"
> },
> "input": {
> "type": "select",
> "source": "fixed",
> "options": [
> {
> "value": "Compendium/Items/Valuables/Gems",
> "label": "Gems"
> },
> {
> "value": "Compendium/Items/Valuables/Trade Goods",
> "label": "Trade Goods"
> }
> ]
> }
> },
> {
> "name": "gear",
> "label": "Gear",
> "description": "What type of gear is it?",
> "isRequired": false,
> "condition": {
> "dependencyName": "itemtype",
> "type": "isExactly",
> "value": "Gear"
> },
> "input": {
> "type": "select",
> "source": "fixed",
> "options": [
> {
> "value": "Compendium/Items/Gear/Mounts and Vehicles",
> "label": "Mount or Vehicle"
> },
> {
> "value": "Compendium/Items/Gear",
> "label": "Other"
> }
> ]
> }
> },
> {
> "name": "weapon",
> "label": "Weapon type",
> "description": "What class of weapon is it?",
> "isRequired": false,
> "condition": {
> "dependencyName": "itemtype",
> "type": "isExactly",
> "value": "Weapon"
> },
> "input": {
> "type": "select",
> "source": "fixed",
> "options": [
> {
> "value": "Compendium/Items/Weapons and Armor/Weapons/Simple",
> "label": "Simple"
> },
> {
> "value": "Compendium/Items/Weapons and Armor/Weapons/Martial",
> "label": "Martial"
> },
> {
> "value": "Compendium/Items/Weapons and Armor/Weapons/Ammunition",
> "label": "Ammunition"
> },
> {
> "value": "Compendium/Items/Weapons and Armor/Weapons/Variant",
> "label": "Varient (Minor Magic, +1s, etc)"
> }
> ]
> }
> },
> {
> "name": "armor",
> "label": "Armor Type",
> "description": "What type of armor is it?",
> "isRequired": false,
> "condition": {
> "dependencyName": "itemtype",
> "type": "isExactly",
> "value": "Armor"
> },
> "input": {
> "type": "select",
> "source": "fixed",
> "options": [
> {
> "value": "Compendium/Items/Weapons and Armor/Armor",
> "label": "Sheild"
> },
> {
> "value": "Compendium/Items/Weapons and Armor/Armor/Light",
> "label": "Light"
> },
> {
> "value": "Compendium/Items/Weapons and Armor/Armor/Medium",
> "label": "Medium"
> },
> {
> "value": "Compendium/Items/Weapons and Armor/Armor/Heavy",
> "label": "Heavy"
> },
> {
> "value": "Compendium/Items/Weapons and Armor/Armor/Variant",
> "label": "Varient (Minor Magic, +1s, etc)"
> }
> ]
> }
> },
> {
> "name": "attunement",
> "label": "Attunement",
> "description": "Does this item require attunement?",
> "isRequired": false,
> "condition": {
> "dependencyName": "magical",
> "type": "boolean",
> "value": true
> },
> "input": {
> "type": "toggle",
> "hidden": false
> }
> },
> {
> "name": "attribution",
> "label": "Attribution",
> "description": "Where did this item come from?",
> "isRequired": false,
> "input": {
> "type": "text",
> "hidden": false
> }
> }
> ],
> "version": "1"
> }
### New Item Template
Place this template in a note in your templates folder in your vault so it will come up when you press your "insert template" hotkey. Create your button to run this template, press the button, fill out the form, and it should create and open your new item!
When creating this note, name it something simple and be sure that you match it's name on whatever [[Templates Introduction#Meta Bind Buttons|buttons you create]].
>[!code]- Item Note Template
>![[Extras/Toolkit/code/new item template|no-title]]