Jump to content
smf_16

Simtropolis x sc4pac: a new way to install plugins

76 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

This is a truly remarkable development. Thank you for putting this together.

What I like most about this, is that it gives plugin authors all the control over the metadata of their own uploaded files. In many cases, it's enough to just include an empty file named "metadata.yaml" in the upload, and all the metadata will be derived automatically. This makes it very easy to turn one's own uploads into sc4pac-installable packages. For users, this not only makes it easy to install your packages, but also to keep them up-to-date in case there are revisions or bug fixes.

Combined with the impressive number of existing plugins you've indexed – literally thousands of packages on the STEX – these are great prospects for SC4 plugin management. Assembling a full-featured Plugins folder is now manageable with sc4pac.

  • Like 6
  • Yes 1

Share this post


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

If you're a creator and want to start writing metadata files for your uploads, I created a tool to help make that easier: https://yamleditorforsc4pac.net/

It's open source, so if you run into any issues please send me a message or open an issue. There's likely bugs, but I'm doing my best. *:P

Between @smf_16's scripts for generating metadata for existing uploads and my YAML editor tool for new uploads, we hope to make the process of adding things into sc4pac as easy as is reasonable.

  • Like 6

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:  
 

A question on adding metadata to uploads:  In the case where an upload has several installation options to choose from, how would this SC4Pac handle that?

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    1 hour ago, Kel9509 said:

    A question on adding metadata to uploads:  In the case where an upload has several installation options to choose from, how would this SC4Pac handle that?

    That would need to be handled by variants, which would need to be specified manually in the metadata.yaml. However, there are a few variants (such as MN/DN) that can be generated automatically from the file structure & naming of the uploads. You can find more information about this with some concrete examples here.


      Edited by smf_16  

    Updated second link to the examples of automatic variant generation based on file structure & nameing
    • Like 4

    Visit www.growifier.com for ploppable residentials

    Love playing hearts and other card games? Have a look at www.whisthub.com!

    Share this post


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

    @Kel9509 If you want an example of how you can specify custom variants in metadata, have a look at the metadata.yaml file here: 

     

    • Like 2

    Visit www.growifier.com for ploppable residentials

    Love playing hearts and other card games? Have a look at www.whisthub.com!

    Share this post


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

    If you want an example of how you can specify custom variants in metadata, have a look at the metadata.yaml file here: 

    Thank you!  I'll see what I can do.  

    To be fair, I'm not entirely keen on using this only because of the revolutionary way it needs to have your plugins organized.  My plugins folder is entirely organized by author, so I have folders for Mattb325, bixel, etc.  I know that the instructions say you can just copy existing folders into the new structure in a special subfolder, but it's not exactly how I operate.  

    But I'll try to adapt my uploads to it, in case anyone does want to download them through this tool.

    • Like 2

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 2/11/2025 at 6:27 PM, Kel9509 said:

    To be fair, I'm not entirely keen on using this only because of the revolutionary way it needs to have your plugins organized.  My plugins folder is entirely organized by author, so I have folders for Mattb325, bixel, etc.  I know that the instructions say you can just copy existing folders into the new structure in a special subfolder, but it's not exactly how I operate.  

    Same here, plugins folder organized by Author with lots of descriptive sub folders. No denying that this is a great innovation for those that do not have a very specific organizational structure to their plugins folder and for the ease of downloading dependencies. Downloading dependencies is not something that has ever been a problem for me although it can admittedly be time consuming. Unfortunately the folder structure that is used by sc4pac would only serve to confuse the heck out of me at this point in my life. Fool Goes Old School.


    Humor is the second most subjective thing on the planet

    Brevity is the soul of wit and vulgarity is wit's downfall

    Good Night and Good Luck - Read You Soon

    Share this post


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

    It's not the same as organizing the Plugins folder by author, but consider that the main way to inspect one's Plugins with sc4pac would be in the "My Plugins" screen. There you can easily filter by author name. For example, searching for "mattb" would list all installed plugins by Mattb325. You can also limit the search to specific categories, such as residential, commercial, etc. Let me know what might be missing for this interface to be more useful to you. Maybe something can be added.

    • Like 4

    Share this post


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

    Unfortunately my Windows Operating System is also very Old School precluding the use of sc4pac. Just gave it a shot and failed miserably. A new computer should be forthcoming this year once my finances improve. When this happens sc4pac will be given another shot. We shall see what we shall see.

    Out of further curiosity how are the files placed into their respective folders with sc4pac? Are the files placed into individual sub folders of the main folders or are the files just placed into the main folders as "loose" files?

    Thank You for the Programming and the Explanation.


    Humor is the second most subjective thing on the planet

    Brevity is the soul of wit and vulgarity is wit's downfall

    Good Night and Good Luck - Read You Soon

    Share this post


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

    I just installed this gorgeous tool and added my authorization credentials. However, ikeep getting told "Failed to download" (see attached screenshot for details)

    Failed to download.jpg

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    33 minutes ago, Rady said:

    I just installed this gorgeous tool and added my authorization credentials. However, ikeep getting told "Failed to download" (see attached screenshot for details)

    Failed to download.jpg

    Head to the Settings panel in the program and you'll see a section called Authentication (Simtropolis). Follow the instructions there to add your cookie data from a Simtropolis tab you have open in your browser. Replace the text that says value. There's a few ideas to make this information more easily found on the ST side, but this is the process for now.

    • 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
    Posted:
    Last Online:  
     

    Hi all,

    Good news. The issues with random download errors from the STEX (while using sc4pac) should now be resolved.

    I've tweaked some Cloudflare settings to allow sc4pac to bypass bot protection firewall rules. The trouble was with Cloudflare issuing Captcha style challenges, which effectively blocked downloads in some scenarios.

    In terms of the cookie authentication, there's an idea I have in mind to avoid this step. My hope is we instead have a different solution which allows you to download freely without needing sc4pac to recognise your login session. I'll bring it up with memo and the sc4pac team and we'll see what can be done.

    Thanks everyone! *:)

    • Like 5
    • Thanks 3

    Quick Links

    “SimCity 4 is not just a game, but a tool driven by our own imagination and creativity.”

    Buy me a coffee

    Share this post


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

    Hello,

    A couple days ago, STEX has finally got sc4pac support. That means I can now upload my files with some metadata and the tool will detect it, right? I'm fully supportive of what both of you did. I have questions about this project:

    1. My mods uploaded on STEX so far only contains .dat, with only one exception of being a SC3K tool. Is it fine to have just .dat wrapped in a .zip with the metadata file? How can I do it?
    2. I want to change my name here on ST with another, but I can't since I haven't lapsed 365 days yet, despite being pretty close. Should I wait a little to reupload of my stuff?
    3. Should I bump my mods' version when reupload my mods into sc4pac?
    4. One of my mods, which is the Somy's Diagonal Apartment, has a Somy dependency, which unfortunately doesn't currently exist on any channel according to my research. Should I add the metadata now or later?
    5. Related to 4, should I override my sc4pac mods' name? If so, what should format I use? Should I use abbreviations like diag or apt or whatever? Should I also use prefix to my mods for easier organization?
       

    Help appreciated. Huge thanks!

    Share this post


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

    Hi Jidan,

    1. Yes, just put the .dat and the metadata.yaml file together in a .zip, and then upload the .zip. In fact, only .zip files are supported for now, but support for .7z and .rar is planned as well.
    2. It's is strongly discouraged to change the name of a package once it has been added to an sc4pac channel because it will break it for everyone who has installed it. You should only do so if there's a very good reason, and even then you should keep the old package name around and point to the renamed package as a dependency. So for changing your name, this means that, yes, please wait with reuploading your stuff if you plan to change your name, and make sure that this will be your definitive name.
    3. Technically, you don't need to update the version to introduce sc4pac support. However, if you update your mod after it has already been added to sc4pac, then yes, you should bump the version, otherwise sc4pac might not recognize that your mod has been updated. If the version is updated, then sc4pac will update the package for everyone who has it installed. So, while not technically required to introduce sc4pac support, I think it is good practice to update the version anyway (but something like 1.0 to 1.1, no need to bump the major version).
    4. If a dependency is not yet available on sc4pac, then unfortunately you have to wait for it to become available, or kindly request us to make it available. I think that the Somy packages can probably be added to the default channel soon, as I imagine other people would like to use them as well.
    5. You're free to choose the name of your sc4pac mod. By default, it will be generated from the title you have chosen on the STEX. However, once a name has been chosen, you should stick with it. You can freely override the name that sc4pac will use in the name field of the metadata.yaml. This is especially useful if you upload your mods under a prefix to the STEX. Prefixes shouldn't be used with sc4pac, because sc4pac already prefixes the package with your username. As an example, we don't want package names like jidan:jidan-some-package, so if your title on the STEX is Jidan - Some package, then your metadata.yaml should look like
      name: some-package

      to make sure the prefix is not included in the sc4pac name.

    • Like 4

    Visit www.growifier.com for ploppable residentials

    Love playing hearts and other card games? Have a look at www.whisthub.com!

    Share this post


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

    Just wanted to confirm that the download is now working.

    • Like 2
    • Thanks 2

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 2/13/2025 at 9:11 PM, Nite Owl said:

    Out of further curiosity how are the files placed into their respective folders with sc4pac? Are the files placed into individual sub folders of the main folders or are the files just placed into the main folders as "loose" files?

    Following up on this: Yes, all the files are placed into individual subfolders for each package. The folder names are made up from the package identifier and end in ".sc4pac". For example:

    2025-02-15_20_48_44.png.21e450d60d58ab65a84cdc59862f26a1.png

    On 2/13/2025 at 9:11 PM, Nite Owl said:

    Unfortunately my Windows Operating System is also very Old School precluding the use of sc4pac. Just gave it a shot and failed miserably.

    You might have success with the cross-platform web-app version. I know at least one person using it on Windows 8. The desktop app would require Windows 10 at least.

    • Like 1
    • Thanks 2

    Share this post


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

    Yes, all the files are placed into individual subfolders for each package.

    You've got DLL mods in subfolders?  I thought that didn't work.

    Share this post


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

    They are symlinked into the root plugins folder if I'm not mistaken

    • Thanks 1

    Visit www.growifier.com for ploppable residentials

    Love playing hearts and other card games? Have a look at www.whisthub.com!

    Share this post


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

    Question: can I add "normal" custom content (that is not installable via sc4pac) to the sc4pac folders (like, an IM lot to the "400-industrial" folder) or need they be located in the "075-my-plugins" folder?

    Share this post


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

    No, you should put them in either 075-my-plugins, 895-my-overrides, or you can create your own odd-numbered folders. For example, 401-my-industrial would work.

    • Like 2
    • Thanks 2

    Visit www.growifier.com for ploppable residentials

    Love playing hearts and other card games? Have a look at www.whisthub.com!

    Share this post


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

    I just updated my RCI DLL Query and there are 5 possible options (actually there's 15 possible choices since you can mix-and-match if you really wanted to among the 3 queries).  I don't have SC4Pack yet but I'll try to make it work for this, if possible. I'll give it a shot later this week (I hope).

    How does SC4Pack handle "recommended optional dependencies"? 

    Share this post


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

    I have a question regarding mods in combination with the sc4pac:

    As I'm using the DatPacker, I have a folder "Plugins_uncompressed", which holds all the downloaded stuff. This will then get datpacked into the "real" "Plugins" folder. However, up to now, I used to have any mods (NAM, CAM, IRM, Submenu.dll and the like) directly within the Plugins folder (hence not datpacked).

    Since I'm now starting to use the sc4pac tool - how do I handle my mods? Should they be moved manually into the corresponding sc4pac folder (like 777-network addon mod; 150-mods, 895-my-overrides)? Will they still be working when datpacked?

    And on a side note: what would i place into the 895-my-overrides folder?

    Share this post


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

    This topic is specifically for the Simtropolis sc4pac channel. For sc4pac related questions, use the associated topic.

    These questions should have been in that (the later) topic:

    14 hours ago, Kel9509 said:

    I just updated my RCI DLL Query and there are 5 possible options (actually there's 15 possible choices since you can mix-and-match if you really wanted to among the 3 queries).  I don't have SC4Pack yet but I'll try to make it work for this, if possible. I'll give it a shot later this week (I hope).

    How does SC4Pack handle "recommended optional dependencies"? 

    sc4pac only handles required dependencies (and variants). If you have recommended dependencies, you can put them in the package description. Here's what you can do:

    1. The package description supports Markdown, so you can hyperlink the name of the plugin(s) you recommend.
    2. If the plugin has an associated sc4pac package, you can put it's package name inside back-ticks (``) and a link to that package will be created on the sc4pac main channel website (example here). That link will also be handled by the GUI. (I'm not sure how well cross-channel is supported however... @memo)

     

    9 hours ago, mwindite said:

    can i uninstall this

    Uninstall what? sc4pac? A package? Please be more specific...

     

    3 hours ago, Rady said:

    I have a question regarding mods in combination with the sc4pac:

    As I'm using the DatPacker, I have a folder "Plugins_uncompressed", which holds all the downloaded stuff. This will then get datpacked into the "real" "Plugins" folder. However, up to now, I used to have any mods (NAM, CAM, IRM, Submenu.dll and the like) directly within the Plugins folder (hence not datpacked).

    Since I'm now starting to use the sc4pac tool - how do I handle my mods? Should they be moved manually into the corresponding sc4pac folder (like 777-network addon mod; 150-mods, 895-my-overrides)? Will they still be working when datpacked?

    And on a side note: what would i place into the 895-my-overrides folder?

    I also "datpack" some of the plugins I use, mostly the ones with loads of files. Here's what you can do:

    1. You can set a folder other than your default ".../plugins/" folder as the one used by sc4pac. In fact, you can have multiple folders used by using "profiles". For manually installed plugins, use custom odd-numbered folders. Then, every time you update your packages, you can "datpack" that folder into your real ".../plugins/" folder. This solution however requires you to either manually install "root-installed" plugins (such as DLLs) or "symlink" them...
    2. The other solution I came up with is to make a custom channel with custom "datpacked" source assets for the plugins I need to. I only need to write the asset part, as long as I keep the same asset ID. The right channel load order will override the default config.

    If you need ALL of your plugins to be "datpacked", I would suggest you to go with option 1; otherwise option 2 may have a bit more overhead on the short term, but less on the long...

    • Like 3

    Share this post


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

    Just pushed an update to the Simtropolis channel to add all of @Glenni's and @Aarsgevogelte's content. Thats 175 new packages now available! *:party:

    • Like 5

    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:  
     

    Simtropolis Channel Update - May 2025

    Since my previous update, packages from the following authors have been added:

    • @Fluggi - 5 packages
    • @paeng - 22 packages (this is just their first page of content - five more to go)
      • plus 11 packages from other authors required as dependencies
    • @Pegasus - 12 packages
    • @WannGLondon - 5 packages that were added or updated since the first addition
    • @Ceafus 88 - 43 package
    • @IDS2 - 3 packages with their most recent releases
    • @SimCoug - 12 packages
      • plus 5 packages form other authors required as dependencies
    • @Leshan - 2 packages
    That brings this April's total to +395 packages (120 in this update plus 175 from earlier in the month). This channel now contains 2253 packages!
     
    I aim to do these updates monthly from here on out, so stay tuned. The public tracker for planned and in-progress additions is here. Please request if you'd like to see something added, but in general, the first goal is to get as many things from Indiana Joe's Quest for the Ultimate Plugins Folder added first.
     

    sc4pac is a package manager meant for the acquisition of SimCity 4 mods. Package managers are programs that automate the process of installing software (see Wikipedia). You simply select a package to install. No need to worry about dependencies – they will be installed for you. Concretely, the main tasks sc4pac handles are: downloading and installation of plugin files, managing dependencies (installed automatically for you), ensuring correct load order, ensuring compatibility between choices (do you use a DarkNite mod? DarkNite BATs will be chosen automatically where available), updating installed plugins when newer versions become available, reproducibility of your plugins folder (makes it possible to share your plugins folder in the form of a configuration file), and verifying file integrity to prevent malicious tampering. Read here for more information.

    • Like 4
    • 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