You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fallback choices are supposed to be invisible to the player, taken automatically by Ink if no other choices remain. However, in InkJS, they can become visible if you save the story state to JSON while at a choice block with a fallback and then restore from the JSON. The now-visible fallback can even be selected and followed.
To Reproduce
I have a gist that demonstrates the issue using a looping failure block similar to the "find_help" example in Writing With Ink's section on fallback choices. (Excuse all the Apache 2.0 license stuff; my employer requires it.)
Essentially, if the story state is at a choice block with a fallback and you save the state with story.state.ToJson(), then if you later restore that state with story.state.LoadJson(), the fallback choice will become visible as a regular choice with no text.
Expected behavior
From Writing With Ink: "Fallback choices are never displayed to the player".
Yeah that… sounds like a bad bug 😬 thanks for the reproduction material, I won't be able to look at this in the near future but happy to support if anyone wants to tackle this!
Describe the bug
Fallback choices are supposed to be invisible to the player, taken automatically by Ink if no other choices remain. However, in InkJS, they can become visible if you save the story state to JSON while at a choice block with a fallback and then restore from the JSON. The now-visible fallback can even be selected and followed.
To Reproduce
I have a gist that demonstrates the issue using a looping failure block similar to the "find_help" example in Writing With Ink's section on fallback choices. (Excuse all the Apache 2.0 license stuff; my employer requires it.)
Essentially, if the story state is at a choice block with a fallback and you save the state with
story.state.ToJson()
, then if you later restore that state withstory.state.LoadJson()
, the fallback choice will become visible as a regular choice with no text.Expected behavior
From Writing With Ink: "Fallback choices are never displayed to the player".
Ink files
See demo.ink in this gist, along with main.mjs.
Environment
The text was updated successfully, but these errors were encountered: