Known to be laggy mods?

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

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

User avatar
Reisser
Posts: 764
Joined: Mon, 28. Feb 05, 15:39
x4

Known to be laggy mods?

Post by Reisser »

Problem: my game (1000+ ships 80+ stations) is now so laggy / jerky that it's really no fun anymore. Managing from the office is still ok, getting into the fighter is no fun anymore. A comparison with a vanilla savegame (1500+ ships 120+stations) was eye-opening ...

While the FPS was ok in both games, the modded game hangs every few seconds for a few milliseconds - which is not very nice.

Since the whole thing happens gradually and you can't simply remove many mods from the current game, troubleshooting here is quite tedious.

Here's my mod list. Have any of you ever come across one or more mods here that have proven to make the game laggy (for themselves)?

Mods that (in my opinion) do a lot of work in the background have been marked in bold ...

Apologize for attack
Auto-camera and autopilot and auto-pause
Better Capture
CollectDroppedInventory
Crime has consequences
CrystalFinder
Emergent missions
Enable radius in Collect Drops command
Extended Conversation Menu
Fly-by Lockbox
Fly-by Looting
Getting Paid
Hacking outcomes
Improved Repair Laser
Increased Scan Ship Range
JP_ScriptLibrary
KUDA AI tweaks
Matte Black Paintjob
Matte White Paintjob
Mod Support APIs
Modification parts trader
More generic missions
More generous mission rewards
Mules Supply and Warehouses Extended
NPC reactions
OTAS Shippack
Paintjobs Galore
RS Bribe for Scandata
RS Colors
RS Loss Report
RS Marine Special Training
Reduce Station Build Times
Report current status
Reputations and professions
Rise of the Ossian Raider
SVE VRO Jobtweaks
Secret Stash
Sector Satellites
Ship Variation Expansion
Ship Variation Expansion VRO
Signal leak hunter - increasing range
Social standings and citizenships
Spherical Long Range Scan
Surface element targeting
UI Accept mission for later
UI Active Mission Button
UI Boarding operation notifications
UI Extensions and HUD
Variety and Rebalance Overhaul VRO
Wear and tear
X4-RE Expansion - Skull and Bones
X4-Reemergence
X4RE RoR
DeadAir Economy Overhaul
DeadAir Scripts
Finance Hub: Transfers (RS Personal)
TaterTrade
Meine Mods bei NexusMods: RS Loss Report RS Bribe for Scandata RS Colors RS Marine Special Training
Meine Mod-Collection bei NexusMods: X4 7.0 VRO Hard Times
Rothank
XWiki Moderator
XWiki Moderator
Posts: 93
Joined: Mon, 11. Aug 14, 22:48
x4

Re: Known to be laggy mods?

Post by Rothank »

that is a VERY heavy modlist. I am not surprised at all it is lagging for you.
Commenting on everything you marked in bold text:
- CollectDroppedInventory - unlikely to be significant contributor, it is just a single order mod (unless the code is a mess, never tried it myself)
- KUDA can be a bit performance heavy, especially if you set it up to be used by AI factions. There is a reason why it wasn't made vanilla yet!
- Mules are notorious for causing heavy stuttering. Another example of modded script being "too good" and killing performance.
- Rise of Ossian Raiders - very performance heavy mod due to the number of ships it is spawning
- Ship Variation Expansion - without the "trimmed" patch it spawns hundreds of extra ships via custom jobs. You should be using SVE VRO Jobtweaks to integrate those ships into vanilla jobs instead (too late to do that now).
- VRO - non-factor. VRO has no significant impact compared to vanilla. It only rebalances weapons, doesn't add any extra calculations.
- Wear and tear - it is a periodically running script, but runs on ALL your assets. Possibly contributes to the impact but I do not have enough experience with it to say anything for certain.
- X4-Reemergence - extra sectors do not cause much of performance cost. The only "impactful" addition in X4RE is OTAS faction, which has ~500 extra ships. We partially nullify this by reworking VIG to have fewer ships.
- DA Eco & Scripts - Eco massively helps the performance by consolidating stations in fewer, but larger ones. Heavily recommended for X4RE playthorugh. Scipts on the on the hand is very dependent on what you set up - if you have Smart Sector Tags quotas set too high you will have THOUSANDS of extra ships.
- TaterTrade - afaik DeadTater is much better optimized and up-to-date.

PS:
Since you have X4RE and DA - please tell me you have deadair_reemegence compatibility patch. Without it the game is EXTREMELY unbalanced and Xenon will end up with approximately TEN THOUSAND more ships than they should.
Image Image
Image
User avatar
Reisser
Posts: 764
Joined: Mon, 28. Feb 05, 15:39
x4

Re: Known to be laggy mods?

Post by Reisser »

Thank you for your answer. To your points:

- I only used DeadTater (but the mod is called TaterTrader)
- I also used SVE VRO Job Tweaks since beginning
- I also used the latest DA mods adapted to RE and the latest version of the DA mods (not the packaged one, but directly from his archive)
- KUDA only runs on my ships

So I guess everything is correct ...

At the moment I'm already deactivating what I can and what can be deactivated in the running game - still without much success. RoR can't simply be switched off - but they only have 100 ships at the moment - so that's still limited (in my last game there were around 1000 ... )

Galaxy-wide there are 7500 military ships in the universe (most of them from Xeno, TER and OTA) according to DA Military Count. So in fact there will be a good bit more.

Addendum: after all - it seems to have gotten a little better without the Inventory Collector and the Supply Mules (which I would REALLY miss). But the Dead Tater can also take over their job if necessary (even if the range here is rather limited)
Meine Mods bei NexusMods: RS Loss Report RS Bribe for Scandata RS Colors RS Marine Special Training
Meine Mod-Collection bei NexusMods: X4 7.0 VRO Hard Times
Rothank
XWiki Moderator
XWiki Moderator
Posts: 93
Joined: Mon, 11. Aug 14, 22:48
x4

Re: Known to be laggy mods?

Post by Rothank »

about your ship counts - 7500 military ships in the universe is actually on the (very) low side. The game typically starts at around 9000. Late game RE with DA's mods (especially with SST on) is expected to reach around 12000 (plus approx. 5000 civilian ships).
Image Image
Image
Scoob
Posts: 11170
Joined: Thu, 27. Feb 03, 22:28
x4

Re: Known to be laggy mods?

Post by Scoob »

I have experienced slow-downs with Tater Trader (Dead Tater) but not in my own game. A friend, who uses the exact same mods as me (provided by me), noticed a slow-down, where my own game was still running well. Turned out he had well over 100 Taters running around, he'd basically run the command on dozens of S and M-Class ships. As soon as I cancelled them all, his fps almost immediately recovered. I personally rarely run more than 20 or so, however, I also tend to promote experienced Tater Captains to L-Class ships eventually. So, profits improve but the number of ships doesn't increase to silly levels.

Mules and Warehouses. Personally, I've never experienced problems with these, despite them making up the bulk of my logistics ships. However, the advent of Repeat Orders, the new Ware Basket, and the fixing of some bugs related to stock station-assigned traders means it's not longer in my mod list.

SVE - I use the tuned jobs for VRO these days. However, I never noticed issues without them. While it adds more ships, it didn't add apocalyptical levels of more ships like the XR Ship Pack does by default.

Regarding your other mods, the only ones that stand out to me - that haven't perhaps behaved well in my own games would be:

KUDA AI tweaks - it was an older version I was using but it led to misbehaving ships. Lots not behaving right could lead to fps issues. This was with a much older version though, so I'd expect the issues to be long gone now.

Rise of the Ossian Raider - dunno what went on with this mod for me, but the game really wasn't behaving right with it. Perhaps a conflict with something else. However, as it was the newest addition and had problems after adding it (new game of course) I abandoned that save.

Note: it may be that you've fallen foul of something breaking. The same friend that uses the exact same mods at me had his save permanently broken. Some script (we assume) had broken down, leading to unplayable performance. My own game, with the exact same mods and at least as long a play-time, still ran great. He'd not gone nuts on Taters this time.

Note 2: it's not in your list, but another mods that's great, but you have to be mindful of the number of instances of it you have running is Reaction Force. Don't have RF fleets in every sector, it will cause issues. A couple of dozen will likely be fine, but going nuts will result in problems eventually.

I will add that, outside of the things I mention, I've not had late game slow-downs. I limit my game to 60fps, and it'll rarely drop below that. Even with a massive mod like SWI, the only causes of fps below 60 are: Fog, SWI goes nuts on the Fog in some sectors where the regular (even Reemergence) universe does not. GPU limitation, turning down the setting helped. The other cause is simply big battles happening when I'm present. Teleport away, fps restored. X4 really does run the best it ever has for me.
User avatar
Reisser
Posts: 764
Joined: Mon, 28. Feb 05, 15:39
x4

Re: Known to be laggy mods?

Post by Reisser »

Thanks for the tips. I have about 50 DeadTaters in use. Plus another 30 Mules. I'm going to try to reduce them a bit - even if I don't trust the vanilla trading scripts and they are hardly usable because of the virtually non-existent range.

These trade mods (at least one of them) is the trade / station supply) in X4 for me hardly feasible and a tedious undertaking.

I do indeed have ReactionForce in use, but only about 5 of them. After heavy losses (M-ships still attack a Xenon I despite the other setting ... ) I have become suspicious here.
Meine Mods bei NexusMods: RS Loss Report RS Bribe for Scandata RS Colors RS Marine Special Training
Meine Mod-Collection bei NexusMods: X4 7.0 VRO Hard Times
DeadAirRT
Posts: 1124
Joined: Fri, 25. Jan 19, 03:26
x4

Re: Known to be laggy mods?

Post by DeadAirRT »

Reisser wrote: Mon, 19. Aug 24, 18:34 Thanks for the tips. I have about 50 DeadTaters in use. Plus another 30 Mules. I'm going to try to reduce them a bit - even if I don't trust the vanilla trading scripts and they are hardly usable because of the virtually non-existent range.

These trade mods (at least one of them) is the trade / station supply) in X4 for me hardly feasible and a tedious undertaking.

I do indeed have ReactionForce in use, but only about 5 of them. After heavy losses (M-ships still attack a Xenon I despite the other setting ... ) I have become suspicious here.
You can completely ignore scoob about tater since you are using dead tater and the fact that people present information that is quite outdated is rather annoying. Scoob is still cool though.
(If your computer can't handle one ship performing blacklist checking and one ship searching for trade, you have other issues)

EDit: Wanted to make sure this didn't come off wrong, I'm pretty sure scoob and I discussed what he observed when that happened. It was before I put in the global queue for deadtaters that limits the amount of traders performing intensive logic and prevents ships acquiring the same trade. Unless the engine itself is running into issues with ships waiting (aka not using cpu) then as far as the deadtater script itself, if you can run 2 without issue then you can run any number. The ships themselves still have an impact due to radar etc, but as far as the script itself you will not have issues.

As far as performance impact, DA scripts does perform quite a bit of logic but I've coded it to spread the impact as much as reasonable. I'd be interested in seeing if you can get a debug log to see if something potentially interfered or caused any errors.
Scoob
Posts: 11170
Joined: Thu, 27. Feb 03, 22:28
x4

Re: Known to be laggy mods?

Post by Scoob »

DeadAirRT wrote: Mon, 19. Aug 24, 21:18 You can completely ignore scoob about tater since you are using dead tater and the fact that people present information that is quite outdated is rather annoying. Scoob is still cool though.
(If your computer can't handle one ship performing blacklist checking and one ship searching for trade, you have other issues)

EDit: Wanted to make sure this didn't come off wrong, I'm pretty sure scoob and I discussed what he observed when that happened. It was before I put in the global queue for deadtaters that limits the amount of traders performing intensive logic and prevents ships acquiring the same trade. Unless the engine itself is running into issues with ships waiting (aka not using cpu) then as far as the deadtater script itself, if you can run 2 without issue then you can run any number. The ships themselves still have an impact due to radar etc, but as far as the script itself you will not have issues.

As far as performance impact, DA scripts does perform quite a bit of logic but I've coded it to spread the impact as much as reasonable. I'd be interested in seeing if you can get a debug log to see if something potentially interfered or caused any errors.
Sorry, it wasn't my intent to mislead, I was just sharing an experience when DT did cause an issue. I genuinely thought I'd added that Dead Tater had since been updated to improve things. I personally haven't had any issues in my own games, but then I never run that many DT's anyway. I find that it's so very easy to saturate things as they're really good at their job. I.e. going from 10 active DTs in a given coverage area - let's say 7 sectors from Argon Prime - to 15 won't always see an increase in profits as there may not be enough really good trades to go around. Friend was just adding DT after DT after DT, not thinking about their "home" sector so to speak. I assign DT's in groups, the first batch centred around Argon Prime (for example) another in TEL space, another in PAR. Sure, they overlap, but with distance penalties they're more likely to focus around their area, if you see what I mean. If I want to "grind" the rep with a given faction, I'll limit a DT to just that faction, which can really help.

You know, I remember discussing this recently. I must have been chatting elsewhere, as we were talking about how DT's can often be seen to "wait" for a bit these days, rather than jumping right on the next trade. This slower approach saves performance, and must be the global queue you mention. I have a SWI (Star Wars Interworlds) modded game too at the moment, and have set quite a few DTs going without issue.

Anyway, Dead Tater is great, and I've not run into any issues since those my friend had.
Scoob
Posts: 11170
Joined: Thu, 27. Feb 03, 22:28
x4

Re: Known to be laggy mods?

Post by Scoob »

Reisser wrote: Mon, 19. Aug 24, 18:34 Thanks for the tips. I have about 50 DeadTaters in use. Plus another 30 Mules. I'm going to try to reduce them a bit - even if I don't trust the vanilla trading scripts and they are hardly usable because of the virtually non-existent range.

These trade mods (at least one of them) is the trade / station supply) in X4 for me hardly feasible and a tedious undertaking.

I do indeed have ReactionForce in use, but only about 5 of them. After heavy losses (M-ships still attack a Xenon I despite the other setting ... ) I have become suspicious here.
I don't think those DTs will cause you issues these days. However, it's a simple test to turn them OFF and see if performance improves at all. Things CAN break. As I mentioned, friend's game became a lost cause due to constant really bad stuttering. He was using the exact same mods as me, yet his game broke (I tried his save) whereas mine was still running perfectly well.

Reaction Force is an odd one at times, ships / fleets seem to randomly miss-behave. I.e. they'll suddenly go after a target out of their league (L/XL NOT allowed) or ignore a perfectly valid target, or wander several sectors when told to stay local etc. Despite the quirks though, it's still a really useful mod. I use them sparingly. I have small Reaction Force groups in places with lots of Mining activity, so they can respond to Kha'ak aggression. I even allow them to help allies, just to keep the infestation managed a bit better.

Thought: it goes without saying (but I'll say it) that Reaction Force would be needed far less if escort ships actually stayed with their leader. I did a bug report - with solid save evidence - during the v7.0 beta showing the problem. It's been logged (given a #) but no action yet. If the lagging escort issue is fixed, things will be a lot better.

What are you system specs out of interest? I'll go first:

5800X3d - water cooled, so living its best life
RTX 3070 - also water cooled
32GB DDR4 3600 - two DIMM's, dual rank cl18*
2x M.2 NVMe in RAID0 - speedy, no obvious latency overhead.
Windows 10 Pro - not on W11 yet, is there a reason to switch?
Display 2560x1440 - mix of settings, mostly quite high. Fog + AA seem to be the biggest fps droppers GPU-wise, so I turn those down and off respectively.

* They'll run tighter timings quite readily, however, the X3d doesn't see the same uplift as my older 3900X did.

I will add that though I've perhaps not gone as extreme as some in terms of late-game ship and station counts, I have had some very mature games. This has meant I've had dozens of Military fleets patrolling and invading, hundreds of ships both large and small - I go a bit nuts on Carrier-launched Fighters - several large production complexes for my own needs, more there purely for profit, my own Shipyard/Wharf and a number of Equipment Docks (S/M Ship Maintenance Bays), so quite a lot going on. However, I just don't see late-game slow-downs, at least, nothing obvious. It's what's going on near me that impact performance the most, i.e. a mega station or a large battle. Once I move away, performance is good again.

I know there are people out there that are still playing their original v1.0 save, or those that have played for weeks on a given save. I generally don't play a save for quite that long myself.
DeadAirRT
Posts: 1124
Joined: Fri, 25. Jan 19, 03:26
x4

Re: Known to be laggy mods?

Post by DeadAirRT »

Scoob wrote: Tue, 27. Aug 24, 14:41
DeadAirRT wrote: Mon, 19. Aug 24, 21:18 You can completely ignore scoob about tater since you are using dead tater and the fact that people present information that is quite outdated is rather annoying. Scoob is still cool though.
(If your computer can't handle one ship performing blacklist checking and one ship searching for trade, you have other issues)

EDit: Wanted to make sure this didn't come off wrong, I'm pretty sure scoob and I discussed what he observed when that happened. It was before I put in the global queue for deadtaters that limits the amount of traders performing intensive logic and prevents ships acquiring the same trade. Unless the engine itself is running into issues with ships waiting (aka not using cpu) then as far as the deadtater script itself, if you can run 2 without issue then you can run any number. The ships themselves still have an impact due to radar etc, but as far as the script itself you will not have issues.

As far as performance impact, DA scripts does perform quite a bit of logic but I've coded it to spread the impact as much as reasonable. I'd be interested in seeing if you can get a debug log to see if something potentially interfered or caused any errors.
Sorry, it wasn't my intent to mislead, I was just sharing an experience when DT did cause an issue. I genuinely thought I'd added that Dead Tater had since been updated to improve things. I personally haven't had any issues in my own games, but then I never run that many DT's anyway. I find that it's so very easy to saturate things as they're really good at their job. I.e. going from 10 active DTs in a given coverage area - let's say 7 sectors from Argon Prime - to 15 won't always see an increase in profits as there may not be enough really good trades to go around. Friend was just adding DT after DT after DT, not thinking about their "home" sector so to speak. I assign DT's in groups, the first batch centred around Argon Prime (for example) another in TEL space, another in PAR. Sure, they overlap, but with distance penalties they're more likely to focus around their area, if you see what I mean. If I want to "grind" the rep with a given faction, I'll limit a DT to just that faction, which can really help.

You know, I remember discussing this recently. I must have been chatting elsewhere, as we were talking about how DT's can often be seen to "wait" for a bit these days, rather than jumping right on the next trade. This slower approach saves performance, and must be the global queue you mention. I have a SWI (Star Wars Interworlds) modded game too at the moment, and have set quite a few DTs going without issue.

Anyway, Dead Tater is great, and I've not run into any issues since those my friend had.
All good :D that's why I mentioned that "Scoob is still cool" since you have given very useful feedback to multiple modders and it's greatly appreciated

Edit: I'll add into the performance discussion. I run all of my mods with everything enabled and usually have between 90-120 fps. Some large fights it can drop lower but even on wharfs walking around i get 60. There usually isn't "one" mod that causes slow downs but the combination of multiple can be outside of testing scenarios. In my most recent save i have around 50 deadtaters running, 6 stations, maybe 100 ships total.

I9 12900k
Evga 2080ti
32gb ddr5 5600mhz
Scoob
Posts: 11170
Joined: Thu, 27. Feb 03, 22:28
x4

Re: Known to be laggy mods?

Post by Scoob »

DeadAirRT wrote: Tue, 27. Aug 24, 21:21
All good :D that's why I mentioned that "Scoob is still cool" since you have given very useful feedback to multiple modders and it's greatly appreciated

Edit: I'll add into the performance discussion. I run all of my mods with everything enabled and usually have between 90-120 fps. Some large fights it can drop lower but even on wharfs walking around i get 60. There usually isn't "one" mod that causes slow downs but the combination of multiple can be outside of testing scenarios. In my most recent save i have around 50 deadtaters running, 6 stations, maybe 100 ships total.

I9 12900k
Evga 2080ti
32gb ddr5 5600mhz
:)

I do sometimes find that after a particularly long play-session I might get the odd overall slow-down*. I usually notice it when opening the map, where fps will drop well below 60fps (limit I set), into the 40's possibly. When that starts happening, I'll often just do a quick save / reload, and map will be back to that limited 60fps. I think doing a save / reload cycle every couple of hours likely isn't a bad idea. I have 32GB of RAM, and I've read that others can hit this slow-down point perhaps a little sooner. I do know that X4 reports to be using rather a lot of RAM, if left running for a while.

* I've tied this into changing sectors often. Once I have teleportation - especially the infinite range upgrade - and I'm managing various fleets, I'm teleporting about all the time to watch stuff go down. If however I have a long "management" session, where I'm sat at the HQ, just remotely managing my empire, the slow-down is far less likely to happen. Ties into this all being a potential memory leak issue. However, it never leaks enough to crash my game.
User avatar
Baconnaise
Posts: 766
Joined: Sat, 23. Nov 13, 15:50
x4

Re: Known to be laggy mods?

Post by Baconnaise »

I run about 65ish mods give or take. My older system prior to upgrades was a R5 3600 w/ 3600 mem with some good timings. GPU was an OG launch 2060. I could play at 4k or 1440p for a bit with vsync and fps cap at 60. Averages were generally 35-60 depending on sector and how busy it was ship wise. I use the DA scripts/eco plus focw and focw corps. Those are the main mods I use in every playthrough. I don't use regular focw with DA scripts though since it has options very similar. Corps mod is always on though and spawns three corps per faction except terran/segaris. I did upgrade to a 5800x3d which more than doubled performance in this game. The 3070ti was another upgrade that helped. I do run mods that remove asteroids that aren't large as well as the rotation removing mod for said roids. No fog. No shadows. I will get huge drops in heavy invasions and some sectors despite turning things off or modded out. I will say the current 7.0+ versions of the game run WAYYYYY better than previous iterations as I always had issues with my dual monitor setup. The game would would go schizo and want to load on my 1440p or 4k monitors depending on patch/version. Now it acts as it should loads on my 4k always despite cycling through the various options like windowed borderless or full screen.
User avatar
Reisser
Posts: 764
Joined: Mon, 28. Feb 05, 15:39
x4

Re: Known to be laggy mods?

Post by Reisser »

My system looks like this:
- AMD Ryzen 7 3700X (8 core)
- 32 GB RAM
- Gforce RTX 3070Ti
- everything on ssd
- resolution: 3440x1440

What probably caused the most problems were the many SupplyMules. You also notice that as soon as you build a new station somewhere in the galaxy, for example, a pack of mules pounce on this job seconds later :P ... that's all well and good, but it probably also means that the scripts are constantly running there.

The whole thing went much better when I put all the mules on ice.

Later I reactivated a small handful again. The range and the possibility of a goods blacklist unfortunately makes the mod almost indispensable for some special goods stores, especially on the rather huge Reemergence map

The whole thing still doesn't run really smoothly and smoothly - but it's much better than before :)

Translated with DeepL.com (free version)
Meine Mods bei NexusMods: RS Loss Report RS Bribe for Scandata RS Colors RS Marine Special Training
Meine Mod-Collection bei NexusMods: X4 7.0 VRO Hard Times

Return to “X4: Foundations - Scripts and Modding”