Releases: Torphedo/Esper-RE
ALR 0.7.0
New in this release:
- BC2 textures are now supported
- BC1 and RGBA8 textures are now dumped reliably by default
- Real texture names are now available for all textures, using a newly discovered string encoding also used in SSB files
- Textures are now dumped to separate folders for every ALR, since many map textures have standardized names (like
envmap.dds
for cubemaps) - Cubemaps now dump correctly and account for the game's padding
- Large internal refactoring,
--split
mode hasn't been tested but I don't think anyone is using that
Known bugs:
- Replacing cubemaps won't account for padding as expected by the game
Special Thanks:
Vu314
for their reverse-engineering work on SSBs, without which I never would've figured out ALR texture names
Deck Editor Bugfix
New in this release:
- Fixed a buffer overflow where a very long name could corrupt the first 2.5 skills of the deck
- Fixed a misleading message implying that the program was about to exit
- Added
--help
and--version
command-line arguments
TUI Deck Editor
- Rewrote the deck reader program
- It now supports editing almost any field
- Usage is still drag-and-drop. If you still only need it to view a deck, you can just type
q
and then Enter and it'll behave like before.
Batch Dumping
New in this release:
- Dumped textures will have their filename prefixed with the ALR's filename. This allows for dumping in mass without overwriting old results.
Bug Fixes
Minor Refactoring & Texture Replacement
I completely forgot to mention it in the notes of the last release (should be updated now), but texture replacement is now possible using the --replace
flag. The logic is very simplistic: it just looks for a textures/x.dds
file where x
is the texture index, and copies over as much image data as possible. If you're working with multiple ALRs, be careful to delete the texture dumps from other files.
Unlike the last release, you can specify the output ALR filename instead of it being hardcoded to out.alr
. The order of the filenames and options doesn't matter, so these are all valid:
alr --replace input.alr output.alr
alr input.alr --replace output.alr
alr input.alr output.alr --replace
Cubemap Support
New in this release:
- Cubemap textures have basic support
- Mipmaps are now enabled in brute force dumps, if the texture format/resolution guessing hasn't gone completely wrong.
- Basic texture replacement with the
--replace
flag. Currently hardcoded to write toout.alr
Thanks to blasianblazy
for showing me that there were not only multiple, but 6 textures in one of the ALR texture buffers. Without this, I have no idea how long I would've taken to notice. All stages have these cubemaps (I thought they were stage previews before).
Note: all textures in a cubemap after the first will start with black blocks and look corrupted because of leftover padding bytes. Each texture in the ALR is padded to the next 0x100
boundary. Stage cubemaps seem to be 64x64, so you can fix this by hex editing out the 5 chunks of 0x50
blank bytes you see in the DDS file after scrolling for a while. Don't bother removing the chunk at the end, it doesn't help at all and can really easily break the DDS file.
This is a bit of a glaring issue, but I just wanted to get a release out for Blazy to tinker with.
Everything From The Last Year
I just realized that I haven't made a release since January of last year. Here's all the changes I can remember right now:
- Textures can now be dumped without explicit filenames and dimensions being provided by the ALR. I've found a way to reliably guess the resolution of most raw image data, allowing us to guess the format based on pixel size. This lets us access stage textures, player/enemy/boss textures, and lots of others I'm forgetting. It turns out that most ALRs don't have any of the extra data I was relying on.
- BC1 & BC3 (
DXT1
&DXT5
) compressed textures are now supported. This allows exports of the player & enemy base color textures, and as well as stage base colors and normals. As far as I know, these are the only compressed formats they used. - 16-bit single-channel/greyscale textures are now supported, and all 16bpp textures are assumed to be greyscale. This allows the last of the player textures to be dumped, which look like shadow maps of some kind?
- Textures whose format and size was guessed without metadata will be in a new
textures
folder. Textures that had names inside the ALR will dump to the same folder as the tool. This shouldn't be a problem because most named textures have their ALR name in them (likeFDLogo4600.dds
fromFDLogo.alr
). - Files created in
--split
mode will now go into aresources
folder. Chunk data is named[x].bin
, and raw texture data is namedresource_[x].bin
. Raw texture data can be uploaded to tools like rawpixels.net to play with different pixel formats. The site linked doesn't support compression, so if anyone knows something similar with BC1/BC3 support, let me know. - Removed animation data dumping. All the structures are still in the source code, but I removed this while refactoring a while ago. I'll probably add this back soon when I start to focus less on textures.
- Renamed tool from
alr_parser
to justalr
Note: some stage normals (like those on Refinery) have an alpha channel, which is pretty strange. These usually leave only glass surfaces visible, so they might be used for something else in the game shaders and not really be alpha data. This also applies to cubemaps and what I think are pre-baked lighting maps. If you see a texture that looks blank, try disabling the alpha channel.
TODO:
- Add back "stream dumping", which dumps all data from specific chunk IDs into their own files (e.g. all
0x3
chunks are dumped tostreams/0x3.bin
). This was a feature recently but got removed during refactoring. - Add texture replacement. This will probably just come in the form of blindly overwriting image buffers at first, but resolution changes should be possible. Format changes are unlikely to work, but might be possible depending on how the game renderer handles textures.
The Windows build was built with Zig and tested in Wine, please let me know if it crashes or breaks.
Generic Resource Dump
New in this release:
- The dimensions and size (in bytes) of each surface will now be printed out in
--dump
mode - The final texture in an ALR file will now be dumped using a newly discovered relative offset in the file header, rather than by checking against the ALR's filesize
- All resources will now be dumped to
resource_[index].bin
in--split
mode. This allows raw texture data to be dumped, even if no known texture metadata was found in the file
Argument Rewrite
New in this release:
- Rewrote argument parsing code
- Arguments and filenames can now be passed in any order, the last filename passed in will be used and all previous ones ignored
- Added a
--silent
flag that disables all printing to the console - Added
--tga
and--dds
flags, to give the user a way to access both the TGA and DDS output code. Outputting as TGA will not change the filenames, so you'll still need to runren *.tga *.dds
or rename each DDS individually to open the outputted TGA files. - Added a
--dump-images
flag, which doesn't do anything right now. If any arguments are passed other than a filename, it will automatically default to what used to be the--dump
flag.