Jump to content

Modder Fun: Graphing Stuff


cmorgan

Recommended Posts

Huge thanks to Cerevant - he put me onto a simple (well, not really exactly simple, but very cool) way of seeing how dialog states can be graphed out and visualized.

 

I know - this might be silly, but when I get rolling, my writing often takes me off the beaten path. And especially as I am pushing the limits of what i.e. modding ever thought of doing, creating huge dialog trees with multiple pathways, well - sometimes things happen like what piperb found in the swimming talks - a fully clothed Aran standing on the bank of a river looking at a fully clothed PC splashing about skips all the in-between steps and end up magically teleporting into water sans clothes.

 

So, with the help of a relatively simple and easy learning curve, some documentation and a little experimentation, I grabbed http://www.graphviz.org/ Graphviz and a .d file, editied out everything except the state headers into a simple list of

A -> B

A -> C

A -> D

B -> C

etc.,

 

and made a graph of one of the simpler talks (Friend talk 1) for troubleshooting.

This is scratching the surface of the possibilities, but still was very fun, and even found me an "orphan" state that I intentionally left in for testing, to see if it would easily detect it. I had to play with CHAIN syntax, since CHAIN looks linear, but is really

"State1 - go to state 2 if possible; if not try state 3"

which means that each state in a CHAIN can skip to the end or to anything available in the CHAIN. A huge set of possibilities.

I also kept it simple and left off and multiple-states-leading-to-the-same-state-in-reply-options, as that would require more learning to manipulate the graphing program; if Fighters, mages, and hieves had different replies but they all led to the same state, they got slashed back into the single outcome for legibility.

 

So, here it is:

post-844-0-85193100-1367462630_thumb.png

 

 

Cool!

 

If this were a regular dialog tree, we would be worried, because there is a huge set of loops around a48 and a56, but the good news for this friend talk is that is the Expected Behavior™ - it is the coding example of returning to a panel of options, and letting players try out different options.

Link to comment

So where's that orphan? Did you crop the graph?

I haven't used dot much, but I'm pretty sure you can add coloring, which would help detecting orphans and dangling states.

Link to comment

I cleaned up the file, since it was a false one I added - I am sure I will find a real one :)

 

I have had about an hour or so with the .dot basics, but it supports all sorts of cool things, including sub-graphing of sets of nodes, coloration, different lines, etc. Very interesting stuff.

Link to comment

aran_charmed_dialog.svg should render in most browsers - older Internet Explorer versions *might* need a plugin, but I don't think so.

 

 

Hover over a box, link, or pathway to see the text. Now I just ned to look for a way of making the lines bigger (so it is easier to hover over the right spot to get the tooltip).

 

Yep, I am easily amused. But this might come in very handy for troubleshooting those 'layers within layers' dialog trees!

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...