rhaggan 10 Posted May 31, 2011 Guys ive got the config files from the bis grenades the poblem is i have no idea how to get it so that i can use it in my own addon. This is what i have so far can anyone point me in the right direction ? class HandGrenadeMuzzle : ThrowMuzzle { magazines[] = {"L111A1_PRAC"}; // Values from class: ThrowMuzzle // sound[] = {"", 0.000316228, 1}; reloadSound[] = {"", 0.000316228, 1}; cursor = "Air_Dot"; cursoraim = "Vehicle_Grenade_W"; cursorSize = 1; aiDispersionCoefX = 6; aiDispersionCoefY = 6; reloadTime = 0; magazineReloadTime = 0; enableAttack = 0; showEmpty = 0; autoReload = 1; modelOptics = ""; minRange = 30; minRangeProbab = 0.5; midRange = 45; midRangeProbab = 0.2; maxRange = 60; maxRangeProbab = 0.03; class L111A1_PRAC: GrenadeHand { model = "\sleepingbag\Weapons\L111A1.p3d"; deflecting = 90; explosionTime = 5; // Values from class: GrenadeHand // typicalspeed = 20; visibleFire = 0.5; audibleFire = 0.05; visibleFireTime = 1; fuseDistance = 5; // Values from class: Grenade // soundHit[] = {"Ca\sounds\Weapons\explosions\grenade_new1", 15.8489, 1, 1000}; soundFly[] = {"Ca\sounds\Weapons\explosions\noise", 0.0001, 1, 20}; soundEngine[] = {"", 0.0001, 4}; hit = 0.002; indirectHit = 0.0002; indirectHitRange = 7; cost = 40; simulation = "shotShell"; simulationStep = 0.05; CraterEffects = "GrenadeCrater"; explosionEffects = "GrenadeExplosion"; whistleDist = 7; // Values from class: Default // access = 3; proxyShape = ""; animated = 0; shadow = 0; maxSpeed = 0; cartridge = ""; tracerColor[] = {0.7, 0.7, 0.5, 0.04}; tracerColorR[] = {0.7, 0.7, 0.5, 0.04}; supersonicCrackNear[] = {"", 1, 1}; supersonicCrackFar[] = {"", 1, 1}; hitGroundSoft[] = {"soundHit", 1}; hitGroundHard[] = {"soundHit", 1}; hitMan[] = {"soundHit", 1}; hitArmor[] = {"soundHit", 1}; hitIron[] = {"soundHit", 1}; hitBuilding[] = {"soundHit", 1}; hitFoliage[] = {"soundHit", 1}; hitWood[] = {"soundHit", 1}; hitGlass[] = {"soundHit", 1}; hitGlassArmored[] = {"soundHit", 1}; hitConcrete[] = {"soundHit", 1}; hitRubber[] = {"soundHit", 1}; hitPlastic[] = {"soundHit", 1}; hitDefault[] = {"soundHit", 1}; hitMetal[] = {"soundHit", 1}; hitMetalplate[] = {"soundHit", 1}; deflectionSlowDown = 0.8; explosive = 1; effectsMissile = "ExplosionEffects"; effectsSmoke = "SmokeShellWhite"; effectsFire = "CannonFire"; timeToLive = 10; irLock = 0; airLock = 0; laserLock = 0; nvLock = 0; artilleryLock = 0; manualControl = 0; maxControlRange = 350; maneuvrability = 1; trackLead = 1; trackOversteer = 1; weaponLockSystem = 0; cmImmunity = 1; sideAirFriction = 1; artilleryDispersion = 1; artilleryCharge = 1; initTime = 0; thrustTime = 1.5; thrust = 210; airFriction = -0.0005; caliber = 1; whistleOnFire = 0; } class HandGrenade_West : HandGrenade { displayName = "L111A1 PRAC"; picture = "sleepingbag\data\L111A1_co.tga"; ammo = "L111A1_PRAC"; descriptionShort = " The L111A1 hand grenade is a British grenade used for training. It has the same weight as the L109 hand grenade. It is used in a training enviornment only."; // Values from class: HandGrenade // sound[] = {"", 0.000316228, 1}; scope = 2; value = 1; type = 256; count = 1; initSpeed = 22; nameSound = "handgrenade"; maxLeadSpeed = 7; // Values from class: CA_Magazine // model = "\ca\weapons\mag_univ.p3d"; modelSpecial = ""; useAction = 0; useActionTitle = ""; reloadAction = "ManActReloadMagazine"; selectionFireAnim = "zasleh"; // Values from class: Default // simulation = "ProxyMagazines"; displayNameShort = ""; weight = 0; maxThrowHoldTime = 2; minThrowIntensityCoef = 0.3; maxThrowIntensityCoef = 1.4; Share this post Link to post Share on other sites
gammadust 12 Posted May 31, 2011 If you're not modifying any of that, you don't need to reinclude all that in your config. Just invoke them as needed addMagazine. If you are modifying it, then try adding the parent class for each of those: class ThrowMuzzle; class GrenadeHand; class HandGrenadeMuzzle : ThrowMuzzle { ... //(you only need to include the statements where values have been modified here) }; Share this post Link to post Share on other sites
rhaggan 10 Posted May 31, 2011 Right i think ive done what you said mate but ive now got the error "File SLP_L111A1\config.cpp,line0:,HandGrenadeMuzzle:undefined base class "ThrowMuzzle" Share this post Link to post Share on other sites
gammadust 12 Posted May 31, 2011 (edited) Yep... I hate this complex hierarchy stuff too. From the config.cpp you took those full classes check each parent until you're root. Sometimes successfully only the parent is required to be imported as an external class, but just import all the parents if you have trouble. Also check the name of the addon in CfgPatches where you have all that and: class CfgPatches { class YOUR_ADDON_NAME { units[] = {}; weapons[] = {}; requiredVersion = 0.7; requiredAddons[] = {"PUT_HERE_ARMA_ADDON_NAME"}; }; }; I confess this is something I am not totaly clear about too, but I have managed. Also a good place to check for class dependencies/hierarchies/versions even ACE occurences > Six Config Browser Edited May 31, 2011 by gammadust Share this post Link to post Share on other sites
rhaggan 10 Posted June 2, 2011 Still no luck unfortunatly. I think I might just through the computer out the window. Share this post Link to post Share on other sites
gammadust 12 Posted June 2, 2011 Many testing (keep track of results) and patience... check Config Inheritance, might clear it up. Share this post Link to post Share on other sites
rhaggan 10 Posted June 7, 2011 Config inheritance gave me a link that he made me realise some of the stuff there i have isnt at all relivent but still no joy. Share this post Link to post Share on other sites
rhaggan 10 Posted June 12, 2011 ok i now have this thamks to a lot of help but i am geting an error "File SLP_L111A1\config.cpp,line4/cfgPatches/l111a1_prac, units';'[' encountered instead of '=' " Can any one pont me to exactly where that is ? class CfgPatches{ class L111A1_PRAC { units [] = {}; Weapons [] = {L111A1_PRAC} requiredVersion = 1.000000; requiredAddons = {"CaWeapons"}; }; }; class cfgAmmo { class Default; class GrenadeHand; class L111A1_PRAC: GrenadeHand { model = "\sleepingbag\Weapons\L111A1.p3d"; deflecting = 90; explosionTime = 5; hit = 0.002; indirectHit = 0.0002; indirectHitRange = 7; cost = 40; simulationStep = 0.05 whistleDist = 7;}; }; class cfgWeapons { class Default; class GrenadeLauncher; class: ThrowMuzzle : GrenadeLauncher class HandGrenadeMuzzle : ThrowMuzzle { magazines[] = {"L111A1_PRAC"}; }; }; class CfgMagazines { class Default class CA_Magazine class HandGrenade class L111A1_PRAC : HandGrenade { displayName = "L111A1 PRAC"; picture = "sleepingbag\data\L111A1_co.tga"; ammo = "L111A1_PRAC"; descriptionShort = " The L111A1 hand grenade is a British grenade used for training. It has the same weight as the L109 hand grenade. It is used in a training enviornment only."; sound[] = {"", 0.000316228, 1}; reloadSound[] = {"", 0.000316228, 1}; }; }; // Values from class: GrenadeHand // //typicalspeed = 20; //visibleFire = 0.5; //audibleFire = 0.05; //visibleFireTime = 1; //fuseDistance = 5; // Values from class: Grenade // //soundHit[] = {"Ca\sounds\Weapons\explosions\grenade_new1", 15.8489, 1, 1000}; //soundFly[] = {"Ca\sounds\Weapons\explosions\noise", 0.0001, 1, 20}; //soundEngine[] = {"", 0.0001, 4}; //simulation = "shotShell"; ; //CraterEffects = "GrenadeCrater"; //explosionEffects = "GrenadeExplosion"; // Values from class: Default // Share this post Link to post Share on other sites
[aps]gnat 28 Posted June 12, 2011 You are missing a LOT of ";" at the end of lines/definitions. Weapons [] = {L111A1_PRAC} class Default class CA_Magazine etc etc Fix those first Share this post Link to post Share on other sites
rhaggan 10 Posted June 12, 2011 Iam guessing i need them at the end of every line ? Share this post Link to post Share on other sites
JakeWed 10 Posted June 13, 2011 Yep, Pretty much evey time BUT " BlaBlaBla { ", Then you dont as it Closes a 'Line', and we dont want that at the start of a Entry! Share this post Link to post Share on other sites
[aps]gnat 28 Posted June 13, 2011 Yes, most lines And per Jakes example, you'd have a ; after every finishing bracket } Share this post Link to post Share on other sites
rhaggan 10 Posted June 13, 2011 I think i might have got all the lines missing ; but im not sure what ive done now as it is telling me that i have an error in line 2. "encounterd { instead of =. Does that mean that i just have to change the { or have i done somthig completely wrong? class CfgPatches;{ class L111A1_PRAC; { units [] = {}; Weapons [] = {L111A1_PRAC}; requiredVersion = 1.000000; requiredAddons = {"CaWeapons"}; }; }; class cfgAmmo; { class Default; class GrenadeHand; class L111A1_PRAC: GrenadeHand ; { model = "\sleepingbag\Weapons\L111A1.p3d"; deflecting = 90; explosionTime = 5; hit = 0.002; indirectHit = 0.0002; indirectHitRange = 7; cost = 40; simulationStep = 0.05 whistleDist = 7;}; }; class cfgWeapons; { class Default; class GrenadeLauncher; class: ThrowMuzzle : GrenadeLauncher; class HandGrenadeMuzzle : ThrowMuzzle; { magazines[] = {"L111A1_PRAC"}; }; }; class CfgMagazines; { class Default; class CA_Magazine; class HandGrenade; class L111A1_PRAC : HandGrenade; { displayName = "L111A1 PRAC"; picture = "sleepingbag\data\L111A1_co.tga"; ammo = "L111A1_PRAC"; descriptionShort = " The L111A1 hand grenade is a British grenade used for training. It has the same weight as the L109 hand grenade. It is used in a training enviornment only."; sound[] = {"", 0.000316228, 1}; reloadSound[] = {"", 0.000316228, 1}; }; }; Share this post Link to post Share on other sites
[aps]gnat 28 Posted June 14, 2011 class L111A1_PRAC; { units [] = {}; ... ... }; No, if the next thing is a { you can not terminate with a ; before Correct is; class L111A1_PRAC { units [] = {}; ... ... }; or class L111A1_PRAC { units [] = {}; ... ... }; Same through all the code. e.g. class CfgMagazines; { is incorrect. Share this post Link to post Share on other sites
rhaggan 10 Posted June 14, 2011 Ah rogoer so far will fix that. I have knoiw idea how you guys can read this stuff its metling my head. Share this post Link to post Share on other sites