Jump to content
Sign in to follow this  
Trilux

Error in Updating Damage Values [Help]

Recommended Posts

Posted (edited)

I've been tinkering with values of a mod that my Milsim unit uses. With all the mods we have somewhere along the pipeline has overly increased and made more realistic A.I. in which they also have more health but the weapons we use our simulated extremely well. The problem is the mod we use for our mortar damage range just isn't realistic and a direct impact may kill a single person on a group of 20 with no armor on. I wrote a script similar to what I'm doing here but with RHS and updated the weapon damage values just by using CfgPatches and I'm trying to do the exact same thing here but they named their ammo with a "( )" in it. Which upon compiling the addon doesn't allow it to continue as it returns an error along the lines of [line 13 expected = received "("] does anyone know a workaround or how to get this to work properly?

TL:DR - Can't update damage of an ammo type because the class name has a symbol in it that the addon builder assumes is apart of the code rather than just being apart of the name.

VZ99 CfgAmmo.hpp
 

Spoiler

  class CfgAmmo {

class SmokeShellArty;

class ShotDeployBase;

class Sh_82mm_AMOS;

class Flare_82mm_AMOS_White;

//Smokes:

class GVAR(deploy_smokeWhite): SmokeShellArty {

smokeColor[] = {1,1,1,1};

effectsSmoke = QEGVAR(filledSmoke,bigSmoke);

};

class GVAR(deploy_smokeRed): SmokeShellArty {

smokeColor[] = {1,0,0,1};

effectsSmoke = QEGVAR(filledSmoke,bigSmoke);

};

class GVAR(ammo_smokeWhite): ShotDeployBase {

model = "\A3\weapons_f\ammo\shell";

submunitionAmmo = QGVAR(deploy_smokeWhite);

};

class GVAR(ammo_smokeRed): ShotDeployBase {

model = "\A3\weapons_f\ammo\shell";

submunitionAmmo = QGVAR(deploy_smokeRed);

};

//Flare:

class GVAR(ammo_flare): Flare_82mm_AMOS_White {

flareSize = 6;

intensity = 2000000;

timeToLive = 45;

};

//HE:

class GVAR(ammo_he): Sh_82mm_AMOS {

ace_frag_classes[] = {"ACE_frag_small_HD"}; //HD have move air friction

ace_frag_force = 1;

// effectFly = "ArtilleryTrails"; //Fun but not don't make any sense

fuseDistance = 50; //The minimum distance any explosive projectile has to travel, before it becomes armed and thus explodes on impact.

hit = 100;

indirectHit = 10;

indirectHitRange = 9;

muzzleEffect = "";

class CamShakeExplode {

power = "(82*0.2)";

duration = "((round (82^0.5))*0.2 max 0.2)";

frequency = 20;

distance = "((18 + 82^0.5)*8)";

};

class CamShakeHit {

power = 82;

duration = "((round (82^0.25))*0.2 max 0.2)";

frequency = 20;

distance = 1;

};

class CamShakeFire {

power = "(82^0.25)";

duration = "((round (82^0.5))*0.2 max 0.2)";

frequency = 20;

distance = "((82^0.5)*8)";

};

class CamShakePlayerFire {

power = 0.01;

duration = 0.1;

frequency = 20;

distance = 1;

};

};

class GVAR(ammo_he_airburst): GVAR(ammo_he) {

simulation = "shotRocket";

timeToLive = 0;

// explosionEffects = "HERocketExplosion"; //ExploAmmoExplosion, HEShellExplosion

// CraterEffects = "";

};

};

My CfgPatches in a separate addon I'm creating giving me the error. (Only editing the HE and HE_Multi ammo)
 

Spoiler

class CfgPatches {
     class Tri_BadFrag
     {
         units[] = {};
         weapons[] = {};
         requiredVersion = 1.00;
         requiredAddons[] = {"potato_core"};
     };
};

class CfgAmmo {
    class GVAR(ammo_he) {
        ace_frag_classes[] = {"ACE_frag_medium_HD"};
        ace_frag_force = 1;
        fuseDistance = 50;
        hit = 175;
        indirectHit = 90;
        indirectHitRange = 25;
        explosionAngle = 45;
        explosive = 1;
    };
    class GVAR(ammo_he_airburst) {
        ace_frag_classes[] = {"ACE_frag_medium_HD"};
        ace_frag_force = 1;
        fuseDistance = 50;
        hit = 200;
        indirectHit = 110;
        indirectHitRange = 40;
        explosive = 1.2;
    };
};

 

As far as I can determine the issue is that the class name having ( ) is the issue but I can't edit the original addon CfgAmmo due to their licensing. If anyone knows a solution I'm open to anything.

Edited by Trilux
Spoiler posted incorrectly

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×