extracting real-time game data

The place to discuss scripting and game modifications for X4: Foundations.

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

Post Reply
vrod
Posts: 133
Joined: Tue, 29. Sep 09, 19:03
x4

extracting real-time game data

Post by vrod » Tue, 16. Feb 21, 20:48

Has anyone had any luck extracting real-time game data from X4 while it is being played?

X3 had a log file that could be exported during gameplay, and I was looking for something like this in X4.

If not, perhaps a mod to write certain info to a text file. (like the commander's journal in Elite Dang.)

I am looking to have my cockpit's lights and displays interact with the game. Something like your ship's shields and hull value would be great. More info would be appreciated.

Any pointers for me to do this?

thanks,
VRod
https://www.youtube.com/channel/UCck0Ij ... sMStpjDFfg

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: extracting real-time game data

Post by kuertee » Wed, 17. Feb 21, 03:20

yup - very possible with the X4 Rest server mod: viewtopic.php?f=181&t=426061
just need someone to use it in a mod

also ... very cool cockpit
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

vrod
Posts: 133
Joined: Tue, 29. Sep 09, 19:03
x4

Re: extracting real-time game data

Post by vrod » Wed, 17. Feb 21, 09:53

Thank you for that link.

It sounds like what I am looking for!

Hopefully, I can grab some X4 data and start bringin my displays and lights to life with real game data!

vrod
Posts: 133
Joined: Tue, 29. Sep 09, 19:03
x4

Re: extracting real-time game data

Post by vrod » Wed, 17. Feb 21, 11:08

I have the DLL downloaded and in place.

What next? I need an example.

I am ready to start playing with this data!!!! So much that can be done!

vrod
Posts: 133
Joined: Tue, 29. Sep 09, 19:03
x4

Re: extracting real-time game data

Post by vrod » Wed, 17. Feb 21, 11:40

Nevermind. I started to tinker with it.

I am able to see my current ship's shield, hull, name and speed.

I can also see the ship's name....

but how can I see the ship type? "Example, Demeter, Vanguard, Persueus...etc.)

thanks


:)

kuertee
EGOSOFT
EGOSOFT
Posts: 789
Joined: Sun, 14. Dec 03, 13:05
x4

Re: extracting real-time game data

Post by kuertee » Thu, 18. Feb 21, 00:54

I'm not the author of that mod. And I've not looked at how to use it.
But I do plan to use it one day.
I'm just too busy with my own mod to help. Sorry, vrod.
Mods: RPG: Reputations and Professions, Social Standings and Citizenships, Crime has Consequences, Alternatives to Death. Missions/NPCs: Emergent Missions, NPC Reactions, Mod Parts Trader, High-sec Rooms are Locked, Hacking Outcomes, More Generic Missions, Waypoint Fields for Deployment. Others: Auto-cam, Friendly Fire Tweaks, Teleport From Transporter Room, Wear and Tear. QoL: Trade Analytics, Loot Mining, Ship Scanner, Signal Leak Hunter, Station Scanner, Surface Element Targeting, etc.

vrod
Posts: 133
Joined: Tue, 29. Sep 09, 19:03
x4

Re: extracting real-time game data

Post by vrod » Sun, 21. Feb 21, 20:22

No problemo.

I have not experimented with the info that I can grab (yet), so no need for me to get ahead of myself.

If I can get the ship type (Demeter for example), then I can place a nice jpg (or wireframe) of that ship onto a secondary display. Then with the shield, hull, and spped data, I could have graphics overlaid ontop that picture.
The same could be done for the target.

The end result would be your ship's status and your target's status each on a separate display.

Without the ship's type, I would just put a generic spaceship image in there. The status info could still work though. I think that the NPC ships (both enemies and friends alike) have the ship's type within the name, so I can parse through that name and figure out which ship they have. But any ship the player owns can be named anything, so the word "Demeter" may not show up in the name, even if it is a Demeter.

Sorry for the blah, blah. Just getting excited about my future project. :)

Vic
C-Pit 101

Post Reply

Return to “X4: Foundations - Scripts and Modding”