Tutorial: Creating and Adding Squadron Patches to your Install
-
This post is deleted! -
Even if you try to edit “patches.idx”, it cannot be edited because the character code is incorrect and it is not displayed correctly.
You are absolutely correct on the fact that the file is corrupt. It’s not the character code, it’s just all jumbled up for some reason. It can be edited if you clean it up, it works correctly.
I cleaned it up in 4.33. Why they haven’t addressed that file is beyond my comprehension? And why it’s in that condition, I can’t tell you that. But the tutorial is still correct!
C9
-
This post is deleted! -
Does that mean you need 4.32 “patches.idx” to edit correctly?
Pretty sure is was messed up then also. But I edited it and sorted it out. I have a copy, but I think BMS added more patches since then? Haven’t checked in quite some time.
I’ll take a look and let you know!
C9
-
Hello all,
Using this procedure (as described by the OP, @Ram22), slightly modified, I have successfully been adding patches (using a theater-specific version) to F4 BMS 4.35U2. In fact, I have a total of 257 squadron patches showing in Mission Commander (and in game), so if there was a limit of 256 patches total at some previous time, that limit was apparently eliminated by a BMS update along the way. These are not Logbook patches (though they do show up there also), they are patches available to be assigned to squadrons via Mission Commander (and which then show up in game). During this work, I found out a few things about the patch addition process:-
ALWAYS save your original and any new properly working files (3 files specifically, …\Art\resource\patches.idx and …\Art\resource\patches.rsc and Art\Patches\imageids.id). If you make a mistake or F4ResTool doesn’t pack the files just right, you can delete the blown-up file(s) and replace them with the last working version you had saved).
-
I used the linked (in the original post) version of F4ResTool by Khronik (originally done by Julian Onions for Falcon 4.0) and it works well.
-
The first time you use it, be sure to change the IDX target path and file to to the patches.idx you want to work with (for instance, I was working in …Falcon 4.35 BMS\Data\Add-on Mideast128\Art\resource\patches.idx) and also change the work path to that same folder (in my case, …Falcon 4.35 BMS\Data\Add-on Mideast128\Art\resource\ ). You do that by clicking on the small button with 3 dots on it to the right of the Target and Work Path lines.
-
Even better, put a copy of F4ResTool.exe right in the folder where you are operating (for me …Falcon 4.35 BMS\Data\Add-on Mideast128\Art\resource) and check the “Local Work Path” box.
-
Also ensure the box “Pack to Target” is checked so it will overwrite the patches.idx and patches.rsc files in your local Work Folder. Also check “Explore After Unpack” box to open a new window with your unpacked files for you to examine and so you can get to the patches.irc file to make changes to it. Whatever you add to that folder is what will get packed up when you tell F4ResTool to pack using the “Pack” button.
-
I recommend keeping the “Purge Work Path after packing” box UNCHECKED. If checked, this will delete the folder created when you unpacked the files, and you will not be able to examine it to see what actually got into your packed files after the packing is done. You can manually delete it when you no longer need it, but I also recommend deleting it BEFORE you unpack/pack the next attempt (otherwise you can end up with unintended files in the folder in your new attempt).
- If there are differences between what is in imageids.id and the (unpacked) …\patches\patches.irc file or the images(targas or pointers) in the unpacked \patches folder, that can result in the inability to see all of the available patches. These “broken links”, if you will, can be caused by improper procedures used to add a patch, or a spelling error or a formatting error. When F4ResTool repacks the patches.idx and patches.rsc files, it can eliminate invalid .tgas, resulting in such errors.
For instance, in the original version of the 3 files I used (…\Art\resource\patches.idx, …\Art\resource\patches.rsc, and …\Art\Patches\imageids.id) I found 15 items which showed up in …Art\Patches\imageids.id for which there was no corresponding .tga file or picture reference contained in patches.rsc (unpacked) or in patches.irc (unpacked), and a couple of .tgas with no references that did not exist in the imageids.id file. This resulted in incorrect pictures shown with bad patches in MC and reduced the total number of patches that could be displayed/selected in MC by 1 for each existing error.
For instance, when I first started working on this process, I could only see 239 patches in MC (or in game). The patches above #239 were valid (with a couple of exceptions), but they simply couldn’t be shown or selected. As I fixed each error (by reassigning its number in imageids.id and adding a new, valid .tga file to the unpacked \patches folder, and properly adding the new .tga file into the unpacked patches.irc file per the instructions), I was able to see an additional valid patch. When I fixed every error (by adding new valid .tgas, [LOADTRANSIMAGE] lines in patches.irc, and correct assignments in imageids.id), I was able to see all patches in MC and in game, assign them to squadrons, etc. Once all were fixed, I could then add new items per the procedure, and they show up, even if they are beyond #256.
-
I use Photoshop 7 (I know, ancient, right? But I know it and it works for me). Falcon 4 BMS does NOT like antialiasing for patches and pilot pictures where the image meets the transparent portion. As advised by Dunc in this thread, DON’T USE ANTIALIASING when using Paint Bucket painting in the magenta background (for transparency), and use the PENCIL tool (not the Pen tool) when filling in background pixels.
-
I found the best way to do the targas to provide the clearest picture of the actual patch is:
-
Find the patch picture you want, open it in Photoshop, and find the size of the image (Image > Image Size…). Make sure the background color of the image is selected as your background color (sample using eyedropper tool), then change the CANVAS size (Image > Canvas Size…) to a square just slightly larger than the patch itself, and make it SQUARE (width = height). This makes it MUCH easier to make a 96 x 96 size file. That means every TGA you use will be 96 x 96 without horizontal or vertical distortion, and every entry in patches.irc that you do the [LOADTRANSIMAGE] line for will be “48 48”. Keeping your picture files square eliminates the math…
(example:
[LOADTRANSIMAGE] _MY_NEW_PATCH_ "_MY_NEW_PATCH_.tga" 48 48
-
Then, using the Magic Wand Tool (a tolerance of about 20-50 generally works reasonably well), click on the background area (you can check coverage using Quick Mask (on the left toolbar)), then select Selection > Inverse. This will outline your patch.
-
Then click on Edit > Copy, Then on File > New. When the New File window opens, ensure to select a transparent background, and set the size just slightly larger than the recommended size, but keeping it square (width = height). Click OK to create the new file, then Edit > Paste to paste in your patch.
-
Then select Image > Image Size… and in the window enter 96 for width and height. Keep BiCubic selected as this will make the sharpest image for you. Click OK.
-
Then select Pure Magenta as your foreground color (R = 255, G = 0, B = 255), then select the Paint Bucket Tool. Make sure Antialiasing is UNCHECKED, tolerance of ~50, then use the tool to fill background areas.
-
Clean up around the image using the PENCIL tool with Pure Magenta.
-
To flip the image upside down, use Image > Rotate Canvas… > Flip Canvas Vertical. Do NOT try to just rotate it 180 degrees (your patch will not display properly if you do)
-
Then save the file as a .tga file, with the filename you intend to use for matching in patches.irc and indexids.id (example: MY_NEW_PATCH.tga). When saving .tga files, use 16 bit (not 24 bit or 32 bit) and ensure the “Use Compression (RLE)” box is NOT checked!
- Did I mention to save the 3 files (…\Art\resource\patches.idx, …\Art\resource\patches.rsc, and …\Art\Patches\imageids.id) every time you get a new one that actually works properly??? Yes, please do…it will save many headaches.
So, I hope this helps anyone looking to develop patches for their install. It’s not hard once you get the hang of it, but you must correct any errors you find between the three files (…\Art\resource\patches.idx, …\Art\resource\patches.rsc, and …\Art\Patches\imageids.id) BEFORE you try to add new patches (check them line by line - I exported the text files to a spreadsheet to allow for sorting - and identify and fix every error first), and be very careful in following the instructions exactly - no spelling errors, spaces where they shouldn’t be, file sizes incorrect etc.
Happy “patching”!
Regards,
Tomcattwo -
-
This post is deleted! -
This post is deleted! -
This post is deleted! -
@ena said in Tutorial: Creating and Adding Squadron Patches to your Install:
I’ve reached a conclusion about the addition and application of the squadron patch I’ve been investigating before, so I’ll post it.
-
You can probably add an infinite number of patch images to Patches.rsc.
-
However, the patch image that can be actually displayed by BMS is up to 512. This is because the IDs that can be registered in imageids.id are from 70001 to 70512. In fact, all the images added to Patches.rsc are displayed and can be selected on the MC squadron patch selection screen, but not all on the BMS screen.
Depending on the theater developer, it may be necessary to remove unnecessary patches from the 256 patches provided by KTO.
thank you.
@EnA
Good to know. Thanks for sharing that information. Have you done any work on pilot pictures, and if so, have you found a similar maximum number of pilot pictures that can be identified in \pilots\images.id?
Regards,
Tomcattwo
(VoiceClone) -
-
This post is deleted! -