Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Ink-Fungus Gateway Interactive Tour

A free open-source integration of Ink and Fungus for Unity · By Mauro Vanetti

blank choice after loading

A topic by zorkie created Feb 28, 2025 Views: 187 Replies: 10
Viewing posts 1 to 3

Hi! Thank you so much for making this Gateway--I've been using it for a little more than a year, and I really love it!!

I was wondering if I could please get some help with a bug I found? Sometimes when loading the game at a spot with choices that include a fallback choice (*    ->), a blank choice will be included that when clicked behaves like the fallback choice. It doesn't consistently happen, and I'm not sure why it happens sometimes but not other times.
Do you have any idea why it might be happening/how I might prevent the fallback option from showing?

If not, no worries! I think I figured out a workaround to not use the fallbacks, but I thought I'd check before going through the effort of adjusting everything.

Developer(+1)

Hey! Thank you very much zorkie, and sorry for replying so late.

It's such a long time I don't check this project, which is a pity because it definitely needs to be updated to the latest versions of Unity. My first guess, completely based on gut feeling, is that it has something to do with the way you write the fallback choice, like how many blank spaces you put between the star symbol and the arrow.

If you give me an example project I can investigate! BTW, let me know what you're working on, if it's not a secret, I would be so glad to know more about your work.

Have a nice day and keep in touch.

(1 edit)

Thank you for your reply!!

On one of the saves where I can consistently see the issue, the fallback choice looks like this:

*   {save_choice_count()}-> recommendation

where {save_choice_count()} always returns true. (To clarify, the issue also happens on other fallback choices that do not have a conditional in front of them, this is just one that I have a save file for.)

I thought the issue might have been space related, which is why there’s no space between } and -> (I usually have one). I also tried removing the spaces before {save_choice_count()}, but that didn’t work either.

Another thing I tried was adding in a CHOICE_COUNT()==0 check, and this did not work either.

My project can be found here, https://zorkie.itch.io/qdrp – and I’d be happy to share more code if it’s of help?

I hope you have a great day too :)

Developer

Your game looks lovely. I want to play it thoroughly.

I'm investigating. First of all, let's rule out that the unexpected behaviour could be on the Ink layer. Can you send me a part of the .ink source where the fallback choice is used?

I'm a bit surprised by the conditional in a fallback choice. Fallback choices are used when the choice pool is depleted, what do you expect to happen if the conditional is false?

Thank you so much for saying so!!

The section that has the fallback is quite long (it has 16 choices, most of them with nested choices beneath them and most of them gated by conditionals), but here are a few that are above the fallback (with the nested sections removed because I would likely max the character count otherwise):

*   {CHOICE_COUNT()<3 and f_stress} [worries]
        Jin "You're worried about { beauty:losing your beauty{ fears: and letting others down}|letting others down}? # jin sympathetic # clinic quiet
        Florence nods. # flo downcast
        Florence "That's about right.
        
*   (party) {CHOICE_COUNT()<3 and ellis} [Ellis]
        Jin "How did you meet Ellis? # jin neutral # clinic quiet
        Florence smiles and her gaze wanders, seeing a time gone by. # flo shy
        Florence "We were at Dancing Arcs, a semi-annual evening party. The sun was setting and they had arranged prisms around the room to catch the light.
        Florence "A friend introduced us, and we hit it off.
        She laughs softly. # flo laugh
        Florence "He's awfully charming, and he did small things that exhibited a considerate heart. We started meeting up after that and he grew fond of me.
        Florence "My parents were so pleased. Ellis's father is well respected and Ellis himself is a perfect gentleman. # flo smile
        ~ f_clues++

*   {CHOICE_COUNT()<3 and fears2} [addressed worries?]
        Jin "Have you spoken to anyone about your worries? # jin concerned
        Florence drops her gaze but I catch the forlornness in her expression. # flo downcast
        { 
            - f_trust>5:
                Florence "I did once. It was a mistake. # flo neutral
            - else:
                Florence "They're only simple concerns, not worth worrying others. # flo smile
        }

*   {CHOICE_COUNT()<3 and CHOICE_COUNT()>0} [next phase] <> -> recommendation

*   {save_choice_count()}-> recommendation

Oh so the fallback choice always returns true. It’s there so I can check how many choices are left in the conversation when I move to a different section (if there’s enough left, you come back to these questions; otherwise, you move on).

Here’s the function that’s being called,

=== function save_choice_count() ===
~ choice_count = CHOICE_COUNT()
~ return true

But the issue with the blank choice on loading happens even with normal fallbacks that don’t have any conditionals on them. (I just don’t have a save file currently that recreates the bug, unlike for this fallback with the conditional.)

Developer

Oops, I snubbed a key part of your question - and it was in the thread title too! This happens when loading the game. I'm afraid this is not a detail.

Does the bug occurs if you load the game immediately before the choice?

My new guess is that if you save the game in a position where a choice happens, but the choice is actually overriden by the fallback option, when you load it it is positioned at the brink between the sentence before the choice and the default sentence after the choice. Usually, this non-choice is just skipped and we fast forward to the next sentence, but by loading it in that exact point the engine has to display something and the blank sentence is delivered.

It looks more like a quirk of the Ink engine but I'm not sure.

Yes, I think the save was done on the line right before the questions come up / possibly once the questions started showing but before one was selected.

Do you know if there’s a way to fix it, or would it be better to prevent saving right before a choice?

Developer

My general opinion is that it makes more sense to only allow saving in sparse key points of the story. But this is more of a game design point.
I'm really not sure how we may fix this. I could just modify the Gateway so that blank options are not delivered, but I'm afraid someone could have used blank options meaningfully and it would break their expectation.

Would it be possible to set it up as a toggleable option? This way, people could leave it off if they need blank choices for whatever reason.

Developer

I have a less impacting idea: we can just check if we are in this buggy situation immediately after loading. In that case, the option is automatically chosen. It's very ad hoc but it could work.

Sure, that makes sense!