SCToolsfactory / SCJMapper-V2

SC Joystick Mapper (.Net 4; using sharpDX wrapper)
Other
137 stars 30 forks source link

Reinitialize empty does not work well in Star Citizen #95

Open harf4ng opened 4 years ago

harf4ng commented 4 years ago

Hi,

So, there is two ways to have a blank entry in configuration file. We can either "clear" the entry (and then the entry is white with no attribution, or we can "disable" the entry (and then the entry is greyed).

If we use the menu reinitialize / all blank (sorry if those are not the exact words in english, I have scj mapper in french), then it uses the first option, it put each entry at the "clear" state, so all blank. That is fine to me except that when you export than and then import that in star citizen, the entries in star citizen look weird instead of blank. Look at the screen here : https://i.postimg.cc/ncc7wvLT/Screen-Shot0013.jpg

Instead of that, if I use the "disable" option, then in star citizen it looks fine, I mean the lines do not have any attribution. That is to me the correct behaviour. Unfortunately there is no way to "disable" all entries at once. Doing that line by line is really long to do.

(Oh btw that would be great to have the possibility to "disable" only one controller, like js1 for instance, or mouse, or keyboard, and not all at once.)

I use of course now star citizen 3.9 but I had the same behaviour with older star citizen versions.

Thanks

bm98 commented 4 years ago

The issue with Clear in unclear.. to me as the 'cleared' ones should not be in the exported map anyway.. Would be great if you could send that xml that caused such a behavior.

For Disable - you can do this with the Toggle Table conveniently. (see quick guide) You have to choose the ones that should be listed in the table e.g. only joystick, Then check Edit and hit Disable all unmapped. If ok Accept the Edits, you can always map again in the main window.

image

If you then in the main window use Dump and Save XML you have all Joystick commands that you don't map disabled ...

harf4ng commented 4 years ago

Hi, Thanks for the tips. I'll try to explain better... (I have put the GUI in english to have correct words)

So, if I launch your app and then I go to reset, then "reset empty", I then get a blank file, with no binding at all. If I then dump this file to xml, then import it into star citizen, I get the screen I put in previous message with "_ (input65536)" lines, instead of just the blank lines I expected. But this is maybe an expected behaviour.

So in fact I have two issues... first, I would like to disable all bindings of a given device, not all. For instance I would like to disable all joystick bindings, and all gamepad bindings, but not mouse or keyboard bindings. I didn't find an easy way to do that except by editing the xml file with something like "atom", then I can use regex to find and replace the strings I want. The "disable all unmapped" is fine, if I start from a blank file, but then I have to start from a blank file for all devices, even keyboard. That would be great to be able to choose which one we want as blank and which one we want as default...

My second issue is that if I start from default, I have js1 assigned. But I don't want to use js1, as the stick I want to use is js6. So if I go into devices and put n/a for the first stick and js6 for the good stick I need (in fact I use a vjoy stick), then all js1 bindings go to jsx. Isn't there a way to change stick and rebind all js1 to js6?

This is not a really big issue as I still can use atom to edit the xml file.

So, sorry for all this. Though your mapping software is still a great one. And I like it a lot. Make it easy to go from one version to another, remove USER directory and still apply all our bindings again...

(Oh btw something strange too, if I disable the mouse binding to change speed limiter, the one binded by default on mousewheel, in star citizen it remains on mousewheel)

Thanks

bm98 commented 4 years ago

Could be that the game does not like empty maps ... on import (bug..) For the disable: If you use the menu Show - Toggle Table And there check the joystick box and then use Disable All - it should exactly do what you want. You cannot disable for a certain joystick e.g. js2_ - you can only assign to it. Think of it to assign a command to a joystick input that is never actuated.

This assigns v_view_yaw_left to js2_hat1left, when the joystick1 (js2..) inputs "hat1_left" the game finds a match and executes v_view_yaw_left.

    <action name="v_view_yaw_left">
            <rebind input="js2_hat1_left"   />
    </action>

But the following will override anything default with disable (but only the joystick part)

    <action name="v_view_yaw_left">
            <rebind input="js2_ "   />
    </action>

It does not matter if I use "js1 " or "js2 " for this. The game will overwrite its own mapping but then there is no joystick input that matches "js2_ " and so we call it disabled (think of cannot be actuated as there is no such joystick input ever).

For the 3rd one. I see what you mean. The Js Reassign takes the actions of a Device and reassigns a new js number but you cannot move the actions from one device to another one (I have to think about making this available) To do so you really need to edit the file and reload it i.e.

<!-- 5/2/2020 11:36:48 PM - SC Joystick Mapping - layout_my_x55_65txx -->
<ActionMaps version="1" optionsVersion="2" rebindVersion="2" profileName="my_x55_65txx" 
    js1="vJoy Device" js1G="47e6ef70-02d4-11e9-8002-444553540000" 
    js2="F16 MFD 1" js2G="d0d6ed60-7391-11ea-8001-444553540000" 
    js3="F16 MFD 2" js3G="d0d71470-7391-11ea-8002-444553540000" 
    js4="Saitek Pro Flight X-55 Rhino Stick" js4G="6f187bc0-5d28-11e7-8006-444553540000" 
    js5="X65F Flight Controller" js5G="a7663300-5deb-11e7-8001-444553540000" 
>

if you have something on js2 and want to have it on js3 - you need to edit the file manually if it is for all items. If you want to have js2 be new js6 then Reassign works. So if you map all to js1 by hand but the vJoy is on js6 and has the same inputs then you have to edit.

harf4ng commented 4 years ago

Hi, I'm unsure I understand well for the first issue. In show / toggle table, I just have a "disable all unmapped", so it allows me to disable what is unmapped. I havent a "disable all" that will disable everything. And that is what I would like, to disable everything from joysticks so I can start from a fresh new binding and bind what I want. Thanks

bm98 commented 4 years ago

Then go as follows. Menu: Reset - Empty Menu: Show - Toggle Table (all are unmapped - Urs.Binding) Check Joystick Check Edit 'Disabled' Hit Disable all Unmapped Hit Accept Edits Close Toggle Table Enter a new name for the Mapping Name Hit "Dump and Save" my Mapping -> Now you have a complete Empty map where all Joystick commands are disabled.

BTW that is in the Quick Guide on the last two pages (Hints - How to start with a complete disabled map) ...

harf4ng commented 4 years ago

Yes I know but resetting empty will reset all bindings to zero, even the keyboard isn't it? What I don't want.

So what I did was... I started with a default binding, then I edited the file in atom to disable all joystick commands.

Now I have a file empty of only joystick commands to start my binding, with gamepad and keyboard still there. Seems it works fine.

Thanks for all the tips BTW. Still have to figure out though why when I empty mouse commands like scroll wheel or buttons, they still are active in the game :)