EasyRPG / Tools

Assorted tools to handle RPG Maker 2000/2003 files
https://easyrpg.org/tools/
50 stars 18 forks source link

Add new Tool LcfViz #50

Closed Ghabry closed 4 years ago

Ghabry commented 4 years ago
lcfviz -r "Yume Nikki" 932 | sfdp -Goverlap=false -Gsplines=true -Tpng -o graph.png

Options:
  -d, --depth DEPTH  Maximal depth from the start node (default: no limit)
                     Enables unreachable node detection (-r)
  -h, --help         This usage message
  -o, --output FILE  Output file (default: stdout)
  -r, --remove       Remove nodes that are unreachable from the start node
  -s, --start ID     Initial node of the graph (default: start party position)

bla-fs8

Ghabry commented 4 years ago

Jenkins: test this please

Ghabry commented 4 years ago

Well, graph theory is hard :P

The way how I tracked the visited flag for depth search was incorrect, failed when the node was seen on a higher depth first. Now it recurses to "infinity" but it has a cycle detection: When the node was already seen on a lower level it aborts the recursion.

Ghabry commented 4 years ago

Sorry there was an off-by-one error in the "depth limit" argument. Now the tool is "finished" (and mergeable)