Game resource extraction/ripping?

If it's not ZDoom, it goes here.
User avatar
Apeirogon
Posts: 1590
Joined: Mon Jun 12, 2017 12:57 am

Game resource extraction/ripping?

Post by Apeirogon »

Quite complicated question, is there are any basic manuals/tutorials how extract encoded game resources (graphics/sounds/etc) from packs and then transform them into more.....suitable for future editing format?

I want extract several monster sprites from one relatively unknown/forgotten game. Thanks God resources not packed into packs, so all sounds and GUI element located as is in "sounds/" "gamebar/" folders and I can open them with media player/paint respectively .
But in-game sprites have its own format. Maybe Im wrong here, but from what I see in game and in hex file view it looks like each separate "sprite" file actually a collection of images (debatable statement) with some properties. Like, it have its own header (which defines internal "file name" I think), then some block which looks like properties (for in game calculations I think) and then lines like "????H??J??wre???" full of nonsense, for something which is not a game executable.
So, is there are some way to figure how transform thousand of "??jE??" to "image_name.tga"?
Or without knowledge how things are storing on, almost, hardware level its impossible?
User avatar
wildweasel
Moderator Team Lead
Posts: 21374
Joined: Tue Jul 15, 2003 7:33 pm

Re: Game resource extraction/ripping?

Post by wildweasel »

Which game?
User avatar
Apeirogon
Posts: 1590
Joined: Mon Jun 12, 2017 12:57 am

Re: Game resource extraction/ripping?

Post by Apeirogon »

User avatar
Rachael
Admin
Posts: 12892
Joined: Tue Jan 13, 2004 1:31 pm
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: Game resource extraction/ripping?

Post by Rachael »

If it's a proprietary format, no there is no easy way to do it. It's a lot easier if the archive is not encrypted or compressed, however.

If it is compressed you'd have to run it through some decompression algorithms to see if any of them pass.

Otherwise you'll have to manually decode the formats at play, including possibly the archive format itself but also the image formats as well.
User avatar
Apeirogon
Posts: 1590
Joined: Mon Jun 12, 2017 12:57 am

Re: Game resource extraction/ripping?

Post by Apeirogon »

So its a guess game "is this file a %format type name% or no"?
User avatar
Kinsie
Posts: 7297
Joined: Fri Oct 22, 2004 9:22 am
Discord: Find Me...
Twitch ID: thekinsie
Location: MAP33

Re: Game resource extraction/ripping?

Post by Kinsie »

It's more likely a "reverse-engineer each file format, which is likely custom to this game's engine" deal. Unless there's some form of mod support you can use to get format info.
Darkcrafter
Posts: 508
Joined: Sat Sep 23, 2017 8:42 am
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Game resource extraction/ripping?

Post by Darkcrafter »

I once tried to brute force with peazip such a file and the software at some point itself gave up, it just told me enough bullst stop it :laff: if there would be a way to decrypt those firmwares. You could also try to use FlexHex to compare different files/versions and see if there are any similar areas placed in different areas of the files but how those can help?
User avatar
Rachael
Admin
Posts: 12892
Joined: Tue Jan 13, 2004 1:31 pm
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: Game resource extraction/ripping?

Post by Rachael »

I tried to see if there were any modding tools for the game and haven't found any so far.

Looks like basically a Diablo clone with guns and aliens, ideally does not seem to be hard to crack but since I don't have it, I don't know.
User avatar
Redneckerz
Spotlight Team
Posts: 970
Joined: Mon Nov 25, 2019 8:54 am
Discord: Redneckerz#8399
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: Intel (Modern GZDoom)

Re: Game resource extraction/ripping?

Post by Redneckerz »

Wouldn't a more generic resource extractor yield any results? I seem to remember that several resource packs here on ZD were extracted with one.

If no specific tool exists, its always wise to look for a more general approach - It may not work, but then again, it might.

I had a similar issue several years ago when extracting the voice samples of Atomic Bomberman. Although they are simple PCM samples, they are encoded in such a way that proper conversion through something like Audacity was not instantly possible. GoldWave was the only program that understood what the differences were, and from thereon out i was able to convert it to a more OS-friendly/sample friendly format.

(Its also because those voice samples are hilarious and were done by for instance Billy West of Ren & Stimpy and Futurama fame).
User avatar
Rayman The Hedgehog
Posts: 108
Joined: Wed Jul 25, 2018 9:20 am
Discord: Raypuia#6578
Location: Venezuela

Re: Game resource extraction/ripping?

Post by Rayman The Hedgehog »

If you want the graphics, you can use the method i used in Fears, grab the unpaletted raw image of the texture/sprite (can be done using TiledGGD) and color it using screenshots, but keep in mind this sometimes can be tedious, so "keep calm & colorize with patience" :3:
_mental_
 
 
Posts: 3771
Joined: Sun Aug 07, 2011 4:32 am

Re: Game resource extraction/ripping?

Post by _mental_ »

If you are asking about converting Alien Shooter's .vid files to a more common format, then it's doable. I'm not aware of ready-to-use tool though. Maybe you should try to write it ;)
Open a small file in hex editor, and try to figure out what adjacent bytes mean. With exception of FourCC entries, they seem to be either 16- or 32-bit little endian numbers, following by raw image and palette data.
User avatar
Apeirogon
Posts: 1590
Joined: Mon Jun 12, 2017 12:57 am

Re: Game resource extraction/ripping?

Post by Apeirogon »

Redneckerz wrote:Wouldn't a more generic resource extractor yield any results?
Could you name some? Because for "resource extractor" google gives me results for extractor from Warframe.
_mental_ wrote:If you are asking about converting Alien Shooter's .vid files to a more common format, then it's doable. I'm not aware of ready-to-use tool though. Maybe you should try to write it ;)
Open a small file in hex editor, and try to figure out what adjacent bytes mean. With exception of FourCC entries, they seem to be either 16- or 32-bit little endian numbers, following by raw image and palette data.
Problem is I dont know how to do so, because I dont worked with hex editors at all. I see some pattern in file but that all.
Darkcrafter
Posts: 508
Joined: Sat Sep 23, 2017 8:42 am
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Game resource extraction/ripping?

Post by Darkcrafter »

Rayman The Hedgehog wrote:If you want the graphics, you can use the method i used in Fears, grab the unpaletted raw image of the texture/sprite (can be done using TiledGGD) and color it using screenshots, but keep in mind this sometimes can be tedious, so "keep calm & colorize with patience" :3:
There should be a faster way to do this with Slade as it has some color palette conversion options, maybe Photoshop also allows this via creating a custom action that would operate with palette and batching the target files with this action name.
User avatar
Tristan885
Posts: 117
Joined: Tue Sep 04, 2012 6:11 pm
Discord: Tristan885#1880
Twitch ID: Tristan885
Github ID: Tristan885
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia (Modern GZDoom)
Location: Canada, Québec

Re: Game resource extraction/ripping?

Post by Tristan885 »

With the help of Noesis and this python script plugin that you can install in "[Noesis folder]\plugins\python" folder, you can open most of the VID files from Alien Shooter. It allows viewing all of the frames and exporting all of them into a common image format of your choice.
The person's python script might need it's color palette code changed a little as it appears to display the sprites in inverted color channels (BGR) rather than (RGB) order.

The color issue can be easily fixed in GIMP Image editor with the channel mixer tool. You just set Red to 0 and set Blue to 100 in Red output channel, then you do the same for Blue output channel except Blue is set to 0 and Red is set to 100. The sprite should now appear with correct colors.

I'm not good with Python so I'm not sure what to change for the palette code to really correct it in Noesis without all that hassle with GIMP.
Hopefully this helps nonetheless to get some of the sprites! :P
Example here of how it looks with the big alien with guns sprite ripped and color corrected with GIMP.
Accensus
Posts: 2347
Joined: Thu Feb 11, 2016 9:59 am

Re: Game resource extraction/ripping?

Post by Accensus »

This is VERY much appreciated. I've been a fan of Alien Shooter for as long as I can remember, and at one point looked into ripping some assets. Unfortunately, I hit a dead end back then. Not that I spent too much time brainstorming it in the first place, but I'm happy to know its stuff isn't absolutely unobtainable.

Return to “Off-Topic”