Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (85,812 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption 2

    2. Red Dead Redemption

    3. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

aru

[REL|BIN/SRC|Beta] SparkIV

Recommended Posts

aru

SparkIV

 

IMG/RPF Archive Viewer/Editor for GTA:IV

 

Latest version can be found at the Google Code page:

Download

 

 

This program is provided under the GPL v3 license. The source code for this program can be obtained from its Google Code page.

 

Comments/Requests/Bug Reports/etc are welcome!

 

NOTE: This is a public beta, and as such it is crucial that you backup all files you save/rebuild with SparkIV! I won't be held responsible for any loss of files/limbs/cake/etc that may result due to the use of SparkIV.

 

Version 0.6.2 Features

- Support for previewing FragType Model (*.wft) files

- Support for viewing LOD models

- Support for exporting audio as multichannel WAV files

- Support for Russian patched version (1.0.1.1)

- Workaround for Windows 7 textures bug for older betas (should already be fixed in newest beta of Windows 7)

- Updated list of audio filesnames (thanks to DerPlaya78)

- Other minor bug fixes/speed improvements

 

Version 0.6.1 Features

- Critical bug fix with import/export textures.

- Fixed a few bugs in WHM preview

- Auto-check for readonly when opening IMG/RPF files

 

Version 0.6.0 Features

- Support for version 1.0.2 of GTAIV

- Support for previewing WHM files (might not preview exactly as shown in game)

- Support for all Audio files, with playback and export support (thanks to DerPlaya78!)

- Default filenames are now shown when exporting/importing textures in Edit mode

- Support for loading IMG/RPF/Directories by passing a command line argument

- IMG/RPF files are opened in read/write share mode now instead of just read share

- Work around for Windows 7's GDI+ bug

- Added support for "type 3" vertices in models

- Fixed bug with textures that have a name of less than 6 characters

 

Version 0.5.4 Features

- Fixed critical bug in texture size calculation for mipmaps

- Added support for 8bit grayscale (L8) textures

- Added support for "type 8" vertices in models

 

Version 0.5.3 Features

- Improved model loading, most models should display correctly now.

- Added support for 32bit ARGB textures

- Fixed a few texture file memory leaks

- Fixed bug in texture mapping in 3D preview

- Fixed bug in size calculation for thumbnail generation

 

Version 0.5.2 Features

- Support for editing textures embedded in Model (wdr) and HTML (whm) files

- Added View/Edit buttons. Default action is View now, so use the Edit button if you wish to edit textures.

- Fixed bug with texture encoding producing low quality mipmaps.

- Fixed bug with loading SparkIV.Config.xml file

 

Version 0.5.1 Features

- Support for Texture File editing with Import (replace only) functionality

- Support for viewing Texture mipmaps and viewing colour channels seperately

- Support for showing most of the filenames in Audio RPF (v3) files.

- Support for launching external registered editors based on extension

- Fixed some bugs with IMG file saving

 

Version 0.5.0 Features

- New "Browse" feature loads up GTAIV directory into view allowing easy access to open IMG/RPF files, as well as previewing resource files not in archives.

- Experimental support for saving RPF files (hasn't been extensively tested)

- Experimental support for previewing script (*.sco) files in a pseudo C-like decompiled form as well as a disassembled form.

- Support for previewing XML and other text files

- Support for previewing Model Dictionary (*.wdd) files

- Experimental support for texture mapping in model preview (will automatically load filename.wtd if present or display textures embedded in model -- mapping may not be accurate for all models!)

- Model meshes without textures will now show in a random colour

- Model preview has a tree control allowing to view submeshes

- Model preview allows viewing model in wireframe mode (might be slow)

- Some minor bug fixes

 

Version 0.4.5 Features

- Texture (*.wtd) preview and support for exporting textures

- Experimental Model (*.wdr) preview

- Double click/Press enter on a supported file to preview it

- Fixed bug in resource file segment size calculation when importing data in Resoursaur.

 

Version 0.4.0 Features

- Opens IMGs (ver 3), and RPFs (ver 2/3). Old style IMGs (GTA3/VC/SA) are unfortunately not supported.

- Saves/Rebuilds IMGs. Saving RPFs is currently not supported, but will be added eventually.

- Allows you to import/export files.

 

Requirements

- Microsoft .NET Framework 3.5. If SparkIV does not run, you need to download and install this from here.

- Version 1.0, 1.01 or 1.02 of GTAIV.exe. This is required for the cryptographic keys.

 

Resource Files

Exported Resource files will be exported as-is and compressed. To extract the data segments out of the resource file, a tool called Resoursaur (yes, creative... aren't I? smile.gif) is available in versions of Spark 0.5.4 and older (download available at the Google code link). This tool will be quite useful to those wishing to explore the resource file formats in a hex editor.

 

Legal Issues

A cryptographic encryption key is required for running SparkIV. For legal reasons (DMCA/EUCD/etc), this key is not included in SparkIV but rather extracted from GTAIV.exe on startup. So, you will need a supported version of GTAIV installed, or have a GTAIV.exe placed in the same directory as SparkIV.

 

Webmasters

Please don't reupload this to your website. Link to this forum topic instead. This tool is still a WIP and there are many many more updates/fixes to come.

Edited by aru

Share this post


Link to post
Share on other sites
Millenia

Great work there aru, thanks!

Share this post


Link to post
Share on other sites
uNi

Good job as always aru. icon14.gif

Share this post


Link to post
Share on other sites
blazer30uk

Nice one mate icon14.gif

Share this post


Link to post
Share on other sites
Fabio206

Great!

Share this post


Link to post
Share on other sites
Starion

..You can import files now?

 

 

This may be a stupid question, but is there any way to view an exported file? That would open so many doors to modding IV.

Share this post


Link to post
Share on other sites
Glumok

Another good job, Aru !

 

Note you have to remove the "read only" attribute for the file you want to open, or you'll get an error (at least, it was the case for me).

 

Now, how to edit the wbn, wdr, wad, ... ?

 

Off topic : are you gonna work in "team" with the OpenIV crew ? Your goal is, I guess, to create the same kind of tool.

Share this post


Link to post
Share on other sites
DexX

Excellent. The game doesn't check img files in the models folder, so i'll be happily testing stuff there soon, hopefully. I did do some testing with the resource segment import/export, i didn't have much progress ingame. I get the following error, just as my model (Huntley, as the case may be) should appear:

http://img296.imageshack.us/my.php?image=i...resourcezl5.gif

 

"GTA IV Fatal Error: RC20

Invalid Resource Detected - Please re-install the game"

 

What i did was this:

-extract the Huntley.wft, and make a backup copy

-open huntley.wft in Resoursaur.exe

-extract system data, and gfx data

-import system data, and gfx data back into huntley.wft

-save huntley.wft

-import huntley.wft into vehicles.img, and start the game

-wait impossibly long time for game to load (thats normal, your img tool seems to work fine)

-wait for huntley to spawn, then crash!

 

The huntley.wft that is saved from Resoursaur is 571,426 bytes, vs the 573,440 bytes of the original, unmodified huntley.wft file. There appears to be a giant block of '00' padding on the end of the original huntley.wft, that is completely absent from the one your app saves out.

 

Otherwise, good start to what will be an invaluable tool.

Share this post


Link to post
Share on other sites
HazardX

Great work aru! As you seem to have some great insight to GTA4 fileformats and related cryptography, maybe you can help me out with something:

 

I'm working on an easy-to-use modmanager for GTA4 (made some for other games already). However, if the modmanager replaces the original game files, chances are, that patches or stuff in combination with modified files will mess up the installation. thus it would be best to have one package file that contains all modified files and has preference over all other files. best bet for such a package would be the filelist.pak . the file format is very easy, however, contained files haven't got filenames and instead an integer value which identifies the file (i.e. 80E49686 = common\data\fonts.dat , A4E833EF = common\data\decision\cop.ped). My guess is, that this integer is a hash of the filename, but i haven't got a clue which algorithm might be used to generate the hash. do you have any idea? the rpf files seem to use such hashes too.

Share this post


Link to post
Share on other sites
aru

@gorgeprofondegta4... I think the goal of OpenIV is the same as mine, but our methodology for going about this is quite different. When I'm happy with the maturity of SparkIV, its going to be open source. I'm more than happy to share what I know/learnt with others, as long as they are willing to do the same. I think OpenIV wants to be a bit more closed (i.e. see this)... and IMHO, that really doesn't work well with a dynamic community like this where we have a lot of talented programmers around.

 

@DexX... good catch! I was testing Resoursaur with the the RSCs that were already outside the archives so I never ended up getting that error. I guess I'll have to pad it properly when importing in SparkIV. smile.gif

 

@HazardX... try the One-at-a-Time hash function. R* seems to like that. See http://www.gtaforums.com/index.php?showtop...st&p=1058720528

Edited by aru

Share this post


Link to post
Share on other sites
coin-god

Awesome work aru. icon14.gif

Share this post


Link to post
Share on other sites
Glumok
When I'm happy with the maturity of SparkIV, its going to be open source.

open source = open mind (and vice versa).

I like the way you think, dude.

I will follow every release of SparkIV, it looks promising. Keep on this way !

Share this post


Link to post
Share on other sites
saintone

Can this program open gta IV x360 archives?

 

Good job icon14.gif

Share this post


Link to post
Share on other sites
aru
Can this program open gta IV x360 archives?

 

Good job icon14.gif

In theory, yes (atleast it used to)... but I haven't tested it since I added support for the PC version.

Share this post


Link to post
Share on other sites
mr.Dageron

aru, you are coolest coder! icon14.gificon14.gificon14.gif

Your programm will be brilliant if it will support opening&editing Xbox360 GTAIV files cookie.gif

 

What about WTD/XTD supporting in future realises?

Edited by mr.Dageron

Share this post


Link to post
Share on other sites
REspawn

Excellent work as always Aru

Share this post


Link to post
Share on other sites
simkas

Awesome.

Does anyone know where are all the models and textures for Niko are kept? I haven't found any niko.img or player.img.

Share this post


Link to post
Share on other sites
Shadow-Link
Awesome.

Does anyone know where are all the models and textures for Niko are kept? I haven't found any niko.img or player.img.

There is a playerped.rpf in the \pc\models\cdimages folder.. Think that contains the player models/textures.

Share this post


Link to post
Share on other sites
simkas
Awesome.

Does anyone know where are all the models and textures for Niko are kept? I haven't found any niko.img or player.img.

There is a playerped.rpf in the \pc\models\cdimages folder.. Think that contains the player models/textures.

That's for the multiplayer character.

Share this post


Link to post
Share on other sites
the hubster

Excellent work aru

Share this post


Link to post
Share on other sites
JostVice

Awesome aru, the import/export works great, tried it tounge.gif

Share this post


Link to post
Share on other sites
ParoXum

Nice work aru. I'm really impatient to get things ingame now. turn.gif

Share this post


Link to post
Share on other sites
evilrex

Now it's time to make some car mods?

Share this post


Link to post
Share on other sites
Wersaq

Great work Aru. Can we expect a tool for editing the textures by you ?

Share this post


Link to post
Share on other sites
SLAYERMAGGOT

Perfect work, aru

 

@Wersaq: When OpenIV is ready for public, then we are able to open .wtd-files (textures) icon14.gif

Share this post


Link to post
Share on other sites
ceedj

Kick ass aru! smile.gif Keep up the awesome work!

Share this post


Link to post
Share on other sites
MixerX

hey!

nice one, but seems like the resource dinosaur smile.gif can't import bigger files properly. i tried to export graphic resource from cashmachine.wtd, import it back and save, and it worked. then i tried a bigger file (uncompressed >1MB) and after importing and saving it always says that the size of the graphic segment is 0 bytes. simply said, the graphic part isnt readable anymore. hope you fix this soon, i was about to import font textures smile.gif

Edited by MixerX

Share this post


Link to post
Share on other sites
mr.Dageron

This program will be the best if it has function of Xbox360 files editing smile.gif Much better than OpenIV

Share this post


Link to post
Share on other sites
aru

@Wersaq... I might be adding a texture previewer to SparkIV, but there won't be a full editor from me. Someone else from here is working on one though... wink.gif

 

@MixerX... Yes, theres some problems with the dinosaur calculating the sizes... Also, I think I should enforce that all segments must be a multiple of 4096 bytes... which they usually are.

 

@mr.Dageron... Why the need to edit xbox360 files? Anyway, IMG opening/saving for 360 should work with SparkIV, but I have no way of testing that. Resoursaur will currently export the segments out of a 360 resource file, but not import.

Share this post


Link to post
Share on other sites
anadolu1923

great work, thanks smile.gif

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.