X4: Foundations

X4: Foundations

View Stats:
AvaTaxi Feb 23, 2023 @ 1:03am
Is there a way to extract data from the game
Hey guys!

Sorry if the question has already been asked, I couldn't seem to find an answer. As a side project, I'm currently trying to write a program to automatically calculate stuff like what materials will be needed to construct a station, what it will cost (with median prices) and how long it will take. It will also calculate how much a station is producing and the amount of ressources needed for an hour-cycle. Could help planning a station for your own or calculate a station that extracts the maximum out of building missions. Currently I'm trying to find a way to extract data from the ingame-encyclopedia so that I don't have to read and type all the data (which is a lot xD) by hand. Is there a way to extract these encyclopedia-entries from the game data? As they're not dynamically created there should by like a file with the entries. Looked in the base-files, but I'm not sure how to unpack those .dat-files and don't want to break something :D Thanks in Advance for your help!

Greetings
Avataxi
< >
Showing 1-10 of 10 comments
Kajar Feb 23, 2023 @ 3:26am 
As for unpacking files you may find the guide here https://forum.egosoft.com/viewtopic.php?f=181&t=402452
AvaTaxi Feb 23, 2023 @ 9:00am 
Originally posted by CreatorOfWorlds:
http://www.x4-game.com/#/station-calculator

Thanks, thats a really nice tool. I figured that something like that already exists, I just took it on my own, to make a little programming project out of it, just to develop some stuff and get better at it. In the future I'd want to add turrets and their construction cost to the station planer.



Originally posted by Kajar:
As for unpacking files you may find the guide here https://forum.egosoft.com/viewtopic.php?f=181&t=402452

That seems to be the solution! Thanks, I'll try it.
SigmaSquadron Feb 23, 2023 @ 11:59am 
You can also download the Catalog Tool by showing all Steam Tools in your library, and searching for "X Tools".
AvaTaxi Feb 23, 2023 @ 3:06pm 
Originally posted by SigmaSquadron:
You can also download the Catalog Tool by showing all Steam Tools in your library, and searching for "X Tools".

I tried using this. It's a windows tool, but if someone needs to use it on Linux the Proton-Steam option seems to operate it just fine (Under Settings -> Steam Play -> Activate Steam Play for all other titles; I'm using Proton-ce-custom, which i guess comes with garuda linux), although you'll need to copy the .cat-Files to a folder that is not hidden, as the internal files explorer doesn't show hidden folders.


Now I'm coming to my next problem: Tried looking through for the stats of station modules, but I only found some xml-files stating some chances (guessing a chance of a specific faction to build this module on new station). Does someone know where the stats of station modules are stored (which cat or what path it has)?
ZeroAffex Feb 23, 2023 @ 4:17pm 
Hope you share your final product with us! Looking forward to seeing what you create. Best of luck on your future endeavors!
AvaTaxi Feb 24, 2023 @ 3:14am 
Will do :D But it will take a while as I don't really have knowledge on how to programm a GUI. If I don't find a solution to extract data automatically, I'll have to write the data from the game by hand, which will also take a while :D
CreatorOfWorlds Feb 24, 2023 @ 7:58am 
Perhaps you would spend the time better lending yourself to updating/improving the sources that already exist then. Unless you see it as the all time learning process😀
https://www.egosoft.com:8444/confluence/display/X4WIKI/Objects+in+the+Game+Universe
https://roguey.co.uk/x4/
http://www.x4-game.com/#/station-calculator
https://www.qsna.eu/x4/map/
theslay66 Feb 24, 2023 @ 11:40am 
Everything you need is defined in libraries/wares.xml (in 08.cat)
AvaTaxi Mar 3, 2023 @ 4:28am 
Originally posted by CreatorOfWorlds:
Perhaps you would spend the time better lending yourself to updating/improving the sources that already exist then. Unless you see it as the all time learning process😀
https://www.egosoft.com:8444/confluence/display/X4WIKI/Objects+in+the+Game+Universe
https://roguey.co.uk/x4/
http://www.x4-game.com/#/station-calculator
https://www.qsna.eu/x4/map/

It's mostly planned as a learning experience, as I have never build a program completly from scratch of my own. When I'm finished I plan to upload my source code to github, so that maybe others can take a spin of it or use it in their applications. I like the station calculator from x4-games.com, my idea is kind of like that, only that I want to expand it with configurable turrets. I know most of program ideas already exist, but while learning to program you don't have to reinvent the wheel.



Originally posted by theslay66:
Everything you need is defined in libraries/wares.xml (in 08.cat)
Thanks a lot, will look it up later!

Sorry for the late answers, I'm in the exam phase in uni, so trying to focus on that ':D
< >
Showing 1-10 of 10 comments
Per page: 1530 50

Date Posted: Feb 23, 2023 @ 1:03am
Posts: 10