TrainSim Helper (Joystick/Overlay) release thread

General discussion about Train Simulator, your thoughts, questions, news and views!

Moderator: Moderators

Locked
User avatar
Havner
Been on the forums for a while
Posts: 293
Joined: Thu Sep 11, 2014 1:32 am

TrainSim Helper (Joystick/Overlay) release thread

Post by Havner »

Release info:

This is a little helper for Train Simulator 2014/2015 that I wrote for my own needs to improve on the limitations of the game. The first is the poor in-game interface. The F3/F4 views show too much and obscure the view killing the immersion. The F5 view on the other hand lacks few things. The second thing is joystick support. This software tries to fix them both.

It makes it possible to use any DirectInput compatible joystick to control axes like:
CombinedThrottle, Throttle, TrainBrake, LocoBrake, DynamicBrake, AFB.
It is compatible with scripted engines. Can be adapted to handle even the most awkwardly scripted ones.

It also displays a custom overlay that displays more information than the default F5 view.

It's also a good development resource for people that would like to tinker with in-game values and/or custom interface overlaid on top of the game.

See the package for a complete documentation.

Previous pre-release thread with some more info: http://forums.uktrainsim.com/viewtopic. ... 1&t=139202

Download: http://vega.livecd.pl/~havner/trainsim-helper/
Waiting for the file to be accepted in the UKTS file library.

Have fun.
Attachments
ts-helper-3.jpg
ts-helper-2.jpg
ts-helper-1.jpg
User avatar
gazz292
Been on the forums for a while
Posts: 231
Joined: Mon Jan 10, 2011 9:46 pm

Re: TrainSim Helper (Joystick/Overlay) release thread

Post by gazz292 »

Well, i managed to get the overlay part working, so if i can do it, anyone can :)

not tried the joystick part yet as it's half 5 in the morning and i should be asleep.

Your app has shown me why i was having problems with the DB Br423 combined thorttle and brake lever, it combines the dynamic brake lever too,

part of the scripting i guess, but basically when i move the lever to the brake position, it automatically changes the loco brake percentage applied compared to the ammount of dynamic braking available.... i.e. when slowing down from speed, full dynamic braking is available so that goes to 100%, whilst the loco brake level will be down around 15%, only when the dynamic brake becomes innefective due to lowering speed does it raise the loco brake level,

I was able to see the different percentages changing for both brake types as well as the brake chamber pressure in detail, tomorrow i'll find out if the joystick part can handle this.

BTW, on the overlay i get '9999' displayed after the 2 brake pressure readings, where either PSI or BAR should display, it's a german train so i'd expect it to pick up it's in BAR, but maybe this train has the brake pipe and chamber pressures in a different unit in the scripts, i'll have to learn how to read the scripts and see what i can find.
User avatar
Havner
Been on the forums for a while
Posts: 293
Joined: Thu Sep 11, 2014 1:32 am

Re: TrainSim Helper (Joystick/Overlay) release thread

Post by Havner »

gazz292 wrote:Well, i managed to get the overlay part working, so if i can do it, anyone can :)
I'm glad :-) It means the script is running so to get the joystick to work you just need to choose with axis do what. I'll probably separate the config part from the Lua file to a separate file at some point.
Your app has shown me why i was having problems with the DB Br423 combined thorttle and brake lever, it combines the dynamic brake lever too,
The MunichAugsburg / HamburgHannover BR101 does the same. Train+Dynamic but if you move Dynamic by hand it uncouples it.
BTW, on the overlay i get '9999' displayed after the 2 brake pressure readings, where either PSI or BAR should display, it's a german train so i'd expect it to pick up it's in BAR, but maybe this train has the brake pipe and chamber pressures in a different unit in the scripts, i'll have to learn how to read the scripts and see what i can find.
Please send me the loco's .bin file. I'll see what's inside the loco and fix whatever is broken on my part.
User avatar
749006
Very Active Forum Member
Posts: 9862
Joined: Fri Mar 30, 2012 11:17 am
Location: England
Contact:

Re: TrainSim Helper (Joystick/Overlay) release thread

Post by 749006 »

A couple of questions on the display in the 377 Cab.

Speed is shown as 24.7 / 60 Mph. - is that 24.7 on a section of track that is 60 Mph?

Do you use a Key to show this display so you can switch between it and the F3 to check Stops/Speeds ?

Thanks

Peter
http://peter749.piwigo.com/
My Railway Pictures
User avatar
Havner
Been on the forums for a while
Posts: 293
Joined: Thu Sep 11, 2014 1:32 am

Re: TrainSim Helper (Joystick/Overlay) release thread

Post by Havner »

749006 wrote:A couple of questions on the display in the 377 Cab.
Speed is shown as 24.7 / 60 Mph. - is that 24.7 on a section of track that is 60 Mph?
Yes, the number after the slash is the current speed limit. Try overspeeding, you'll see that clearly then :-)
Do you use a Key to show this display so you can switch between it and the F3 to check Stops/Speeds ?
No, I don't use F3 view and if I really have to I do it momentarily so I don't mind having them both displayed. For stops I use F1, for speeds I use signs in the route ;-) I did this project to increase realism/immersion while driving :-)
The current speed limit is displayed on the overlay as mentioned above.

If there is a need I might implement additional things. So if you need such a thing, post it, I'll consider.
You would like a shortcut to turn the overlay off, do I get that right? If you want to have a glance at the F3 view you can just do that, they don't colide.
User avatar
749006
Very Active Forum Member
Posts: 9862
Joined: Fri Mar 30, 2012 11:17 am
Location: England
Contact:

Re: TrainSim Helper (Joystick/Overlay) release thread

Post by 749006 »

Havner wrote:No, I don't use F3 view and if I really have to I do it momentarily so I don't mind having them both displayed. For stops I use F1, for speeds I use signs in the route ;-) I did this project to increase realism/immersion while driving :-)
The current speed limit is displayed on the overlay as mentioned above.

If there is a need I might implement additional things. So if you need such a thing, post it, I'll consider.
You would like a shortcut to turn the overlay off, do I get that right? If you want to have a glance at the F3 view you can just do that, they don't colide.
Driving the route is ok if you know the speed restrictions but drive over a route without advance warning of speed changes is not as easy and you need to learn it first.

The F3 HUD shows distance to next stop - could that be included in the display?
And the ability to switch it on / off would be quite good. :)

Thanks

Peter
http://peter749.piwigo.com/
My Railway Pictures
User avatar
Havner
Been on the forums for a while
Posts: 293
Joined: Thu Sep 11, 2014 1:32 am

Re: TrainSim Helper (Joystick/Overlay) release thread

Post by Havner »

749006 wrote:The F3 HUD shows distance to next stop - could that be included in the display?
It could, this info is available through LUA. But I personally don't want to have it displayed.
I'll implement some keyboard shortcuts at some point and make this info optional/toggleable.
And the ability to switch it on / off would be quite good. :)
Yes, when I'll implement keyboard shortcuts this will be the first to add.
User avatar
rabid
Very Active Forum Member
Posts: 1547
Joined: Wed Dec 12, 2001 12:00 am
Location: ...has left the building

Re: TrainSim Helper (Joystick/Overlay) release thread

Post by rabid »

Thanks for this I'll give it a go.

A couple of suggestions for things you can toggle on/off

1. Next upcoming speed limit with distance (e.g. 100mph @ 1.2mi)
2. Next stop with distance (e.g. Next stop @ 3.7 mi)
(already suggested above but I thought I'd add it too)

With those two one would hardly need to use the other HUDs.

Cheers.
Image
User avatar
Havner
Been on the forums for a while
Posts: 293
Joined: Thu Sep 11, 2014 1:32 am

Re: TrainSim Helper (Joystick/Overlay) release thread

Post by Havner »

rabid wrote:1. Next upcoming speed limit with distance (e.g. 100mph @ 1.2mi)
Yes, this will be added.
2. Next stop with distance (e.g. Next stop @ 3.7 mi)
Oh believe me, I would very much like it so. Unfortunately this is not available in LUA API of TS.

I use a glance at F1 for that.
tnleeuw01
Very Active Forum Member
Posts: 2493
Joined: Sat Oct 08, 2011 11:17 am
Location: Diemen, Netherlands

Re: TrainSim Helper (Joystick/Overlay) release thread

Post by tnleeuw01 »

What I would love to see in such a display is first of all, distance to next stop, and information about upcoming speed limits would be nice too - although signals can perhaps complicate this enormously! Even F3/F4 HUD do not always display upcoming speed limits correctly.

But since my route-knowledge isn't always so good, distance to next instruction-target would be great ;) I don't like having the F1 display open all the time, especially since it obscures the F5 display which I find invaluable for steamers.

Speaking of steamers, for steam engines I'd also love to see information about shoveling-rate and the rate of both injectors and their water valves. This info is currently completely missing from F5, and the F4 HUD gives only limited information on these - besides, when driving one of the advanced scripted steam engines, even opening the F4 HUD can change the values of those controls.

I haven't yet downloaded this utility, and do not currently have a joystick or throttle set to fully use it, but if I could give a hand at adding such things without needing a C++ compiler I'd be glad to help you.

Cheers,

--Tim
User avatar
Havner
Been on the forums for a while
Posts: 293
Joined: Thu Sep 11, 2014 1:32 am

Re: TrainSim Helper (Joystick/Overlay) release thread

Post by Havner »

tnleeuw01 wrote:What I would love to see in such a display is first of all, distance to next stop
Guys, stop asking for that :-(
AFAIK this is not possible to get from the game. If you know how, tell me, I'll happily do that. The LUA API doesn't seem to have this info.
and information about upcoming speed limits would be nice too
Again, I didn't add that on purpose as I like having this info on the signs. But will do.

For the steam locos, I don't driver them. If the info is there in the loco it is possible to get, you can modify it for yourself and display whatever you wish. Maybe at some point when I'll learn to drive steams properly and get some advanced ones I'll think about that.
EDIT: Well, when I'll start to drive steams I'll definitely do that as I'm not going to use F3/F4 ever again having written this. The question is if/when I'll do that :-/
tnleeuw01
Very Active Forum Member
Posts: 2493
Joined: Sat Oct 08, 2011 11:17 am
Location: Diemen, Netherlands

Re: TrainSim Helper (Joystick/Overlay) release thread

Post by tnleeuw01 »

Havner wrote:
tnleeuw01 wrote:What I would love to see in such a display is first of all, distance to next stop
Guys, stop asking for that :-(
AFAIK this is not possible to get from the game. If you know how, tell me, I'll happily do that. The LUA API doesn't seem to have this info.
Sorry! I misread what you wrote above in an earlier post!!
Havner wrote:
and information about upcoming speed limits would be nice too
Again, I didn't add that on purpose as I like having this info on the signs. But will do.
I read that, for me I do prefer to read it from the signals and speed signs but lacking route knowledge and on some routes proper route signs, it would be nice -- if the engine can provide the info reliably. It can't reliably tell this on the F3 HUD...
Havner wrote: For the steam locos, I don't driver them. If the info is there in the loco it is possible to get, you can modify it for yourself and display whatever you wish. Maybe at some point when I'll learn to drive steams properly and get some advanced ones I'll think about that.
EDIT: Well, when I'll start to drive steams I'll definitely do that as I'm not going to use F3/F4 ever again having written this. The question is if/when I'll do that :-/
I know you wrote earlier that you don't drive steamers - that's why I said, if it doesn't require a C++ compiler I will have a look at the docs and hope to do something for this myself.

Sorry man - I hugely appreciate what you're doing and I've seen it before, that as soon as someone does something cool a community springs up of peoply only asking for more, more more!
I hope it won't overwhelm and exhaust you, I see it's already happening :-? and I'm somewhat guilty of it myself too :cry:

I'll download this and hopefully play around with it over the weekend! :-)

Cheers,

--Tim
User avatar
Havner
Been on the forums for a while
Posts: 293
Joined: Thu Sep 11, 2014 1:32 am

Re: TrainSim Helper (Joystick/Overlay) release thread

Post by Havner »

tnleeuw01 wrote:Sorry man - I hugely appreciate what you're doing and I've seen it before, that as soon as someone does something cool a community springs up of peoply only asking for more, more more!
I hope it won't overwhelm and exhaust you, I see it's already happening :-? and I'm somewhat guilty of it myself too :cry:
No, it's fine :-). Happy someone might find that useful.
I just spent last 3 days (after I wrote it for my own needs) to try to prepare it for a public release. Clean the code, make it autodetect as much as possible, allow relatively easy configuration and re-write the auto-patcher logic. I just need to drive a little with it I think and get some joy myself from it.

About adding new values for an overlay without C++. Not possible at the moment. You could modify the way they are gathered, interpreted, etc as this is LUA. But to add a completely new one you need few easy additional lines per value in C++. I might write some code that when a helper finds a value in a file it doesn't know about it will display it anyway. This might be nice for some. Will think about it.
User avatar
gazz292
Been on the forums for a while
Posts: 231
Joined: Mon Jan 10, 2011 9:46 pm

Re: TrainSim Helper (Joystick/Overlay) release thread

Post by gazz292 »

It works with my joystick too, :drinking:

i just had to change the invert, nice and easy to do and i can do it whilst the sim is running... changes show up as soon as i save the trainsim-helper.lua file.
I just need to add the reverser to an axis in the helper then look at the best way of assigning my gamepad buttons to the trains switches, and my S Bahn Fahrer console will be fully operational.

i'll pm you the loco's bin file, i had a quick look my self, and it does indicate it should be in BAR, so bod knows why it isnt being picked up.


i'm sure it was in the loco's bin file i noticed an entry 'distance to destination' would that just be the distance to the last stop, and not that elusive distance to next stop we all want :)
wondering if the distance to next stop would be in another file from the route, scenario or something.


One more suggestion... any way to make your helper app start up automatically when trainsim is started.... not that it's too much of a problem... i place the TS start icon next to the TS-helper icon on the desktop, and have time after clicking to start TS to also click the TS-helper icon before the simulator takes over the screen.
User avatar
Havner
Been on the forums for a while
Posts: 293
Joined: Thu Sep 11, 2014 1:32 am

Re: TrainSim Helper (Joystick/Overlay) release thread

Post by Havner »

gazz292 wrote:It works with my joystick too, :drinking:
Great, first confirmation it works outside of my environment.
I just need to add the reverser to an axis in the helper
I'll add reverser for the next version.
i'll pm you the loco's bin file, i had a quick look my self, and it does indicate it should be in BAR, so bod knows why it isnt being picked up.
Thanks. I do. The main brake pressure must be named differently. Should be an easy fix anyway, just need the file.
i'm sure it was in the loco's bin file i noticed an entry 'distance to destination' would that just be the distance to the last stop, and not that elusive distance to next stop we all want :)
From what I see the task list is an internal sim thing. It's not reflected in the ControlValues of the loco and even if it were in some, not all would have it anyway (if that is even possible). Just glance on the F1 view. My overlay doesn't disappear contrary to F5 view so it's not that bad. And it makes you watch the surroundings more closely ;-)
wondering if the distance to next stop would be in another file from the route, scenario or something.
I honestly doubt that. This is a dynamic thing dependent on the the scenario. It's in the the game runtime. If they didn't export it with some API there is no way short of hacking the game.
One more suggestion... any way to make your helper app start up automatically when trainsim is started.... not that it's too much of a problem... i place the TS start icon next to the TS-helper icon on the desktop, and have time after clicking to start TS to also click the TS-helper icon before the simulator takes over the screen.
You can alt-tab after you launch the game. With borderless-window this is painless.
I didn't think about it yet. Added to think to consider for the future, but this is not high priority for me.
Locked

Return to “[TS] General Discussion”