Find any texture in The Sims 2 that is too big, or is 'awful' (suboptimal texture format)
Features:
Find textures in any folder you choose
Filter by width, height, memory size, texture format, or number of mipmap levels
Preview and show details of textures the tool found
Remember 'known good' textures, which are optionally excluded from being shown in the list
Look up the path of the package, and the group and instance of the resource
Copy texture/resource details (right click)
Open the package in the default package editor (double click)
Dark mode/light mode and UI scale adjustable
Native on both Windows and Linux
Why?
The Sims 2 has had a long-standing problem known as 'pink flashing' or 'pink soup' when using too much custom content. The Sims 2 is a 32-bit program, which means that it normally has a maximum memory limit of 2GiB (2048MiB) and by using a so-called '4GB patch' you can raise this limit to -you guessed it- 4GiB, this limit might seem pretty large, but due to how the game works you might hit this limit sooner than expected!
Let's say you have 1024x2048 textures (which is the default for Sims 4 textures, and thus also often for 4to2 cc) in RGBA format, these textures will EACH take up 8MiB of texture memory! This means you could possibly only have only a MAXIMUM of 512 textures loaded in memory before you run out of memory completely. In practice, this limit will probably be lower due to other factors.
This tool will help you find textures that take up too much texture memory, and thus (hopefully) help alleviate some amount of pink flashing.
Tutorial
First, download the program from the link above and follow the instructions to open the program.
Now let's get the program looking the way you want: click on the sun/moon button on the top left of the program to switch light/dark mode and click the "UI Scale" number next to it and enter a new number to change the size of the interface.
Set the folder we want to search: at the top bar, search for the 'Downloads:' bar, then at the end click the button with the folder icon and select your folder. Once you've selected a folder the program will instantly start scanning, if you want to restart this scan then at any time you can click the text in the Downloads bar and press enter.
Currently this list will show all textures in the scan folder, which is probably not very interesting. To find some more interesting textures we can add some filters to the texture list. On the top bar, click on the 'Filter' button: this will open the filter list and it will be empty if you haven't added any filters previously.
These filters filter the texture list one by one, each filter removing more textures from the displayed list of textures. To add a filter, click the plus button, and to remove it click on the trashcan button at the start of the line.
To edit a filter, click on the first box to choose the filter type, click on the second box to choose the type of comparison, and select the number in the last box to set the number to compare with.
The comparison type can be < (smaller than), <= (smaller or equal), > (greater than), >= (greater or equal), == (equal), or != (not equal).
The Format filter is different: make a format filter, then click on the 'choose' button and choose the texture formats that you want to show in the texture list.
Let's edit some textures!
In the texture list, find a texture that you think is too big, and either double click on it to open it in the default package editor or right click on it to show a menu to copy the details of the package.
Finally, once you have the package opened in your favorite package manager, edit the texture to be smaller and/or a better texture format, save and ta-da! your game will now use less texture memory.
YaPe is a modern package editor for DBPF (.package) files
Features:
Edit any package - FAST
List and edit resources in a package
Filter resources by type
Easy editors for several resource types
Supports opening ANY DBPF-coded .package, .dat, or .sc4 file
Easily reduce texture size, add/remove/recreate mipmaps, change texture format
Import textures by dragging, export DDS
Native on Windows and Linux
Why make yet another package editor?
Simply said, because SimPe can be kind of cumbersome especially on Linux, and package editors other than SimPe (s3pe, s4pe, iLive's Reader etc.) do not support Sims 2 resources.
To illustrate, I timed someone shrinking a texture (convert RawARGB32 -> DXT1, shrink 2x) in both SimPe and YaPe:
SimPe + GIMP: 1m 30s
YaPe: 10s
Originally this started as just a way to easily test if my DBPF library was doing the correct thing, but over time it has grown to become a half-decent editor suitable for more general use.
Tutorial / usage tips
Here I will explain how to shrink and convert textures in YaPe because that's what I imagine most people will use this program for right now, but of course you can use it for other things as well.
Let's get started by getting the program to look the way you want to: use the options in the top left to change the scale of the interface and switch between dark and light mode.
Now drag a package file into the program (don't worry about closing the sims except when you save the package), a list of resources in the package will be visible. You can find out what the abbreviations mean by hovering your mouse over them; in general I try to add tooltips like this to buttons or options that are unclear.
Don't be afraid to mess around and make changes! The changes you make are never saved unless you press the save button, so if you simply drag your package file into YaPe again without saving you will get your original package back (there is currently no undo function, but it is a planned feature).
All these resources are great, but we're only interested in the textures for this tutorial so let's set a filter. Right click on a texture (TXTR) and select "Filter on type".
Great! Now you can only see the textures we're interested in. You can disable this filter by unticking the "filter" option at the top.
Now click on the "TXTR" to open the texture, it will open a new tab in the lower half of the window by default. If your window is not very big (like mine is for this tutorial) you might have trouble seeing the texture and all the options. You can drag the tab around and put it somewhere else in the program, I'm going to put it on the right and make it a little bigger so we can see what's going on.
Okay, now we can see all the options, and well... there's a bunch of them. We'll go over some of the options that you'll likely want to use but feel free to experiment of course.
First, let's have a look at the texture viewer at the bottom: you can zoom in on the texture by holding control and scrolling, and you can change which mipmap is displayed by clicking the radio buttons above the texture.
But wait, this texture does not have enough mipmaps to show up in game! (post by @pforestsims) Let's fix that right this instant by clicking the "Add missing mipmaps" button in the middle.
Okay, now the mipmaps will show up in game, which is good... except that this mipmap is really blurry. (post by me) Luckily we can fix this really easily, just click the "Recalculate all mipmaps" button.
Much better!... except that we've created a new hidden problem: the leaves will disappear when zooming out in game (blog by lisyarus) but even this problem can be fixed. We can actually preview what the texture will look like when zoomed out by switching the format to DXT1 since DXT1 has binary transparency, just like alpha tested textures like leaves and grass.
Right, so the leaves have a bunch of holes that don't look right when zooming out, let's change that. Above the "Add missing mipmaps" button there is the "Preserve transparency" slider: try changing it to something like 120-170 and click "Recalculate all mipmaps", you can see that the transparency changes, if it's still too thin/transparent set the value higher and recalculate again and so on.
Have a look at all the mipmaps (zoom levels) and once you're satisfied with the transparency change the format back to DXT5.
This texture will now look great in game! But it is also quite large, so we can reduce the size 2x smaller without sacrificing very much in terms of looks (sorry to all the cc authors who love their large textures). Click the "Remove largest texture" button, which will make it so that the first mipmap becomes the largest texture effectively reducing the size by 2x. Like mentioned it does use the first mipmap so make sure to fix any blurry mipmaps first.
You can repeat the same process for the other textures in the package, and then we're done. Save the package by clicking the save button in the top bar, and have a look in game at your beautiful textures.
Another option is to drag images/textures you've made somewhere else into the program (with special support for dds files), for a full lists of supported image formats you can look here. (image-rs documentation) The image/texture will currently go into the firsts open texture resource tab because of UI framework limitations.
Here's a look at some of the other editor currently implemented:
Or if you want to for some reason you can download this specific version here
Try the web version here
New web version!
Display meshes and bounding meshes
Normal, tangent, and uv (texture) data
Wireframe mode
Performance information
Change subset names and opacity values
Test morph shapes
Export and import resources
You can export resources by right-clicking on the resource name, the same place where you open the resource by left-clicking. Importing resources works by dragging the resource file into the editor (the resource that will be replaced will show a box around it while hovering).
This update has been a long time in the making, and there is a lot of stuff that I still want to create and improve, but I have decided that the state that it is currently in is good enough to be usable for now, and that delaying the release any further would not make much sense.
GMDC display has been consistently a pain point for people playing the Sims on Linux, and with this update I hope to have improved the situation somewhat. I also made sure to add resource export and importing functions, so that those who can't get the SimPe mesh functions to work on Linux can still work with meshes.
As I said, I wanted to add a bunch more features to this update, but right now it seems that I will have to make some large refactors before I can do that, which will take some time to complete. With that I would like to ask you all: should I work on some smaller editors (sim descriptions, bhav constants, other 'smaller' resources) before starting the large refactor, or should I get it over with to work on larger features?
Should I work towards bigger updates, or do a couple of smaller updates first?
Start the large refactor for big updates (BHAV etc.) (might take 2-3+ months)
Do some smaller updates first (sim desc., BCON, etc.) (1-2 weeks per update)
Or if you want to for some reason you can download this specific version here
Try the web version here
Hair binner fix!
Some time ago it was reported that packages compressed by Yape don't work correctly in hairbinner. (post by @pforestsims)
Luckily, thanks to a user report this issue is now fixed, meaning you can now again use Yape in combination with hair binner without any problems.
The problem was a bad value in the compression header, meaning some programs couldn't read the compressed data correctly.
Unfortunately, this does mean that some packages are affected:
How many packages are affected?
All packages compressed through previous versions of Yape are affected.
What programs are affected?
The only known programs that use this header value are hairbinner and older versions of @picknmixsims's programs. Official Sims programs ignore this header value completely, and are not affected.
What can I do to fix the packages?
Although most packages don't need fixing as they will not be used with hairbinner, you may still want to fix the compression header for for example uploaded packages. To fix them you can simply recompress them by using a tool like the compressorizer.
Other changes:
MaterialShader editor with syntax highlighting
fixed a bug when exporting TXTR resources to .dds that have a greater than 1:2 aspect ratio
fixed UI scale and theme settings resetting when opening the program
IMG resource viewer and import
Notes on IMG: these resources are raw PNG / JP(E)G / TGA files, so export works as normal by right clicking the resource.
When importing (drag your file into the editor) Yape will also simply use the raw file contents, so if any problems arise you might need to use a different format or save your images in a different way before importing.
As mentioned in my previous post, I'm now doing my internship which means that my time is very much limited. Bugfixes like this will still come, but major updates will probably not be in the works for a while unfortunately.
That said, with Paralives coming out soon I'm sure many of you will be spending a bit less time with TS2 too, so:
With Paralives coming out soon, how much will you be playing TS2?
I'll play TS2 just as much as I always have
I'll check it out but I'll be back to TS2 soon, maybe I'll play it occasionally
I'll probably play about 50:50 of both
I'll play mostly Paralives from then on, but I'll come back to TS2 occasionally
I'll be completely done with TS2 after Paralives comes out
Or if you want to for some reason you can download this specific version here
Try the web version of Yape here
Download the latest Batl here
Or if you want to for some reason you can download this specific version here
Updater
Rework of the "UI Scale" thing to make it work the same in all apps
Sorting of columns in Batl
Batl will display memory size as ... kB and ... MB instead of the raw number of bytes
Batl got some small performance improvements
The SDSC editor in Yape will now remember the opened sections
Happy Christmas everybody! Now for your present, it's updates! Or an updater, to be exact. Yape & Batl can now check for updates, download, and install them, all from within the program. This was (in theory) slightly easier than I initially expected, as the packaging system I'm using (cargo-packager) has support for it natively. Of course there were still a fair share of troubles actually implementing the system in practice (it can't ever be that simple can it).
I've noticed that sometimes people aren't sure where to leave feedback or ask questions. My DMs are always open, but I'm thinking that maybe having something like a discord server might make it easier for people to get help, share suggestions and the like. That said I'm worried about two things: 1. locking useful information inside a non-google-able server and 2. having to keep track of Yet Another Server, since there are quite a few sims 2 discord servers already. That said, I'd love to hear your thoughts.
Would you appreciate a dedicated discord server for my stuff?
Or if you want to for some reason you can download this specific version here
Try the web version here
You can now reorder lists by dragging the ↕ handle (such as in 3IDR)
Alpha textures can now be previewed with different base colours
SimDescription editor with ALL fields available
I have a secret list of features that I have seen people ask for, and this update I've plucked some items that I thought would be quick and easy from that list and implemented them.
Unfortunately the SimDescription editor turned out not to be so quick and easy after all. While writing the parser I found several details about the file format that even SimPe isn't parsing correctly, meaning my testing setup is working pretty well (in my opinion).
You may notice there is currently no easy way to find the name of the sim you're viewing, as this information is actually in the individual sim package files (as a CTSS resource) and there is no way for me to access these until after 𝓣𝓱𝓮 𝓑𝓲𝓰 𝓡𝓮𝓯𝓪𝓬𝓽𝓸𝓻™ unfortunately.
Anyways, time for the update poll: you may have noticed that there is now a web version, but there is no mac version. The reason is simple: I simply don't own any mac devices meaning even if I were to make a mac version I have no way of testing if it actually works, so if you want to see a mac version happen and you can do long-term testing then message me please.
What OS do you play The Sims on, and do you consider yourself technical?
Or if you really want you can download this specific version here
first of all, thank you for all the encouragement in the release post, and most of all thank you to the people that reported problems, asked questions, and gave suggestions, that kind of feedback is really great to help make future versions even better.
I'll try to keep it short, so without further ado here is the changelog:
changelog
bug fixes and improvements
okay maybe not that short ;)
add a 'scan again' button
prevent flashing of the texture popup; this was potentially a pretty serious accessibility concern for people with epilepsy so I've spent quite a while trying out different ways to make it work. The current system is not perfect but it works
put most crashes in the error log instead of discarding them
use the amount of mipmaps when calculating memory, which might be wrong because the game could potentially unload larger textures when zoomed out. If that's the case I'll have to change it again
reduce memory usage by a considerable amount
some small UI tweaks ect.
With that out of the way I want to introduce what I hope to make a persistent feature of my update posts: polls! I'm not too familiar yet with the sims 2 modding communities that exist here on tumblr and in general, and sometimes I want to ask what people find most important and thus what I should focus my effort on, so I'm going to add polls to most of my updates.
Anyways, here is the first poll!
Should I put these kinds of updates on a separate blog?
No, keep all updates on this blog no matter how small
Yes, but if there is a large new feature then still put it on this blog
Yes, put ALL updates on a separate blog even if they're big updates