i can't help either way as i know very little about programming, but i am working my way through some C# tutorials right now to try and understand it better,
I have been told that LUA is very unforgiving about errors, one misplaced character and everything just refuses to work, at least C will give you a clue to what's wrong.
But Re: the railworks - ZusiDisplay thing, i am slowly playing with the various bits of source code trying to figure things out,
the main thing i have done is switched over from using CobraOnes GetData utility, and am using Havners TrainSim-Helper instead,
Reason for this is that TrainSim Helper gives railworks joystick control ability at the same time as extracting the data, so it made sense to use the one program to do both items we need (as railworks has no native joystick support) so it seem'd silly to run one program to allow joystick support, and another to get the data out, especially as the joystick program gets the data out too.
The only thing is TrainSim Helper is written to display the data as an overlay on the screen, and to do this it requires RailWorks to be run in windowed mode,
But i am sure that if the bits of code that handle the text overlay are removed it will allow Railworks to run in fullscreen mode again.
So all i have done is change the bit of code in RWZusiConverter.cs that said
"if (File.Exists(RailworksPath + "\\plugins\\tGetData.txt"))" to
"if (File.Exists(RailworksPath + "\\plugins\\trainsim-helper-overlay.txt"))"
And of course i start up TrainSim Helper when i start Railworks to allow the joystick functions and get the data out, and patch the engine.lua files with the TrainSim Helper patcher instead of the GetData one.
Then i changed a little bit in the RailWorksMaster.cs,
Code: Alles auswählen
master.RailworksPath = "C:/Program Files (x86)/Steam/SteamApps/common/Railworks";
System.Console.WriteLine("Path: " + master.RailworksPath);
master.SingleItems.Add("Speed", 2561); //Speed
master.SingleItems.Add("Zugkraft gesamt", 2565); //traction gauge
master.SingleItems.Add("Druck Hauptluftleitung", 2562); //main pipe pressure
master.SingleItems.Add("Druck Hauptluftbehalter", 2564); //reservoir pressure
master.SingleItems.Add("Druck Bremszylinder", 2563); //brake cylinder pressure
master.SingleItems.Add("Strom", 2567); //Current
master.SingleItems.Add("Spannung", 2568); //Voltage
master.SingleItems.Add("LM Turen", 2607); //Doors locked
master.SingleItems.Add("LM Sifa", 2596); //Sifa light
master.SingleItems.Add("Clock", 2610); //clock
master.Start();
TrainSimHelper writes the speed and distance data to the txt file in KMH or MPH, so no need to convert from meters per second as with the GetData.txt,
I am now working on getting the correct data from the sim to the text file in the TrainSimHelper code,
Can someone tell me what format zusi display wants the (Digital) Clock data as? as all combinations i tried don't work.... 21:20,00 21:20:00 21h 20,00 etc.
I also don't understand why the "HKEY_LOCAL_MACHINE\\SOFTWARE\\railsimulator.com\\railworks\\" bit is not working, as it seems to work in the getdata and trainsimhelper code,
I have noticed that to get it to work i have to put my railworks path with forward slashes /, instead of back slashes \,
i.e : C:/Program Files (x86)/Steam/SteamApps/common/Railworks
but i don't know enough to understand when forward of back slash should be used.