Results 1 to 5 of 5

Thread: Solved: Weapon information pages for ADDON Weapons

  1. #1

    Solved: Weapon information pages for ADDON Weapons

    I have just been trying to figure out how to make the game provide an "i" information button for any weapon. Based on this thread this is an unsolved problem for weapons being defined in addon .pbos. So I thought I'd share.

    The key is to never use the picture attribute in any weapon or magazine class. The default picture="" is what is used by all of the original non-resistance BIS weapons. This is what causes the game to search DTAEXT.pbo for an entry and (if it finds a matching picture in dtaext\equip\w) and description in dtaext\equipment.html display an "i" icon in gear.

    This does mean that a dtaext.pbo has to be provided with the addon containing weapon, magazine pictures and equipment html entries for every CfgWeapons class in the addon that requires an "i" icon.

    So as a quick example if I wanted to convert for example an addon weapon class called AN94 which uses the magazine AN94mag to provide an "i" icon:

    1. Remove any "picture" attributes from the classes an94, an94mag, make sure that none of the parent/grandparent classes override the picture attribute to anything other than "" (ideally this should only be defined in CfgWeapons.Default).

    2. Depbo Dtaext and add html entries for each class to equipment.html (just copy any other weapon's entry) change the EQ_ fields in the address to EQ_an94 and EQ_an94mag respectively. Change the _page2 addresses to unique values.

    3. Create a picture for the weapon in dtaext\equip\w with the file name w_an94.paa, create one in dtaext\equip\m\ with the name m_an94mag.paa.

    4. Repbo Dtaext and check out your new weapon information in game.

    5. Feel free to customise the equipment.html entry once you've got a working "i" icon in gear for that weapon. For example I'm going to change my parameters pages to display a screenshot of the modeloptics used by each weapon to give people a better feel for what they're selecting when choosing weapons in a mission briefing (this will probably require me to add the screenshots to dtaext so equipment.html can access it).

    Once again it isn't important which .cpp the weapon is defined in (whether it be in the main config or an addon) the critical thing is not to override the picture attribute so the game accesses dtaext for equip\w_classname.paa. The same should be true for magazines which require a picture entry in dtaext\equip\m\.

    Obviously for small single weapon releases, forcing the user to replace their dtaext is impractical but for larger weapon collections, total conversions and mods it is well worth authors considering putting all their inventory pictures in a custom dtaext.pbo rather than an addon pbo.
    Last edited by *Zeewolf*; Mar 31 2012 at 17:49.

  2. #2
    @*Zeewolf*

    Now that is just amazing!
    Good work, I hope every mod creator sees this.

    Icarus

  3. #3
    More useful information...

    Rather than using picture="" which causes the game to search DTAExt.pbo for equip\w\w_classname.paa or equip\m\m_classname.paa (so it's effectively picture = this) you can also get the i icon to display by entering a different classname.

    E.g. picture = "AN94";

    Would cause the game to search for equip\w\w_an94.paa or equip\m\m_an94.paa and the EQUIP_AN94 entry in dtaext\equipment.html regardless of the name of the class. This allows you to use the same custom equipment entry for multiple weapon classes.

  4. #4
    Does this mean the engine will properly assign magazine pictures?

  5. #5
    Yes.

    If the class has scopeMagazine = 2 (public) and is instantiated by addmagazine, addmagazinecargo or by the Magazines class of description.ext, then it is added to the unit as a magazine and the game will search dtaext\equip\m for the image m_x.paa, where x is either the provided string (picture="x") or the magazine's class name (picture = ""). You have the option of using the weapon's gear description or creating a separate one in equipment.html.

    The same is true of weapons, a cfgWeapons class instantiated in a mission using addweapon, addweaponcargo or in the Weapons class of description.ext is assumed to be listed in dtaext\equip\w as w_x.paa, using the same method. If the image is missing from your dtaext.pbo you should see an error prompt showing the path of the image the game was looking for.

Similar Threads

  1. [Solved] Arma 2 - patch 1.07 Error [Solved] Cause is missing registry entry
    By helldesign in forum ARMA 2 & OA - TROUBLESHOOTING
    Replies: 24
    Last Post: Aug 22 2012, 22:15
  2. Information on Weapons
    By Hank_2011 in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 1
    Last Post: Feb 25 2011, 15:32
  3. Add information box to custom weapon?
    By Wildebeest in forum OFP : CONFIGS & SCRIPTING
    Replies: 16
    Last Post: Mar 14 2010, 09:30
  4. Current AA Information Web Pages
    By mazza in forum ARMA - GENERAL
    Replies: 5
    Last Post: Oct 2 2006, 11:21
  5. Any pages with addon ratings
    By freddern in forum ADDONS & MODS: DISCUSSION
    Replies: 3
    Last Post: Sep 13 2003, 23:25

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •