Don't joysticks work on TRS2019?

jcardana

Trainz Enthusiast
I have a GoFlight TQ-6 collecting dust on my shelf. It's a simple 6 axis joystick.

I have it installed and calibrated through Windows.

I have the "Enable game controller support" option checked on the General tab in the Trainz Launcher.

TRS2019 doesn't recognize it when I try to assign one of the axis to Cab Throttle.

Ever since Trainz 04(I think), joysticks have never worked.

I'm coming from TRS2012 and have never even touched T:ANE so is there something else I need to know?

Thank you for your time,
Joe
 
Joysticks have never worked in Trainz, Raildriver dose work and an Xbox controller may work in TRS19, I have not tested if it was put in or not.
 
Joysticks have never worked in Trainz, Raildriver dose work and an Xbox controller may work in TRS19, I have not tested if it was put in or not.

Way, way, way back in the early days of TRS19 long before it had a real product name, we used an X-Box controller to check the interface. It was all proof of concept back then and it worked mostly as intended.

I'm not sure if this works outside of Driver where we tested, nor do I think a regular Joystick works either.
 
This unfortunately seems limited to Raildrivers only at the moment so that anyone planning to use an axis controller that is not a raildriver seems required to write some small program that gets the axis, splits it into 9 areas and looks if you moved up or down to press W and Z keys accordingly... :eek:
(if anyone ever writes such a piece of software, sharing it would be nice... I would try so myself but none of the languages I know can grab controller info and virtually press keys)



Greets, Mika
 
Last edited:
(if anyone ever writes such a piece of software, sharing it would be nice... I would try so myself but none of the languages I know can grab controller info and virtually press keys)
Hmm... I'm still programming in VB6. I used to play with axis' before. My memory says it worked. I think there's a SendKeys command... I'll let you know.

Yes, I can read joysticks and send key commands. Scaling the values... kicking my butt.
 
Last edited:
Can be done still with JoyToKey. Play around with it, and the Stick/POV settings and axis mapping.

Didn't you tell me that before? ;) As a programmer, what's the fun in that? Yeah, I'll check it out. My wife's missing me.

I checked it out. It eliminated 2 of my axis' because they are assuming I'm using a normal joystick.
 
Last edited:
Yes, I can read joysticks and send key commands. Scaling the values... kicking my butt.
Well I assume you will get some percentage number (0 being one end of the axis, 1 being the other) in which case I would try to make an array with the limits of each position that you get by dividing 1 by number of throttle notches + 1 (idle position)

so in the case of 8 notches + idle = 1 / 9 you would end up with an array like [0.111, 0.222, 0.333, 0.444, 0.555, 0.666, 0.777, 0.888, 0.999] defining the center spots of each throttle position, then subtract the half of 1 / 9 from each array boundary so you get [0.0555, 0.1665, 0.2775 ... 0.9435].
Now those should be the lower borders of each throttle notch. Now we just scan periodically through that array for the highest number that is still smaller than the current position of the controllers axis, we take its array index + 1 (assuming arrays start at 0 in VB) et voila theres our throttle position.
Save the throttle position to a variable, now every time compare the current throttle position to the previous one in the variable,
-> if they are the same the controller was not moved or not far enough, we will just ignore it this time
-> if the previous throttle position is higher than the current one, we will tap the throttle down button for (previous position - current position) times
-> if the previous throttle position is lower than the current one, we will tap the throttle up button for (current position - previous position) times

This is the concept I came up some time ago as I too thought wouldn't this allow us to universally hook up all kinds of controllers to many train sim games, however it remained a concept as I don't know a language that can perform the nessescary actions (getting controller axis, pressing keys) as I already mentioned

Hopefully this concept gives you an idea.


Greets, Mika
 
I downloaded AntiMicro and configured my Xbox controller for use with Trainz. It was quite straight forward and I am quite happy with the result.
 
Thats amazing, you made that program faster than I thought :)

Well next time I see a flightsim throttle cheap I might consider buying it then... Or I find a way to connect some levers to my PC as a joystick otherwise.




Greets, Mika
 
Thats amazing, you made that program faster than I thought :)
It's just a throw together specific to my system. It would take weeks to make it available to others. I did have to cheat and get some code online.

Well next time I see a flightsim throttle cheap I might consider buying it then... Or I find a way to connect some levers to my PC as a joystick otherwise.
The TQ-6 is great for steamers due to the six axis'.




Greets, Mika[/QUOTE]
 
I've added support for DCC in which the reverser and throttle have not changed. If in Forward, the throttle move the dial Clockwise, if in reverse... CCW. All other levers are inactive.
My next step is to modify between Diesel and Steam.

What to name it though? Right now, I'm calling it the Trainz J2K Translator (interpreter?)
 
Could you please share the script please? and how to make it work step by step to the not programmer users? Thanks! I have hotas warthog and would like to use the throttle for Trainz 2019. I am using an Run8 script for Autohotkey program that someone made to the Run8 users that works great there, but here some are working others not... and suppose need modifications for each type of locos. I don't know how to share that script here in the forums. Don't find any attack file button.
 
As a joystick is meant for driving a vehicle/aeroplane ... Why would a joystick ever be employed in Trainz ? Or Why would a joystick ever be employed in a locomotive control stand ? That would be akin to driving Trainz via your Alexa personal assistant

A joystick, or steering wheel ... Just doesn't make any sense ... like asking Trainz to function via a Playstaion4 controller ... the idea is totally absurd
 
Back
Top