Jump to content
nos.17

SC4Cleanitol - a new implementation of the old tool

47 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

SC4 Cleanitol is a modern implementation of the original BSC Cleanitol program released in 2013. This program provides an easy way to clean your plugins folder of all non SC4 related files making the game quicker to load, can remove out of date and obsolete plugins, and can tell you what dependencies you have and which dependencies you need for a given mod.

concise.png

This new version is designed to be backwards compatible with old Cleanitol scripts, but nevertheless includes numerous improvements, two of the major ones being:

  1. Ability to specify TGIs in addition to file names as a dependency. One of the drawbacks of using filenames only is if a user renames a file or datpacks their plugins folder, the old Cleanitol program will report a missing dependency even if that asset might actually be there.
  2. Ability to specify conditional dependencies - i.e. only report item A as a dependency if item B is present. This is very useful for mods which may allow the user to choose certain components to install. This way the user will not be prompted for a missing dependency for a component they did not install.

 

Requirements

  • Windows 10 or higher
  • .NET7 runtime version > 7.0.0
    • To determine which version is installed, open Command Prompt and type dotnet --list-runtimes. If the version is less than 7.0.0 installed, download the most recent version here. Alternatively, if you run the executable without the correct .NET runtime, you will receive an error message. Follow the prompts to download the correct version.

 

Downloading

Download from the STEX or visit the latest release on Github. Both versions are identical.

 

Support

Consult the user manual, which contains information on both using the program and creating scripts with the new functionality introduced with this program.

This is an open source application. The source code and issue tracker are posted here. Requests or questions are welcomed here in this thread, in the Github issue tracker, or in the SC4D Discord thread.


  Edited by nos.17  

removed image of old version
  • 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:  
     

    Version 0.5 is currently released, with a few notable improvements:

    > Revised the scanning algorithm. Performance should be at least 50% faster. 🎉

    > Improved information provided in the header about conditional and missing dependencies.

    > Fixed a few bugs. Thanks UlisseWolf!

     


    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 @nos.17, I seem to be having some trouble using cleanitol. No matter what (dependencies) script I run, it always tells me
    "0/31 dependencies found. (31 dependencies not required due to conditional rules)",
    or however many dependencies were in the list. When I run detailed output the explanation is always the same
    "BSC MEGA Props - CP Vol01.dat was skipped as  was not found. Item: BSC MEGA Props CP Vol 01".

    Removescrips seem to work fine.

    Am I missing something? I'm running windows 10, installed .NET7 runtime version 7.0.16 (first did version 8.something that is linked in your description, but couldn't run cleanitol with that apparently), and extracted contents of the net7.0-windows folder in the zip to a location on my harddrive (C:\Games\SC4 Cleanitol to be specific).

    • Like 1

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    On 3/4/2024 at 5:01 PM, A.U. Tocrat said:

    Hi @nos.17, I seem to be having some trouble using cleanitol. No matter what (dependencies) script I run, it always tells me
    "0/31 dependencies found. (31 dependencies not required due to conditional rules)",
    or however many dependencies were in the list. When I run detailed output the explanation is always the same
    "BSC MEGA Props - CP Vol01.dat was skipped as  was not found. Item: BSC MEGA Props CP Vol 01".

    Removescrips seem to work fine.

    Am I missing something? I'm running windows 10, installed .NET7 runtime version 7.0.16 (first did version 8.something that is linked in your description, but couldn't run cleanitol with that apparently), and extracted contents of the net7.0-windows folder in the zip to a location on my harddrive (C:\Games\SC4 Cleanitol to be specific).

    Hmm thanks for the report. If the program is running fine without crashing that would rule out any .NET issues. Do you get that message every time, regardless of which script you run?


    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:  
     

    I've experimented a bit, and it is quite mixed.

    For instance, I've tried installing your 'AndisArt SC13 Homes Redone'. I have attached the output for both scripts (seems I'm not able to post it in a spoiler, gets marked a spam). I've installed the required 'SC2013-inspired Homes Pack' and (as far as I can tell) all other dependencies.

    When I run the remove list it finds most, but not all, files to remove. Those are definitely present though.

    For the dependencies it counts two files to be removed, 0/27 depencencies found (27 dependencies not required due to conditional rules), 0/0 missing. Those 27 not required are all marked as being not found.

    I get similar results with other depenencies checks, can't find an other mod with a remove list right now.

    Dependencies output.txt

    Removelist output.txt

    • Thanks 1

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    5 hours ago, A.U. Tocrat said:

    I've experimented a bit, and it is quite mixed.

    For instance, I've tried installing your 'AndisArt SC13 Homes Redone'. I have attached the output for both scripts (seems I'm not able to post it in a spoiler, gets marked a spam). I've installed the required 'SC2013-inspired Homes Pack' and (as far as I can tell) all other dependencies.

    When I run the remove list it finds most, but not all, files to remove. Those are definitely present though.

    For the dependencies it counts two files to be removed, 0/27 depencencies found (27 dependencies not required due to conditional rules), 0/0 missing. Those 27 not required are all marked as being not found.

    I get similar results with other depenencies checks, can't find an other mod with a remove list right now.

    Dependencies output.txt

    Removelist output.txt

    Thanks for adding these results - they were very helpful to figure things out. Try out this new release.

    On a side note, I did also find an issue with the AndisArt SC13 Homes Redone dependency cleanitol. The last two items should definitely not be removed. I've attached a new version here and I'll update the file in short order.

    Cleanitol Dependencies - AASC13Homes by nos17.txt

    • 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:  
     

    Thanks, that seems to have done the trick!

    I was still getting some false negatives, but it seems that is due to looking for the exact file name. For instance, you have both 'BSC MEGA Props - CP Vol01.dat' and 'BSC Mega Props - CP Vol02.dat' in your dependencies list. In the pack MEGA is fully in caps in both file names, so the Vol02 wasn't found. Similar things with files having extra or fewer spaces, or a v2 added. I suppose that is beyond the scope of this tool to take that into account?

    • Like 1

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    On 3/7/2024 at 4:35 AM, A.U. Tocrat said:

    Thanks, that seems to have done the trick!

    I was still getting some false negatives, but it seems that is due to looking for the exact file name. For instance, you have both 'BSC MEGA Props - CP Vol01.dat' and 'BSC Mega Props - CP Vol02.dat' in your dependencies list. In the pack MEGA is fully in caps in both file names, so the Vol02 wasn't found. Similar things with files having extra or fewer spaces, or a v2 added. I suppose that is beyond the scope of this tool to take that into account?

    Yes that's pretty much outside of the scope, but that's also exactly why I built it. I had renamed a lot of those files for myself (or datpacked the files) which caused the scripts to break, so I designed this program to actually open up each file and scan the TGIs inside. It's designed to be compatible with legacy scripts obviously, but if you have a newer script with this feature mismatching filenames would no longer be an issue.

    I guess as a side note, if you're running scripts that don't have TGI dependencies and just file names, you can skip updating the TGI index and save yourself a few seconds ... though now I'm thinking that might be a decent feature to add to automatically detect from the script.

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

    Hi all just announcing I've released version 0.7. Improvements in this release:

     

    SIGNIFICANT improvements in speed when running scripts with file removal rules.

    Tests with the Cleanitol_MASTER REMOVE LIST_BSC Common Dependencies Pack Version 7.txt Cleanitol script - the largest script created to date - yielded improvement gains of up to an order of magnitude. Runs scanning approximately 3GB/700 files was reduced from 2.5 min to 5 seconds, and runs scanning 11GB/24000 files was reduced from 30+ minutes to 15 seconds.

    Download from the STEX or visit the latest release on Github. Both versions are identical.
    • Like 1
    • 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:  
     

    Hello,
    I wanted to try scripting to on the one hand clean the old files of a plugin (this part works perfectly) and on the other hand add the list of dependencies, there it gets stuck!

    The app reports that all the files are missing,

    668958908208f_Capturedcran2024-07-06164106.jpg.7e4cacf93014c8adbf1f04ba81d0427e.jpg

    except all of them are present in my plugins\ folder.. obviously, otherwise it wouldn't be funny (;-)!!!). I tested sc4cleanitol version 0.7 and 0.7.1 with the same result. I tested the script with BSC_Cleanitol -> all ok !

    i wrote .. typical line :

     Nams PROPS PACK Vol 2.dat;Nams PROPS PACK Vol 2 https://www.toutsimcities.com/downloads/view/1882

    I am attaching my script, to tell me where the syntax error is! ... Cleanitol_scoty_SBS_1-4.txt

    Thanks

    • Thanks 1

    What is good when you have nothing to say is that you can always pretend to listen. Anyway it does not prevent to think!

    >> My little plugins contribution << -- >> Depot | Fabrik | Testing <<

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    On 7/6/2024 at 11:00 AM, hugues aroux said:

    Hello,
    I wanted to try scripting to on the one hand clean the old files of a plugin (this part works perfectly) and on the other hand add the list of dependencies, there it gets stuck!

    The app reports that all the files are missing,

    668958908208f_Capturedcran2024-07-06164106.jpg.7e4cacf93014c8adbf1f04ba81d0427e.jpg

    except all of them are present in my plugins\ folder.. obviously, otherwise it wouldn't be funny (;-)!!!). I tested sc4cleanitol version 0.7 and 0.7.1 with the same result. I tested the script with BSC_Cleanitol -> all ok !

    i wrote .. typical line :

    
     Nams PROPS PACK Vol 2.dat;Nams PROPS PACK Vol 2 https://www.toutsimcities.com/downloads/view/1882

    I am attaching my script, to tell me where the syntax error is! ... Cleanitol_scoty_SBS_1-4.txt

    Thanks

    Thanks for the report! It does appear to be an error with the program, and I will have more time to look into it this weekend. *:)


    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:  
     
    10 hours ago, nos.17 said:

    It does appear to be an error with the program, and I will have more time to look into it this weekend.

    ah.. damn, ... I thought I made a big mistake, but for once, it's not me.. huhu.. so, I'll wait, I'm sure you'll sort it out for us by: "two spoons to pot”! as they say at home, at the end of the 19th century.. Courage and thank you for looking into the problem.

    • Like 1

    What is good when you have nothing to say is that you can always pretend to listen. Anyway it does not prevent to think!

    >> My little plugins contribution << -- >> Depot | Fabrik | Testing <<

    Share this post


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

    @hugues aroux please try the attached version. If that fixes your issues I will officially update the STEX and Github with the new version. You might also find some new features I was developing too... *:ninja:

    Also, I will update the documentation with an explanation, but any time you see [Unchecked Dependency] in a script you wrote it's a sign that something is wrong. You don't want unchecked dependencies. In this case it was also caused by a problem with the program and not anything you did. I fixed this too in the attached version.

     


      Edited by nos.17  

    Removed temporary attachment
    • Like 1
    • 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:  
     
    2 hours ago, nos.17 said:

    If that fixes your issues

    Hi, I just tested with the script submitted this week.. (drumroll..)... and it's perfect for me!!
    Nickel Chrome!! Thanks thanks !
    I will extend my script with other dependencies, and add this to my next post on STEX.
    I find the principle of public comment lines really useful and practical for structuring information for the user. I would add one or two points to the character size of the second type (in green). Personally, I would have put the "output details" function systematically. ;-) (no problem.. I'll keep it checked, that'll do it!!) .. Good idea: [Unchecked Dependency], absolutely essential during the preparatory tests of a plugin...!
    Ohoh.. new functions.. ?? ;-)
    Ah, I almost forgot.. in this zip, there are two files: SummaryTemplate.html!!??

    • Thanks 1

    What is good when you have nothing to say is that you can always pretend to listen. Anyway it does not prevent to think!

    >> My little plugins contribution << -- >> Depot | Fabrik | Testing <<

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    49 minutes ago, hugues aroux said:

    in this zip, there are two files: SummaryTemplate.html!!??

    Thanks for the confirmation! I'll get everything updated shortly!

    If you run a Cleanitol file that removes files from plugins and you remove them, they will be moved to the \Documents\SimCity 4\BSC_Cleanitol folder with a timestamp. Inside of that you'll find CleanupSummary.html which is a listing of all the files removed. That file is a template to create the CleanupSummary.html

    50 minutes ago, hugues aroux said:

    I would add one or two points to the character size of the second type (in green). Personally, I would have put the "output details" function systematically. ;-)

    To clarify, would you like an option to choose the size of a green text? Could you share an example picture of what you had in mind?


      Edited by nos.17  
    • 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
  • Original Poster
  • Posted:
    Last Online:  
     

    Version 0.8.0 is released

    Improvements include:

    1) Added the ability to scan additional folders outside of the two Plugins folder with a new option in the Settings panel.
    settings.png

    2) Improvements to the post run reporting messages (some messages were covered up by the status bar; also the report of dependencies found vs scanned was reporting the incorrect numbers)
    3) Misc other small fixes, including automatically detecting when updating the TGI index is required, and fixing to incorrectly classifying rules as unchecked dependencies

     

    Download from the STEX or visit the latest release on Github. Both versions are identical.

    • Like 1
    • 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
  • Original Poster
  • Posted:
    Last Online:  
     

    Version 0.9.0 is released

    Improvements include:

    • Better options for scanning combinations of plugin and additional folders
    • Ability to fetch rules from a remote HTTP URL with a new import rule type

    Download from the STEX or visit the latest release on Github. Both versions are identical.

    • 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:  
     

    Hello @nos.17!     i downloaded SC4 Cleanitol  0.9.0 , tried to use it but i got this message ..

    67442c7c7ce48_Screenshot2024-11-25094600.png.034daa11355ff12ccefa43878fc23775.png

    i tried to open settings but it doesnt open !  ..as i am not familiar with cleanitol , and generally with tech ..i would like to ask also if i made right the installation ..well actually i downloaded the file from Simtropolis and  following the Requirements  download the correct version.of NET7 runtime version > 7.0.0 (notice i use windows  11)

    After that i opened the folder SC4CleanitolWPF-0.9.0 and the subfolder net7.0-windows and i run the application SC4CleanitolWPF

    and i entered a a Cleanitol file  from a dependency pack..i run script and i get the above message!...i clicked on settings but it doesnt open !.... have i made any mistake during installation or do i make something wrong or what?..hope for help ! Thanx Antonis

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    6 hours ago, vetram said:

    i downloaded SC4 Cleanitol  0.9.0 , tried to use it but i got this message ..

    67442c7c7ce48_Screenshot2024-11-25094600.png.034daa11355ff12ccefa43878fc23775.png

    Make the BSC_Cleanitol folder first and the error should go away. Maybe, he didn't put some folder creation logic since he expected people coming from BSC's, which is understandable.

    6 hours ago, vetram said:

    download the correct version.of NET7 runtime version > 7.0.0 (notice i use windows  11)

    What you did is correct tho. It's again, the app wasn't designed to handle nonexistent folder. Hope he'll fix that.

    • Thanks 1

    Share this post


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

    Hello @nos.17!     i downloaded SC4 Cleanitol  0.9.0 , tried to use it but i got this message ..

    67442c7c7ce48_Screenshot2024-11-25094600.png.034daa11355ff12ccefa43878fc23775.png

    i tried to open settings but it doesnt open !  ..as i am not familiar with cleanitol , and generally with tech ..i would like to ask also if i made right the installation ..well actually i downloaded the file from Simtropolis and  following the Requirements  download the correct version.of NET7 runtime version > 7.0.0 (notice i use windows  11)

    After that i opened the folder SC4CleanitolWPF-0.9.0 and the subfolder net7.0-windows and i run the application SC4CleanitolWPF

    and i entered a a Cleanitol file  from a dependency pack..i run script and i get the above message!...i clicked on settings but it doesnt open !.... have i made any mistake during installation or do i make something wrong or what?..hope for help ! Thanx Antonis

    Hello! The fact you got this far shows that the .NET installation is not the issue and was set up correctly. *:)

    In your My Documents\SimCity 4\BSC_Cleanitol folder, is there a file called SC4Cleanitol_Error_Log.txt? Can you share what it says?

    • 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:  
     

    NO ! There is no such file in My Documents\SimCity 4\BSC_Cleanitol folder...in fact there is NO such folder also !...

    in your support you write.......'This is an open source application. The source code and issue tracker are posted here.'......perhaps should i had downloaded them also ?

    *:) Antonis

    Share this post


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

    NO ! There is no such file in My Documents\SimCity 4\BSC_Cleanitol folder...in fact there is NO such folder also !...

    in your support you write.......'This is an open source application. The source code and issue tracker are posted here.'......perhaps should i had downloaded them also ?

    *:) Antonis

    No need, that is where the source code for the program is saved.

    What if you create that folder yourself?


    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:  
     

    Hello @vetram and @Moxy I was able to test this out on a second computer and can confirm I am also seeing a crash when opening the settings panel.

    Please see if the attached test copy fixes the issue for you. If it does I will delete this attachment and fully update the program.

    (Update: file removed - issues fixed in the 1.0.0 release)


      Edited by nos.17  
    • Thanks 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:  
     

    Thank you. That fixed it for me.*:thumb:

    Share this post


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

    Thank you. That fixed it for me.*:thumb:

    Great thanks for the confirmation!


    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:  
     
    On 3/23/2025 at 2:35 PM, Allein said:

    The cleanitol crashes once the scan is done but before giving an output on the following txt input: https://www.sc4evermore.com/index.php/downloads/download/12-commercial/329-cogeo-logistics-centres-megapack

    Thanks for the report! Sorry for the delay - was on a bit of a vacation. Looks like there's an issue with the script where @Tyberius06 missed adding a url for where to download the Cogeo_LCP_Warehouses_BATProps v2.dat dependency from. However the program also should not crash in that case. This should be fixed now in the most recent release of 1.0.2. It also fixes another bug reported where certain removal rules for file extensions like .pdf were not working correctly.

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

    Hi @Gunzerino, copying your question here where it's easier to reply to:

    Quote

    Good tool! Can someone please guide me on how to use it?. Thank you! :thumb:

    What question do you have about it? I created a short user manual which goes over some of the features of the tool. The program works by running a text file (or script) some authors include in their mods. Presumably you have something you downloaded that contains a Cleanitol script? Otherwise, there is one script included with the program called CleanupList.txt that you can run with the program and it will remove all non-SC4 files from Plugins (documents, readmes, images, etc.).


    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:  
     
    20 hours ago, nos.17 said:

    Hi @Gunzerino, copying your question here where it's easier to reply to:

    What question do you have about it? I created a short user manual which goes over some of the features of the tool. The program works by running a text file (or script) some authors include in their mods. Presumably you have something you downloaded that contains a Cleanitol script? Otherwise, there is one script included with the program called CleanupList.txt that you can run with the program and it will remove all non-SC4 files from Plugins (documents, readmes, images, etc.).

    Hi @nos.17, I have a problem with Sim Goober Auto Factory not showing ground textures, so I want to run the program to see what dependencies I'm missing but I don't know where to find the cleanitol script for this. Thanks in advance

    Share this post


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

    Hi @nos.17, I have a problem with Sim Goober Auto Factory not showing ground textures, so I want to run the program to see what dependencies I'm missing but I don't know where to find the cleanitol script for this. Thanks in advance

    Looks like there's no cleanitol file included for that lot unfortunately. Some mod authors include them; many do not. Make sure you have all the texture dependencies listed for the base IRM, but by looking at the lot my guess is this is the one you're missing.


    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