Zusi Display with Train Simulator 2015??

Die Zusi-Display Software von Jens Haupert simuliert Führerraumanzeigen (Buchfahrplan, Diagnose, FIS, ...)

Moderator: Jens Haupert

Nachricht
Autor
Benutzeravatar
gazz
Beiträge: 64
Registriert: 23.01.2011 08:44:47
Aktuelle Projekte: BR 111 Drivers Desk
Mini universal drivers desk with 3D printed parts
Omsi : NG272 Drivers Workplace (I WILL make progress this year)
Wohnort: England, Scarborough
Kontaktdaten:

Zusi Display with Train Simulator 2015??

#1 Beitrag von gazz »

Is it possible to make Zusi Display work with data from another simulator?

A few of us are trying to get a simple MFA display on a second monitor to make driving in Train Simulator 2015 a little more realistic, we can use a .DLL to extract the data from Train Simulator as text,
of course there is not as much information available as there is in Zusi, just Speed in KMH, traction/Brake effort, LZB speed, AFB 'bug', and the lights for PZB/LZB indicators etc.

Would we need to write something that takes the Train Simulator data that is output in a text file, and alter it to something Zusi Display understands? or do we need to trick Zusi Display into thinking it is connected to Zusi,

Benutzeravatar
Thomas B
Beiträge: 410
Registriert: 28.03.2007 16:41:08
Wohnort: Bergisch Gladbach
Kontaktdaten:

Re: Zusi Display with Train Simulator 2015??

#2 Beitrag von Thomas B »

The Zusi-TCP Protocol is fully documented. You can write a interface to the TCP-Server. ZusiDisplay doesn't care from which simulator the informations come, as long as they're sent in the right way.
Your interface just has to logon as Zusi.
Grüße,
Thomas (eh. ElektrikTrick)

Benutzeravatar
F. Schn.
Beiträge: 6607
Registriert: 24.10.2011 18:58:26

Re: Zusi Display with Train Simulator 2015??

#3 Beitrag von F. Schn. »

All you need is a programe, that connects itself with the "TCP-Server"-Programe and sends the current speed data to the other programes. Then you can connect all Zusi-TCP-Programes your're interested to the Server, and use it like they are connected with Zusi.

You may have a look at this topic, there are several DLLs for Zusi-TCP.

If you use .Net you'll already have a "Master" that represents a "Zusi-Mock" in the DLL. The moast recent Fork is here. (Example for the Master incuded.) The Librarys for Java and C++/Win32 don't contain a Master (do they?), so you'll have to ask the programmers or code it on your own.

May you can post a link to the DLL, that extracts the data form Train Simulator?
Diese Signatur möchte folgendes bekannter machen: ZusiWiki · ZusiSK: Streckenprojekte · YouTube: Objektbau für Zusi · euirc: Zusi-Chat

Benutzeravatar
gazz
Beiträge: 64
Registriert: 23.01.2011 08:44:47
Aktuelle Projekte: BR 111 Drivers Desk
Mini universal drivers desk with 3D printed parts
Omsi : NG272 Drivers Workplace (I WILL make progress this year)
Wohnort: England, Scarborough
Kontaktdaten:

Re: Zusi Display with Train Simulator 2015??

#4 Beitrag von gazz »

Brilliant,

The scripts to get data out of train simulator and what needs to be modified in the trains files is here:
https://www.dropbox.com/sh/paxigk37gqd9 ... HrrgYmxENa

it may not actually be a .DLL like i thought, rather you modify the trains files to tell them to send the data to a .TXT file in the plugins folder,

i am not very good at programming, and of course the above scripts are not my work at all, but have been released with full source files by the person who wrote them "CobraOne"

thenilsman
Beiträge: 21
Registriert: 17.11.2013 17:14:46

Re: Zusi Display with Train Simulator 2015??

#5 Beitrag von thenilsman »

So could you post a couple of screenshots if it is working already?
Is the problem already cleared?

Benutzeravatar
gazz
Beiträge: 64
Registriert: 23.01.2011 08:44:47
Aktuelle Projekte: BR 111 Drivers Desk
Mini universal drivers desk with 3D printed parts
Omsi : NG272 Drivers Workplace (I WILL make progress this year)
Wohnort: England, Scarborough
Kontaktdaten:

Re: Zusi Display with Train Simulator 2015??

#6 Beitrag von gazz »

unfortunately i think i messed up,

The railworks data extraction program does not use a .DLL as i thought it did,

It uses an LUA file to extract the data from each individual locomotive (as the data can be different as different countries locomotives have different indicators, safety systems and so on) unfortunately railworks/Train Simulator 2015 is a game not a simulator really, pretty graphics, but not very realistic operations,

Some trains do have much better controls than others, thankfully it is mostly the German trains that have been modified by people like TTB, VR expert line and so on to add the extra features like working LZB and PZB, Sifa, AFB and so on.


But basically it looks like the data extractor gets the data on speed, lights, warnings and so on and writes to a text file, which is read by something else to either display basic text in a form on the screen, or send data to the serial port to display on an LCD,

Benutzeravatar
F. Schn.
Beiträge: 6607
Registriert: 24.10.2011 18:58:26

Re: Zusi Display with Train Simulator 2015??

#7 Beitrag von F. Schn. »

I have started another example for the TCP interface that is a converter for this text files. I need someone to test it, becaues I can't test it on my own. I have not implemented all data types, only Speed, "Ammeter (Amp)", "Emergency Brake (EB)" and the cheating infos.
Especially I don't know, how the values are formated. Do they use a localized decimal-Seperator, or do they use a "."?

Maybe someone can extend this example to complete all aviable datas. I.E. I do't know how PZB is implemented in Railworks.
Diese Signatur möchte folgendes bekannter machen: ZusiWiki · ZusiSK: Streckenprojekte · YouTube: Objektbau für Zusi · euirc: Zusi-Chat

Benutzeravatar
gazz
Beiträge: 64
Registriert: 23.01.2011 08:44:47
Aktuelle Projekte: BR 111 Drivers Desk
Mini universal drivers desk with 3D printed parts
Omsi : NG272 Drivers Workplace (I WILL make progress this year)
Wohnort: England, Scarborough
Kontaktdaten:

Re: Zusi Display with Train Simulator 2015??

#8 Beitrag von gazz »

i don't know if this is what you are after, but below is the data names that railworks/TrainSimulator 2015 uses for the Br 423 'MFA', which has both PZB and LZB working.

Code: Alles auswählen

CONTROL NAME "(RawTargetDistance)",                    MIN VALUE "(0)",         MAX VALUE "(9999)",      DEFAULT VALUE "(0)"
CONTROL NAME "(TargetDistanceBar)",                    MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(TargetDistanceDigits100)",              MIN VALUE "(-1)",        MAX VALUE "(9)",         DEFAULT VALUE "(0)"
CONTROL NAME "(TargetDistanceDigits1000)",             MIN VALUE "(-1)",        MAX VALUE "(9)",         DEFAULT VALUE "(0)"
CONTROL NAME "(Cmd_Free)",                             MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(Cmd_40)",                               MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(VigilEnable)",                          MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(VigilReset)",                           MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(VigilLight)",                           MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(VigilAlarm)",                           MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(LZBActive)",                            MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(LZBEnding)",                            MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(LZBEnable)",                            MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(LZB_G)",                                MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(LZB_End)",                              MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(PZB_85)",                               MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(PZB_70)",                               MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(Dummy)",                                MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(PZB_1000)",                             MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(PZB_500)",                              MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(PZB_40)",                               MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(ServiceBrake)",                         MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(PZBEnable)",                            MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(DoorsOpenCloseLeft)",                   MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(DoorsOpenCloseRight)",                  MIN VALUE "(0)",         MAX VALUE "(1)",         DEFAULT VALUE "(0)"
CONTROL NAME "(RawSpeedTarget)",                       MIN VALUE "(0)",         MAX VALUE "(300)",       DEFAULT VALUE "(0)"
CONTROL NAME "(TargetSpeed100)",                       MIN VALUE "(-1)",        MAX VALUE "(9)",         DEFAULT VALUE "(0)"
CONTROL NAME "(TargetSpeed10)",                        MIN VALUE "(-1)",        MAX VALUE "(9)",         DEFAULT VALUE "(0)"
CONTROL NAME "(TargetSpeed1)",                         MIN VALUE "(-1)",        MAX VALUE "(9)",         DEFAULT VALUE "(0)"

Benutzeravatar
F. Schn.
Beiträge: 6607
Registriert: 24.10.2011 18:58:26

Re: Zusi Display with Train Simulator 2015??

#9 Beitrag von F. Schn. »

Well, thanks, it helps (but only a little).

The Lua-Script should create a text file in the folder \plugins\GetData.txt in the railworks directory.

Maybe you can start Railworks, get some speed, then pause Railworks, open the file and post it. This should help.

The Problem is: I neither have experience with Railworks / TrainSimulator 2015 nor got the programe at all. And likely the oher programmers in this forum do so too. Maybe someone with railwoks can do this better than us. But first try to find and post this file, I think this might help.
Diese Signatur möchte folgendes bekannter machen: ZusiWiki · ZusiSK: Streckenprojekte · YouTube: Objektbau für Zusi · euirc: Zusi-Chat

Benutzeravatar
gazz
Beiträge: 64
Registriert: 23.01.2011 08:44:47
Aktuelle Projekte: BR 111 Drivers Desk
Mini universal drivers desk with 3D printed parts
Omsi : NG272 Drivers Workplace (I WILL make progress this year)
Wohnort: England, Scarborough
Kontaktdaten:

Re: Zusi Display with Train Simulator 2015??

#10 Beitrag von gazz »

Here you go, driving the Br 423 accelerating.

Code: Alles auswählen

Speedo type:KPH
Current Speed:66.1
ThrottleType:ThrottleAndBrake
ThrottleMin:0
ThrottleMax:1
ThrottleType:ThrottleAndBrake
ThrottleMin:0
ThrottleMax:1
Throttle:78
TrainBrakeControl:0
TrainBrakeControlMin:0
TrainBrakeControlMax:1
DynamicBrake :0
DynamicBrakeMin:0
DynamicBrakeMax:1
EmergencyBrake:0
Reverser:100
ReverserMin:-1
ReverserMax:1
Ammeter:319
RPM:0
AWS:0
AWSWarnCount:0
BrakePipePressureBAR:5.0
MainReservoirPressureBAR:9.7
Current Speed Limit:80
Next Speed Limit:80
Next Speed Limit Distance:0.73
Signal Type:1
Signal State:1
Signal Distance:1.80
Signal Aspect:-1
DoorsOpenCloseRight:0
DoorsOpenCloseLeft:0
Current Time = :52.430736541748

And another one with the brakes on:

Code: Alles auswählen

Speedo type:KPH
Current Speed:68.5
ThrottleType:ThrottleAndBrake
ThrottleMin:0
ThrottleMax:1
ThrottleType:ThrottleAndBrake
ThrottleMin:0
ThrottleMax:1
Throttle:4
TrainBrakeControl:41
TrainBrakeControlMin:0
TrainBrakeControlMax:1
DynamicBrake :100
DynamicBrakeMin:0
DynamicBrakeMax:1
EmergencyBrake:0
Reverser:100
ReverserMin:-1
ReverserMax:1
Ammeter:-200
RPM:0
AWS:0
AWSWarnCount:0
BrakePipePressureBAR:4.0
MainReservoirPressureBAR:9.7
Current Speed Limit:80
Next Speed Limit:80
Next Speed Limit Distance:0.60
Signal Type:1
Signal State:1
Signal Distance:1.66
Signal Aspect:-1
DoorsOpenCloseRight:0
DoorsOpenCloseLeft:0
Current Time = :58.963970184326


<Bernd>
Beiträge: 152
Registriert: 21.01.2008 10:01:35
Aktuelle Projekte: Warten auf ...
Wohnort: Windeck/Sieg- RE9 Bhf Schladern

Re: Zusi Display with Train Simulator 2015??

#11 Beitrag von <Bernd> »

F. Schn. hat geschrieben:The Problem is: I neither have experience with Railworks / TrainSimulator 2015 nor got the programe at all. And likely the oher programmers in this forum do so too. Maybe someone with railwoks can do this...
I am also involved into that subject and will write some lines to clear things up. Stay tuned and give me some minutes .....

regards
Grüsse von Bernd

<Bernd>
Beiträge: 152
Registriert: 21.01.2008 10:01:35
Aktuelle Projekte: Warten auf ...
Wohnort: Windeck/Sieg- RE9 Bhf Schladern

Re: Zusi Display with Train Simulator 2015??

#12 Beitrag von <Bernd> »

Unfortunately I had an energy sapping, tedious disease for some month and try to recover now... So I was somewhat invisible for you on forum or email.
Nevertheless I did follow the threads here and in the UK Trainsim Forum. As I am involved in both sides of the show, Zusi and Train Simulator ( Railworks ) I give you some (very basic) information that may help to understand how the bridge can be build. It certainly will work, I am close to get a prototype working. It just takes some time as I am not very focused yet.

For the Zusi part: To communicate with 3rd party software ( that is ZusiDisplay or Railway Displays, Soundthesizer and others as well as software to control your driver desks ) Zusi uses a client / server solution. Software that needs data from the Zusi simulator has to implement a client software part to communicate with the server. Communication uses the tcp/ip protocoll. Client(s) and server can run on different machines. A client connects to the server and requests the needed data. Zusi also connects to that server and sents the required data. The simulator values are then ditributed to all clients that requested the data. For the software part there is all necessary documentation available as well as a .dll that provides convenient high level functions. Thanks to Andreas Karg and F.Schn ( my big respect :] ) for the software that is also available as source code. As there is code for the Master (-Client) the Zusi-sim part can be adapted/replaced to another data-source like rw/train simulator. You will probably have to convert variables/types and/or status information.

Now for Railworks ( I prefer to call it that way as train simulator may be mixed up with the Microsoft Train Simulator ): As the program is designed more as a game than a simulator a solid interface to external 3rd party software is missing. Nevertheless there is a way as they implemented a scripting language, LUA. Among others LUA is used to configure the engine scripts for new locos. Virtual Railroads for example is known for its extensive range of features ( like Sifa and PZB ! ). While LUA scripts are often protected by encryption there is a data extractor program that will give you the variable names that are used within the scripts. These are essential as they are available LUA-wide. Unfortunately by default there is no central script that can be invoked. A solution was found by CobraOne and Havner ( thank you very much for your effort :] ) on the UK TrainSim Forum. CobraOne started the JoystickAPI project and got the raildriver working. Havner solved the problem to get the data out of railworks. The way it works: project and complete source code available https://github.com/havner/trainsim-helper. You will have to patch each single loco engine file. Sounds harder than it is. Locate the appropriate engine file in the directory tree and the rest is done by a program which substitutes the engine file by a small lua file which calls a "central script" that is common to all locos and then daisy chaines back to the (renamed) original engine file. The central LUA script can be modified and is capable of reading all variables/values that are published. Havners script writes the variable names and corresponding sim parameters into a plain text file. You can read and use these pairs of values with you own program but you will have to convert many variables first. Some are floating point variables that need a modifier to calculate for example speed depending on the use of kilometer or miles. Others need to be interpreted for state. Nothing spooky really. You can get help from the Havners source code which is written in C++.

Hope that gives you some overview on the basics. If I can help with more details please ask.

regards from Bernd
Grüsse von Bernd

<Bernd>
Beiträge: 152
Registriert: 21.01.2008 10:01:35
Aktuelle Projekte: Warten auf ...
Wohnort: Windeck/Sieg- RE9 Bhf Schladern

Re: Zusi Display with Train Simulator 2015??

#13 Beitrag von <Bernd> »

sorry for a possible confusion here - I just learned that GAZZ an me are talking about different software. Well it is actually quite the same approach and code but it is different. GAZZ uses a code that CobraOne released in May while I was using new code from Havner ( who reuses code from CobraOne ... ). I will sort this out may give some comments here later.
CobraOne released Code for JoyStick-API and for Raildriver. I did not realize he released that GetData script on dropbox.
As I do not own a raildriver I went with the Havner code as he combines data output and joystick input and there is no manual manipulation of the original engine sricps necessary.
Grüsse von Bernd

Benutzeravatar
gazz
Beiträge: 64
Registriert: 23.01.2011 08:44:47
Aktuelle Projekte: BR 111 Drivers Desk
Mini universal drivers desk with 3D printed parts
Omsi : NG272 Drivers Workplace (I WILL make progress this year)
Wohnort: England, Scarborough
Kontaktdaten:

Re: Zusi Display with Train Simulator 2015??

#14 Beitrag von gazz »

I've been thinking about that just now,

Basically, over the past year people started showing interest in driving trains in railworks with joysticks again, and a few people have the driving controls from real trains they want to hook up to computers,

Originally Cadde wrote some software that read joysticks and used the raildriver .DLL to get the joystick positions mapped to the controls in the game, as the raildriver has a speedo out function, he used that to show a large speedometer that could be placed in another window, he called this his 'Joystick API' :
http://forums.uktrainsim.com/viewtopic. ... 8&t=112879

Then as the trains in railworks began to get a little more realistic (in very loose terms compared to Zusi trains) it was found that .LUA scripts were being used, and things like 'virtual throttles' and brake levers were being used, none of which could be used by the raildriver interface,
For some reason the makers of raildriver and railworks do not talk to each other, and basically the raildriver interface was always a 3rd party unsupported thing.

Then along came Havner and CobraOne who wanted to sort this mess out,
CobraOne wanted to write a new raildriver interface that will work with the virtual controls, and Havner wanted to allow joysticks to be used with virtual controls,
Both of those people also wanted to get data out from the game to display train speed, speed limits, control positions, pressures, gradients and so on (and all want to get the data out that shows the distance to the next station stop, but none have been able to yet)


So, Havner released his 'TrainSim Helper' program : http://forums.uktrainsim.com/viewtopic. ... &sk=t&sd=a
Which allows joysticks to operate the virtual controls of scripted trains in railworks (plus the old style regular controls that Cadde's joystick API worked with)
But the joystick support was just a small part of his program, the main part was getting data out of the game to be displayed as a text overlay on the main screen, so people could close the ugly looking and intrusive 'F3' HUD that makes railworks look like a kids game.

CobraOne was working on his 'TS2015 RailDriver Interface' at the same time as Havner, and they both figured out problems each other were having, but before he released the RailDriver Interface, he released a 'Get Data' script that allowed just the data to be extracted from railworks, and displayed in a windows form in text, or sent to an LCD connected to a serial port : https://www.dropbox.com/sh/paxigk37gqd9vll/W5Tm9cd8y6

Then he finished his RailDriver interface and released that : http://forums.uktrainsim.com/viewtopic. ... 1&t=139830



So that's the 4 bits of software available to send or get data from railworks that i know of, and i was originally referring to the 'GetData' software as a way to extract the data from railworks,
However, as i also need joystick input support, i have gone back to using Havners TrainSim Helper program,
The main reason i tried CobraOne's GetData was because it allowed railworks to run in full screen, which allows my 2 graphics cards to share the load, TrainSim Helper requires railworks to be run in borderless window mode (i think to allow the on screen data overlay) and this only allowed one of my graphics cards to run with the game (Crossfire only works with full screen)


I am really sorry about the confusion, i do think Havners TrainSim Helper is the one to use to get working with Zusi Display is possible, as it provides joystick support as well, which is what most people want, being able to display the trains data on a 2nd monitor is the next thing people want, and then having that data 'drive' a graphic of the trains MFA is next... and as Zusi Display is so beautiful and accurate for German trains, it seem's logical to get TrainSim Helper working with ZusiDisplay?

Then maybe think about sending the data to an arduino to drive a hardware MFA. :)

Benutzeravatar
gazz
Beiträge: 64
Registriert: 23.01.2011 08:44:47
Aktuelle Projekte: BR 111 Drivers Desk
Mini universal drivers desk with 3D printed parts
Omsi : NG272 Drivers Workplace (I WILL make progress this year)
Wohnort: England, Scarborough
Kontaktdaten:

Re: Zusi Display with Train Simulator 2015??

#15 Beitrag von gazz »

F. Schn. hat geschrieben:I have started another example for the TCP interface that is a converter for this text files. I need someone to test it, becaues I can't test it on my own. I have not implemented all data types, only Speed, "Ammeter (Amp)", "Emergency Brake (EB)" and the cheating infos.
I have tried to use this modified version of the Railworks Data Extractor, but i am rather stupid with programming, and am not sure what i need to do with the files,
I have Visual Basic, and can open the project files in it, but if i try to build it, i get an error about not having the zusi Datenausgabe .dll and it refuses to build.

But i am probably doing it totally wrong and i was just supposed to put one of the files in the railworks plugins folder instead??
Zuletzt geändert von gazz am 28.11.2014 22:10:11, insgesamt 1-mal geändert.

<Bernd>
Beiträge: 152
Registriert: 21.01.2008 10:01:35
Aktuelle Projekte: Warten auf ...
Wohnort: Windeck/Sieg- RE9 Bhf Schladern

Re: Zusi Display with Train Simulator 2015??

#16 Beitrag von <Bernd> »

gazz,

thanks very much for your overview of the software versions and history. I forgot to mention Cadde, sorry Cadde. But there is a lot of posts in these threads over quite a long period...
I am in contact with F.Sch. and we will think about a concept for that "data-out thingy" which will allow us to get flexibility in adapting more and new values. I would like to see a software package that sends data to a tcp-server to handle the displays available for Zusi, that provides a function for a data-pool that could be accessed by .net programers and even eventually help in modifying the LUA script. I will get in contact with Havner for a new idea that came in my mind...

You are using VB.net ? Visual Studio Express probably, what Edition / release year ? F.Schn. is coding in C# not VB ! To access the .dll you will have to add a reference. In the solution-Explorer right-click the second line where it names your VB application and click Add and the reference. Browse to the dll ...

regards
Grüsse von Bernd

Benutzeravatar
gazz
Beiträge: 64
Registriert: 23.01.2011 08:44:47
Aktuelle Projekte: BR 111 Drivers Desk
Mini universal drivers desk with 3D printed parts
Omsi : NG272 Drivers Workplace (I WILL make progress this year)
Wohnort: England, Scarborough
Kontaktdaten:

Re: Zusi Display with Train Simulator 2015??

#17 Beitrag von gazz »

Brilliant,
Yes there is a lot of posts in the various subjects about getting data out of railworks and using joysticks,
it is really annoying that the makers of railworks refuse to implement joystick inputs, ok they have added X-Box controller input, but that is just confirming that railworks is a game and not a simulator,


i have Visual Studio express 2013 for desktop on my computer to look at code, i did manage to alter a few things on Havners first release of TrainSim helper (simple things like the text displayed to resemble German train operations... Sifa and things like that)

But as you can tell, programming is alien to me, give me a bit of metal, welder and angle grinder, and i'll make something without a problem, same with electrical stuff, a load of switches, buttons and a lever or 2 made on the lathe and connected to potentiometers, and i made a small desktop driving panel based roughly on the Br423,

I'll have a go at adding the reference to the .dll and see if i can get it to work, thanks for the pointers, i just wish i could be more use in this project

<Bernd>
Beiträge: 152
Registriert: 21.01.2008 10:01:35
Aktuelle Projekte: Warten auf ...
Wohnort: Windeck/Sieg- RE9 Bhf Schladern

Re: Zusi Display with Train Simulator 2015??

#18 Beitrag von <Bernd> »

gazz hat geschrieben: i just wish i could be more use in this project
you are welcome ! keep on asking and motivate us. It is much more fun to find solutions for things that also serve other people interests than just tinker for yourself ;)
Wishes, ideas and discussions let things happen ...
Grüsse von Bernd

Benutzeravatar
gazz
Beiträge: 64
Registriert: 23.01.2011 08:44:47
Aktuelle Projekte: BR 111 Drivers Desk
Mini universal drivers desk with 3D printed parts
Omsi : NG272 Drivers Workplace (I WILL make progress this year)
Wohnort: England, Scarborough
Kontaktdaten:

Re: Zusi Display with Train Simulator 2015??

#19 Beitrag von gazz »

Ok, i have done as you told me in visual studio, added the reference to the 'Zusi-Datenausgabe.dll'
then i built it, and placed the contents of the 'release' folder to the railworks plugins folder, as well as adding the get data lua file needed to read the data from the train's engine.lua file.

Then i used the LUA out editor to put the code into the DB 101 engine script file
This is the lua out editor that automates editing the lua file, works just like Havners version, https://www.dropbox.com/sh/paxigk37gqd9 ... 2.zip?dl=0

Started railworks and got the DB 101 loaded in a scenario, started zusi display, the TCP server and the railworks data extractor, clicked the connect buttons, and they seem to be talking to each other, but zusi display does not like the data it is receiving,
here's a screen shot:

Bild

Benutzeravatar
F. Schn.
Beiträge: 6607
Registriert: 24.10.2011 18:58:26

Re: Zusi Display with Train Simulator 2015??

#20 Beitrag von F. Schn. »

I have disposed my solution and started to code another converter. It's a little more objectorientated, but still improovable... :hat3
Well, here is the new solution. It is able to send the speed. I'm stil missing PZB-Values in your text file; according to <Bernd> you have to extend the exported variables. And I'm stil confused, how the brake variables are working, so I skiped them too. To run the project you should first compile the ZusiTCP.NET itself, then start the TCP-Server and then run Kompilierbefehl.bat - the example will compile and start automatical.
Diese Signatur möchte folgendes bekannter machen: ZusiWiki · ZusiSK: Streckenprojekte · YouTube: Objektbau für Zusi · euirc: Zusi-Chat

Antworten