OLD: TrainSim Helper (Joystick/Overlay) release thread

Support forum for the Trainsim Helper program by Havner

Moderator: Havner

Re: TrainSim Helper (Joystick/Overlay) released

Unread postby Havner » Tue Oct 07, 2014 4:04 am

0.2a bugfix release

http://vega.livecd.pl/~havner/trainsim-helper/

Code: Select all
0.2a
 - Added M8Brake to the list of controllable TrainBrakes
 - Fix for the patcher to handle very old locos that don't provide Initialise()
 - Fix for the patcher in case there are already 2 scripts named the same but one .lua, one .out
 - Detections and notches configurations for more locos


This was mostly triggered by the Class 86, but there might be more locos that won't get patched properly without this update (I also found the very old Class 37 in the EU loco pack, not sure if there are any US locos like that. I'd expect yes, somewhere).
User avatar
Havner
 
Posts: 57
Joined: Wed Sep 10, 2014 8:46 pm

Re: TrainSim Helper (Joystick/Overlay) released

Unread postby Havner » Sat Oct 11, 2014 9:42 am

Bump for 0.3 released. Main post updated.
User avatar
Havner
 
Posts: 57
Joined: Wed Sep 10, 2014 8:46 pm

Re: TrainSim Helper (Joystick/Overlay) released

Unread postby _o_OOOO_oo-Kanawha » Sat Oct 11, 2014 10:26 am

1) How do I move a borderless window?

I have multiple Railworks directories, ie. USA, Europe and UK, so there is no registry setting.
Trainsim-helper-lua-out.exe gives an error box saying "Train Simulator not found, can't find the registry entry or the directory itself, I need to locate a lua compiler".
Presumably LUAC.exe in the Railworks root folder.

2) Should I create an .ini file of sorts to point THLO.exe to the right directory?

Edit: sorted o 2). UKTS and JT both provide a small tool to set the registry setting to any Railworks folder on your computer.
Last edited by _o_OOOO_oo-Kanawha on Sat Oct 11, 2014 10:52 am, edited 1 time in total.
Edwin "Kanawha"
Image
The Chessie, the train that never was ... (6000 hp Baldwin-Westinghouse steam turbine electric)
User avatar
_o_OOOO_oo-Kanawha
 
Posts: 3231
Joined: Mon Nov 14, 2011 2:12 pm

Re: TrainSim Helper (Joystick/Overlay) released

Unread postby Havner » Sat Oct 11, 2014 10:47 am

_o_OOOO_oo-Kanawha wrote:1) How do I move a borderless window?

I don't think borderless window is supposed to be moved. It's basically fullscreen.
You want to run this in windowed mode? I just checked, it kinda works but it doesn't update its position when you move TS window. Will try to fix it sometime soon. You can restart the helper when you move the window. Sorry for this but I never run in windowed mode, didn't think of it.

I have multiple Railworks directories, ie. USA, Europe and UK, so there is no registry setting.
Trainsim-helper-lua-out.exe gives an error box saying "Train Simulator not found, can't find the registry entry or the directory itself, I need to locate a lua compiler".

There is no config. I thought I might run into one day but completely forgot about such a use case.

I made a quick fix for you:
http://vega.livecd.pl/~havner/trainsim- ... ua-out.exe

Use this one instead and put luac.exe in the trainsim-helper-lua-out directory. It should try to use that one instead of looking for RailWorks dir.

EDIT: Also a quick fix for the windowed mode. The clock overlaps but will do for now:
http://vega.livecd.pl/~havner/trainsim- ... helper.exe

Let me know if those helped you please.
User avatar
Havner
 
Posts: 57
Joined: Wed Sep 10, 2014 8:46 pm

Re: TrainSim Helper (Joystick/Overlay) released

Unread postby _o_OOOO_oo-Kanawha » Sat Oct 11, 2014 12:17 pm

Thanks, Havner, for your quick response.

The new THLO.exe and LUAC.exe in the same folder worked, but I didn't undo the registry setting.

I found out my Sherman Hill locos already had their enginescript.out files patched, presumably by a download from the RWA file library.
I believe that patch was about switching off ditchlights and such, because sloppy DTG didn't put the proper initialisation in the enginescript.
So patching the patched file left me with a dead loco that doesn't respond to the keyboard and no overlay.

I restored the .out files to their original status and patched these.
Still no proper Control Values overlay, only version 3 showing, and again the loco was dead, so what next?

Does a patched locomotive still respond to keyboard commands and moving the controls in the HUD, or are these disabled?

I checked the Railworks\Plugins folder for the overlay and joystick text files, and noticed these weren't created.
Plugging in a Logitech gamepad created the joystick file, but I don't intend to use that gamepad. I am only interested in a better more complete overlay at the moment.

Abandoning the SH ES44AC with its .out files for the moment, I choose something simpler, the Dash9.
I patched its Dash9EngineScript.lua and started to play a scenario.
Again no overlay and a dead loco.

This time I opened the newly created replacement enginescript.lua, and noticed the line that requires the renamed original script started with:
require("ks 5 USA/Assets/RSC/Dash9Pack01/ etc. etc.") Clearly not a valid path. Did THLO.exe create this faulty path? Are spaces allowed?
So I manually edited the require line to the correct path, and finally the Dash8 responds to the keyboard. Still no overlay, although the overlay.txt file in Railworks\Plugins was created and is being updated?
Edwin "Kanawha"
Image
The Chessie, the train that never was ... (6000 hp Baldwin-Westinghouse steam turbine electric)
User avatar
_o_OOOO_oo-Kanawha
 
Posts: 3231
Joined: Mon Nov 14, 2011 2:12 pm

Re: TrainSim Helper (Joystick/Overlay) released

Unread postby Havner » Sat Oct 11, 2014 12:31 pm

_o_OOOO_oo-Kanawha wrote:The new THLO.exe and LUAC.exe in the same folder worked, but I didn't undo the registry setting.

You can undo it now

I found out my Sherman Hill locos already had their enginescript.out files patched, presumably by a download from the RWA file library.

That is highly unlikely. Unless someone is using my helper and uploading patched locos? Do you have a link for this? How do you know it was pacthed, the program told you that?

Does a patched locomotive still respond to keyboard commands and moving the controls in the HUD, or are these disabled?

Yes, of course it does. Nothing that already worked should get broken.

checked the Railworks\Plugins folder for the overlay and joystick text files, and noticed these weren't created.

It means the script is running properly

Plugging in a Logitech gamepad created the joystick file, but I don't intend to use that gamepad. I am only interested in a better more complete overlay at the moment.

You won't get much use with gamepads anyway as they don't have any throttle.

This time I opened the newly created replacement enginescript.lua, and noticed the line that requires the renamed original script started with:
require("ks 5 USA/Assets/RSC/Dash9Pack01/ etc. etc.") Clearly not a valid path. Did THLO.exe create this faulty path? Are spaces allowed?

Spaces are allowed, but clearly something failed on the path detection.

You have custom installations and I detect railworks directory by well, the name "/railworks/" to find root folder to create relative paths for the script. I guess yours are named differently. Try to rename the main dir to railworks to see if that makes a difference. Sorry, I did not account for such a case.

I'm most curious about the "already patched" scripts. Could you please pack them and send them to me (the ones that were supposedly already patched). I'd like to investigate. My email is in the readme.

Thanks.

EDIT: another quick fix:
http://vega.livecd.pl/~havner/trainsim- ... ua-out.exe

It will detect the directory by the /Assets/, it won't care what is the name of the root folder. Try this version again with few locos.
User avatar
Havner
 
Posts: 57
Joined: Wed Sep 10, 2014 8:46 pm

Re: TrainSim Helper (Joystick/Overlay) released

Unread postby Havner » Sun Oct 12, 2014 8:01 am

Havner wrote:EDIT: another quick fix:
http://vega.livecd.pl/~havner/trainsim- ... ua-out.exe

It will detect the directory by the /Assets/, it won't care what is the name of the root folder. Try this version again with few locos.


As you confirmed this worked for you I'm thinking out loud. What would be the best approach here for cases like yours? This will work up to a point a path to the the engine script has two "/assets/" strings in it. I'm not sure such a case is there out in the wild, but its definitely not impossible. Like:

railworks5-us/Assets/COMPANY/MOD/RailVehicles/Assets/blabla/engine.out

I don't know how else to automatically find the root folder (knowing I can't really use registry). The only thing that comes to my mind is an optional and manual selecting the railworks root folder by the user himself.

EDIT: or maybe not, as in the case above it would find the first "/Assets/" and work from there. So this would really be an issue if someone had "/Assest/" before the root railworks folder. And this is much less probable.
User avatar
Havner
 
Posts: 57
Joined: Wed Sep 10, 2014 8:46 pm

Re: TrainSim Helper (Joystick/Overlay) released

Unread postby _o_OOOO_oo-Kanawha » Sun Oct 12, 2014 8:58 am

I think it's the easiest to follow the registry setting to fill in the path, but leave the actual path selection to the user.
Most installation routines from UKTS, AP, vR and other providers work this way.
I suppose the majority of users have only one Railworks folder under \Steam\Steamapps\Common.

Users like me with multiple Railworks folders are an exception, not the rule!
Edwin "Kanawha"
Image
The Chessie, the train that never was ... (6000 hp Baldwin-Westinghouse steam turbine electric)
User avatar
_o_OOOO_oo-Kanawha
 
Posts: 3231
Joined: Mon Nov 14, 2011 2:12 pm

Re: TrainSim Helper (Joystick/Overlay) released

Unread postby Chacal » Mon Oct 13, 2014 12:09 am

Why can't you use the registry?
Over the hill and gathering speed
Chacal
Site Admin
 
Posts: 6465
Joined: Tue Jul 05, 2011 1:11 pm
Location: Quebec, Canada

Re: TrainSim Helper (Joystick/Overlay) released

Unread postby Havner » Mon Oct 13, 2014 3:27 am

Chacal wrote:Why can't you use the registry?


Becase mr Kanawha is an example of a person that has no entries in the registry for TS and while not typical this is a perfectly valid use case.
User avatar
Havner
 
Posts: 57
Joined: Wed Sep 10, 2014 8:46 pm

Re: TrainSim Helper (Joystick/Overlay) released

Unread postby Havner » Thu Oct 16, 2014 1:07 pm

Bump for 0.4 released. Main post updated.
User avatar
Havner
 
Posts: 57
Joined: Wed Sep 10, 2014 8:46 pm

Re: TrainSim Helper (Joystick/Overlay) released

Unread postby _o_OOOO_oo-Kanawha » Thu Oct 16, 2014 2:59 pm

Thanks again, Lukasz.

Being able to use normal windowed mode with the v0.4 overlay is a big plus for me.
Edwin "Kanawha"
Image
The Chessie, the train that never was ... (6000 hp Baldwin-Westinghouse steam turbine electric)
User avatar
_o_OOOO_oo-Kanawha
 
Posts: 3231
Joined: Mon Nov 14, 2011 2:12 pm

Re: TrainSim Helper (Joystick/Overlay) released

Unread postby Havner » Thu Oct 16, 2014 3:06 pm

_o_OOOO_oo-Kanawha wrote:Being able to use normal windowed mode with the v0.4 overlay is a big plus for me.


Happy finally everything works fine for you :-)
User avatar
Havner
 
Posts: 57
Joined: Wed Sep 10, 2014 8:46 pm

Re: TrainSim Helper (Joystick/Overlay) released

Unread postby Havner » Thu Oct 30, 2014 5:39 pm

Support for steamers incoming :D

Image
User avatar
Havner
 
Posts: 57
Joined: Wed Sep 10, 2014 8:46 pm

Re: TrainSim Helper (Joystick/Overlay) released

Unread postby Havner » Thu Nov 13, 2014 4:50 pm

Bump for 0.5 released. Main post updated.
User avatar
Havner
 
Posts: 57
Joined: Wed Sep 10, 2014 8:46 pm

PreviousNext

Return to TrainSim Helper

Who is online

Users browsing this forum: No registered users and 1 guest