[Proposal] Dynamic Diverts
- Dominant language
- C#
- Stars
- 4.9k
- Forks
- 540
- PR merge metrics
- No merged PRs in 30d
Description
This is a follow up to #668 but in a more proposal/proposal-like format.
Main.ink
```
Once upon a time...
* I ran across the street.
* I took a bus to boston.
- They lived happily ever after. -> external_chapter.Main
```
This gives the following error in inky: "Divert target not found: '-> external_chapter.Main'
What if we introduced the ability to compile this ink to json when ```external_chapter.Main``` is ```$external_chapter.Main```
where '$' denotes a dynamically loaded ink file by name/key.
In the Inky editor when we want an ink file to be dynamically loaded through a resolver at runtime and not included in the Main.ink file we can prepend the '$' symbol which would tell the compiler to compile this ink file separately as an appendable chunk/plugin.
When the ink runtime reaches a divert target where the first character begins with '$' this tells the runtime to dynamically load the ink file (up to the dot) and append it to the current story through a resolver function specified by the developer if the knot-stitch after does not exist.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.