S3IO: In-Game File Access API for Script Modders
s3io.png - width=1920 height=720
vanity2.png - width=1448 height=628
vanity1.png - width=1280 height=971
Native I/O bridge for The Sims 3. Gives script mods the ability to read and write files from inside the game.
Source code & full documentation on GitHub
Why S3IO?
The Sims 3 runtime is sandboxed and does not include System.IO. Previous community solutions relied on a "delay_ms" parameter that often requires fine tuning per machine. S3IO eliminates timing dependence entirely — no configuration file, no delay tuning, no per-machine adjustment. Just install and go.
Getting Started
Requirements
- An ASI loader in your game's Bin directory (ddraw.dll — the same one used by other ASI mods like the Smooth Patch). One is included in the download.
- The Sims 3 with any combination of expansion/stuff packs.
Installation
- Copy ddraw.dll and S3IO.asi to your game's Bin directory (e.g. C:\Games\The Sims 3\Game\Bin\). If you already have a ddraw.dll from another mod, skip it — they're the same ASI loader.
- Copy S3IO.package to your Mods folder (e.g. Documents\Electronic Arts\The Sims 3\Mods\Packages\).
- Delete scriptCache.package from your Sims 3 user directory if it exists.
- Launch the game. S3IO initializes automatically.
For Modders
Reference S3IO.dll at compile time and you're good to go:
/r:"path\to\S3IO.dll"
using S3IO; // Read a file string text = ModIO.File.ReadAllText(@"C:\path\to\file.txt"); // Write a file ModIO.File.WriteAllText(@"C:\path\to\file.txt", "Hello world");
S3IO initializes itself — just call ModIO.File.*, ModIO.Directory.*, or ModIO.System.* and it handles the rest.
Do not copy S3IO's ModIO or FunctionTask classes into your own mod. Reference S3IO.dll as a shared dependency. Copying them creates a second IPC buffer that the native side can't reliably distinguish from the real one.
ModIO.File
bool exists = ModIO.File.Exists(@"C:\path\to\file.txt");
byte[] data = ModIO.File.ReadAllBytes(@"C:\path\to\file.bin");
string text = ModIO.File.ReadAllText(@"C:\path\to\file.txt");
ModIO.File.WriteAllBytes(@"C:\path\to\file.bin", data);
ModIO.File.WriteAllText(@"C:\path\to\file.txt", "Hello");
ModIO.File.AppendAllBytes(@"C:\path\to\log.bin", data);
ModIO.File.AppendAllText(@"C:\path\to\log.txt", "New entry\n");
ModIO.File.Delete(@"C:\path\to\file.txt");
ModIO.Directory
bool exists = ModIO.Directory.Exists(@"C:\path\to\folder");
ModIO.Directory.Create(@"C:\path\to\folder");
ModIO.Directory.Delete(@"C:\path\to\folder", false); // non-recursive
ModIO.Directory.Delete(@"C:\path\to\folder", true); // recursive
List<string> files = ModIO.Directory.GetFiles(@"C:\path\to\folder");
List<string> dirs = ModIO.Directory.GetDirectories(@"C:\path\to\folder");
ModIO.System
string docs = ModIO.System.GetDocumentsPath();
All file/directory methods return true/false for success/failure. Read methods return null on failure. List methods return an empty list on failure.
| Filename | Type | Size |
|---|---|---|
| S3IO_v1.0.zip | zip | |
| ddraw.dll | dll | 2160128 |
| README.md | md | 6556 |
| S3IO.asi | asi | 128512 |
| S3IO.package | package | 6402 |
|
S3IO_v1.0.zip
| Initial version of S3IO
Download
Uploaded: 6th Sep 2026, 1.11 MB.
34 downloads.
|
||||||||
| For a detailed look at individual files, see the Information tab. | ||||||||
Install Instructions
Loading comments, please wait...
Uploaded: 6th Sep 2026 at 1:05 PM
#utilities, #file access, #System.IO, #mod tools
-
by darren111 updated 5th Jul 2022 at 9:50am
32
23.5k
76
-
by YolkSims updated 8th Jul 2022 at 6:28am
29
75.8k
127
-
by echoweaver updated 12th Jun 2023 at 2:56am
+1 packs
40 25.4k 88
Pets
-
by echoweaver updated 27th Aug 2023 at 2:36pm
18
27.1k
85
-
by fantuanss12 updated 29th Aug 2026 at 1:22pm
47
42.3k
142
-
by Arro updated 19th Jul 2025 at 8:33am
13
21.5k
56
-
by LORHANDAGOTH updated 28th Aug 2026 at 10:52am
17
6.5k
13
-
by LORHANDAGOTH updated 4th Sep 2026 at 4:23am
46
11.7k
39
-
by LORHANDAGOTH updated 4th Sep 2026 at 4:30am
37
7.3k
24
Sign in to Mod The Sims
S3IO: In-Game File Access API for Script Modders