Jump to content
memo

[sc4pac] Let's write our own package manager

304 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 
22 minutes ago, memo said:

The problem is that the package was renamed today (to a package name that better fits current conventions), so the old package name isn't found anymore. The sc4pac configuration stored on your local machine says "please make sure this (old) package name is installed", but sc4pac doesn't know how to install it, as the old name doesn't exist anymore.

This is still a bit complicated to resolve. Go to Settings and open your Profiles Configuration Folder. Open the file "sc4pac-plugins.json" in a text editor and rename the package


ulisse-wolf:ulisse-mediterranean-transport-set-vol1

to


ulisse-wolf:mediterranean-transport-set-vol1

Then, once you click "Update", the package will be reinstalled under the new name.

Ideally, package identifiers are persistent and shouldn't change. In rare cases like this one, there can be reasons for it though. I'll think about how to better handle this case in the GUI itself.

I suspect Opera might block a cross-origin request to GitHub, possibly for security reasons. That's where Simtropolis obtains the list of installable packages. If Simtropolis doesn't retrieve the list, it cannot display the button. Perhaps, open the browser dev tools and check whether the Console logs any errors to diagnose the problem.

 Thanks memo and ulisse!

Now it's woorking.

I have another question.

Now is downlading all the dependencies needed for ulisse mediterranen and everseasonal flora (including all BSC Props) , but I have all theses dependencies in my plugins folders under "075-my-plugins".

Do sc4pac may detect the plugins I've already installed? Or that's not how it works?

image.png.373d6722a2fef1f5415a8bedb0fce718.png

 

image.png.bd3d21bfcd0c771dbfa9a38f070cf070.png

 


----------------------------------------------------------------------------------------------------------------------------------------------------

Visit my CJ Eloaria Region

My STEX uploaded content

You can visit also my old MD clicking in the picture:

Eloaria-Far2.png

Share this post


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

    Now is downlading all the dependencies needed for ulisse mediterranen and everseasonal flora (including all BSC Props) , but I have all theses dependencies in my plugins folders under "075-my-plugins".

    Do sc4pac may detect the plugins I've already installed? Or that's not how it works?

    The folder "075-my-plugins" contains files you installed manually. Sc4pac doesn't look at them at all. There's no way to detect what's already present in your manually installed plugins.

    This means installing packages with dependencies can lead to some duplication. This is not a problem per-se, as the more up-to-date dependency packages – the ones installed with sc4pac – load after your "075-my-plugins" folder. In the long run, you might want to get rid of the duplication though, by deleting the redundant, manually installed dependency packages. Nearly all the dependencies are available on sc4pac, so I'd probably go through my plugins once to replace the manually installed dependencies by their sc4pac equivalent. This will make it easier to keep them up-to-date as well.

    • Like 3

    Share this post


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

    Thank you so much for this great tool! There is a lot of overlap between the latest BSC Common Dependencies pack (currently V9b) and the props/textures that are available through sc4pac. Is there a recommended process for managing SC4 LEX Legacy Collections on SC4Evermore and what is available through sc4pac when content will overlap between both? Thank you again!

    Edit: SC4Evermore, not SC4Devotion!


    Fun fact: Buffalo sauce contains the entire DNA sequence of buffalo, so you can clone buffalo while eating buffalo wings with buffalo sauce at Buffalo Wild Wings in Buffalo, New York. I've never tried it, though.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 2/17/2025 at 7:59 PM, Turnstyled said:

    Thank you so much for this great tool! There is a lot of overlap between the latest BSC Common Dependencies pack (currently V9b) and the props/textures that are available through sc4pac. Is there a recommended process for managing SC4 LEX Legacy Collections on SC4Evermore and what is available through sc4pac when content will overlap between both? Thank you again!

    Edit: SC4Evermore, not SC4Devotion!

    There's really no way for sc4pac to know what you already have manually installed from a previous plugins folder, so at this time the best recommendation is to keep an eye out on what gets installed in the 100-props-textures folder by sc4pac and then remove the (now duplicated) dependencies manually. As long as you throw all your existing plugins into the  075-my-plugins folder, you won't have to worry too much about potential conflicts as the pac-installed items will override any manually installed items if there are duplicates.

    • Like 2

    Looking for a prop or texture? The SC4 Prop & Texture Catalog might help! View online here.

    Share this post


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

    @nos.17 Thank you so much for your response. That makes a lot of sense.

    • Like 1

    Fun fact: Buffalo sauce contains the entire DNA sequence of buffalo, so you can clone buffalo while eating buffalo wings with buffalo sauce at Buffalo Wild Wings in Buffalo, New York. I've never tried it, though.

    Share this post


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

    Hi,

    I am not able to install any plugins that have a .exe installer. They all give a "Failed to extract" error.

    Is there something I need to do to enable these plugins to be extracted by sc4pac?

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    18 minutes ago, lawny21 said:

    I am not able to install any plugins that have a .exe installer. They all give a "Failed to extract" error.

    What OS are you using? If you are using macOS or Linux, make sure you have installed Mono.

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    15 minutes ago, Null 45 said:

    What OS are you using? If you are using macOS or Linux, make sure you have installed Mono.

    Windows

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    Just now, smf_16 said:

    Can you specify which plugins you are talking about?

    There has been a lot. It seems to be any that have a .exe installler.

    Examples:

    warrior:god-terraforming-in-mayor-mode

    sg:container-freight-yards

    A heap of others, but they are the ones that are fresh of mind. It really has seemed that it has been anything that utliises an installer.

    Thinking it's almost certainly something on my end and not the plugins. I just have no idea what is causing the problem.

    Share this post


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

    I have some questions:

    First, is there a way to change the folder settings? I just discovered the Startup Performance Optimization DLL, which no longer makes DatPacking necessary. Prior to this, I had my plugins in a "plugins_uncompressed" folder, from where I datpacked them into the normal plugins folder. Now I would like to change the sc4pac install folder to the normal plugin folder, however I cannot change it (I would liek to avoid creating a new profile).

    Second, how can I delete a profile?

    And finally third - as I'm using the Submenu DLL mod, I need to arrange my ploppable content in a file structure (aside the plugin folder) that resembles my submenu structure. However, with now using the sc4pac, the downloaded files are only saved temporarily during download and installation. Is there a way to keep the downloaded files (.zip ...)? As I need to extract them into ym submenu folder structure ...

    Share this post


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

    @lawny21 Not all .exe installers are the same. Based on your report, NSIS installers like mgb204:rail-depot-pack might work.

    • What is the full error message if you click on it?
    • Which version of Windows do you use?
    • ARM64 or x64 Windows?
    • Can you confirm the subfolder "cli\cicdec" exists with all these files in those locations?

    2025-02-25_21_18_35.png.14fd0feaa13263f6e1c6f566c9f2b174.png

    • Can you open the folder "cli\cicdec" in a terminal like CMD.exe and type .\cicdec.exe to check whether it works on your system?
    • What happens if you run sc4pac as admin? (I don't recommend this in general, but this might be a permission problem.)

     

    23 hours ago, Rady said:

    First, is there a way to change the folder settings? I just discovered the Startup Performance Optimization DLL, which no longer makes DatPacking necessary. Prior to this, I had my plugins in a "plugins_uncompressed" folder, from where I datpacked them into the normal plugins folder. Now I would like to change the sc4pac install folder to the normal plugin folder, however I cannot change it (I would liek to avoid creating a new profile).

    Second, how can I delete a profile?

    There's no way to do it in the GUI, but it can be done manually. Go to Settings and open the Profile Configuration folder. It contains several JSON files that you can edit in a text editor. You can change the "pluginsRoot" path to your Plugins folder there and then manually move your folder.

    To delete a profile, you need to edit sc4pac-profiles.json and delete the corresponding profile ID subfolder.

    23 hours ago, Rady said:

    And finally third - as I'm using the Submenu DLL mod, I need to arrange my ploppable content in a file structure (aside the plugin folder) that resembles my submenu structure. However, with now using the sc4pac, the downloaded files are only saved temporarily during download and installation. Is there a way to keep the downloaded files (.zip ...)? As I need to extract them into ym submenu folder structure ...

    All the downloaded files are stored in the cache folder. The names are derived from the download URLs though, so they often don't have a .zip file extension. Add the extension to extract them manually.

    • Like 3

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    14 hours ago, memo said:

    @lawny21 Not all .exe installers are the same. Based on your report, NSIS installers like mgb204:rail-depot-pack might work.

    • What is the full error message if you click on it?
    • Which version of Windows do you use?
    • ARM64 or x64 Windows?
    • Can you confirm the subfolder "cli\cicdec" exists with all these files in those locations?

    2025-02-25_21_18_35.png.14fd0feaa13263f6e1c6f566c9f2b174.png

    • Can you open the folder "cli\cicdec" in a terminal like CMD.exe and type .\cicdec.exe to check whether it works on your system?
    • What happens if you run sc4pac as admin? (I don't recommend this in general, but this might be a permission problem.)

     

    There's no way to do it in the GUI, but it can be done manually. Go to Settings and open the Profile Configuration folder. It contains several JSON files that you can edit in a text editor. You can change the "pluginsRoot" path to your Plugins folder there and then manually move your folder.

    To delete a profile, you need to edit sc4pac-profiles.json and delete the corresponding profile ID subfolder.

    All the downloaded files are stored in the cache folder. The names are derived from the download URLs though, so they often don't have a .zip file extension. Add the extension to extract them manually.

    mgb204:rail-depot-pack did install.

    for the examples I mentioned, error messages are both: Failed to extract v40 Clickteam exe-installer

    Windows x64

    Subfolder and files exist

    Using terminal, nothing seems to happen. After about 30sec in just starts a new line

    No difference if it's in Admin mode. First thing I tried

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    19 hours ago, memo said:

    There's no way to do it in the GUI, but it can be done manually. Go to Settings and open the Profile Configuration folder. It contains several JSON files that you can edit in a text editor. You can change the "pluginsRoot" path to your Plugins folder there and then manually move your folder.

    To delete a profile, you need to edit sc4pac-profiles.json and delete the corresponding profile ID subfolder.

    All the downloaded files are stored in the cache folder. The names are derived from the download URLs though, so they often don't have a .zip file extension. Add the extension to extract them manually.

    Thanks, already fixed my installation :-)

    • Like 1

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    18 hours ago, lawny21 said:

    Using terminal, nothing seems to happen. After about 30sec in just starts a new line

    @lawny21 Which version of Windows do you use?

    Can you download one of the affected .exe installers manually and drag&drop it onto the file "cicdec.exe"? This should extract the installer. Cicdec is a third-party application for extraction, which seems to fail on your end. I don't know why. Maybe you need to install a .NET Runtime.

    Edit: Based on the file cicdec.exe.config, you need at least .NET Runtime version 4.0, presumably at least version 4.5. See check-runtime-versions.

    Edit: Make sure that the latest .NET Framework is installed, at least version 4.5. This is pre-installed by default on Windows 8 or later, but must be manually installed on Windows 7.

    • Like 2

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    12 hours ago, memo said:

    @lawny21 Which version of Windows do you use?

    Can you download one of the affected .exe installers manually and drag&drop it onto the file "cicdec.exe"? This should extract the installer. Cicdec is a third-party application for extraction, which seems to fail on your end. I don't know why. Maybe you need to install a .NET Runtime.

    Edit: Based on the file cicdec.exe.config, you need at least .NET Runtime version 4.0, presumably at least version 4.5. See check-runtime-versions.

    Edit: Make sure that the latest .NET Framework is installed, at least version 4.5. This is pre-installed by default on Windows 8 or later, but must be manually installed on Windows 7.

    I have got it working.

    After going through the .NET stuff etc, it was a simple virus protection issue. I had already added an exclusion for the cli folder, but I had to add an exclusion for the whole sc4pac folder and then what do you know, away it goes!

    Thanks heaps for your help. Sorry for wasting people's time.

    P.S. sc4pac is awesome! The absolute mess I had was doing my head in, and trying to track down missing dependencies was a nightmare! Amazing to have the interface (and now sorting out my own stupidity) to be able to click a few buttons and everything is as it should be! Brilliant! Loving it!

    • Like 3

    Share this post


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

    One more question regarding the use of the Startup Performance Optimization DLL: does this tool depend on the loading order? I installed it using sc4pac, and it therefore goes into (I think it's) the 150-mods folder. All my custom content files that I have been downloading without sc4pac however happens to reside in 075-my-plugnis (don't remember the actual name of this folder), which in regard to loading order will be loaded prior to the 150-mods folder. So - will the Optimization DLL still work?

     

    Share this post


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

    Will sc4pac eventually contain most all lots and Bats ? How do we know when it has new content added?

                                                                            Thanks.

                                                                                                      rogerpowell

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    10 hours ago, Rady said:

    One more question regarding the use of the Startup Performance Optimization DLL: does this tool depend on the loading order? I installed it using sc4pac, and it therefore goes into (I think it's) the 150-mods folder. All my custom content files that I have been downloading without sc4pac however happens to reside in 075-my-plugnis (don't remember the actual name of this folder), which in regard to loading order will be loaded prior to the 150-mods folder. So - will the Optimization DLL still work?

     

    DLLs should be loaded before everything else, but once they are read, they will apply to everything. If I remember correctly, files located on the root Plugins folder (as opposed to into a subfolder) get loaded first-hand, so you might try that.

    3 hours ago, rogerpowell said:

    Will sc4pac eventually contain most all lots and Bats ? How do we know when it has new content added?

                                                                            Thanks.

                                                                                                      rogerpowell

    That's the idea, but, as always, it's good to remember that all of this is the work of volunteers that contribute in their free time, so the times for releases and updates are always irregular.

    • Like 3

    matias93's Unexpected Mod Workshop (dev thread)             Ciudad del Lago in the making (dev City Journal)

    "Let us be scientists and as such, remember always that the purpose of politics
    is not freedom, nor authority, nor is any principle of abstract character,
    but it is to meet the social needs of man and the development of the society"

    — Valentín Letelier, 1895

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    5 hours ago, rogerpowell said:

    Will sc4pac eventually contain most all lots and Bats ? How do we know when it has new content added?

                                                                            Thanks.

                                                                                                      rogerpowell

    1. Ideally, yes.
    2. There's really no good way at the moment other than to monitor the Github pages for recently closed pull requests: default channel and simtropolis channel.

    Looking for a prop or texture? The SC4 Prop & Texture Catalog might help! View online here.

    Share this post


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

    Quick question:

     

    How do I change the path to my plugins folder if the program stops responding to the 'open file in browser' command?

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    2 hours ago, Taz the Mystic said:

    I am stuck.  Can you help me reset my pending updates to 0?

     

    You need to set up your Simtropolis login credentials. Open the sc4pac and go to "Settings", then follow the advice given there.

     

    Authentification.jpg

    • Thanks 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    23 hours ago, Salty_vegan said:

    Quick question:

     

    How do I change the path to my plugins folder if the program stops responding to the 'open file in browser' command?

    This is saved in the sc4pac-plugins.json file in your profile configuration folder. It may be different for you, but by default this is located in

    C:\Users\<your_user_name>\AppData\Roaming\io.github.memo33\sc4pac\config\profiles\1

    • Like 1

    Looking for a prop or texture? The SC4 Prop & Texture Catalog might help! View online here.

    Share this post


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

    Hi,

    I recently went to delete a file that didn't load as expected and I got the message.... "! File access denied. Check that you have permissions to access the file directory." I've deleted files before and I've checked all the original required fields when originally using the tool but they all seem correct. Using Win11 x64 system. (This was after the process of:  un-Staring....Update all....Remove the plugins (Yes)...  Then I get the notification).

    Also checked my permissions on what files I thought it was calling on and all were good.

    EDIT: after trying to look into the above situation I rechecked the mods folder it wouldn't let me delete, and it is empty, just the empty... 11241036.foundations-and-retaining-walls.1.0.sc4pacfolder siting in the 100-props-texture allocation. I did a full system scan for the files that were originally in there and it come back with nothing, so I tried manually downloading the files and replaced them in the empty folder hoping it might start fresh and ran the tool again (as it was still on the dashboard to update). I still got the access denied message but the files I replaced were gone again...just the empty folder still remained and the update still pending.

    Any Ideas would be much appreciated.

    Thanks.

    Share this post


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

    Hi again...sorry!

    I just tried the new version to fix my issue but had the same results as my last post, plus I didn't come across a "New" button.

    Share this post


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

    Version 1.1.0 of the sc4pac GUI is now available on the STEX.

    The biggest change is a new form of authentication. Messing with cookies is now a thing of the past. @Cyclone Boom has implemented a token-based authentication method on the Simtropolis server. Simply generate a personal token for your account and copy it into sc4pac (see Settings). This associates your downloads with your Simtropolis account.

    Other changes include:

    • The Simtropolis Channel is now included in the list of default channels when creating a new Profile.
    • When clicking update, a new dialog allows to remove unresolvable packages if any (e.g. when packages have been renamed or deleted from a channel). This resolves problems such as this problem.
    • Added a new button Remove unused variants to (optionally) clear variants that are not used anymore, after having uninstalled some packages. It is part of the Variants panel in the Dashboard.
    On 3/5/2025 at 12:46 PM, Rady said:

    One more question regarding the use of the Startup Performance Optimization DLL: does this tool depend on the loading order?

    No, the loading order does not matter for this DLL.

     

    On 3/7/2025 at 7:52 PM, Taz the Mystic said:

    I am stuck.  Can you help me reset my pending updates to 0?

    Try the updated version, as setting up authentication is now much simpler. In case you really want to set the pending updates to 0, go through the list of pending updates one by one and "unstar" any starred packages, the ones you've previously chosen to install.

    On 3/8/2025 at 4:08 PM, Dono said:

    EDIT: after trying to look into the above situation I rechecked the mods folder it wouldn't let me delete, and it is empty, just the empty... 11241036.foundations-and-retaining-walls.1.0.sc4pac folder siting in the 100-props-texture allocation.

    This is unusual. Unfortunately, I couldn't replicate this problem – though it might depend on the operating system. Some ideas:

    • Reboot your computer. Perhaps some other program or process blocks access to that directory, so the reboot might solve that. Then Update.
    • Delete the folder "11241036.foundations-and-retaining-walls.1.0.sc4pac" manually. Then Update.
    • Delete the folder "31346-various-lot-foundations-and-retaining-walls" located at "coursier\https\community.simtropolis.com\files\file\" inside your Download Cache folder. Perhaps the downloaded file is corrupt. Then Update.

    If this still fails, please tap on the error message and report which file exactly is listed as affected there. If you send me your "Profile Configuration folder" (containing at least 3 JSON files) and the file or folder for which the file access was denied, I can try to take a closer look.

    • Like 6
    • Yes 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 08/03/2025 at 1:49 PM, nos.17 said:

    This is saved in the sc4pac-plugins.json file in your profile configuration folder. It may be different for you, but by default this is located in

    C:\Users\<your_user_name>\AppData\Roaming\io.github.memo33\sc4pac\config\profiles\1

    Figured out what the issue was. Just needed to reinstall. Thanks for your help all the same!

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    21 minutes ago, memo said:

    If this still fails, please tap on the error message and report which file exactly is listed as affected there. If you send me your "Profile Configuration folder" (containing at least 3 JSON files) and the file or folder for which the file access was denied, I can try to take a closer look.

    **Think I found the issue, I do all my testing of new things on a old pc running the same game and folders...just in duplicate. My new PC has it self routed through Microsofts One Drive, I think it lets you put stuff on but I think it sees SC4pac as someone else taking it off. I'll have a play around and see what I can do. I just opened the json file and added a share path to the plugins file that One Drive created but it couldn't read a character in the address ...it's a http://:............address.

    It's 3am lol....I'll have a look tomorrow. Thanks for replying, if I can't get things working I'll yell out....or Cry.

    If anyone knows how to add a one drive "Share" directory path, or if it can be added, that would be cool.

    Thanks.

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    51 minutes ago, Dono said:

    If anyone knows how to add a one drive "Share" directory path, or if it can be added, that would be cool.

    You need to have the OneDrive folder synced to your computer - you can't use HTTP addresses because as far as your local filesystem is concerned, they're not "real". Your options are to turn off OneDrive, or if you want to use it and you have it backing up your My Documents folder, your address will look like C:\Users\<user_name>\OneDrive\Documents\SimCity 4\Plugins.

    • Like 2
    • Thanks 1

    Looking for a prop or texture? The SC4 Prop & Texture Catalog might help! View online here.

    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