I wanted to ask you if in some way I will be able to modify Cradle in
order to create stories at runtime and not only in the unity editor.
The core of Cradle, the Story class, was made with other story formats in mind other than Twine. It is usually used by scripts that are automatically generated from pre-written Twine files, but it can also be used directly in a C# script that generates story content any way it chooses, including dynamically.
The basic idea is that you derive your script from the Story class, populate the Story.Passages dictionary with passages, and give each of those passages some logic that generates StoryOutput objects.
I added an example to the wiki but am opening an issue in case anyone wants to raise any questions/ideas!
Question via email:
The core of Cradle, the Story class, was made with other story formats in mind other than Twine. It is usually used by scripts that are automatically generated from pre-written Twine files, but it can also be used directly in a C# script that generates story content any way it chooses, including dynamically.
The basic idea is that you derive your script from the Story class, populate the Story.Passages dictionary with passages, and give each of those passages some logic that generates StoryOutput objects.
I added an example to the wiki but am opening an issue in case anyone wants to raise any questions/ideas!