Beta 5

A flexible, configurable interface for operating RailWorks with your Joystick or other joystick-style analog inputs (custom cabs anyone?)

Moderator: Moderators

Locked
NeutronIC
Atomic Systems Team
Atomic Systems Team
Posts: 11085
Joined: Fri Oct 05, 2001 12:00 am
Location: E11, London, England
Contact:

Beta 5

Post by NeutronIC »

Hi Folks,

Latest beta is out - 0.5.

http://www.uktrainsim.com/works/Railwor ... ick0.5.zip

Here's what's new and changed:
- Notched axis values, ONLY done for "Absolute" "slider" and "Absolute" "updown"

On an axis entry, you can now add a "notches" attribute:

Code: Select all

<axis name="x" action="throttle" speed-divisor="20" flip="false" type="slider" style="absolute" notches="0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85"/>
Instead of going up in single increments, it will now go up in those notch levels. You can have as many as you like and make them any variance in step that you like. If you are using it on an up-down then you must have the same number below 0 as above it (e.g. -100,-50,0,50,100). For a slider, you must have it start at 0 and go up.

This only works with Absolute axis, it'll let you do it on a relative one but it works very bizarrely - ideally I will fix it to work there too, but that'll be for later.


- Catch DllNotFoundException and handle it nicely with a dialog error message

This one caused one of those unhelpful immediate shutdowns if the plugin path was wrong. This now pops up a help message.

- Spread the entire 0% to 100% value set across the active portion of the stick range (i.e. so that big dead zones dont limit the max value)

If you have a big dead zone you now won't lose access to 100% settings on your stick, it will smoothly spread the 0..100 range across what's left of the stick range after the dead zone is applied.

- Add ToggleQut (F4) as Button Action

This toggles the F4 screen.

- Shift button actions to allow a button or axis to perform more than one function

There are now 5 shift button actions (cunningly named shift1 etc) - if you assign a button to shift1:

Code: Select all

<button name="button03" action="shift1" type="oneshot"/>
You can then re-use button ids with different actions, for example:

Code: Select all

<button name="button02" action="togglequt" type="oneshot"/>
<button name="shift1-button02" action="togglehud" type="oneshot"/>
<button name="shift2-button02" action="cameracab" type="oneshot"/>
Here, if you press button03 and hold it, it will enable "shift1" - any other button you press at the same time will actually look for button name "shift1-button02" (if button02 were then pressed for example). This enables you to map different functions to each button. Remember you must hold the shift key down until you have released the main button you want to press.


Nothing particularly major, but continued steps in the right direction.

Back up what you've got first in case this doesn't work as well :)

Matt.
User avatar
nicknackpaddywack
Established Forum Member
Posts: 351
Joined: Sat Jan 06, 2007 12:24 pm
Location: Devon
Contact:

Re: Beta 5

Post by nicknackpaddywack »

this is excellent matt :D


will try it in the next few days, im currently building a case to house my A2D converter (cutting holes etc) and making the bus cables with propper connectors etc, when all is finished i shall try the new build. Also post some pics of my "device"

Thanks for this matt, really well done 8)
User avatar
emergo
Getting the hang of things now
Posts: 27
Joined: Mon Feb 04, 2008 8:28 am
Location: Belgium (Flanders)

Re: Beta 5

Post by emergo »

Hello Matt,

many thanks also from me.
I can not test it now as we are too busy to get packed these days, but I will certainly do so when back from holidays. If you want I can at that time also correct and complete the first fast draft I made for a manual.

I had a fast look at configuration file. There is an example in there to use the shift on the buttons. To use the shift on an analog input like the Y, I need probably to do this? (like the buttons)

<axis name="shift1-y" action="reverser" speed-divisor="20" flip="true" type="updown" style="relative"/>

regards

Herwig
NeutronIC
Atomic Systems Team
Atomic Systems Team
Posts: 11085
Joined: Fri Oct 05, 2001 12:00 am
Location: E11, London, England
Contact:

Re: Beta 5

Post by NeutronIC »

Oh damn ! You know what, I don't think I put the shift code in to the axes!!

I'll note that and get it fixed :)

But yes, that's how you would do it :)

Matt.
johnmar
New to the Forums
Posts: 2
Joined: Fri Aug 15, 2008 8:04 pm

Re: Beta 5

Post by johnmar »

He Matt,

Great work what you are doing with the Joystick interface.
The notches fix (for the throttle), fixed also the dynamic break bug. They are working now.
Thanks a lot for your effort.

John
User avatar
class43HS125
Well Established Forum Member
Posts: 697
Joined: Mon Dec 17, 2007 1:56 am
Location: New Zealand

Re: Beta 5

Post by class43HS125 »

hi,
Matt,
Thanks for the F4. This is realy enjoyable thanks to your efforts.
I am now making sense of the various possibilities in the config file :D

Ross
NZ
http://thefraserline.blogspot.com/
RW RB Challenge 1 Here and There and Back again! uktsfile 22834
RW RB Challenge 2 This Train Goes Round and Round uktsfile 25166
RW RB Challenge 3 The Windsor Branch, a challenge to far
gm1fai
Getting the hang of things now
Posts: 11
Joined: Mon Nov 05, 2007 5:10 pm

Re: Beta 5

Post by gm1fai »

Hi Matt

A bit of strangeness has crept in in Beta 5.
When I am set on full throttle none of the other sliders are working in Railworks.
They work in the interface OK, but not in Railworks.
If I reduce the throttle very slightly so that it is still reading 100% then the other controls start working.
Checked in Beta 4 and that is working OK.

Just tried removing the notches command and everything now working OK.

Keith
Kristof16
New to the Forums
Posts: 8
Joined: Tue Jul 07, 2009 7:24 pm

Re: Beta 5

Post by Kristof16 »

Could someone please tell me how to install this thing.

The address in the configuration.xml doesnt exist on my computer, so...
it also keeps looking for raildriver.dll or something like that.
User avatar
class43HS125
Well Established Forum Member
Posts: 697
Joined: Mon Dec 17, 2007 1:56 am
Location: New Zealand

Re: Beta 5

Post by class43HS125 »

hi,
have a look in the "first beta" thread and you will find reference to what you need to have where.

Ross
NZ
http://thefraserline.blogspot.com/
RW RB Challenge 1 Here and There and Back again! uktsfile 22834
RW RB Challenge 2 This Train Goes Round and Round uktsfile 25166
RW RB Challenge 3 The Windsor Branch, a challenge to far
Kristof16
New to the Forums
Posts: 8
Joined: Tue Jul 07, 2009 7:24 pm

Re: Beta 5

Post by Kristof16 »

Thanks, i got it working, but how do i use it?
I got the window to come up saying: UKTS RailWorks Joystick User Interface 0.5
All the buttons work, great...but how does that let me use it during gameplay. I tried using my controller with and without the program, but i still cant use it ingame.

Im running Vista 64 bit.
Also I cant access the advanced options menu for some reason, if i need it anyway for this.
NeutronIC
Atomic Systems Team
Atomic Systems Team
Posts: 11085
Joined: Fri Oct 05, 2001 12:00 am
Location: E11, London, England
Contact:

Re: Beta 5

Post by NeutronIC »

When you move the sticks around, do the numbers change in the boxes on the interface? If so, then the driver is accessing your joystick ok.

Next up, look at which numbers move as you move the stick around - up/down and left/right will each be their own number so if you have a gamepad with two sticks then it will show up four axes that move for example. Throttle and rudder (twist on the main stick) of some sticks will also each show up as an axis.

Work out what does what according to the labels on the left and write it down - e.g. "x -> left stick up/down, rz - right stick left/right" and then open the configuration xml file in notepad - in there you will see the definition for what the axes do. Verify the configuration is how you want it, update it as required. If you're not sure what to do, then post here with your list of what axes do what and what functions you'd like them to have. The first post in the "first beta" thread tells you what the possible actions are for an axis.

Let me know how far you get...

Matt.
Kristof16
New to the Forums
Posts: 8
Joined: Tue Jul 07, 2009 7:24 pm

Re: Beta 5

Post by Kristof16 »

I already got there, but my controller still wont work in game.
CaptScarlet
Very Active Forum Member
Posts: 3673
Joined: Fri Nov 17, 2006 11:29 am
Location: The Netherlands

Re: Beta 5

Post by CaptScarlet »

Kristof16 wrote:I already got there, but my controller still wont work in game.
What controller are you trying to use the game Railworks with ? BTW you have to have the joystick program running when you play the game.

John
Kristof16
New to the Forums
Posts: 8
Joined: Tue Jul 07, 2009 7:24 pm

Re: Beta 5

Post by Kristof16 »

Saitek x52

Here's what I did:
1.Downloaded beta 5 into my downloads folder
2.Extracted there
3.I created path which didn't exist : C:\Program Files\Steam\steamapps\common\railworks</railworks
4.I put raildriver.dll in there
5.I ran the program from my downloads folder(window came up and numbers were moving).
6.Then I started railworks

result: nothing...

Question: Why did I have to create this "C:\Program Files\Steam\steamapps\common\railworks</railworks",
when I could have just edited the .xml into "C:\Program Files (x86)\RailWorks\plugins" ?
CaptScarlet
Very Active Forum Member
Posts: 3673
Joined: Fri Nov 17, 2006 11:29 am
Location: The Netherlands

Re: Beta 5

Post by CaptScarlet »

Kristof16 wrote:Saitek x52

Here's what I did:
1.Downloaded beta 5 into my downloads folder
2.Extracted there
3.I created path which didn't exist : C:\Program Files\Steam\steamapps\common\railworks</railworks
4.I put raildriver.dll in there
5.I ran the program from my downloads folder(window came up and numbers were moving).
6.Then I started railworks

result: nothing...

Question: Why did I have to create this "C:\Program Files\Steam\steamapps\common\railworks</railworks",
when I could have just edited the .xml into "C:\Program Files (x86)\RailWorks\plugins" ?
Answer : you didn't have to do that and you should change it to something like this ( which is my install location ) -

eg <railworks>F:\Program Files (x86)\Steam\steamapps\common\railworks\</railworks>

Now you can delete the folders you created ( if you only copied the .dll into the folder from RailWorks if not put it back into railworks before deleting the folders ) but the example assumes your railworks install is in that folder structure ( which is the default location except for the drive letter in my example. Change yours to the actual install location on your pc.

To get the whole picture on what you can do etc it is a good idea to read through the different beta version posts as things have changed for each version.

John
Locked

Return to “RailWorks Joystick Interface”