I still hope to do this in D3.js someday, but D3 is a bit daunting to learn. However! I finally did a bit more work on this the past few weeks.
It all started when I happened upon a python module called Rich, which can make good-looking trees. I used it to make the following:
It’s still just a prototype, but it can already open and close branches and analyze a scene’s stats.
Then I made Choicescript Analyzer which converts it back into graphviz after condensing the tree down to just the parts relevant to analyzing the tree for the different values all the stats can be. This was the hardest part for me when making games, so I’m really excited. I’m going to make a new post about just this tool now.