Basic System Tweaks

Starfield Mods |

Basic System Tweaks

This is an SFSE plugin for Starfield that is a consolidation of ideas from other mods with some extra features added. You can tweak basic things like how the game uses disk cache, configure CPU prioritization, disable exit saves, and have the ability to randomize game assets such as textures. All of these features are customizable and can be turned on or off as you see fit.

DISK CACHING
The original idea for this came from Disk Cache Enabler developed by enpinion for Starfield. I take a bit of a different approach from that mod in that instead of patching specific memory locations in the game code, I take advantage of Microsoft Detours to intercept all calls to CreateFile. This allows me to also implement other features in this plugin that I will describe below. In addition to enabling disk caching, I add the ability to specify the type of disk caching that can be done so people can further tweak performance based on their particular system characteristics. This article explains the difference between the available options. It is quite possible these different caching options make no difference in game performance, but I figured it wouldn’t hurt to add the ability to configure them in case these options do come in handy.

CPU PRIORITY
The original idea for this came from Skyrim Priority developed by boring3 for Skyrim. The feature is pretty simple in that it simply makes a call to SetPriorityClass to change the process priority so the game can take advantage of the CPU more if there are other things running in the background. In addition to this functionality, I added the ability to set the process affinity through the SetProcessAffinityMask function. I can’t say this is something I have ever used myself, but I have seen people talk about it and it can make sense if say for example you have a CPU with P and E cores and want to ensure the game only runs on P cores.

DISABLE EXIT SAVES
The original idea for this came from Disable Exit Save developed by PK0 for Fallout 4. I tend to find exit saves annoying so this can come in handy for people who think the same thing. Since I am already taking advantage of Microsoft Detours to intercept all calls to CreateFile, I simply intercept any writes to save files starting with the name “Exitsave” and set the FILE_FLAG_DELETE_ON_CLOSE flag so the exit save gets immediately deleted after it is done saving.

ASSET RANDOMIZER
This is an idea of my own that I realized I could do with the use of Microsoft Detours. Basically when Starfield tries to load a particular asset from a loose file it can be redirected to a different random loose file. For example, I have noticed a bunch of mods that change shirt textures. You can configure this so that you can have various different shirt textures and a random one is chosen each time the texture is loaded so you can get a little bit of variety every time you play the game.

While this can work for any loose files underneath the “Data” folder in Starfield, I recommend that you only use this for textures right now and even with that your mileage may vary. For simple stuff texture swaps should work fine, but there is potential for weird behavior or even crashes if the game engine doesn’t like the textures that are being swapped.

CONFIGURATION
To configure this plugin there is a file named “BasicSystemTweaks.json” that contains the following options:
{
“disk_cache_enabled”: true,
“disk_cache_type”: 0,
“exit_save_disabled”: false,
“process_priority”: 0,
“process_affinity”: 0,
“asset_randomizer_enabled”: false
}

These options can be summarized as follows:
disk_cache_enabled – Indicates whether disk caching should be enabled.
disk_cache_type – If disk caching is enabled, this will indicate the type of disk caching. Use the following values to configure it:
0 – Operating system default caching method
1 – FILE_FLAG_RANDOM_ACCESS
2 – FILE_FLAG_SEQUENTIAL_SCAN

exit_save_disabled – Indicates if exit saves should be disabled.
process_priority – The process priority to use. Since the flags passed to SetPriorityClass can be a bit weird to set directly I assigned the following values:
-2 – IDLE_PRIORITY_CLASS
-1 – BELOW_NORMAL_PRIORITY_CLASS
0 – NORMAL_PRIORITY_CLASS
1 – ABOVE_NORMAL_PRIORITY_CLASS
2 – HIGH_PRIORITY_CLASS
3 – REALTIME_PRIORITY_CLASS

process_affinity – If set to something other than 0, this will set the process affinity to the specified bit mask. This is read as a 64-bit integer that is passed directly to SetProcessAffinityMask. You may need to use a programmers calculator to convert the bit mask, but anyone intending to use this probably knows what they are doing.
asset_randomizer_enabled – If this is enabled, configuration files in the “RandomAssetsConfigs” folder will be loaded and used to randomize assets.

Random asset configuration files are stored in a JSON format in the “RandomAssetsConfigs” folder with files ending in the extension “.json”. The following is an example of what one looks like:
{
“textures\\clothes\\outfit_trucker_tee_01\\outfit_trucker_tee_01_upperbody_color.dds”: [
“textures\\clothes\\outfit_trucker_tee_01\\outfit_trucker_tee_01_upperbody_color.dds”,
“textures\\clothes\\outfit_trucker_tee_01\\outfit_trucker_tee_01_upperbody_color_01.dds”,
“textures\\clothes\\outfit_trucker_tee_01\\outfit_trucker_tee_01_upperbody_color_02.dds”
],
“textures\\items\\magazines\\peak_performance\\peakperformance01_color.dds”: [
“textures\\items\\magazines\\peak_performance\\peakperformance01_color.dds”
“textures\\items\\magazines\\peak_performance\\peakperformance01_color_alternative.dds”
]
}

Please be aware that the original loose file that is being swapped needs to exist, otherwise the game engine will skip this logic and go directly to find the asset in the BA2 archive which this plugin can’t detect in order to perform a random swap.


Author: Forsaken Nomad
1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 5.00 out of 5)
Loading...

This content was uploaded by website visitors. If you notice any mistake, please let us know.




Useful Information: How to install Starfield Mods | Starfield System Requirements | Starfield Cheats | Starfield Tips | Starfield News

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *