>[!tldr]- Changelog and Roadmap > > # Changelog > ### Place Template v1.0 > - Removed a single line break to prevent ENOENT error on Windows PCs. > # Roadmap >### Current Encounters: >- More complex form for betting sorting logic and adding folders and stuff >### Future Encounters: >- Leaflet integration >- Summary block for adding to adventure docs # Creating New Places Places are one of the things I actually put into the World folder instead of the compendium. The distinction is minor [[Introduction to the Vault|but important]]. This is a very simple template, similar to the new item template, that will create a new place in the Places folder of you World. As you create more places, you may want to organize by region or dimension or whatever so I'll be working on a second kind of form that has better logic for that kind of thing (watch the changelog at the top of the page). ### Note Format This template creates an efficient note where key details are added to the [[Obsidian Basics and Glossary#Frontmatter|frontmatter]] of the note for reference wherever else you like. Ample room for history and town description makes the note simple but expandable. >[!example]- Rendered New Place note >![[new place format example.png]] It should be noted that most of the fields are meant to be left unchanged but if you need to change them, you can do so by editing the [[Obsidian Basics and Glossary#Frontmatter|frontmatter fields]] in the finished note. ### New Place 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, collects the form data and applies it to said templated format and creates a new note in the correct folder. [[Plugins#Modal Forms|Import a new form into the Modal Forms plugin]] using the JSON code below and name it "new-place-form" (it will do it automatically, just don't change it). >[!code]- New Place Form > ``` > { > "title": "New Place", > "name": "new-place-form", > "customClassname": "compendium", > "fields": [ > { > "name": "name", > "label": "Name", > "description": "", > "isRequired": true, > "input": { > "type": "text", > "hidden": false > } > }, > { > "name": "type", > "label": "Type", > "description": "What kind of place is it?", > "isRequired": false, > "input": { > "type": "select", > "source": "fixed", > "options": [ > { > "value": "", > "label": "" > }, > { > "value": "Town", > "label": "Town" > }, > { > "value": "Dungeon", > "label": "Dungeon" > }, > { > "value": "Landmark", > "label": "Landmark" > }, > { > "value": "Region", > "label": "Region" > }, > { > "value": "Building", > "label": "Building" > }, > { > "value": "Complex", > "label": "Complex" > }, > { > "value": "Camp", > "label": "Camp" > } > ] > } > }, > { > "name": "narrative desc", > "label": "Narrative Decription", > "description": "How would you describe this place to your players?", > "isRequired": false, > "input": { > "type": "textarea", > "hidden": false > } > }, > { > "name": "desc", > "label": "Description", > "description": "What's this place all about?", > "isRequired": false, > "input": { > "type": "textarea", > "hidden": false > } > }, > { > "name": "history", > "label": "History", > "description": "What's the history of this location?", > "isRequired": false, > "input": { > "type": "textarea", > "hidden": false > } > }, > { > "name": "world", > "label": "World", > "description": "What planet or plane of existence is this place on?", > "isRequired": false, > "input": { > "type": "text", > "hidden": false > } > }, > { > "name": "country", > "label": "Country", > "description": "What controlled region is this place in?", > "isRequired": false, > "input": { > "type": "text", > "hidden": false > } > }, > { > "name": "population size", > "label": "Population Size", > "description": "Roughly how big is this place.", > "isRequired": false, > "input": { > "type": "select", > "source": "fixed", > "options": [ > { > "value": "", > "label": "" > }, > { > "value": "metropolis", > "label": "Metropolis" > }, > { > "value": "city", > "label": "City" > }, > { > "value": "town", > "label": "Town" > }, > { > "value": "Village", > "label": "Village" > }, > { > "value": "Hamlet", > "label": "Hamlet" > }, > { > "value": "fort", > "label": "Fort" > }, > { > "value": "camp", > "label": "Camp" > } > ] > } > }, > { > "name": "climate", > "label": "Climate", > "description": "What's the weather like?", > "isRequired": false, > "input": { > "type": "select", > "source": "fixed", > "options": [ > { > "value": "", > "label": "" > }, > { > "value": "temperate", > "label": "Temperate" > }, > { > "value": "wet", > "label": "Wet" > }, > { > "value": "arid", > "label": "Arid" > }, > { > "value": "cold", > "label": "Cold" > } > ] > } > }, > { > "name": "denizens", > "label": "Known Denizens", > "description": "Any NPCs or PCs that would be found here? (comma separated)", > "isRequired": false, > "input": { > "type": "text", > "hidden": false > } > }, > { > "name": "appearences", > "label": "Appears In", > "description": "I this place featured in any adventures?", > "isRequired": false, > "input": { > "type": "multiselect", > "source": "dataview", > "query": "Array.from(new Set(\n dv.pages().filter(p => p.file.folder.startsWith(\"Adventures/\"))\n .map(p => p.file.folder.split(\"/\")[1]) // Extract first-level folder\n)).sort();", > "allowUnknownValues": true, > "multi_select_options": [] > } > } > ], > "version": "1" > } ### New Place 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 place in World/Places! 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]- Place Note Template >![[Extras/Toolkit/code/new place template|no-title]]