Page 3 of 3 FirstFirst 123
Results 21 to 30 of 30

Thread: Replacement Config

  1. #21
    Moderator [FRL]Myke's Avatar
    Join Date
    May 27 2007
    Location
    Yay, Rank 34 of 47119 and catching up.
    Posts
    6,570
    Into the requiredAddons, the following bit (of course of the respective addons) matters:
    Code:
    class CfgPatches {
          class My_replacement {
             units[] = {};
             weapons[] = {};
             requiredVersion = 1.09;
             requiredAddons[] = {"CACharacters", "CACharacters2", "CAWeapons"};
             fileName = "myrep.pbo";
         };
      };
    
    So not the pbo name (altough it might be often equal) but the name used in cfgPatches.

  2. #22
    i have a question about this!

    ...code...
    class AK_47_M: AK_BASE
    {
    model = "\my_model\akm";
    picture = "\my_model\akm.paa";
    displayname = "AKM";
    };
    ...code...

    this code dnot REPLACE AKM weapon!
    class AK_47_M?is correct?
    Last edited by PFC Magician; Feb 29 2012 at 08:00.

  3. #23
    i cant replace m4a1
    ....
    class M4A1: M16_base {
    model = "\weapons\othermodel"; ///dnot work!!!!
    };
    ....
    please help other parameter can change but new p3d model dnot replace original!!!!

  4. #24
    You can't really replace the original, but you can make a copy of its config then use your own p3d

    class M4A1_x1: M4A1 {
    model = "\weapons\othermodel";
    displayname = "My M4a1";
    };

  5. #25
    You can replace the 'original' with your model. But, usually you shouldn't do this because it may affect other addons that maybe reliant on that specific model etc. etc. You should do it the way Gnat mentions and create your own unique class variant name that inherits most of the properties/attributes of the 'original' BIS variant and then just overrides the portions you need to override.

    If you've taken this into account and still want to completely override the previous class implementation then doing something like the following would override the model....

    Code:
    class CfgPatches {
        class SyWeapons {
            units[]={};
            weapons[]={};
            requiredVersion=1.02;
            requiredAddons[]={"CAWeapons_E"};
        };
    };
    
    
    class CfgWeapons {
      class M249;
      class M249_EP1 : M249 {
        scope=2;
        model="\sy\weapons\sy_m249";
        picture="\ca\weapons_e\data\icons\m249_iron_ca.paa";
        displayName="Sy M249";
        irDistance=100;
        magazines[]={"100Rnd_556x45_M249","200Rnd_556x45_M249","30Rnd_556x45_Stanag","20Rnd_556x45_Stanag","30Rnd_556x45_StanagSD","100Rnd_556x45_BetaCMag","30Rnd_556x45_G36","30Rnd_556x45_G36SD"};
      };
    };
    Hibernating (indefinitely/permanently/intermittently)... may respond to , possibly.

  6. #26
    i resolved. some modify classes m203muzzle undefined param make unreplace originals but dnot show error message when arma 2 compile .pbo. Thanks Synide "your own unique class variant name that inherits most of the properties/attributes of the 'original' BIS variant" anyway iam working in a replace addon but make others modifications for each weapon and that make the problem,but is ok now.

    Need support now about key "L"(BIS accesories weapon key) i wanna make cycling on/off IR laser Flashlight
    mmm..#include "\ca\editor\Data\Scripts\dikCodes.h"?

  7. #27
    Need The magic number!!
    how convert: effective range in meters to dispersion in radians?

    example:
    Effective range: 850 yards (780 m)

    dispersion = 0.????;

  8. #28
    Effective range is the range at which 50% of your rounds will impact some standard target size. What size is that target? Who knows. I guess it depends on the weapon type. The best thing to do would be to search for the weapon's accuracy in MoA or mils.

    Otherwise I guess if it's a small arm, you could figure out the area of one of those man shaped torso targets by doing an analysis of simple shapes like half a circle plus two rectangles or something (if you know its dimensions), then do an inverse circle area function to find the radius of a circle with twice that area, then use trigonometry to find the angle of a circle where side A and B is the circle's radius and the maximum effective range respectively, then double that angle.

    doing a little algebra, this may or may not be correct, so you'll have to check it anyways... It has been a while.

    angle of dispersion = 2 * arctan ( sqrt ( ( 2 * area of a standard target ) / ( maximum effective range * pi ) ) )
    Last edited by Max Power; Mar 29 2012 at 08:34.


    My inbox is fill and won't be emptied. If your PM is regarding requests to use my work, unfortunately I choose not to grant such permission. My work is for use with CWR2 only.

  9. #29
    if
    pistol = 50m effective range
    dispersion = 0.02

    assault rifle = 500m effective range
    dispersion = 0.002

    0.02 * 50 = 0.002 * 500 = ?

    ? = 1

    then

    dispersion = 1 / effective range

    example:
    effective range = 800 meters

    dispersion = 0.00125
    Last edited by PFC Magician; Mar 31 2012 at 09:22.

  10. #30
    The ingame unit is in radians. 2*pi radians = 360 degrees. 1 angular mil ~ 1 milliradian. Find the dispersion of the weapon you are looking for in mils, or convert from Minutes of Arc.

    http://www.unitjuggler.com/convert-a...in-to-mil.html

    I moved your post from the other thread. Next time don't crosspost.
    Last edited by Max Power; Mar 31 2012 at 10:21.

Page 3 of 3 FirstFirst 123

Posting Permissions

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