Mining in Grand Exchange - A curious bug

Ask here if you experience technical problems with X4: Foundations.

Moderator: Moderators for English X Forum

Post Reply
BardicHeart
Posts: 75
Joined: Mon, 21. Oct 19, 03:59

Mining in Grand Exchange - A curious bug

Post by BardicHeart » Tue, 22. Sep 20, 05:21

Had an odd bug crop up in my game.

For context:

The game is in the mid game stages (mid game for me) with a current play time of 8 days, 19 hrs and change.

I had started in Argon Prime building a network of stations that supported a small shipyard (1 S/M & 2 L Fab) and used that to fund an even larger project in Grand Exchange. That in turn led to the construction of a number of large stations producing everything I'd need to build and support an eventual very large ship yard (2 S/M, 12 L & 2 XL Fabs) in Grand Exchange I. As part of this project I built two Foundry stations (4 Energy, 2 Graphene, 12 Ore Refinery & 20 Hull Parts), the first in Grand Exchange I and the second is under construction in Grand Exchange IV to take advantage of the high ore amounts there. That's when I noticed the bug.

The bug is simply this, my miners assigned to the station OR if I set them up as free miners to mine the sector, instead go to Grand Exchange III and mine there rather than Grand Exchange IV where they were assigned to mine. Nothing I do seems to get them to mine in that sector. I have resource probes out in both sectors, the ore concentration in Grand Exchange IV tops out at 25 per km3 while highest in Grand Exchange III is 17 per km3. I've since noticed all my other miners from Grand Exchange I are also going to Grand Exchange III... even the ice miners (ignoring the 16 per km3 in GE I for a much lower amount in GE III, very odd).

I'm not sure what caused this bug or when it began exactly. I believe its been there for some time and I've just been so busy I hadn't noticed (wars with the HOP, Xenon, the Paranid plot line, been kinda busy :wink: )

Curious, I started a new game, hacked the save to give myself a lot of credits and then bought some M Drill Miners and sent them to Grand Exchange IV and set one to automine sector for Ore and one for Silicon and watched. Both miners correctly mined resources in that sector. Next I built a small ore refinery in Grand Exchange IV and assigned two more M miners to it and watched, the station manager got both started mining ore in the rich fields nearby IN Grand Exchange IV. So the bug is not in X4 per se, but just in this one save game. How it happened I've no idea, nor when exactly.

I am using a few mods, but I used them in the test as well so I think that rules them out as a possible cause. For reference the mods used are:
* NPC Recovered by Gramston (current version)
* Paintjobs for Sale

I'll probably just start a new game as I'd like to do a few things differently anyway, but I thought I'd share the info in case it was useful. I'm not sure what caused the bug, maybe some sort of save error? :gruebel: My main interest in figuring out the bug is to understand what caused it and avoid it again in the future if possible.

Link to save game

BardicHeart
Posts: 75
Joined: Mon, 21. Oct 19, 03:59

Re: Mining in Grand Exchange - A curious bug

Post by BardicHeart » Tue, 22. Sep 20, 16:30

Curiouser and curiouser...

I started another new game, gave myself a whack of credits and bought some Drill miners. I began setting up in Grand Exchange IV, intending to plop down my Foundry stations there. Before I bought a plot and started building I went in and dropped a lot of resource probes identifying the high yield area just Z- of the gas cloud near the super highway to GE I. Found the high yield area with 25 per cubic KM of Ore and Silicon. Started some free miners and they went to work right in that area, until....

I went down to GE III to the gas cloud area Z- of the Tel Trading Post and the jump gate to Black Hole Sun V where you can find Helium and Methane and a little bit of Ice. I dropped the first resource probe at the X- end of the cloud where the methane is. But, as soon as I dropped a resource probe at the X+ end where there is a small amount of Ore and Silicon (0.31 per cubic KM, tiny compared to the yields in GE IV) ALL my free miners in GE IV updated their mining orders and headed to GE III to that very spot.

I was baffled, why would they go there the yield amounts are just trace amounts really.

So out of curiosity I flew around and took up all the resource probes in GE III except for one in the methane area that was detecting NO silicon or ore. Then I went to my miners and removed their current gather mission and let them update... every one of them headed back to GE IV where they were supposed to be.

So I tried dropping a resource probe elsewhere in GE III that detected low amounts of ore and silicon... and sure enough here come my miners again. Take the probe away so none are detecting ore or silicon and force my miners to update and back to GE IV they go.

Armed with that information I re-installed my previous save game (the one I posted above) and did the same thing, took up any resource probe that detected ore, silicon or ice in GE III and then went through all my miners in the Grand Exchange tri-sector area and deleted there current mining mission and let them update.

Result, they all went back to higher yield areas in other sectors where the ships were supposed to be in the first place. My ice miners are once again mining ice in the high yield areas of Grand Exchange I, and pretty much all my ore and silicon miners are now heading up to Grand Exchange IV where the yields are the highest. Only methane miners are still going to Grand Exchange III, which is fine as that's the closest source of that and helium.

From this I would deduce that my save game isn't bugged, that this IS a bug in the game. It seems to only affect Grand Exchange III, for some reason if you drop a resource probe there, whatever resource it detects the game treats it as a priority to mine, to the point it will even override orders to mine in another sector. My guess would be that maybe during development something got done with GE III for testing purposes and it never actually got removed entirely and the resource probes are somehow interacting with that to create the bug.

Until EgoSoft can track down the problem, for now at least the work around is simple, just don't put down any resource probes in Grand Exchange III and things work fine.

dtpsprt
Posts: 2802
Joined: Wed, 6. Nov 02, 20:31
x4

Re: Mining in Grand Exchange - A curious bug

Post by dtpsprt » Thu, 24. Sep 20, 07:21

I'm definitely not a dev, but I think that since your save game used mods (however irrelevant) you are not getting any answer, or your post being considered, as per the specifications of the forum.
That said, I have a fair idea why this is happening, it is also happening to me, but since I do not (usually) put probes in GE I, I don't care.
Down to the point, I think the problem (and it is a real problem in the coding) is that in systems like this one the miner will start a "search" in alphabetical order first and not sort afterwards by yield, just goes to the first found position.
I'd suggest reporting again, providing a vanilla save.
P.S. This might be a bit better if you use L Miners, since they require resource probes with certain minimum yields to go out mining, this will most probably rule out the low yield GE I area

BardicHeart
Posts: 75
Joined: Mon, 21. Oct 19, 03:59

Re: Mining in Grand Exchange - A curious bug

Post by BardicHeart » Fri, 25. Sep 20, 07:48

I don't know what the devs are or are not thinking, I'm pretty sure they know who I am at this point and at least one of them does tend to read them. As for the save, you can load it without the mods and it will still run, one just makes all the custom paint jobs available (which ironically none of which I was using) and the other adds in NPCs, you might be missing some pilots here an there but other than that its a vanilla game. No ship mods, no sector mods, no economy mods, nothing that would even remotely affect the reported behavior.

As an update, I stated the problem only emerged when I dropped resource probes IN GE III, and only IF they were detecting ore, silicon or ice. Its probably affecting methane and helium as well but since that location is also the only nearby source its not possible to test for that. Once I removed all the probes in GE III, the problem resolved itself. All I had to do was wait for the miners orders to update after completing their current order and they went where they should have been on their own. That is, my ore and silicon miners are now mining the high yield area in Grand Exchange IV where they should have been. My ice miners are now mining the high yield areas of Grand Exchange I and the only miners I have going to GE III are gas miners looking for helium and methane. That's all as it SHOULD be. I've run the game since for maybe 8 hours and have not had further problems with this issue.

Now if you have all your miners going to GE III AND you no resource probes out (to make sure I understood you correctly), then the lack of probes may be the problem. That is, it may be the same problem in that apparently something is skewing the mining logic with regards to GE III so that all things being equal (no probes at all being one example, OR as was in my case probes in both GE III and GE IV and GE I) if a miner detects a resource like ore or silicon in both GE III and another GE sector it will favor GE III over any other sector regardless of yields (note that as far as I can tell it also only affects the GE tri-sector area, adjacent Black Hole Sun doesn't appear to be affected by this regardless). But, apparently from observation at least, if there are resource probes detecting a higher yield in say GE IV and no probe detecting the same resource in GE III then the miner goes to the probe.

So as a suggestion, try putting out some probes in GE I and GE IV in higher yield areas and then either force your miners to update their orders or wait and see what happens. I'm betting once they update they'll head to the resources around those probes. Hopefully that works for you.

The size of the miner doesn't seem to matter as this problem affected both my L and M miners. BTW, moving within the GE tri-sector M miners work better because L ships tend to get jammed up at the superhighways (they can only enter one at a time and if you have enough L ships they tend to pile up, while M ships zip right through; I had to switch much of my mining fleet from L miners to M miners to fix that issue. Figured I'd pass that bit of experience along as well).

As for what's causing this, I can only speculate. Since it seems to be isolated to GE III specifically, which I find odd in itself; I wonder if maybe during initial game development if they did something experimental in that sector, perhaps testing something, and the code never got fully removed and now the probes and the newer mining logic are somehow interacting with it. But that's just a guess. Until a dev does poke their head in here and speaks up we won't know.

Meanwhile, I'll share what I can as far as solutions to help anyone who is facing the same problem. There does appear to be a sort of logic to this that it appears can be manipulated to sort of work around it until the devs can fix it.

dtpsprt
Posts: 2802
Joined: Wed, 6. Nov 02, 20:31
x4

Re: Mining in Grand Exchange - A curious bug

Post by dtpsprt » Fri, 25. Sep 20, 10:53

It's not a matter of whether your game can be loaded without the mods you are using, It's a "matter of principle" and declared clearly in the guidelines of this Forum.

Now, what I face, is that miners will go to GE I to mine Ore and Silicon that has 4.1 and 3.9 yields respectively (not bad, but...) and they ignore GE IV that has 13+ of them. Similar as your problem. Removing the probe from GE I was the solution so that there was only one probe pointing to Ore and Silicon. This means that I can only use M miners for Gases who are not in need of probes to operate, so they mine from GE III, thank G.O.D. for small favours the demands for gases in my Hull Parts factory are minimal, so 2 M miners are almost overkill.

This fact, along with your post about GE IV and III lead me to believe that the "logic" of the algorithm that controls them (or the Manager for that reason) has an "alphabetical order" command instead of a "numerical" one, causing the miners to go to the first sector in alphabetical order that meets their "demands". If that is so, it should be fixed. In the mean time we have to be "careful" where we put our probes... what can I say?

BardicHeart
Posts: 75
Joined: Mon, 21. Oct 19, 03:59

Re: Mining in Grand Exchange - A curious bug

Post by BardicHeart » Wed, 30. Sep 20, 14:05

I haven't been able to get back to testing this yet, am hoping to this weekend.

There's a couple of things that are puzzling me in this that may also be clues as to what's going on, although I can't make sense of it yet and it may take someone looking at the game code to figure it out.

First, in my game they go to Grand Exchange III in preference to anything else if all other factors are equal. That is, if there are probes detecting Silicon in both GE I, GE IV and GE III the miner will go to GE III even if the yields are lower there, for you it seems to be GE I that gets preference. If there are NO probes out, same thing. The only time things work the way you would expect is if there is a probe detecting the desired resource in some other sector, and NONE in the "preferred" sector. So the question is, what's causing one of the three GE sectors to seem to be preferred?

But its not just that, and this is another piece of the puzzle but it may also be a clue. I've tested and found that in my game at least, even if I have a mining ship set up as an independent miner with the sector Auto-mine order and I put it in Grand Exchange IV and tell it to mine ore there, IF I also then drop a probe that detects ore in GE III... that auto-miner will go to GE III to mine even though its order explicitly limits it to GE IV. Why? That shouldn't be possible. That order should restrict it to only mine in GE IV regardless of probes, yields, etc. Something is broken there.

If I read your correctly, in your game it seems miners prefer GE I. Can you repeat my experiment and put a miner in GE IV with a probe and a sector auto-mine order for just that sector and then drop a probe in GE I (and/or GE III if you want to test both) and see what happens? My guess is, if we are both seeing the same bug, they'll go to GE I in your game. Try this with both a M and L miner, I find this bug affects both ship sizes in my game.
Spoiler
Show
I'm not sure where you got the info that L miners will not mine without a resource probe being present, but the info is wrong. They will. You can easily test this (and I did) by just putting one out in a sector with no probes and tell it to auto mine the sector. In my test I built a brand new L Cthonios miner, sent it to Trinity Sanctum VII where I had no miner or probes operating. Once it arrived I gave it the Auto-mine Sector order set to Silicon and watched in map view, it soon found silicon on its own, started mining and filling up its hold. As there was no station in that sector buying Silicon in my game, I stopped it had it dump its cargo and switched to Ice (as there are three stations in my game in that sector buying ice) its now happily mining ice, locating it all on its own with no resource probe out anywhere in the sector. From what I can observe, probes help direct where they mine, so if you find a high yield area and mark it with a resource probe they'll tend to go to that. And maybe that's another piece of the puzzle to what's got the GE tri-sector area bugged.
One other thing I have noticed as my game is progressing. I now have three of my big Foundry stations operating (and they still can't keep up with the demand for hull parts... I got a big shipyard going and the PAR and ARG are very good customers!) and I've noticed that the gas miners for those three stations, which mine methane for the two graphene modules per station, will sometimes go as far as Blackhole Sun for methane. This is even though there is methane AND a probe in GE III. That's interesting because it means that apparently mining gasses is NOT affect by the bug we're seeing. It could be that only solids (Ice, Ore, Silicon) are affected, which if true would be even odder but its also more specific and that might be another clue for the Devs. Needs more testing, I'll hopefully be able to set up a fresh game with no mods this weekend just to test this. For now its at least giving me some info pointing me at what specifically to test for.

Alan Phipps
Moderator (English)
Moderator (English)
Posts: 30438
Joined: Fri, 16. Apr 04, 19:21
x4

Re: Mining in Grand Exchange - A curious bug

Post by Alan Phipps » Wed, 30. Sep 20, 14:34

@ BardicHeart: I think that Grand Exchange is often treated by the AI as if it were just one large and homogenous single-sector system rather than having 3 separate sectors. Hence a command for the AI intended for doing something in one GE (sub)sector can be diverted if there is a first-encountered/better/higher priority site (as the AI sees it) in another one of them.

I think this also helps to explain some of the odd ship AI pathing around that general area.
A dog has a master; a cat has domestic staff.

User avatar
LennStar
Posts: 879
Joined: Fri, 1. Apr 05, 15:22
x4

Re: Mining in Grand Exchange - A curious bug

Post by LennStar » Thu, 1. Oct 20, 16:33

Alan Phipps wrote:
Wed, 30. Sep 20, 14:34
@ BardicHeart: I think that Grand Exchange is often treated by the AI as if it were just one large and homogenous single-sector system rather than having 3 separate sectors. Hence a command for the AI intended for doing something in one GE (sub)sector can be diverted if there is a first-encountered/better/higher priority site (as the AI sees it) in another one of them.

I think this also helps to explain some of the odd ship AI pathing around that general area.
I defenitely have thatabout the sector expressed before, if it was not you, then a dev.

btw. I have the same. All miners in GE1 mining and selling (even when station is 80% full) while in GE3 there is a theoretically high amount and several resource empty stations.
:idea: BUG REPORT INFO: I play X4 vanilla. You can find all my bug report files in there:
All X4 files: https://www.dropbox.com/sh/83j3cjfhkdlf ... w6HLa?dl=0

BardicHeart
Posts: 75
Joined: Mon, 21. Oct 19, 03:59

Re: Mining in Grand Exchange - A curious bug

Post by BardicHeart » Sun, 4. Oct 20, 17:22

Alan Phipps wrote:
Wed, 30. Sep 20, 14:34
@ BardicHeart: I think that Grand Exchange is often treated by the AI as if it were just one large and homogenous single-sector system rather than having 3 separate sectors. Hence a command for the AI intended for doing something in one GE (sub)sector can be diverted if there is a first-encountered/better/higher priority site (as the AI sees it) in another one of them.

I think this also helps to explain some of the odd ship AI pathing around that general area.
I wonder why that is though. You may be correct and some of what I've seen supports that, but not everything. AI Pathing in regards to GE is messed up as well. Example: I had a ship (Behemoth Vanguard Destroyer) in Silent Witness I and I told the pilot (5 star) to fly to GE I. The pathing on the map showed his course as being Silent Witness I > Eighteen Billion > GE IV > GE I as you would expect. However his actual flight path attempted to go Silent Witness I > Hatikvah's Choice I > Argon Prime > Second Contact Flashpoint > Blackhole Sun IV > Black Hole Sun V > GE III > GE I... which is nuts. What is nuttier is I had L freighters right there in the same sector (managed by stations or working as free traders) and they were correctly pathing through Eighteen Billion (in fact I had a pretty steady line of green ships going both ways since I have a LOT of manufacturing). Other times I'll tell the captain of that very same destroyer to go to GE I and he'll fly a course through Eighteen Billion without problem... so whatever is causing the issue isn't consistent which makes it more baffling and harder to track down.

I'd love to figure out what is causing these problems and help get them fixed because since our HQ is in GE I, we're kind stuck with it unless we decided to build most of our stations elsewhere and / or use a mod to move the HQ.

However, that said, this doesn't explain everything I'm seeing. As I mentioned, the highest yield of ore and silicon is in GE IV near the super highway and gas cloud on the X+ side of the map. So why is it the minute I drop a resource probe in GE III that detects any ore or silicon (even trace amounts) my miners ignore the high yield in GE IV (with resource probes detecting it) and go for the trace amounts in GE III? That makes no sense, its broken. This only happens in the GE sectors, I don't get this issue in Blackhole Sun or any other multi region sector.

Still haven't had time to set up that new game to test further, will get to that soon as I can.

Panos
Posts: 848
Joined: Sat, 25. Oct 08, 00:48
x4

Re: Mining in Grand Exchange - A curious bug

Post by Panos » Mon, 5. Oct 20, 00:03

Alan Phipps wrote:
Wed, 30. Sep 20, 14:34
@ BardicHeart: I think that Grand Exchange is often treated by the AI as if it were just one large and homogenous single-sector system rather than having 3 separate sectors. Hence a command for the AI intended for doing something in one GE (sub)sector can be diverted if there is a first-encountered/better/higher priority site (as the AI sees it) in another one of them.

I think this also helps to explain some of the odd ship AI pathing around that general area.
Actually Grand Exchange I, doesn't exhibit this issue.
Grand Exchange III and IV do only. I have reported this over 18 months now :)

Post Reply

Return to “X4: Foundations - Technical Support”