inkle / ink-unity-integration

Unity integration for the open source ink narrative scripting language.
http://www.inklestudios.com/ink
Other
581 stars 101 forks source link

Story.ChoosePathString() runs the first stitch in the knot when when no matching stitch was found #103

Closed klootas closed 4 years ago

klootas commented 4 years ago

Consider the following ink:

== Global = Foo I'm a good stitch, I am! ->DONE

I would expect calling Story.ChoosePathString("Global.non_existing_stitch") to result in an exception, but instead it runs the Globla.Foo stitch.

joethephish commented 4 years ago

This is probably the logic that defensively guards against changes to the story content between save versions. When a path can’t be found then it tries to fall back to the next best path it can find. Whether there should be special behaviour in the case where you call it very specifically like this is more debatable. But I suspect it’s hard to distinguish.

klootas commented 4 years ago

Ah, I never even considered the idea that the story content might differ between save games. That sounds like a really hard problem to solve reliably. Glad some thought has been put into it though! 👍