This Howto describes how to add the 3 additionally S-8 rocket types to the Antitank loadout and leave the existing ones intact.
First you have to create the loadouts you want to add. This is done in the file "Scripts/Aircrafts/_Common/rearm.lua". The structure of this file is pretty selfexplaining. To get the propper values for LauncherCLSID and LauncherCategory, take a look at "Scripts/Database/db_weapons" where WorldID is the LauncherCategory. You can name your loadout anything you like but I am not sure if spaces in loadout names will work.
Next you have to assign a eventid to your loadout. This is done in the file "Sound/events_id.lua"
Search for the line starting with "wsRepHumanHel_LoadMin". Below that all existing loadouts are listed in the order they appear in the rearm menu. Since we do not want to mess with the existing loadouts, we add own loadouts at the end of the list of loadouts, directly above "wsRepHumanHel_LoadMax" as "<loadoutname> = counter:next()". The eventid that we are after is then the index of your loadout in this list + the start counter which is 4500. Therefore the first loadout you add should have the number 4537.
Next lets bind a key to your loadout in the rearm menu. This is done by editing the file "Scripts/Input/wingmencommandplane.lua". Search for "WC['ReloadingAntitankHel']" to extend your Antitank menu. For me it looks like this:
WC['ReloadingAntitankHel'] = {
keyCommands = {
{combos = {{key = 'F1'}}, down = wsRepHumanHel_12xATGM_2xB8V20A_2A42},
{combos = {{key = 'F2'}}, down = 4537},
{combos = {{key = 'F3'}}, down = 4538},
{combos = {{key = 'F4'}}, down = 4539},
{combos = {{key = 'F5'}}, down = wsRepHumanHel_12xATGM_2xUB13_2A42},
{combos = {{key = 'F6'}}, down = wsRepHumanHel_12xATGM_2xUPK23_2A42},
{combos = {{key = 'F7'}}, down = wsRepHumanHel_12xATGM_2xKMGU_AT_2A42},
{combos = {{key = 'F8'}}, down = 4540},
{combos = {{key = 'F9'}}, down = wsRepNull},
{combos = {{key = 'F10'}}, down = wsRepNull},
{combos = {{key = 'F11'}}, down = wsRepHumanBack},
}
}
As you can see I added 4 custom loadouts to my Antitank menu.
It should work now but it will not be displayed in the loadout menu. This is just a cosmetic issue but in the heat of battle you might not want to remember the correct keys. To edit the Antitank menu display, open the file "FUI/resourcesbs/rc-reloadingantitankhel.res".
The definition of a new line look like this:
\static
\begin
\tag{4}
\font{2}
\coord{12,65,186,85}
\caption{F3 - 12xATGM; 2xB820A (illumination); 2A42}
\end
Make sure that "\tag{n}" is ascending and unique and that the coord's doesn't overlap. Therefore the second and the third coord should be inkrementet by 20 for every line.
As a sample, I attached my modifications, which also is overwriting the ferry loadout and moves the Antitank loadout one row up in the main rearm menu.
so long
Mathias custom loadout.zip