Custom Map for Dying Light - Buidl Log #09

in Hive Gaming2 years ago

Before i can post about what the modded road system looks like, i'm gonna look for some more sand textures, to serve as that transitional sand, which i mentioned in this post.

Seeing i'm using Mad Max's road textures, why not see if i can use it's sand textures, as well?

Full disclosure: i'm aware that using other game files for my projects is probably not legal, but the way i see it, it's fair use. My project's a non-commercial custom map; an homage. WB, don't sue.

dldt_div_alpha.png

Getting the Textures

You usually can't access a game's files just by looking into the game's installation folder. They're usually compressed and encrypted. You can't simply run WinZip or something. To access them, some reverse-engineering needs to be done.

For the Mad Max road textures, i ran a brute-force, ripping program, which extracts all of the game's textures which are seen on screen, when i hit the "extract" button, while i'm running the game. Weirdly, this brute-force method didn't extract any sand textures, so i'll need to find another way to get those.

I'll have to see if anybody's made any unpackers for Mad Max, and posted it online.

What these unpackers do is they decompress the game files, by reversing the encryption used. Pretty handy, when existent, and when they work properly; not always the case. But then again, these unpackers are done by individuals, on their free time, and made available for free. So, cudos to them!

dldt_div_alpha.png

Unpacking

Having found one unpacker, it's time to (urgh!) write a batch file. This unpacker can't decompress multiple files at once, and seeing that i have to decompress thousands of files, i'll need to scrape together some batch script and make the unpacker run for each file.

FOR %%f IN (*.sarc) DO unpakke.exe modules/avalanche.umod unpack "f:\unpakke1.2%%f" F:\MadMaxExtracted

Weird looking code, but the script does a bang-on job on automating things.

d3b6lDeulT.png

Some 50 gigabytes in files - about a 15 minutes' wait.

dldt_div_alpha.png

Got Textures?

A game's files usually have multiple levels of encryption, compressed several times. Luckily, the textures are available to work with, right after the first decryption cycle. All i need to do is rename their file extension from .ddsc to .dds (image/texture files), and i got myself textures that the Dev Tools accepts.

FOR %%f IN (*.ddsc) DO rename *.ddsc *.dds

Got textures!
rtV7Gm7kaw.png

Unfortunately, this unpacker wasn't able to decompress all the sand textures correctly; there's some broken .dds files in there, and some .trim files, which i think are pieces of information that the unpacker wasn't able to decrypt; there could be more textures available which haven't been correctly decompressed.

So i'll try a different unpacker, to see if i can get better results.

dldt_div_alpha.png

Unpacker #2

Running this unpacker already shows me i'm getting .dds files, which is great. It means i don't have to deal with another layer of encryption.
mHDqGu9Iib.png
Although the unpacker directly yielded .dds files, it's also yielding .sarc files (which also contain .dds files). So i'll run the first unpacker again, which decompresses .sarc files, for the sarcs which resulted from unpacker #2. Just to see if there's any difference in results.

dldt_div_alpha.png

Results Of the Unpackers

Between the two unpackers (and because this second unpacker unpacked more .dds files than the first), i should now have most of, if not all the game's sand textures.
mshYMKJFZ1.png
It's just a matter of sifting through them and find all the sand textures, and start importing them into the Dev Tools to choose which looks better.

Even if the sand textures aren't all decrypted properly, i can't find a third unpacker. So, if anything, i'll just look online for some other sands!

dldt_div_alpha.png

Buidl post #10 will be all about the "roads and sands" screenshots.

Thanks for reading.

Sort:  

Useful info on this post, thanks for sharing those batch commands.
Bookmarked and reblogged for future reference.
!PGM !LOLZ !PIZZA

they're very useful, but is the code encryptic or what
!PGM !LOLZ !PIZZA
!hivebits

PIZZA! PIZZA!

PIZZA Holders sent $PIZZA tips in this post's comments:
@gamemapmaker(2/5) tipped @ruralio (x1)
ruralio tipped gamemapmaker (x1)

You can now send $PIZZA tips in Discord via tip.cc!