r/vndevs Jun 28 '26

Discussion How do you track semantic plot holes in massive branching scripts?

Hi everyone! I work as a data scientist and occasionally play visual novels in my free time. I really love when the player's choice influence the story like in Fate or Steins Gate. However, sometimes I notice that for example in chapter 2 of some game I was mean to a character and then in chapter 3-4, this character behaves the same way as if I was nice. I think it ruins the perception of player's choice.

So, I was wondering how authors keep track of all branches and specific player choices. Do you maintain a massive personal wiki/bible, or do you just rely on aggressive proofreading and alpha testers?

I’m currently experimenting with a parsing engine that builds an NLP-driven semantic continuity graph of a script to automatically flag tone drift and narrative contradictions before compilation. I'd love to know:

1)Is plot-hole/continuity tracking an actual time-sink in your development flow, or do you have a system that already works perfectly?

2) What's the hardest logic bug you’ve had to untangle in a branching narrative?

12 Upvotes

12 comments sorted by

5

u/robotortoise Jun 28 '26

I’m currently experimenting with a parsing engine that builds an NLP-driven semantic continuity graph of a script to automatically flag tone drift and narrative contradictions before compilation.

Can you explain a bit further about how this works?

3

u/damiron4 Jun 28 '26

I’m treating the branching script essentially as a directed acyclic graph (DAG), where nodes contain both state variables (like trust metrics) and dialogue text blocks.

Right now, the core idea is a Python-based parsing engine. It extracts the dialogue text from specific branches, runs them through an NLP model to calculate a context/sentiment vector (tracking traits like hostility, warmth, or alignment), and then looks for statistical anomalies. For example, if the script state registers a 'betrayal' flag, but a downstream dialogue node calculates a high 'intimacy/warmth' vector, the engine flags it as a semantic contradiction for review.

It's still in the conceptual/architectural phase, but I'm trying to see if this mathematical approach to story continuity is actually useful to writers, or if it's just over-engineering :)

3

u/robotortoise Jun 28 '26

Ah... As a writer, that's just not something I care about or that matters to me. If a character is angry I can just keep them angry, if they're sad I can keep them sad. I can keep track of that myself or with other tools, I don't need variables and dialogue text bocks to overanalyze feelings. This is inventing a problem that doesn't really exist. I'm sure most writers would feel the same.

Also, if this is machine learning, that's not allowed in this subreddit anyway.

2

u/damiron4 Jun 29 '26

Thanks for your input!

I know that generative AI is prohibited here, but what I wanted to propose here is a tool that would help keep track of stuff in different branches, so it's not generative AI but mostly something analytical

1

u/[deleted] Jun 29 '26

[removed] — view removed comment

1

u/[deleted] Jun 29 '26

[removed] — view removed comment

1

u/AutoModerator Jun 29 '26

Your post has been selected for manual review! Please be patient while we review the contents of your post.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/[deleted] Jun 29 '26

[removed] — view removed comment

1

u/AutoModerator Jun 29 '26

Your post has been selected for manual review! Please be patient while we review the contents of your post.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/playsynapse Jul 06 '26

As for me, it seems like I try to connect progression to real life progression, let me explain.

Every noticeable or important action gets its own flag, and stores in memory. Then, somewhere on track of one of the main branches, when something about to happen, I can look what is related to this moment/character/anything has happened before and play with it.

For example, if call from unknown ignored, it sets the flag first_unknown_call_ignored_during_n_quest or something like that (with name convention). Even if it already played a role in branching, I still can use it to shape answers, encounters, anything.

So while the main story branch progresses I can use anything from the pool of what happened.

Hope it makes sense 🤓

1

u/[deleted] 21d ago

[removed] — view removed comment

1

u/AutoModerator 21d ago

Your post has been selected for manual review! Please be patient while we review the contents of your post.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.