Odd issues with freezing ships, mod conflict?

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

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

Post Reply
Scoob
Posts: 10099
Joined: Thu, 27. Feb 03, 22:28
x4

Odd issues with freezing ships, mod conflict?

Post by Scoob » Sun, 25. Feb 24, 14:15

Hey all,

I run a modified game, but recently introduced some additional mods to it. Since doing this - fresh game start - I've been experiencing some odd issues. However, I seem to be the only person experiencing this issue of those who use those new (to me) mods. Reemergence is the core new mod here, it changes the map layout, so requires a fresh start. So, I'm assuming there might be some sort of conflict. The rest of my mods I've used for a long time at this point and have never encountered this particular issue, but I cannot identify what might be causing it. It's not a simple case of just removing mods and testing again, as many just don't work that way. Also, the issue can take a while to manifest, I'll describe a specific scenario of this freezing, which is most apparent due to how I play... Note: there are other example of ships freezing, but this is by far the most obvious.

I'm sat on a Carrier of mine, in a sector that borders Xenon space. I have a group of L-Class ships in "protect position" near the gate, with the carrier a little further back. The carrier has several groups: Alpha and Beta are S-Class Fighters, set to Intercept. Gamma and Delta are S-Class Fighters with a heavier load-out set to Bombard. Epsilon are M-Class Corvettes set to Defend. I also have a "reserve" Kappa Group that are spares, they stay docked, but all other groups are set to Launched.

Initially, things play out as you'd expect, Xenon S and M-Class ships enter the sector and those two Intercept groups launch and engage, returning when there are no more enemies of that class. The two Bombard groups are the same, but for L and XL Targets. After a sortie, surviving ships return to repair and rearm as needed. However, after a while - all the time I'm in-sector myself, usually standing on the Carrier but not piloting it - I start to notice that ships returning from a sortie, well, don't. They fly out perfectly, they engage perfectly, then they turn to head home but freeze and never return. I say freeze, but it's a bit more than that. They sort of twitch constantly, changing from 0 m/s to 1 m/s and back again. It's like the AI is trying to return, but it's getting confused. They're facing the Carrier, they just don't move towards it. As time goes by, more and more ships fail to return to the Carrier - despite ample free docks. An odd twist to this is that if more valid targets appear - more Xenon Fighters coming through the Gate for example - Intercept Fighters will instantly respond and engage perfectly. However, once enemies are defeated, they'll fail to return to the carrier once again.

Initially, just one or two ships are impacted by this. As time goes on however, more and more ships get stuck, unable to return. Teleporting to another sector sees ALL affected ships instantly start to return and dock just fine. Teleporting back will see those ships initially seem to work - they'll launch fine - but they'll likely get stuck again quite quickly.

When a ship is in this stuck state, it shows as trying to return to the carrier, but it does not. If I issue a manual dock at carrier order, it remains stuck. If I issue a manual move order, it will instantly fly to that position. If it then ask it to dock after that, it will dock just fine.

The only "fix" such as it is for this, and it will start happening again after a while if I stick around in-sector, is to manually dock all ships and set them to docked status. Then, un-assign ALL subordinate ships and re-assign them to the Carrier. The Carrier seems to remember the Docked/Launched status of each group. I'll then, group-by-group, set them to Launched and observe their behaviour. Then, for a while at least, they'll deploy and return just fine.

While all this is happening, I also experience an accelerated fps drop. It's not uncommon for fps to drop slowly over a long play session, however, this is happening far more quickly than is usual. I might start at a vSync-limited 60fps but be at 30fps after an hour. A simple Save/Reload will instantly fix the FPS, but it doesn't fix the ship's docking issues.

As my ships in this sector were engaged in a LOT of combat there were a LOT of wrecks generated. I initially thought that this might be related to the fps slow-down and perhaps gave the AI issues with navigation - going OOS saw ships dock perfectly remember. However, as mentioned, a simple Save/Reload cycle instantly fixes the performance side of things, so I don't think wrecks lower fps by themselves.

Here are all the mods I'm using, those marked with a * are the new additions, before adding these the issue did not occur.

better_kill_credit - player ships acknowledged for kills + money
chillturrets - turret tweaks
*deadair_re - customised Dead Air jobs for Reemegence
enhancedbailing - slight chance of NPC on NPC Bails, slight chance L/XL Class Civilian ships will bail.
FOCW - Foundations of Conquest and War: Enables tweaking of fleet quotas for factions. Enabled, but set to default values.
FOCWCorporationsRevised - various "mini factions" they just build stations, maintain fleets, not a true faction.
fs_exp - Explorer Command Software that works really really well.
mej_disable_encounters - disable teleporting ships meant to add "content" for the player when exploring outside regular sector limits.
mules_and_warehouses_extended - Logistics commands for moving wares around.
*otas_shippack - some ships for the OTAS Faction added by Reemergence
*re_expansion_pirate = additional Pirate content for Reemergence
*reemergence - Reemergence, changes the map layout quite drastically.
ScalePlate Use All - old script that allows Scale Plate to use a wider variety of ships, might be obsolete.
shib_reactionforce - allows creation of "Reaction" ships / fleets that respond if ships take damage.
ship_variation_expansion - More ships
ship_variation_expansion_vro - VRO balance tweaks for them
Shipsale Price Fix - allow player to sell ships at decent prices again, dunno why I have this, I never sell ships lol.
sn_mod_support_apis - Sir Nukes support files.
sve_vro_jobtweaks - Ship Variation Expansion job tweaks for VRO balance
TaterTrader - an Auto-Trader replacement, a really really good one.
vro - Variety and Rebalance Overhaul - essential!
vro_assets - part of above
vro_cruisers_submod - adds more ships
vxTrueCaptureVanilla - largely prevents the excessive equipment damage when a Marine claims a bailed ship for the player.
x4_fireandsmoke - Fire and Smoke Effects
XR_ShipPack - Lots of ships (Jobs.xml removed! Xenon go NUTS if you leave it enabled - bad balance considering my other mods)
XR_ShipPack_VRO - balance tweaks for VRO.

Note: I keep a clean base game folder managed by the GoG Client. I COPY this to create a new instance, I then add the various mods. I started a totally fresh game, based off that fully up-to-date vanilla GoG-managed instance with the above mods. My prior modified game - still working just fine, it's a separate install - is as above, but minus the * marked mods with the addition of "Faction/War Economy Enhancer". I do not use this in my current game as DeadAir_re handles much of the same stuff and is specifically for the Reemergence mod I'm using, which changes the map layout.

My hope is that perhaps someone else has experienced this odd issue and might have an idea whether a mod conflict is involved. The team behind the new mods I'm using say they've made no changes to anything involving movement that might impact this. Indeed, I think they're a little grumpy with me having spent a lot of time investigating and coming up empty lol. Seems I'm the only person reporting this.

I don't think my Mod list is particularly extensive. I've used VRO and most of the other mods on the list for ages, and those games run great, not once exhibiting this issue. I also run an instance of the large Star Wars Interworlds mod, and that works great too. I think it's logical that if you add something NEW to the game and only then start experiencing issues you initially look closely at those new additions. With those additions seemingly working well for others, I can only assume some sort of conflict.

I have had saves that reproduce this issue - a Save/Reload restores any performance lost, but doesn't fix stuck ships - but as it involves various other mods, I suspect no one has my exact set up to be able to test it readily.

I'm currently zipping up an Archive of all my mods - I tend to do this to share with a buddy, who likes my curated mod lists. It's about 900MB in total, so not huge, and I could potentially pop this on Google Drive to share for testing purposes. I think that's acceptable, I'm not advertising it or claiming it as mine, it's just so anyone who was willing to test, could ensure our mod lists are identical.

Finally, I don't think I have any local issues on my machine. Game folder was verified (no issues) in GoG, before creating a new instance. Mods were freshly downloaded and applied. The PC its self is working well, no obvious problems. Game performance is generally great upon loading, drops a bit it large battles but recovers. Only over time, while staying in one place watching my fleet guard against Xenon incursions, does performance degrade. Usually I'd have to play for several hours for it to degrade like this, due to the memory leak issue, so the slow-down is happing far more quickly than expected. Along side that, there's this weird ship issue, so I wonder if they are at all related. Save/Reload fixes performance though, but not the ship issue, so perhaps not.

I'm at a bit of a loss guys. I assumed it was a problem with one of the new Mods I was using: Reemergence (RE), OTAS Ship Pack, Skull and Bones (Pirate content) and DeadAir_RE (Various DA jobs, customised for RE) - all of which are linked to the Reemergence base mod.

Note: This is the second RE game I started, in my first one, I started having issues (ship freezes) so installed the Cheat Mod to try to fix things. However, it seems that the Cheat Mod basically breaks loads of stuff so, as advised, I removed it entirely and started a new game, giving myself a leg-up via Custom Start to have some of my assets from the aborted game. Things were working well for ages, until I deployed my first (Captured) Carrier, then I started noticing the slow-downs and ships getting stuck.

Painfully long post, I know, but on the off-chance that someone might have an idea what's going on, worth it.

Cheers.

Scoob
Posts: 10099
Joined: Thu, 27. Feb 03, 22:28
x4

Re: Odd issues with freezing ships, mod conflict?

Post by Scoob » Sun, 25. Feb 24, 18:08

What I'm doing currently, is creating a new game instance with just the "new" mods and any needed to support them. Bare bones reemergence if you will. I will then slowly introduce additional mods, and see if any triggers the issue. Having to wait an extended time to see if the issue occurs is a bit of a pain, but it's the only way. Nothing appears to have gone wrong..yet. Thankfully the sector is having a steady incursion of S and M-Class Xenon to test. Fighters on Intercept are, so far, successfully returning to dock.

Ok, so I held off posting this as I wanted to add each mod - or group of mods where there are dependencies - at a time, then run the game for a while from a set save. Each load, regular Xenon invasions occurred, until my little fleet was basically overwhelmed. In between skirmishes, ships would head to the Carrier to dock without issue.

Basically, even with my mod list now matching that of my main game, I cannot reproduce the issue. The difference here is of course that, in my main game, ALL of these mods were present from the start.

I'm currently running the final test, with the last mods to be added back in - XR Ship Pack and XR Ship Pack VRO - so we'll see if this has any impact. I doubt it, as this is a ship pack, any jobs are stripped out.

One thing I will say, the volume of wrecks has never gotten close to that in my main game. So, I do wonder if all those wrecks are confusing things. I noted last time I played that safe that my usual "fix" of unassigning all ships and assigning them back again, did not yield results. Indeed, the Carrier's fighters were often failing to launch, let alone return after launching. I wonder if some script has simply broken down over time - my main save is at the one day mark but I started the game with several Stations including a Shipyard.

I will go back to my main save and relocate elsewhere, to see if the issue is indeed affected by the environment...

Scoob
Posts: 10099
Joined: Thu, 27. Feb 03, 22:28
x4

Re: Odd issues with freezing ships, mod conflict?

Post by Scoob » Sun, 25. Feb 24, 23:35

An update:

After spending a decent amount of time testing, I simply did not get the issue. So, I reverted back to my original game.

As a test, I moved the Carrier to another border sector which has a Xenon incursion, though not quite as severe. In this location the Fighters are launching, Intercepting and returning just fine, where they weren't in the prior location.

To test further I built a new Colossus Carrier and filled it with Fighters. I then sent it to where the original Carrier was. This new Carrier is launching Intercept Fighters and having them return just fine.

I'm really not sure what this means. The second location, where the original Carrier was sent, has only a few wrecks. The original location has a lot of wrecks, but no where near as many as there were - specifically only three Large Xenon wrecks, where there were likely 20+ before. It seems that, if I stay in sector, wrecks stick around for longer.

Not sure what conclusion to get from this, if any, but it's darn weird. In my testing in that new test save, at no point did the number of wrecks get that high. That's the only difference I can see.

So, to summarise: In Location One (The original problematic area) this Carrier regularly had issues with ships not returning from Intercept or Bombard Sorties. It was also, after I'd been there even longer, having issues just launching Fighters in the first place. This area was PACKED with wrecks, dozens and dozens of them, many Large wrecks, likely 100+ smaller ones. The fleet had been there for hours. Location Two (a new incursion area) saw the exact same Carrier working just fine. There were very few wrecks in this area, as I'd not been there for long. My time away from Location One - I still had ships there, just not the Carrier - has seen the number of wrecks drop considerably, despite my Capital Ship fleet still active near the Xenon gate. Sending a NEW Carrier to Location One, saw it working well, Fighters returning.

Anyway, this has turned more in to me documenting my experience than anything. Why the issues occurred is pure speculations on my part. I've stayed for many hours in such locations - lots of actions, lots of wrecks - in prior games, and not run into an issue.

Finally, the slow-down, when it occurs - which is quite quickly, half an hour or so of action - is resolved each time by a Save / Reload. The stuck returning Fighters issue was not, and persisted on that original Carrier until I moved it to another sector.

Edit: Ah, after working fine for a short while, the new Carrier's Fighters are now struggling to return. Once again getting stuck facing the Carrier, but alternating between 0 and 1 m/s constantly. There's something about this sector... It's not hazardous, as I known they totally screw with combat logic - had it in a prior game, by ships simply were not behaving properly despite their shields holding just fine - just a regular sector, albeit one added by the Reemergence Mod.

So, new summary: There certainly seems to be something odd about this location. My Carrier-launched Fighters don't work properly here if I'm present in the sector. I teleport away, they're fine again. I sit on the original Carrier in the new location and it's perfectly fine.

Scoob
Posts: 10099
Joined: Thu, 27. Feb 03, 22:28
x4

Re: Odd issues with freezing ships, mod conflict?

Post by Scoob » Wed, 28. Feb 24, 19:44

I'm less and less inclined to believe that this is a mod conflict, rather something breaking down.

I left the original area for quite some time, and the bulk of the wrecks have despawned, despite my Fleet there continuing to make new ones. When I teleport there not, ships are working fine.

The original Carrier, in the new location, is still working well.

Scoob
Posts: 10099
Joined: Thu, 27. Feb 03, 22:28
x4

Re: Odd issues with freezing ships, mod conflict?

Post by Scoob » Thu, 29. Feb 24, 22:50

Well, I let the number of wrecks build up again in that sector - Xenon really are quite persistent - while largely remaining there myself. I teleported away a couple of times, but only for a short period, to deal with other stuff, but 99% of the time I was there. The number of wrecks was gradually building up, until there were rather a lot of them again - pretty much all of them Xenon - and, once again, I started getting ships failing to return to the Carrier.

I've now teleported away, so the number of wrecks will reduce - this is just what happens when I'm OOS, some sort of clean-up code perhaps? Additionally, I have a scrapping operation in the sector now too, which should help reduce the wrecks.

Time after time now I've seen what has developed into a pattern:

- Carrier-launched Fighters are performing great.
- Number of wrecks gradually builds while I remain in the sector.
- Carrier-launched Fighters start failing to return after sorties.
- I teleport away and allow many of the wrecks to despawn.
- I return and Carrier-launched Fighters are working again.

Note that returned BEFORE the wrecks are reduced in number, sees Fighters failing to return still. ONLY when the wrecks are substantially reduced does teleporting back see Fighters work properly, consistently, for a while. I'd say I was in the sector for a good couple of hours this session, long enough for the issue to occur once again.

Post Reply

Return to “X4: Foundations - Scripts and Modding”