Home   Help Search Login Register  

Author Topic: Mortar modification: Require help  (Read 1177 times)

0 Members and 1 Guest are viewing this topic.

Baphomet

  • Guest
Mortar modification: Require help
« on: 11 Oct 2002, 09:17:06 »
      I'll note right off that this is -not- intended to be a modification unto itself. Its a modification of the mortar weapon that comes with the game. I want to increase the magazine capacity of this and the flares. Again, no I'm not using this for cheating purposes. I figure I don't have all that needs to be coded in for this to work. I'd really like some help finishing this.




// some basic defines
#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

// 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 CfgAmmo
{
 
      class default {};
      class Grenade : default{};
                         class MortarShell : Grenade // mortar soldier
   {
      hit=50;indirectHit=40;indirectHitRange=10;
      minRange=45;minRangeProbab=0.50;
      midRange=240;midRangeProbab=0.55;
      maxRange=450;maxRangeProbab=0.00;
      model=mortarShell;
      //soundHit[]={Explosions\hellfire,db40,1};
      soundHit[]={Explosions\expl4,db20,1};
      cost=120;
   };
};

class CfgWeapons
{
class Default {};
class GrenadeLauncher: Default {};
class Mortar : GrenadeLauncher
   {
      //--
      scopeWeapon = private;
      scopeMagazine = public;

      modelSpecial="m16_mortar_proxy";

      // weaponType = WeaponSlotSecondary;
      magazineType = 1;
      ammo=MortarShell;
      displayName = $STR_DN_MORTAR_W;
      displayNameMagazine = $STR_MN_MORTAR_W;
      shortNameMagazine = $STR_SN_MORTAR_W;
      count=1;
      initSpeed=70;

      reloadAction = ManActReloadMortar;

      modes[] = {this, this};
      // autoReload = false;

      // primary=false;
   };

};

Offline DaCoroner

  • Members
  • *
Re:Mortar modification: Require help
« Reply #1 on: 11 Oct 2002, 20:33:30 »
You can try changing "count=1" to a higher value in each weapon (under cfgWeapons, not cfgAmmo).

The problem with flares and mortars is that they aren't handled the same as other ammo, such as the M16 magazine.  In OFP they're added individualy to the "Magazines" of whatever is carrying them. So, simply changing the count might not work. Should be worth a try though.

Baphomet

  • Guest
Re:Mortar modification: Require help
« Reply #2 on: 12 Oct 2002, 11:14:25 »
Well, I know one method that works or has worked in the past is just setting the variable "magazinetype" to "magazinetype=1" (no asterisk, nothing else) and it allows you to have tons of magazines. Far more than the game seems to allow otherwise. With my shotgun modification. One shot is one magazine and now thanks to that I've been able to carry at least 50 individual magazines at once. I'm pretty sure the greater the number the less magazines you're allowed to carry for that desired item.

I just need to finish this modification so that my cpp overrides the default values in the game. Which is what I really need help with.