JoyPro2 Discord GitHub
Engine (CLI)

engine bf2042 (Battlefield 2042)

Show:

6 commands of engine bf2042. Each with every option and every value it takes, what it does, which GUI buttons use it, and an example.

#engine bf2042 paths

written
engine bf2042 paths
For beginners

Shows where JoyPro finds Battlefield 2042's binds on this PC: the settings profiles under %USERPROFILE%\Documents\Battlefield 2042\settings\, normally PROFSAVE_profile. Detect in the import wizard's Expert import section runs it.

engine bf2042 paths --text
Advanced
  • No options. Listed: your own config location of engine games config set first, then every *_profile file in the settings folder and its subfolders that has key bind lines, a multiplayer profile first, then the newest.
  • Read-only; also works when the game is not installed or switched off.
Technical internals
  • Output: JSON (Game, DisplayName, ConfigPaths, Warnings), or with --text Battlefield 2042 Config Paths, Paths: <n> and the files. Exit code 0; an unknown option fails with Unknown Battlefield2042 paths argument(s): ....
  • Related: engine bf2042 scan, engine bf6 paths; game page battlefield.

What it does Lists where JoyPro looks for this game's controls on this machine: files, folders or registry keys (your config location from games config set first). A file the game has not written yet can be listed (e.g. Arma Reforger's JoyPro.conf, Project Wingman's Input.ini).

Example

engine bf2042 paths --text

#engine bf2042 catalog

written
engine bf2042 catalog
For beginners

Lists the Battlefield 2042 actions JoyPro knows: the jet and helicopter controls, each with axis or button.

engine bf2042 catalog --text
Advanced
  • No options; read-only, also when the game is not installed.
  • Before a list was built from your settings profile, JoyPro lists its own table of the jet and helicopter controls (the same as for Battlefield 6); engine bf2042 refresh-db, or the first scan, import or export, replaces it.
Technical internals
  • Output: JSON (Game, Source, Actions with Id, Title, IsAxis, Category, Warnings), or with --text one line per action <id> | axis|button | <category> | <title>. Exit code 0.
  • File: %LOCALAPPDATA%\JoyPro2\GameData\DB\Battlefield2042\actions.tsv.
  • Related: engine bf2042 refresh-db, engine bf6 catalog; game page battlefield.

What it does Lists every action of JoyPro's command list of this game with its kind and category: <data>\GameData\DB\<Game>\actions.tsv, else the program folder's DB\<Game>.

Example

engine bf2042 catalog --text

#engine bf2042 scan

written
engine bf2042 scan [<config-path>] [--path <config-path>] [--ignore-device <name>] [--ignore-devices <csv>]
For beginners

Shows the jet and helicopter binds of Battlefield 2042's settings profile, joystick binds and keyboard keys, without changing your profile or the game. Look first in the import wizard runs it.

engine bf2042 scan --text
Advanced
  • Reads the jet and helicopter lines of PROFSAVE_profile (the file engine bf2042 paths lists first) or of the file given (positional or --path); the line format is the same as Battlefield 6's.
  • Keyboard keys of button actions are listed without --include-keyboard. Joystick binds are shown on the vJoy device in virtual mode, else on the first connected game controller, with a warning (the numbering is provisional).
  • --ignore-device <name> / --ignore-devices <a;b> leave the binds of those devices out.
  • Safety: reads only, also while the game runs; a fresh install first builds and saves the command list. Refused when the game is not installed or switched off in Settings > Games.
Technical internals
  • Output: JSON (Game, Action scan, ConfigPath, BindingsRead, Bindings, Steps, Warnings, Errors), or a text report with --text.
  • Exit code 0; 1 on an error (No Battlefield 2042 config file found. Pass the path explicitly.). Unknown options fail with Unknown Battlefield2042 scan argument(s): ....
  • Related: engine bf2042 import, engine bf6 scan; game page battlefield.

What it does Reads the game's controls (its control file or folder, or registry values for Nuclear Option and Tiny Combat Arena; Ace Combat 8 stores none) and shows the joystick binds, without changing the profile. Without a command list yet (fresh install) it first builds the list from the game and saves it.

OptionValuesMeaning
--path<config-path>Optional explicit path override. Use when you prefer option form over positional path.
--ignore-device<name>Leave the binds of this device out (one per flag; a name without {GUID} means every device of that name). Example: --ignore-device 'vJoy Device'.
--ignore-devices<csv>Leave the binds of these devices out (separated by commas, | or ;). Example: --ignore-devices 'vJoy Device,Old Pedals'.

In the game Reads Battlefield 2042's files only; nothing changes in the game. A scan only shows what an import would bring and does not change the profile. Battlefield 2042 details · what each mode changes

Example

engine bf2042 scan --text
How the options interact
  • --ignore-device / --ignore-devices leave the binds of those devices out of the scan or import (the result names how many).

#engine bf2042 import

written
engine bf2042 import [<config-path>] [--path <config-path>] [--replace] [--include-keyboard] [--ignore-device <name>] [--ignore-devices <csv>]

--ignore-device(s): the binds of these devices are left out

For beginners

Reads the jet and helicopter binds of Battlefield 2042 from its settings profile into your JoyPro profile: keyboard keys when you ask for them, and joystick binds (with a warning). Nothing in the game changes. The GUI runs it with Import on the Battlefield 2042 card of the Start page.

engine bf2042 import --include-keyboard --profile "C:\Users\Pilot\Documents\JoyPro\My Sticks.pr0file" --text
Advanced

It reads %USERPROFILE%\Documents\Battlefield 2042\settings\PROFSAVE_profile, the same line format as Battlefield 6.

  • Default: adds to the open profile (--merge means the same); --replace replaces every relation of the profile by what the file has.
  • --include-keyboard also reads the keys of the jet and helicopter button actions; joystick binds come with a warning (numbering not confirmed yet).
  • Safety: reads only, not refused while the game runs; the profile is kept as "Before import from Battlefield 2042" first.
  • --ignore-device <name> / --ignore-devices <a;b> leave the binds of those devices out (a name without {GUID} means every device of that name); a step line says how many binds were left out.
Technical internals
  • Output: JSON of the import result or a text report with --text; exit code 1 on an error (No Battlefield 2042 config file found. Pass the path explicitly.).
  • Without a path it reads the file engine bf2042 paths lists first; before the first import JoyPro lists its own table of the actions.
  • With --profile the profile is saved afterwards; a game JoyPro never exported to is watched from now on.
  • Related: engine bf2042 scan, engine bf2042 export, engine bf6 import; game page battlefield.

What it does Imports the game's joystick binds into the loaded profile (merged by default; --replace starts from an empty relation list). Without a command list yet it first builds the list from the game.

OptionValuesMeaning
--path<config-path>Optional explicit path override. Use when you prefer option form over positional path.
--replaceswitch (no value)For game import: start from an empty relation list instead of merging into the loaded profile.
--include-keyboardswitch (no value)
--ignore-device<name>Leave the binds of this device out (one per flag; a name without {GUID} means every device of that name). Example: --ignore-device 'vJoy Device'.
--ignore-devices<csv>Leave the binds of these devices out (separated by commas, | or ;). Example: --ignore-devices 'vJoy Device,Old Pedals'.

In the game Reads Battlefield 2042's files only; nothing changes in the game. The binds come into the profile as relations; JoyPro's own data next to the game file brings back names, groups, modifiers and curves. Battlefield 2042 details · what each mode changes

Example

engine --profile 'C:\JoyPro\profiles\pilot_main.pr0file' bf2042 import --text
How the options interact
  • --ignore-device / --ignore-devices leave the binds of those devices out of the scan or import (the result names how many).

#engine bf2042 export

written
engine bf2042 export [<config-path>] [--path <config-path>] [--mode clean|add|merge|merge-overwrite] [--dry-run] [--include-keyboard] [--nuke-untouched-devices] [--ignore-device <name>] [--ignore-devices <csv>]

Only aircraft/helicopter actions: clean and nuke release those on the written / unused devices; --ignore-device(s) and --vjoy-tunnel devices are never cleared

For beginners

Writes the keyboard keys of your jet and helicopter relations into Battlefield 2042's settings profile, with --include-keyboard. Joystick binds are listed as not written until the game's numbering is confirmed. Close the game first. The GUI's Export now on the Battlefield 2042 card runs it.

engine bf2042 export --mode clean --include-keyboard --profile "C:\Users\Pilot\Documents\JoyPro\My Sticks.pr0file"
Advanced

It writes every *_profile of Documents\Battlefield 2042\settings\ that holds binds. Only jet and helicopter slots change.

--mode In the profiles
add a bind whose input another action of the same vehicle uses gets a mark "Not written to the game"
merge the other action's slot on the profile's input is freed; the action's bound slots stay
merge-overwrite (engine default) as merge, and the action's other slots (keys with --include-keyboard) are freed
clean (GUI default) the flight slots of what the export writes are freed
  • --nuke-untouched-devices: no other device to clear, the game reads one joystick.
  • Joystick binds are not written while the numbering is unconfirmed (warning); only the device with the most binds would count.
  • Never touched: infantry, ground vehicle, transport and gunner binds, mouse and pad slots, keys on axis actions, keys without --include-keyboard, joystick slots, the binary PROFSAVE files.
  • Safety: refused while BF2042 runs; backed up first (undo: engine backups list); the profile is kept as "Before export to Battlefield 2042". --dry-run writes nothing.
Technical internals
  • Output: JSON of the export result or a text report with --text; exit code 1 on an error (the game runs, an invalid --mode, a profile that cannot be written).
  • Without a path it writes the profiles in the folder of the file engine bf2042 paths lists first.
  • After a real run: <profile>.joypro-meta.json, the watcher's fingerprint, the export marks.
  • Related: engine bf2042 import, engine vjoy mode (Battlefield2042 virtual), engine bf6 export; game page battlefield.

What it does Writes the profile's binds for this game. Only the flight actions JoyPro manages are changed, the game must be closed, and the game's files are backed up first (engine backups). Without a command list yet it first builds the list from the game.

OptionValuesMeaning
--path<config-path>Optional explicit path override. Use when you prefer option form over positional path.
--modeclean add merge merge-overwriteExport mode for DCS/IL2 export commands: clean, add, merge, merge-overwrite.
--dry-runswitch (no value)Report what the export would write; the game's files are not changed.
--include-keyboardswitch (no value)
--nuke-untouched-devicesswitch (no value)DCS export only: delete untouched device .diff.lua/.jp files under Config\\Input (true/false).
--ignore-device<name>Exclude one device per flag. Example: --ignore-device Keyboard.
--ignore-devices<csv>Exclude devices, separated by commas, | or ;. Example: --ignore-devices Keyboard,Mouse.
Every value as a command line
engine bf2042 export --mode clean
engine bf2042 export --mode add
engine bf2042 export --mode merge
engine bf2042 export --mode merge-overwrite

In the game Writes into Battlefield 2042's control files while the game is closed (refused while it runs), after a backup. Arcade flight games and shooters that read one joystick, only Xbox pads, or a fixed layout (docs: one-device-games.md). Bind file: Documents\Battlefield 2042\settings\PROFSAVE_profile (text). Battlefield 2042 details · what each mode changes

Example

engine --profile 'C:\JoyPro\profiles\pilot_main.pr0file' bf2042 export --dry-run --text engine --profile 'C:\JoyPro\profiles\pilot_main.pr0file' bf2042 export --mode merge-overwrite --text

#engine bf2042 refresh-db

written
engine bf2042 refresh-db [<source-path>] [--path <source-path>] [--dry-run]

Rebuilds the catalog from the installed game or <source-path>: actions the game no longer has are dropped; writes it only when it changes

For beginners

Builds JoyPro's Battlefield 2042 command list from your own settings profile: every jet and helicopter control it has. Update on the Battlefield 2042 card of the Start page runs it.

engine bf2042 refresh-db --text
Advanced
  • Reads the file engine bf2042 paths lists first, or a PROFSAVE..._profile file given as path; a folder given as path is searched (with its subfolders) for the profile with binds.
  • The list is rebuilt from the profile. --dry-run writes nothing; otherwise the list is written only when it changed.
  • Refused when Battlefield 2042 is not installed or switched off in Settings > Games; the game may run.
Technical internals
  • Output: JSON of the refresh (DryRun, FilesWritten, Steps with Actions: <old> -> <new>, Warnings, Errors), or a text report with --text.
  • Exit code 0; 1 when no profile is found (No Battlefield 2042 settings profile found (start the game once, or pass the PROFSAVE..._profile file).).
  • Writes %LOCALAPPDATA%\JoyPro2\GameData\DB\Battlefield2042\actions.tsv.
  • Related: engine bf2042 catalog, engine bf6 refresh-db; game page battlefield.

What it does Rebuilds the catalog from the installed game or <source-path>: actions the game no longer has are dropped; writes it only when it changes.

OptionValuesMeaning
--path<source-path>Same as <source-path>: the game's installation or a file of the game to read the actions from.
--dry-runswitch (no value)Report what the command would do; nothing is written or changed.

Example

engine bf2042 refresh-db --text