Home   Help Search Login Register  

Author Topic: Weapons Crates & Troops Questions  (Read 1901 times)

0 Members and 1 Guest are viewing this topic.

captain caffeine

  • Guest
Weapons Crates & Troops Questions
« on: 25 Oct 2002, 04:08:36 »
 I've basically got the configs down for vehicles and such, but I'm having one heck of a time getting custom weapons such as the FiloV94 , into seperate cpp files for the pbo's.

  Here's what I'm trying to do, first of all I want to create an ammocrate containing a couple V94 heavy sniper rifles, heres the question, does this ammobox need to be added to the original FiloV94 pbo or what.
 
  Second  I was wanting to create just yer basic Spetznaz
Equipped with say a V94 and a Skorpion, no matter what I try
I'm getting nothing, any Ideas or thoughts would be helpful.

 Yes I realize I could just add the weapons in the init field  but that kinda defeats the purpose of what I'm lookin for.

Offline DaCoroner

  • Members
  • *
Re:Weapons Crates & Troops Questions
« Reply #1 on: 25 Oct 2002, 20:18:04 »
You can add ammo crates and/or soldiers using addon weapons in seperate .pbo files, no need to modify the original.

To make ammo crates work, inherit from an existing one and add class transportMagazines and class transportWeapons.  If you inherit from one of the existing crates you don't need to do anything else.

To put weapons on your own soldiers, such as the spetznaz, create a new soldier inheriting from class SoldierESabotuer and given them the new weapons[]={}; and magazines[]={}; that you want.

For example, the spetznaz:

class All{};
class AllVehicles:All{};
class Land: AllVehicles{};  
class Man: Land{};
class Soldier: Man{};
class SoldierEB: Soldier{};  
class SoldierESaboteur: SoldierEB{};
class DAC_Spetnaz: SoldierESaboteur
{
   weapons[]={"MyGun","MyPistol","Throw","Put"};
   magazines[]={"MyMag","MyMag","MyPistolMag","MyPistolMag","HandGrenade"};
};

Add them to the units in classCfgPatches and you're done.

Hope that helps.

captain caffeine

  • Guest
Re:Weapons Crates & Troops Questions
« Reply #2 on: 26 Oct 2002, 01:28:20 »
So you're saying that I dont have to modify any custom made pbo's,  say under      weapons I can just make as such

class All{};
class AllVehicles:All{};
class Land: AllVehicles{};  
class Man: Land{};
class Soldier: Man{};
class SoldierEB: Soldier{};  
class SoldierESaboteur: SoldierEB{};
class DAC_Spetnaz: SoldierESaboteur
{
  weapons[]={"FiloV94","Skorpion","Throw","Put"};
  magazines[]={"V94Mag","V94Mag","SkorpionMag","SkorpionMag","HandGrenade"};
 
  So I dont need to Include the cfgweapons or ammo part
or will that be necessary as well, but from what I gather I wont need to include say the p3d's for the FiloV94
 If thats the case then it doesnt seem to be to bad
I have a tendancy to make things more difficult than they need to be



Offline DaCoroner

  • Members
  • *
Re:Weapons Crates & Troops Questions
« Reply #3 on: 27 Oct 2002, 05:40:43 »
Right, you don't need to include cfgWeapons, cfgAmmo, or cfgAnyhtingElseYouDidn'tChange :)

You will need to add a few things to that example I gave you though to make it useable.  Well, at least add a custom displayName="Something Unique"; and maybe even vehicleClass="My Men"; to keep them separated from the rest.

In a simple addon like this you'll only need cfgPatches and cfgVehicles.  The only time you should need to go in and modify someone else .pbo is if you want to make a change to a weapon, for example, without changing any units also included in their .pbo and without having to write your own replacements.

The fun part is when you start adding custom player models :)

captain caffeine

  • Guest
Re:Weapons Crates & Troops Questions
« Reply #4 on: 27 Oct 2002, 07:21:59 »
 
 Well I gave it a try, bout 30 times now and no luck, was just reading an area in the forums that PRE-Resistance Soldier models are not formatted  to accept pistols, gonna try one without pistols, if thats the case WE NEED NEW SPETZNAZ
so please any modelers out there reading this if thats the case I'm asking nicley and saying PLEASSSE.  

Offline DaCoroner

  • Members
  • *
Re:Weapons Crates & Troops Questions
« Reply #5 on: 28 Oct 2002, 00:40:13 »
Should work fine with the game's spetznaz model, I have a working one of my own with pistols.  All I did was rename a copy of the original model so I could reskin it, but I didn't change anything other than a few path names in the model and I saw the beretta proxy in there.  Here is a cut&paste of one of my working ones with the original model:

class CfgPatches
{
   class DAC_ops
   {
      units[] = {DAC_op1};
      weapons[] = {};
      requiredVersion = 1.85;
   };
};

class CfgModels
{
   class Default
   {
      sections[]={};
      sectionsInherit="";
   };
   class Man: Default
   {
      sections[] =
      {
         "head injury","body injury",
         "l arm injury","r arm injury","p arm injury",
         "l leg injury","r leg injury","p leg injury",
         "medic",
         "hlava",
         "krk",
         "zasleh"
      };
      sectionsInherit=Head;
   };
   class DAC_op1: Man{};
};

class CfgVehicles
{
   class All{};
   class AllVehicles:All{};
   class Land: AllVehicles{};  
   class Man: Land{};
   class Soldier: Man{};
   class SoldierEB: Soldier{};
   class SoldierESaboteur: SoldierEB{};
   class DAC_op1: SoldierESaboteur
   {
      scope=2;
      vehicleClass="DAC SF";
      displayName="Spetznaz (G36a)";

      weaponSlots="1 + 16 + 2*4096 + 10*256 + 2 + 4*32";
      weapons[]={"G36a","GlockS","Throw","Put"};
      magazines[]={"G36aMag","G36aMag","G36aMag","G36aMag","G36aMag","G36aMag","GlockSMag","GlockSMag","GlockSMag","GlockSMag"};
   };
};

« Last Edit: 28 Oct 2002, 00:45:22 by DaCoroner »

captain caffeine

  • Guest
Re:Weapons Crates & Troops Questions
« Reply #6 on: 28 Oct 2002, 03:29:15 »
 COOL I'm gonna give it a try, If this works , which I'm sure it will you've made my day, are you're Speznaz gonna be retextured in new cammo instead of plain ole black specops
stuff, I hope so cause from what I've seen theres only so much that can be done with the color patern, I would really like to see you're finished product when you're done.
         
  I would try retexturing but havent the patience for it so to all you who can all I have to say keep up the good work
and keep thos addons coming in.