Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Cayo Perico Heist
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Red Dead Online

      1. Frontier Pursuits
      2. Find Lobbies & Outlaws
      3. Help & Support
    3. Crews

    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. Grand Theft Auto Series

      1. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

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

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
    6. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
    7. GTA III

      1. Guides & Strategies
      2. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

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

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

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

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

      1. GTANet 20th Anniversary
    2. Support

    3. Suggestions

[REL] Yet another IMG Editor -- Spark


aru

Recommended Posts

Since I'm not maintaining this software anymore... source code is now provided.

 

Source (GPL): here

 

A few things were started but never completed... including rebuilding. See spark.txt for the milestones I had. smile.gif

 

---

 

I know there are a couple of IMG editors out there... so why another one?

Well, a couple of reasons...

 

1. New files get added to the end of the IMG file, which means the archive will get bigger and bigger in size... until you rebuild it. But what happens to the space that was reclaimed from deleted files?

2. The concept of keeping the layout state of the archive in memory. What this pretty much means is that you should be able to add new files or delete files from an IMG file without worrying about (a) accidental overwrites of existing files, (b) accidental deletion of existing files. Unless you ask to save, nothing is saved.

3. Integration with other Windows programs... Drag and drop from Explorer (or even winzip/winrar) into a IMG file?

 

I have been writing a simple IMG editor (named Spark) that takes these factors into account. It's only for GTA:SA for now... it doesn't support the old archive format. As I haven't tested it as much as I would have liked to, and since it doesn't have all the features I want it to have, I'm just going to release it here as a beta.

 

Some Screenshots:

 

user posted image

 

user posted image

 

Current Features:

 

- User friendly interface

- Open, save, and create new IMG archives for GTA San Andreas

(older version of the IMG format from GTA3 and Vice City are not

supported currently)

- Sort files by name, offset or size.

- View files in a detailed view, list view or iconic view

(Note: Iconic view might be slow for large files such as gta3.img)

- Search for files in archive directly from the toolbar.

- Automatically reuses space left over from previously deleted files

reducing the need to rebuild archives.

- Maintians the layout state of the archive in memory allowing you

to add/remove/delete files without committing directly to disk.

Nothing is saved until you say you want it to be saved!

- Drag and drop support from and to Explorer, and any other program

that supports drag and drop of files.

- Some limits to prevent accidental drag and drop of the all the files

in the archive.

 

Some things that are not supported yet... but planning to add support for them soon:

- Association with .IMG files

- In-place archive rebuilding

 

Download Here

 

Source Code

 

Any suggestions, comments, etc are welcome smile.gif.

Edited by aru
Link to post
Share on other sites

I never saw an build in txd viewer in an img tool so i would like that if you could make a small addon in this for viewing and browsing the txd files at the same time this time it will speed up searching for cool textures.

Link to post
Share on other sites

Some very good ideas and a pretty design too! smile.gif

 

Presenting the contents of the IMG in an Explorer-like folder view is an inspired piece of interfacing. Making the right-click menu mimmick some of the features of Explorer and generally making this tool operate like an extended Explorer form could really help newcomers get an easy introduction to installing modifications. Things like "Arrange Icons > Name/Date/Modified/Size" and "View > Icons/List/Details" in the right-click menu would make this a fantastically easy tool to work with.

 

Not saving the file until the user selected Save or Save As... is a sorely missed feature. Would you be coding much of an Edit > Undo feature for this?

 

Looks like you are using C++ or C# perhaps? In VB6, the drag-drop code is handled by a pair of OLE (Object Linking and Embedding) events of the main form.

 

Private Sub Form_OLEDragOver(Data As DataObject _, Effect As Long, Button As Integer, Shift As Integer _, x As Single, y As Single, State As Integer)On Error Resume Next 'very basic error handling'Determine what is being dragged over the form:If Data.GetFormat(vbCFFiles) = True Then 'data is file list:   Effect = vbDropEffectCopy And Effect 'inform source of intentionsElse 'data is not file list:   Effect = vbDropEffectNone 'inform source of intentionsEnd IfEnd SubPrivate Sub Form_OLEDragDrop(Data As DataObject _, Effect As Long, Button As Integer, Shift As Integer _, x As Single, y As Single)On Error Resume Next 'very basic error handlingDim i As Long 'used with loopingDim FileItem As Variant 'used to loop through Data collection'Prepare for operation:Screen.MousePointer = vbHourglass 'change cursorCall mnuViewData_Click(0) 'Standard Data view'Test what has just been dropped onto the form:If Data.GetFormat(vbCFFiles) = True Then 'data is file list:   For Each FileItem In Data.Files 'loop through them all:       'Test if this item is actually a folder:       If FSO.FileExists(FileItem) = True Then 'valid file path:           Call ReadFile(FileItem) 'open the file                      'Recover from operation:           Me.Caption = "CFG Studio - [" _           & FSO.GetAbsolutePathName(FileItem) & "]"           Screen.MousePointer = vbNormal 'return cursor           Exit Sub 'stop subprocedure here       Else 'invalid file path:           'do nothing       End If   Next FileItemElse 'data is not file list:   'do nothingEnd If'Recover from operation:Screen.MousePointer = vbNormal 'return cursorEnd Sub

That's the way I am using it. FSO is the "File System Object" scripting library. It's fairly readable and I always write lots of comments in my code, so you might be able to find equivalent events and commands in the language you are using?

 

Automatically detecting and supporting GTA3 and GTAVC IMG formats would be a real bonus for the modern modifying scene, since all three editions are still worked with by many people.

Edited by Cerbera
Link to post
Share on other sites

It dosent work cryani.gifcryani.gifcryani.gifcryani.gifcryani.gifcryani.gifcryani.gifcryani.gif .

 

This is the second img editing tool Iv tried and NONE OF THEM WORK!!!! cryani.gifcryani.gif

 

When I click on spark.exe, or open the program in any way, it says "application failed to initalize properly (this is a long number which I can't rememba) Click OK to terminate application"

 

What shall I do? Please help!

 

I am so angry.gifangry.gifangry.gifangry.gif at this because I cant get this, a single program, to initialize!!!

Link to post
Share on other sites

lol... i like your interface style aru, just likemy iRipper program, but more aimed toward just GTASA .... mine was designed for several titles with 'structured' archives... gtasa just has a huge list.. something my program cant handle too well tounge.gif

 

anyway, great job!

Link to post
Share on other sites

aad: I wrote up a quick TXD loader and a DXT decoder.

 

user posted image

 

Doesn't work with all the txd files yet... I'm going to fix up it first before releasing the update smile.gif

 

I had to decode the txd file over again since I couldn't find the txd specifications on the forum... it got deleted when the forum was prunned for archives... anyone still have a copy of it?

 

satasha: That shouldn't be a problem. I think I can add that.

 

Cerbera: Yup, I'm doing something very similar for drag and drop. It's written completely in C# though. GTA3 and VC will come on later... the current object model of the program is such that it's not such a big issue adding new formats. Undo... possible, but I would have to think about it.

 

Jackington: You probabbly need the .NET framework. Read the requirements section of the readme.txt file.

Edited by aru
Link to post
Share on other sites

New version... Added TXD Preview support plus a bit more. Here's the new features list:

 

Version: 0.9.2002

 

- Sort by file type

 

- "Arrange Icons By" menu in the View menu

 

- New "Explorer" view for previewing files inside archives

 

- Explorer preview support for San Andreas TXD files

 

- File association support (Manual association required)

 

For previewing TXD files, click on View -> Explorer. smile.gif

 

Download Here

 

 

Link to post
Share on other sites
cookie.gif

 

Now that's great!

How's it going with it? Would be awsome with a dff viewer in it.

I could... if someone can give me a file format description for the SA dff files.

Link to post
Share on other sites
  • 4 weeks later...

Cool tool, and will be realy cool with embeded DFF viewer (maybe textured).

Thx again for console version.

And how about 2 recompile it using Visual Studio 6 to aboid framework adiction?

Link to post
Share on other sites

I use this tool ALL the time, its so much quicker and easier then IMGTool! (through IMGTool is still good colgate.gif ) i bloody love it!

 

A DFF viewer would be really good cool.gif

Link to post
Share on other sites

I've tried it out and this is a really promising start. smile.gif

 

Some things you might consider adding:-

  1. Status bar panels to show information a bit like Windows Explorer. File size, last modified date and similar stuff for the selected file. Also, including a total number of files in the archive on the right would be useful.
  2. An actual "Find" dialogue window. I must've clicked Edit > Find and CTRL+F about five times before I realised all it did was place the insertion point in the toolbar search box. tounge.gif By using a proper Find form you can show a list results with exact matches at the top and partial matches added afterwards. Files in the IMG have some obscure names and there's an insane number of files, so allowing partial matches would really help locate things.
  3. If possible, making the search box right-aligned in the toolbar to match web browsers like FireFox, IE7b1, Opera and so on. MS Office programs often have a box on the right for searching help, so it would be a more conventional position for it.
  4. I think an XML settings file for two values is a bit overkill! Just a simple INI format would be better since it would allow semi-advanced and advanced users to change the values manually.
  5. Recent files list. Just an array of four menu items placed above the "Exit" menu and a suitable set of entries in the settings file, shouldn't be too hard.
  6. Saving the last values for window size, position and state. Make sure that the restored down size does not get overwritten by maximised and minimised sizes. I know how to do this in VB6 so if you can't figure it out, just ask and I can run you through the event sequence to acheive it. smile.gif
  7. Switching to the full hourglass cursor (Screen.MousePointer = vbHourglass) before doing any long processing. This includes searching, import/export, Open, Save, changing views, changing sort order, etc. Just a line at the start of the process to change the cursor and another at the end is all it takes and it helps the user see that something really is happening.
  8. If you can, display an "Ascending" or "Descending" arrow in the title bars of the "Details" view to show which value and in which direction the data is being sorted by.
  9. If the control allows it, alternate row colouring in "Details" view.
  10. Being able to zoom in on texture previews would be useful.
  11. When in explorer view, show a prominent message stating that a file cannot be loaded if it cannot be loaded.

These little touches will help make this already good program even better.

Link to post
Share on other sites

Cerbera, there are a few reasons why this tool is still in 0.9x and not 1.0 yet... and you covered most of them such as MRUD, search dialog, etc. This is only something I work on during my freetime, so updates will be slow. The config xml file is a .NET standard for configuration settings, and thus... why I'm using it... there's a lot more you can do with that .config file... not just save settings smile.gif.

 

Voodooman, I can't recompile without the .NET framework. The program is coded in C#, and it uses some builtin classes from the .NET framework... and there's no native C# compiler out there yet.

 

DFF support... erm.... hhmmm... suicidal.gif too much code to write.

Link to post
Share on other sites

Is there any chance you can make the import remember the last folder used and not opened? if that makes sense biggrin.gif

 

I'll try and explain better

 

When you first load spark up and open gta3.img, and when you goto import a file it opens the SA folder, so I then have to go and find my mods folder then import! it would be so much easier if it just remembered my mods folder biggrin.gif

 

Hope that makes sense... it does in my head tounge2.gif Keep up the great work cookie.gif

Link to post
Share on other sites

He's wondering if you can add a folder configuration line. sh*t, 4 folders would be great to pick from in a drop down favorites menu that's configurable... Then, it's a matter of clicks for mods users, and more of a cinch for mods creators.

Link to post
Share on other sites

 

Cerbera, there are a few reasons why this tool is still in 0.9x and not 1.0 yet... and you covered most of them such as MRUD, search dialog, etc. This is only something I work on during my freetime, so updates will be slow. The config xml file is a .NET standard for configuration settings, and thus... why I'm using it... there's a lot more you can do with that .config file... not just save settings smile.gif.

 

Voodooman, I can't recompile without the .NET framework. The program is coded in C#, and it uses some builtin classes from the .NET framework... and there's no native C# compiler out there yet.

 

DFF support... erm.... hhmmm... suicidal.gif too much code to write.

i have same problem with Visual studio 2005 when i importing VS 6 code or VB 6 code it convert old classes 2 .NET framework 2.0 classes, and that real sux, not for me my hardware and software allways up 2 date but i know that some PC owners still have dialup connection and using win 98 and NT 4 (.net framework 2.0 still not available for win 9X and NT 4) and when i compilin my application thats very funny that with 1-5 megs tool somebody will need 2 download 25-40 megs runtimes of .net platform. Im found 2 ways how 2 avoid it (both not so easy) first using of borland C++ (not aplicable for VB projects) and second is total disasembling (decompilation)-> not very fast analyzing -> code remaking -> and then assembling of new not framework adicted tool) also Framework makin hard 2 porting win apps 2 other plarforms (looks like thats another step of microsot 2 kill or just 2 make less popular other platforms than "WINPC") (((

and bout dff u can work together with Leon Gaiazov (he from Montreal, Quebec, Canada, so im think he will help u - his fellow countryman)

Thats his site with contact information:

http://www.gaiazov.com

He made exelent DFF Viewer (SA/VC/GTA3 compotible) and Lightwave DFF Exporter plugin so try 2 speek with him about integration of his viewer in SPARK (i think that after that his Name and im waiting for new release with img 1 support ))

(oh by the way look again please at my topic bout console img tool)

Link to post
Share on other sites

Well.. it only needs .NET Framework 1.1... it doesnt use any 2.0 specific features... but still, yes.. there's a 20mb one time download. And its not possible compile C# programs with a C++ compiler.. the two are quite different, so borland C++ is out of the question. Also it's not really true that MS is trying to make a "WINPC". Spark should run under Linux/BSD through the Mono framework, although I havent really tried it out. The .NET executables are compiled to a virtual pc instruction set (kinda like Java)... which makes them quite portable.

 

Saving folder paths for import/export -- should be possible. Will add to todo list for next release. For now you could just make shortcuts to the mod folder/GTA folder in your favorites and access them through that.

Link to post
Share on other sites

.Net Framework slows my pc down during boot and with some internet progs. I tried it with ATI's CCC driver for my card and its slow and uneccesary. Of course that was early on, they probably worked the kinks out of it.

Until more programs require it or I find a really good program I want that uses it, I will have to protest against it at this moment. Just my preference, tiss all.

 

But your program sounds awesome. Keep it up.

Link to post
Share on other sites
.Net Framework slows my pc down during boot and with some internet progs. I tried it with ATI's CCC driver for my card and its slow and uneccesary. Of course that was early on, they probably worked the kinks out of it.

Until more programs require it or I find a really good program I want that uses it, I will have to protest against it at this moment. Just my preference, tiss all.

 

But your program sounds awesome. Keep it up.

you need to update it completely, I think twice...

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
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

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