Home   Help Search Login Register  

Author Topic: M42 'Duster' 40mm A/A  (Read 2138 times)

0 Members and 1 Guest are viewing this topic.

orsone

  • Guest
M42 'Duster' 40mm A/A
« on: 29 Aug 2003, 00:20:03 »
 I have finished the model of my M42 'Duster' . I just need to get it in-game so i can work on the textures. I copied this config from the GST_Whirlwind because it fits the variety of vehicle.
But supprise supprise..
Can anyone help out..There is an attached pic
current config>>>
//M42 'Duster' by Orson

#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



class CfgModels
{   
   class Default{};
   class Vehicle: Default{};
   class M113: Vehicle{};
   class M42: M113{};
};

class CfgAmmo
{
        class Default{};        
        class BulletSingle: Default{};
        class ExplosiveBullet: BulletSingle{};
        class Bullet4x23: ExplosiveBullet{};
        class 40mm: Bullet4x23
        {
                hit=40;indirectHit=20;indirectHitRange=2;

        };
};

class CfgWeapons
{
        class Default{};
        class MGun: Default{};
        class MachineGun7_6: MGun{};
        class MachineGun30: MachineGun7_6{};
        class ZsuCannon: MachineGun30{};
        class 40mm: ZsuCannon
        {
                ammo=40mm;
      count=2000;
                sound[]={\M42\fire.wav,db20,1};
                soundContinuous=0;
                displayName =  40mmHE;
      displayNameMagazine = 40mmHE;
      shortNameMagazine = 40mm;
      dispersion=0.0015;

        };

};


class CfgPatches
{
   class M42
   {
      units[] = {M42};
      weapons[] = {};
      requiredVersion = 1.75;
   };
};

class CfgVehicles
{
   class All {};
   class AllVehicles: All {};
   class Land: AllVehicles {};
   class LandVehicle: Land {};
   class Tank: LandVehicle {};
   class M113: Tank{};
        class M42: M113
   {
               
                armor=350;
      armorStructural=4.2;
                class HitTurret {armor=1.0;material=51;name=turet;passThrough=1;};
      class HitGun {armor=0.8;material=52;name=gun;passThrough=1;};
                canfloat = false;
      gunnerOpticsModel = "optika_zsu_gunner";
                outGunnerMayFire=true;
                forcehidegunner = true;
      hasCommander=false;
      driverIsCommander=false;
                viewGunnerInExternal = true;
                soundEngine[]={\M42\Engine.wav,db-10,1};
                side=1;
      scope=2;
      nameSound="Tank";
      crew=SoldierECrew;      
                displayName="M42 'Duster'";
      maxSpeed=38;
                transportSoldier = 0;
      cost=100000;   
      
                model="\M42\M42";
      weapons[]={40mm};
      magazines[]={40mm};   
                commanderAction = ManActBMPcommanderout;
                commanderInAction = ManActBMPcommander;
                driverAction = ManActBMPGunnerOut;
      gunnerAction = ManActZSUGunner;
      driverInAction = ManActT55Driver;
                gunnerInAction = ManActZSUGunner;
                class TurretBase
                {
              gunAxis = "OsaHlavne";
         turretAxis = "OsaVeze";
         soundServo[]={Vehicles\gun_elevate,db-30,1.0};

         gunBeg = "usti hlavne";
         gunEnd = "konec hlavne";
         
         minElev=-10; maxElev=+90;
         minTurn=-360; maxTurn=+360;

         body = "OtocVez";
         gun = "OtocHlaven";

      };
      class Turret: TurretBase {}
      };                
                accuracy=0.20;
                type=VArmor;
      threat[]={0.8, 0.6, 1};
   };    
« Last Edit: 29 Aug 2003, 00:23:17 by orsone »

Offline Killswitch

  • Members
  • *
  • Peace, cheese and ArmA
Re:M42 'Duster' 40mm A/A
« Reply #1 on: 29 Aug 2003, 01:49:35 »
Since I have no idea how your model is set up, this slightly improved version might still not work, but anyhow:
Code: [Select]
//M42 'Duster' by Orson

#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 CanSeeRadar 1
#define CanSeeEye 2
#define CanSeeOptics 4
#define CanSeeEar 8
#define CanSeeCompass 16
#define CanSeeRadarC CanSeeRadar+CanSeeCompass
#define CanSeeAll 31

class CfgPatches
{
        class M42
        {
           units[] = {M42};
           weapons[] = {};
           requiredVersion = 1.75;
        };
};


class CfgModels
{  
        class Default{};
        class Vehicle: Default{};
        class M113: Vehicle{};
        class M42: M113{};
};

class CfgAmmo
{
        class Default{};        
        class BulletSingle: Default{};
        class ExplosiveBullet: BulletSingle{};
        class Bullet4x23: ExplosiveBullet{};
        class 40mm: Bullet4x23
        {
                hit=40;indirectHit=20;indirectHitRange=2;

        };
};

class CfgWeapons
{
        class Default{};
        class MGun: Default{};
        class MachineGun7_6: MGun{};
        class MachineGun30: MachineGun7_6{};
        class ZsuCannon: MachineGun30{};
        class 40mm: ZsuCannon
        {
           ammo=40mm;
           count=2000;
           sound[]={\M42\fire.wav,db20,1};
           soundContinuous=0;
           displayName =  40mmHE;
           displayNameMagazine = 40mmHE;
           shortNameMagazine = 40mm;
           dispersion=0.0015;
        };
};



class CfgVehicles
{
        class All {};
        class AllVehicles: All {};
        class Land: AllVehicles {};
        class LandVehicle: Land {};
        class Tank: LandVehicle {};
        class M113: Tank{};
        class M42: M113
        {
           armor=350;
           armorStructural=4.2;
                class HitTurret { armor=1.0;material=51;name=turet;passThrough=1;};
           class HitGun {armor=0.8;material=52;name=gun;passThrough=1;};
           canfloat = false;
           gunnerOpticsModel = "optika_zsu_gunner";
           outGunnerMayFire=true;
           forcehidegunner = true;
           hasCommander=false;
           driverIsCommander=false;
           viewGunnerInExternal = true;
           soundEngine[]={\M42\Engine.wav,db-10,1};
           side=TWest;
           scope=public;
           nameSound="Tank";
           crew=SoldierWCrew;      
           displayName="M42 'Duster'";
           maxSpeed=38;
           transportSoldier = 0;
           cost=100000;  
     
           model="\M42\M42";
           weapons[]={40mm};
           magazines[]={40mm};  

           // The M113 is blind as a bat so we need to restore the default Tank class values
           irScanRangeMin=500;
           irScanRangeMax=4000;
           irScanToEyeFactor=1;
           irScanGround=false;

           
           commanderCanSee = CanSeeAll;
                gunnerCanSee = CanSeeRadarC+CanSeeOptics+CanSeeEar;

           commanderAction = ManActBMPcommanderout;
           commanderInAction = ManActBMPcommander;
           driverAction = ManActBMPGunnerOut;
           gunnerAction = ManActZSUGunner;
           driverInAction = ManActT55Driver;
           gunnerInAction = ManActZSUGunner;

           class TurretBase
                {
              gunAxis = "OsaHlavne";
              turretAxis = "OsaVeze";
              soundServo[]={Vehicles\gun_elevate,db-30,1.0};

              gunBeg = "usti hlavne";
              gunEnd = "konec hlavne";

              minElev=-10; maxElev=+90;
              minTurn=-360; maxTurn=+360;

              body = "OtocVez";
              gun = "OtocHlaven";
           };
           class Turret: TurretBase {};

           accuracy=0.20;
                type=VArmor;
           //threat[] VSoft, VArmor, VAir
           threat[]={0.8, 0.6, 1};
        };
};

orsone

  • Guest
Re:M42 'Duster' 40mm A/A
« Reply #2 on: 29 Aug 2003, 12:09:13 »
Hey KillSwitch..thanks for your reply. I tried your altered config but it still wont work.

Can i just clarify a few things with you , as you seem to be a guy who knows what he is doing.
   
Firstly..My model is still just a basic gray , with no textures loaded .
I have set the Geometry LOD and given it MASS . I have not yet defined any movements through animation, i.e track , turret and hatches.
I intend it to be a close version of the Vulcan.
2 x crew.
The main armament is twin 40mm .
Basicaly all i have is a model and would appreciate some instruction on how to make a tracked AA vehicle (I know your speciality is boom sticks but you sure know more than me about addon making)
Please can someone make an ' AFV tutorial '

Thanks again for this and any other help i can get
(full credits for any help will follow the model)
« Last Edit: 29 Aug 2003, 12:09:57 by orsone »

Offline Killswitch

  • Members
  • *
  • Peace, cheese and ArmA
Re:M42 'Duster' 40mm A/A
« Reply #3 on: 29 Aug 2003, 14:17:46 »
Basicaly all i have is a model and would appreciate some instruction on how to make a tracked AA vehicle (I know your speciality is boom sticks but you sure know more than me about addon making)
Please can someone make an ' AFV tutorial '
Heh... "boom stick specialty". Nah, fixing the kid's gun got me obsessed for a while. I just "compared notes" with a bunch of other weapon addons and saw similarities.

Anyway, I usually only fix(*) the configs after the makers have gotten them modelled and all, and it already shows in game. The modelling part is, for now, pure magic to me. (Programmers don't do visual arts very good. If they do, they're not programmers.  ;D )

So I guess my advice would have to be to look around both here and in the official forums (The Oxygen and/or Breathe forums) for hints as to how to make a vehicle. I believe there is or was a simple tutorial on making models for OFP, starting out with things even I might be able to model ("lets make a wooden box"). Can't remember where, though...

(*) Fix: usually means adding a proper requiredAddons[] specification that far too many addon makers never really get right. Even the big-name addon makers... :-X

orsone

  • Guest
Re:M42 'Duster' 40mm A/A
« Reply #4 on: 29 Aug 2003, 16:43:23 »
The models nearly finished...just need to get it to move.

Killswitch...I got the modeling skills and you got the tech know how.
sounds like we could make great stuff between us  8)



Interested ?    ;D
« Last Edit: 29 Aug 2003, 21:05:05 by orsone »

Offline Killswitch

  • Members
  • *
  • Peace, cheese and ArmA
Re:M42 'Duster' 40mm A/A
« Reply #5 on: 30 Aug 2003, 14:10:58 »
The models nearly finished...just need to get it to move.

Killswitch...I got the modeling skills and you got the tech know how.
sounds like we could make great stuff between us  8)



Interested ?    ;D
Hmm...bites tounge, looks at my lecture schedule for the autumn...grmmbl...

I do have a fledgling interest in old armour... Ok, I'm in.  Lets get this baby rolling in OFP. :)


orsone

  • Guest
Re:M42 'Duster' 40mm A/A
« Reply #6 on: 30 Aug 2003, 23:42:06 »
Thats too cool killswitch !
I have progressed some since i last posted.
ITS IN-GAME !!! :D
 still no textures and a config ripped from mac and marfs vulcan.

Got a prob with the turret rotation, it kind of orbits rather than rotates.
The interior isnt finished so i am not too concerned by the fact that the driver pops out of the bottom when 'turned out' !
 As its a vulcan config its geared to a 2 man crew ,  but i need a 3 man crew with commander.
Here is the config./*

unofficial.M42 'Duster'.addon

M42 ' Duster' Tracked Anti Aircraft by Orson and killswitch ( heheh )



*/

class CfgPatches
{
   class M42
   {
      units[] = {M42};
      weapons[] = {"40mm, M56A3, Mk149"};
      requiredVersion = 1.01;
   };
};

class CfgAmmo
{
   class Default   {};
   class BulletSingle: Default {};
   class ExplosiveBullet: BulletSingle {};
   class Bullet4x20: ExplosiveBullet {};
  class M56A3: Bullet4x20
   {
      hit=25;
      indirectHit=8;
      indirectHitRange=4;
      minRange=20;
      minRangeProbab=0.800000;
      midRange=500;
      midRangeProbab=0.950000;
      maxRange=3000;
      maxRangeProbab=0.050000;
      cost=30;  
   };

  class Mk149: ExplosiveBullet
   {
      explosive=0;
      hit=40;
      indirectHit=60;
      indirectHitRange=1;
      minRange=20;
      minRangeProbab=0.800000;
      midRange=500;
      midRangeProbab=0.950000;
      maxRange=3000;
      maxRangeProbab=0.050000;
      cost=200;
      soundHit[]={"\m2a2\double_expl.wss",31.622778,1};  
   };
};


class CfgWeapons
{  
   class Default {};
   class MGun: Default   {};
   class MachineGun7_6: MGun   {};
   class MachineGun30: MachineGun7_6   {};
   class VulcanCannon: MachineGun30 {};
  class 40mm: VulcanCannon
   {
      magazines[]={"M56A3", "Mk149"};
      reloadTime=0.150000;
   };

  class Mk149: VulcanCannon
  {
    displayName="Mk149 20mm (APDS)";
    displayNameMagazine="Mk149";
    shortNameMagazine="Mk149";
    ammo="Mk149";
      scopeWeapon=2;
      scopeMagazine=2;
      shotFromTurret=1;
      autoFire=1;
      magazineReloadTime=1.500000;
      count=1100;
      reloadTime=0.140000;
      initSpeed=1000;
//      sound[]={"\M42\Fire.wav",3.162278,1};
      flashSize=1.100000;
      maxLeadSpeed=450;
      optics=1;
      ffCount=1;
      multiplier=3;
  };

  class M56A3: VulcanCannon
  {
    displayName="M56A3 20mm";
    displayNameMagazine="M56A3";
    shortNameMagazine="M56A3";
    ammo="M56A3";
      count=1000;
      multiplier=4;
      initSpeed=900;
      flashSize=1.200000;
      reloadTime=0.150000;
      dispersion=0.001500;
      maxLeadSpeed=900;
      aiRateOfFire=0.300000;
      aiRateOfFireDistance=3000;
  };    
};

class CfgVehicles
{
   class All {};
   class AllVehicles: All {};
   class Land: AllVehicles {};
   class LandVehicle: Land {};
   class Tank: LandVehicle {};
   class APC: Tank {};
   class M113: APC {};
   class Vulcan: M113 {};
   class M42: Vulcan
  {
     displayName="M42 Duster";
     picture="\M42\idust.paa";
    icon="\M42\antiac.paa";
     model="\M42\M42.p3d";
      crew="SoldierWCrew";
      armor=280;
      cost=1000000;
      irScanRange=4000;
      irScanGround=0;
      gunnerCanSee="4+8+16 +1";
      weapons[]={"40mm"};
      magazines[]={"M56A3", "Mk149"};
      class Turret
      {
         gunAxis="OsaHlavne";
         turretAxis="OsaVeze";
         soundServo[]={"Vehicles\gun_elevate",0.031623,1.000000};
         gunBeg="usti hlavne";
         gunEnd="konec hlavne";
         body="OtocVez";
         gun="OtocHlaven";
         minElev=-3;
         maxElev=70;
         minTurn=-360;
         maxTurn=360;
      };
      threat[]={0.500000,0.500000,1};
      gunnerOpticsModel="optika_zsu_gunner";
      commanderOpticsModel="optika_tanke_auxiliary";
      gunnerAction="ManActVulcanGunner";
      gunnerInAction="ManActVulcanGunner";
      forceHideGunner=1;
      viewGunnerInExternal=1;
      transportSoldier=1;

      initCargoAngleY=90;
      class TransportMagazines
      {
         class _xx_M16
         {
            magazine="M16";
            count="30*1";
         };
         class _xx_M60
         {
            magazine="M60";
            count="5*1";
         };
         class _xx_HandGrenade
         {
            magazine="HandGrenade";
            count="10*1";
         };
         class _xx_M21
         {
            magazine="M21";
            count="10*1";
         };
         class _xx_LAWLauncher
         {
            magazine="LAWLauncher";
            count="3*1";
         };
         class _xx_GrenadeLauncher
         {
            magazine="GrenadeLauncher";
            count="3*1";
         };
      };
   };
};

class CfgNonAIVehicles
{
   class ProxyCrew {};
   class Proxygunner: ProxyCrew {};
   class Proxyvulcangunner: Proxygunner {};
};

class CfgVehicleActions
  {
    vulcangunner="vulcangunner";
  };

class CfgMovesMC
{
   class Default {};
   class DefaultDie: Default {};
   class States
   {
      class Driver: Default {};
      class VulcanGunner: Driver
      {
         file="\vulcan\vulcangunnerstat.rtm";
         speed=10000000000.000000;
         looped=1;
         variantsAI[]={"VulcanGunnerV1",0.700000,"VulcanGunner"};
         interpolateWith[]={"VulcanGunnerV1",0.500000};
         equivalentTo="VulcanGunner";
         interpolationSpeed=1;
         connectTo[]={"VulcanGunnerDying",1};
      };
      class VulcanGunnerV1: VulcanGunner
      {
         file="\vulcan\vulcangunner.rtm";
         speed="- 4";
         looped=1;
      };
      class VulcanGunnerDying: DefaultDie
      {
         actions="NoActions";
         file="\vulcan\vulcangunnersmrt.rtm";
         speed="- 1";
         looped=0;
         soundEnabled=0;
         connectFrom[]={"VulcanGunner",1};
      };
      class VulcanGunnerDead: VulcanGunnerDying
      {
         actions="DeadActions";
         file="\vulcan\vulcangunnersmrt2.rtm";
         speed=10000000000.000000;
         terminal=1;
         connectFrom[]={"VulcanGunnerDying",1};
         connectTo[]={"DeadState",1};
      };
   };
};
class CfgModels
{   
   class Default{};
   class Vehicle: Default{};
   class M113: Vehicle{};
   class M42: M113{};
};

orsone

  • Guest
Re:M42 'Duster' 40mm A/A
« Reply #7 on: 31 Aug 2003, 15:24:14 »
Hey KillSwitch dude...Are you there ?
Help meh please !! I am running out of cigarettes and hair !

Offline Killswitch

  • Members
  • *
  • Peace, cheese and ArmA
Re:M42 'Duster' 40mm A/A
« Reply #8 on: 01 Sep 2003, 09:55:32 »
Quote
Hey KillSwitch dude...Are you there ?
Help meh please !! I am running out of cigarettes and hair !
Sorry...yeah, I'm here, doing research and some thinking... :-)

I have progressed some since i last posted.
ITS IN-GAME !!! :D
 still no textures and a config ripped from mac and marfs vulcan.

Got a prob with the turret rotation, it kind of orbits rather than rotates.
The interior isnt finished so i am not too concerned by the fact that the driver pops out of the bottom when 'turned out' !
 As its a vulcan config its geared to a 2 man crew ,  but i need a 3 man crew with commander.

I'll see if I can whip up a three-man config. Now, about the turret - that sounds like some kind of rotation axis alignment problem within the model. I had a brief look at Oxygen light and the old Shilka model from the demo. Names like Osa Veze in the Memory LOD comes up...well... lol I'm hoping you have a better grasp of that than me...

Driver popping out of the bottom? Upside down or "parts of him sticks out other than his mug?" Again, my guess is alignment and/or the fact that you are using the Vulcan crew animations. Again, I guess further studies of the magics of custom animations are needed...

Todo:
  • Compare 2-man vehicles (Shilka/Vulcan/M113) with 3-dude tin cans (tanks, bradleys, bmp:s), both models and configs.
  • Read even more on the art of OFP modelling  :P
I suggest you try the same, i.e. take a brake from modelling and browse the modelling and config forums both here and on the official forum. One always picks up something useful that way.  ;D

Ok, back to research! Hope you get the turret aligned...
« Last Edit: 01 Sep 2003, 10:25:39 by Killswitch »

orsone

  • Guest
Re:M42 'Duster' 40mm A/A
« Reply #9 on: 01 Sep 2003, 13:41:14 »
Dude you are on the same wave as i am , thats exactly what i have done.

I have nearly got the turret to rotate correctly, The driver no longer pops out of the bottom and i have configured it with a 3 man crew .
My new prob is with the Commander proxy.
I am using the m2a2 Commander and driver with the Vulcan Gunner.
What do i need to do to show the commander in his 'turned in' state.
Because its on open turret you should be able to see the commander sat next to the gunner (who i can see), but there is no sign of the commander in game.
Also i need to be able to traverse the turret with the crew 'turned out'.

I have searched OPFinfo forums , this one and the Breath o2 forum with no results.
I am going SnowBoarding to clear my head.
Laterz  8)