I’m proud/happy/scared to announce the initial release of dgt - the Dialog Tool.
dgt is a tiny, specialized, highly opinionated command line tool used to build, debug, and test interactive fiction created with Dialog.
I’ve been using it while I translate Aaron Reed’s “Sand-dancer” to Dialog, and creating a threaded conversation library. Here’s what it looks like in action:
The core piece is the Skein, an interactive, web-based testing and debugging tool:
dgt encourages you to break your project up into many small files, and understands that some files must be included for debugging and testing, but not in a released game.
dgt includes commands for building your project, running it in the debugger or with frotz, and bundling your project for distribution.
Absolutely fantastic work! I’ve said before that I see Dialog as a very healthy friendly competitor to Inform 7. Part of that is, of course, building up an ecosystem around Dialog, which tooling like this encourages.
I’m not sure when I’ll get a chance to look at this; I’m still on Catalina, so if there’s brew packages that don’t exist yet for Big Sur (looks like colordiff may be in that category) I’m not sure what to do about it.
Dialog Tool is a CLI that makes it far easier to create projects using Dialog. It provides the missing tools to get started, debug and test your project, and bundle it for release.
Lots of details in the README, here’s a summary:
Dialog Tool is a command line tool for OS X. It installs with Homebrew.
Dialog Tool 2.0 is a complete rewrite. New features in 2.0:
dgt new - create a new, empty Dialog project
dgt skein - opens a web-based UI to test your project
dgt test - used the Skein to test your project
dgt bundle - bundles a project for upload, including a “play in your browser”
The Skein and the bundling code is heavily indebted to Inform 7.
The Skein is the most important part here; there’s a separate discussion about it. The Skein is like a transcript of you playing your game, including all the different branches you have taken. You will run the Skein as you build your project, and record into it how the project should play. Later, your can “Replay All” and the Skein will show you anything that’s changed, with an option to Bless (aka Approve) the changes — this is terrific for identifying regressions in your project’s logic.
I’d love some help with the Skein, especially in terms of making it a bit prettier. Ultimately, I hope for a more graphical nodes-and-lines UI like the one inside Inform. Further, I’d love to get it all working on Linux and Windows.
This is fantastic! And now I need to restructure my projects.
A feature that I’d really, really love to see would be the ability to run unit tests with testrunner.dg or similar, and be able to feed it which files make up a given test set, and recognize success and failure. (Since “test” is already used as a keyword, it’d need some other command, or have “unittest” and “skeintest” and then “test” rolls both of them up.) I’m using just a very simple and stupid shell script for that at the moment.
I’ve just rewritten the Skein UI in Svelte 5 and TypeScript and it’s making it easier to add yet more features; the next release will have (at least) an “Edit Command” for knots.
I’d love to hear back from anyone else using dialog-tool and the Skein.
Edit Command lets you change an existing command.
Insert Parent inserts a new command before a knot, reparenting the knot to this new parent.
Splice Out is the opposite, it removes a knot, and reparents the knot’s children to the removed knot’s parent.
In all of these cases, you should “Replay All” after adjusting the tree structure to find any unintended changes. Because of how Dialog’s random-number generator works, you may find that randomly chosen text (or other randomly-generated things) will be different lower in the tree after changing things higher in the tree.