Stream data to Graphics LCD (inc Logitech G13/15) MAJOR UPDATE 1.1

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

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

Post Reply
User avatar
esd
Posts: 17962
Joined: Tue, 2. Sep 03, 05:57
x3tc

Stream data to Graphics LCD (inc Logitech G13/15) MAJOR UPDATE 1.1

Post by esd » Fri, 23. Sep 11, 00:20

MAJOR UPDATE! Version 1.1.
No longer a messy, involved install process in LCDStudio nor relying on a 3rd-party plugin. I've written my own proper plugin for LCDStudio instead.

DOWNLOAD (See readme for external requirements!)

The X3TC DataStream for graphics LCD displays and devices (including the Logitech G13, G15, and various little LCD displays) puts information from X3TC on your LCD while you play, refreshing itself every 5 seconds. From your current bank balance, to how many Salvage Insurances you have available, to how full your cargobay is, this mod means you won't have to open the ingame-menus to find out about them!

Archive includes three LCDStudio designs for 160x43 displays (G13/15 especially).
[ external image ]
Pilot Status

[ external image ]
Ship Status

[ external image ]
Cargo Status
(Note: Things that don't fit, scroll).

Currently it exports over 15 bits of data to put on the LCD. It uses the script editor for starting/stopping, and a single bool Global Variable. Would like to change this into an AL plugin to make it easily turn-on-and-off-able, but have no idea how.
More data output is possible, I'm just worried about ragging the HDD and slowing up the game in combat.

Here's the readme:

esd's X3TC G13 Data Stream v1.1

What it does: Puts information from X3TC on your Graphics LCD device, including the Logitech G13/G15 GamePanel, every 5 seconds.

Uses: Log file log06077.txt

External Requirements:
LCDStudio (labelled the April 2011 GX Software Pack)
http://www.matrixorbital.ca/software/GX/softwarepacks/

Contents:
ReadMe.txt
x3tcds-ShipStatus2.xds - design file for LCD Studio.
x3tcds-CargoStatus2.xds - design file for LCD Studio.
x3tcds-PilotStatus2.xds - design file for LCD Studio.
ShipStatus.png - how the design looks on a G13.
CargoStatus.png - how the design looks on a G13.
PilotStatus.png - how the design looks on a G13.
LCDStudio:
-X3Monitor.dll - Plugin for LCDStudio
-X3Monitor.Plugin - Plugin file for LCDStudio
Scripts:
-esd.g13PAW.Control.Start.xml - Script that starts X3 exporting the data.
-esd.g13PAW.Control.Deactivate.xml - Script that stops X3 exporting the data.
-esd.g13PAW.Control.xml - Control script. Don't run from SE.
-esd.g13PollAndWrite.xml - Data gathering/writing script. Don't run from SE.

UPGRADE INSTALL (If you previously installed esd's X3TC G13 Data Stream v1.0):

1. Delete your old playlists and designs - sorry, they're not backwards compatible. (If you've made any, you can edit them to work with the new plugin, but it means changing the data source on each element manually)
2. Place the X3Monitor.dll & X3Monitor.plugin file in the LCDStudio program folder.
2. Run LCDStudio.
3. Go to the Data View.
4. Open the X3TC Datastream tree.
5. Right click the top entry and choose "Remove custom variable".
6. Repeat step 5 for all entries in the X3TC Datastream tree.
7. Follow the New Installation instructions below, starting at step 10.


New Installation:

1. Put the scripts from the scripts folder into the \Egosoft\X3TC\Scripts folder.
2. Run X3TC.
3. Load your savegame.
4. Open the script editor, highlight esd.g13PAW.Control.Start and press R (run it).
-4a Select "null". Don't worry, it can be turned off.
-4b Press Enter on the script-summary screen to run.
5. Save and close X3. (This will have created the file log06077.txt in your My Documents\Egosoft\X3TC folder, which provides the data stream).
6. Install LCDStudio (unless you already have it installed).
7. Navigate to the LCD Studio program folder (typically C:\Program Files\LcdStudio).
8. Place the X3Monitor.dll and X3Monitor.plugin file from the archive there.
9. Run LCDStudio.
10. Go to Options and make sure the X3Monitor plugin is Checked.
11. Exit LCDStudio completely (not just exit to tray)
12. Put the three .xds files from the archive somewhere. Doesn't really matter where, but somewhere in My Documents is probably best.
13. Run LCDStudio.
14. Select "New Playlist".
15. Click "add" and find & select one of the .xds files.
16. Repeat step (15) for the other two .xds files.
17. Save the playlist somewhere.
18. Choose "exit and run from traybar".
19. Find it in your system tray. Right-click and choose "Playlist -> Load". Choose the playlist you created a moment ago.
20. Load X3, load your savegame, and enjoy!


How to run normally after install:
1. Make sure LCDStudio is running, and in the system tray (Exit and run from Traybar).
2. Load your playlist.
3. Run X3. As long as you didn't stop the polling, it should continue when you load.

(NB, on some devices, such as the G-series, you will have to use the device's buttons to select LCDStudio's output).

How to stop polling/uninstall the script:
1. Run X3.
2. Load your savegame.
3. Go to the script editor and run "esd.g13PAW.Control.Deactivate". Within 5secs, updates will stop.
4. The scripts and the log6077.txt file can now be deleted!

KNOWN ISSUES:

If you start a new savegame after running this, and run the start script, updates will fail. X3 will refuse to write to the log file. If updates seem frozen... delete the log file.

If log06077.txt doesn't exist when you start the playlist before running X3TC, on occasion the plugin doesn't spot when X3TC creates the file and so continues to display "No Data". To correct this, alt-tab from X3TC, right-click the LCDStudio icon in the system tray and re-load your playlist.


Parameters sent to LCDStudio:
Playing Time
Player Name
Player Cash
Ship Name
Current Sector
Current Sector Owner
Ecells aboard/JD-Fuel
Salvage Insurance
Hull %
Shield %
Cargo Used
Cargo Total Space
Cargo Manifest - single line
Trade Rank Title
% to next trade rank
Fight Rank Title
% to next fight rank

Additionally the following is created by the plugin from those parameters:
% Cargo space used.

Using LCDStudio you can create your own displays from this data, from bars to graphs and pie-charts. Customize as you wish. Any data requests, please put them in the thread at Egosoft.

Changing the update rate:
This cannot currently be done. Sorry.

Changelog:
1.1: Changed the way the LCDStudio portion was handled. No longer a big messy hodge-podge of Custom Variables, now a nice, neat plugin instead. Easier install/uninstall as a result.

DOWNLOAD (See readme for external requirements!)
Last edited by esd on Sun, 25. Sep 11, 01:00, edited 1 time in total.
esd's Guides: X² Loops - X³ MORTs

Bartie
Posts: 21
Joined: Tue, 6. Feb 07, 10:50
x3tc

Post by Bartie » Sat, 24. Sep 11, 14:21

doesn't work for my it say's always "My Text"

User avatar
esd
Posts: 17962
Joined: Tue, 2. Sep 03, 05:57
x3tc

Post by esd » Sat, 24. Sep 11, 14:42

If it says "my text" then the data source hasn't been added to the Text Box control. Right click the text-box, choose "properties" and make sure that "Data Source" has something from the X3TC data tree in it.

To make sure LCDStudio's seeing your feed (and to make sure the Custom Parameters are correctly in place), open LCDStudio, go to the Data View tab at the bottom, expand X3TC-Stream in the list (likely at the bottom) and hover your mouse over a tree entry. If it says "unknown" then there's something wrong with it. If it gives you a value, then it wasn't working because the Text Box has no Data Source assigned to it.

Alternatively, hold your boots, coz I've just made a bit of a breakthrough in getting it into LCDStudio in a much more elegant way without all these Custom Variable hacks or using someone else's plugin. Yes, I should probably have waited until I'd got it done before releasing at all, but I was excited and stuff that I'd got it working...
esd's Guides: X² Loops - X³ MORTs

Bartie
Posts: 21
Joined: Tue, 6. Feb 07, 10:50
x3tc

Post by Bartie » Sat, 24. Sep 11, 14:57

oh thanks now it work.


Thats realy usefull.

User avatar
esd
Posts: 17962
Joined: Tue, 2. Sep 03, 05:57
x3tc

Post by esd » Sun, 25. Sep 11, 01:01

MAJOR UPDATE! Version 1.1.

See OP for details! (Quite excited... written my first .dll!)
esd's Guides: X² Loops - X³ MORTs

User avatar
corhen
Posts: 338
Joined: Thu, 16. Oct 08, 08:45
x3tc

Post by corhen » Sun, 25. Sep 11, 02:43

looking good!

Im afraid that this is still above my technical level.. which extends to enabling the AL settings.. but last time i launched the Scrip Editor i ended up messing up my save game and had to reinstall!

Keep up the good work!
Jovianmoon wrote:
apricotslice wrote:...auto-pillok...
Are we ready to collide with that asteroid?
Yes sir! Engaging auto-pillock!

User avatar
esd
Posts: 17962
Joined: Tue, 2. Sep 03, 05:57
x3tc

Post by esd » Sun, 25. Sep 11, 02:53

corhen wrote:looking good!

Im afraid that this is still above my technical level.. which extends to enabling the AL settings.. but last time i launched the Scrip Editor i ended up messing up my save game and had to reinstall!

Keep up the good work!
If someone's willing to give me a hand (or even do it for me...) to make it an AL plugin, I'd be more than happy - but running this from the Script Editor is pretty easy. Just highlight esd.g13PAW.Control.Start and press R, then press Enter twice. To stop it again, highlight esd.g13PAW.Control.Deactivate, press R and hit Enter twice.
esd's Guides: X² Loops - X³ MORTs

Yapa
Posts: 202
Joined: Wed, 12. Mar 03, 01:26
x2

Post by Yapa » Mon, 26. Sep 11, 16:15

Great idea!

Thanks for the hard work, currently still playing X3R but will def bookmark this and use it when I get to TC :)

Post Reply

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