-
Notifications
You must be signed in to change notification settings - Fork 2
/
save-syntax.edn
100 lines (82 loc) · 3.3 KB
/
save-syntax.edn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
;; experiments with syntax of save files
{:v [1 1] ; wish + sheet version numbers
:updated 1234 ; date
:sheet-id :id
; lists of ids; note that not all systems will support multi class or multi race,
; but we'll allow it in the file
:classes []
:races []
; map of limited-use ID -> number used
:limited-uses
{:paladin/lay-on-hands#uses 0}
; map of feature-id -> options chosen. The value may be a vector or a set,
; but *should* be a collection. If the value is a map, then it is for
; a secondary instance of a multi-instance feature, and it must look like:
; {:id :actual-feature-id, :value [options]}
; In this case, the key will probably be based on :actual-feature-id, but
; may be discarded
:options
{:paladin/oath [:paladin/vengeance]
:ability-improvement#paladin#1 {:id :ability-improvement
:value [:ability/dex :ability/dex]}}
; map of (inst-id | item-id) -> count. inst-id is the id of a specific
; *instance* of an item, whose details will be stored in :items. For
; an item from a data source, the spec in :items MUST include the :id.
; If the key is not in :items, it is an item-id, which belongs to
; some data source, and the item probably :stacks?.
:inventory {}
; list of ids that, if present, indicates a manual
; ordering of the inventory
:inventory-order []
; map of custom inst-id -> spec
; This can be used for instanced items, such as weapons, or for custom
; items that are always instanced. The nice thing about instancing items
; is we can have per-item notes (like if you have a thing that you can
; store spells in, you could actually put a note on that item)
:items
{:shortsword/inst1 {:id :shortsword}
:custom/weird-rock {:name "Weird Rock"}}
; map of effect-id -> (true | args map | args vector)
:effects {}
; set of inst-ids that are currently equipped
:equipped #{}
; opaque, sheet-specific data
:sheet {}
; summoned/recruited ally creatures and their states
:allies [{:id :creature-id
:instance-id :instance-id
:notes "Etc."
:hp 42}]
; notes is a sequence of [date note] pairs
:notes
[[1234 "Note"]]}
; campaign-specific
{; ...
; set of player's sheet IDs
:players #{:sheet-id}
:npcs {:ancient-red-dragon/thordak {:id :ancient-red-dragon
:name "Thordak"
:notes "Etc."
; or whatever other state:
:hp 2700}
:custom/mreynolds {:id :mreynolds
:name "Mal Reynolds"
; monster def inline
:abilities {:str 15}}}
; we don't want to impose any specific method of organization on a GM's
; campaign notes. But, we want to support many options, while being as
; space-efficient as possible, so here we go:
;
; :notes is a map whose keys are IDs and the values are notes
; The ID of a note ALWAYS has the namespace `n`
:notes {:n/id [{:n "Note Name"
:m modified-timestamp}
[:link]]}
; :folders is a map whose keys are IDs and the values are folders
; the ID of a folder ALWAYS has the namespace `f`
:folders {:f/id [{:n "Folder name"
:s :sort-type}
:n/1
:n/2
:f/3]}
}