Jump to content
Null 45

SC4 CPU Options - a DLL Plugin that configures the CPU core count and priority.

5 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

This plugin combines the functionality of the SingleCPU and CPUPriority plugins in a single DLL, and adds the ability to set the CPU priority without using a command line argument.

If the -CPUCount and/or -CPUPriority command line arguments are present, those values will be used in place of the plugin's default options. When those command line arguments are not present, the plugin will configure SC4 to use 1 CPU core and the CPU priority specified in the configuration file.

This plugin is incompatible with 3rd-party launchers that set a CPU priority, it will override the CPU priority setting they set when starting the game.

Download: https://community.simtropolis.com/files/file/36120-sc4cpuoptions/

Source Code: https://github.com/0xC0000054/sc4-cpu-options

System Requirements

  • Windows 10 or later

The plugin may work on Windows 7 or later with the Microsoft Visual C++ 2022 x86 Redistribute installed, but I do not have the ability to test that.

Installation

  1. Close SimCity 4.
  2. Copy SC4CPUOptions.dll and SC4CPUOptions.ini into the Plugins folder in the SimCity 4 installation directory.
  3. Configure the plugin settings, see the Configuring the plugin section.

Configuring the Plugin

  1. Open SC4CPUOptions.ini in a text editor (e.g. Notepad). Note that depending on the permissions of your SimCity 4 installation directory you may need to start the text editor with administrator permissions to be able to save the file.

  2. Adjust the settings in the [CPUOptions] section to your preferences.

  3. Save the file and start the game.

Settings Overview

Priority is the CPU priority that the game will use, the default is AboveNormal. The supported values are listed in the following table:

Priority Value      Notes
High  
AboveNormal  
Normal     The default value for a process, unless the parent process has a different value.
BelowNormal  
Idle  
Low     An alias for Idle.

Troubleshooting

The plugin should write a SC4CPUOptions.log file in the same folder as the plugin.
The log contains status information for the most recent run of the plugin.

  If you would like to make voluntary contributions to support me in continuing to create more content for SimCity 4, I accept donations via PayPal: https://paypal.me/0xC0000054
 

Thanks to the few people who have donated to me.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    37 minutes ago, Membrillo said:

    Hi, zip file does not contain the ini file.

    Fixed in version 1.0.1.

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    It's funny how after many years, I get back into the game this year.  Everything I read said to use a launcher, and then I learned to use the command line arguments.  Now I use the DLLs since they're much simpler and actually fix parts of the game like 32 bit mode in fullscreen.  

    Anyway, this is all to say thanks very much for all your incredible work!

    • Yes 1

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Release version 1.0.2, which changed the processor affinity restriction to only apply to SC4's threads.

    This may improve performance for things like GPU drivers.

    • Thanks 3

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account


    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections