Open pmrowla opened 4 years ago
This sounds very interesting. The game I have is very complex. They made a kind of open world adventure game in this visual novel engine...
@Stefan311 have you tried using lmgraph? you can at least see how the lsb scripts call each other already
lmgraph
now has two separate sub-commands for generating graphviz DOT syntax graphs
lmgraph game
works the same as old lmgraph
. you pass it ゲームメイン.lsb
and it generates a DOT call graph for all the user-generated LSBs in a game.lmgraph lsb
generates a DOT execution graph for the commands within an LSB file.LMScript.walk()
has not been updated to use the new graph functionality yet
the output DOT files can be converted to viewable formats via graphviz, or in online graphviz viewers
ex lmgraph lsb
output (after converting an output DOT file to png w/graphviz):
...
lmgraph supports generating call trees on a broad per LSB file level, but it would be good to actually have trees for LSB command execution.
LMScript.walk()
should actually walk a tree (like os.walk), and yield blocks of commands at a time until any conditional or unconditional branch is reached, rather than the current naive search implementation. then the caller can choose which of the branches to actually follow (or none at all).basically now that we have the text and menu apis, we should be able to generate actual call trees for lsb's, showing the order scripts are actually run, and how branch points work (including both variable/flag based and menu based branching)