Utilizing game data from X4: Foundations via X4-Rest-Server
I'm having way too much fun with this. Did some plumbing ~~today~~ on 02.05.2021 and this is the result :D
⚠️ This is a re-upload from an old note of mine originally noted at https://beko.famkos.net/2021/05/02/auto-draft/
I patched the http server of https://github.com/Alia5/X4-rest-server/ to send Access-Control-Allow-Origin so the browser wouldn’t refuse to load. Could set up a proxy but I wanted results fast xD
The flight instruments are from https://github.com/uw-ray/Skyhawk-Flight-Instruments and are not for X4: Foundations obviously.
* Speed is also mapped to ALT as Fast Travel speed
* It reads just the camera position and not really the ship position (and since there is no up and down in space it settles fast on the new artificial horizon – may need some more tuning)
* Plumbed the speed to the pressure so it starts creeping up from 27.1 inHg to 33 inHg (max on the instrument) when speed goes over 200. Just for fun.
* Turn Coordinator is just Camera yaw + left or right based on mouse/pointer X.
* Some target data as proof of concept
This worked out better than expected and the best thing is: Doesn’t need to run on the same computer – it just has to be on the net so a tiny Raspberry and some external display would be enough for some fun cockpit building 8)
Other Videos By Beko Pharm
Other Statistics
X4: Foundations Statistics For Beko Pharm
At this time, Beko Pharm has 3,919 views for X4: Foundations spread across 8 videos. His channel published less than an hour of X4: Foundations content, roughly 3.77% of the content that Beko Pharm has uploaded to YouTube.