IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

This section is for obtaining help on creating and releasing tools

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


Pages: (46) [1] 2 3 ... Last »  ( Go to first unread post ) Reply to this topicStart new topicStart Poll

 [REL|BIN/SRC|Beta] SparkIV

 IMG/RPF Archive Viewer/Editor for GTA:IV
 
aru  
Posted: Tuesday, Dec 16 2008, 23:48
Quote Post


developer in disguise
Group Icon
Group: Members
Joined: Jun 20, 2005

cd.gif

Member Award




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.

This post has been edited by aru on Wednesday, Apr 21 2010, 17:00
PM
  Top
 

 
Millenia  
Posted: Tuesday, Dec 16 2008, 23:54
Quote Post


Gunz 'R Us
Group Icon
Group: Members
Joined: Aug 12, 2005

sf.gif

Member Award




Great work there aru, thanks!
Users WebsitePMMSNXbox Live
  Top
 

 
uNi  
Posted: Tuesday, Dec 16 2008, 23:55
Quote Post


 
Group Icon
Group: Moderators
Joined: May 14, 2004

Member Award




Good job as always aru. icon14.gif
Users WebsitePMMSN
  Top
 

 
blazer30uk  
Posted: Wednesday, Dec 17 2008, 00:09
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Dec 5, 2008

uk.gif

XXXXX



Nice one mate icon14.gif
PM
  Top
 

 
Fabio206  
Posted: Wednesday, Dec 17 2008, 00:24
Quote Post


GTA-Expert.it Webmaster
Group Icon
Group: Members
Joined: Oct 20, 2006

it.gif

XXXXX



Great!
Users WebsitePM
  Top
 

 
Starion  
Posted: Wednesday, Dec 17 2008, 00:24
Quote Post


hmm..
Group Icon
Group: Andolini Mafia Family
Joined: Feb 14, 2005

uk.gif

XXXXX



..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.
PMMSNXbox Live
  Top
 

 
gorgeprofondegta4  
Posted: Wednesday, Dec 17 2008, 02:48
Quote Post


5 years on GTAForums... Putain !
Group Icon
Group: Members
Joined: Apr 4, 2007

fr.gif

XXXXX



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.
Users WebsitePM
  Top
 

 
DexX  
Posted: Wednesday, Dec 17 2008, 03:14
Quote Post


Black Hat
Group Icon
Group: Retired Staff
Joined: May 16, 2002

Member Award




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.
PM
  Top
 

 
HazardX  
Posted: Wednesday, Dec 17 2008, 03:26
Quote Post


pedestrian mangler
Group Icon
Group: Members
Joined: Dec 13, 2008

gr.gif

XXXXX



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.
Users WebsitePM
  Top
 

 
aru  
Posted: Wednesday, Dec 17 2008, 03:58
Quote Post


developer in disguise
Group Icon
Group: Members
Joined: Jun 20, 2005

cd.gif

Member Award




@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

This post has been edited by aru on Wednesday, Dec 17 2008, 09:51
PM
  Top
 

 
goin-god  
Posted: Wednesday, Dec 17 2008, 04:17
Quote Post


High Roller
Group Icon
Group: $outh $ide Hoodz
Joined: Mar 18, 2007

ar.gif

Member Award




Awesome work aru. icon14.gif
Users WebsitePMMSNPlayStation Network
  Top
 

 
gorgeprofondegta4  
Posted: Wednesday, Dec 17 2008, 04:29
Quote Post


5 years on GTAForums... Putain !
Group Icon
Group: Members
Joined: Apr 4, 2007

fr.gif

XXXXX



QUOTE (aru @ Dec 17 2008, 04:58)
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 !
Users WebsitePM
  Top
 

 
saintone  
Posted: Wednesday, Dec 17 2008, 10:09
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Apr 9, 2008

ru.gif

XXXXX



Can this program open gta IV x360 archives?

Good job icon14.gif
PM
  Top
 

 
aru  
Posted: Wednesday, Dec 17 2008, 10:14
Quote Post


developer in disguise
Group Icon
Group: Members
Joined: Jun 20, 2005

cd.gif

Member Award




QUOTE (saintone @ Dec 17 2008, 05:09)
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.
PM
  Top
 

 
mr.Dageron  
Posted: Wednesday, Dec 17 2008, 10:21
Quote Post


Bbobik - my old nickname
Group Icon
Group: BUSTED!
Joined: Nov 25, 2008

ru.gif

XXXXX



aru, you are coolest coder! icon14.gif icon14.gif icon14.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?

This post has been edited by mr.Dageron on Wednesday, Dec 17 2008, 13:14
Users WebsitePMICQ
  Top
 

 
REspawn  
Posted: Wednesday, Dec 17 2008, 10:52
Quote Post


REgent
Group Icon
Group: Members
Joined: Jul 6, 2002

il.gif

Member Award




Excellent work as always Aru
PMICQ
  Top
 

 
simkas  
Posted: Wednesday, Dec 17 2008, 13:18
Quote Post


That guy
Group Icon
Group: Members
Joined: Dec 13, 2006

lh.gif

Member Award




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.
PM
  Top
 

 
Shadow-Link  
Posted: Wednesday, Dec 17 2008, 13:52
Quote Post


Li'l G Loc
Group Icon
Group: Members
Joined: Dec 1, 2004

nl.gif

Member Award




QUOTE (simkas @ Dec 17 2008, 15:18)
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.
Users WebsitePMXbox LivePlayStation Network
  Top
 

 
simkas  
Posted: Wednesday, Dec 17 2008, 14:01
Quote Post


That guy
Group Icon
Group: Members
Joined: Dec 13, 2006

lh.gif

Member Award




QUOTE (Prince-Link @ Dec 17 2008, 13:52)
QUOTE (simkas @ Dec 17 2008, 15:18)
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.
PM
  Top
 

 
the hubster  
Posted: Wednesday, Dec 17 2008, 14:18
Quote Post


Sup Homies
Group Icon
Group: Members
Joined: May 3, 2005

en.gif

XXXXX



Excellent work aru
PM
  Top
 

 

4 User(s) are reading this topic (4 Guests and 0 Anonymous Users)

0 Members:

Pages: (46) [1] 2 3 ... Last »

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG