Home   Help Search Login Register  

Author Topic: new weapon config help please  (Read 1710 times)

0 Members and 1 Guest are viewing this topic.

monoloth69

  • Guest
new weapon config help please
« on: 21 May 2004, 03:08:48 »
OK, I got permission to remodel the original Xbow by pathfinder for Kueters upcoming campaign, but I am having some difficulties regarding the following config:


#define TEast 1
#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

// type scope
#define private 0
#define protected 1
#define public 2

#define WeaponNoSlot            0// dummy weapons
#define WeaponSlotPrimary      1// primary weapons
#define WeaponSlotSecondary   16// secondary weapons
#define WeaponSlotItem         256// items
#define WeaponSlotBinocular   4096// binocular
#define WeaponHardMounted      65536

class CfgPatches
{
   class DOA_CrossBow
   {
      units[] = {SoldierWDOA_CrossBow};
      weapons[] = {DOA_CrossBow};
      ammo[] = {DOA_Bolt};
      requiredVersion = 1.91;
   };
};
class CfgRecoils
{
   DOA_CrossBowRecoil[]={0.010000,0.001000,0.001000,0.100000,0,0};
};

class CfgAmmo
{
   class default {};
                  class BulletSingle:default {};
   class BulletSniper: BulletSingle {};
   class DOA_CrossBow:BulletSniper
   {
      hit=12;
      indirectHit=9;
      indirectHitRange=0.0100000;
      tracerColor[]={1,0,0,0.100000};
      tracerColorR[]={1,0,0,0.010000};
      minRange=10;
      minRangeProbab=0.800000;
      midRange=100;
      midRangeProbab=0.950000;
      maxRange=300;
      maxRangeProbab=1.000000;
      thrustTime=1.0; //alter the thrust, thrusttime and maxspeed for changing the arc
      thrust=345;
      maxSpeed=300;
      model="\DOA_CrossBow\DOA_Bolt.p3d"; //The model of the ammo to be fired.
      simulation="shotbullet";
      visibleFire=1;
         audibleFire=0;
      soundFly[]={"",1,1};
         soundHit[]={"",1,1}; //when it hits
         soundhitGround[]={"soundHit",1}; //when it hits ground....ect ect....
         soundhitMan[]={"soundHit",1};
         soundhitArmor[]={"soundHit",1};
         soundhitBuilding[]={"soundHit",1};
   };              
};

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

class CfgWeapons
{
   class default{};
   class MGun: default {};
   class Riffle: MGun {};
   class SniperRiffle: Riffle{};
   class DOA_CrossBow: SniperRiffle
   {
      scopeWeapon=2;
      scopeMagazine=2;
      modelSpecial="\DOA_CrossBow\DOA_CrossBowB.p3d";
      model="\DOA_CrossBow\DOA_CrossBow.p3d";
      picture="\DOA_CrossBow\DOA_CrossBow.paa";
      //sound[]={"\XBOW\XBOWshot.ogg",15.000000,0.90000};
      reloadSound[]={"",1,1};
         reloadMagazineSound[]={"",1,1};
      count=5; //number of shots
      dispersion=0.000200;
      ammo="DOA_CrossBow";
      recoil="DOA_CrossBowRecoil";
      reloadTime=1.5; //change this value to increase time between shots. Its in seconds.
      magazineReloadTime=3; //ditto but for magazines.
          optics=1;
      modelOptics=""; //put whatever optics you like here
      opticsZoomMin=0.40000;
      opticsZoomMax=0.40000;
      distanceZoomMin=100;
      distanceZoomMax=500;
          magazines[]={"DOA_CrossBowQuivermag"};
      displayName="DOA CROSSBOW";
      useAction=0;
            useActionTitle="";
   };
   class DOA_CrossBowQuivermag: DOA_CrossBow
   {
      scopeWeapon=0;
      scopeMagazine=2;
      displayNameMagazine="Bolts";
      shortNameMagazine="Bolts";
      //picture="\XBOW\XBOWmag.pac"; //same as weapon picture only for the ammo, picture needs to be 64x64 pixels
   };
};

class CfgVehicles
{
   class All{};
   class AllVehicles: All{};
   class Land: AllVehicles{};
   class Man: Land{};
   class SoldierWB: Man{};

   class SoldierWDOA_CrossBow: SoldierWB
   {
      displayName="Soldier (DOA_CrossBow)"; //change this to whatever you want your soldier to be called
      vehicleClass="Men";
      weaponSlots="1    +    16    + 10*      256    + 2*   4096    +    2    + 4*   32";
      weapons[]={"DOA_CrossBow","NVGoggles","Throw","Put"};
      magazines[]={"DOA_CrossBowQuivermag","DOA_CrossBowQuivermag","DOA_CrossBowQuivermag","DOA_CrossBowQuivermag","DOA_CrossBowQuivermag"};
   };
};

class CfgNonAIVehicles
{
   class ProxyWeapon {};
   class ProxyDOA_CrossBow: ProxyWeapon {};
};


I have all the models, made and ready to wrap into a working addon, but the problems I am having are as follows:

1.  When I fire the weapon, the "bolt"(DOA_Bolt) does not leave the weapon like it has been fired, and I would like for this to happen.

2.  I cant seem top get the custom scope I made to work ingame, when the V button (my keyboard configuration for the scope view) is pressed.

So basically what I am trying to do is be able to fire the weapon, have the bolt fly out, and then a new bolt "appears" since I have made this to Kueters specs and he wants it to be a 5-shot Crossbow, with a 5-Bolt reload clip.  I havent added the sounds yet, I am too hung up on getting it to fire first.  
If anyone can give me a hand and take a look at this, or if anyone needs the models to try to make it work, just post here, or contact me @ the following with DOA_Bow in the subject line.

monoloth@disciples-squad.net

Offline Pathy

  • Former Staff
  • ****
  • I'm not a F***in llama!
    • Volcbat.
Re:new weapon config help please
« Reply #1 on: 21 May 2004, 10:30:18 »
Hiya mate, ermmm you must have missed what i said in the email i sent. Try this.
BTW, you need to specify an optics path.

Quote
#define TEast 1
#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

// type scope
#define private 0
#define protected 1
#define public 2

#define WeaponNoSlot            0// dummy weapons
#define WeaponSlotPrimary      1// primary weapons
#define WeaponSlotSecondary   16// secondary weapons
#define WeaponSlotItem         256// items
#define WeaponSlotBinocular   4096// binocular
#define WeaponHardMounted      65536

class CfgPatches
{
   class DOA_CrossBow
   {
      units[] = {SoldierWDOA_CrossBow};
      weapons[] = {DOA_CrossBow};
      ammo[] = {DOA_Bolt};
      requiredVersion = 1.91;
   };
};
class CfgRecoils
{
   DOA_CrossBowRecoil[]={0.010000,0.001000,0.001000,0.100000,0,0};
};

class CfgAmmo
{
   class default {};
                  class BulletSingle:default {};
   class BulletSniper: BulletSingle {};
   class DOA_CrossBow:BulletSniper
   {
      hit=12;
      indirectHit=9;
      indirectHitRange=0.0100000;
      tracerColor[]={1,0,0,0.100000};
      tracerColorR[]={1,0,0,0.010000};
      minRange=10;
      minRangeProbab=0.800000;
      midRange=100;
      midRangeProbab=0.950000;
      maxRange=300;
      maxRangeProbab=1.000000;
      thrustTime=1.0; //alter the thrust, thrusttime and maxspeed for changing the arc
      thrust=345;
      maxSpeed=300;
      model="\DOA_CrossBow\DOA_Bolt.p3d"; //The model of the ammo to be fired.
      simulation="shotbullet";
      visibleFire=1;
        audibleFire=0;
      soundFly[]={"",1,1};
        soundHit[]={"",1,1}; //when it hits
        soundhitGround[]={"soundHit",1}; //when it hits ground....ect ect....
        soundhitMan[]={"soundHit",1};
        soundhitArmor[]={"soundHit",1};
        soundhitBuilding[]={"soundHit",1};
   };              
};

class CfgModels
{
   class Default{};
   class Weapon: Default{};
   class DOA_CrossBow: Weapon {};
   class DOA_CrossBowB: Weapon {};
};

class CfgWeapons
{
   class default{};
   class MGun: default {};
   class Riffle: MGun {};
   class SniperRiffle: Riffle{};
   class DOA_CrossBow: SniperRiffle
   {
      scopeWeapon=2;
      scopeMagazine=2;
      modelSpecial="\DOA_CrossBow\DOA_CrossBowB.p3d";
      model="\DOA_CrossBow\DOA_CrossBow.p3d";
      picture="\DOA_CrossBow\DOA_CrossBow.paa";
      //sound[]={"\XBOW\XBOWshot.ogg",15.000000,0.90000};
      reloadSound[]={"",1,1};
        reloadMagazineSound[]={"",1,1};
      count=5; //number of shots
      dispersion=0.000200;
      ammo="DOA_CrossBow";
      recoil="DOA_CrossBowRecoil";
      reloadTime=1.5; //change this value to increase time between shots. Its in seconds.
      magazineReloadTime=3; //ditto but for magazines.
          optics=1;
      modelOptics="PUT THE OPTICS PATH HERE!"; //put whatever optics you like here
      opticsZoomMin=0.40000;
      opticsZoomMax=0.40000;
      distanceZoomMin=100;
      distanceZoomMax=500;
          magazines[]={"DOA_CrossBowQuivermag"};
      displayName="DOA CROSSBOW";
      useAction=0;
            useActionTitle="";
   };
   class DOA_CrossBowQuivermag: DOA_CrossBow
   {
      scopeWeapon=0;
      scopeMagazine=2;
      displayNameMagazine="Bolts";
      shortNameMagazine="Bolts";
      //picture="\XBOW\XBOWmag.pac"; //same as weapon picture only for the ammo, picture needs to be 64x64 pixels
   };
};

class CfgVehicles
{
   class All{};
   class AllVehicles: All{};
   class Land: AllVehicles{};
   class Man: Land{};
   class SoldierWB: Man{};

   class SoldierWDOA_CrossBow: SoldierWB
   {
      displayName="Soldier (DOA_CrossBow)"; //change this to whatever you want your soldier to be called
      vehicleClass="Men";
      weaponSlots="1    +    16    + 10*      256    + 2*   4096    +    2    + 4*   32";
      weapons[]={"DOA_CrossBow","NVGoggles","Throw","Put"};
      magazines[]={"DOA_CrossBowQuivermag","DOA_CrossBowQuivermag","DOA_CrossBowQuivermag","DOA_CrossBowQuivermag","DOA_CrossBowQuivermag"};
   };
};

class CfgNonAIVehicles
{
   class ProxyWeapon {};
   class ProxyDOA_CrossBow: ProxyWeapon {};
   class ProxyDOA_CrossBowB: ProxyWeapon {};
};
« Last Edit: 21 May 2004, 10:31:24 by Pathy »

monoloth69

  • Guest
Re:new weapon config help please
« Reply #2 on: 24 May 2004, 02:54:25 »
// some basic defines
//delete all this extra crap ive added in to explain everything as soon as your ready.
#define TEast 1
#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

// type scope
#define private 0
#define protected 1
#define public 2

#define WeaponNoSlot            0// dummy weapons
#define WeaponSlotPrimary      1// primary weapons
#define WeaponSlotSecondary   16// secondary weapons
#define WeaponSlotItem         256// items
#define WeaponSlotBinocular   4096// binocular
#define WeaponHardMounted      65536

class CfgPatches
{
   class DOA_CrossBow
   {
      units[] = {SoldierWDOA_CrossBow};
      weapons[] = {DOA_CrossBow};
      ammo[] = {DOA_Bolt};
      requiredVersion = 1.91;
   };
};
class CfgRecoils
{
   DOA_CrossBowRecoil[]={0.010000,0.001000,0.001000,0.100000,0,0};
};

class CfgAmmo
{
   class default {};
                  class BulletSingle:default {};
   class BulletSniper: BulletSingle {};
   class DOA_CrossBow:BulletSniper
   {
      hit=12;
      indirectHit=9;
      indirectHitRange=0.0100000;
      tracerColor[]={1,0,0,0.100000};
      tracerColorR[]={1,0,0,0.010000};
      minRange=10;
      minRangeProbab=0.800000;
      midRange=100;
      midRangeProbab=0.950000;
      maxRange=300;
      maxRangeProbab=1.000000;
      thrustTime=1.0; //alter the thrust, thrusttime and maxspeed for changing the arc
      thrust=345;
      maxSpeed=300;
      model="\DOA_CrossBow\DOA_Bolt.p3d"; //The model of the ammo to be fired.
      simulation="shotbullet";
      visibleFire=1;
   Â Â Â Â Â Â audibleFire=0;
      soundFly[]={"",1,1};
   Â Â Â Â Â Â soundHit[]={"",1,1}; //when it hits
   Â Â Â Â Â Â soundhitGround[]={"soundHit",1}; //when it hits ground....ect ect....
   Â Â Â Â Â Â soundhitMan[]={"soundHit",1};
   Â Â Â Â Â Â soundhitArmor[]={"soundHit",1};
   Â Â Â Â Â Â soundhitBuilding[]={"soundHit",1};
   };              
};

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

class CfgWeapons
{
   class default{};
   class MGun: default {};
   class Riffle: MGun {};
   class SniperRiffle: Riffle{};
   class DOA_CrossBow: SniperRiffle
   {
      scopeWeapon=2;
      scopeMagazine=2;
      modelSpecial="\DOA_CrossBow\DOA_CrossBowB.p3d";
      model="\DOA_CrossBow\DOA_CrossBow.p3d";
      picture="\DOA_CrossBow\DOA_CrossBow.paa";
      //sound[]={"\XBOW\XBOWshot.ogg",15.000000,0.90000};
      reloadSound[]={"",1,1};
   Â Â Â Â Â Â reloadMagazineSound[]={"",1,1};
      count=5; //number of shots
      dispersion=0.000200;
      ammo="DOA_CrossBow";
      recoil="DOA_CrossBowRecoil";
      reloadTime=1.5; //change this value to increase time between shots. Its in seconds.
      magazineReloadTime=3; //ditto but for magazines.
          optics=1;
       modelOptics="\DOA_CrossBow\XbowScope.paa";                    opticsZoomMin=0.40000;
      opticsZoomMax=0.40000;
      distanceZoomMin=100;
      distanceZoomMax=500;
          magazines[]={"DOA_CrossBowQuivermag"};
      displayName="DOA CROSSBOW";
      useAction=0;
            useActionTitle="";
   };
   class DOA_CrossBowQuivermag: DOA_CrossBow
   {
      scopeWeapon=0;
      scopeMagazine=2;
      displayNameMagazine="Bolts";
      shortNameMagazine="Bolts";
      //picture="\XBOW\XBOWmag.pac"; //same as weapon picture only for the ammo, picture needs to be

64x64 pixels
   };
};

class CfgVehicles
{
   class All{};
   class AllVehicles: All{};
   class Land: AllVehicles{};
   class Man: Land{};
   class SoldierWB: Man{};

   class SoldierWDOA_CrossBow: SoldierWB
   {
      displayName="Soldier (DOA_CrossBow)"; //change this to whatever you want your soldier to be called
      vehicleClass="Men";
      weaponSlots="1    +    16    + 10*      256    + 2*   4096    +    

2    + 4*   32";
      weapons[]={"DOA_CrossBow","NVGoggles","Throw","Put"};
      

magazines[]={"DOA_CrossBowQuivermag","DOA_CrossBowQuivermag","DOA_CrossBowQuivermag","DOA_CrossBow

Quivermag","DOA_CrossBowQuivermag"};
   };
};

class CfgNonAIVehicles
{
   class ProxyWeapon {};
   class ProxyDOA_CrossBow: ProxyWeapon {};
};



As you can see I have put the optics p[ath that I made in the config, now the game gives me the following error when I try to test the addon in game:

WARNING:  preNLOD format in object doa_crossbow\xbowscope.paa

So, that is not working oput quite like I had hoped.  Also, when I leave the optics part out, just to try and test the rest of the addon ingame, it will not fire the specified ammo that I created, the DOA_Bolt,    In fact, it wont even fire at all, I reload it, the bolt is visible in the bow, but it wont fire.  That is using the config posted by Pathy above.

When I use the original config I posted in the very beginning of this post, and take out the optics to avoid the error, it will fire, but without the bolt being animated.

I will default back to the M21 optic, that is of little concern, but I am desperately needing this bolt animation to work.
« Last Edit: 24 May 2004, 03:01:48 by monoloth69 »

Offline Pathy

  • Former Staff
  • ****
  • I'm not a F***in llama!
    • Volcbat.
Re:new weapon config help please
« Reply #3 on: 24 May 2004, 17:44:10 »
Ok beyond my help then  ::)

Offline oyman

  • Members
  • *
  • king of pings
Re:new weapon config help please
« Reply #4 on: 24 May 2004, 18:32:05 »
umm i think optics have to be in .p3d format,you just cant use a texture, so open up a optic from the demo or something and texture with your texture and call it DOA_optic or something :)
« Last Edit: 24 May 2004, 18:34:07 by oyman »

monoloth69

  • Guest
Re:new weapon config help please
« Reply #5 on: 25 May 2004, 05:14:34 »
Thank you Oyman, not if anyone out there can just manage to help me with getting the bolt to fly out of the damm bow!

Offline oyman

  • Members
  • *
  • king of pings
Re:new weapon config help please
« Reply #6 on: 25 May 2004, 18:35:03 »
hmm, ive got an idea why dont you define the weapons and ammo as a m203 grenade and give it simulation=shotbullet which will make it fly like a bullet
and give it explosive=false so it wont explode, maybe that will work ???