X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=data.sh;h=1ba13706f975cf909af1d3f3c0d34e03582ef128;hb=21be08a919cb5df4a62a4b480e17683a2d23187f;hp=be6b3fb6cd366cd8f89f17e0d64e6af81944a06e;hpb=e2e8d7182f624156a03867d4623bdfe9754207ea;p=flarejs diff --git a/data.sh b/data.sh index be6b3fb..1ba1370 100755 --- a/data.sh +++ b/data.sh @@ -2,7 +2,7 @@ printf 'gamedata = {\n' for base in mods/fantasycore mods/empyrean_campaign; do - find $base/animations -name '*.txt' |while read -r file; do + find $base/animations $base/engine -name '*.txt' |while read -r file; do file="${file#"${base}"}" printf '"%s": {\n' "$file" sed -E ' @@ -45,6 +45,19 @@ for base in mods/fantasycore mods/empyrean_campaign; do # frame list end s;("frames": []\n,0-9 [-]+),;\1\n],;g; + # layer group (in engine/hero_layers.txt) + s;\nlayer=[0-9],([^\n]+)\n;\nlayers: [\1]\n;; + :layer_1 + s;(\nlayers: [^\n]+)\nlayer=[0-9]+,([^\n]+)\n;\1,[\2]\n;; + tlayer_1; + :layer_2 + s;(\nlayers: [^\n"]*)([],[])([^\n]*\n);\1"\2"\3;; + tlayer_2; + :layer_3 + s;(\nlayers: [^\n]+)""([^\n]+\n);\1\2;; + tlayer_3 + s;\nlayers: "([^\n]+)"\n;\nlayers: [\1],\n;; + # animation duration s;\n(duration)=([0-9]+)ms\n;\n"\1": \2,\n;g s;\n(duration)=([0-9]+)s\n;\n"\1": \2000,\n;g