> [!column|flex no-title]
>> [!menu-dark-red|ttl-c] [[Obsidian TTRPG Tutorials]] / [[Plugin Tutorials]] / [[Dataview]] / [[Dataview - List Recently Modified NPCs]]
> [!column|4 no-title]
>> [!menu-green-1|ttl-c] [[Getting Started]]
>
>> [!menu-green-2|ttl-c] [[Plugin Tutorials]]
>
>> [!menu-green-3|ttl-c] [[Community Supported Games]]
>
>> [!menu-green-4|ttl-c] [[Obsidian TTRPG Tutorials/Templates/Templates\|Templates]]
> [!column|3 no-title]
>> [!patreon|ttl-c] [Patreon](https://www.patreon.com/JPlunkett) ([Starter Vault](https://www.patreon.com/posts/obsidian-patreon-96801399))
>
>> [!discord|ttl-c] [Obsidian TTRPG Community Discord](https://discord.gg/CdM9UCJdwU)
>
>> [!discord|ttl-c] [Obsidian Official Discord](https://discord.gg/8AF29UBUCa)
## List the Recently Modified NPCs
This example can be placed in a note and will automatically generate a list of recently modified NPC notes.
### Concept
I like the idea of having a folder dedicated to `Spare NPCs`. Perhaps 10 or 20 npcs that are pre-prepared and ready for me to grab in a situation where the party need to encounter someone that I am not prepared for. This table therefore would be a great way to quickly summarise the available npcs so you can quickly grab one that is suitable for the situation.
### Assumptions
This specific code has a number of assumptions:
- All of the notes are in a specific folder (`FROM "2. Mechanics/Non-Player Characters"`). You can of course change this and define your own folder.
- Each npc note has the following frontmatter (`Gender, Race, Age, Location, AssociatedGroup`). You can change these fields to match the frontmatter in your own notes, add additional fields or remove fields.
````
---
NoteIcon: npc
Gender:
Race:
Age:
Location:
AssociatedGroup:
---
````
![[Pasted image 20230708163702.png]]
````
```dataview
TABLE WITHOUT ID link(file.name) AS "NPC Name", Gender, Race, Age, Location, AssociatedGroup
FROM "2. Mechanics/Non-Player Characters"
WHERE (NoteIcon = "npc")
SORT file.mtime DESC
LIMIT 10
```
````