Follow TV Tropes

Following

Algorithmic Story Branching

Go To

Most Story Branching in Video Games follows the classic Gamebook model of "choose X for branch A, or choose Y for branch B". More sophisticated narrative games implement Event Flags to delay a specific decision payoff ("if you chose X earlier, event A occurs now"); multiple event flags can then be combined into a full Choice-and-Consequence System, and made arbitrarily complex with Promptless Branching Points, a Branch-and-Bottleneck Plot Structure, etc. All of these tropes, however, fundamentally rely on Boolean algebra: Each player choice is its own true/false variable, and at every branching point, the devs must choose relevant variables and assign a specific outcome to every possible instantiation thereof ("if you chose X earlier or say Y now, event A occurs; otherwise, B occurs, unless you also chose Z, then C occurs"). As you can imagine, the complexity of this sub-system grows exponentially, the more choices the player can make.

This trope is about an alternative approach that aggregates numbers from various events and compares them instead of relying on single choices. So, when the time comes for the plot to branch, the game checks these numbers and selects a branch based either on whether some value is in a specific, writer-defined range, or on which score is the highest at that point. This approach gives narrative designers a lot of expressive power by letting them add new meaningful player choices without having to explicitly account for every possible combination. Another benefit is that choices can now be weighted, with some being assigned larger numeric modifiers than others, thus having a larger, but not dominant effect on the story. An additional common pattern in this approach are pre-authored priority lists that order the outcomes from most to least likely and can, for instance, serve as tie-breakers.

Subtrope of Story Branching. Supertrope to Alignment-Based Endings — at least, to the variation where the ending choice is based on the final Karma Meter standing, rather than a Last-Second Ending Choice. Relationship Values can also be used as input values for this approach. Also compare Secret Expanded Epilogue.


Examples:

    open/close all folders 

    RPG — Eastern 

    RPG — Western 
  • Dragon Age:
    • Dragon Age: Origins: A minor example occurs late in the game, when the Warden and Arl Eamon's party calls for a Landsmeet to challenge Loghain's legitimacy as regent. Depending on which side quests you have completed, which allies you've won, and which arguments you bring to the final debate, points are added or subtracted to a hidden meter (with some allies, like Queen Anora and the Grand Cleric, mattering more than others). As long as it ultimately stands at 5+, the Landsmeet will move to depose Loghain; otherwise, the nobles will stand by him. As he refuses to give up power peacefully, either way, you will have to fight him, but deposing him legally allows you to do so in an honorable duel and even to subsequently recruit him into the Grey Wardens.
    • Dragon Age: Inquisition: At the start of the game, the current Divine of the Chantry dies, and towards the end, three high-ranking members of the Inquisition announce their claims as her successors. As explained in-depth here, each candidate has a hidden score (independent of the regular Relationship Values) that starts out at 0 at the beginning of the game and goes up or down by anywhere from 1 to 10 points any time the Player Character makes a decision that directly or indirectly supports her future claim and preferred policies. The candidate with the most points at the end of the game is ultimately elected the next Divine in the epilogue, with a priority list reflecting her respective political clout used to break ties (from the most politically savvy to the least: Vivienne, Leliana, Cassandra).
  • Mass Effect:
    • Mass Effect: As explained here, the game maintains a hidden priority list ranking each Player Party member along the Paragon-Renegade axis, starting out with Kaidan > Liara > Tali > Garrus > Ashley > Wrex (from most Paragon to most Renegade), but slightly rearranging it based on the dialogue options the player picks when speaking with them on the Normandy. The current ranking has a minor story effect at every key plot decision, where, of the two squadmates accompanying Shepard, the one ranked more Paragon will advocate for a Paragon resolution, and the other, for Renegade one, Good Angel, Bad Angel-style.
    • Mass Effect 2: In the final leg of the Suicide Mission endgame, the surviving squad members who don't accompany Shepard to the Final Boss battle hunker down to stop enemy reinforcements from catching up with Shepard. This entire battle occurs off-screen, but can have highly variable outcomes in regards to which squadmates survive: as explained in-depth here, each squadmate has a hidden "Hold the Line (HTL) score", ranging from 0 to 3 (incremented by 1 if their respective Loyalty Mission has been succesfully completed), and the number of casualties (ranging from zero to everyone) depends both on the total number of the defenders and on their average HTL score. After the game calculates the number of casualties, it selects the specific squadmates to die based on a priority list that, while not explicitly numeric, implicitly ranks them by their ability to survivenote .
    • Mass Effect 3: Half-way through the game, Shepard is thrust into a tense standoff against the Virmire Survivor, and how it is resolved depends on a number of player choices from across the trilogynote . Each choice adds or subtracts 0 to 2 points to/from a hidden "trust level" (as explained in-depth here), and if the final trust level is below zero, Shepard's opponent cannot be talked down, forcing you to kill them; if it falls within the 0-3 range, you are allowed one final persuasion check to deescalate the situation; and at trust level 4 or higher, the opponent sides with Shepard automatically.
  • Cyberpunk 2077: The long-term outcome of the "Sinnerman" sidequest arc depends on multiple dialogues between V and Joshua during said arc, with some choices adding one or two points to Joshua's hidden "doubt" meter. If this meter reaches or exceeds 4 by the end of the questline, the braindance of his voluntary crucifixion becomes a commercial flop; otherwise, his faith makes it a smash hit.

    Raising Sim 
  • The Cute Knight series: The two main ways to result in endings that depend on calculations instead of being triggered by some event, are if the Dream stat falls to 0 or below for a Bittersweet Ending, or the Player Character turns 21, for a happier one, usually. At those points, an ending is chosen based on the occupation / activity she's done the most, having her continue in that vein. But there are other types of conditions:
  • Princess Maker: The Player Character has seven Stats and a Reputation score, and the combination thereof at the end of the game determines which of the 30 endings she gets. Specifically, if her Reputation is 1200 or more, she gets the Ruling Queen ending; and if it's between 800 and 1199, the Princess ending. Otherwise, the ending is based on which Stat is her highest and, again, on her Reputation: each Stat has four endings, from the worst (0 to 49 Rep) to the best (400 to 799 Rep).

    Sandbox 
  • In Way of the Samurai 4, there are three factions the player can help throughout the first three days. The game keeps track of which missions the player completes, as well as if a player angers a certain faction through his choices. On the fourth day, the game will use these factors to calculate the side to which the player is most loyal, and have him represent the faction in a battle tournament before moving on for their side’s endgame. If the player doesn’t complete enough missions for any side, he’ll be given a neutral story that cuts itself off after the Tournament Arc.

    Survival Horror 
  • Instead of hinging on binary choices like most games in the series, Silent Hill 2 determines its endings this way, detailed here. Essentially, the game determines the player's Alternate Character Interpretation of James based on their playstyle, and chooses the ending accordingly.
    • Healing frequently when taking damage, especially healing in excess of your maximum health, while avoiding or ignoring Maria will give points towards the "Leave" ending. Playing this way means James wants to survive and Mary is very important to him.
    • Staying at low health for prolonged periods of time (the game adds points to this counter every frame you're below half health), reading the journal of a suicidal hospital patient and examining Angela's knife in your inventory give points towards the "In Water" ending. By doing this, you're playing James as a guilt-ridden Death Seeker.
    • The "Maria" ending wants you to care about Maria as much as possible, while ignoring Mary's memory. Points are gained by staying close to Maria during her Escort Mission, not letting her take too much damage, not bumping into her while walking and not examining the photo and letter from Mary in your inventory.
    • On repeat playthroughs, the game prioritizes endings you haven't seen yet in case of tiebreakers.
    • The Ritual ending is exclusive to New Game Plus and breaks this logic: as long as you get all 4 ritual items, this ending overrides all the others. There are also two Joke Endings (Dog and UFO) which require you to use specific items at specific times.

    Tactical RPGs 
  • Fire Emblem:
    • In Fire Emblem: The Binding Blade, whether the fourth act of the story takes place in Ilia or Sacae depends on whether the combined total levels of the players' Pegasus Knights or Nomads is higher, respectively.
    • Fire Emblem: The Blazing Blade has several branching chapters that follow a similar system, one is based on whether the Lords' combined levels are above or below 50, the other is the level gains of Hero's Crest-promoting classes vs Guiding Ring-promoting classes.
    • Fire Emblem: Awakening: Most characters don't get married unless the player selects the unlocked S support conversation scene. However, at the end of the first half of the game, there is a cutscene in which Chrom proposes to the unmarried love interest he has the highest Support level with. Support pointsnote  count regardless of whether the player has viewed the support conversations they unlock, as there's no chance to view Chrom's supports with Olivia before this point, but she's still a viable option. If he has no support points with any free option, he'll instead get married to a generic village maiden NPC.
    • Fire Emblem: Three Houses: Unlike in some previous games of the series, only the Player Character Byleth can reach an S-rank support with an NPC, while recruitable NPCs are restricted to, at most, A-level supports with each other. However, after two recruits achieve an A-level support, the game secretly keeps counting how many times they've assisted each other in combat, and in the Modular Epilogue of the game, all surviving NPCs are paired off based on this hidden support score, with each receiving a special "paired ending" slide with the person they assisted or were assisted by the most.
  • Triangle Strategy: The Scales of Conviction subsystem branches your story (e.g. Lord Serenoa's decision to surrender or to defend Prince Roland in Chapter VII) based on a simple majority vote among his main seven Player Party allies, rather than the player directly choosing one branch or the other. Each party member has a preferred branch, but Serenoa can attempt to persuade some of them via dialogue to change their vote note , with his own (i.e. the player's) vote serving as a tie-breaker in an even split.


Top