33BO11OF00 10 Posted August 12, 2010 I'm making new version of MM-1 grenade launcher by BIS. I added some more ammo in clip. I can't get this config working right. What is problem here? Here is that config: // - config.cpp---------------------------------------------- // // This file was created using Binview version 1.0 // ----------------------------------------------------------- // Created by Confucius for the Chain of Command. // Visit us at: www.thechainofcommand.com // ----------------------------------------------------------- // Class definitions class CfgPatches { class MM6 { units[]={"HeavyGW"}; weapons[]={"Mm6"}; requiredVersion=1.22; }; }; class CfgWeapons { class Default { }; class GrenadeLauncher:Default { }; class Mm6Base:GrenadeLauncher { scopeWeapon=1; scopeMagazine=1; weaponType="1 + 16"; magazineType="8 * 256"; displayName="$STR_DN_MM6"; displayNameMagazine="$STR_DN_MM6"; shortNameMagazine="$STR_DN_MM6"; count=50; reloadTime=0.5; magazineReloadTime=12; model="\MM-6\MM-1"; modelOptics="\MM-6\optika_MM-1"; picture="\MM-6\mm-1.paa"; revolving="buben"; revolvingAxis="osa_buben"; }; class MM1Magazine:Mm1Base { scopeMagazine=2; picture="\MM-6\m_mm1.paa"; }; class MM1:Mm1Base { scopeWeapon=2; magazines[]={"MM1Magazine"}; }; }; class CfgVehicles { class All { }; class AllVehicles:All { }; class Land:AllVehicles { }; class Man:Land { }; class Soldier:Man { }; class SoldierWB:Soldier { }; class HeavyGW:SoldierWB { displayName="$STR_DN_HEAVYGRENW"; weapons[]={"Mm6","Binocular","Throw","Put"}; magazines[]={"MM1Magazine","SmokeShell","SmokeShell"}; }; }; I always get some errors here. Like class Mm1Base doesn't exit or something like that. How do I change this to make it work? Share this post Link to post Share on other sites
rellikki 7 Posted August 12, 2010 Well, config definition Mm1Base does indeed not exist. It's nowhere in the config you pasted. Perhaps your Mm6Base was supposed to be Mm1Base? Share this post Link to post Share on other sites
33BO11OF00 10 Posted August 12, 2010 I have pack up addon file and see what error i get. ---------- Post added at 05:19 PM ---------- Previous post was at 05:11 PM ---------- Another Error: In map editor I get only one Heavy Grenadier Soldier. How do i change that so I get new name in unit list? ---------- Post added at 05:22 PM ---------- Previous post was at 05:19 PM ---------- HERE IS UPDATED CONFIG FILE: // - config.cpp---------------------------------------------- // // This file was created using Binview version 1.0 // ----------------------------------------------------------- // Created by Confucius for the Chain of Command. // Visit us at: www.thechainofcommand.com // ----------------------------------------------------------- // Class definitions class CfgPatches { class MM6 { units[]={"HeavyGW"}; weapons[]={"Mm6"}; requiredVersion=1.22; }; }; class CfgWeapons { class Default { }; class GrenadeLauncher:Default { }; class Mm6Base:GrenadeLauncher { scopeWeapon=1; scopeMagazine=1; weaponType="1 + 16"; magazineType="8 * 256"; displayName="$STR_DN_MM6"; displayNameMagazine="$STR_DN_MM6"; shortNameMagazine="$STR_DN_MM6"; count=50; reloadTime=0.5; magazineReloadTime=12; model="\MM-6\MM-1"; modelOptics="\MM-6\optika_MM-1"; picture="\MM-6\mm-1.paa"; revolving="buben"; revolvingAxis="osa_buben"; }; class MM1Magazine:Mm6Base { scopeMagazine=2; picture="\MM-6\m_mm1.paa"; }; class MM6:Mm6Base { scopeWeapon=2; magazines[]={"MM1Magazine"}; }; }; class CfgVehicles { class All { }; class AllVehicles:All { }; class Land:AllVehicles { }; class Man:Land { }; class Soldier:Man { }; class SoldierWB:Soldier { }; class HeavyGW:SoldierWB { displayName="$STR_DN_HEAVYGRENW"; weapons[]={"Mm6","Binocular","Throw","Put"}; magazines[]={"MM1Magazine","SmokeShell","SmokeShell"}; }; }; Share this post Link to post Share on other sites
rellikki 7 Posted August 12, 2010 You're trying to overwrite the vanilla classnames. I would strongly suggest you to add your OFPEC tag in front of the new classnames. That way the new units would show up in editor too. Add your tag in front of the HeavyGW class and preferably onto the new weapon classes too. You can give it a new editor name with the the displayName="x" line. Share this post Link to post Share on other sites
33BO11OF00 10 Posted August 12, 2010 Thanks. I will try that later. School is open. Got to study. Huge exams/writings coming in next month. Sheesh. Share this post Link to post Share on other sites
33BO11OF00 10 Posted August 13, 2010 (edited) Another problem appeared. I fixed the configuration but now it also overwrites original weapon and soldier. What's going on here? HERE IS MY CONFIG: // - config.cpp---------------------------------------------- // // This file was created using Binview version 1.0 // ----------------------------------------------------------- // Created by Confucius for the Chain of Command. // Visit us at: www.thechainofcommand.com // ----------------------------------------------------------- // Class definitions class CfgPatches { class MM6 { units[]={"LMPHeavyGW"}; weapons[]={"Mm6"}; requiredVersion=1.22; }; }; class CfgWeapons { class Default { }; class GrenadeLauncher:Default { }; class Mm6Base:GrenadeLauncher { scopeWeapon=1; scopeMagazine=1; weaponType="1 + 16"; magazineType="8 * 256"; displayName="$STR_DN_MM6"; displayNameMagazine="$STR_DN_MM6"; shortNameMagazine="$STR_DN_MM6"; count=50; reloadTime=0.5; magazineReloadTime=12; model="\MM-6\MM-1"; modelOptics="\MM-6\optika_MM-1"; picture="\MM-6\mm-1.paa"; revolving="buben"; revolvingAxis="osa_buben"; }; class MM1Magazine:Mm6Base { scopeMagazine=2; picture="\MM-6\m_mm1.paa"; }; class MM6:Mm6Base { scopeWeapon=2; magazines[]={"MM1Magazine"}; }; }; class CfgVehicles { class All { }; class AllVehicles:All { }; class Land:AllVehicles { }; class Man:Land { }; class Soldier:Man { }; class SoldierWB:Soldier { }; class LMPHeavyGW:SoldierWB { displayName="$STR_DN_LMPHEAVYGRENW"; weapons[]={"Mm6","Binocular","Throw","Put"}; magazines[]={"MM1Magazine","SmokeShell","SmokeShell"}; }; }; HERE IS THAT STRINGTABLE FILE: LANGUAGE,English,French,Italian,Spanish,German,Czech STR_DN_LMPHEAVYGRENW,Heavy Grenadier2,Heavy Grenadier2,Heavy Grenadier2,Heavy Grenadier2,Heavy Grenadier2,Heavy Grenadier2 STR_DN_MM6, MM-6, MM-6, MM-6, MM-6, MM-6, MM-6 Edited August 13, 2010 by 33BO11OF00 Share this post Link to post Share on other sites
rellikki 7 Posted August 13, 2010 This bit isn't needed in the config: class MM1Magazine:Mm6Base { scopeMagazine=2; picture="\MM-6\m_mm1.paa"; }; It only overwrites the vanilla MM1 magazine which may cause problems. Just remove that part and I think it should work fine then. You should also add the OFPEC tags onto your MM6 weapon and magazine classes. Share this post Link to post Share on other sites
33BO11OF00 10 Posted August 13, 2010 Can I leave texture names same? Is that OK? ---------- Post added at 05:46 PM ---------- Previous post was at 05:37 PM ---------- Your advice did a conflict. I removed those lines but now I get a weapon Mm-1 instead of Mm-6 for that soldier. What now? Share this post Link to post Share on other sites
sanctuary 19 Posted August 13, 2010 Instead of class MM1Magazine:Mm6Base { scopeMagazine=2; picture="\MM-6\m_mm1.paa"; }; class MM6:Mm6Base { scopeWeapon=2; magazines[]={"MM1Magazine"}; }; try class MM6Magazine:Mm6Base { scopeMagazine=2; picture="\MM-6\m_mm1.paa"; }; class MM6:Mm6Base { scopeWeapon=2; magazines[]={"MM6Magazine"}; }; and then instead of class LMPHeavyGW:SoldierWB { displayName="$STR_DN_LMPHEAVYGRENW"; weapons[]={"MM6","Binocular","Throw","Put"}; magazines[]={"MM1Magazine","SmokeShell","SmokeShell"}; }; try class LMPHeavyGW:SoldierWB { displayName="$STR_DN_LMPHEAVYGRENW"; weapons[]={"MM6","Binocular","Throw","Put"}; magazines[]={"MM6Magazine","SmokeShell","SmokeShell"}; }; Share this post Link to post Share on other sites
33BO11OF00 10 Posted August 13, 2010 Sanctuary: You again. you rule. Share this post Link to post Share on other sites
33BO11OF00 10 Posted August 13, 2010 (edited) Other problem: Now the names are correct but now my grenadier has zero ammo. What's problem here? // - config.cpp---------------------------------------------- // // This file was created using Binview version 1.0 // ----------------------------------------------------------- // Created by Confucius for the Chain of Command. // Visit us at: www.thechainofcommand.com // ----------------------------------------------------------- // Class definitions class CfgPatches { class MM6 { units[]={"LMPHeavyGW"}; weapons[]={"Mm6"}; requiredVersion=1.22; }; }; class CfgWeapons { class Default { }; class GrenadeLauncher:Default { }; class Mm6Base:GrenadeLauncher { scopeWeapon=1; scopeMagazine=1; weaponType="1 + 16"; magazineType="8 * 256"; displayName="$STR_DN_MM6"; displayNameMagazine="$STR_DN_MM6"; shortNameMagazine="$STR_DN_MM6"; count=50; reloadTime=0.5; magazineReloadTime=12; model="\MM-6\MM-1"; modelOptics="\MM-6\optika_MM-1"; picture="\MM-6\mm-1.paa"; revolving="buben"; revolvingAxis="osa_buben"; }; class MM6Magazine:Mm6Base { scopeMagazine=2; picture="\MM-6\m_mm1.paa"; }; class MM6:Mm6Base { scopeWeapon=2; magazines[]={"MM6Magazine"}; }; }; class CfgVehicles { class All { }; class AllVehicles:All { }; class Land:AllVehicles { }; class Man:Land { }; class Soldier:Man { }; class SoldierWB:Soldier { }; class LMPHeavyGW:SoldierWB { displayName="$STR_DN_LMPHEAVYGRENW"; weapons[]={"Mm6","Binocular","Throw","Put"}; magazines[]={"MM1Magazine","SmokeShell","SmokeShell"}; }; }; Look at red number. It should be 50 not zero. Edited August 13, 2010 by 33BO11OF00 words Share this post Link to post Share on other sites
rellikki 7 Posted August 14, 2010 Probably because you gave the soldier wrong ammo. magazines[]={"MM1Magazine","SmokeShell","SmokeShell"}; Change it to yours. Share this post Link to post Share on other sites
33BO11OF00 10 Posted August 14, 2010 (edited) Thanks. I will try this advice. There was other reason for this thread: This is good tutorial for weapon configs. Other question: HOW to add pistol for this soldier(Like Glock). ---------- Post added at 05:39 PM ---------- Previous post was at 05:29 PM ---------- Weapon problems solved. Thanks Rellikki. Now BIG question: How to release this addon? Edited August 14, 2010 by 33BO11OF00 info Share this post Link to post Share on other sites