F4ResTool

F4Browse, CATE, Tacedit, Terrainview & TheaterMaker etc utility related

Moderators: Snake Man, Lone Wolf

Post Reply
User avatar
Khronik
PMC Theater Developer
Posts: 51
Joined: 2006-05-02, 10:01:01 PM
Location: montreal quebec canada

F4ResTool

Post by Khronik » 2011-11-14, 05:57:28 PM

F4ResTool
by Khronik

Image

Version 1.2 - http://www.mediafire.com/?0nbhj9cg2455mfg
Removed Auto Icon Generator (will be standalone)
UI recall on launch
Simplified UI
Added custom path
Additional build options
Allowed usage without F4 installed

Version 1.1
Fixed "type" not being read on generate all and pack functions causing the error "Files missing for action".

Version 1.0
Added BMS support
Last edited by Khronik on 2011-11-19, 05:02:24 PM, edited 8 times in total.

Snake Man
Commander-In-Chief
Posts: 8560
Joined: 2000-07-31, 10:01:01 PM
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Re: UIResTool

Post by Snake Man » 2011-11-14, 06:41:19 PM

Thank you for supporting Falcon 4 community by making tool(s), appreciated.

Posted news to PMC Tactical Falcon 4 News page and added PMC Editing Wiki: Falcon 4 Tools - UIResTool by Khronik, but I would very much like to add more simplified details of what this util does. For joe user out there it might not be so clear what those direction EE and NE things are.

Also as user point of view, I tested this as I'm always looking for perl script replacements to pack/unpack my UI work files, I found it quite difficult to use as it requires the unpacked files to be placed in sub dir of the path where the tool is located and with windows explorer opening in that dir. It is very cumbersome to use and I reverted back to use my .bat batch files for active perl. It would be much better if you could browse to SOURCE dir/file and then to DESTINATION file/dir. These settings would be kept open in the util, you could unpack - edit - pack and test your edits, coming back for more editing & packing if required.
PMC since 1984

Editing knowledge, visit PMC Editing Wiki
Addon manuals, visit PMC addons/mods online manuals
View our videos in PMC Youtube channel.

PMC Tactical forum Advanced Search is power.

User avatar
Khronik
PMC Theater Developer
Posts: 51
Joined: 2006-05-02, 10:01:01 PM
Location: montreal quebec canada

Re: UIResTool

Post by Khronik » 2011-11-14, 07:20:07 PM

Snake Man wrote:It is very cumbersome to use and I reverted back to use my .bat batch files for active perl. It would be much better if you could browse to SOURCE dir/file and then to DESTINATION file/dir. These settings would be kept open in the util, you could unpack - edit - pack and test your edits, coming back for more editing & packing if required.
I can easily add this functionality...

I implemented it that way initially, although I changed it to the executable root for simplicity.

So what you would like to see is the ability to define an "output" path for both the general extractor & auto icon generator?

I will also change the behavior of windows explorer opening after every unpack, replacing it with a toggle checkbox which will be normally off.

As for a tutorial, I'm planning to make a video describing how to use the utility to make it easier for Joe Dev.

Snake Man
Commander-In-Chief
Posts: 8560
Joined: 2000-07-31, 10:01:01 PM
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Re: UIResTool

Post by Snake Man » 2011-11-14, 07:32:19 PM

Khronik wrote:So what you would like to see is the ability to define an "output" path for both the general extractor & auto icon generator?
I was talking about general unpack/pack feature, I don't even know what those icons are ;)
I will also change the behavior of windows explorer opening after every unpack, replacing it with a toggle checkbox which will be normally off.
This would be very good. I personally find it annoying of extra windows explorers opening as I'm already working with one.
As for a tutorial, I'm planning to make a video describing how to use the utility to make it easier for Joe Dev.
Not really tutorial but simple description of what the util is about. Its RSC pack/unpack tool which generates some icons... what icons exactly?
PMC since 1984

Editing knowledge, visit PMC Editing Wiki
Addon manuals, visit PMC addons/mods online manuals
View our videos in PMC Youtube channel.

PMC Tactical forum Advanced Search is power.

User avatar
Khronik
PMC Theater Developer
Posts: 51
Joined: 2006-05-02, 10:01:01 PM
Location: montreal quebec canada

Re: UIResTool

Post by Khronik » 2011-11-14, 10:56:43 PM

I still need to run it through a couple tests to make sure the changes/additions I made are sound.

Since I kept the old behavior (local work path), adding the custom path required re-writing some logic.

Changelog v1.2

Completed:
-Allow user to select a custom work path
-Allow user to toggle "show files in explorer" after unpacking

Todo:
-Save UI fields to a INI file (This avoids the user having to reset options/paths every launch)
-Align UI
-Error/Fatfinger check
-Improve included documentation
Last edited by Khronik on 2011-11-19, 06:06:30 AM, edited 1 time in total.

Snake Man
Commander-In-Chief
Posts: 8560
Joined: 2000-07-31, 10:01:01 PM
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Re: UIResTool

Post by Snake Man » 2011-11-15, 01:09:37 AM

Yeah looking good. By looking at the screenshot, I'd say the "Local work path" should be ticked by default (program start) and when you browse to IDX target, IF work path is empty, it should fill out it to be the same as IDX target directory. I think if work path is filled and you choose another IDX somewhere else... hmm maybe work path should stay unchanged. For example if user wants to unpack many files at once. If he wants to place them different dirs, he could quickly empty work path before choosing new IDX.

Does work path now include only a path or actual IRC file? What if the dir has multiple IRC files? Should work path be in fact IRC file?
PMC since 1984

Editing knowledge, visit PMC Editing Wiki
Addon manuals, visit PMC addons/mods online manuals
View our videos in PMC Youtube channel.

PMC Tactical forum Advanced Search is power.

User avatar
Khronik
PMC Theater Developer
Posts: 51
Joined: 2006-05-02, 10:01:01 PM
Location: montreal quebec canada

Re: UIResTool

Post by Khronik » 2011-11-15, 01:43:58 AM

I'm adding a save state to the application so it will remember what was checked and what wasn't from the last instance. The default action would only have to be set once.

I personally prefer unpacking to the application root as I don't want tga or other data files mixed up with the resource files under ./falconpath/data/art/resource/etc..

It was my understanding that you requested a "work path" to define a path to empty idx/rsc files to...

This is the current logic of the tool....

While un-packing:
If work path is undefined and "local work path" is un-ticked it will not continue - "undefined work path".
If work path is defined and "local work path" is un-ticked it will extract the IDX Target to the work path. (ie. work path = C:\work - script outputs to C:\work)
If local work path is ticked, it will ignore the work path (also disable the dialog) and it will extract the IDX Target to the exe root + a subfolder with the idx file name. (ie. IDX Target = acicons.idx - script outputs to "C:\UIResTool\acicons\")

While packing:
If work path is undefined and "local work path" is un-ticked it will not continue - "undefined work path".
If work path is defined and "local work path" is un-ticked it will pack the contents of the work path to its respective IDX target. The IDX Target tells us which resource file we want to repack. (ie. we want to pack C:\archive\ui\acicons to C:\Falcon\data\resource\acicons.idx"
If local work path is ticked, it will ignore the work path (also disable the dialog) and it will pack the contents of the defined work folder. (ie. "C:\UIResTool\acicons\" to "C:\Falcon\data\resource\acicons.idx")

**IMPORTANT** At the moment the irc file needs to have 1 entry for each data file (tga/bin/whatever). It's generated by default but only for existing files. I'm looking into adding a feature which scans all files of the path and makes its own irc file so no user input is required, if the user wants to add/remove new entries.

RAM22
Newbie
Posts: 5
Joined: 2007-03-05, 08:38:06 PM

Re: UIResTool

Post by RAM22 » 2011-11-15, 02:29:43 AM

Khronik wrote:I personally prefer unpacking to the application root as I don't want tga or other data files mixed up with the resource files under ./falconpath/data/art/resource/etc..
As I've worked with the previous version, Resource Manager for over a year, I too prefer to have the file unpacked into the application root for the exact same reason.

If I want to access that specific resource file later without having to open it up in the Resource Tool then I would not have the tool delete it when I pack it. Then I can retrieve the saved resource file(as it's always in the same place) and move it wherever I want for later working or research. I've done it many times to compare different Falcon version resource files that I've gathered for whatever reason.

RAM22

Biker
Recruit
Posts: 13
Joined: 2008-10-30, 04:53:21 PM

Re: UIResTool

Post by Biker » 2011-11-16, 07:00:55 PM

Hi Khronik,
Khronik wrote:UIResTool
by Khronik

You do NOT need to have perl installed to use this program.

The "Auto Icon Generator" generates all directions, and colors while only requiring 2 directions (EE,NE) for each unit.

As long as you supply a EE and NE for each unit variant under enroute/blair, the script generates all other required directions, and all color types. (ie blair,rdair,etc...)

The script requires 1x EE, and 1x NE TGA (must respect format/color format/etc) for each unit variant under "./enroute/blair/EE" and "./enroute/blair/NE"

Although "./enroute/blair" is used as the main folder the script builds from, the images added or existing under that folder do not need to be blue type as all icons are "re-palleted" using the user selected option.
this looks very much like the adoption of one of my MATLAB scripts. :wink:

Anyway if it does work in an EXE nice work...

Biker

User avatar
Khronik
PMC Theater Developer
Posts: 51
Joined: 2006-05-02, 10:01:01 PM
Location: montreal quebec canada

Re: UIResTool

Post by Khronik » 2011-11-16, 07:58:22 PM

Biker wrote:
this looks very much like the adoption of one of my MATLAB scripts. :wink:

Anyway if it does work in an EXE nice work...

Biker
Hello Biker,

It doesn't use anything based off MATLAB, or at least that I've seen. All the script logic is written from scratch.

I can provide the source if you want to take a peek.

Basically I re-compiled Julian's PERL scripts into binary format to avoid the user from installing PERL, then used NSIS scripting to automate the executable.

Image operations for the auto icon generator are done using irfanview through the command line, again automated through NSIS scripting.

Credits for Julian's original scripts appear as part of this application's UI, as they were re-compiled into binary as mentioned above.

User avatar
Khronik
PMC Theater Developer
Posts: 51
Joined: 2006-05-02, 10:01:01 PM
Location: montreal quebec canada

Re: UIResTool

Post by Khronik » 2011-11-16, 08:17:05 PM

More local testing v1.2...

I removed the auto-icon generator and will be releasing it as a stand-alone tool.

Having the both the un/packer and auto icon gen in the same app makes it harder to script as there is some overlap.

It also reduces the size of the application, as most will be not using the auto icon generator very often, or ever.

Some recent additions...

Application now saves the UI state so all user settings return on re-launch.

"Use IDX base name as subfolder"
When using a custom work path the script generates a subfolder to work within using the base name of the IDX file selected.
Practical if you don't want to make a new directory for every unpack.

"Purge work after packing"
Deletes the work path after using the pack function.

"Pack to target"
Applies changes to the IDX target, effectively applying your edits to the game install rather than just the work path.
Last edited by Khronik on 2011-11-19, 05:07:17 PM, edited 1 time in total.

Snake Man
Commander-In-Chief
Posts: 8560
Joined: 2000-07-31, 10:01:01 PM
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Re: UIResTool

Post by Snake Man » 2011-11-16, 11:18:44 PM

Definitely looking forward to test the new version :)
PMC since 1984

Editing knowledge, visit PMC Editing Wiki
Addon manuals, visit PMC addons/mods online manuals
View our videos in PMC Youtube channel.

PMC Tactical forum Advanced Search is power.

User avatar
Khronik
PMC Theater Developer
Posts: 51
Joined: 2006-05-02, 10:01:01 PM
Location: montreal quebec canada

Re: UIResTool

Post by Khronik » 2011-11-17, 05:52:58 AM

If anyone would like to help test the latest version, here's the 1.2 RC.

Version 1.2 RC
http://www.mediafire.com/download.php?856urkjpa3z04bj

-Removed Auto Icon Generator (will be standalone)
-UI recall on launch
-Simplified UI
-Added custom path
-Additional build options
-Allowed usage without F4 installed

Snake Man
Commander-In-Chief
Posts: 8560
Joined: 2000-07-31, 10:01:01 PM
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Re: UIResTool

Post by Snake Man » 2011-11-17, 07:18:07 AM

Just tested 1.2RC, works fine and I can operate it as I'm used to with my previous .bat files calling active perl etc.

I'll give it bit more time to do thorough test and I'll post some feedback then, but so far all is looking good indeed :)
PMC since 1984

Editing knowledge, visit PMC Editing Wiki
Addon manuals, visit PMC addons/mods online manuals
View our videos in PMC Youtube channel.

PMC Tactical forum Advanced Search is power.

User avatar
Khronik
PMC Theater Developer
Posts: 51
Joined: 2006-05-02, 10:01:01 PM
Location: montreal quebec canada

Re: F4ResTool

Post by Khronik » 2011-11-19, 05:10:08 PM

Updated 1.2 to final...

v1.2 is now only packer / unpacker, and will use the name F4Restool.

Several tweaks, and a couple new features added post version 1.1.

I will be releasing the auto icon generator as a standalone asap.

Snake Man
Commander-In-Chief
Posts: 8560
Joined: 2000-07-31, 10:01:01 PM
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Re: F4ResTool

Post by Snake Man » 2011-11-25, 05:14:17 PM

PMC Tactical Falcon 4 Downloads page has been updated with F4ResTool v1.2 by Khronik. Thanks for letting me know *cough* about the new release :)
PMC since 1984

Editing knowledge, visit PMC Editing Wiki
Addon manuals, visit PMC addons/mods online manuals
View our videos in PMC Youtube channel.

PMC Tactical forum Advanced Search is power.

User avatar
Khronik
PMC Theater Developer
Posts: 51
Joined: 2006-05-02, 10:01:01 PM
Location: montreal quebec canada

Re: F4ResTool

Post by Khronik » 2011-11-25, 07:23:05 PM

Thanks for the update on the downloads page!

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 2 guests