Possible regression involving tunnels after 0.7 upgrade
- Dominant language
- C#
- Stars
- 4.9k
- Forks
- 540
- PR merge metrics
- No merged PRs in 30d
Description
Hi guys,
I noticed a bug in my game and after going crazy trying to remember Ink syntax (it was a while ago!) I tracked it down to the 0.7 Unity Ink plugin upgrade (and I see that the ink version number in the Example/Ink/story.json changed from `"inkVersion":15` to `"inkVersion":16`).
Here's the script:
```
INCLUDE CaravanGlobal.ink
Let's add units to the party until we run out of space.
* [{UnitRewardLabel("eggtar")} Have an Egg Man!]
-> add_unit("eggtar") ->
-
Here's another one:
* [{UnitRewardLabel("eggtar")} Have an Egg Man!]
-> add_unit("eggtar") ->
-
Now my roster is full so adding another will cause the story to divert...
* [{UnitRewardLabel("eggtar")} Have an Egg Man!]
-> add_unit("eggtar") ->
-
THIS PART SHOULDN'T SHOW UP UNTIL I RETURN FROM THE TUNNEL!!!
Done!
```
And here's the relevant part of CaravanGlobal.ink:
```
EXTERNAL AddUnit(provisioningFile)
EXTERNAL RemoveUnit(uuid)
EXTERNAL CanUnitBeAdded()
=== add_unit(provisioningFile) ===
{ CanUnitBeAdded():
~ AddUnit(provisioningFile)
->->
- else:
There is not enough room in the Caravan for a new guy.
+ [Keep old guys.]
+ [{UnitPickerLabel()}Leave a guy behind to make room.]
~ RemoveUnit(chosen_unit)
-> add_unit(provisioningFile)
}
->->
```
This is in-game execution pre-0.7:

And here is execution post-0.7:

As you can see, some weirdness is going on causing lines of the ink to be consumed twice. Can anyone spot a reason for the difference in behavior easily? If not, this might be an issue with me consuming the Story object in some (bad) way! But I can say for certain that my code was the same before and after the upgrade.
Thanks and let me know if you need more info.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the behavior with the provided Ink script and CaravanGlobal.ink in the Unity plugin before and after the 0.7 upgrade. Start by comparing how the Story object is consumed during tunnel/divert execution, then identify why lines are consumed twice. Done means the post-0.7 execution matches the pre-0.7 behavior without changing the script.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, unity
- Domain
- game-dev, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100