generate_graph is a tool that generates the image shown below.
Or generally, it generates a graph of maps from a FLARE (game) mod.
It does so by traversing maps and extracting relevant "map connections".
It is kinda "untyped", relying on regular expressions, yet it works just fine on the empyrean campaign (and probably others).
data_dir="/path/to/mod/" ./generate_graph.py | tee output.graphviz | dot -Tpng > output.pngAdditionally, you can set environment variables:
directional=1 to force direction similar to game progression (default=1),
print_npc=1 to print npc map connections (default=1),
print_dead=1 to print/draw unreachable map nodes (default=0),
graphviz_prefix to specify a Graphviz prefix file (default=prefix.dot),
graphviz_suffix to specify a Graphviz suffix file (default=suffix.dot).
Also, you can replace "png" with "svg" or many other other picture formats,
see dot (graphviz) for documentation on that.
There are also two legacy bash scripts that generate map without sorting. Unfortunately, the main smart algo does not differ much from it if you have crazy connected map tiles (hyperspace, I'm looking at you). So if you don't care about sorting, you can use the much simpler bash scripts in this repo to generate graphviz file contents. In this case, use:
./generate_graph.sh /path/to/mod/mapsInstall "graphviz" package.
GPLv3+
