A small C# utility for The Sims 3 modding that automatically imports your compiled script and resources into a Sims 3 .package file immediately after building in your IDE.
- Compile: Build your project normally in your IDE.
- Locate & Replace: The tool scans your
Modsfolder for an existing package. If found, it deletes it to ensure a clean slate. If it's a first-time build, it preps a fresh path (defaulting to aPackagessubfolder unless-defaultPathis used). - Import Resources: It reads your
nameMap.xmland automatically packs all declared assets from yourresourcesfolder (including subfolders). - Inject Script: Your newly compiled DLL is embedded into the
S3SAresource. - Localize: The tool detects any string tables (
.stbl) in your resource directory, automatically mapping and injecting them with the correct language codes based on their filenames.
-
Download the latest release from the Releases page.
-
Extract the Tools folder directly into your project's solution directory.
-
Extract the Resources folder from the ZIP into your Project directory (next to your
.csprojfile).- This folder contains
nameMap.xmlandnameMap.xsd. - Keeping them here allows some IDEs to provide autocomplete and documentation popups automatically.
See Project Structure Example section below
- This folder contains
-
In your Mod project, go to Properties > Build Events > Post-build event and paste:
"$(SolutionDir)Tools\ts3buildtool.exe" -modName="YourModName" -dllPath="$(TargetPath)" -projectDir="$(ProjectDir)" -
Change modName to your preferred filename; this name is used as the name for the created package file.
-
(Recommended) Ensure Resource Changes Trigger Rebuilds: By default, IDEs only track C# file modifications for builds. If you modify a resource file (like an XML) without changing any code, your IDE might skip the build entirely, preventing the tool from running and package building. To fix this, open your
.csprojfile and add the following item group:<ItemGroup> <UpToDateCheckInput Include="Resources\**\*"/> </ItemGroup>
.
├── YourSolution.sln
├── Tools/
│ └── ts3buildtool.exe <-- The tool
└── YourProject/
├── YourProject.csproj
├── Resources/
│ ├── nameMap.xml
│ ├── nameMap.xsd
│ ├── XML/
│ │ └── Tuning.xml
│ ├── UI/
│ │ └── Layout.layout
│ ├── Strings/
│ │ ├── MyMod_ENG_US.stbl
│ │ └── MyMod_FRE_FR.stbl
│ └── Icon.png
└── Scripts/
└── MyModScript.cs<resources>
<!-- S3SA (Script) to be added -->
<resource name="YourNamespace.YourClassName" type="0x073FAA07" />
<!-- XML containing a [Tunable] field -->
<resource name="YourNamespace.YourClassName.YourStaticConstructor" type="0x0333406C" />
<!-- Standard Resources -->
<resource name="Tuning" type="0x0333406C" />
<resource name="Layout" type="0x025C95B6" />
<resource name="Icon" type="0x2F7D0004" />
<!-- STBL Wildcard for Localization -->
<resource name="*.stbl" type="0x220557DA" />
</resources>The tool can automatically pack multiple string tables for your mod and generate the correct Instance IDs based on the locale language code and your mod's name hash.
- Name your files correctly: Save your
.stblfiles so they end with a valid Sims 3 locale code (see the table below).- Example:
YourModName_ENG_US.stblorYourModName_POL_PL.stbl
- Example:
- Update your XML: Add
<resource name="*.stbl" type="0x220557DA" />to yournameMap.xml. - Build: The tool will automatically find all matching
.stblfiles in yourresourcesfolder (and subfolders) and inject them with Instance IDs aligned to your mod's base hash.
Append one of the following codes to the end of your filename before the .stbl extension. (Note: The tool is case-sensitive, so lowercase codes like _eng_us.stbl will not work).
| Locale Code | Language |
|---|---|
_ENG_US |
English (US) |
_CHS_CN |
Chinese (Simplified) |
_CHT_CN |
Chinese (Traditional) |
_CZE_CZ |
Czech |
_DAN_DK |
Danish |
_DUT_NL |
Dutch |
_FIN_FI |
Finnish |
_FRE_FR |
French |
_GER_DE |
German |
_GRE_GR |
Greek |
_HUN_HU |
Hungarian |
_ITA_IT |
Italian |
_JPN_JP |
Japanese |
_KOR_KR |
Korean |
_NOR_NO |
Norwegian |
_POL_PL |
Polish |
_POR_PT |
Portuguese (Portugal) |
_POR_BR |
Portuguese (Brazil) |
_RUS_RU |
Russian |
_SPA_ES |
Spanish (Spain) |
_SPA_MX |
Spanish (Mexico) |
_SWE_SE |
Swedish |
_THA_TH |
Thai |
The tool uses named parameters, so the order of arguments does not matter.
| Parameter | Description | Example |
|---|---|---|
| modName | The filename of your package (without .package). |
-modName="Arro_MCR" |
| dllPath | Path to the compiled assembly. Use the IDE macro. | -dllPath="$(TargetPath)" |
| projectDir | (Optional) Explicit path to the project directory containing your resources folder. If omitted, the tool attempts to auto-discover it based on the tool's .exe location. |
-projectDir="$(ProjectDir)" |
| defaultPath | (Optional) Sub-folder in the Mods directory to create the package if not found. |
-defaultPath="Packages/MyMod" |
| skip | (Optional) Folders to ignore when searching the Mods directory (comma or semicolon separated). |
-skip="Backups,Old" |
- This tool uses the s3pi library (Copyright © 2009 Peter L Jones).
- Distributed under the GPLv3 license as a derivative work.