Allow Store Content From Packages

SCREENSHOTS
Downloaded 82 times 26 Thanks 5 Favourited 1,173 Views
 Say Thanks!
This mod REQUIRES Lazy Duchess's (excellent) MonoPatcher.

Preamble
It is beneficial for performance to merge many small package files into few large package files. This holds true for store-content.
The downside of this, for store-content, is that when store-content is installed via package files in the game's "Mods" folder, the game considers the store-content to be custom-content.
This makes it difficult to find custom-content as the store-content will be wrongly displayed, sorted, and categorised as custom-content.

What this mod does is it allows the game to consider content installed via package files in the "Mods" folder to be store-content.

What this mod does
This mod allows the game to classify content installed via package files in the "Mods" folder as store-content, instead of only as custom-content.
In lieu of a thousand words, please see this picture:


With this mod installed, store-content installed via package files in the "Mods" folder will be displayed, sorted, and categorised as store-content in Create-a-Sim and in the Build/Buy Catalog.

How this mod works
Package files are basically a collection of resources, with each resource having a unique-ID.
Each ID consists of three numbers: the resource-type; the resource-group; and the instance-ID.
The resource-group is used to identify, roughly, where the resource originates from: for example, which expansion/stuff pack it came from, or if it came from the store.

Internally, the game uses the 24th binary-bit of the resource-group to determine if a resource is store-content or not—but it does so only for content installed via the launcher.
So, what this mod does is simple: it extends that logic to apply to content installed via the "Mods" folder.

Caveats
This mod works only for legitimate store-content, it will not and cannot work with "decrapified" store-content: this is because decrapified store-content is broken store-content.
The reason for this is that decrapified store-content is store-content which has had the 24th binary-bit of the resource-group of each resource's ID set to zero, thus preventing the game from using that bit to classify the content as store-content.

Additionally, this mod does not work for lots installed via package files in the "Library" folder, this is because I couldn't find any metadata for signalling whether a lot came from the store or not.

Lastly, as store-content is classified as such based on the presence of a single binary-bit, and as it is possible for custom-content to set this bit in their resources' resource-group, some custom-content may be falsely classified as store-content instead of as custom-content.

Compatibility
As a pure script mod, this mod should be compatible with most everything, with the sole exception of other mods that use MonoPatcher to replace any of the following methods:
  • ScriptCore.DownloadContent::GetContentCategory(Sims3.SimIFace.ResourceKey)
(At the time of writing, no such other mods are publicly available).

Installation
First, ensure that you have installed Lazy Duchess's (excellent) MonoPatcher: only MonoPatcher's package file is required, the ASI file is optional.
Then, this mod can be installed as any script mod usually is, which is by moving the mod's package file into the "Mods\Packages" folder.

Uninstallation
This mod can be safely uninstalled at any time by deleting the "just-harry-allow-store-content-from-packages.package" file.

Performance impact
This mod has no perceptible impact on performance.

Licensing
Allow Store Content From Packages for The Sims™ 3, and its accompanying documentation, is distributed under the Zero Clause BSD License.

Acknowledgements
Lazy Duchess for MonoPatcher, which makes this mod possible. (And also for their Catalog Search Mod, which made taking the screenshots for this mod much easier).
Peter Jones, Inge Jones, and all contributors for the s3pi library which was used to build the package file for this mod.
An unnamed Discord user for nudging me into releasing this mod roughly fourteen months after I made it 🙈.

This mod REQUIRES Lazy Duchess's (excellent) MonoPatcher.
Advertisement:
Other Download Recommendations:
More downloads by Just Harry: See more