Home   Help Search Login Register  

Author Topic: 1.46-->1.75  (Read 1387 times)

0 Members and 1 Guest are viewing this topic.

Powerslide

  • Guest
1.46-->1.75
« on: 07 Oct 2002, 21:34:19 »
Ok, here is the problem. For our Mcmillan sniper rifle add on (http://www.operationnorthstar.com this is the problem. Now, if the person has 1.46 only and not resistance they can put the add on in 1.46 add ons folder and the add on works fine BUT if 1.75 is installed and you put it in regular 1.46 add ons folder and launch 1.46, when you place the unit in editor to preview it, the game crashes. If you launch it in 1.75 though it works fine even though it's in the 1.46 add dons folder. It's driving me nuts because I can't find the problem. Essentially we want it to be able to go in 1.46 folder and work in both versions. Here is the config. Any help would be great.

//Mcmillan .50 cal sniper rifle Beta Version
//Modelled by Wolf
//Config by Powerslide
//Textures by Sigma
//Made for Operation Northstar Canadian Mod
#define TEast 0
#define TWest 1
#define TGuerrila 2
#define TCivilian 3
#define TSideUnknown 4
#define TEnemy 5
#define TFriendly 6
#define TLogic 7

#define true 1
#define false 0

#define private 0
#define protected 1
#define public 2

#define WeaponNoSlot         0
#define WeaponSlotPrimary      1
#define WeaponSlotSecondary      16
#define WeaponSlotItem         256
#define WeaponSlotBinocular      4096
#define WeaponHardMounted      65536

class CfgModels
{
                class Default{};
                class Weapon: Default{};
                class CAF_Mcmillan: Weapon{};
};


class CfgPatches
{
   class CAF_Mcmillan
   {
      units[] = {Mcmillan_SoldierWSniper};
      weapons[] = {CAF_Mcmillan};
      requiredVersion = 1.01;
   };
};


class CfgVehicles
{
   class All{};
   class AllVehicles : All{};
   class Land : AllVehicles{};
   class Man : Land{};
   class Soldier : Man{};
   class SoldierWB : Soldier{};
   class SoldierWsniper: SoldierWB {};
   class Mcmillan_SoldierWSniper : SoldierWSniper
   {
      displayName="Mcmillan Sniper";
      weapons[]={"CAF_Mcmillan","Throw","Put",binocular,NVgoggles};
      magazines[]={"CAF_Mcmillan","CAF_Mcmillan","CAF_Mcmillan","CAF_Mcmillan"};
   };

};

class CfgRecoils
{
   CAF_Mcmillan[]={0.1,0.4,0.2};
};

class CfgAmmo
{
   class default {};
        class BulletSingle:default {};
   class CAF_Mcmillan:BulletSingle
   {
      hit=30;
         indirectHit=3;
         indirectHitRange=1.000000;
         explosive=0;
         cost=56;
         maxSpeed=2600;

         minRange=1;
         minRangeProbab=0.100000;
         midRange=1300;
         midRangeProbab=0.300000;
         maxRange=2600;
         maxRangeProbab=0.90000;
      visibleFire=350;
      audibleFire=2500;
      visibleFireTime=2;
   };
};

class CfgWeapons
{
   class default {};
   class MGun:default {};
   class Riffle:MGun {};
   class SniperRiffle:Riffle {};
   class CAF_Mcmillan:SniperRiffle
   {
      scopeWeapon=2;
      scopeMagazine=0;
      weaponType=WeaponSlotPrimary;
      model="\CAF_Mcmillan\CAF_Mcmillan.p3d";
      picture="\CAF_Mcmillan\Mcmillan.pac";

      displayName="McMillan";
      sound[]={"\CAF_McMillan\mcmillan.wav",db+60,1};
      displayNameMagazine = "Mcmillan Mag";
      shortNameMagazine = "Mcmillanmag";
      drySound[]={"weapons\M16dry",0.010000,1};

                modelOptics="optika_snpierw";
           optics = true;
      opticsZoomMin=0.02;
      opticsZoomMax=5.1;
           distanceZoomMin=1200;
           distanceZoomMax=400;
                flashsize=3.0;

      ammo=CAF_Mcmillan;
      count=5;
      initSpeed=2600;
      multiplier=1;
      division=1;
      burst=0;
      dispersion=0.00200;
      maxLeadSpeed=100;

      soundContinuous=0;
      reloadTime=1.7;
      magazineReloadTime=2.5;
      magazines[]={CAF_Mcmillan};
      recoil=CAF_Mcmillan;
      autoFire=0;
      autoReload=0;

      aiRateOfFire=5.0;
      aiRateOfFireDistance=1200;
      aiDispersionCoefX=0.000009;
      aiDispersionCoefY=0.000007;
      threat[]={1,0.5,0.1};
      enableAttack=1;

      useAction=0;
      useActionTitle="";
   };

};

class CfgNonAIVehicles
{
   class ProxyWeapon {};
   class ProxyMcmillan: ProxyWeapon {};
};

imemyself

  • Guest
Re:1.46-->1.75
« Reply #1 on: 08 Oct 2002, 00:05:59 »
I know next to nothing about cpp making, but I don't see why someone would use .46 when they have resis. installed.  I personally have all 3rd party addons in the ofp/addons and the official one in res/addons, so 1.46 couldn't really run with all the newer addons I have.

Powerslide

  • Guest
Re:1.46-->1.75
« Reply #2 on: 08 Oct 2002, 08:01:32 »
What? Some add ons are resistance only, and we want the Mcmillan compatible with 1.46...so I really don't know what you're talking about.

Offline Jahve

  • Former Staff
  • ****
    • Jahwerks
Re:1.46-->1.75
« Reply #3 on: 10 Oct 2002, 11:50:39 »
when you are talking about 1.46 or 1.75 compativble addons, you simply change the number digits in

requiredVersion = 1.46   or  1.75

Most res-addons work either better or only with resistance, beacuse of the improvements to the engine.

Powerslide

  • Guest
Re:1.46-->1.75
« Reply #4 on: 10 Oct 2002, 22:12:27 »
If you note the config.cpp it is rated for version 1.01

sussmori

  • Guest
Re:1.46-->1.75
« Reply #5 on: 12 Oct 2002, 04:25:32 »
Try commenting out this line:


class CfgModels
{
                class Default{};
                class Weapon: Default{};
//              class CAF_Mcmillan: Weapon{};
};

FlipeR

  • Guest
Re:1.46-->1.75
« Reply #6 on: 14 Oct 2002, 10:47:18 »
Use the BiS binarising tool, now that is available!!! With it you will get a smaller .P3D (in ODOL format, so (almost 8)) noone can open your model), and you wont need two versions of the same addon any more! WHY? Because with ODOL .P3D, OFP 1.46 can also swallow that cfgModels .CPP definition without crashig! TESTED and it works!


FlipeR