Jump to content
memo

[sc4pac] Let's write our own package manager

320 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 
5 hours ago, nos.17 said:

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.

Hi Nos.17 and yes, that's what I had in the address and is why it's a little confusing. I can use Sc4pac to install files and it's just when I want to delete them I get the SC4pac message that the File access is denied, but on checking, it has removed the installed contents but leaves the folder. I'll see if there is a work around beyond trying to use the OneDrive's generated "Share" address. Unfortunately in the end it will probably be to turn off the backing up. I once hated one drives involvement, but a year ago I had a corrupt save and for hours tried everything I could search to fix it. Then I thought I'd check what onedrive could do and within a minute rolled back my Documents folder to before the last SimCity save and my city was happily alive again.  

  • Like 1

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
1 hour ago, Dono said:

Hi Nos.17 and yes, that's what I had in the address and is why it's a little confusing. I can use Sc4pac to install files and it's just when I want to delete them I get the SC4pac message that the File access is denied, but on checking, it has removed the installed contents but leaves the folder. I'll see if there is a work around beyond trying to use the OneDrive's generated "Share" address. Unfortunately in the end it will probably be to turn off the backing up. I once hated one drives involvement, but a year ago I had a corrupt save and for hours tried everything I could search to fix it. Then I thought I'd check what onedrive could do and within a minute rolled back my Documents folder to before the last SimCity save and my city was happily alive again.  

Hmm. I can't say I've ran into that issue before, but if sc4pac is successfully adding and removing the files, perhaps it is worth ignoring for now? I suppose turning off sync of your  Documents folder is also an option, unless you have a bunch of other things in that folder you want to keep. OneDrive can be a lifesaver but it can also be a little annoying with other applications like this case. I currently don't have the Documents folder backed up. I have C:\Users\Administrator\Documents\ which a few games write to including SC4, but I never do anything else here. All my other stuff I work in  C:\Users\Administrator\OneDrive\Documents\ as I mentioned above. Works enough for me.

One other thing to check is to right click on your plugins folder and check "Always keep on this device" which will prevent OneDrive from ever clearing the files locally. I wouldn't that is the cause in this case but it could help.

  • Like 4

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:  
 
On 10/03/2025 at 10:54 AM, nos.17 said:

One other thing to check is to right click on your plugins folder and check "Always keep on this device" which will prevent OneDrive from ever clearing the files locally. I wouldn't that is the cause in this case but it could help.

OneDrive ISSUE SOLVED

Thank You, 

You got me in the right direction and I have it working now. I made my whole documents folder Local by doing the "Always keep on this device". (I've kept the folder being backed with Onedrive). Also as much of a pain it was, reinstalled OneDrive as even though it was saying the folder was shared, somewhere in OneDrive it wasn't thinking so.

Thank You.

  • Like 3
  • Thanks 1

Share this post


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

Something strange happened, wanted to open the mod manager, but my "sc4pac-gui.exe" had disappeared from its location... couldn't find it anywhere (I didn't delete it either). I'm using the windows x64 version. 

Went back to my zip file from the 1.1.0 version, tried to unzip it but a message popped up saying that I do not have the administrator rights to do so... *:???:

Anybody experienced something similar?

Share this post


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

Hi, everything works fine, but im not sure why i dont see mods in game? Do i need to choose specific plugin folder to make this work? i choose newly made in my directory. How to connect it to work with game?

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
Currently: Viewing File: Bipin Concrete Walls
 

Hi @Czokapson, for mods, the game detects the folder named "Plugins" inside the "Documents > SimCity 4" directory.
Any other mods outside that "Plugins" folder won't be included when you run the game.

So if your sc4pac Plugins directory is not directed to that folder, you can either:
- Rename the folder to "Plugins" and change your sc4pac config,
- or move/copy the content of your sc4pac plugins directory (whatever you named it) into the "Plugins" folder inside the "Documents > SimCity 4".

  • Thanks 1

I play SimCity 4 and make videos of it.

Youtube: Saus Tartar

Share this post


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

I repeatedly stumbled across the issue that I can't find file with the sc4pac tool that should be available. Latest example is NDEX Glenni MEGA Props Vol01 However, when entering the file name (or even parts of it), i don't get a result.

 

 

sc4pac.jpg

Share this post


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

I repeatedly stumbled across the issue that I can't find file with the sc4pac tool that should be available. Latest example is NDEX Glenni MEGA Props Vol01 However, when entering the file name (or even parts of it), i don't get a result.

sc4pac.jpg

Do you have https://sc4pac.simtropolis.com/ added to your channels list? It should be findable if you do.


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:  
 

Also, I just pushed a lot of updates to https://yamleditorforsc4pac.net/ that should make it a lot easier for authors to create the YAML metadata files used by sc4pac. The next major milestone is to incorporate validation to ensure the syntax is valid according to the sc4pac spec, and catch a lot of common mistakes people make. Memo's linting (validation) step when the metadata is added can catch these mistakes before the file is added, but it would be even better if I could do the same checks to make sure a file is valid before it's even submitted for inclusion with sc4pac.

  • 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
  • Original Poster
  • Posted:
    Last Online:  
     
    8 hours ago, Reszk Bravhic said:

    Good day, any help on this message?

    @Reszk Bravhic Thanks for the report. Do you have more details on this? Does the problem persist even after a restart of the application? Which version of the application do you use? Which version of operating system?

    The error message is a result of an internal process crashing. If the problem is persistent, it would help me a lot if you could start the application from a terminal in order to copy the full error message from there. To do this, open the folder containing "sc4pac-gui.exe" in Windows file explorer. Then type CMD in the address bar of Windows file explorer to start a terminal in that folder. In the terminal, type .\sc4pac-gui.exe to launch the application. Click "Update all" to trigger the error. Going back to the terminal, there will be a long error message. Copy all of it and post it here, please.

    On 4/3/2025 at 7:37 PM, Rady said:
    On 4/3/2025 at 1:22 AM, nos.17 said:

    Do you have https://sc4pac.simtropolis.com/ added to your channels list? It should be findable if you do.

    Thank you, I was unaware of that. I only had this channel: https://memo33.github.io/sc4pac/channel/

    @Rady To provide more context here: As of version 1.1.0 of the GUI, the https://sc4pac.simtropolis.com/ channel URL is added to new profiles by default, but it's not added by default to older profiles created before. However, a missing channel URL would also always be added when clicking the "Install with sc4pac" button. On Linux, making the button work requires some manual steps – they are documented in the file "sc4pac-gui.desktop". Alternatively, using the Open in Web-App button would work without setup, even when using the native desktop app instead of the web-app.

    • Like 1
    • Thanks 2

    Share this post


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

    On Linux, making the button work requires some manual steps – they are documented in the file "sc4pac-gui.desktop". Alternatively, using the Open in Web-App button would work without setup, even when using the native desktop app instead of the web-app.

    Thank you, I will have a look at this. I already wondered  how make this button work, but haven't got the time to investigate.

    • Like 1

    Share this post


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

    @memo I've used version 1.0 without problem at all. Came back to use it on April and had that issue. I updated to 1.10 but the problem persisted. I'm on Windows 10.

    Playing around with it, I discovered that with only with my original profile the "Websocket closed unexpectedly." appears. All is normal with my test profile and any new profile I make. I deleted my roaming folder and all is fine with a fresh configuration.

    I followed your instructions to give you the error message but the terminal appears empty. Maybe I did something wrong?

    Greetings *:)

    sc4pac.jpg

    • Thanks 1

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    5 hours ago, Reszk Bravhic said:

    I followed your instructions to give you the error message but the terminal appears empty. Maybe I did something wrong?

    Thanks for testing. Did you close the application before entering the command in the terminal to launch the application? Only one instance of the application can run at the same time, so that's why the command does not have an effect if the application is already running. Make sure to close it before entering the command.

    It's good that the issue does not occur with your other profiles, but that could just be due to a different selection of installed packages.

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    1 hour ago, memo said:

    Did you close the application before entering the command in the terminal to launch the application?

    Yes, I was closing and re-opening the application with the commnad, that's why it seems I have different instances of the application but only one was running at a time. Even so, I couldn't get the error message. Nothing happens on the terminal after I replicated the error, I tried multiple times following from scratch.

    I made a list of my plugins before re-doing my profile and I got them all except any dark-nite lots. Searching and clicking on the Day and nite mod gets me this: 

     

     

    daynite.JPG

    • Like 1

    Share this post


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

    I just tried to setup the sc4pac so that I can run it directly using the "Install with sc4pac" button on the STEX. I followed these steps

    # First, add sc4pac-gui to PATH or adjust the path to sc4pac-gui in "Exec" as necessary.
    #
    # Install this .desktop file in ~/.local/share/applications/
    #
    # (This step is maybe not necessary.) Update the mimeinfo.cache:
    #   update-desktop-database ~/.local/share/applications/
    #
    # Register the new MIME type by running (which adds an entry to ~/.config/mimeapps.list):
    #   xdg-mime default sc4pac-gui.desktop x-scheme-handler/sc4pac
    #
    # Test with:
    #   xdg-open "sc4pac:///package?pkg=memo:submenus-dll"

    My PATH variable now reads as follows:

     

    eter@PC-Peter:~$ echo $PATH
    /home/peter/.nvm/versions/node/v22.11.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/home/peter/NAS_Dateien//Games/SC4/sc4pac-gui-linux-x64

    However, the test resulted in this:

    peter@PC-Peter:~$ xdg-open "sc4pac:///package?pkg=memo:submenus-dll"
    gio: sc4pac:///package?pkg=memo:submenus-dll: Der angegebene Ort wird nicht unterstützt

    which translates to "The location specified is not supported".

    This is of no urgency, but maybe you can have a look into that.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    10 hours ago, Reszk Bravhic said:

    Yes, I was closing and re-opening the application with the commnad, that's why it seems I have different instances of the application but only one was running at a time. Even so, I couldn't get the error message. Nothing happens on the terminal after I replicated the error, I tried multiple times following from scratch.

    I made a list of my plugins before re-doing my profile and I got them all except any dark-nite lots. Searching and clicking on the Day and nite mod gets me this: 

    @Reszk Bravhic Thanks, this is very helpful. With that, I was able to replicate the behavior you described. Unexpectedly, there wasn't any error in the terminal indeed. Could you send me the two files pkg.json and .pkg.json.checked located in your cache folder? – probably at

    %localappdata%\io.github.memo33\sc4pac\cache\coursier\https\memo33.github.io\sc4pac\channel\metadata\simfox\day-and-nite-mod\1.0

    The downloaded pkg.json file is malformed, so seeing the file may help me identify the issue. Afterwards, you can delete this file and the issue should fix itself.

     

    33 minutes ago, Rady said:

    My PATH variable now reads as follows:

    @Rady That looks correct. To test whether the PATH change worked, you can type sc4pac-gui in a terminal, which should launch the app. That's all it does.

    Did you follow the other steps though? In particular, copy the "sc4pac-gui.desktop" file to ~/.local/share/applications/ and open a terminal to run the command

    xdg-mime default sc4pac-gui.desktop x-scheme-handler/sc4pac
    • Like 1
    • Thanks 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    1 hour ago, memo said:

    That looks correct. To test whether the PATH change worked, you can type sc4pac-gui in a terminal, which should launch the app. That's all it does.

    Did you follow the other steps though? In particular, copy the "sc4pac-gui.desktop" file to ~/.local/share/applications/ and open a terminal to run the command

    
    xdg-mime default sc4pac-gui.desktop x-scheme-handler/sc4pac

    Yes, I copied it to the applications directory:

    peter@PC-Peter:~/.local/share/applications$ ls -l sc4*
    -rwxr-xr-x 1 peter peter 732 Mär  9 14:18 sc4pac-gui.desktop

    ALso I did run the mime command (did it a second time just now). Typing sc4pac-gui in the terminal results in

    peter@PC-Peter:~/.local/share/applications$ sc4pac-gui
    sc4pac-gui: Befehl nicht gefunden.

    ("Command not found")

    Share this post


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

    Typing sc4pac-gui in the terminal results in

    
    peter@PC-Peter:~/.local/share/applications$ sc4pac-gui
    sc4pac-gui: Befehl nicht gefunden.

    ("Command not found")

    Try the following:

    sudo ln -s "/home/peter/NAS_Dateien/Games/SC4/sc4pac-gui-linux-x64/sc4pac-gui" "/usr/local/bin/"

    assuming that's your path to the sc4pac-gui binary.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 9.4.2025 at 9:14 PM, memo said:

    Try the following:

    
    sudo ln -s "/home/peter/NAS_Dateien/Games/SC4/sc4pac-gui-linux-x64/sc4pac-gui" "/usr/local/bin/"

    assuming that's your path to the sc4pac-gui binary.

    Still no success. What strikes me odd is that the sc4pac-gui looks "strange" in the file explorer, although it has the same rights as the sc4:

    sc4pac.jpeg.b3cae73f6106d9b5391c75561ec35f58.jpeg

    Share this post


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

    I've uploaded a new version (1.1.1) of the program. This is a bugfix release. One of the fixes ensures that the issue reported by @Reszk Bravhic above does not cause problems anymore. The other fix addresses a problem in which the profiles config directory could not be located on some systems – as a workaround, an environment variable SC4PAC_PROFILES_DIR can be set to define the location to use. If you're not affected by these problems, it's ok to keep using version 1.1.0 for now.

    On 4/11/2025 at 3:04 PM, Rady said:

    Still no success. What strikes me odd is that the sc4pac-gui looks "strange" in the file explorer, although it has the same rights as the sc4:

    Make sure the link points to the correct location, i.e. the directory "/home/peter/NAS_Dateien/Games/SC4/sc4pac-gui-linux-x64/" would have to contain the file "sc4pac-gui" which also must be executable.

    • Thanks 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 13.4.2025 at 5:30 PM, memo said:

    Make sure the link points to the correct location, i.e. the directory "/home/peter/NAS_Dateien/Games/SC4/sc4pac-gui-linux-x64/" would have to contain the file "sc4pac-gui" which also must be executable.

    Looks like a Ubuntu problem. The path is "/home/peter/NAS_Dateien/$Peter/Games/SC4/sc4pac-gui-linux-x64/", however th ln command kind of ignores the "$Peter" part within the path, resulting in the link pointing to "/home/peter/NAS_Dateien//Games/SC4/sc4pac-gui-linux-x64/". I need to investigate on the Linux side of this problem :-)

    Edit:

    Problem solved. In case someone has the same problem, here's the solution for the Linux command. "$Peter" (which is my share on the server) is recognized as a variable, that of course has no value, as it does not exist. For the $ to be recognized correctly, a "\" has to be added before. So, the proper command has to be

    sudo ln -s /home/peter/NAS_Dateien/\$Peter/Games/SC4/sc4pac-gui-linux-x64/sc4pac-gui /usr/local/bin

    Now sc4pac starts when entering "sc4pac-gui" in the command line.


      Edited by Rady  

    Linux problem solved
    • Like 1
    • Thanks 1

    Share this post


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

    Hey everyone, I love this program but I'm running into a problem where an error occurs trying to download various assets. It isn't always the same one it hangs up on, either. I've updated sc4pac to the latest version and have good ST credentials, and I've also tried generating new ones, but it hasn't helped. I shared a screenshot in the Discord and it was recommended that I post here as well.

    Any ideas? Thanks in advance <3

    slkdfj.jpg

    capture.jpg

    • Like 2

    Share this post


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

    Maybe the Simtropolis admins can help here (@Cyclone Boom).

    It's completely out of my league and CB doesn't have time for ST right now, but he does hope that'll change.

    • Like 2

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


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

    Has anyone had time to look into this bug yet? I'm being affected by it as well.

    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