tmedwards / sugarcube-2

SugarCube is a free (gratis and libre) story format for Twine/Twee.
https://www.motoslave.net/sugarcube/2/
BSD 2-Clause "Simplified" License
177 stars 41 forks source link

Complex state var management and debugging #198

Open felix9 opened 1 year ago

felix9 commented 1 year ago

For a project I'm working on, I've evolved a bunch of tools for managing state vars. I'm in middle of a rewrite to fix some problems, but it's been pretty useful so far, and I thought I'd describe what I have, because I'm willing to work on augmenting or replacing sugarcube's current debugging tools with similar functionality.

This is the var-info display I have at the top of every passage:

2022-10-21--19-27-55-Twine

Basics:

Big moods:

Assertions/constraints:

I'm also probably going to implement a checker to do depth-first traversal of the storygraph and report failed assertions.