Twine/Harlowe as a dependency graph

Hi all,

I am making my first adventure game based on Twine/Harlowe. It’s been great fun but eventually I will transfer the game to another platform to do a point and click version.

I would like my work that I do in Twine to help my work on the point and click platform and specifically to have a dependency graph. To further explain, let’s assume that you have passage0 and passage1 that you find two items that are required to do something in passage2. But passage2 is not accessed/connected by passage0 nor passage1.

E.g. in passage0 you find a key and you set $iHaveFoundKey to true
in passage1 you find another key and you set $iHaveFoundAnotherKey to true
In passage2 there is some code: (if: $iHaveFoundKey is true and $iHaveFoundAnotherKey is true)[(set: $iHaveOpenedTheDoor to true]

Notice that passage0 and passage1 are not necesaraly connected , so there are no arrows connecting passage0 and pasasge1 with passage2. So I cannot see the dependency that to open the door in passage2 i need the keys from passage0 and passage1. This is a problem for me, I would like a functionality to see these dependencies.

Generally, I believe that this can be done. There could be some dependency arrows between passages that set variable(s) and passages that check (via if statements) the same variable(s).

Does anyone have the same need? Is there an existing functionality in twine that handle dependencies? Is this something maybe considered in future version?

I don’t know about an automatic feature allowing to do what you ask for.

However, there’s a search function in Twine (Quick find) in the low center of the project page. It will make every passage with selected term yellowish. It works for any character string, so if you don’t remember where you set a variable, or call for one, you can type there ‘<<if $MyVariable’ or ‘<<set $MyVariable’.

Also, you can create a passage that will never be called during the game, where you can store where to find important prerequisite to progress in the adventure.

For instance:

Blue door at passage XXX has two locks, the lower one needs a cobalt key (passage XXY) and the higher one a blue plastic key (passage YYX).
To meet NPC31 needs to ask for music tastes to NPC 12 at passage WWV.

And so on.
Similarly, in my project I’ve devoted such a passage to store information about how characters talk (good grammar or not, good vocabulary or not).

Hi there!

If you want to visually see connection arrows without having links appear in these passages, you could make an if statement that is always false and put the link to the passage inside it, that way the connection arrow will appear on the twine interface, but the links will be hidden in the passage. You could do something like this:

(if: false)[[Passage1]]

or this:

(set: $dependency to false)
$dependency[[[Passage2]]]

Just make sure you do it in a way that wont be confusing to you. Hope this helps!

Currently the Twine 2.x application doesn’t understand Comment Markup, so it doesn’t exclude any Markup base links that are within commented area of a Passage when the application’s “Find all links” feature is looking for ‘links’ to show as a Connection Arrow. However the Story Format’s themselves do understand not to process Passage content that is contained within Comment Markup.

eg. The following SugarCube and Harlowe based examples include Markup based links that are ignored by the story format but not by the application.

/* SugarCube: [[This link will create a Connection Arrow|But will not appear on the Page]] */

<!-- Harlowe: [[This link will create a Connection Arrow->But will not appear on the Page]] -->

You can use this limitation of the application to show connections between Passages that aren’t really connected by Markup links, like your passage0 and passage1.

1 Like