-
Notifications
You must be signed in to change notification settings - Fork 0
/
Design Doc
141 lines (93 loc) · 2.14 KB
/
Design Doc
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
Bestiary
- One page app(well 2)
- Search/list
- Edit view(of the creature)
- Dice rolling strategies
- Transfomers(from 3.5 to PF, etc.)
- Generate mooks functionality
- Choose array (elite, etc)
- Choose level/class (including ranges, from a specific list, etc.)
- Choose prefer stats(e.g. dex, dex OR str)
- Templates: set what things can vary in what way
- When a creature has an ability where a choice must be made, highlight that ability(yellow border, bg, whatever)
- Basic data structures (v3)
1. Number, the number is actually a node in a directed graph, figure out the implementation details, the only valid graph search is to ensure no cycles
- identifier [unique]
- label
- parents (a list of Numbers, we definitely need this, so we can use them in basic calculations)
- children (a list of Numbers)
- type
- baseValue
- computer (a pointer to a predefined function like "add" or a user script, must return a Computation)
- cachedValue
2. Computation
- result
- displayableRepresentation
3. Entity
- A collection of numbers
Technology stack:
1. Front end
- Vue
- Pure CSS: https://purecss.io/
2. Backend
- node.js
- websockets
3. Persistence
- ArangoDB
4. Toolchain
- Vagrant?
- VSCode
- Webpack
Anani's suggested structure v2:
Rule library/registry (list)
Creature library (list)
Authentication and authorization related structures (w/e, not relevant)
Creature
- label
- id
- ruleset (list)
- Pool list
- Conditionals list
Rule
- id
- label
- notes
- tag list
- script(
-- create pool
-- add modifier to pool
-- define function/lookup
-- create conditional
-- create content block
)
Function (always pure?)
- id
- params
- script
Pool (all include user input)
- id
- label
- tag list
- modifier list
- calculated
Modifier
- add = (
-- input?
-- 2 (flat)
-- dex (id)
-- bonusSpells(wis, spelllevel) (function/lookup)
-- ivan.dex (cross entity reference)
)
- multiply
- description
- type (to determine stacking)
- source
Conditional
- name/id
- condition script
- currentState flag
- onTrue script
- onFalse script
Content block:
- user input
- view template?