Not sure what you mean by collapsing and expanding. Could you show a schematic drawing? Otherwise, breaking them into multiple dialogue files is the way to go.
Sorry I never got back to you. It’s been a crazy few months. I don’t have a diagram, however I do have some screenshots to show what I was referring to. Which was to use the same functionality that is already present in blueprints, or something like it. Where you can “select multiple nodes > right click > collapse nodes” and it groups those nodes into a single node that can receive input and output.
Breaking things into separate dialog files is great most of the time. However when I started my project I needed an easy way to do something like the typewriter effect, except I wanted to chunk things into sentences. Each new sentence being displayed when you click continue. I considered modifying the typewriter effect, and having it use punctuation as a marker to break things up. Which would work in many instances. However it gets more complicated with dialogue where you often find things like an ellipsis. Where as well an ellipsis can be broken up into multiple nodes to emphasize the effect… Which then also complicated things further. I considered using non-standard symbols like the paragraph “¶” as a marker, but in then end it was just simpler to use multiple nodes. The result is a simple dialogue containing far more nodes than some one might expect. So my thought was being able to group nodes with a feature like the “Collapse Nodes” functionality could be helpful and not just to myself.
Anyway that was my entire thought. Sorry or the ramblings as I do tend to over explain. As it stands I will just deal with things as is for the moment and revisit modifying the typewriter effect later using the ¶ as a marker.