Yet Another Package Editor
Download the latest version here
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:
Enjoy :)










