X4: Foundations

X4: Foundations

View Stats:
This topic has been locked
Fast Dec 4, 2018 @ 2:22am
I went through some of the game files...
The economy seems a little more static than perhaps people thought.
It seems perhaps certain actions imply a change should occur to certain things in the game. rather than a breathing economy which is based on the world around it, its actually based directly on certain player related actions, which make slight changes to the existing world for example, auto trading basically has near no effect on the economy, however if you were to trade yourself. You may see bigger price flucutaions. Similarly, building a station yourself can affect the economy however, stations built by AI effectively does not.

Principally, player direct action seems to affect the world...in a sort of static way, but AI actions are far less relevant and do very little in the way of a dynamic world. This might be why some worlds seem static whilst other do not. A player building a fleeting and manually attacking a station would change something in the game vs you sending a fleeting of AI to do the same thing which would offer relatively no change to the economy.
< >
Showing 121-135 of 162 comments
cfehunter Dec 5, 2018 @ 5:20am 
Originally posted by Epic Story:
The economy itself appears underneath to be EMULATED rather than SIMULATED. Make of that what you will.

Actually that bit may be true, digging through the scripts.
There are AI traders that are setup to fulfil buy orders and sell orders between stations, but there also seems to be a mechanism to directly trade resources between stations.
I wonder if this has anything to do with the issues in rebirth where the player could never build any ships due to a lack of resources at AI shipyards.

If anybody wants to verify this, you can just install the rebirth modding tools, open the cat files in X4 and open the script files in a text editor.
Last edited by cfehunter; Dec 5, 2018 @ 5:21am
Kulin Dec 5, 2018 @ 5:28am 
Originally posted by cfehunter:
Originally posted by Epic Story:
The economy itself appears underneath to be EMULATED rather than SIMULATED. Make of that what you will.

Actually that bit may be true, digging through the scripts.
There are AI traders that are setup to fulfil buy orders and sell orders between stations, but there also seems to be a mechanism to directly trade resources between stations.
I wonder if this has anything to do with the issues in rebirth where the player could never build any ships due to a lack of resources at AI shipyards.

If anybody wants to verify this, you can just install the rebirth modding tools, open the cat files in X4 and open the script files in a text editor.
Could you name the file? There are a lot of and it's a bit hard to get an overview without experience of x modding.
cfehunter Dec 5, 2018 @ 5:41am 
Originally posted by Kulin:
Could you name the file? There are a lot of and it's a bit hard to get an overview without experience of x modding.

I'm at work, but I believe it's in the #7 or #8 pack. Run the x rebirth tools from steam and select the cat file manager launch option, the cat files are in the X4 root folder with the exe.

You're looking for the md folder and the aiscript folder, inside that are a bunch of xml files that are in egosoft's custom script schema. I recommend visual studio code for readability.
It should be obvious from the names of the files what they're responsible for :)

From memory I think it's the economy manager script. It sets up an event to fire every 15 minutes that scans the entire universe for shortages and sets up exchanges between pairs of stations.
Last edited by cfehunter; Dec 5, 2018 @ 5:44am
Kulin Dec 5, 2018 @ 5:45am 
Originally posted by cfehunter:
Originally posted by Kulin:
Could you name the file? There are a lot of and it's a bit hard to get an overview without experience of x modding.

I'm at work, but I believe it's in the #7 or #8 pack. Run the x rebirth tools from steam and select the cat file manager launch option, the cat files are in the X4 root folder with the exe.

You're looking for the md folder and the aiscript folder, inside that are a bunch of xml files that are in egosoft's custom script schema. I recommend visual studio code for readability.
It should be obvious from the names of the files what they're responsible for :)

I already decompressed them and went through. But there are 4259 xml files in the folder. So a little shortcut to get into them would help. Guess i have to bite into that sour ass to get a look.
HexCaliber Dec 5, 2018 @ 5:54am 
Originally posted by Zothen:
What it needs is a second opinion from somebody who decompiles the exes and can make some sense from obfucated code.
This does not involve decompiling the .exe. Game data and scripts are stored in cat files that anyone can access , (and publish details of) after downloading the requisite files. Changing values in these files directly, adding additional scripts, or creating entirely new cat files with new functions is how modding is achieved in this game.

There is little reason to touch the .exe at all, unless you aim to make a cheat that requires injecting values into the code while it is running. Anyone claiming to have decompiled the .exe and gained all this information about the economy and how it works is talking out of their rear end.
Last edited by HexCaliber; Dec 5, 2018 @ 6:00am
Kulin Dec 5, 2018 @ 6:05am 
Originally posted by HexCaliber:
Originally posted by Zothen:
What it needs is a second opinion from somebody who decompiles the exes and can make some sense from obfucated code.
This does not involve decompiling the .exe. Game data and scripts are stored in cat files that anyone can access, (and publish details of). Changing values in these files directly, adding additional scripts, or creating entirely new cat files with new functions is how modding is achieved in this game.

There is little reason to touch the .exe at all, unless you aim to make a cheat that requires injecting values into the code while it is running. Anyone claiming to have done so and gained all this information is talking out of their rear end.

As i said: the exe looks like a native exe. Not CLR. I(with 20 years as professional c++/c# programmer) know no way to decompile them into some kind of readable code. All you get out of it is assembler or a giant piece of c code that has nothing to do with the code before compilation and is almost as unreadable as assembler. It would take ages to reverse engineer a project of this size(and to fully understand how AI works).

But maybe the exe is neither CLR nor native? Sure looks a lot like native after extraction and disassembling.
Last edited by Kulin; Dec 5, 2018 @ 6:08am
NexAngelus *X* Dec 5, 2018 @ 6:05am 
i have a large fleet of miners and i can confirm...u are wrong. i can watch miners fully automated DO in fact drastically reduce the stock down to NOTHING! forcing them to change mineral or move to another system. i can also confirm that the auto miners change the price constantly. it might start out high but as they get more and more sales the station will start offering penies for its last bit it wants. ive also seen my miners NOT in a system and have a refinery all the sudden go down, most likely from NPC miners filling the needs/buy orders.

there are some things i cant guess on or verify from experience, but most likely the economy is stale because there is NO MAJOR war going on. u can fly all around the world/game and have little to no interaction with enemies. blowing things up makes ppl money... ppl need to buy more ships/guns/stations and this makes everything in the whole tree of production have a need.
sd_Jasper Dec 5, 2018 @ 6:21am 
Guys! I went through the game files and it shows that the earth is flat!
HexCaliber Dec 5, 2018 @ 6:29am 
Originally posted by Kulin:
As i said: the exe looks like a native exe. Not CLR. I(with 20 years as professional c++/c# programmer) know no way to decompile them into some kind of readable code. All you get out of it is assembler or a giant piece of c code that has nothing to do with the code before compilation and is almost as unreadable as assembler. It would take ages to reverse engineer a project of this size(and to fully understand how AI works).

But maybe the exe is neither CLR nor native? Sure looks a lot like native after extraction and disassembling.
I had not moved far enough through the thread when I quoted that post to have read your response. I too am aware how difficult it would be to get anything useful from the .exe.

I was trying to avoid getting into a technical discussion, while still addressing some of the alarmists and storytellers claims in this thread.

I have not looked at .exe, there is little need, nor a desire to, as there is more to be gained from taking the time to look through the contents of the cat files. As a long time member of X Devnet I have been modding and scripting in the X Games since 2000, mostly for my own amusement. I stopped releasing mods to the general public quite some time ago, but still mod games, and occasionally pass files around friends who express an interest.
Last edited by HexCaliber; Dec 5, 2018 @ 6:35am
Kulin Dec 5, 2018 @ 6:34am 
Originally posted by HexCaliber:
I had not moved far enough through the thread when I quoted that post to have read your response. I too am aware how difficult it would be to get anything useful from the .exe.

I was trying to avoid getting into a technical discussion, while still addressing some of the alarmists and storytellers claims in this thread.

The conclusion is that when OP talks about decompiling he actually means decompressing the cat-packages and reading the XML-"code".
deet Dec 5, 2018 @ 6:48am 
So OP claims he looked at the source code and the game isn't simulating anything, declines to provide any kind of proof because Egosoft might dispatch a squad of ninjas to assassinate his family, and a bunch of people who already dislike the game use it as evidence to say "AHA! I KNEW THIS GAME WAS ♥♥♥♥ ! " Is that an accurate summation of this 10 page trainwreck?
Last edited by deet; Dec 5, 2018 @ 6:48am
Originally posted by maderas:
So OP claims he looked at the source code and the game isn't simulating anything, declines to provide any kind of proof because Egosoft might dispatch a squad of ninjas to assassinate his family, and a bunch of people who already dislike the game use it as evidence to say "AHA! I KNEW THIS GAME WAS ♥♥♥♥ ! " Is that an accurate summation of this 10 page trainwreck?

Yes.
kingaires Dec 5, 2018 @ 8:39am 
You can use any process activity monitor to see which files the exe is actually using during the running of the game. And as such I see that when the AI is doing automining/trading work for me there is very very little activity. When I am actively engaging the game, the exe calls a bunch of xml and lua files.

Also, when I alt tab out to check the activity monitor, the game essentially stops. Litterally the process freezes when the game is "paused". Now, I don't normally watch my games to see what they are doing in this kind of detail, so I don't know if that is common or not. I could try seeing what Empyrion does when it is paused I guess.


But to add to what was said above. I fully believe the OP was just mis-communicating that he was actually scraping the files inside the Cats instead of de-compiling the actual executable.
Originally posted by kingaires:
Even if he is, but his trollness got us discussing a valid concern with the game, what is the harm in discussing this topic? Why do you seem so determined to stop the conversation?

Doesn't mean OP should be exscused, since mutiple veteran programmers have pointed out that decompiling the EXE that OP mentioned would result in nonsence assembly code. He would have to look at script files. To add on top of that, only eveidence OP has provided is "Compile it yourself."

However, you are right, this had made some people look into the game enconomy. I think though at this point we are better off starting a new thread, because the findings people have found may have shown that somthing is wrong, they acually prove OP is wrong. Now the findings are basicly discussing a diffrent topic.
NYCPCGAMER Dec 5, 2018 @ 9:58am 
Originally posted by Epic Story:
I ended up unsubbing to this thread because i stopped messing around in the decompiled EXE shortly after.

Im just a coder, i cannot read large amount of obfuscated code.

Just to mention.
Those asking for proof.
Decompile it yourself. search for readable portions of code.
I am not stupid enough to post someone elses IP onto a public forum, regardless of whether the code is obfuscated or readable.
If you want to look at the scripts and reabable files most are easily readable. The problem you have is you need to understand the event handlers for those scripts and from MY understanding ( i am no expert) many of the event handlers are player related only. I could not find AI event handlers outside of basic behaviours and functions, such as for example,number of AI ships required to be visible to player in a specific radius. Or AI ship, select random cargo, load random cargo, select random station that accepts that specific cargo.Ai ships dont even appear to take price into account , only when looking at the players funds is this available and even then it does not determine profit %. It just makes sure the players funds cannot go below 0.
There is not a single event handler, function, behaviour I CAN SEE that represents the AI's ability to understand anything going on around it, except some very difficult to read combat ones that appear to be missing entire portions of code (placeholders maybe?)

The economy itself appears underneath to be EMULATED rather than SIMULATED. Make of that what you will.

Anyways, as i said, i'm done with this stuff. I only bothered because I wanted to understand why my the universe for me was entirely static and another forum user was also having similar problems, whilst others were saying thier universe was fine and stuff was happening.

I have personally put the game down for the time being. It needs work. Though i'm hopeful that and a few months this game will be far better than anything else out there. It has some serious potential to be a really great game.

Peace.
your original posts were the catalyst for a lot of learning on this forum and others. you made your mark and we thank you. its up to the devs to correct course and give us precise, or better info. well done sir. we appreciate it......and all those slating you on egosoft forums im sure they appreciated it too in the end.
< >
Showing 121-135 of 162 comments
Per page: 1530 50

Date Posted: Dec 4, 2018 @ 2:22am
Posts: 162