четверг, 19 апреля 2018 г.

FlareRPG: secret overworld

Hi! FlareRPG version 1.0 came out recently. I looked around a bit.
Then hailing Free and Open Source (FOSS) nature of the game I quickly "mapped" the maps of empyrean_campaign (the main SP game). Here's what I got:


Ah! You want some scalable format, e.g. PDF, for printing? Here.

How it's made? Easy:
#!/bin/bash

GAMEPATH=${GAMEPATH:-/usr/share/flare/mods/empyrean_campaign}

cd "$GAMEPATH"/maps

echo "digraph G {"

grep intermap * */* 2>/dev/null | \
    sed -E 's|[A-Za-z/]*maps/||g' | \
    sed -E 's|.txt[^=]*=| -> |' | \
    sed -E 's|.txt.*$||' | \
cat

grep -m1 title= * */* 2>/dev/null | \
    sed -E 's|[A-Za-z/]*/||g' | \
    sed -E 's|.txt:title=| [label="|' | \
    sed -E 's|$|"]|' | \
cat

echo "}"
Then convert with Graphviz:
$ dot -T pdf flare.intermap.dot > /tmp/flare.overworld.pdf
$ dot -T png flare.intermap.dot > /tmp/flare.overworld.png
Enjoy!

Комментариев нет:

Отправить комментарий