4.6.1 • Published 1 year ago

arx-level-json-converter v4.6.1

Weekly downloads
3
License
GPL-3.0-or-later
Repository
github
Last release
1 year ago

arx-level-json-converter

Converts Arx Fatalis level data to JSON or YAML and vice versa.

IMPORTANT: Arx Fatalis files are partially compressed. See "compression" section for more info

installation

npm i arx-level-json-converter -g

This will give you access to the following commands, both do the same:

  • arx-level-json-converter
  • arx-convert

Requirements

nodejs 18+ (because the lib uses prefix-only core modules)

format of the commands

arx-convert <inputfile> --from=<format> --to=<format> --output=<outputfile> --prettify

the inputfile and --output parameters can be omitted and then the code can be used in pipelines

cat <inputfile> | arx-convert --from=<format> --to=<format> > <outputfile>

the format parameter can be one of the following arx formats: dlf, llf, fts

work in progress formats: ftl and tea

and it can also a data format for the other side: json and yaml(can also be spelled as yml)

examples

# print out version
--version
-v

# convert an unpacked fts file to a json through piping
cat fast.fts.unpacked | arx-convert --from=fts --to=json --prettify > fast.fts.json

# convert an unpacked dlf file to a minified json through files
arx-convert level8.dlf.unpacked --from=dlf --to=json --output=level8.dlf.min.json

# convert a json to an unpacked dlf
cat level8.dlf.min.json | arx-convert --from=json --to=dlf > level8.dlf.repacked

# convert json to an unpacked fts
arx-convert fast.fts.json --from=json --to=fts --output=fast.fts.repacked

# convert an unpacked dlf to yaml
cat level8.dlf.unpacked | arx-convert --to=yaml --from=dlf > level8.dlf.yml

# convert yaml to an unpacked dlf
cat level8.dlf.yml | arx-convert --from=yaml --to=dlf > level8.dlf.repacked

Compression

Arx Fatalis files are partially compressed with Pkware and you need a separate tool for unpacking/repacking: node-pkware

Also, Arx Fatalis file headers are not constant in size, but there is a tool that can give you the exact offset you need to pipe into node-pkware: arx-header-size

Install these tools by running

npm i node-pkware arx-header-size -g

Example for unpacking

arx-header-size level3.dlf --ext=dlf # this will print out 8520
explode level3.dlf --offset=8520 --output=level3.dlf.unpacked
arx-convert level3.dlf.unpacked --from=dlf --to=yaml --output=level3.dlf.yml

Example for repacking

arx-convert level3.dlf.yml --from=yaml --to=dlf --output=level3.dlf.repacked
implode level3.dlf.repacked --offset=8520 --binary --large --output=level3.dlf
4.5.4

1 year ago

4.6.2

1 year ago

4.5.3

1 year ago

4.5.0

1 year ago

4.4.1

1 year ago

4.4.0

1 year ago

4.6.1

1 year ago

4.5.2

1 year ago

4.6.0

1 year ago

4.5.1

1 year ago

4.3.0

1 year ago

2.0.1

2 years ago

3.0.2

1 year ago

3.0.1

1 year ago

3.0.0

1 year ago

4.1.0

1 year ago

4.0.0

1 year ago

4.2.0

1 year ago

2.0.0

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.1.0

2 years ago

1.0.5

2 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.9.2

3 years ago

0.9.1

4 years ago

0.9.0

4 years ago

0.8.1

4 years ago

0.8.0

4 years ago

0.8.2

4 years ago

0.7.0

4 years ago

0.6.0

4 years ago

0.5.0

4 years ago

0.5.1

4 years ago

0.4.4

4 years ago

0.4.3

4 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.1

4 years ago