mcdemarco / dotgraph

A Twine 2 proofing format that renders nodes as a GraphViz (dot) graph.
http://mcdemarco.net/tools/scree/dotgraph/
MIT License
7 stars 0 forks source link

When "color by tag" is enabled, specialPassageList breaks? #8

Closed mcdemarco closed 4 years ago

mcdemarco commented 4 years ago

I'm having a hard time tracking this down.

Starting with a twee2 entry like this:

#!markdown

::StoryTitle
Investigations in Lovecraft Country #1: Alone Against the Flames — v20180827 @ github.com/morbus/gamebook-choicemaps

::StoryAuthor
MetaArcade

::StorySettings
dotgraph:{"color":"tag","countWords":false,"omitTags":["annotation"],"showNodeNames":true}

And with a configuration per the attached screenshot, the "StoryAuthor" node is being shown. If I remove the "StoryAuthor" in the twee2 file, "StorySettings" is shown instead. If I retain "Story Author" and "StorySettings", but switch their positions (such that "StorySettings" is first in the file), then "StorySettings" is shown.

If I switch "color" to "length" or "bw", the bug does not occur.

Source .tw2 file is located here:

https://github.com/morbus/gamebook-choicemaps/tree/master/choicemaps/investigations-in-lovecraft-country-1-alone-against-the-flames--2018--ios-id1343328830

[Issue created by morbus: 2018-09-07] [Last updated on bitbucket: 2018-09-09]

[Comment created by morbus: 2018-09-07] Seems like this is being caused in writeTagKey(), where the startName is being set, as the created gv is:

#!
"Athleticism-Check" -> "StoryAuthor" [style=invis]
"Intelligence-Check" -> "StoryAuthor" [style=invis]
"Appearance-Check" -> "StoryAuthor" [style=invis]
"Clue-Over-the-Edge" -> "StoryAuthor" [style=invis]

[Comment created by morbus: 2018-09-07] This might be related to how twee2 is building the file. I'm seeing this:

#!
<tw-storydata name="..." startnode="1" creator="Twee2" ... />
<tw-passagedata pid="1" name="StoryAuthor" tags="" position="">

That'd also explain why it's always "the first entry in the .tw2 file after the StoryTitle" too.

[Comment created by morbus: 2018-09-07] This appears to be my fault: I'm not using twee2's default "::Start" passage.

[Comment created by morbus: 2018-09-07] Closing. Solved by switching:

#!
::The motor coach is late
(options)

with:

#!
::Start
[[The motor coach is late]]

::The motor coach is late
(options)

[Comment created by mcdemarco: 2018-09-09] Yes, BitBucket sent me your messages gradually, and at some point I decided the problem was mainly the lack of a start passage. But DotGraph should still behave a bit better in that situation, so I'm not closing it yet.