Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback choices become visible after reloading the story state #912

Open
arashikou opened this issue Oct 22, 2021 · 2 comments
Open

Fallback choices become visible after reloading the story state #912

arashikou opened this issue Oct 22, 2021 · 2 comments

Comments

@arashikou
Copy link

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 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".

Ink files

See demo.ink in this gist, along with main.mjs.

Environment

  • OS: Windows
  • Node.js version: 16.10.0, but I've also seen this behavior in the browser
  • Web browser version: Firefox 93, but I've also seen this behavior in Node.js
  • inklecate version: 1.0.0
  • inkjs version: 2.0.0
@y-lohse
Copy link
Owner

y-lohse commented Feb 1, 2022

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!

@smwhr
Copy link
Collaborator

smwhr commented Aug 28, 2024

Is this still happening ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants