Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Replacement File Problem

  1. #1

    Replacement File Problem

    Hey guys,

    So Lennard gave me permission to release his retextured FN Fal, with a replacement config here: BI Forums. So I made my first ever addon, a simple replacement for the FN FAL and FN FAL ANPVS. I used multiple examples as reference but I am running into a problem.

    When I launch the game, I get an error saying Addon 'fn_replace' requires 'len_tk_wp'. Thing is I have both of these files in a modfolder with other weapon packs (rhs stuff). So if someone could look at the config and try to help me find out why its not finding len_tk_wp I would appreciate it. In the game the replacement works, you can see the new rifle. I just can't solve this launch error.

    Here is the config.bin:

    Code:
    #define _ARMA_
    
    
    //Class config.bin{
    class CfgPatches
    {
     class fn_replace
     {
      units[] = {};
      weapons[] = {"FN_FAL","FN_FAL_ANPVS4"};
      requiredVersion = 0.1;
      requiredAddons[] = {"CAWeapons_E","len_tk_wp"};
     };
    };
    class CfgWeapons
    {
     class M16A2;
     class FN_FAL: M16A2
     {
      model = "\len_tk_wp\fnFal.p3d";
      picture = "\ca\weapons_E\Data\icons\fnfal_CA.paa";
     };
     class FN_FAL_ANPVS4: FN_FAL
     {
      model = "len_tk_wp\fnFal_anpvs4";
      picture = "\ca\weapons_E\data\icons\w_fnfal_anpvs4_ca.pa";
     };
    };
    //};
    Thanks, Nightrain

  2. #2

  3. #3
    Gunnery Sergeant Nightrain's Avatar
    Join Date
    Mar 11 2010
    Location
    Illinois
    Posts
    444
    Author of the Thread
    Here you go:

    Code:
    class CfgPatches
    {
     class len_tk_weapons
     {
      units[] = {};
      weapons[] = {};
      requiredVersion = 1.0;
      requiredAddons[] = {"CAWeapons_E","CAWeapons"};
     };
    };
    
    	class Single;
    	class FullAuto;
    class CfgWeapons
    {
     class FN_FAL;
     class Len_FN_FAL: FN_FAL
     {
      displayName = "FN FAL (Wood)";
      model = "\len_tk_wp\fnFal.p3d";
      dexterity = 1.55;
      magazines[] = {"20Rnd_762x51_FNFAL"};
      picture = "\ca\weapons_E\Data\icons\fnfal_CA.paa";
      modes[] = {"Single","FullAuto"};
      class Single: Single
      {
       reloadTime = 0.0778654;
       recoil = "recoil_single_primary_5outof10";
       recoilProne = "recoil_single_primary_prone_4outof10";
       dispersion = 0.0005;
       minRange = 2;
       minRangeProbab = 0.3;
       midRange = 250;
       midRangeProbab = 0.7;
       maxRange = 600;
       maxRangeProbab = 0.05;
       aiRateOfFireDistance = 600;
       begin1[] = {"Ca\Sounds_E\Weapons_E\FNFAL\FNFAL_single_1",1.7782794,1,1500};
       begin2[] = {"Ca\Sounds_E\Weapons_E\FNFAL\FNFAL_single_2",1.7782794,1,1500};
       soundBegin[] = {"begin1",0.5,"begin2",0.5};
      };
      class FullAuto: FullAuto
      {
       reloadTime = 0.0778654;
       soundBurst = 0;
       recoil = "recoil_single_primary_4outof10";
       recoilProne = "recoil_single_primary_prone_3outof10";
       minRange = 0;
       minRangeProbab = 0.3;
       midRange = 80;
       midRangeProbab = 0.7;
       maxRange = 200;
       maxRangeProbab = 0.05;
       dispersion = 0.0005;
       begin1[] = {"Ca\Sounds_E\Weapons_E\FNFAL\FNFAL_single_1",1.7782794,1,1500};
       begin2[] = {"Ca\Sounds_E\Weapons_E\FNFAL\FNFAL_single_2",1.7782794,1,1500};
       soundBegin[] = {"begin1",0.5,"begin2",0.5};
      };
     };
     class Len_FN_FAL_ANPVS4: Len_FN_FAL
     {
      displayName = "FN FAL ANPVS4 (Wood)";
      model = "len_tk_wp\fnFal_anpvs4";
      picture = "\ca\weapons_E\data\icons\w_fnfal_anpvs4_ca.paa";
      modelOptics = "\Ca\weapons_E\NV_anpvs4_optic.p3d";
      visionMode[] = {"NVG"};
      opticsZoomMin = 0.0625;
      opticsZoomMax = 0.0625;
      opticsZoomInit = 0.0625;
      opticsPPEffects[] = {};
      opticsDisablePeripherialVision = 1;
     };
    };

  4. #4
    requiredAddons[] = {"CAWeapons_E","len_tk_wp"};
    =>
    requiredAddons[] = {"CAWeapons_E","len_tk_weapons"};

  5. #5
    Gunnery Sergeant Nightrain's Avatar
    Join Date
    Mar 11 2010
    Location
    Illinois
    Posts
    444
    Author of the Thread
    Thanks, Kju. I figured it was some noob mistake.

  6. #6

  7. #7
    Gunnery Sergeant Nightrain's Avatar
    Join Date
    Mar 11 2010
    Location
    Illinois
    Posts
    444
    Author of the Thread
    Ok, another problem. I was toying around with deadfasts ak replacement, i asked if I could, and was trying to replace the 107 series for the default russians with yours. I made the changes to the config, and they look and work right for the PSO versions but for the Kobra and Kobragl versions I get these errors.

    Code:
    No Entry,
    'bin\config.bin\CfgWeapons\AK_107_GL_kobra.selectfireAnim
    Code:
    No Entry,
    'bin\config.bin\CfgWeapons\AK_107_kobra.selectfireAnim
    Code:
    No Entry,
    'bin\config.bin\CfgWeapons\AK_107_GL_kobra.nameSound
    Code:
    No Entry,
    'bin\config.bin\CfgWeapons\AK_107_kobra.nameSound
    Any thoughts to why this simple replacement has caused these errors? Here is the replacement config:

    Code:
    #define _ARMA_
    
    
    //Class config.bin{
    class CfgPatches
    {
     class ak_replace
     {
      units[] = {};
      weapons[] = {"AK_107_gl_kobra","ak_107_kobra","AK_107_gl_pso","ak_107_pso","AK_47_M","AK_47_S","AKS_GOLD","AK_74","AK_74_GL","AKS_74_kobra","AKS_74_pso","AKS_74_U","AKS_74_UN_kobra","SVD","bizon","bizon_silenced","VSS_vintorez"};
      requiredVersion = 0.1;
      requiredAddons[] = {"CAWeapons","CAWeapons_E","CAWeapons_AK","CAWeapons_bizon","RH_aks_cfg"};
     };
    };
    class CfgWeapons
    {
     class AK_BASE;
     class AK_47_M: AK_BASE
     {
      model = "\RH_aks\RH_akm.p3d";
      picture = "\RH_aks\inv\akm.paa";
     };
     class AK_107_gl_kobra: AK_107_base
     {
      model = "\RH_aks\RH_AK107kgl.p3d";
      picture = "\RH_aks\inv\AK107kgl.paa";
     };
     class AK_107_kobra: AK_107_base
     {
      model = "\RH_aks\RH_AK107k.p3d";
      picture = "\RH_aks\inv\AK107k.paa";
     };
     class AK_107_gl_pso: AK_107_gl_kobra
     {
      model = "\RH_aks\RH_AK107glsp.p3d";
      picture = "\RH_aks\inv\AK107glsp.paa";
     };
     class AK_107_pso: AK_107_base
     {
      model = "\RH_aks\RH_AK107sp.p3d";
      picture = "\RH_aks\inv\AK107sp.paa";
     };
     class VSS_Vintorez: Rifle
     {
      model = "\RH_aks\RH_asvalsp.p3d";
      picture = "\RH_aks\inv\asvalsp.paa";
     };
     class AK_47_S: AK_47_M
     {
      model = "\RH_aks\RH_aks47.p3d";
      picture = "\RH_aks\inv\aks47.paa";
     };
     class AKS_GOLD: AK_47_S
     {
      model = "\RH_aks\RH_aks47g.p3d";
      picture = "\RH_aks\inv\aks47g.paa";
     };
     class AK_74: AK_BASE
     {
      model = "\RH_aks\RH_ak74.p3d";
      picture = "\RH_aks\inv\ak74.paa";
     };
     class AK_74_GL: AK_BASE
     {
      model = "\RH_aks\RH_ak74gl.p3d";
      picture = "\RH_aks\inv\ak74gl.paa";
     };
     class AKS_BASE;
     class AKS_74_kobra: AKS_BASE
     {
      model = "\RH_aks\RH_aks74k.p3d";
      picture = "\RH_aks\inv\aks74k.paa";
     };
     class AKS_74_pso: AKS_BASE
     {
      model = "\RH_aks\RH_aks74sp.p3d";
      picture = "\RH_aks\inv\aks74sp.paa";
     };
     class AKS_74_U: AKS_BASE
     {
      model = "\RH_aks\RH_aks74u.p3d";
      picture = "\RH_aks\inv\aks74u.paa";
     };
     class AKS_74_UN_kobra: AKS_BASE
     {
      model = "\RH_aks\RH_aks74usdk.p3d";
      picture = "\RH_aks\inv\aks74usdk.paa";
     };
     class Rifle;
     class SVD: Rifle
     {
      model = "\RH_aks\RH_svd.p3d";
      picture = "\RH_aks\inv\svd.paa";
     };
     class bizon: Rifle
     {
      model = "\rh_aks\RH_bizon.p3d";
      picture = "\rh_aks\inv\bizon.paa";
     };
     class bizon_silenced: bizon
     {
      model = "\rh_aks\RH_bizonsd.p3d";
      picture = "\rh_aks\inv\bizonsd.paa";
     };
    };
    //};

    Thanks,
    Nightrain

  8. #8
    a) do you get it too when only loading the RH_aks addon?
    b) unrelated but remove all items from weapons[] - only new classes are to be set in there

  9. #9
    Gunnery Sergeant Nightrain's Avatar
    Join Date
    Mar 11 2010
    Location
    Illinois
    Posts
    444
    Author of the Thread
    Quote Originally Posted by PvPscene View Post
    a) do you get it too when only loading the RH_aks addon?
    b) unrelated but remove all items from weapons[] - only new classes are to be set in there
    a) Yes. But this is the first time it has ever happened. I've had that and deadfasts replacement running together for like a year with no problem.

    b) Will do.
    Last edited by Nightrain; Jul 21 2011 at 14:57.

  10. #10
    Gunnery Sergeant Nightrain's Avatar
    Join Date
    Mar 11 2010
    Location
    Illinois
    Posts
    444
    Author of the Thread
    Problem Solved!!!!

    Just needed to add class "AK_107_BASE;" before the lines for replacing the ak107s.
    Last edited by Nightrain; Jul 21 2011 at 15:13.

Page 1 of 2 12 LastLast

Posting Permissions

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