narrat 2.0.7 → 2.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +785 -0
- package/LICENSE +21 -21
- package/README.md +105 -38
- package/dist/.DS_Store +0 -0
- package/dist/app.vue.d.ts +96 -106
- package/dist/components/MainMenu.vue.d.ts +12 -12
- package/dist/components/Skills.vue.d.ts +22 -22
- package/dist/components/debug/debug-menu.vue.d.ts +48 -48
- package/dist/components/dialog-picture.vue.d.ts +9 -9
- package/dist/components/game-dialog.vue.d.ts +65 -65
- package/dist/components/hud.vue.d.ts +12 -12
- package/dist/components/inventory-ui.vue.d.ts +30 -30
- package/dist/components/loading-bar.vue.d.ts +10 -10
- package/dist/components/menu-buttons.vue.d.ts +26 -26
- package/dist/components/notification-toast.vue.d.ts +6 -6
- package/dist/components/quests-ui.vue.d.ts +20 -20
- package/dist/components/utils/modal.vue.d.ts +6 -6
- package/dist/components/volume-controls.vue.d.ts +7 -7
- package/dist/config.d.ts +151 -151
- package/dist/constants.d.ts +1 -1
- package/dist/data/characters.json +62 -62
- package/dist/data/config.json +182 -182
- package/dist/data/example.rpy +363 -360
- package/dist/data/refactor.rpy +30 -30
- package/dist/defaultConfig.d.ts +2 -2
- package/dist/demo/demo.d.ts +1 -1
- package/dist/dialog-box.vue.d.ts +37 -37
- package/dist/exports/config.d.ts +1 -1
- package/dist/exports/display.d.ts +2 -2
- package/dist/exports/plugins.d.ts +20 -20
- package/dist/fonts/OpenDyslexic.ttf.svg +2326 -2326
- package/dist/gameloop.d.ts +3 -3
- package/dist/img/.DS_Store +0 -0
- package/dist/lib/lib.d.ts +15 -15
- package/dist/main.d.ts +5 -5
- package/dist/music/.DS_Store +0 -0
- package/dist/narrat.es.js +11 -80
- package/dist/narrat.es.js.map +1 -1
- package/dist/narrat.umd.js +77 -77
- package/dist/narrat.umd.js.map +1 -1
- package/dist/plugins/NarratPlugin.d.ts +11 -11
- package/dist/sounds/.DS_Store +0 -0
- package/dist/stores/audio-store.d.ts +12 -12
- package/dist/stores/dialog-store.d.ts +31 -31
- package/dist/stores/hud-stats-store.d.ts +22 -22
- package/dist/stores/inventory-store.d.ts +37 -37
- package/dist/stores/main-store.d.ts +276 -276
- package/dist/stores/notification-store.d.ts +12 -12
- package/dist/stores/quest-log.d.ts +39 -39
- package/dist/stores/rendering-store.d.ts +13 -13
- package/dist/stores/screens-store.d.ts +23 -23
- package/dist/stores/skills.d.ts +36 -36
- package/dist/stores/vm-store.d.ts +148 -148
- package/dist/types/app-types.d.ts +4 -4
- package/dist/types/character-types.d.ts +27 -27
- package/dist/types/dialog-box-types.d.ts +10 -10
- package/dist/types/game-save.d.ts +21 -21
- package/dist/types/parser.d.ts +92 -92
- package/dist/types/state.d.ts +3 -3
- package/dist/utils/ajax.d.ts +1 -1
- package/dist/utils/audio-loader.d.ts +13 -13
- package/dist/utils/characters.d.ts +5 -5
- package/dist/utils/data-helpers.d.ts +19 -19
- package/dist/utils/debounce.d.ts +14 -14
- package/dist/utils/error-handling.d.ts +3 -3
- package/dist/utils/helpers.d.ts +6 -6
- package/dist/utils/images-loader.d.ts +6 -6
- package/dist/utils/logger.d.ts +11 -11
- package/dist/utils/object-iterators.d.ts +8 -8
- package/dist/utils/promises.d.ts +1 -1
- package/dist/utils/randomId.d.ts +1 -1
- package/dist/utils/save-helpers.d.ts +3 -3
- package/dist/utils/skillchecks.d.ts +17 -17
- package/dist/utils/string-helpers.d.ts +3 -3
- package/dist/utils/time-helpers.d.ts +2 -2
- package/dist/vm/commands/arithmetic-commands.d.ts +17 -17
- package/dist/vm/commands/audio-commands.d.ts +8 -8
- package/dist/vm/commands/choice.d.ts +37 -37
- package/dist/vm/commands/clear_dialog.d.ts +2 -2
- package/dist/vm/commands/command-helpers.d.ts +2 -2
- package/dist/vm/commands/command-plugin.d.ts +30 -30
- package/dist/vm/commands/flow-commands.d.ts +14 -14
- package/dist/vm/commands/if.d.ts +10 -10
- package/dist/vm/commands/index.d.ts +2 -2
- package/dist/vm/commands/inventory-commands.d.ts +15 -15
- package/dist/vm/commands/logic-command.d.ts +42 -42
- package/dist/vm/commands/notify.d.ts +4 -4
- package/dist/vm/commands/quest-commands.d.ts +30 -30
- package/dist/vm/commands/screen-commands.d.ts +8 -8
- package/dist/vm/commands/set.d.ts +6 -6
- package/dist/vm/commands/skill-commands.d.ts +33 -33
- package/dist/vm/commands/stats-commands.d.ts +12 -12
- package/dist/vm/commands/string-commands.d.ts +9 -9
- package/dist/vm/commands/text-field.d.ts +7 -7
- package/dist/vm/commands/text.d.ts +13 -13
- package/dist/vm/commands/wait.d.ts +4 -4
- package/dist/vm/vm-helpers.d.ts +16 -16
- package/dist/vm/vm-parser.d.ts +19 -19
- package/dist/vm/vm-parser.test.d.ts +1 -1
- package/dist/vm/vm.d.ts +19 -19
- package/package.json +79 -79
package/dist/data/config.json
CHANGED
|
@@ -1,182 +1,182 @@
|
|
|
1
|
-
{
|
|
2
|
-
"gameTitle": "Narrat Game Example",
|
|
3
|
-
"images": {
|
|
4
|
-
"narrat": "img/backgrounds/narrat.png",
|
|
5
|
-
"map": "img/backgrounds/map.png",
|
|
6
|
-
"shopButton": "img/ui/shop-button.png",
|
|
7
|
-
"parkButton": "img/ui/park-button.png"
|
|
8
|
-
},
|
|
9
|
-
"layout": {
|
|
10
|
-
"backgrounds": {
|
|
11
|
-
"width": 880,
|
|
12
|
-
"height": 720
|
|
13
|
-
},
|
|
14
|
-
"dialogBottomPadding": 70,
|
|
15
|
-
"minTextWidth": 475,
|
|
16
|
-
"mobileDialogHeightPercentage": 60,
|
|
17
|
-
"verticalLayoutThreshold": 1000,
|
|
18
|
-
"portraits": {
|
|
19
|
-
"width": 100,
|
|
20
|
-
"height": 100
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"screens": {
|
|
24
|
-
"default": {
|
|
25
|
-
"background": "narrat"
|
|
26
|
-
},
|
|
27
|
-
"map": {
|
|
28
|
-
"background": "map",
|
|
29
|
-
"buttons": ["shopButton", "parkButton"]
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
"buttons": {
|
|
33
|
-
"shopButton": {
|
|
34
|
-
"enabled": false,
|
|
35
|
-
"background": "shopButton",
|
|
36
|
-
"position": {
|
|
37
|
-
"left": 38,
|
|
38
|
-
"top": 6,
|
|
39
|
-
"width": 255,
|
|
40
|
-
"height": 226
|
|
41
|
-
},
|
|
42
|
-
"action": "shopButton"
|
|
43
|
-
},
|
|
44
|
-
"parkButton": {
|
|
45
|
-
"enabled": false,
|
|
46
|
-
"background": "parkButton",
|
|
47
|
-
"position": {
|
|
48
|
-
"left": 632,
|
|
49
|
-
"top": 86,
|
|
50
|
-
"width": 255,
|
|
51
|
-
"height": 226
|
|
52
|
-
},
|
|
53
|
-
"action": "parkButton"
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
"skills": {
|
|
57
|
-
"agility": {
|
|
58
|
-
"name": "Agility",
|
|
59
|
-
"description": "How good you are at moving around.",
|
|
60
|
-
"startingLevel": 0,
|
|
61
|
-
"icon": "img/skills/agility.jpg",
|
|
62
|
-
"hidden": true
|
|
63
|
-
},
|
|
64
|
-
"haggling": {
|
|
65
|
-
"name": "Haggling",
|
|
66
|
-
"description": "Get good prices on items",
|
|
67
|
-
"icon": "img/skills/logic.jpg",
|
|
68
|
-
"startingLevel": 1
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
"skillChecks": {
|
|
72
|
-
"rollRange": 100,
|
|
73
|
-
"skillMultiplier": 10,
|
|
74
|
-
"failureChance": 1,
|
|
75
|
-
"difficultyText": [
|
|
76
|
-
[0, "Very Easy"],
|
|
77
|
-
[10, "Easy"],
|
|
78
|
-
[30, "Medium"],
|
|
79
|
-
[50, "Hard"],
|
|
80
|
-
[70, "Very Hard"],
|
|
81
|
-
[80, "Extremely Hard"],
|
|
82
|
-
[90, "Near Impossible"]
|
|
83
|
-
]
|
|
84
|
-
},
|
|
85
|
-
"scripts": ["data/example.rpy"],
|
|
86
|
-
"audio": {
|
|
87
|
-
"calm": {
|
|
88
|
-
"loop": true,
|
|
89
|
-
"src": "music/calm.mp3"
|
|
90
|
-
},
|
|
91
|
-
"click": {
|
|
92
|
-
"src": "audio/click.ogg"
|
|
93
|
-
},
|
|
94
|
-
"game_start": {
|
|
95
|
-
"src": "audio/game_start.ogg"
|
|
96
|
-
},
|
|
97
|
-
"failure": {
|
|
98
|
-
"src": "audio/failure.ogg"
|
|
99
|
-
},
|
|
100
|
-
"success": {
|
|
101
|
-
"src": "audio/success.wav"
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
"audioOptions": {
|
|
105
|
-
"volume": 0.5,
|
|
106
|
-
"musicFadeInTime": 0.5,
|
|
107
|
-
"musicFadeInDelay": 0.5,
|
|
108
|
-
"musicFadeOutTime": 0.5
|
|
109
|
-
},
|
|
110
|
-
"notifications": {
|
|
111
|
-
"timeOnScreen": 2.5,
|
|
112
|
-
"alsoPrintInDialogue": true
|
|
113
|
-
},
|
|
114
|
-
"hudStats": {
|
|
115
|
-
"money": {
|
|
116
|
-
"icon": "img/ui/money.png",
|
|
117
|
-
"name": "Money",
|
|
118
|
-
"startingValue": 10,
|
|
119
|
-
"minValue": 0
|
|
120
|
-
},
|
|
121
|
-
"energy": {
|
|
122
|
-
"icon": "img/ui/energy.png",
|
|
123
|
-
"name": "Energy",
|
|
124
|
-
"startingValue": 10,
|
|
125
|
-
"minValue": 0,
|
|
126
|
-
"maxValue": 10
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
"items": {
|
|
130
|
-
"bread": {
|
|
131
|
-
"name": "Bread",
|
|
132
|
-
"description": "A bread in the game.",
|
|
133
|
-
"icon": "img/items/bread.png",
|
|
134
|
-
"onUse": {
|
|
135
|
-
"action": "jump",
|
|
136
|
-
"label": "eat_bread"
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
"book": {
|
|
140
|
-
"name": "Ominous Book",
|
|
141
|
-
"description": "An ominous book. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sed ullamcorper turpis. Aliquam tincidunt dolor sed mollis aliquet. Duis in odio eros. Maecenas sapien arcu, fermentum id tincidunt non, accumsan vel metus. Nullam pretium molestie accumsan. In ut rutrum tellus. Integer vitae nisl eleifend lorem tristique auctor quis sed nulla. Cras gravida viverra tristique. Mauris imperdiet tortor purus, fringilla vehicula metus ullamcorper eget. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla porta imperdiet justo, sed blandit orci. Aenean accumsan hendrerit arcu, laoreet vestibulum turpis vulputate eu. Etiam dignissim nibh dictum pharetra congue. Nulla ultrices, augue a blandit laoreet, metus enim sodales arcu, eget pellentesque lorem justo et ipsum. ",
|
|
142
|
-
"icon": "img/items/book.png",
|
|
143
|
-
"onUse": {
|
|
144
|
-
"action": "run",
|
|
145
|
-
"label": "read_book"
|
|
146
|
-
},
|
|
147
|
-
"tag": "always_interactable"
|
|
148
|
-
}
|
|
149
|
-
},
|
|
150
|
-
"interactionTags": {
|
|
151
|
-
"default": {
|
|
152
|
-
"onlyInteractOutsideOfScripts": true
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
"quests": {
|
|
156
|
-
"breadShopping": {
|
|
157
|
-
"title": "Bread Shopping",
|
|
158
|
-
"description": "The helper cat asked you to buy bread for him.",
|
|
159
|
-
"objectives": {
|
|
160
|
-
"bread": {
|
|
161
|
-
"description": "Buy bread for the helper cat."
|
|
162
|
-
},
|
|
163
|
-
"delivery": {
|
|
164
|
-
"hidden": true,
|
|
165
|
-
"description": "Deliver the bread to the helper cat."
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
},
|
|
170
|
-
"audioTriggers": {
|
|
171
|
-
"onPlayerAnswered": "click",
|
|
172
|
-
"onPressStart": "game_start",
|
|
173
|
-
"onSkillCheckFailure": "failure",
|
|
174
|
-
"onSkillCheckSuccess": "success"
|
|
175
|
-
},
|
|
176
|
-
"menuButtons": {
|
|
177
|
-
"menu": {
|
|
178
|
-
"text": "Menu",
|
|
179
|
-
"cssId": "my-custom-id"
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"gameTitle": "Narrat Game Example",
|
|
3
|
+
"images": {
|
|
4
|
+
"narrat": "img/backgrounds/narrat.png",
|
|
5
|
+
"map": "img/backgrounds/map.png",
|
|
6
|
+
"shopButton": "img/ui/shop-button.png",
|
|
7
|
+
"parkButton": "img/ui/park-button.png"
|
|
8
|
+
},
|
|
9
|
+
"layout": {
|
|
10
|
+
"backgrounds": {
|
|
11
|
+
"width": 880,
|
|
12
|
+
"height": 720
|
|
13
|
+
},
|
|
14
|
+
"dialogBottomPadding": 70,
|
|
15
|
+
"minTextWidth": 475,
|
|
16
|
+
"mobileDialogHeightPercentage": 60,
|
|
17
|
+
"verticalLayoutThreshold": 1000,
|
|
18
|
+
"portraits": {
|
|
19
|
+
"width": 100,
|
|
20
|
+
"height": 100
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"screens": {
|
|
24
|
+
"default": {
|
|
25
|
+
"background": "narrat"
|
|
26
|
+
},
|
|
27
|
+
"map": {
|
|
28
|
+
"background": "map",
|
|
29
|
+
"buttons": ["shopButton", "parkButton"]
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"buttons": {
|
|
33
|
+
"shopButton": {
|
|
34
|
+
"enabled": false,
|
|
35
|
+
"background": "shopButton",
|
|
36
|
+
"position": {
|
|
37
|
+
"left": 38,
|
|
38
|
+
"top": 6,
|
|
39
|
+
"width": 255,
|
|
40
|
+
"height": 226
|
|
41
|
+
},
|
|
42
|
+
"action": "shopButton"
|
|
43
|
+
},
|
|
44
|
+
"parkButton": {
|
|
45
|
+
"enabled": false,
|
|
46
|
+
"background": "parkButton",
|
|
47
|
+
"position": {
|
|
48
|
+
"left": 632,
|
|
49
|
+
"top": 86,
|
|
50
|
+
"width": 255,
|
|
51
|
+
"height": 226
|
|
52
|
+
},
|
|
53
|
+
"action": "parkButton"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"skills": {
|
|
57
|
+
"agility": {
|
|
58
|
+
"name": "Agility",
|
|
59
|
+
"description": "How good you are at moving around.",
|
|
60
|
+
"startingLevel": 0,
|
|
61
|
+
"icon": "img/skills/agility.jpg",
|
|
62
|
+
"hidden": true
|
|
63
|
+
},
|
|
64
|
+
"haggling": {
|
|
65
|
+
"name": "Haggling",
|
|
66
|
+
"description": "Get good prices on items",
|
|
67
|
+
"icon": "img/skills/logic.jpg",
|
|
68
|
+
"startingLevel": 1
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"skillChecks": {
|
|
72
|
+
"rollRange": 100,
|
|
73
|
+
"skillMultiplier": 10,
|
|
74
|
+
"failureChance": 1,
|
|
75
|
+
"difficultyText": [
|
|
76
|
+
[0, "Very Easy"],
|
|
77
|
+
[10, "Easy"],
|
|
78
|
+
[30, "Medium"],
|
|
79
|
+
[50, "Hard"],
|
|
80
|
+
[70, "Very Hard"],
|
|
81
|
+
[80, "Extremely Hard"],
|
|
82
|
+
[90, "Near Impossible"]
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
"scripts": ["data/example.rpy"],
|
|
86
|
+
"audio": {
|
|
87
|
+
"calm": {
|
|
88
|
+
"loop": true,
|
|
89
|
+
"src": "music/calm.mp3"
|
|
90
|
+
},
|
|
91
|
+
"click": {
|
|
92
|
+
"src": "audio/click.ogg"
|
|
93
|
+
},
|
|
94
|
+
"game_start": {
|
|
95
|
+
"src": "audio/game_start.ogg"
|
|
96
|
+
},
|
|
97
|
+
"failure": {
|
|
98
|
+
"src": "audio/failure.ogg"
|
|
99
|
+
},
|
|
100
|
+
"success": {
|
|
101
|
+
"src": "audio/success.wav"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"audioOptions": {
|
|
105
|
+
"volume": 0.5,
|
|
106
|
+
"musicFadeInTime": 0.5,
|
|
107
|
+
"musicFadeInDelay": 0.5,
|
|
108
|
+
"musicFadeOutTime": 0.5
|
|
109
|
+
},
|
|
110
|
+
"notifications": {
|
|
111
|
+
"timeOnScreen": 2.5,
|
|
112
|
+
"alsoPrintInDialogue": true
|
|
113
|
+
},
|
|
114
|
+
"hudStats": {
|
|
115
|
+
"money": {
|
|
116
|
+
"icon": "img/ui/money.png",
|
|
117
|
+
"name": "Money",
|
|
118
|
+
"startingValue": 10,
|
|
119
|
+
"minValue": 0
|
|
120
|
+
},
|
|
121
|
+
"energy": {
|
|
122
|
+
"icon": "img/ui/energy.png",
|
|
123
|
+
"name": "Energy",
|
|
124
|
+
"startingValue": 10,
|
|
125
|
+
"minValue": 0,
|
|
126
|
+
"maxValue": 10
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"items": {
|
|
130
|
+
"bread": {
|
|
131
|
+
"name": "Bread",
|
|
132
|
+
"description": "A bread in the game.",
|
|
133
|
+
"icon": "img/items/bread.png",
|
|
134
|
+
"onUse": {
|
|
135
|
+
"action": "jump",
|
|
136
|
+
"label": "eat_bread"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"book": {
|
|
140
|
+
"name": "Ominous Book",
|
|
141
|
+
"description": "An ominous book. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque sed ullamcorper turpis. Aliquam tincidunt dolor sed mollis aliquet. Duis in odio eros. Maecenas sapien arcu, fermentum id tincidunt non, accumsan vel metus. Nullam pretium molestie accumsan. In ut rutrum tellus. Integer vitae nisl eleifend lorem tristique auctor quis sed nulla. Cras gravida viverra tristique. Mauris imperdiet tortor purus, fringilla vehicula metus ullamcorper eget. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla porta imperdiet justo, sed blandit orci. Aenean accumsan hendrerit arcu, laoreet vestibulum turpis vulputate eu. Etiam dignissim nibh dictum pharetra congue. Nulla ultrices, augue a blandit laoreet, metus enim sodales arcu, eget pellentesque lorem justo et ipsum. ",
|
|
142
|
+
"icon": "img/items/book.png",
|
|
143
|
+
"onUse": {
|
|
144
|
+
"action": "run",
|
|
145
|
+
"label": "read_book"
|
|
146
|
+
},
|
|
147
|
+
"tag": "always_interactable"
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"interactionTags": {
|
|
151
|
+
"default": {
|
|
152
|
+
"onlyInteractOutsideOfScripts": true
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"quests": {
|
|
156
|
+
"breadShopping": {
|
|
157
|
+
"title": "Bread Shopping",
|
|
158
|
+
"description": "The helper cat asked you to buy bread for him.",
|
|
159
|
+
"objectives": {
|
|
160
|
+
"bread": {
|
|
161
|
+
"description": "Buy bread for the helper cat."
|
|
162
|
+
},
|
|
163
|
+
"delivery": {
|
|
164
|
+
"hidden": true,
|
|
165
|
+
"description": "Deliver the bread to the helper cat."
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"audioTriggers": {
|
|
171
|
+
"onPlayerAnswered": "click",
|
|
172
|
+
"onPressStart": "game_start",
|
|
173
|
+
"onSkillCheckFailure": "failure",
|
|
174
|
+
"onSkillCheckSuccess": "success"
|
|
175
|
+
},
|
|
176
|
+
"menuButtons": {
|
|
177
|
+
"menu": {
|
|
178
|
+
"text": "Menu",
|
|
179
|
+
"cssId": "my-custom-id"
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|