Author Topic: What controls the items displayed in each kit's selection "box" on the HUD?  (Read 257 times)

Offline robbob42

  • Newbie
  • *
  • Posts: 17
    • View Profile
OK, from prior post I have my newly-imported rifle up & running for coop play, and have added it the British Antitank Limited kit (BW_Antitank_Limited.inc). When I fire up the Lebisey map (which uses that kit), the Piat graphic that used to be there on the HUD in the ANTI TANK LIMITED kit selection "box" (on the spawnpoint selection screen) has been replaced with the new rifle graphic I created for it. Both weapons are there when I enter the game, but only the rifle shows up in the HUD on the spawnpoint screen.

Previously, I'd done virtually the identical same thing for the US - added an imported rifle to the US Antitank Assault Limited kit (UW_AntitankAssault_Limited.inc), and both the rifle & bazooka display in the kit selection box on all the maps that use that kit. How do I get both my "new" rifle and the Piat to display the same way for the British Antitank kit?

Most of the other kits on that map show two of the items in the kit. I guess the real question is: What controls how many and/or what items are displayed in each kit's selection box? Comparing the US vs British .inc kit files hasn't given me a clue.

Thanks in advance!
« Last Edit: 22-07-2018, 22:07:34 by robbob42 »

Offline robbob42

  • Newbie
  • *
  • Posts: 17
    • View Profile
Well, after a year+ hiatus I revisited this and eventually figured it out. Tho it's an old topic, I'm posting the solution here in case someone needs this info in the future.

The difference with this kit was that I had ADDED the rifle to BW_Antitank_Limited.inc, as opposed to replacing the rifle in the other kits (since there was no rifle in that AT kit to replace). Given the Piat seems to be the rifle-equivalent weapon in it's various kits, it's tweak file isn't set up for it be shown as a secondary/alternate weapon. So when I added the new rifle, it's graphic "overrode" the Piat's.

Bottom line, what controls how items are displayed in each kit's selection box is the
ObjectTemplate.weaponHud.weaponIcon Ingame\Weapons\Icons\Hud\xxx.dds (or \xxx.tga)
line in the weapon's tweak file. When an item is the primary weapon (displayed on the left), it looks something like:
ObjectTemplate.weaponHud.weaponIcon Ingame\Weapons\Icons\Hud\PIAT.dds
where PIAT.dds would be the graphic used in the kit selection box.

To make the Piat be the secondary/alternate weapon I changed this line to:
ObjectTemplate.weaponHud.weaponIcon Ingame\Weapons\Icons\Hud\placeholder.tga
That keeps it from being displayed as the primary weapon in the selection box, while the placeholder.tga reserves that spot for the new rifle I'm adding.
Then I added a new line:
ObjectTemplate.weaponHud.specialAbilityIcon Ingame\Weapons\Icons\Hud\Ability\PIAT.dds
which then causes the Piat to be displayed as the secondary weapon.

I also had to copy the PIAT.dds file from
menu_client.zip\HUD\Texture\Ingame\Weapons\Icons\Hud
to the
menu_client.zip\HUD\Texture\Ingame\Weapons\Icons\Hud\Ability folder so the game wouldn't crash trying to find the newly-added PIAT.dds path.

So now it all works, other than the Piat is shown tiny (as apparently all secondary weapons are in the kit selection box). The caveat is that if there are other kits using the Piat as the primary weapon, it'll show up as the secondary with a "blank" spot for the primary - since the above changes now define the Piat as a secondary weapon (i.e. for display purposes). For me that doesn't matter.

A bit long-winded, but hope it helps someone down the road...
RobBob