Page 1 of 1

How Can I Configure The Keyboard To Control The Train?

Unread postPosted: Thu Feb 15, 2024 1:21 pm
by LuFeDuTi
Hello Everyone, as The Message says You can configure the keyboard to control the train better.

Re: How Can I Configure The Keyboard To Control The Train?

Unread postPosted: Thu Feb 15, 2024 8:32 pm
by AmericanSteam
I have never seen that message. Was it in the manual?

Re: How Can I Configure The Keyboard To Control The Train?

Unread postPosted: Thu Feb 15, 2024 8:54 pm
by jalsina
AmericanSteam wrote:I have never seen that message. Was it in the manual?


I believe not from the game (but might be from one of the inner files).

But you can configure a programmable keyboard if you like it.
For example, instead of using A and D to control the throttle, you can use the H and L or whatever (to just say an example).
I started TS 10 years ago and I learned the keys. And as I don“t have a Raildriver, I control TS with the same keys that I used 10 years ago.

Re: How Can I Configure The Keyboard To Control The Train?

Unread postPosted: Fri Feb 16, 2024 10:46 am
by jlms48
LuFeDuTi wrote:Hello Everyone, as The Message says You can configure the keyboard to control the train better.

I'm not sure what you mean - better than what exactly?

The standard game gives you 3 methods of controlling a train.
1. Keyboard shortcuts.
2. HUD controls
3. Animated controls in cab view, so you can use a mouse to apply the train brake or regulator for example.

Some people may not like to show the hud display and may prefer to control the train with keyboard shortcuts. The keyboard shortcuts are already configured by default in TS Classic. Why would reconfiguring them make things any better?

Some locos have a few additional controls which have extra keyboard assignments.

There are hardware train controllers out there which may be "better" than using the 3 standard methods. Years ago I profiled a Saitek joystick and throttle to control the trains. I have also used an Ipad as a touch pad controller. I enjoyed playing around with these different controllers but I'm not sure they are better - just different.

Re: How Can I Configure The Keyboard To Control The Train?

Unread postPosted: Fri Feb 16, 2024 2:42 pm
by JohnTrainHead
Perhaps he meant simple controls vs expert controls?

Inputmapper

Unread postPosted: Fri Feb 16, 2024 4:29 pm
by kris120
This is done via the inputmappers:

Locate the blueprint of the loco. This normally inside Provider / Product / RailVehicles / Diesel(Electric,Steam) / LocoName / Engine /
Convert the blueprint with serz.exe ( located in the same folder as Railworks.exe ) , e.g. :
serz "Assets\DieselWorkshop\AlcoC424\RailVehicles\Diesel\Default\Engine\[DW] ALCO C424 N&W.bin"
you'll get :
Assets\DieselWorkshop\AlcoC424\RailVehicles\Diesel\Default\Engine\[DW] ALCO C424 N&W.xml

Open this xml-file with an editor (Notepad++ recommended)
Search for "ExpertRemapper". Here you will find:
<ExpertRemapper d:type="cDeltaString">C424_Mapper_Expert</ExpertRemapper>
So the value for the parameter ExpertRemapper is "C424_Mapper_Expert".
This is important to know as this is only exception where the TS uses a parameter and no filename to determine another file !

You will find the corresponding "inputmapper-file" in Assets\DieselWorkshop\AlcoC424\InputMappers\C424_Mapper_Expert.bin
Serz (like above) it and open it with your editor.

Near the top you can see whether this is the file referred by the engine blueprint :
<RemapperName d:type="cDeltaString">C424_Mapper_Expert</RemapperName>

To change some keys now, you should understand the entries:
An input may be a key, the mouse or the key of a joystick:
<Device d:type="cDeltaString">Keyboard</Device>

A keystrooke may be a combination of one or two keys, e.g.
H or "shift H" for the headlights.

H and shift H are written in the inputmappers like this :
<Button d:type="cDeltaString">Key_H</Button>
<ShiftButton d:type="cDeltaString">NoShift</ShiftButton>
and
<Button d:type="cDeltaString">Key_H</Button>
<ShiftButton d:type="cDeltaString">Shift</ShiftButton>

You may exchange "NoShift" or "Shift" with "Control" or "Shift_Control" in most cases,
but the key "H" is an example where Shift_Control does not work :
lots of people use Shift_Control + H to switch off the headlights on the rear.
In my installation (or with my keyboards ?) this never works. Therefore I use a combination of J and shift J for the rear hearlights.
With other keys a combination with Shift_Control works, though.

Important : Do not use more than one file using the same RemapperName inside a product-folder.
TS uses then just the first it gets, so this may result in confusion when these files differ.

In the old devdocs https://railworksamerica.com/download-library/accessories?view=document&id=1081:rsc-s-developer-docs&catid=24:accessories
you will find further information, see "2.03 Cab Control Blueprints.pdf", pages 2 - 4.
Web version :
http://tscdevdocs.co.uk/reference-manua ... ppers.html

Re: How Can I Configure The Keyboard To Control The Train?

Unread postPosted: Fri Feb 16, 2024 4:48 pm
by AmericanSteam
Without any specific information at what this new member is trying to accomplish, the posting of so many "helpful" suggestions may just cause him to be overwhelmed as to the perceived complexity of his situation. *!rolleyes!*

Re: How Can I Configure The Keyboard To Control The Train?

Unread postPosted: Sat Feb 17, 2024 12:38 pm
by jlms48
AmericanSteam wrote:Without any specific information at what this new member is trying to accomplish, the posting of so many "helpful" suggestions may just cause him to be overwhelmed as to the perceived complexity of his situation. *!rolleyes!*


It depends on whether you view this as a technical discussion forum or purely a " help desk".
The details provided above may be overkill for the original poster (who has been a member for 2 years btw) but could be of great interest to others, myself included, and it's useful to have it on record for future reference.

Re: How Can I Configure The Keyboard To Control The Train?

Unread postPosted: Tue Feb 20, 2024 2:47 pm
by kris120
OK, short version:

Look for a file, mostly located in a folder called "Inputmappers".
Decompile the bin-file in that folder with serz.exe .
Edit the resulting xml :
To change simply a key with another look for strings like "Key_H", "Key_G" and change the character following "Key_" .
Some special "characters" besides of "Key_A" to "Key_Z" and "Key_0" to "Key_9" are these :
Key_Space, Key_Enter, Key_BackSpace, Key_PageDown, Key_PageUp, Key_Home, Key_End, NumPad_Enter, NumPad_Add, NumPad_Substract, Key_Left_Bracket, Key_Right_Bracket, Key_Comma, Key_Period, Key_Apostophe

Be careful with Key_Ins and Key_Delete as they may be present in your standard keys and in the NumPad-area.
All those keys may be combined with a <ShiftButton d:type="cDeltaString">...</ShiftButton> where "..." may be "NoShift", "Shift", "Control" or "Shift_Control".

After editing serz the xml again !

Hope that helps as a reminder.