JoyPro2 Discord GitHub
Engine (CLI)

engine p3d4 (Prepar3D v4)

Show:

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

#engine p3d4 paths

written
engine p3d4 paths
For beginners

Shows where JoyPro finds the control files of Prepar3D v4 on this PC, in %APPDATA%\Lockheed Martin\Prepar3D v4\Controls\, the active one first. Detect in the import wizard's Expert import section runs it.

engine p3d4 paths --text
Advanced
  • No options. Listed: your own config location of engine games config set first, then the active file (the name Prepar3D.cfg gives under [CONTROLS] Controls_Current, else Standard.xml), then every other .xml file of the folder.
  • Read-only; also works when the sim is not installed or switched off.
Technical internals

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 p3d4 paths --text

#engine p3d4 catalog

written
engine p3d4 catalog
For beginners

Lists the Prepar3D v4 events JoyPro knows: the sim's event names with axis or button and category.

engine p3d4 catalog --text
Advanced
  • No options; read-only, also when the sim is not installed.
  • JoyPro's own FSX/Prepar3D event list plus the events found in the sim's control files and presets, in a list of its own. A fresh install has no list yet; the first scan, import, export or engine p3d4 refresh-db builds it (until then: a warning and no action).
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\P3D4\actions.tsv.
  • Related: engine p3d4 refresh-db, engine fsx catalog; game page fsx-p3d.

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 p3d4 catalog --text

#engine p3d4 scan

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

Shows the binds of the active Prepar3D v4 control file, axes, buttons, hats and keyboard keys, without changing your profile or the sim. Look first in the import wizard runs it.

engine p3d4 scan --text
Advanced
  • Reads the device maps and the keyboard map of the file engine p3d4 paths lists first, or of the file given (positional or --path); devices are matched by the GUID in the map name, else by a unique name.
  • Keys are listed without --include-keyboard; sensitivity and null zone are read but not listed; an event that is not in the list yet gets a warning naming engine p3d4 refresh-db.
  • --ignore-device <name> / --ignore-devices <a;b> leave the binds of those devices out.
  • Safety: reads only, also while the sim runs; a fresh install first builds and saves the command list. Refused when the sim 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 Prepar3D v4 config file found. Pass the path explicitly.). Unknown options fail with Unknown P3D4 scan argument(s): ....
  • Related: engine p3d4 import, engine p3d4 catalog; game page fsx-p3d.

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 Prepar3D v4's files only; nothing changes in the game. A scan only shows what an import would bring and does not change the profile. Prepar3D v4 details · what each mode changes

Example

engine p3d4 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 p3d4 import

written
engine p3d4 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 active controls file of Prepar3D v4 into your JoyPro profile: axes, buttons and hats with each axis's sensitivity and null zone. Nothing in the sim changes. The GUI runs it with Import on the Prepar3D v4 card.

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

It reads %APPDATA%\Lockheed Martin\Prepar3D v4\Controls\Standard.xml, or the file Prepar3D.cfg names under [CONTROLS].

  • Default: adds to the open profile; --replace replaces every relation of the profile by what Prepar3D v4 has.
  • --include-keyboard also reads the keyboard map.
  • A device is found by the GUID in its map name, else by its name when exactly one connected device has it.
  • Safety: reads only, not refused while the sim runs; the profile is kept as "Before import from Prepar3D v4" 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 config file found).
  • Without a path it reads the first file of engine p3d4 paths; a fresh install builds the command list first (it also reads the sim's Standard.xmlx presets).
  • With --profile the profile is saved afterwards. The imported inputs are recorded as JoyPro's in <file>.joypro.json (so merge-overwrite can later replace them), and a game JoyPro never exported to is watched from now on.
  • Related: engine p3d4 scan, engine p3d4 export; game page fsx-p3d.

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 Prepar3D v4'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. Prepar3D v4 details · what each mode changes

Example

engine --profile 'C:\JoyPro\profiles\pilot_main.pr0file' p3d4 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 p3d4 export

written
engine p3d4 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>]

Flight only: clean takes over the devices it writes, nuke clears unused devices; --ignore-device(s) and --vjoy-tunnel devices are never cleared

For beginners

Writes your binds into the active controls file of Prepar3D v4. Close the sim first. The GUI's Export now on the Prepar3D v4 card runs it.

engine p3d4 export --mode clean --nuke-untouched-devices --profile "C:\Users\Pilot\Documents\JoyPro\My Sticks.pr0file"
Advanced

It edits the device maps of %APPDATA%\Lockheed Martin\Prepar3D v4\Controls\Standard.xml (or the active file).

--mode In the controls file
add never removes or replaces a block; a bind on a taken input is listed, not written
merge replaces the event on your input, keeps everything else
merge-overwrite (engine default) also removes the other inputs of the events you bind
clean (GUI default) the main maps of the devices you write keep only your binds
  • --nuke-untouched-devices empties the main maps of the other connected devices (not with add); --include-keyboard also writes the keyboard map.
  • Never touched: devices that are not connected, --ignore-device(s), the --vjoy-tunnel device, slew and mouse maps, Prepar3D's per-SimObject maps, Standard.xmlx.
  • Safety: refused while Prepar3D runs; backed up first (undo: engine backups list); the profile is kept as "Before export to Prepar3D v4". --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 sim runs, an invalid --mode, no file found).
  • Without a path it writes the first file of engine p3d4 paths.
  • After a real run: <file>.joypro.json and <file>.joypro-meta.json, the watcher's fingerprint, the export marks.
  • Related: engine p3d4 import, engine p3d5 export; game page fsx-p3d.

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 p3d4 export --mode clean
engine p3d4 export --mode add
engine p3d4 export --mode merge
engine p3d4 export --mode merge-overwrite

In the game Writes into Prepar3D v4's control files while the game is closed (refused while it runs), after a backup. Civil and general flight simulators. JoyPro takes over the devices it writes (clean and nuke clear every other bind of those devices). Bind file: %APPDATA%\Lockheed Martin\Prepar3D v4\Controls\Standard.xml (XML). Prepar3D v4 details · what each mode changes

Example

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

#engine p3d4 refresh-db

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

Reads the installed game or <source-path> and adds its new actions to the catalog, the known ones stay; writes it only when it changes

For beginners

Adds new events to JoyPro's Prepar3D v4 command list: JoyPro's own event list, then every event used in the sim's control files and presets. Update on the Prepar3D v4 card of the Start page runs it.

engine p3d4 refresh-db --text
Advanced
  • Rows the list already has stay; nothing is removed. Read without a path: the files of engine p3d4 paths, Standard.xml in the installation folder and the preset Controls\Standard.xmlx. A path: a folder reads every *.xml* file in it, a file only that file.
  • --dry-run writes nothing; otherwise the list is written only when it changed.
  • Refused when the sim is not installed or switched off in Settings > Games; the sim may run.
Technical internals
  • Output: JSON of the refresh (DryRun, FilesWritten, Steps with the new events per file and Actions: <old> -> <new>, Warnings), or a text report with --text.
  • Exit code 0; 1 only for a refusal or an unknown option.
  • Writes %LOCALAPPDATA%\JoyPro2\GameData\DB\P3D4\actions.tsv.
  • Related: engine p3d4 catalog, engine p3d5 refresh-db; game page fsx-p3d.

What it does Reads the installed game or <source-path> and adds its new actions to the catalog, the known ones stay; 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 p3d4 refresh-db --text