dantman / elite-vr-cockpit

A SteamVR Overlay providing a virtual throttle and joystick and holographic buttons for ship functions, with custom integration into Elite Dangerous
Other
320 stars 36 forks source link

Odyssey StartPreset.start breaks binding parser #268

Open iancclark opened 3 years ago

iancclark commented 3 years ago

Odyssey seems to split the bindings by transport mode, and changes the "StartPreset.start" in such a way that Elite VR Cockpit's parser dies with:

ArgumentException: Illegal characters in path.
  at System.IO.Path.Combine (System.String path1, System.String path2) [0x00057] in <567df3e0919241ba98db88bec4c6696f>:0 
  at EVRC.EDStateManager.GetControlBindingsFilePaths () [0x00055] in <54aeff0c4da44cf6bd80a187876b572c>:0 
  at EVRC.EDStateManager.LoadControlBindings () [0x00000] in <54aeff0c4da44cf6bd80a187876b572c>:0 
  at EVRC.EDStateManager.Start () [0x00006] in <54aeff0c4da44cf6bd80a187876b572c>:0 

Simply renaming the Odyssey StartPreset.start to something else (e.g. StartPreset.start.ody) should get you running with Elite VR Cockpit again.

New format: StartPreset.start.ody.txt

I've never built a Unity project, so I'm afraid I wouldn't know where to start with proving a patch. Happy to try if someone points me at a guide. Thanks.

Update: Not so sure this is down to StartPreset.start any more. It is still possible to fix by loading Horizons, making a change to bindings, applying and restarting Elite VR Cockpit. You can then (if you want to brave the Odyssey VR bugs) quit Horizons, leave EVRCP running, start Odyssey and play.

dantman commented 3 years ago

Figuring out which line is for which transport mode would be a good start

iancclark commented 3 years ago

Sure. I set each section to a different preset (keyboard/custom/joystick/mouse) and found the following order: General Ship SRV On foot

I don't suggest you spend too much time on this, as it only breaks when bindings are changed, can be fixed by changing bindings in Horizons and Odyssey isn't really playable in VR yet. Perhaps just catch the "there are newlines in startpreset" and either split it and wrap a loop to populate controlBindingsPaths or coerce it to "Custom" like the blank case.

Thanks!

dantman commented 3 years ago

Oh, Ship and SRV get their own separate binding sets. That was unexpected.

iancclark commented 3 years ago

If you use custom it's still all in one XML file. I attach my binds as an example.

Custom.4.0.binds.txt

I suppose this allows people to reset just one section to "standard" bindings leaving custom settings alone in other sections.