pod bundle: explicit app-level config, and the registry profile catches up

The portable config a bundle shipped carried only Profiles, so every app-level
setting - ports, baud, poll rate - rode whatever that build of RIOJoy compiled
in. That matched today and would drift invisibly the day a default changes or
the FastRIO path moves AnalogPollMs. The generated config now writes them out,
so a bundle says what it runs with. Verified by building the Descent 3 bundle
and parsing the result.

profiles/descent3.json was a pre-cockpit draft: old button layout, no explicit
ports, no overlay labels. Replaced verbatim with the flown-and-confirmed Tesla
profile from the game's own repo (Descent3 venue/riojoy/tesla.riojoy.json,
which pack-dist feeds to build-pod and is the canonical copy) - explicit
COM1/COM2, the 30-mapping layout, afterburner on the thumb.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-08-01 20:59:17 -05:00
co-authored by Claude Opus 5
parent 870a8a257d
commit 63bdb2c1da
2 changed files with 103 additions and 86 deletions
+17 -2
View File
@@ -92,8 +92,23 @@ try {
} }
# 2. Portable config beside the exe (ConfigLocator picks it over %APPDATA%): # 2. Portable config beside the exe (ConfigLocator picks it over %APPDATA%):
# an AppConfig wrapping just this game's profile, verbatim. # an AppConfig wrapping this game's profile, verbatim, plus the app-level
$configJson = "{`n `"Profiles`": [`n$profileText`n ]`n}" # settings written out explicitly. A config that carries only Profiles
# leaves every app-level value to whatever this build of RIOJoy compiles
# in - which happens to match today, and would drift invisibly the day a
# default changes or a pod needs tuning (the FastRIO path will move
# AnalogPollMs). A pod bundle should say what it runs with.
$configJson = @"
{
"DefaultRioComPort": "COM1",
"DefaultPlasmaComPort": "COM2",
"RioBaudRate": 9600,
"AnalogPollMs": 55,
"Profiles": [
$profileText
]
}
"@
Set-Content -Path (Join-Path $appOut 'config.json') -Value $configJson -Encoding utf8 Set-Content -Path (Join-Path $appOut 'config.json') -Value $configJson -Encoding utf8
Set-Content -Path (Join-Path $pkgDir 'VERSION.txt') -Value "RIOJoy pod bundle $version ($Flavor) - $($profileDoc.Name)" -Encoding utf8 Set-Content -Path (Join-Path $pkgDir 'VERSION.txt') -Value "RIOJoy pod bundle $version ($Flavor) - $($profileDoc.Name)" -Encoding utf8
+86 -84
View File
@@ -1,12 +1,10 @@
{ {
"Name": "Descent 3", "Name": "Tesla",
"MatchExecutables": [ "MatchExecutables": [ "Descent3" ],
"Descent3", "RioComPort": "COM1",
"d3" "PlasmaComPort": "COM2",
],
"PlasmaGreeting": "DESCENT 3", "PlasmaGreeting": "DESCENT 3",
"WallpaperPath": null, "WallpaperPath": null,
"OverlayLabels": {},
"Calibration": { "Calibration": {
"InvertX": false, "InvertX": false,
"InvertY": false, "InvertY": false,
@@ -17,85 +15,89 @@
"EnableZR": true "EnableZR": true
}, },
"AxisRouting": { "AxisRouting": {
"X": { "X": { "Target": "LeftThumbX", "Mode": "Centered" },
"Target": "LeftThumbX", "Y": { "Target": "LeftThumbY", "Mode": "Centered" },
"Mode": "Centered" "Z": { "Target": "RightThumbY", "Mode": "UnipolarPositive" },
}, "Rx": { "Target": "None", "Mode": "Centered" },
"Y": { "Ry": { "Target": "None", "Mode": "Centered" },
"Target": "LeftThumbY", "Rz": { "Target": "RightThumbX", "Mode": "Centered" }
"Mode": "Centered" },
}, "Feedback": {
"Z": { "AllowLampCommands": true,
"Target": "RightThumbY", "AllowPlasmaText": true,
"Mode": "UnipolarPositive" "Rumble": null
},
"Rx": {
"Target": "None",
"Mode": "Centered"
},
"Ry": {
"Target": "None",
"Mode": "Centered"
},
"Rz": {
"Target": "RightThumbX",
"Mode": "Centered"
}
}, },
"Buttons": { "Buttons": {
"16": 32822, "47": 32817,
"17": 32823, "46": 32818,
"18": 32824, "45": 32819,
"19": 32825, "44": 32820,
"20": 32816, "43": 32821,
"21": 32777, "42": 32822,
"24": 32781, "41": 32823,
"28": 34991, "40": 32824,
"29": 34990,
"32": 32817, "39": 32825,
"33": 32818, "38": 32816,
"34": 32819,
"35": 32820, "18": 32840,
"36": 32821, "17": 32850,
"37": 32850, "16": 32777,
"56": 67,
"57": 68, "15": 32954,
"58": 88, "14": 32990,
"59": 65, "13": 32989,
"60": 4101, "12": 32987,
"62": 4102, "11": 32956,
"63": 83, "10": 32958,
"64": 4097, "8": 32988,
"65": 8194,
"66": 8192, "61": 32781,
"67": 8193, "63": 32858,
"68": 8195,
"69": 188, "64": 36865,
"70": 190, "65": 40962,
"71": 4099, "66": 40960,
"80": 48, "67": 40961,
"81": 49, "68": 40963,
"82": 50, "69": 36868,
"83": 51, "70": 36867,
"84": 52, "71": 36866
"85": 53, },
"86": 54, "OverlayLabels": {
"87": 55, "b-2F": "WPN 1",
"88": 56, "b-2E": "WPN 2",
"89": 57, "b-2D": "WPN 3",
"90": 9, "b-2C": "WPN 4",
"91": 66, "b-2B": "WPN 5",
"92": 82, "b-2A": "WPN 6",
"95": 70, "b-29": "WPN 7",
"96": 28672, "b-28": "WPN 8",
"97": 28673,
"98": 28674, "b-27": "WPN 9",
"99": 28675, "b-26": "WPN 10",
"100": 28676, "b-10": "AUTOMAP",
"101": 28677, "b-11": "REAR VIEW",
"102": 28678, "b-12": "HEADLIGHT",
"103": 28679,
"104": 28680, "b-0F": "CM PREV",
"105": 28681 "b-0E": "CM NEXT",
"b-0D": "INV NEXT",
"b-0C": "INV PREV",
"b-0B": "CYCLE PRI",
"b-0A": "CYCLE SEC",
"b-08": "INV USE",
"b-3D": "PANIC / CM",
"b-3F": "REVERSE",
"b-40": "FIRE",
"b-41": "SLIDE DN",
"b-42": "SLIDE UP",
"b-43": "SLIDE R",
"b-44": "SLIDE L",
"b-45": "AFTERBURN",
"b-46": "FLARE",
"b-47": "MISSILE"
} }
} }