Tools to extract weapon, vehicle, etc. data from Arma 3, and package it into a neat JSON databases for further use.
| Directory | Description |
|---|---|
arma-scripts |
SQF scripts to extract data from the Arma 3 |
Vehicle and weapon data must be dumped from Arma 3 by using the SQF scripts in the arma-scripts directory. Follow the procedure below:
- Run Arma 3 with the full PXG modpack.
- Host a multiplayer game with any PXG template.
- Open the SQF script for the type of data you want to dump, and copy its contents (without the leading comments at the top). For example, to dump vehicle data, copy the contents of
/arma-scripts/dump-vehicles.sqfto the system clipboard. - When deployed as a player on the map, press ESC. Paste the script into the big window for code execution, and press
LOCAL EXECbelow it. - Open your favourite text editor, like Notepad++ or Vim (not word processor!), and paste the contents of the system clipboard in it. Save it as something like
vehicles.dat. - If detailed turrets data is desired, repeat the procedure with the script
/arma-scripts/dump-weapons.sqf, and save the data toweapons.dat.
Once you've collected the data dumps from Arma, use the Python script, makedb.py, to process the data into a fairly usable JSON database.
If detailed turret data is not required, use only the vehicles data dump:
makedb.py -v vehicles.dat -o motorpool.jsonTo include the detailed turret data, make use of the weapons dump as well:
makedb.py -v vehicles.dat -w weapons.dat -o motorpool.jsonNote that weapon data will only be applied to the turret IDs, that exist in the weapons dump. Non-existent IDs will be left as pure strings.
In both cases, the resulting file will be written to motorpool.json in the current working directory. It will overwrite anything previously there!
Magazine dump can be read by specifying the -m option, but is not used at the moment.
To make a database of faction motorpools, PXG templates are required. Get them from the Templates repo. Then use the following command:
makedb.py -f 'Templates/PXG_Map/Scripts/Factions' -o factions.jsonThe path to the Factions directory can point to the Scripts/Factions subdirectory of any PXG map template.
Again, the program will overwrite anything with the path, specified after the -o flag.
To be introduced to the full range of command line options, run:
makedb.py -hTo make the script show additional information, use the -d flag. It's pretty nice.