@vnejs/docs 0.2.65 → 0.2.67
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 +35 -35
- package/architecture/backends.md +18 -0
- package/architecture/build.md +37 -0
- package/architecture/bundles.md +20 -0
- package/architecture/cli.md +25 -0
- package/architecture/compatibility.md +22 -0
- package/architecture/configs.md +19 -0
- package/architecture/contracts.md +30 -0
- package/architecture/dependencies.md +55 -0
- package/architecture/editor.md +7 -0
- package/architecture/games.md +38 -0
- package/architecture/helpers.md +14 -0
- package/architecture/model.md +43 -0
- package/architecture/modules.md +87 -0
- package/architecture/packages.md +43 -0
- package/architecture/plugins.md +36 -0
- package/architecture/uis.md +23 -0
- package/changelog/0.2.18.md +7 -0
- package/changelog/0.2.19.md +14 -0
- package/changelog/0.2.20.md +10 -0
- package/changelog/0.2.21.md +5 -0
- package/changelog/0.2.22.md +11 -0
- package/changelog/0.2.23.md +4 -0
- package/changelog/0.2.25.md +6 -0
- package/changelog/0.2.26.md +12 -0
- package/changelog/0.2.29.md +10 -0
- package/changelog/0.2.31.md +5 -0
- package/changelog/0.2.32.md +3 -0
- package/changelog/0.2.33.md +5 -0
- package/changelog/0.2.34.md +8 -0
- package/changelog/0.2.35.md +33 -0
- package/changelog/0.2.36.md +10 -0
- package/changelog/0.2.38.md +19 -0
- package/changelog/0.2.39.md +16 -0
- package/changelog/0.2.40.md +9 -0
- package/changelog/0.2.42.md +3 -0
- package/changelog/0.2.43.md +10 -0
- package/changelog/0.2.46.md +3 -0
- package/changelog/0.2.47.md +25 -0
- package/changelog/0.2.49.md +3 -0
- package/changelog/0.2.50.md +6 -0
- package/changelog/0.2.51.md +6 -0
- package/changelog/0.2.52.md +5 -0
- package/changelog/0.2.53.md +12 -0
- package/changelog/0.2.55.md +19 -0
- package/changelog/0.2.56.md +11 -0
- package/changelog/0.2.57.md +7 -0
- package/changelog/0.2.58.md +8 -0
- package/changelog/0.2.59.md +6 -0
- package/changelog/0.2.60.md +5 -0
- package/changelog/0.2.61.md +11 -0
- package/changelog/0.2.62.md +8 -0
- package/changelog/0.2.63.md +4 -0
- package/changelog/0.2.64.md +4 -0
- package/changelog/0.2.65.md +3 -0
- package/changelog/0.2.66.md +5 -0
- package/changelog/README.md +43 -0
- package/manifest.json +66 -5
- package/package.json +6 -4
- package/plugins/ai/ai.md +29 -29
- package/plugins/ai/checkers.md +26 -26
- package/plugins/audio/ambient.md +20 -20
- package/plugins/audio/audio.md +40 -40
- package/plugins/audio/music.md +20 -20
- package/plugins/audio/sound.md +20 -20
- package/plugins/audio/voice.md +23 -23
- package/plugins/canvas/bg.md +44 -44
- package/plugins/canvas/bg.speak.md +34 -34
- package/plugins/canvas/fill.md +33 -33
- package/plugins/canvas/layer.md +35 -35
- package/plugins/canvas/sprite.md +46 -46
- package/plugins/canvas/sprite.speak.md +33 -33
- package/plugins/canvas/text.md +37 -37
- package/plugins/canvas/video.md +37 -37
- package/plugins/canvas.layers/bl.md +33 -33
- package/plugins/canvas.layers/fl.md +33 -33
- package/plugins/canvas.layers/ml.md +33 -33
- package/plugins/canvas.layers/ul.md +32 -32
- package/plugins/canvas.props/animation.md +25 -25
- package/plugins/canvas.props/clip.md +22 -22
- package/plugins/canvas.props/filters.md +20 -20
- package/plugins/canvas.props/mask.md +23 -23
- package/plugins/canvas.props/scale.md +20 -20
- package/plugins/common/grid.md +23 -23
- package/plugins/common/turn.md +18 -18
- package/plugins/controls/controls.md +31 -31
- package/plugins/controls/cursor.md +54 -54
- package/plugins/controls/gamepad.md +56 -56
- package/plugins/controls/keyboard.md +17 -17
- package/plugins/core/components.md +28 -28
- package/plugins/core/interact.md +26 -26
- package/plugins/core/logs.md +28 -28
- package/plugins/core/media.md +38 -38
- package/plugins/core/memory.md +28 -28
- package/plugins/core/platforms.md +19 -19
- package/plugins/core/scenario.md +48 -48
- package/plugins/core/settings.md +24 -24
- package/plugins/core/stack.md +39 -39
- package/plugins/core/state.md +30 -30
- package/plugins/core/storage.md +56 -56
- package/plugins/core/system.md +37 -37
- package/plugins/core/vendors.md +19 -19
- package/plugins/entities/entities.md +16 -16
- package/plugins/entities/wallet.md +27 -27
- package/plugins/font/montserrat.md +16 -16
- package/plugins/game/checkers.md +38 -38
- package/plugins/platform/android.md +17 -17
- package/plugins/platform/electron.md +21 -21
- package/plugins/platform/metric.md +23 -23
- package/plugins/rpg/damage.md +22 -22
- package/plugins/rpg/hit.md +24 -24
- package/plugins/rpg/skills.md +26 -26
- package/plugins/save/auto.md +26 -26
- package/plugins/save/continue.md +23 -23
- package/plugins/save/quick.md +24 -24
- package/plugins/save/save.md +37 -37
- package/plugins/scales/health.md +17 -17
- package/plugins/scales/mana.md +17 -17
- package/plugins/scales/scales.md +31 -31
- package/plugins/scenario/autoread.md +36 -36
- package/plugins/scenario/choose.md +74 -65
- package/plugins/scenario/fastforward.md +46 -46
- package/plugins/scenario/history.md +41 -41
- package/plugins/scenario/pause.md +27 -27
- package/plugins/scenario/point_and_click.md +51 -51
- package/plugins/scenario/qte.md +54 -54
- package/plugins/scenario/random.md +17 -17
- package/plugins/settings/filter.md +19 -19
- package/plugins/settings/potato.md +22 -22
- package/plugins/settings/ratio.md +19 -19
- package/plugins/settings/textsize.md +19 -19
- package/plugins/settings/volume.md +21 -21
- package/plugins/text/inject.md +22 -22
- package/plugins/text/locs.md +36 -36
- package/plugins/text/meet.md +19 -19
- package/plugins/text/smooth.md +33 -33
- package/plugins/text/text.md +76 -69
- package/plugins/text/wall.md +20 -20
- package/plugins/time/date.md +22 -22
- package/plugins/time/time.md +23 -23
- package/plugins/vars/counters.md +28 -28
- package/plugins/vars/flags.md +24 -24
- package/plugins/vars/vars.md +29 -29
- package/plugins/views/achievement.md +44 -44
- package/plugins/views/comment.md +31 -31
- package/plugins/views/controls.hints.md +34 -34
- package/plugins/views/cursor.md +19 -19
- package/plugins/views/fps.md +33 -33
- package/plugins/views/gamepad.debug.md +32 -32
- package/plugins/views/settings.md +39 -39
- package/plugins/views/video.md +37 -37
- package/plugins/views.scenario/choose.md +41 -41
- package/plugins/views.scenario/interface.controls.md +31 -31
- package/plugins/views.scenario/interface.fastforward.md +29 -29
- package/plugins/views.scenario/interface.md +74 -74
- package/plugins/views.scenario/point_and_click.md +39 -39
- package/plugins/views.scenario/qte.md +51 -51
- package/plugins/views.screens/checkers.md +35 -35
- package/plugins/views.screens/confirm.md +35 -35
- package/plugins/views.screens/credits.md +31 -31
- package/plugins/views.screens/disclaimer.md +42 -42
- package/plugins/views.screens/eula.md +37 -37
- package/plugins/views.screens/gallery.full.md +41 -41
- package/plugins/views.screens/gallery.md +75 -75
- package/plugins/views.screens/gamemenu.md +41 -41
- package/plugins/views.screens/history.md +39 -39
- package/plugins/views.screens/intro.md +32 -32
- package/plugins/views.screens/loading.md +30 -30
- package/plugins/views.screens/mainmenu.md +49 -49
- package/plugins/views.screens/mainmenu.socials.md +25 -25
- package/plugins/views.screens/save.md +66 -66
- package/plugins/views.screens/settings.defaults.md +37 -37
- package/plugins/views.screens/settings.md +40 -40
- package/scenario.catalog/README.md +13 -13
- package/scenario.catalog/index.md +35 -35
- package/scenario.catalog/stubs/achievement.md +4 -4
- package/scenario.catalog/stubs/audio.ambient.md +4 -4
- package/scenario.catalog/stubs/audio.music.md +4 -4
- package/scenario.catalog/stubs/audio.sound.md +4 -4
- package/scenario.catalog/stubs/audio.voice.md +4 -4
- package/scenario.catalog/stubs/bl.animation.md +5 -5
- package/scenario.catalog/stubs/bl.bg.md +5 -5
- package/scenario.catalog/stubs/bl.clip.md +5 -5
- package/scenario.catalog/stubs/bl.fill.md +5 -5
- package/scenario.catalog/stubs/bl.filter.md +5 -5
- package/scenario.catalog/stubs/bl.mask.md +5 -5
- package/scenario.catalog/stubs/bl.scale.md +5 -5
- package/scenario.catalog/stubs/bl.sprite.md +5 -5
- package/scenario.catalog/stubs/bl.text.md +5 -5
- package/scenario.catalog/stubs/bl.video.md +5 -5
- package/scenario.catalog/stubs/choose.block.md +7 -7
- package/scenario.catalog/stubs/choose.md +4 -4
- package/scenario.catalog/stubs/choose.option.md +7 -7
- package/scenario.catalog/stubs/comment.md +5 -5
- package/scenario.catalog/stubs/counter.md +5 -5
- package/scenario.catalog/stubs/credits.md +4 -4
- package/scenario.catalog/stubs/date.md +4 -4
- package/scenario.catalog/stubs/disclaimer.md +5 -5
- package/scenario.catalog/stubs/fl.animation.md +5 -5
- package/scenario.catalog/stubs/fl.bg.md +5 -5
- package/scenario.catalog/stubs/fl.clip.md +5 -5
- package/scenario.catalog/stubs/fl.fill.md +5 -5
- package/scenario.catalog/stubs/fl.filter.md +5 -5
- package/scenario.catalog/stubs/fl.mask.md +5 -5
- package/scenario.catalog/stubs/fl.scale.md +5 -5
- package/scenario.catalog/stubs/fl.sprite.md +5 -5
- package/scenario.catalog/stubs/fl.text.md +5 -5
- package/scenario.catalog/stubs/fl.video.md +5 -5
- package/scenario.catalog/stubs/flag.md +13 -13
- package/scenario.catalog/stubs/interface.md +4 -4
- package/scenario.catalog/stubs/intro.md +4 -4
- package/scenario.catalog/stubs/mainmenu.md +4 -4
- package/scenario.catalog/stubs/ml.animation.md +5 -5
- package/scenario.catalog/stubs/ml.bg.md +5 -5
- package/scenario.catalog/stubs/ml.clip.md +5 -5
- package/scenario.catalog/stubs/ml.fill.md +5 -5
- package/scenario.catalog/stubs/ml.filter.md +5 -5
- package/scenario.catalog/stubs/ml.mask.md +5 -5
- package/scenario.catalog/stubs/ml.scale.md +5 -5
- package/scenario.catalog/stubs/ml.sprite.md +5 -5
- package/scenario.catalog/stubs/ml.text.md +5 -5
- package/scenario.catalog/stubs/ml.video.md +5 -5
- package/scenario.catalog/stubs/other.md +6 -6
- package/scenario.catalog/stubs/pause.md +5 -5
- package/scenario.catalog/stubs/point-and-click.block.md +4 -4
- package/scenario.catalog/stubs/point-and-click.md +4 -4
- package/scenario.catalog/stubs/point-and-click.option.md +4 -4
- package/scenario.catalog/stubs/qte.md +4 -4
- package/scenario.catalog/stubs/random.md +4 -4
- package/scenario.catalog/stubs/random.option.md +4 -4
- package/scenario.catalog/stubs/save.auto.md +4 -4
- package/scenario.catalog/stubs/save.md +5 -5
- package/scenario.catalog/stubs/scenario.md +4 -4
- package/scenario.catalog/stubs/settings.defaults.md +4 -4
- package/scenario.catalog/stubs/stack.md +4 -4
- package/scenario.catalog/stubs/text.meet.md +4 -4
- package/scenario.catalog/stubs/text.wall.md +4 -4
- package/scenario.catalog/stubs/time.md +4 -4
- package/scenario.catalog/stubs/ul.animation.md +5 -5
- package/scenario.catalog/stubs/ul.bg.md +5 -5
- package/scenario.catalog/stubs/ul.clip.md +5 -5
- package/scenario.catalog/stubs/ul.fill.md +5 -5
- package/scenario.catalog/stubs/ul.filter.md +5 -5
- package/scenario.catalog/stubs/ul.mask.md +5 -5
- package/scenario.catalog/stubs/ul.scale.md +5 -5
- package/scenario.catalog/stubs/ul.sprite.md +5 -5
- package/scenario.catalog/stubs/ul.text.md +5 -5
- package/scenario.catalog/stubs/video.md +4 -4
- package/scenario.catalog/stubs/wallet.md +4 -4
- package/scenario.guide/README.md +38 -38
- package/scenario.guide/audio.md +11 -11
- package/scenario.guide/canvas.md +23 -23
- package/scenario.guide/choose.md +28 -28
- package/scenario.guide/dialogue.md +23 -23
- package/scenario.guide/flow.md +21 -21
- package/scenario.guide/point-and-click.md +12 -12
- package/scenario.guide/qte-random.md +20 -20
- package/scenario.guide/vars.md +19 -19
- package/scenario.guide/views.md +20 -20
- package/CHANGELOG.md +0 -387
- package/architecture.md +0 -566
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
| | |
|
|
4
4
|
| -------------- | --------------------------------------------------- |
|
|
5
|
-
|
|
|
6
|
-
|
|
|
5
|
+
| Type | `module` (`$`) |
|
|
6
|
+
| Signature | `$ wallet <action> …` |
|
|
7
7
|
| Actions / args | add, set, reset |
|
|
8
8
|
| Plugin doc | [entities/wallet.md](../plugins/entities/wallet.md) |
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Examples
|
|
11
11
|
|
|
12
12
|
```vne
|
|
13
13
|
$ wallet add …
|
|
14
14
|
$ wallet reset
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
Source of truth: `SCENARIO_COMMANDS`
|
|
17
|
+
Source of truth: `SCENARIO_COMMANDS` in the matching `contracts/**/commands.ts`.
|
package/scenario.guide/README.md
CHANGED
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Scenario guide (variant B)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Author layer for writing `.vne`. Syntax, examples, and common patterns live here. Plugin events and modules are in [`../plugins/`](../plugins/).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The other entry is [`../scenario.catalog/`](../scenario.catalog/) (the command index from `SCENARIO_COMMANDS`).
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Contents
|
|
8
8
|
|
|
9
|
-
|
|
|
9
|
+
| Page | Topic |
|
|
10
10
|
| ------------------------------------------ | ----------------------------------------------- |
|
|
11
|
-
| [dialogue.md](./dialogue.md) |
|
|
11
|
+
| [dialogue.md](./dialogue.md) | Lines, speakers, wall / meet |
|
|
12
12
|
| [flow.md](./flow.md) | `stack`, `scenario`, `pause`, `save` |
|
|
13
13
|
| [vars.md](./vars.md) | `flag`, `counter` |
|
|
14
14
|
| [choose.md](./choose.md) | `% choose` |
|
|
15
15
|
| [point-and-click.md](./point-and-click.md) | `% point-and-click` |
|
|
16
16
|
| [qte-random.md](./qte-random.md) | `% qte`, `% random` |
|
|
17
17
|
| [audio.md](./audio.md) | `$ audio.*` |
|
|
18
|
-
| [canvas.md](./canvas.md) |
|
|
18
|
+
| [canvas.md](./canvas.md) | Layers `bl` / `fl` / `ml` / `ul` |
|
|
19
19
|
| [views.md](./views.md) | interface, screens, video, comment, achievement |
|
|
20
20
|
|
|
21
|
-
##
|
|
21
|
+
## File shape
|
|
22
22
|
|
|
23
23
|
```vne
|
|
24
24
|
import tests/stack
|
|
25
25
|
|
|
26
26
|
label init:
|
|
27
|
-
"
|
|
27
|
+
"Opening line"
|
|
28
28
|
$ stack jump prologue/1
|
|
29
29
|
|
|
30
30
|
label prologue/1:
|
|
31
|
-
fl "
|
|
31
|
+
fl "Character line"
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
- **`import <path>`** —
|
|
35
|
-
- **`label <name>:`** —
|
|
36
|
-
-
|
|
34
|
+
- **`import <path>`** — load another `.vne` (path without the extension, relative to the scenario folder).
|
|
35
|
+
- **`label <name>:`** — a label. Jump to it with `$ stack jump/call` and `$ scenario goto`.
|
|
36
|
+
- Indent is the body of a block (`% choose`, `% flag`, …).
|
|
37
37
|
|
|
38
|
-
##
|
|
38
|
+
## Line kinds
|
|
39
39
|
|
|
40
|
-
|
|
|
41
|
-
| ------ |
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
40
|
+
| Kind | Example | Meaning |
|
|
41
|
+
| ------ | ----------------------- | ------------------------------------------- |
|
|
42
|
+
| Dialog | `"Text"` or `fl "Text"` | Module `other` (no `$`) |
|
|
43
|
+
| Module | `$ flag seen` | Prefix `$` calls a module |
|
|
44
|
+
| Block | `% choose` | Prefix `%` is a block with an indented body |
|
|
45
45
|
|
|
46
|
-
##
|
|
46
|
+
## Line keywords
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
After `|` on the same line (shared by the scenario):
|
|
49
49
|
|
|
50
|
-
| Keyword |
|
|
51
|
-
| ------------------ |
|
|
52
|
-
| `async` |
|
|
53
|
-
| `autonext` |
|
|
54
|
-
| `skip-if-possible` |
|
|
50
|
+
| Keyword | Meaning |
|
|
51
|
+
| ------------------ | ---------------------------------------- |
|
|
52
|
+
| `async` | Do not block advance while the line runs |
|
|
53
|
+
| `autonext` | Advance automatically after the line |
|
|
54
|
+
| `skip-if-possible` | Skip the line when the engine can |
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
Domain keywords live in plugins, for example `| global` (vars), `| qte-fallback` (choose↔qte), `| extend` (text).
|
|
57
57
|
|
|
58
|
-
##
|
|
58
|
+
## Indent props
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
Blocks and options often use props:
|
|
61
61
|
|
|
62
62
|
```vne
|
|
63
|
-
% choose.option "
|
|
63
|
+
% choose.option "Look around"
|
|
64
64
|
hided: $ flag seen
|
|
65
65
|
disabled: $ counter n > 3
|
|
66
66
|
qte: easy
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
- **`hided:`** —
|
|
70
|
-
- **`disabled:`** —
|
|
71
|
-
-
|
|
69
|
+
- **`hided:`** — hide the option when the condition is true.
|
|
70
|
+
- **`disabled:`** — show the option, but keep it unavailable.
|
|
71
|
+
- The condition is usually `$ flag …` / `$ counter …` (sometimes with `| global`).
|
|
72
72
|
|
|
73
|
-
##
|
|
73
|
+
## Comments
|
|
74
74
|
|
|
75
75
|
```vne
|
|
76
|
-
#
|
|
77
|
-
//
|
|
76
|
+
# comment
|
|
77
|
+
// also a comment
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
-
##
|
|
80
|
+
## Next
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
Start with [dialogue.md](./dialogue.md) and [flow.md](./flow.md). Then branches ([choose.md](./choose.md)) and media ([canvas.md](./canvas.md), [audio.md](./audio.md)).
|
package/scenario.guide/audio.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Audio: $ audio.*
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Four channels share the same actions:
|
|
4
4
|
|
|
5
|
-
|
|
|
6
|
-
| ----------------- |
|
|
7
|
-
| `$ audio.music` |
|
|
8
|
-
| `$ audio.ambient` |
|
|
9
|
-
| `$ audio.sound` | SFX
|
|
10
|
-
| `$ audio.voice` |
|
|
5
|
+
| Module | Role |
|
|
6
|
+
| ----------------- | ----------- |
|
|
7
|
+
| `$ audio.music` | Music / BGM |
|
|
8
|
+
| `$ audio.ambient` | Ambient |
|
|
9
|
+
| `$ audio.sound` | SFX |
|
|
10
|
+
| `$ audio.voice` | Voice |
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## Actions
|
|
13
13
|
|
|
14
14
|
`play`, `stop`, `pause`, `resume`, `volume`
|
|
15
15
|
|
|
@@ -22,8 +22,8 @@ $ audio.music volume 0.5
|
|
|
22
22
|
$ audio.music stop
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
The exact args after `play` (track id, fade, and so on) depend on the content and the audio contract. See examples in `games/*/game/**/scenario/`.
|
|
26
26
|
|
|
27
|
-
##
|
|
27
|
+
## See also
|
|
28
28
|
|
|
29
29
|
- [`../plugins/audio/music.md`](../plugins/audio/music.md), [`ambient.md`](../plugins/audio/ambient.md), [`sound.md`](../plugins/audio/sound.md), [`voice.md`](../plugins/audio/voice.md)
|
package/scenario.guide/canvas.md
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
# Canvas
|
|
1
|
+
# Canvas layers: bl / fl / ml / ul
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Commands look like `$ <layer>.<kind> <action> …`.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Layers
|
|
6
6
|
|
|
7
|
-
|
|
|
8
|
-
|
|
|
9
|
-
| `bl`
|
|
10
|
-
| `ml`
|
|
11
|
-
| `fl`
|
|
12
|
-
| `ul`
|
|
7
|
+
| Prefix | Usual meaning |
|
|
8
|
+
| ------ | ------------------------------------ |
|
|
9
|
+
| `bl` | Back layer (background, far objects) |
|
|
10
|
+
| `ml` | Middle |
|
|
11
|
+
| `fl` | Front / characters often live here |
|
|
12
|
+
| `ul` | UI / the top layer |
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Which `kind` values exist depends on the layer (for example `ul` may have no `video`). Typical kinds:
|
|
15
15
|
|
|
16
|
-
| Kind |
|
|
17
|
-
| -------------------------------------------------- |
|
|
18
|
-
| `bg` | `show`, `hide`, `change`
|
|
19
|
-
| `sprite` | `show`, `hide`, `change`, `move`
|
|
20
|
-
| `video` | `show`, `hide`, `change`
|
|
21
|
-
| `text` | `show`, `hide`, `change`, `move`
|
|
22
|
-
| `fill` | `show`, `change`, `hide`
|
|
23
|
-
| `filter` / `scale` / `clip` / `mask` / `animation` | `set` / `unset` (
|
|
16
|
+
| Kind | Actions (often) |
|
|
17
|
+
| -------------------------------------------------- | ---------------------------------------- |
|
|
18
|
+
| `bg` | `show`, `hide`, `change` |
|
|
19
|
+
| `sprite` | `show`, `hide`, `change`, `move` |
|
|
20
|
+
| `video` | `show`, `hide`, `change` |
|
|
21
|
+
| `text` | `show`, `hide`, `change`, `move` |
|
|
22
|
+
| `fill` | `show`, `change`, `hide` |
|
|
23
|
+
| `filter` / `scale` / `clip` / `mask` / `animation` | `set` / `unset` (mask also has `change`) |
|
|
24
24
|
|
|
25
|
-
##
|
|
25
|
+
## Examples
|
|
26
26
|
|
|
27
27
|
```vne
|
|
28
28
|
$ bl.bg show {castle/hospital_room}
|
|
@@ -36,11 +36,11 @@ $ bl.mask set …
|
|
|
36
36
|
$ bl.animation set …
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
The number after bg/sprite is often the transition duration (ms). Media ids sit in `{…}`.
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
Do not copy the docs for every layer. The pattern is one pattern. Only the prefix changes: `bl` / `fl` / `ml` / `ul`.
|
|
42
42
|
|
|
43
|
-
##
|
|
43
|
+
## See also
|
|
44
44
|
|
|
45
|
-
-
|
|
45
|
+
- Layers: [`../plugins/canvas.layers/bl.md`](../plugins/canvas.layers/bl.md), [`fl.md`](../plugins/canvas.layers/fl.md), [`ml.md`](../plugins/canvas.layers/ml.md), [`ul.md`](../plugins/canvas.layers/ul.md)
|
|
46
46
|
- Kind: [`../plugins/canvas/bg.md`](../plugins/canvas/bg.md), [`sprite.md`](../plugins/canvas/sprite.md), …
|
package/scenario.guide/choose.md
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Choice: % choose
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An option menu. A view plugin draws the UI. Branch logic lives here.
|
|
4
4
|
|
|
5
5
|
```vne
|
|
6
6
|
% choose
|
|
7
|
-
title: "
|
|
8
|
-
% choose.option "
|
|
7
|
+
title: "Menu"
|
|
8
|
+
% choose.option "Look around"
|
|
9
9
|
hided: $ flag seen
|
|
10
10
|
$ flag seen
|
|
11
|
-
"
|
|
11
|
+
"Looked around."
|
|
12
12
|
$ choose repeat
|
|
13
|
-
% choose.option "
|
|
14
|
-
"
|
|
15
|
-
#
|
|
13
|
+
% choose.option "Leave"
|
|
14
|
+
"We leave."
|
|
15
|
+
# next — when repeat is no longer needed / every option is hidden
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## Commands
|
|
19
19
|
|
|
20
|
-
|
|
|
21
|
-
| --------------------- |
|
|
22
|
-
| `% choose` |
|
|
23
|
-
| `% choose.option "…"` |
|
|
24
|
-
| `$ choose repeat` |
|
|
20
|
+
| Syntax | Meaning |
|
|
21
|
+
| --------------------- | ------------------------------------------------------------ |
|
|
22
|
+
| `% choose` | Open the choice and collect `% choose.option` |
|
|
23
|
+
| `% choose.option "…"` | A branch. Unpicked options are skipped by indent |
|
|
24
|
+
| `$ choose repeat` | Return to the nearest `% choose` **above** in the same label |
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
When every option is `hided` (or the list is empty), the block is skipped.
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
Optional on the block: `title: "…"` — a title above the options (drawn by `views.scenario.choose`).
|
|
29
29
|
|
|
30
|
-
##
|
|
30
|
+
## Option props and keywords
|
|
31
31
|
|
|
32
32
|
```vne
|
|
33
33
|
% choose
|
|
34
|
-
% choose.option "
|
|
34
|
+
% choose.option "With QTE"
|
|
35
35
|
qte: easy
|
|
36
|
-
"
|
|
36
|
+
"Success — this branch"
|
|
37
37
|
% choose.option "Fallback" | qte-fallback
|
|
38
|
-
"
|
|
39
|
-
% choose.option "
|
|
38
|
+
"A direct pick, or a failed QTE"
|
|
39
|
+
% choose.option "Hidden"
|
|
40
40
|
hided: $ flag done
|
|
41
|
-
% choose.option "
|
|
41
|
+
% choose.option "Unavailable"
|
|
42
42
|
disabled: $ flag locked
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
- **`hided:`** / **`disabled:`** —
|
|
46
|
-
- **`qte: <id>`** —
|
|
47
|
-
- **`| qte-fallback`** —
|
|
45
|
+
- **`hided:`** / **`disabled:`** — visibility and availability conditions.
|
|
46
|
+
- **`qte: <id>`** — run a QTE before entering the branch (the bundle needs choose↔qte compatibility).
|
|
47
|
+
- **`| qte-fallback`** — the branch used when the QTE fails.
|
|
48
48
|
|
|
49
|
-
##
|
|
49
|
+
## The "look around, then menu" loop
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
Pattern: in each look option, set a flag and `$ choose repeat`. When everything is seen (`hided`), choose moves on by itself.
|
|
52
52
|
|
|
53
|
-
##
|
|
53
|
+
## See also
|
|
54
54
|
|
|
55
55
|
- [`../plugins/scenario/choose.md`](../plugins/scenario/choose.md)
|
|
56
56
|
- View: [`../plugins/views.scenario/choose.md`](../plugins/views.scenario/choose.md)
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Dialogue and text
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A line with no `$` / `%` is dialogue (module `other`, the text plugin).
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Basic dialogue
|
|
6
6
|
|
|
7
7
|
```vne
|
|
8
|
-
"
|
|
9
|
-
fl "
|
|
10
|
-
co "
|
|
8
|
+
"Third-person narration."
|
|
9
|
+
fl "Line for the speaker id fl."
|
|
10
|
+
co "Coraline's line."
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
-
|
|
14
|
-
- `<speaker> "…"`
|
|
13
|
+
- A quoted line with no speaker id is narration / "other".
|
|
14
|
+
- `<speaker> "…"` is a line for that speaker (the id comes from the game config).
|
|
15
15
|
|
|
16
|
-
## Postfix
|
|
16
|
+
## Postfix and inject
|
|
17
17
|
|
|
18
18
|
```vne
|
|
19
|
-
fl "
|
|
19
|
+
fl "I always liked your name."
|
|
20
20
|
postfix: nod
|
|
21
21
|
|
|
22
|
-
% choose.option "
|
|
22
|
+
% choose.option "The counter is testsCounter"
|
|
23
23
|
inject:
|
|
24
24
|
$ counter testsCounter
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
- **`postfix:`** —
|
|
28
|
-
- **`inject:`** —
|
|
27
|
+
- **`postfix:`** — an extra token on the line (gestures, variants — depends on the bundle and the content).
|
|
28
|
+
- **`inject:`** — put a value into the option or line text through exec.
|
|
29
29
|
|
|
30
30
|
## text.meet
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
Record that the player has met the speaker (the name in the UI, and similar):
|
|
33
33
|
|
|
34
34
|
```vne
|
|
35
35
|
$ text.meet fl
|
|
36
|
-
fl "
|
|
36
|
+
fl "The leg will heal."
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
Signature: `$ text.meet <speakerId>`.
|
|
40
40
|
|
|
41
41
|
## text.wall
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
A wall of text (a multi-line block on screen):
|
|
44
44
|
|
|
45
45
|
```vne
|
|
46
46
|
$ text.wall start
|
|
47
|
-
"
|
|
48
|
-
"
|
|
47
|
+
"First paragraph"
|
|
48
|
+
"Second paragraph"
|
|
49
49
|
$ text.wall end
|
|
50
50
|
$ text.wall clear
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
Actions: `start`, `end`, `clear`.
|
|
54
54
|
|
|
55
|
-
##
|
|
55
|
+
## See also
|
|
56
56
|
|
|
57
|
-
-
|
|
58
|
-
-
|
|
57
|
+
- Plugins: [`../plugins/text/text.md`](../plugins/text/text.md), [`meet.md`](../plugins/text/meet.md), [`wall.md`](../plugins/text/wall.md)
|
|
58
|
+
- Catalog: [`../scenario.catalog/stubs/other.md`](../scenario.catalog/stubs/other.md)
|
package/scenario.guide/flow.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Scenario flow: stack, scenario, pause, save
|
|
2
2
|
|
|
3
|
-
## stack —
|
|
3
|
+
## stack — jumps between labels
|
|
4
4
|
|
|
5
5
|
```vne
|
|
6
6
|
$ stack jump prologue/3
|
|
@@ -8,15 +8,15 @@ $ stack call testsStackSubroutine
|
|
|
8
8
|
$ stack pop
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
|
|
|
12
|
-
| -------------- |
|
|
13
|
-
| `jump <label>` |
|
|
14
|
-
| `call <label>` | Push
|
|
15
|
-
| `pop` |
|
|
11
|
+
| Action | Meaning |
|
|
12
|
+
| -------------- | ----------------------------------------------------------------------------------- |
|
|
13
|
+
| `jump <label>` | Go to the label and do not save a return point |
|
|
14
|
+
| `call <label>` | Push the current position, then jump. The label usually ends with `pop` or auto-pop |
|
|
15
|
+
| `pop` | Return to the saved position |
|
|
16
16
|
|
|
17
|
-
`call`
|
|
17
|
+
`call` can pass arguments (see the `tests/stack` tests in the games).
|
|
18
18
|
|
|
19
|
-
## scenario —
|
|
19
|
+
## scenario — anchors inside a label
|
|
20
20
|
|
|
21
21
|
```vne
|
|
22
22
|
$ scenario anchor loop_start
|
|
@@ -24,10 +24,10 @@ $ scenario anchor loop_start
|
|
|
24
24
|
$ scenario goto loop_start
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
|
|
|
28
|
-
| --------------- |
|
|
29
|
-
| `anchor <name>` |
|
|
30
|
-
| `goto <name>` |
|
|
27
|
+
| Action | Meaning |
|
|
28
|
+
| --------------- | ---------------------------------- |
|
|
29
|
+
| `anchor <name>` | A named point in the current label |
|
|
30
|
+
| `goto <name>` | Jump to the anchor (same label) |
|
|
31
31
|
|
|
32
32
|
## pause
|
|
33
33
|
|
|
@@ -36,21 +36,21 @@ $ pause
|
|
|
36
36
|
$ pause 300
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
Pause the scenario until a click, or for `time` milliseconds.
|
|
40
40
|
|
|
41
41
|
## save
|
|
42
42
|
|
|
43
43
|
```vne
|
|
44
|
-
$ save key "
|
|
44
|
+
$ save key "Chapter: Waking in a nightmare"
|
|
45
45
|
$ save.auto
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
|
|
|
49
|
-
| ---------------- |
|
|
50
|
-
| `$ save key "…"` |
|
|
51
|
-
| `$ save.auto` |
|
|
48
|
+
| Command | Meaning |
|
|
49
|
+
| ---------------- | -------------------------------- |
|
|
50
|
+
| `$ save key "…"` | Set the save slot key or caption |
|
|
51
|
+
| `$ save.auto` | Autosave |
|
|
52
52
|
|
|
53
|
-
##
|
|
53
|
+
## A typical frame
|
|
54
54
|
|
|
55
55
|
```vne
|
|
56
56
|
label init:
|
|
@@ -65,7 +65,7 @@ label prologue/1:
|
|
|
65
65
|
$ stack jump prologue/2
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
##
|
|
68
|
+
## See also
|
|
69
69
|
|
|
70
70
|
- [`../plugins/core/stack.md`](../plugins/core/stack.md), [`scenario.md`](../plugins/core/scenario.md)
|
|
71
71
|
- [`../plugins/scenario/pause.md`](../plugins/scenario/pause.md)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Point-and-click: % point-and-click
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A hotspot choice on the background. The UI is a view plugin. Branches work like choose.
|
|
4
4
|
|
|
5
5
|
```vne
|
|
6
6
|
% point-and-click
|
|
@@ -9,31 +9,31 @@ Hotspot-выбор на фоне. UI — view-плагин; ветки — ка
|
|
|
9
9
|
imgHeight: 60
|
|
10
10
|
hided: $ flag pac_1
|
|
11
11
|
$ flag pac_1
|
|
12
|
-
"
|
|
12
|
+
"Found an item."
|
|
13
13
|
$ point-and-click repeat
|
|
14
14
|
% point-and-click.option {search} {search-hover} 50 50
|
|
15
15
|
imgWidth: 60
|
|
16
16
|
imgHeight: 60
|
|
17
17
|
hided: $ flag pac_2
|
|
18
18
|
$ flag pac_2
|
|
19
|
-
"
|
|
19
|
+
"Another spot."
|
|
20
20
|
$ point-and-click repeat
|
|
21
|
-
"
|
|
21
|
+
"Every spot is checked — the scenario continues."
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
##
|
|
24
|
+
## Commands
|
|
25
25
|
|
|
26
|
-
|
|
|
26
|
+
| Syntax | Meaning |
|
|
27
27
|
| ------------------------------------------------- | ----------------------------------------------- |
|
|
28
|
-
| `% point-and-click` |
|
|
29
|
-
| `% point-and-click.option {icon} {iconHover} x y` |
|
|
30
|
-
| `$ point-and-click repeat` |
|
|
28
|
+
| `% point-and-click` | Open the mode and collect `.option` |
|
|
29
|
+
| `% point-and-click.option {icon} {iconHover} x y` | A hotspot: icon, hover icon, and coordinates |
|
|
30
|
+
| `$ point-and-click repeat` | Return to the nearest `% point-and-click` above |
|
|
31
31
|
|
|
32
|
-
`x` / `y`
|
|
32
|
+
`x` / `y` are numbers (percent or UI coordinates — by the game convention). `{icon}` / `{iconHover}` are icon ids from `media/icons/.../point_and_click/`.
|
|
33
33
|
|
|
34
|
-
Props `hided:` / `disabled:`
|
|
34
|
+
Props `hided:` / `disabled:` work like choose. Optional `imgWidth:` / `imgHeight:` set the hotspot size in canvas pixels.
|
|
35
35
|
|
|
36
|
-
##
|
|
36
|
+
## See also
|
|
37
37
|
|
|
38
38
|
- [`../plugins/scenario/point_and_click.md`](../plugins/scenario/point_and_click.md)
|
|
39
39
|
- View: [`../plugins/views.scenario/point_and_click.md`](../plugins/views.scenario/point_and_click.md)
|