Quick Reply
Search this Thread
Senior Moderator
staff: senior moderator
Original Poster
#1 Old 16th Feb 2026 at 4:57 PM
Default S3PI - Code Snippets
Like the Code Snippet Jar thread for Sims 3 modding, here is a thread for information and code snippets for those working with S3PI for Sims 3 tools.

You can read more about and download S3PI from here.

It's also hosted on GitHub here.

[to be continued...!]
Lab Assistant
#2 Old 16th Feb 2026 at 5:54 PM Last edited by Destrospean : 16th Feb 2026 at 6:09 PM.
Alright, so I guess the first thing that should be mentioned is that Windows like to "block" downloads, and the wrappers for S3PI don't work unless they're unblocked. Many users use the default Windows archive extractor, which extracts all the contents of a blocked archive as blocked, and many of them come complaining, so I found a technical solution to this which is to unblock the contents of the folder of your program.

Below I have a class for platform-specific things, which is needed to determine whether a user is on Windows, so as to only unblock on Windows, as it'll throw a fatal exception on other platforms:


Notice in the above snippet the "FileUnblocker" subclass.
This should be called for everything within the program's folder when the program first launches, as follows:
Code:
if (Platform.IsWindows)
{
    foreach (var filename in System.IO.Directory.GetFiles(System.AppDomain.CurrentDomain.BaseDirectory))
    {
        Platform.UnblockFile(filename);
    }
}
Back to top