mearcat 10 Posted February 21, 2014 High everyone, I am attempting to produce my first ever mod for A3, I do mean first ever, but I keep getting the "some input after EndOfFile" error when I attempt to bin the cpp. I have ran through all the threads and tried all the fixes I have found, however I cannot see the error. I have been working/staring :banghead: at this for months with little success. the model and animations are all set ready to try but need this sorting so that I can pack the pbo. I have also tried to use the normal 'inherited' config route from an existing rifle, with relevant name changes but that hasn't worked either. I would appreciate any help I can get as this is a real in-pass for me Here's the code. class CfgPatches { class xm29{ units[] = {}; weapons[] = {"xm29"}; requiredversion = 0.1; requiredaddons[] = {"A3_Weapons_F"}; }; }; /*extern*/ class Mode_SemiAuto; /*extern*/ class Mode_Burst; /*extern*/ class Mode_FullAuto; /*extern*/ class SlotInfo; class CfgWeapons{ /*extern*/ class Rifle; class Rifle_Base_F: Rifle{ /*extern*/ class WeaponSlotsInfo; }; /*extern*/ class UGL_F; class xm29_base: Rifle_Base_F { scope = 0; magazines = {"30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag_Tracer_Red", "30Rnd_556x45_Stanag_Tracer_Green", "30Rnd_556x45_Stanag_Tracer_Yellow"}; reloadAction = "GestureReloadMX"; handAnim = {"OFP2_ManSkeleton", "\xm29\Anim\xm29_Handanim.rtm"}; descriptionShort = "xm29"; class WeaponSlotsInfo { class MuzzleSlot: SlotInfo{ linkProxy = "A3\data_f\proxies\weapon_slots\MUZZLE"; compatibleItems = {"muzzle_snds_M"}; }; }; opticsZoomMin = 0.375000; opticsZoomMax = 1.100000; opticsZoomInit = 0.750000; discreteDistance = {100}; opticsPPEffects = {""}; bullet1 = {"A3\sounds_f\weapons\shells\9mm\metal_9mm_01", 0.501187, 1, 15}; bullet2 = {"A3\sounds_f\weapons\shells\9mm\metal_9mm_02", 0.501187, 1, 15}; bullet3 = {"A3\sounds_f\weapons\shells\9mm\metal_9mm_03", 0.501187, 1, 15}; bullet4 = {"A3\sounds_f\weapons\shells\9mm\metal_9mm_04", 0.501187, 1, 15}; bullet5 = {"A3\sounds_f\weapons\shells\9mm\dirt_9mm_01", 0.398107, 1, 15}; bullet6 = {"A3\sounds_f\weapons\shells\9mm\dirt_9mm_02", 0.398107, 1, 15}; bullet7 = {"A3\sounds_f\weapons\shells\9mm\dirt_9mm_03", 0.398107, 1, 15}; bullet8 = {"A3\sounds_f\weapons\shells\9mm\dirt_9mm_04", 0.398107, 1, 15}; bullet9 = {"A3\sounds_f\weapons\shells\9mm\grass_9mm_01", 0.223872, 1, 15}; bullet10 = {"A3\sounds_f\weapons\shells\9mm\grass_9mm_02", 0.223872, 1, 15}; bullet11 = {"A3\sounds_f\weapons\shells\9mm\grass_9mm_03", 0.223872, 1, 15}; bullet12 = {"A3\sounds_f\weapons\shells\9mm\grass_9mm_04", 0.223872, 1, 15}; soundBullet = {"bullet1", 0.083000, "bullet2", 0.083000, "bullet3", 0.083000, "bullet4", 0.083000, "bullet5", 0.083000, "bullet6", 0.083000, "bullet7", 0.083000, "bullet8", 0.083000, "bullet9", 0.083000, "bullet10", 0.083000, "bullet11", 0.083000, "bullet12", 0.083000}; modes = {"Single", "FullAuto", "single_medium_optics1", "single_medium_optics2", "fullauto_medium"}; class Single: Mode_SemiAuto{ begin1 = {"A3\sounds_f\weapons\Trg20\trg_single_1", 1.412538, 1, 1200}; begin2 = {"A3\sounds_f\weapons\Trg20\trg_single_2", 1.412538, 1, 1200}; begin3 = {"A3\sounds_f\weapons\Trg20\trg_single_3", 1.412538, 1, 1200}; soundBegin = {"begin1", 0.333000, "begin2", 0.333000, "begin3", 0.333000}; closure1 = {"A3\sounds_f\weapons\closure\closure_rifle_2", 1.412538, 1, 10}; closure2 = {"A3\sounds_f\weapons\closure\closure_rifle_3", 1.412538, 1, 10}; soundClosure = {"closure1", 0.500000, "closure2", 0.500000}; weaponSoundEffect = "DefaultRifle"; reloadTime = 0.080000; dispersion = 0.000870; recoil = "recoil_single_trg"; recoilProne = "recoil_single_prone_trg"; minRange = 2; minRangeProbab = 0.500000; midRange = 150; midRangeProbab = 0.700000; maxRange = 300; maxRangeProbab = 0.200000; cartridgepos = "nabojnicestart"; cartridgevel = "nabojniceend"; model = "xm29\xm29"; }; class FullAuto: Mode_FullAuto{ begin1 = {"A3\sounds_f\weapons\Trg20\trg_single_1", 1.412538, 1, 1200}; begin2 = {"A3\sounds_f\weapons\Trg20\trg_single_2", 1.412538, 1, 1200}; begin3 = {"A3\sounds_f\weapons\Trg20\trg_single_3", 1.412538, 1, 1200}; soundBegin = {"begin1", 0.333000, "begin2", 0.333000, "begin3", 0.333000}; closure1 = {"A3\sounds_f\weapons\closure\closure_rifle_2", 1.412538, 1, 10}; closure2 = {"A3\sounds_f\weapons\closure\closure_rifle_3", 1.412538, 1, 10}; soundClosure = {"closure1", 0.500000, "closure2", 0.500000}; weaponSoundEffect = "DefaultRifle"; reloadTime = 0.080000; dispersion = 0.000870; recoil = "recoil_auto_trg"; recoilProne = "recoil_auto_prone_trg"; minRange = 2; minRangeProbab = 0.900000; midRange = 15; midRangeProbab = 0.700000; maxRange = 30; maxRangeProbab = 0.050000; aiRateOfFire = 0.000001; }; class fullauto_medium: FullAuto { showToPlayer = 0; burst = 3; minRange = 2; minRangeProbab = 0.500000; midRange = 75; midRangeProbab = 0.700000; maxRange = 100; maxRangeProbab = 0.050000; aiRateOfFire = 2.000000; }; class single_medium_optics1: Single { requiredOpticType = 1; showToPlayer = 0; minRange = 5; minRangeProbab = 0.200000; midRange = 350; midRangeProbab = 0.700000; maxRange = 500; maxRangeProbab = 0.300000; aiRateOfFire = 6; aiRateOfFireDistance = 600; }; class single_medium_optics2: single_medium_optics1 { requiredOpticType = 2; minRange = 100; minRangeProbab = 0.100000; midRange = 450; midRangeProbab = 0.700000; maxRange = 700; maxRangeProbab = 0.050000; aiRateOfFire = 7; aiRateOfFireDistance = 700; }; class XM25_F : UGL_F { reloadAction = "GestureReloadKhaybar"; magazine [] = {"ATA_5Rnd_HE_25mm", "ATA_5Rnd_WhiteSmoke_25mm", "ATA_5Rnd_RedSmoke_25mm", "ATA_5Rnd_GreenSmoke_25mm", "ATA_5Rnd_YellowSmoke_25mm", "ATA_5Rnd_OrangeSmoke_25mm"}; //flares, smoke modes[] = {"XM25_Single"}; sound[] = {"sounds_f_Weapons\grenades\ugl_shot_1", 1, 1, 400}; reloadMagazineSound[] = {"sounds_f_weapons\Khaybar\reload_khaibar.wss",1.0,1,50}; drySound[] = {"sounds_f_weapons\Other\dry_1.wss",0.01,1,10}; magazineReloadTime = 3; reloadTime = 0.5; irLaserPos="laser pos"; irLaserEnd="laser dir"; irDistance=5; value = 20; canLock = 0; autoReload = 0; autoAimEnabled = 0; dispersion = 0.007; aiDispersionCoefY = 6; maxLeadSpeed = 15; muzzlePos = "usti granatometu"; muzzleEnd = "konec granatometu"; cartridgePos = ""; cartridgeVel = ""; UiPicture = ""; picture = ""; scope = 2; mass = 40; }; class CfgMagazines { class CA_Magazine; class ATA_5Rnd_HE_25mm: CA_Magazine { scope = 2; descriptionShort = "25mm High Explosive Airbursting<br />Rounds: 5<br />Used in: XM-25"; displayName = "25mm 5Rnd XM25 Mag"; ammo = "ATA_G_25mm_HE"; count = 5; initSpeed = 210; picture = "\xm29\data\ui\gear_xm25_4rnd.paa"; }; class CA_Magazine; class ATA_5Rnd_WhiteSmoke_25mm: CA_Magazine { scope = 2; descriptionShort = "25mm White Smoke<br />Rounds: 5<br />Used in: XM-25"; displayName = "25mm 5Rnd XM25 WSmoke Mag"; ammo = "G_40mm_Smoke"; count = 5; initSpeed = 210; picture = "\xm29\data\ui\gear_xm25_4rnd.paa"; }; class CA_Magazine; class ATA_5Rnd_RedSmoke_25mm: CA_Magazine { scope = 2; descriptionShort = "25mm Red Smoke<br />Rounds: 5<br />Used in: XM-25"; displayName = "25mm 5Rnd XM25 WSmoke Mag"; ammo = "G_40mm_SmokeRed"; count = 5; initSpeed = 210; picture = "\xm29\data\ui\gear_xm25_4rnd.paa"; }; class CA_Magazine; class ATA_5Rnd_GreenSmoke_25mm: CA_Magazine { scope = 2; descriptionShort = "25mm Green Smoke<br />Rounds: 5<br />Used in: XM-25"; displayName = "25mm 5Rnd XM25 WSmoke Mag"; ammo = "G_40mm_SmokeGreen"; count = 5; initSpeed = 210; picture = "\xm29\data\ui\gear_xm25_4rnd.paa"; }; class CA_Magazine; class ATA_5Rnd_YellowSmoke_25mm: CA_Magazine { scope = 2; descriptionShort = "25mm Yellow Smoke<br />Rounds: 5<br />Used in: XM-25"; displayName = "25mm 5Rnd XM25 WSmoke Mag"; ammo = "G_40mm_SmokeYellow"; count = 5; initSpeed = 210; picture = "\xm29\data\ui\gear_xm25_4rnd.paa"; }; class CA_Magazine; class ATA_5Rnd_OrangeSmoke_25mm: CA_Magazine { scope = 2; descriptionShort = "25mm Orange Smoke<br />Rounds: 5<br />Used in: XM-25"; displayName = "25mm 5Rnd XM25 WSmoke Mag"; ammo = "G_40mm_SmokeOrange"; count = 5; initSpeed = 210; picture = "\xm29\data\ui\gear_xm25_4rnd.paa"; }; }; //XM25 ammo config courtesy of Ataboo from XM25 mod though permission is pending class CfgAmmo { class G_40mm_HE; class Grenade; class ATA_G_25mm_HE: G_40mm_HE { airfriction = -0.001; hit = 10; //40mm 12 indirecthit = 5; //40mm 10 indirecthitrange = 6; //40mm 4 model = "\A3\weapons_f\ammo\UGL_slug"; typicalspeed = 210; }; class ATA_B_25MM_HE: Grenade { //subbed for round when airbursting hit = 10; indirecthit = 5; indirecthitrange = 6; explosionTime = 0.001; //explosionEffects = "GrenadeExplosion"; //just gonna mess with }; }; enum { = 2, destructengine = 2; destructdefault = 6; destructwreck = 7; destructtree = 3; destructtent = 4; stabilizedinaxisx = 1; stabilizedinaxesxyz = 4; stabilizedinaxisy = 2; stabilizedinaxesboth = 3; destructno = 0; stabilizedinaxesnone = 0; destructman = 5; destructbuilding = 1; }; }; Regards Share this post Link to post Share on other sites
UNN 0 Posted February 23, 2014 (edited) You're missing the [] from your modes array, at least that's how far I got before I managed to raise the error. It should be: modes[] = {"Single", "FullAuto", "single_medium_optics1", "single_medium_optics2", "fullauto_medium"}; Looks like all your arrays are missing the []. But do yourself a favour and don't try to do everything in one go, add a bit at a time. For example you could have quickly narrowed down the error to the above if you just started with: class Mode_SemiAuto; class Mode_Burst; class Mode_FullAuto; class SlotInfo; class CfgWeapons { class Rifle; class Rifle_Base_F : Rifle { class WeaponSlotsInfo; }; class xm29_base : Rifle_Base_F { class WeaponSlotsInfo { class MuzzleSlot: SlotInfo {}; }; }; }; Packed it, then added: modes[] = {"Single", "FullAuto", "single_medium_optics1", "single_medium_optics2", "fullauto_medium"}; class Single : Mode_SemiAuto {}; class FullAuto : Mode_FullAuto {}; class fullauto_medium: FullAuto {}; class single_medium_optics1: Single {}; class single_medium_optics2: single_medium_optics1 {}; Then commented out the each line of the above until the error disappears. As a rule, I make sure I inherit the basic structure correctly, by getting it in game with no changes. Then I start to add the unique properties. Edited February 23, 2014 by UNN Share this post Link to post Share on other sites
mearcat 10 Posted February 23, 2014 thanks, I look at these.... anything else guys, let me know. Regards ---------- Post added at 23:30 ---------- Previous post was at 21:51 ---------- Found something, There are obviously 3 different types of brackets, ( { [. These have different functions within the config language. I've just changed the original config brackets in places and it appears to be binning (see below). from this: opticsPPEffects = {""}; bullet1 = {"A3\sounds_f\weapons\shells\9mm\metal_9mm_01", 0.501187, 1, 15}; bullet2 = {"A3\sounds_f\weapons\shells\9mm\metal_9mm_02", 0.501187, 1, 15}; bullet3 = {"A3\sounds_f\weapons\shells\9mm\metal_9mm_03", 0.501187, 1, 15}; To this: opticsPPEffects = ""; bullet1 = ("A3\sounds_f\weapons\shells\9mm\metal_9mm_01", 0.501187, 1, 15); bullet2 = ("A3\sounds_f\weapons\shells\9mm\metal_9mm_02", 0.501187, 1, 15); bullet3 = ("A3\sounds_f\weapons\shells\9mm\metal_9mm_03", 0.501187, 1, 15); and it works. Still learning but god there's a lot of these. Thanks for the work ethic UNN, didn't notice the binarize program is actually a code checker as well. Share this post Link to post Share on other sites
mearcat 10 Posted February 25, 2014 Right, I have managed to get everything for the standard rifle to compress into the .bin file. However I now need to add a UGL to the rifle. I have tried to follow the same as the normal configs from the normal files and some mod configs but it keeps saying Line 149: .XM25: Undefined base class 'UGL_F' As far as I am aware the base class I am defining by adding: class XM25: UGL_F { displayName = "XM25"; descriptionShort = ""; useModelOptics = 0; useExternalOptic = 0; magazines = ("ATA_5Rnd_HE_25mm", "ATA_5Rnd_WhiteSmoke_25mm", "ATA_5Rnd_RedSmoke_25mm", "ATA_5Rnd_GreenSmoke_25mm", "ATA_5Rnd_YellowSmoke_25mm", "ATA_5Rnd_OrangeSmoke_25mm") sound[] = ("A3\sounds_f\Weapons\grenades\ugl_shot_1", 1, 1, 400); cameraDir = "OP_look"; discreteDistance = (100, 200, 300, 400); discreteDistanceCameraPoint = ("OP_eye", "OP_eye2", "OP_eye3", "OP_eye4"); discreteDistanceInitIndex = 1; }; Any Ideas/Help :confused: Share this post Link to post Share on other sites
surpher 1 Posted February 26, 2014 Add this line class UGL_F; like you have done in your first post. If it is already there it might be best to post your whole config. Share this post Link to post Share on other sites
mearcat 10 Posted March 1, 2014 Heres the full config: class CfgPatches { class xm29{ units = (); weapons = ("xm29"); requiredversion = 0.1; requiredaddons = ("A3_Weapons_F"); }; }; /*extern*/ class Mode_SemiAuto; /*extern*/ class Mode_Burst; /*extern*/ class Mode_FullAuto; /*extern*/ class SlotInfo; /*extern*/ class CowsSlot; /*extern*/ class PointerSlot; class CfgWeapons{ /*extern*/ class Rifle; /*extern*/ class UGL_F; /*extern*/ class WeaponSlotsInfo; class Rifle_Base_F: Rifle { /*extern*/ class WeaponSlotsInfo; }; class XM25: UGL_F { displayName = "XM25"; descriptionShort = ""; useModelOptics = 0; useExternalOptic = 0; magazines = ("ATA_5Rnd_HE_25mm", "ATA_5Rnd_WhiteSmoke_25mm", "ATA_5Rnd_RedSmoke_25mm", "ATA_5Rnd_GreenSmoke_25mm", "ATA_5Rnd_YellowSmoke_25mm", "ATA_5Rnd_OrangeSmoke_25mm") modes = ("XM25_Single"); sound = ("sounds_f_Weapons\grenades\ugl_shot_1", 1, 1, 400); reloadMagazineSound = ("sounds_f_weapons\Khaybar\reload_khaibar.wss",1.0,1,50); drySound = ("sounds_f_weapons\Other\dry_1.wss",0.01,1,10); magazineReloadTime = 3; reloadTime = 0.5; irLaserPos="laser pos"; irLaserEnd="laser dir"; irDistance=5; value = 20; canLock = 0; autoReload = 0; autoAimEnabled = 0; dispersion = 0.007; aiDispersionCoefY = 6; maxLeadSpeed = 15; muzzlePos = "usti granatometu"; muzzleEnd = "konec granatometu"; cartridgePos = ""; cartridgeVel = ""; UiPicture = ""; picture = ""; scope = 2; mass = 40; class xm29: Rifle_Base_F { scope = 0; magazines = {"30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag_Tracer_Red", "30Rnd_556x45_Stanag_Tracer_Green", "30Rnd_556x45_Stanag_Tracer_Yellow"}; reloadAction = "GestureReloadMX"; handAnim = {"OFP2_ManSkeleton", "\xm29\Anim\xm29_Handanim.rtm"}; displayName = "XM25"; descriptionShort = "xm29"; muzzles = {"this", "XM25"}; class WeaponSlotsInfo { class MuzzleSlot: SlotInfo { linkProxy = "A3\data_f\proxies\weapon_slots\MUZZLE"; compatibleItems = {"muzzle_snds_M"}; class CowsSlot: CowsSlot { }; class PointerSlot: PointerSlot { }; opticsZoomMin = 0.375000; opticsZoomMax = 1.100000; opticsZoomInit = 0.750000; discreteDistance = 100; opticsPPEffects = ""; cartridgepos = "nabojnicestart"; cartridgevel = "nabojniceend"; model = "xm29\xm29"; bullet1 = ("A3\sounds_f\weapons\shells\9mm\metal_9mm_01", 0.501187, 1, 15); bullet2 = ("A3\sounds_f\weapons\shells\9mm\metal_9mm_02", 0.501187, 1, 15); bullet3 = ("A3\sounds_f\weapons\shells\9mm\metal_9mm_03", 0.501187, 1, 15); bullet4 = ("A3\sounds_f\weapons\shells\9mm\metal_9mm_04", 0.501187, 1, 15); bullet5 = ("A3\sounds_f\weapons\shells\9mm\dirt_9mm_01", 0.398107, 1, 15); bullet6 = ("A3\sounds_f\weapons\shells\9mm\dirt_9mm_02", 0.398107, 1, 15); bullet7 = ("A3\sounds_f\weapons\shells\9mm\dirt_9mm_03", 0.398107, 1, 15); bullet8 = ("A3\sounds_f\weapons\shells\9mm\dirt_9mm_04", 0.398107, 1, 15); bullet9 = ("A3\sounds_f\weapons\shells\9mm\grass_9mm_01", 0.223872, 1, 15); bullet10 = ("A3\sounds_f\weapons\shells\9mm\grass_9mm_02", 0.223872, 1, 15); bullet11 = ("A3\sounds_f\weapons\shells\9mm\grass_9mm_03", 0.223872, 1, 15); bullet12 = ("A3\sounds_f\weapons\shells\9mm\grass_9mm_04", 0.223872, 1, 15); soundBullet = ("bullet1", 0.083000, "bullet2", 0.083000, "bullet3", 0.083000, "bullet4", 0.083000, "bullet5", 0.083000, "bullet6", 0.083000, "bullet7", 0.083000, "bullet8", 0.083000, "bullet9", 0.083000, "bullet10", 0.083000, "bullet11", 0.083000, "bullet12", 0.083000); modes = {"Single", "FullAuto", "single_medium_optics1", "single_medium_optics2", "fullauto_medium"}; class Single: Mode_SemiAuto{ begin1 = ("A3\sounds_f\weapons\Trg20\trg_single_1", 1.412538, 1, 1200); begin2 = ("A3\sounds_f\weapons\Trg20\trg_single_2", 1.412538, 1, 1200); begin3 = ("A3\sounds_f\weapons\Trg20\trg_single_3", 1.412538, 1, 1200); soundBegin = ("begin1", 0.333000, "begin2", 0.333000, "begin3", 0.333000); closure1 = ("A3\sounds_f\weapons\closure\closure_rifle_2", 1.412538, 1, 10); closure2 = ("A3\sounds_f\weapons\closure\closure_rifle_3", 1.412538, 1, 10); soundClosure = ("closure1", 0.500000, "closure2", 0.500000); weaponSoundEffect = "DefaultRifle"; reloadTime = 0.080000; dispersion = 0.000870; recoil = "recoil_single_trg"; recoilProne = "recoil_single_prone_trg"; minRange = 2; minRangeProbab = 0.500000; midRange = 150; midRangeProbab = 0.700000; maxRange = 300; maxRangeProbab = 0.200000; }; class FullAuto: Mode_FullAuto{ begin1 = ("A3\sounds_f\weapons\Trg20\trg_single_1", 1.412538, 1, 1200); begin2 = ("A3\sounds_f\weapons\Trg20\trg_single_2", 1.412538, 1, 1200); begin3 = ("A3\sounds_f\weapons\Trg20\trg_single_3", 1.412538, 1, 1200); soundBegin = ("begin1", 0.333000, "begin2", 0.333000, "begin3", 0.333000); closure1 = ("A3\sounds_f\weapons\closure\closure_rifle_2", 1.412538, 1, 10); closure2 = ("A3\sounds_f\weapons\closure\closure_rifle_3", 1.412538, 1, 10); soundClosure = ("closure1", 0.500000, "closure2", 0.500000); weaponSoundEffect = "DefaultRifle"; reloadTime = 0.080000; dispersion = 0.000870; recoil = "recoil_auto_trg"; recoilProne = "recoil_auto_prone_trg"; minRange = 2; minRangeProbab = 0.900000; midRange = 15; midRangeProbab = 0.700000; maxRange = 30; maxRangeProbab = 0.050000; aiRateOfFire = 0.000001; }; class fullauto_medium: FullAuto { showToPlayer = 0; burst = 3; minRange = 2; minRangeProbab = 0.500000; midRange = 75; midRangeProbab = 0.700000; maxRange = 100; maxRangeProbab = 0.050000; aiRateOfFire = 2.000000; }; class single_medium_optics1: Single { requiredOpticType = 1; showToPlayer = 0; minRange = 5; minRangeProbab = 0.200000; midRange = 350; midRangeProbab = 0.700000; maxRange = 500; maxRangeProbab = 0.300000; aiRateOfFire = 6; aiRateOfFireDistance = 600; }; class single_medium_optics2: single_medium_optics1 { requiredOpticType = 2; minRange = 100; minRangeProbab = 0.100000; midRange = 450; midRangeProbab = 0.700000; maxRange = 700; maxRangeProbab = 0.050000; aiRateOfFire = 7; aiRateOfFireDistance = 700; }; }; This appears to of binarized but the mod is still not loading into ARMA. I will have a look at the other components but the code above seams to be ok. Share this post Link to post Share on other sites
UNN 0 Posted March 1, 2014 (edited) You're missing a closing }; from class XM25. Weapon configs aren't really my thing, but looking at the SMG_02_base_F class, the UGL_F is used the same way you would the other modes: class FullAuto : Mode_FullAuto { begin1[]={"A3\Sounds_F\weapons\SMG_02\SMG_02_st_1b",1,1,500}; begin2[]={"A3\Sounds_F\weapons\SMG_02\SMG_02_st_2b",1,1,500}; begin3[]={"A3\Sounds_F\weapons\SMG_02\SMG_02_st_3b",1,1,500}; soundBegin[]={"begin1",0.33,"begin2",0.33,"begin3",0.34}; closure1[]={"A3\sounds_f\weapons\closure\closure_rifle_2",1.12202,1,10}; closure2[]={"A3\sounds_f\weapons\closure\closure_rifle_3",1.12202,1,10}; soundClosure[]={"closure1",0.5,"closure2",0.5}; weaponSoundEffect="DefaultRifle"; reloadTime=0.0545; dispersion=0.0011; recoil="recoil_auto_smg_02"; recoilProne="recoil_auto_prone_smg_02"; minRange=0; minRangeProbab=0.9; midRange=15; midRangeProbab=0.7; maxRange=30; maxRangeProbab=0.1; aiRateOfFire=1e-006; aiRateOfFireDistance=50; }; class UGL_F : UGL_F {}; class UGL_F is defined like any other weapon class such as Rifle, so I think the way you are inheriting it is ok: class UGL_F : GrenadeLauncher { displayName="EGLM"; magazines[]={"1Rnd_HE_Grenade_shell","UGL_FlareWhite_F","UGL_FlareGreen_F","UGL_FlareRed_F","UGL_FlareYellow_F","UGL_FlareCIR_F","1Rnd_Smoke_Grenade_shell","1Rnd_SmokeRed_Grenade_shell","1Rnd_SmokeGreen_Grenade_shell","1Rnd_SmokeYellow_Grenade_shell","1Rnd_SmokePurple_Grenade_shell","1Rnd_SmokeBlue_Grenade_shell","1Rnd_SmokeOrange_Grenade_shell"}; sound[]={"A3\sounds_f\Weapons\grenades\ugl_shot_4",1.12202,1,200}; reloadMagazineSound[]={"A3\sounds_f\Weapons\grenades\ugl_reload",0.501187,1,20}; drySound[]={"A3\sounds_f\Weapons\other\sfx5",1,1,30}; magazineReloadTime=0; reloadTime=0.1; optics=1; modelOptics="-"; cameraDir="UGL look"; memoryPointCamera="UGL eye"; opticsZoomMin=0.375; opticsZoomMax=1.1; opticsZoomInit=0.75; weaponInfoType="RscWeaponZeroing"; }; Also that class uses different memory points to, just in case you weren't aware cameraDir="UGL look"; memoryPointCamera="UGL eye"; But perhaps the above doesn't apply for dedicated grenade launchers? Edited March 1, 2014 by UNN Share this post Link to post Share on other sites
ante185 2 Posted March 1, 2014 As far as I am aware cameraDir and memoryPointCamera are only found in the 'sub' class OpticsModes, look at the RPG42 and the Titan launchers (They are the only weapons with fixed optics) Share this post Link to post Share on other sites
UNN 0 Posted March 1, 2014 As far as I am aware cameraDir and memoryPointCamera are only found in the 'sub' class OpticsModes, look at the RPG42 and the Titan launchers (They are the only weapons with fixed optics) I was looking at the default Arma3 class for UGL_F, which is defined under cfgWeapons: class UGL_F : GrenadeLauncher { displayName="EGLM"; magazines[]={"1Rnd_HE_Grenade_shell","UGL_FlareWhite_F","UGL_FlareGreen_F","UGL_FlareRed_F","UGL_FlareYellow_F","UGL_FlareCIR_F","1Rnd_Smoke_Grenade_shell","1Rnd_SmokeRed_Grenade_shell","1Rnd_SmokeGreen_Grenade_shell","1Rnd_SmokeYellow_Grenade_shell","1Rnd_SmokePurple_Grenade_shell","1Rnd_SmokeBlue_Grenade_shell","1Rnd_SmokeOrange_Grenade_shell"}; sound[]={"A3\sounds_f\Weapons\grenades\ugl_shot_4",1.12202,1,200}; reloadMagazineSound[]={"A3\sounds_f\Weapons\grenades\ugl_reload",0.501187,1,20}; drySound[]={"A3\sounds_f\Weapons\other\sfx5",1,1,30}; magazineReloadTime=0; reloadTime=0.1; optics=1; modelOptics="-"; cameraDir="UGL look"; memoryPointCamera="UGL eye"; opticsZoomMin=0.375; opticsZoomMax=1.1; opticsZoomInit=0.75; weaponInfoType="RscWeaponZeroing"; }; The above has both cameraDir and memoryPointCamera defined there, which makes sense as the grenade launcher still need its own memory points. But I also noticed that class UGL_F is then used as a sub class in the same way as the fire modes (see the SMG_02_base_F class I posted further up). So I assume from that, in theory you could keep adding different weapon types, all under the class name of a single rifle? But I guess that depends on whether or not the engine would allow it. Share this post Link to post Share on other sites
mearcat 10 Posted March 1, 2014 You're missing a closing }; from class XM25. Weapon configs aren't really my thing, but looking at the SMG_02_base_F class, the UGL_F is used the same way you would the other modes: I tried this but every time I added it into the code, it gave the 'entry after EndOfFile' error when I tried to .BIN it. The way I entered it seams to of been accepted. Also that class uses different memory points to, just in case you weren't aware Yep I did see them when I scrolled through the standard configs when trying to find how to add the UGL. These I think these are the shift in view points when you select the EGLM and aim the weapon, you are looking down the side of the rifle instead of across the top. With the one I'm working on, you will be aiming through the scope so these might not be needed. But perhaps the above doesn't apply for dedicated grenade launchers? True, with the likes of the M32, you would aim it the same as any other rifle, along the top. But this isn't a dedicated grenade launcher, although part of it is. http://gyazo.com/68b025a1ea050ded1a8a8bfabaece17b That's why I need to specify the Grenade section of the weapon as part of the main weapon, because they are similar in setup to the standard TRG21EGLM in the config for instance. The difference is the grenades come out the top instead of the bottom, and this is specified by the code: muzzlePos = "usti granatometu"; muzzleEnd = "konec granatometu"; Which are proxies in the model. The config has binarized with no faults so I think there is something else wrong with the mod elsewhere, quite possibly the textures, which I can't get my head round with the UV mapping and everything. I have included all the files and folder structure necessary for a mod to work but the game doesn't register it as in the weapon list. As I said before this is totally new to me, I can produce highly detailed 3D models and designs as this is part of my daily job, and config code I have messed with in other games (R6 Vegas 2) but a full mod, never achieved it. This project is the closest I have got to a working add on, so I really want to get it working, which you guy's have helped with. Regards. Share this post Link to post Share on other sites
x3kj 1247 Posted March 2, 2014 having no textures or uv mapping doesnt stop the game from loading the addon/model. It will just appear grey/white Share this post Link to post Share on other sites
ante185 2 Posted March 3, 2014 Do you have any programmer friendly text editor, like notepad++ as it will allow you to minimize mostly everything ( class your_class { code to be minimised } ) and that would be useful when hunting errors like end of file! Share this post Link to post Share on other sites
mearcat 10 Posted March 11, 2014 Sorry for the slow reply been busy checking the model. Found that I had made it 'too' detailed, so had to find ways of reducing the poly count (was 27000+). Got it down to a more acceptable 17000 with smooth barrels. I don't have a programmer friendly editor, only standard notepad. I will have a look for this later but I have managed to binarize the config. Just running through the A3 error logs now to find where the problems are. The reason I suspected the textures (or lack of) is due to the errors showing up in this file. I have some other things to get through at present. As the config seems to be correct now I would like to thank all those that have given advice as it has been a good learning curve. I maybe posting elsewhere regarding other subjects to do with this mod so hope to receive knowledge from you again. Regards Mcat. Share this post Link to post Share on other sites