narrat 2.0.12 → 2.1.0
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/README.md +15 -0
- package/dist/components/hud.vue.d.ts +3 -1
- package/dist/config.d.ts +7 -0
- package/dist/img/backgrounds/rpg.png +0 -0
- package/dist/img/enemies/goblin.png +0 -0
- package/dist/img/enemies/skeleton.png +0 -0
- package/dist/img/enemies/slime.png +0 -0
- package/dist/img/levels/cave.png +0 -0
- package/dist/img/levels/dungeon.png +0 -0
- package/dist/img/levels/dungeon_F.png +0 -0
- package/dist/img/levels/dungeon_FL.png +0 -0
- package/dist/img/levels/dungeon_FR.png +0 -0
- package/dist/img/levels/dungeon_FRL.png +0 -0
- package/dist/img/levels/dungeon_LR.png +0 -0
- package/dist/img/levels/grass.png +0 -0
- package/dist/img/players/wizard.png +0 -0
- package/dist/img/ui/front.png +0 -0
- package/dist/img/ui/left.png +0 -0
- package/dist/img/ui/right.png +0 -0
- package/dist/img/ui/start.png +0 -0
- package/dist/narrat.es.js +30719 -33126
- package/dist/narrat.es.js.map +1 -1
- package/dist/narrat.umd.js +92 -104
- package/dist/narrat.umd.js.map +1 -1
- package/dist/stores/main-store.d.ts +8 -0
- package/dist/stores/screens-store.d.ts +1 -1
- package/dist/stores/skills.d.ts +4 -0
- package/dist/{lib.css → style.css} +1 -1
- package/dist/types/app-types.d.ts +1 -0
- package/dist/types/parser.d.ts +1 -1
- package/dist/vm/commands/arithmetic-commands.d.ts +6 -0
- package/dist/vm/commands/command-helpers.d.ts +1 -0
- package/dist/vm/commands/flow-commands.d.ts +3 -0
- package/dist/vm/commands/math-commands.d.ts +14 -0
- package/dist/vm/commands/random-commands.d.ts +10 -0
- package/dist/vm/commands/skill-commands.d.ts +12 -0
- package/dist/vm/vm-helpers.d.ts +2 -0
- package/dist/vm/vm.d.ts +0 -1
- package/package.json +5 -2
- package/dist/audio/click.ogg +0 -0
- package/dist/audio/failure.ogg +0 -0
- package/dist/audio/game_start.ogg +0 -0
- package/dist/audio/success.wav +0 -0
- package/dist/audio.7z +0 -0
- package/dist/data/characters.json +0 -62
- package/dist/data/config.json +0 -187
- package/dist/data/example.rpy +0 -369
- package/dist/data/refactor.rpy +0 -31
- package/dist/fonts/OpenDyslexic.ttf.eot +0 -0
- package/dist/fonts/OpenDyslexic.ttf.svg +0 -2326
- package/dist/fonts/OpenDyslexic.ttf.woff +0 -0
- package/dist/img/characters/music_cat.jpeg +0 -0
- package/dist/music/calm.mp3 +0 -0
package/README.md
CHANGED
|
@@ -31,6 +31,12 @@ Narrat is written in [TypeScript](https://www.typescriptlang.org/). It uses the
|
|
|
31
31
|
|
|
32
32
|
This starts the engine on the demo page with the `example.rpy` demo script loaded for testing.
|
|
33
33
|
|
|
34
|
+
### Multiple demo games
|
|
35
|
+
|
|
36
|
+
There are multiple demo games and it's possible to add new ones. For example `npm run rpg` will run the `rpg` demo. Demos are in the `examples` folder.
|
|
37
|
+
|
|
38
|
+
Running a specific demo is done by changing an environment variables. See the scripts in `package.json` for how to run a specific demo.
|
|
39
|
+
|
|
34
40
|
### Available npm commands
|
|
35
41
|
|
|
36
42
|
- `start`: Start the demo for development
|
|
@@ -103,3 +109,12 @@ Engine code can access the config with the `getConfig()` function.
|
|
|
103
109
|
There is now a plugin system developers can use to add new functionality to narrat (more documentation soon). See the [narrat-bitsy](https://github.com/liana-pigeot/narrat-bitsy) plugin for an example.
|
|
104
110
|
|
|
105
111
|
(Note: The narrat-bitsy plugin hasn't been updated for 2.0.0 and might be a bit out of date).
|
|
112
|
+
|
|
113
|
+
## Assets used in demo games
|
|
114
|
+
|
|
115
|
+
[Pointing arrows from OpenGameArt](https://opengameart.org/content/pointing-arrows)
|
|
116
|
+
[UI button from OpenGameArt](https://opengameart.org/content/buttons-and-frame)
|
|
117
|
+
[10 Basic RPG enemies](https://opengameart.org/content/10-basic-rpg-enemies)
|
|
118
|
+
[RPG Battle backgrounds from OpenGameArt](https://opengameart.org/content/backgrounds-3)
|
|
119
|
+
|
|
120
|
+
The rest is handmade.
|
|
@@ -8,5 +8,7 @@ declare const _default: import("vue").DefineComponent<{}, {}, {}, {
|
|
|
8
8
|
hudStyle(): any;
|
|
9
9
|
layoutMode: () => "horizontal" | "vertical";
|
|
10
10
|
hudStats: () => HudStatsState;
|
|
11
|
-
}, {
|
|
11
|
+
}, {
|
|
12
|
+
getStatImage(key: string): string;
|
|
13
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
12
14
|
export default _default;
|
package/dist/config.d.ts
CHANGED
|
@@ -2,15 +2,18 @@ export declare function setConfig(conf: Config): void;
|
|
|
2
2
|
export declare function getConfig(): Config;
|
|
3
3
|
export declare function getSkillConfig(id: string): SkillData;
|
|
4
4
|
export declare function getImageUrl(imageKeyOrUrl: string): string;
|
|
5
|
+
export declare function getAssetUrl(assetPath: string): string;
|
|
5
6
|
export declare function getButtonConfig(button: string): ButtonConfig;
|
|
6
7
|
export declare function getItemConfig(id: string): ItemData;
|
|
7
8
|
export declare function getQuestConfig(questId: string): QuestData;
|
|
8
9
|
export declare function getObjectiveConfig(quest: string, objectiveId: string): ObjectiveData;
|
|
9
10
|
export interface AppOptions {
|
|
11
|
+
baseAssetsPath?: string;
|
|
10
12
|
logging: boolean;
|
|
11
13
|
debug: boolean;
|
|
12
14
|
}
|
|
13
15
|
export interface Config {
|
|
16
|
+
baseAssetsPath?: string;
|
|
14
17
|
gameTitle: string;
|
|
15
18
|
images: {
|
|
16
19
|
[key: string]: string;
|
|
@@ -144,6 +147,10 @@ export interface ButtonConfig {
|
|
|
144
147
|
width?: number;
|
|
145
148
|
height?: number;
|
|
146
149
|
};
|
|
150
|
+
anchor?: {
|
|
151
|
+
x: number;
|
|
152
|
+
y: number;
|
|
153
|
+
};
|
|
147
154
|
action: string;
|
|
148
155
|
}
|
|
149
156
|
export interface InlineButtonConfig extends ButtonConfig {
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|