forked from dozens/cleric-plus-thief
38 lines
1.3 KiB
Markdown
38 lines
1.3 KiB
Markdown
# Database
|
|
|
|
## Situation
|
|
|
|
One thing that a good game master emulator / oracle / solo engine will do is add complications to a scene.
|
|
|
|
This often looks something like "An NPC suddenly acts!" or "A plot thread advances / closes."
|
|
|
|
This makes for unexpected and interesting situations.
|
|
|
|
And it necessitates keeping a list of NPCs and threads.
|
|
|
|
## Task
|
|
|
|
I needed to create a database.
|
|
|
|
A plain text file is probably mostly okay, but I want to be able to easily select a random entry, and to update entries with notes, etc. Maybe have a 'status' column for 'missing, active, dead' etc.
|
|
|
|
## Action
|
|
|
|
So of course I made some recfiles.
|
|
|
|
Check them out in `/db`.
|
|
|
|
## Results
|
|
|
|
I can quite easily select a random NPC now.
|
|
|
|
```
|
|
recsel -P name -m 1 db/npc.rec
|
|
```
|
|
|
|
I would like to write a script to quickly append a note to a record. One nice feature of records is that you can have repeated fields. That is, it's perfectly fine to have many `note:` fields. When querying, you'll just get them all as a list. So updating via appending new `note` fields ought to be a cinch.
|
|
|
|
In the meantime, sometimes my playing/writing is figuring out the tangled web of motivations. And a lot of that discovery comes from just opening up my recfile in an editor and jamming.
|
|
|
|
Then I can go get my narrative on afterwards.
|