Cycrow's Logitech G15 LCD screen scripts

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

Eztrelle
Posts: 105
Joined: Sat, 1. Nov 08, 11:07
x3tc

Cycrow's Logitech G15 LCD screen scripts

Post by Eztrelle »

Hi All,

Does anyone know if cycrow's Logitech G15 LCD screen scripts works with X3TC?

Ez
IBM AT 16MHz 386SX
DOS 3.3 (With EMM 386!!)
1 Mbyte RAM
256 Colour VGA graphics card (512 Kbytes RAM)
20 MByte Hard Drive
Creative SoundBlaster 1.0
14 inch, 640x480 Monitor
Legionnaire
Posts: 1368
Joined: Sun, 8. Feb 04, 16:28
x4

Post by Legionnaire »

Aparently hes planning on redoing them for X3:TC but they arent at the top of his priorities, however i dont have a G15 so i dont know for definate.

Legionnaire
Mobo MSI Z270 Gaming M3 CPU i5 7600K @4.2
RAM 16Gb Corsair Vengeance
2x 1TB (RAID 0)+ 4TB SSHD + 3TB HDD + 500GB SSD (Windows and X4 install Locatrion)
Windows 10 PRO
8GB MSI 1070Ti
CanadianBrit
Posts: 1406
Joined: Wed, 6. Nov 02, 20:31
x4

Post by CanadianBrit »

Here's hoping he does. Would be nice if he could some how work in a indicator a ship has been destroyed

I have a 2007 G15, and I ask Cycrow to redo his script
sibaz
Posts: 11
Joined: Sun, 5. Mar 06, 23:55
x3tc

Logitech G15 AL plugin ported to X3TC

Post by sibaz »

I've just finished a first step of porting Cycrow's Logitech G15 LCD plugin to X3TC.

I've typed in all the stuff related to the AL Plugin, so when installed you get he AL Plugin showing up in the artificial life menu, and it generates the log file with most of the data in it, which was in X3.

It doesn't do more than that, and it does need improvement.

For those that don't know the X3R LCD applet works in 2 parts, with an AL plugin which generates a log file (every second) containing pertinent information about the state of the game, and the LCD applet, which picks up that log file and displays the data.

The X3R LCD applet doesn't seem to pay any attention to the location you give for the log file, so I can only get it to work looking at the X3R installation directory, so I can't display my log file.
Whats more, as there are more Races in X3TC I think the applet will need changing to show more information, and for now, I don't want to do anything new to the AL Plugin, until I've got the Applet working.

You can download the scripts at http://www.sibaz.com/downloads/Logitech ... Plugin.zip
User avatar
Freeman_79
Posts: 298
Joined: Tue, 28. Aug 07, 03:31
xr

Post by Freeman_79 »

I didn't even get this one to work with X3TC, all I see is a X3R logo at the LCD, nothing more :)
semiliterate
Posts: 357
Joined: Sat, 13. Dec 08, 22:02

Re: Logitech G15 AL plugin ported to X3TC

Post by semiliterate »

sibaz wrote:so I can only get it to work looking at the X3R installation directory, so I can't display my log file.
um, i'm assuming "creating the log file there" isn't an option?
sibaz
Posts: 11
Joined: Sun, 5. Mar 06, 23:55
x3tc

Post by sibaz »

The AL Plugin works by creating a logfile, using the 'write to log file #' command, which only allows you to specify the name/number not the directory of the log file.

It creates a log file in the same directory where your save files directory and screen capture directories are.

The applet side of it is no different to before, so unless you can do something clever like create a symbolic link or something to trick the X3R applet, it won't change your LCD at all.

Have a look at the log file it creates, in my case its at "C:\Documents and Settings\Simon\My Documents\Egosoft\X3TC"
Rawh
Posts: 32
Joined: Mon, 29. Dec 08, 12:28
x3tc

Post by Rawh »

Great job. I'll be sure to check it out!
(and in the meantime put this thread in my watchlist :))
User avatar
TECSG
Posts: 1610
Joined: Tue, 17. Feb 04, 22:06
x3tc

Post by TECSG »

Hi sibaz,

I've got Cycrow's G15 display working using your ported files.

All you have to do is copy X3.EXE from your X3 - Reunion folder (or any file, just rename it to 'X3.EXE') to your Terran Conflict save folder (not the installation folder), this is in your 'My Documents' folder and will normally be something like:

C:\Documents and Settings\[USER]\My Documents\Egosoft\X3TC\ (Where [USER] is your username.)

Then open the Logitech GamePanel Manager, click on 'Programs', then select X3 Reunion LCD Display and click on the 'Configure' button at the bottom.

Change the X3 directory to the new Terran Conflict save folder (you need to select the file 'X3.EXE', that's why you have to copy or create it there).

Once you've selected the X3 directory, you can delete the X3.EXE file you copied or created, it's only needed to select the directory initially.

Aside from saying 'X3 Reunion' instead of 'Terran Conflict' in the display, it works fine.
sibaz
Posts: 11
Joined: Sun, 5. Mar 06, 23:55
x3tc

Post by sibaz »

Well done TECSG. You can change the text in the box (path to X3.exe) by just typing it, in which case it doesn't validate (only the popup dialogue box expects to find a file called x3.exe in the path given).

I'd tried playing with it, but nothing worked, but as you'd got it working I tried a reboot and hey presto. Marvellous.

If I have time I'll have a look at whether I can put new things into the file, and whether the X3R applet picks up on them, or whether it only looks for the things Cycrow originally envisaged. If I can't add things to the normal pages, I'll look into adding it into the custom pages. I've kind of neglected that part of the plugin, as I've never used it.

Also Cycrow originally added a 'Combat Computer' ware, which you could buy, and if present if added numbers telling you the number of missiles locked onto you and the number of threats in range, I'll have a look at that again if I have time, but I couldn't figure out how to add wares in X3TC in the same way as they seem to work in X3R.

Still a good working Alpha for those that need it.

As an aside, I've asked Cycrow for the C++ Source for his applet, and I've looked into writing a new one in his absence. Logitech have released a LCD SDK, but the import Library (for linking to the SDK .dll) is compiled using Microsoft's VS 6 and is in COFF format, whereas the only free compilers I can get, don't like it. Borland expects one in OMF format. Has anyone encountered this problem and come up with a solution, or do I need to find a friend with Visual Studio to compile this for me once I've written it (or write my own import library to connect to the .dll, which would be a pain). I've considered writing the whole thing in Linux and compiling it using GCC, but I've no experience compiling win32 binaries on Linux, so if anyone knows about that, it'd be handy also. If any Admins/Moderators want me to start a new post on the off topic board about this, then let me know.
User avatar
TECSG
Posts: 1610
Joined: Tue, 17. Feb 04, 22:06
x3tc

Post by TECSG »

Hi sibaz,

LOL, I didn't think of typing the path in directly! :oops:

I also had to restart X3LCD.EXE, seems the application may need to be restarted after you change the path to actually start to use the new location.

Looking at the script, (al.logitechg15.timer), it should be pretty simple to add or ammend what is written to the logfile, that's assuming Cycrow doesn't mind you altering his scripts...

As far as I know custom wares work the same in TC as X3R, unless they're using a custom ware slot (not a built-in empty slot). Most X3R scripts port straight across once you change the 'script version' number from 33 to 42 (or whatever the numbers are) the scripts and TFiles work fine with the few exceptions of a couple of missing or modified commands (and any BBS stuff).
sibaz
Posts: 11
Joined: Sun, 5. Mar 06, 23:55
x3tc

Post by sibaz »

I had all kinds of grief trying to port across by just changing the version numbers. In the end I just used the script editor and programmed the lot from scratch.

I'm not too fussed about changing the AL Plugin to add stuff to the log file, that's the easy bit. I'm worried about how the applet will react to different things in the log file. The log file is very much a list of data, whereas the lcd seems to display things in a neat way. Like I say, it may not react nicely to things not being how it expects.

I'm pleased to announce that having had all kinds of problems trying to compile an LCD Applet using the Logitech SDK and Borland, and Watcom, I have managed to compile the simple console based examples using GCC and Cygwin (with minGW).

As GCC doesn't include the MFC libraries, I can't compile the framework example, so I'm not sure how much of a masochist I want to be, trying to make it work, but I'll try to write an LCD applet from scratch if I can (and if I have time).
User avatar
TECSG
Posts: 1610
Joined: Tue, 17. Feb 04, 22:06
x3tc

Post by TECSG »

Look forward to it sibaz!

You might want to write it so it uses an external template for the display layout, so when TC2.0 (or X4) comes along, you (or someone on your behalf) would only have to change the template rather than modify and recompile the app itself.
User avatar
donotdespisethesnake
Posts: 285
Joined: Thu, 7. Oct 04, 21:15
x3

Post by donotdespisethesnake »

If it helps, you can download a free version of Visual C++ (the "Express" version), I use it myself.

I have just got a G15, I would like to run the applet. If there is anything I can do, let me know...
"Yes, he is in his office, but he's on an intergalactic cruise."
sibaz
Posts: 11
Joined: Sun, 5. Mar 06, 23:55
x3tc

Post by sibaz »

I've downloaded every compiler I could find, and the problem is you need to be able to link with the Logitech Library (linked using a coff based linker), and the more detailed examples use MFCs, which microsoft don't distribute for free.

I've tried recompiling the source I've got from Logitech (which I think is a large part of the aforementioned library, but could just be their own extension to MFCs)

I've tried using OFCs but it's a very outdated sf project and it's not got any helpful instructions to compile it, and without the library to link with, the headers aren't very helpful.

I've had success with Doctor C++ (which uses GCC) and with GCC (using minGW to compile win32 binaries), but neither of those have any nice win32 classes to help build the fluffy bits.

So I'm back to Borland or exploring VC++ Express and what limited graphical classes they give you. I've written VCL classes before, so I may try to make something which I can link into a Borland application, but I don't have time to play right now.
WillASM
Posts: 8
Joined: Mon, 8. Dec 03, 12:49
x4

Post by WillASM »

I have been trying to get this to work for a couple of days now. The log file is
being created alright, but the applet is still showing game not found?
Did I miss something along the way? I would really love to get this working!
This was the first script I ever installed for the X games, always ran vanilla
prior to this, but why let my G15 go to waste.. Any suggestions are welcome..
User avatar
TECSG
Posts: 1610
Joined: Tue, 17. Feb 04, 22:06
x3tc

Post by TECSG »

Hi WillASM,

The good news is that if you are getting the log file (9003) being created, the script is installed and working!

What you have to do now is configure the actual application part (X3LCD.EXE) of the package.

I did notice that sibaz's .zip file doesn't contain the application, so you'll have to download that from the original X3 G15 thread.

Your best bet is to download and install the original from Cycrow (for X3), then copy the new files from sibaz over the scripts in your X3TC folder, then just change the path to the log file as stated in earlier posts on this thread.
WillASM
Posts: 8
Joined: Mon, 8. Dec 03, 12:49
x4

Post by WillASM »

Well I seem to have got it working now..
First I had to install X3R to get it working at all, but I think there is a way
around this if you do not have X3R. The applet creates the file x3lcd.dat
in the folder..

C:\Documents and Settings\[USER NAME]\My Documents\Egosoft\X3

This folder needs to exist for the applet to save the file x3lcd.dat file.
This file contains the path and log file name info in the format...

FILE: C:\Documents and Settings\[USER NAME]\My Documents\Egosoft\X3TC\X3.exe
LOG: 09003

Just create the folder above, and replace the above [USER NAME] with
your login name..

As far as the data displayed goes, well the good news is the playing time,
salvage insurance count, total ships, station count all are correct, but...
My total credits shows as zero :cry: Also all my rankings are way off!!
As well in my current game I only have 1 TS, a Mistral SF, one of the new
ships in TC, my TS total count shows as -1. Not surprised by that though.

Anyhow, getting it to display some info is better than nothing at all!
eddieg
Posts: 153
Joined: Tue, 9. Dec 03, 16:10
x4

Post by eddieg »

I'd like to:
a) +1 seeing a G15 applet for X3:TC
b) anybody care to upolad what the X3:TC log file looks like that this applet produces? (or tell me the easiest way to start getting this thing?)

I have written G15 applets before using the Java SDK (wrote one for Flight Sim X) and, while I'm not promising, I would have fun trying an alternative version, mostly because I find Java more fun over anything visual studio related =]
User avatar
corhen
Posts: 338
Joined: Thu, 16. Oct 08, 08:45
x3tc

Post by corhen »

i have followed WILLASM's instructions, and whil i get the log, and that x3lcd.dat, the G15 Reunion app still shows "No Game Found"

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”