hw-data-compiler
Real simple tool for compiling extracted mod data. Point the script to the root of the mod, specify entity types to compile, watch it go.
Usage
- Clone this repo somewhere (
git clone https://github.com/HW-PlayersPatch/hw-data-compiler.git
) - Navigate into the cloned repo (probably with
cd hw-data-compiler
) and runnpm install
node main.js
is the command to run the script, it can take two flags:-w
: 'Write to file', writes the compiled data into a file calleddump.json
-db
: 'Write to database', writes the compiled data into an Atlas database according to variables in your.env
file (see below).
- Follow the prompts:
- Enter the root of the mod you want to compile (the directory containing the
keeper.txt
file) - Indicate which data categories you're interested in (comma seperated), valid arguments are
ship
,weapon
,subsystem
- Enter the root of the mod you want to compile (the directory containing the
- Data will be parsed and compiled, and written to the flagged destinations.
.env
The -db
flag expects certain variables to be present in a file called .env
. Create this file via touch
or however you like, make sure it's in the same directory as the mains script. Inside .env
, you need to supply four variables:
CLUSTER_USER_NAME
, the name of the cluster userCUSTER_USER_PASS
, the password of the cluster userCLUSTER_STR
, the connection string of the clusterCLUSTER_DB_NAME
the database to use
For example:
CLUSTER_STR=balcora-0jmga.mongodb.net/test?retryWrites=true&w=majority
CLUSTER_USER_NAME=Fear
CLUSTER_USER_PASS=my_password
CLUSTER_DB_NAME=game_data_playerspatch_11