Deceleration

Just downloaded Vega Strike and need help? Have a question but don't know where to start? Ask here.
Post Reply
Freiheitspirat
Insys Pilot
Insys Pilot
Posts: 2
Joined: Mon Jul 01, 2013 8:42 pm

Deceleration

Post by Freiheitspirat »

I just started the game with a Saitek X52 Joystick/Throttle and the tutor told me to "Dec(c)elerate to -20m/s", but this ist impossible.
The minus-key does not work because the throttle overrides the acceleration and only goes down to zero, not negativ.
How do i get a negativ decelaration with a throttle?
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Deceleration

Post by klauss »

Ehm... I think you can't.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
TBeholder
Elite Venturer
Elite Venturer
Posts: 753
Joined: Sat Apr 15, 2006 2:40 am
Location: chthonic safety

Re: Deceleration

Post by TBeholder »

Is it possible to calibrate it so it's -0.5..+0.5 instead of 0..+1?
Also, does what exactly the joystick does? Set 0 velocity at one axis physical limit and set max velocity at the other? Because in this case it may be easier to patch VS for understanding one more variable (or 3, for all-our-own internal calibration) for an axis.
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
Freiheitspirat
Insys Pilot
Insys Pilot
Posts: 2
Joined: Mon Jul 01, 2013 8:42 pm

Re: Deceleration

Post by Freiheitspirat »

The throttle itself works fine, but only from Zero to max velocity.
The only calibration is to adjust the deadzones (see attachment)

Which module do the Joystick requests?
Perhaps i can patch it and use a button as a decelerater/inverter (when pressed multiply the acceleration from the throttle by -1)...
You do not have the required permissions to view the files attached to this post.
CLoneWolf
ISO Party Member
ISO Party Member
Posts: 443
Joined: Thu May 01, 2008 5:14 pm

Re: Deceleration

Post by CLoneWolf »

You can always be creative and pull a "Kobayashi Maru" on that ;)
Kirk Style: You could simply unplug the joystick just for the tutorial, get past it, save, reconnect it and play on; that would resemble smashing the console with a hammer to gain full human-only navigation control...
Picard Style: Even more simply, you could temporarily pick a no joystick config and change it back once done, the tutorial is short enough not to cause joystick withdrawal symptoms :)
But I remember getting past it with a creative use of inertia, with joystick still connected.
(Not saying more for now, not to spoil the eventual fun :mrgreen: )

That said, this kind of mishap shouldn't happen IMHO especially in a tutorial...
Either the tutorial could be changed to require just a full stop (involving changes in script and voice acting, Turbo, you there?) or possibly the Decel key should stay engaged for long enough to make the tutorial react before the fast sampling rate of the throttle overrides it again... Thoughts?
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Deceleration

Post by klauss »

Freiheitspirat wrote:Which module do the Joystick requests?
Perhaps i can patch it and use a button as a decelerater/inverter (when pressed multiply the acceleration from the throttle by -1)...
You have in_joystick for the raw stuff, I think that includes the calibration, and flyjoystick for the translation into ship actions.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
TBeholder
Elite Venturer
Elite Venturer
Posts: 753
Joined: Sat Apr 15, 2006 2:40 am
Location: chthonic safety

Re: Deceleration

Post by TBeholder »

klauss wrote:You have in_joystick for the raw stuff, I think that includes the calibration, and flyjoystick for the translation into ship actions.
I think it's where a straightforward solution is the best. We'd have to add 3 attributes ("min", "max" and "zero") for a joystick or throttle axis format (config_xml) - like a hat axis have "nr" and "margin" of its own, except with defaults allowed.
Then simply scale them down - right before joystick/"clamp_axes" confvar is used in flyjoystick (so it still gets clamped when it wanders beyond those new limits):

Code: Select all

bool inverse = joystick[joy_nr]->axis_inverse[AXIS_X];
float axis_value = -joystick[joy_nr]->joy_axis[config_axis];
//->
float min_raw_value = joystick[joy_nr]->axis_min[config_axis];
float max_raw_value = joystick[joy_nr]->axis_max[config_axis];
float med_raw_value = joystick[joy_nr]->axis_med[config_axis];
axis_value -= med_raw_value;
axis_value = axis_value / (axis_value < 0) ? (med_raw_value-min_raw_value) : (max_raw_value-med_raw_value);
//<-
if (inverse) axis_value = -axis_value;
if (clamp_joystick_axes) {
  if (axis_value < -1)
    axis_value = -1;
  if (axis_value > 1)
  axis_value = 1;
}
Obviously, this also would allow to later add a private calibration tool and not rely on whatever functionality OS or bundled soft may or may not happen to provide.
BTW, splittable vegastrike.config would be a really, really good thing.
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Deceleration

Post by klauss »

I know, splittables are coming.

PS: Are you thinking of attaching a patch ? ;)
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
Post Reply