Version 1.1 update
Changes:
- Added new MFD page: Compatible missiles - useful for people like me who sometimes have no idea which missiles are compatible with the current ship while looking at the missile stock in a station
- Changed money/min calculation formula, should be more accurate now
- Fixed Cargo and Equipped lists, they were not updating correctly
- (D) LED remained flashing red after you had low hull/shields and your shields recovered, fixed
- Fixed some bugs which could cause lockups in the MFD updater thread
Script SPK: http://www.mediafire.com/?4nyqv95jit4nsm3
Script zip: http://www.mediafire.com/?280yxn6to9eu02i
Application: http://www.mediafire.com/?dt20bwznd24sdpr
Use the SPK version with Cyrows plugin manager http://cycrow.thexuniverse.us/XPluginMa ... taller.exe, it works with AP!
Known problems:
- Incoming missiles damage warning is not working correctly, will be fixed in the next version
If you are updating from the V1.0 version simply overwrite the files with the new ones.
------------------------------------------------------------------------------------------------------------------
Here it is, the first release of my Saitek X52 plugin for X3:TC

There are 2 parts, an X3 AL script which exports game data and a windows application which interprets this data and displays the pages on the MFD and handles the LEDs.
MFD Pages:
Equipped missile page:
Type
Damage
Speed
Estimated travel time to target if fired
Stock in cargo hold
Flags (heat seaking, swarm, etc)
Player page:
Ship name / class
Hull numeric / %
Shield numeric / %
Laser energy numeric / %
Current money
Money change / minute (based on last hour played, SETA time is correctly handled)
Target page:
Name / class
Hull numeric / %
Shield numeric / % - normally these should need freight scanner but most of us know anyway that X ship has XY MJ/GJ shields normally, so I don't consider this a cheat
Enemy/Neutral/Friend
Incoming missiles page:
Closest missile:
Type
Damage
Speed
Estimated time until impact
- All incoming missiles:
Number incoming
Total damage
Cargo page:
List of goods in cargo hold
Equipped page:
List of equipped stuff on player ship
Left scroll wheel changes pages, right wheel scrolls text up/down.
Pressing the right wheel jumps to the top of the current page.
LED feedbacks:
Shield feedback:
T1/2 - 3/4 - 5/6 changes colors:
GGG 100 - 85
GGY 84 - 71
GYY 70 - 57
YYY 56 - 44
YYR 43 - 30
YRR 29 - 16
RRR 15 - 0
Hull feedback:
T1/2 - 3/4 - 5/6 flashing
No flashing 100
Very slow 99 - 80
Slow 79 - 60
Medium 59 - 40
Fast 39 - 20
Very fast 19 - 0
If you have shields<15% and hull<20% ALL LEDs will flash red.
If the shields power up only the T LEDs continue to flash until hull is repaired, all other LEDs resume normal operation.
(A) LED: Selected missiles str compared to target:
- off : no missile equipped
- green : will cause only shield damage
- yellow : will destroy shield and cause some hull damage
- red : will blow target to tiny little pieces
Fire LED:
- off: no missile equipped
- flashing speed shows targets range compared to equipped missiles range
- slow flash: target too far
- fast flash: target getting near enough
- on : target in range
POV2 LED: target status
- off : no target
- green : friendly
- yellow : neutral
- red : enemy
- red and flashing : enemy / stronger ship than yours (based on class/shield/hull)
(I) LED: closest incoming missile damage if hit:
- off : no incoming missile
- green flashing - only shield damage
- yellow flashing - hull damage expected
- red - you will not survive
(E) LED: all incoming missiles damage if all hit:
- off: no more incoming missile
- green flashing - only shield damage
- yellow flashing - hull damage expected
- red - you will not survive
(B) LED: Laser energy
- off : no weapons installed
- green: 100 - 75%
- yellow: 74 - 50 %
- red: 49 - 20 %
- red and flashing: <20%
(D) LED: ??? ideas welcome
Throttle LEDs: ship docked or 0 speed: off
ship moving : on
ship moving backward : flashing
About the app:
The 32bit version of the directoutput.dll is REQUIRED to run the application. At start, it will try to detect the correct path of the dll, looking for it in
- C:\Program Files (x86)\Saitek\DirectOutput\DirectOutput.dll or
- C:\Program Files\Saitek\DirectOutput\DirectOutput.dll
These are the default locations on 64bit and 32bit systems. If your saitek drivers are not installed to the default location or if your system drive is not C: it will fail to automatically locate the dll, you will need to tell it manually where it resides by pressing the Browse button. It can be anywhere, can have any name as long as you select the correct file. The one I have on my system is version 6.2.2.4, size 114688 bytes.
The same applies to the X3 log folder, it will try to look for it in [your documents folder]\Egosoft\X3TC. If you have your X3 logfiles (log*.txt) somewhere else hit the Browse button and select the correct folder.
After selecting the correct folders hit 'Save paths' and you won't have to do it again. (Saved to settings.ini)
If everything is OK, you should see a 'X52 Pro found and initialized!' message in the log window. If something goes wrong, it will display the error message also in the log window.
There is a 'ReInit' button. Hitting this will:
- Deinitialize the controller
- Unload the DLL
- Restart the Saitek directoutput service
- Load the DLL
- Initialize the controller
After a cycle, again, you should see the 'X52 Pro found and initialized!' message. Important: The ONLY supported device is the Saitek X52 Pro.
During testing, the DirectOutput library proved to be quite buggy. I tried to mitigate this by coding the app as fault-proof as possible, but still, problems, lockups can happen (but should be rare). If the MFD becomes unresponsive or the LEDs dont react correctly try to alt-tab out and hit the ReInit button. That should fix it and you can resume playing.
Known problems/limitations:
- If you change the current page using the left scroll the LEDs revert to the default state for a short time. This is because LED states are linked to the active page and a page change wipes the data, so they will all lit up until the next update cycle (which is every 50ms).
- Sometimes at a page chage the device does not send back data to the application (using the callback routine) so the app loses track of which is the currently active page. The sign of this is that all LEDs revert to the default state and dont do what they should. Changing the page again usually fixes it and normal operation is resumed. Again, this is a bug in the directoutput library.
- Changing LED brightness is not implemented currently. There is a function in the Saitek control panel for this, but its not documented/not included in the dll. Support for this - and better looking led effects - is possible in the future.
To develop my own dll wrapper I used documentation and code parts from other people, so they deserve credit for they work: Frederic Valery (Blackswift) and ellF (on saitekforum.com)
Some of the LED feedback ideas were taken from RotCurtSed's X3 Reunion plugin.
The scripts and the app is provided as-is: by using them you accept that I can't take responsibility if it sets your computer on fire, formats your harddrive or makes your girlfriend leave you. You were warned.
If you want to develop your own plugin contact me and I can send you source code. The app and the dll wrapper was written in delphi, compiled with RAD Studio 2010.
[ external image ] [ external image ]
Cheers,
Exi