[APP+CODE] A (less crude) fix to make X4 more playable on 2GB VRAM systems

This forum is the ideal place for all discussion relating to X4. You will also find additional information from developers here.

Moderator: Moderators for English X Forum

User avatar
albanana
Posts: 17
Joined: Fri, 7. Dec 18, 15:16

[APP+CODE] A (less crude) fix to make X4 more playable on 2GB VRAM systems

Post by albanana »

Hey,
i wrote a small application to make X4 more playable on my system (GTX 960M, 2GB VRAM).
The new version works by messing with the game's different LOD levels (modifying .cat-files), resulting in lower-poly meshes being used even when the player is directly in front of an object, as well as changing the lowering the resolution of used textures and repacking them (modifying .dat and .cat-files).
This allows me to play the game for hours (instead of at most ~50 minutes).

The app allows you to set quality levels for the different moving parts:
Image

I only suggest using this method if you're desperate to be able to play longer than 1 hour at a time (like me) and have the graphics set quite low anyways.

Some settings might have less impact than others, and there might still be textures / meshes i missed
that could be handled as well, so trying out different settings is encouraged.
  • If you want to try different settings, you have to revert/restore your game to "vanilla" first
    (e.g. using Steams function), you don't have to remove any mods though
  • The lower quality settings for textures are more "robust" (should produce no glitches at all) than those of the meshes, so try out lower settings for them
  • Doesn't stick to savegames (not a mod), so no in-game progress is lost if you revert back to vanilla
  • Modifying textures will set the game to "modified", so no venture mode
I provide no warranty, provide app and source code as-is and licensed under the GNU GPLv3 (open source of course).
Please backup all *.cat-files in the game's folder (where X4.exe is located) before using the program (it will tell you to do that too). If you want to try different settings, you have to restore those backed-up files as well (no auto-restore or auto-backup is implemented, no config files are created)

License: https://choosealicense.com/licenses/gpl-3.0/
The app now uses a modified version of DirectXTexNet (.NET wrapper around the DirectXTex library) to handle the (compressed) .dds-textures used by X4. Both utilize the MIT license (included in the archives).

Update (new version 0.6.0):
  • processing for textures (resolution reduction)
  • calculation of reclaimed memory (not equivalent to VRAM)
  • simulation: option to do a dry run (without modifying game files)
  • (v0.5.1): fixed a bug (low ship texture quality), added new default settings
  • (v0.6): fixed? invisible objects (meshes which were previously removed are now replaced by lowest LOD mesh)
  • (v0.6): fixed a bug in the texture settings (wrong settings used for stations)
Binary (.Net-Framework 4.0 needed): https://github.com/0albanana/LOWRES_X4/ ... r/releases
Source (C#): https://github.com/0albanana/LOWRES_X4
Virustotal scan of Binary archive (v0.6): https://www.virustotal.com/#/file/6d22e ... /detection

Regards,
albanana



{Images posted directly to the forums should not be greater than 640x480 or 100kb, oversize image now linked - Terre}
Last edited by albanana on Fri, 28. Dec 18, 22:04, edited 14 times in total.
Tomonor
EGOSOFT
EGOSOFT
Posts: 1918
Joined: Wed, 12. Sep 07, 19:01
x4

Re: [APP+CODE] A (crude) fix to make X4 more playable on 2GB VRAM systems

Post by Tomonor »

Image
Goobers
Posts: 337
Joined: Sun, 23. Oct 05, 14:48
x4

Re: [APP+CODE] A (crude) fix to make X4 more playable on 2GB VRAM systems

Post by Goobers »

Nice idea... but...
albanana wrote: Tue, 18. Dec 18, 00:49 until everything including the UI text completely freaks out, the VRAM is clogged up and i have to restart X4.
Time for an upgrade? Yes, I know, its a laptop. Can your system RAM upgrade for more capacity?
User avatar
albanana
Posts: 17
Joined: Fri, 7. Dec 18, 15:16

Re: [APP+CODE] A (crude) fix to make X4 more playable on 2GB VRAM systems

Post by albanana »

8) :D
Goobers wrote: Tue, 18. Dec 18, 01:01 Nice idea... but...
albanana wrote: Tue, 18. Dec 18, 00:49 until everything including the UI text completely freaks out, the VRAM is clogged up and i have to restart X4.
Time for an upgrade? Yes, I know, its a laptop. Can your system RAM upgrade for more capacity?
Yeah I know.. When i bought this laptop I didn't think I would want to play any demanding games :P
Falcrack
Posts: 5659
Joined: Wed, 29. Jul 09, 00:46
x4

Re: [APP+CODE] A (crude) fix to make X4 more playable on 2GB VRAM systems

Post by Falcrack »

Nice! But I think I'll just wait a few days for Christmas when I will swap out my GTX 960 2 GB for a 1060 6GB. I too have been annoyed by the periodic need for restarts, thank goodness for F5, the quicksave button, which still works even when everything else it glitched out and I cant see to be able to click on the save game button.
otto_deluxe
Posts: 95
Joined: Sat, 14. May 05, 10:29
x4

Re: [APP+CODE] A (crude) fix to make X4 more playable on 2GB VRAM systems

Post by otto_deluxe »

So setting everything to Minecraft gets us the dope terran ships back into X4? I'm sold! :lol:
Jam Jar
Posts: 4
Joined: Wed, 4. Jan 06, 13:40
x3

Re: [APP+CODE] A (crude) fix to make X4 more playable on 2GB VRAM systems

Post by Jam Jar »

Hi, keen to try this but getting a 404 error when trying to follow the Binary link
Miravlix
Posts: 246
Joined: Mon, 13. May 13, 01:14
x4

Re: [APP+CODE] A (crude) fix to make X4 more playable on 2GB VRAM systems

Post by Miravlix »

Not sure why you think backup is needed, steam has build in backup of all game files.

The Verify Game Files Option, would restore the files to pristine state.

Something one could consider backing up would be the Documents egosoft X4 folder, in case this could somehow corrupt save games.
Knight Phaeton
Posts: 5
Joined: Wed, 12. Dec 18, 07:51

Re: [APP+CODE] A (crude) fix to make X4 more playable on 2GB VRAM systems

Post by Knight Phaeton »

Yeah, will be happy to try this, but can't due to 404 error.
User avatar
albanana
Posts: 17
Joined: Fri, 7. Dec 18, 15:16

Re: [APP+CODE] A (crude) fix to make X4 more playable on 2GB VRAM systems

Post by albanana »

Yeah sorry, google didn't like putting the link here (i guess?)
-> New links added
jimbob82
Posts: 19
Joined: Mon, 10. Dec 18, 11:54

Re: [APP+CODE] A (crude) fix to make X4 more playable on 2GB VRAM systems

Post by jimbob82 »

google probably deleted the exe before because virus scanners are flagging it.
User avatar
albanana
Posts: 17
Joined: Fri, 7. Dec 18, 15:16

Re: [APP+CODE] A (crude) fix to make X4 more playable on 2GB VRAM systems

Post by albanana »

jimbob82 wrote: Wed, 19. Dec 18, 23:44 google probably deleted the exe before because virus scanners are flagging it.
You're right, virustotal showed 2 false positives (heuristics FTW i guess) :gruebel: .
Sorry for the confusion, I recompiled using an older compiler version and reuploaded.

Virustotal result for new binary .zip: https://www.virustotal.com/#/file/e3dca ... /detection
yafeshan
Posts: 19
Joined: Fri, 30. Nov 18, 15:59
x4

Re: [APP+CODE] A (crude) fix to make X4 more playable on 2GB VRAM systems

Post by yafeshan »

This is a life saver. I humbly suggest adding UI textures which are somehow more damaging to vram.
Knight Phaeton
Posts: 5
Joined: Wed, 12. Dec 18, 07:51

Re: [APP+CODE] A (crude) fix to make X4 more playable on 2GB VRAM systems

Post by Knight Phaeton »

Thank you very much, kind sir albanana. It works. Now I can play without restarting the game every hour. Beautiful!
jimbob82
Posts: 19
Joined: Mon, 10. Dec 18, 11:54

Re: [APP+CODE] A (crude) fix to make X4 more playable on 2GB VRAM systems

Post by jimbob82 »

Just a little feedback mainly for other users :-

Cpu i5-4460 @ 3.20 ghz
Gtx 950 2gb
16gb ddr3
settings mostly "Bad" except Asteriods and collectibles which i left at "worse"

Game still seems to use the same Vram (1.1 GB dedicated) when started though it starts up using half as much ram. The vram usage seems to increase more slowly too (after 1hr+ play its sitting at 1.3 GB when it would normaly be at 1.6 GB) game also now seems to make more use of my Ram over time, before barely ever saw the game go above 6 gb ram its now using 10 gb after the hour.

The game runs a hell of a lot smoother in particular the map screen doesnt feel as sluggish with a sat in every system and it dosnt glitch as much when opening it. Theres less stutters going through multiple systems on the highway or flying close to stations (scanning). Have noticed the odd ship be invisible when fighting it (still lockable and shootable etc) Some of the other textures glitch out a bit from time to time (jumpgates, highway, station floors) but generally recover after a second or so.

I usually worry about crashing after 3-4hrs of the game running but haven't tested to see if this is still happening. Looking at the vram usage though, it may have delayed it a bit longer.
User avatar
albanana
Posts: 17
Joined: Fri, 7. Dec 18, 15:16

Re: [APP+CODE] A (crude) fix to make X4 more playable on 2GB VRAM systems

Post by albanana »

yafeshan wrote: Thu, 20. Dec 18, 14:48 This is a life saver. I humbly suggest adding UI textures which are somehow more damaging to vram.
I uploaded a new version which now modifies textures as well. I'm still searching for textures that are currently not included, so I appreciate any feedback :)
User avatar
albanana
Posts: 17
Joined: Fri, 7. Dec 18, 15:16

Re: [APP+CODE] A (crude) fix to make X4 more playable on 2GB VRAM systems

Post by albanana »

jimbob82 wrote: Thu, 20. Dec 18, 21:05 Just a little feedback mainly for other users :-

Cpu i5-4460 @ 3.20 ghz
Gtx 950 2gb
16gb ddr3
settings mostly "Bad" except Asteriods and collectibles which i left at "worse"

Game still seems to use the same Vram (1.1 GB dedicated) when started though it starts up using half as much ram. The vram usage seems to increase more slowly too (after 1hr+ play its sitting at 1.3 GB when it would normaly be at 1.6 GB) game also now seems to make more use of my Ram over time, before barely ever saw the game go above 6 gb ram its now using 10 gb after the hour.

The game runs a hell of a lot smoother in particular the map screen doesnt feel as sluggish with a sat in every system and it dosnt glitch as much when opening it. Theres less stutters going through multiple systems on the highway or flying close to stations (scanning). Have noticed the odd ship be invisible when fighting it (still lockable and shootable etc) Some of the other textures glitch out a bit from time to time (jumpgates, highway, station floors) but generally recover after a second or so.

I usually worry about crashing after 3-4hrs of the game running but haven't tested to see if this is still happening. Looking at the vram usage though, it may have delayed it a bit longer.
Thanks for the feedback :)
I uploaded a new version - you might want to try different settings (e.g. lowering the texture resolution while upping the mesh quality for ships).. If you haven't upgraded your hardware, that is ;)
jimbob82
Posts: 19
Joined: Mon, 10. Dec 18, 11:54

Re: [APP+CODE] A (crude) fix to make X4 more playable on 2GB VRAM systems

Post by jimbob82 »

albanana wrote: Sat, 22. Dec 18, 20:15 Thanks for the feedback :)
I uploaded a new version - you might want to try different settings (e.g. lowering the texture resolution while upping the mesh quality for ships).. If you haven't upgraded your hardware, that is ;)
Nice work on the new settings, I had meant to post back to update that I had to disable settings on the old version in particular for ship exterior and station exterior - with the station settings to bad it was impossible to build them as you were placing invisible modules. New settings dont seem to have the same negative effects. I did get an error when applying settings specifically to 01.cat but the error was preceeded by a successfull write to it (I'll try from fresh at some point to see if it was somthing I did)
KvantSky
Posts: 8
Joined: Sat, 9. Dec 17, 00:30
x4

Re: [APP+CODE] A (less crude) fix to make X4 more playable on 2GB VRAM systems

Post by KvantSky »

Exactly what 1/3 of players need... Dear Egosoft, please hire this man)
One question. Will the game be changed to *modified* status? And how I have to reset *modified* status if it will be?
User avatar
albanana
Posts: 17
Joined: Fri, 7. Dec 18, 15:16

Re: [APP+CODE] A (less crude) fix to make X4 more playable on 2GB VRAM systems

Post by albanana »

KvantSky wrote: Sun, 23. Dec 18, 07:57 Exactly what 1/3 of players need... Dear Egosoft, please hire this man)
One question. Will the game be changed to *modified* status? And how I have to reset *modified* status if it will be?
Thanks ;)
That's a good question actually.. Since I use a few mods my game already says "modified".
If anybody encounters that problem, let me know and I will look into it.

Return to “X4: Foundations”