08-04-2023, 06:29 AM
(10-17-2021, 06:06 PM)boilingpot Wrote: Eastward has super charming, Earthbound-inspired pixel art, so I knew I had to get my hands on it. The organization part of ripping from it is hard though, so here is a tutorial in the meantime.
Edit: Eastward Extractor (https://github.com/Dav-e-Jones/EastwardExtractor) is the better method, especially because it preserves the transparency of the sprites. You need .NET core 3.0 for it to run, though.
- The \content\game folder has gfx.g and gfx_main.g archives that contain graphics.
- Use the following BMS script [1] on one of those files:
Code:comtype zstd
get DUMMY long # 0x6a37
get FILES long
for i = 0 < FILES
get NAME string
get OFFSET long
get ZIP long # 2
get SIZE long
get ZSIZE long
if ZIP == 0
log NAME OFFSET SIZE
elif ZIP == 2
clog NAME OFFSET ZSIZE SIZE
else
print "Error: unsupported ZIP %ZIP%, contact me"
cleanexit
endif
next i
- The result is a bunch of files and folders named something like 0b943feca0857d39c68014b67089e7e0. Unfortunately, this makes it difficult to know what you're getting before you rip the sprites.
- Inside one of those folders are files named decks.hmg and decks_n.hmg. Graphics files can also be the ones outside the folders, if they have a header that starts with PGF.
- Use the following BMS script [2] on the files:
Code:#Decompress eastward texture resource
#By Allen
#Script for Quickbms
comtype LZ77EA_970
IDString "PGF"
get UnkLen1 byte
get FileSize long
goto UnkLen1 0 SEEK_CUR
get ZSIZE long
get Width long
get Height long
get Bpp byte
get unk byte
get UnkLen2 byte
get unk2 byte
goto UnkLen2 0 SEEK_CUR
savepos OFFSET
set SIZE LONG 0
xmath SIZE "Width * Height * Bpp / 8"
get NAME BASENAME
string NAME + "_decmp"
clog NAME OFFSET ZSIZE SIZE
- Open the resulting decks_decmp or decks_n_decmp in TiledGGD. Alter the height and width of the image, and set the Image Endianness to little-endian.
- Export it, and there you have it: a map of sprites from the game. The decks_n file is a normal map.
[1] - https://zenhax.com/viewtopic.php?t=15820
[2] - https://zenhax.com/viewtopic.php?f=7&t=15259#p66633
[X] - The game's engine is at least in part open-source. Just thought that was interesting.
Hello! I have followed your tutorial step by step however TILEDGG is not showing any of the sprites, its just a blank canvas. Can I have help here? Or can you share the sprites you have ripped? Im new to this so I apologize if this is a bit hassle for you! I also cannot access the zenhax links :<