• 4 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Release IPAK extractor (+ library and source) V2.60
#1
So after making a deep analysis of .ipak files (texture container files), I got all the needed info to make an IPAK extractor. I have also decided to make the extracting process in a managed c++ dll, so you can use it too if you want. By the way, you need to have a minimum of 256MB of RAM in your computer.

A preview of my tool:

[Image: b3aed.png]

- V2.4 Library documention (skip this if you're not a programmer):

This library has 3 functions:
Code:
static int ExtractFiles(System::IntPtr ipakDirectoryPtr, System::IntPtr extractDirectoryPtr, bool realExtract, bool skipFilePadding, bool decrypt, bool sleepAtFinish);

static int ExtractFileID(System::IntPtr ipakDirectoryPtr, DWORD fileID, System::IntPtr extractDirectoryPtr, bool realExtract, bool skipFilePadding, bool decrypt, bool showConsole, bool sleepAtFinish);

static int GetFileCount(System::IntPtr ipakDirectoryPtr);

- ExtractFiles extracts all files from the specified ipak
- ExtractFileID extracts the file with the specified ID from the specified ipak
- GetFileCount tells you how many files are there in an ipak

- If realExtract is true, then padding and pre-headers in an iwi file are skipped (recommended to get original iwi file)

- If skipFilePadding is true, then padding INSIDE the file is deleted, only valid when realExtract is true

- If decrypt is true, then the iwi files get decrypted and decompressed to get valid editable iwi's, only valid when realExtract is true

- If showConsole is true, then when the extraction process starts a console pops up with progress information

- If sleepAtFinish is true, then the console sleeps 1 second when it finished extracting

The library can also return error codes, which are the following:
Code:
#define SUCCESS 0x00000001 // success
#define ERROR_LOW_FILESIZE 0xFFFFFFF0 // if size of ipak is lower than 16 bytes
#define ERROR_WRONG_IDENTIFIER 0xFFFFFFF1 // ipak has wrong identifier
#define ERROR_WRONG_FILESIZE 0xFFFFFFF2 // ipak has wrong filesize
#define ERROR_NULLINFO_INFO_SECTION 0xFFFFFFF3 // ipak has null info about info section
#define ERROR_START_FILEMAP_FAILED 0xFFFFFFF4 // MapViewOfFile() failed
#define ERROR_NULLINFO_DATA_SECTION 0xFFFFFFF5 // ipak has null info about data section
#define ERROR_INFO_SECTION_TOO_BIG 0xFFFFFFF6 // if info section > 256mb
#define ERROR_IPAK_FILESIZE_TOO_BIG 0xFFFFFFF7 // if a file from ipak > 16mb
#define ERROR_IPAKFILE_NOTFOUND 0xFFFFFFF8 // ipak file not found
#define ERROR_FILEID_NOTFOUND 0xFFFFFFF9 // only when using ExtractFileID(), it cant find specified file
#define ERROR_CANT_CREATE_HANDLE_1 0xFFFFFFFA
#define ERROR_CANT_CREATE_HANDLE_2 0xFFFFFFFB
#define ERROR_CANT_ALLOC_TO_DECRYPT 0xFFFFFFFC

- Version log:

- v2: Initial release
- v2.3: Fixed segmented files bug; added new parameter to functions; released source
- v2.31: Added GetLastError call when extraction fails; extractor now deletes padding inside file
- v2.4: Added decompression feature
- v2.5: Improved extracting speed; added IWI and DDS extraction options; added type of texture extraction options
- v2.51: Added sagethumbs support
- v2.60: Updated the IWI and DDS conversion functions to my last version; fixed a bug related about volume maps; now the dll files are merged in the main executable (only one file); added donate button

- FAQ:

Q: Why am I getting "The application has failed to start because the side by side configuration is incorrect"?
A: Download this and install it in your Windows http://www.microsoft.com/en-us/download/...px?id=5555

- Tips:

I have some tips for you, if you're a texture modder:

- Use http://code.google.com/p/sagethumbs/downloads/list for much easier dds files view ( http://i.imgur.com/qTQLk.png )

- Download:

.rar   ipak_extractor_v260.rar (Size: 187.29 KB / Downloads: 747)
[-] The following 20 users say Thank You to kokole for this post:
  • 30mba, Arteq, Awk34, Borealis, eager, Frizouille, House, iPaddie, JariZ, master131, Pozzuh, raminr63, Romuald27, Shady360, slep, SLiiTH3R, TheRPGBomb, TITÆNE, Tomsen1410, xetal
  Reply
#2
Cool ... :]
[-] The following 1 user says Thank You to House for this post:
  • kokole
  Reply
#3
Awesome kokole is awesome! +1
[Image: ctoc.jpg]
[-] The following 1 user says Thank You to Tomsen1410 for this post:
  • kokole
  Reply
#4
Great job, now to find a way to edit IWI's
[-] The following 1 user says Thank You to JariZ for this post:
  • kokole
  Reply
#5
An Error appears for me when I want to start the .exe:
Something like "Coulnt be started because the Side-By-Side Configuration is invalid"
(in german)
[Image: ctoc.jpg]
  Reply
#6
Good job kokole! +rep

Thanks Barata...
Don't worry if things aren't the way you planned, in the end everything will solve itself...
  Reply
#7
Do you know I love you ?
Trying this RIGHT NOW !
#Thanked, you deserve it.
EDIT : Just sayin', don't forget to run the tool as admin.
EDIT 2 : I managed to convert few .iwi (from Nuketown 2025 map), but like you said, it still a little bit buggy.
My main error is this one, I just hope someone'll manage to fix this :p Still awesome.
[Image: 3VOBk.png]
  Reply
#8
Great Job! @kokole +1
[Image: 9824]
[-] The following 1 user says Thank You to iPaddie for this post:
  • kokole
  Reply
#9
(12-03-2012, 17:44)Shady360 Wrote: EDIT 2 : I managed to convert few .iwi (from Nuketown 2025 map), but like you said, it still a little bit buggy.
My main error is this one, I just hope someone'll manage to fix this :p Still awesome.
[Image: 3VOBk.png]

(12-03-2012, 16:26)kokole Wrote: Sadly only some texture files (iwi files) can be converted to dds format

I get this error somehow:
http://easycaptu.re/4eckX
[Image: ctoc.jpg]
  Reply
#10
(12-03-2012, 19:02)Tomsen1410 Wrote:
(12-03-2012, 17:44)Shady360 Wrote: EDIT 2 : I managed to convert few .iwi (from Nuketown 2025 map), but like you said, it still a little bit buggy.
My main error is this one, I just hope someone'll manage to fix this :p Still awesome.
[Image: 3VOBk.png]

(12-03-2012, 16:26)kokole Wrote: Sadly only some texture files (iwi files) can be converted to dds format

I get this error somehow:
http://easycaptu.re/4eckX

I know only some files can be converted, that what I said Smile
I dunno' German ._.
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)