Johno89 20 Posted May 23, 2014 (edited) Hi, I am trying to get my WIP attack helicopter into Arma via the AddonBuilder. My model.cfg seems fine, however I have problems with the config.cpp. I've been trying to get it to work by editing the file based upon its error logs everytime I use the Addonbuilder. As far as i can tell there is only 1 problem left but im stumped on how to rectify it. Here is my model.cfg class CfgSkeletons { class Default { isDiscrete = 1; skeletonInherit = ""; skeletonBones[] = {}; }; class heli_skeleton: Default { skeletonInherit=""; isDiscrete=0; skeletonBones[]= { //rotors "velka vrtule","", "mala vrtule","", //doors "door_1","", "door_2","", //weapon bay "l_holdster","", "r_holdster","", //front left gear "fl_gear_a","", "fl_gear_w","fl_gear_a", "fl_gear_a","", "fl_gear_b","fl_gear_a", "fl_gear_b","", "fl_gear_c","fl_gear_b", "fl_gear_h1","", //front right gear "fr_gear_a","", "fr_gear_w","fr_gear_a", "fr_gear_a","", "fr_gear_b","fr_gear_a", "fr_gear_b","", "fr_gear_c","fr_gear_b", "fr_gear_h1","", //rear gear "r_gear","", "r_gear_h1","", "r_gear_h2","" }; }; }; class Translation; class Rotation; class CfgModels { class Default { sectionsInherit=""; sections[] = {}; skeletonName = ""; }; class heli: Default { skeletonName="heli_skeleton"; sectionsInherit=""; sections[]= { }; class Animations { //rotors class HRotor { type="rotationY"; source="rotorH"; selection="velka vrtule"; axis="velka osa"; memory=1; sourceAddress="loop"; minValue=0; maxValue=1; angle0=0; angle1="rad +360"; }; class HRotor2 { type="rotationY"; source="rotorH"; selection="mala vrtule"; axis="mala osa"; memory=1; sourceAddress="loop"; minValue=0; maxValue=1; angle0=0; angle1="rad -360"; }; //doors class door_1 { type="rotation"; source="Doors"; selection="door_1"; axis="door_1_axis"; memory=1; animPeriod=1; angle0=0; angle1=1; }; class door_2 { type="rotation"; source="Doors"; selection="door_2"; axis="door_2_axis"; memory=1; animPeriod=1; angle0=0; angle1=-1; }; //left weapons bay class l_holdster_1pass { type="translationY"; source="maxHoldsterValue"; selection="l_holdster"; axis="l_holdster_axis"; minValue="0"; maxValue="-0.01"; offset0=0; offset1=-1; }; class l_holdster_2pass: l_holdster_1pass { type="rotation"; source="maxHoldsterValue"; memory=1; selection="l_holdster"; axis="l_holdster_axis"; minValue=1; maxValue=2; minPhase=0; maxPhase=1; angle0=0; angle1=2; }; //right weapons bay class r_holdster_1pass { type="translationY"; source="maxHoldsterValue"; selection="l_holdster"; axis="l_holdster_axis"; minValue=0; maxValue=-0.01; offset0=0; offset1=-1; }; class r_holdster_2pass: r_holdster_1pass { type="rotation"; source="maxHoldsterValue"; memory=1; selection="r_holdster"; axis="r_holdster_axis"; minValue=1; maxValue=2; minPhase=0; maxPhase=1; angle0=0; angle1=-2; }; //front left gear class fl_gear_1pass { type="rotation"; source="gear"; selection="fl_gear_a"; axis="fl_gear_a_axis"; memory=1; minValue=0; maxValue=1; angle0=0; angle1=1.1; }; class fl_gear_2pass: fl_gear_1pass { type="translation"; minValue="0.2"; maxValue="0.5"; offset0="0"; offset1="0"; }; class fl_gear_b { type="rotation"; source="gear"; selection="fl_gear_b"; axis="fl_gear_b_axis"; memory=1; minValue=0; maxValue=1; angle0=0; angle1=0.9; }; class fl_gear_c_1pass { type="rotation"; source="gear"; selection="fl_gear_c"; axis="fl_gear_c_axis"; memory=1; minValue=0; maxValue=1; angle0=0; angle1=-2.6; }; class fl_gear_c_2pass: fl_gear_c_1pass { type="translation"; minValue="0"; maxValue="1"; offset0="0"; offset1="0"; }; class fl_gear_w { type="rotation"; source="wheel"; selection="fl_gear_w"; axis="fl_gear_w_axis"; memory=1; sourceAddress="loop"; minValue=0; maxValue=1; angle0=0; angle1="rad +360"; }; class fl_gear_h1 { type="rotation"; source="gear"; selection="fl_gear_h1"; axis="fl_gear_h1_axis"; memory=1; minValue=0; maxValue=2.5; angle0=1.8; angle1=0; }; //front right gear class fr_gear_1pass { type="rotation"; source="gear"; selection="fr_gear_a"; axis="fr_gear_a_axis"; memory=1; minValue=0; maxValue=1; angle0=0; angle1=-1.1; }; class fr_gear_2pass: fr_gear_1pass { type="translation"; minValue="0.2"; maxValue="0.5"; offset0="0"; offset1="0"; }; class fr_gear_b { type="rotation"; source="gear"; selection="fr_gear_b"; axis="fr_gear_b_axis"; memory=1; minValue=0; maxValue=1; angle0=0; angle1=-0.9; }; class fr_gear_c_1pass { type="rotation"; source="gear"; selection="fr_gear_c"; axis="fr_gear_c_axis"; memory=1; minValue=0; maxValue=1; angle0=0; angle1=2.6; }; class fr_gear_c_2pass: fr_gear_c_1pass { type="translation"; minValue="0"; maxValue="1"; offset0="0"; offset1="0"; }; class fr_gear_w { type="rotation"; source="wheel"; selection="fr_gear_w"; axis="fr_gear_w_axis"; memory=1; sourceAddress="loop"; minValue=0; maxValue=1; angle0=0; angle1="rad +360"; }; class fr_gear_h1 { type="rotation"; source="gear"; selection="fr_gear_h1"; axis="fr_gear_h1_axis"; memory=1; minValue=0; maxValue=2.5; angle0=-1.8; angle1=0; }; //rear gear class r_gear { type="rotation"; source="gear"; selection="r_gear"; axis="r_gear_axis"; memory=1; minValue=0; maxValue=1; angle0=0; angle1=1.7; }; class r_gear_h1 { type="rotation"; source="gear"; selection="r_gear_h1"; axis="r_gear_h1_axis"; memory=1; minValue=0; maxValue=2.5; angle0=2; angle1=0; }; class r_gear_h2 { type="rotation"; source="gear"; selection="r_gear_h2"; axis="r_gear_h2_axis"; memory=1; minValue=0; maxValue=2.5; angle0=-2; angle1=0; }; }; }; }; Here is my config.cpp class CfgPatches { class heli { units[] = {"heli"}; weapons[] = {}; requiredVersion = 0.1; requiredAddons[] = {"A3_Air_F"}; }; }; class CfgVehicles { class heli { class AnimationsSources { class door_1 { source = "user"; animPeriod = 1; initPhase = 0; }; class door_2 { source = "user"; animPeriod = 1; initPhase = 0; }; }; class UserActions { class Opendoor_1 { displayName = "Open door_1"; position = "door_1"; source = "user"; animPeriod = 1; }; class Closedoor_1 { displayName = "Close door_1"; position = "door_1"; source = "user"; animPeriod = 1; }; class Opendoor_2 { displayName = "Open door_2"; position = "door_2"; source = "user"; animPeriod = 1; }; class Closedoor_2 { displayName = "Close door_2"; position = "door_2"; source = "user"; animPeriod = 1; }; }; class heli { gearRetracting = 1; memoryPointsGetInDriver = "pos Driver"; memoryPointsGetInDriverDir = "pos Driver dir"; driverAction = "Heli_Attack_02_pilot"; driverInAction = "Heli_Attack_02_pilot"; driverCanEject = 0; precisegetinout = 1; getinAction = "Heli_Attack_02_Pilot_Enter"; getoutaction = "Heli_Attack_02_Pilot_Exit"; memoryPointsGetInGunner = "pos Gunner"; memoryPointsGetInGunnerDir = "pos Gunner dir"; gunnerAction = "Heli_Attack_02_Gunner"; gunnerInAction = "Heli_Attack_02_Gunner"; gunnerCanEject = 0; gunnerGetInAction = "Heli_Attack_02_Gunner_Enter"; gunnerGetOutAction = "Heli_Attack_02_Gunner_Exit"; }; }; /* extern */ class Heli_Attack_02_base_F; class heli { author = "Johno"; _generalMacro = "heli"; model = "\heli\heli.p3d"; scope = 2; side = 0; faction = "OPF_F"; crew = "O_helipilot_F"; typicalCargo[] = {"O_helipilot_F"}; accuracy = 5; displayname = "heli"; class Library { libTextDesc = "TODO"; }; }; }; The error logs indicate something is wrong with the very last line, but i don't know why. Thanks for your help and time. Edited May 23, 2014 by Johno232 Share this post Link to post Share on other sites
surpher 1 Posted May 23, 2014 I think its an inheriting problem, see the sample helicopter in the Arma 3 Tools. Share this post Link to post Share on other sites
Johno89 20 Posted May 23, 2014 (edited) Yh I've been working off the sample heli and its config quite a bit. I'll have another look over and draw comparisons, but could you point out what could be the potential inheritance problem? Btw, here are the errors that accompany the .pbo file when I last used the addonmaker. Warning: CfgVehicles missing in PreloadConfig - may slow down vehicle creation Warning: CfgAmmo missing in PreloadConfig - may slow down vehicle creation Warning: CfgNonAIVehicles missing in PreloadConfig - may slow down vehicle creation File p:\heli\config.cpp, line 100: /CfgVehicles.heli: Member already defined. Error in config p:\heli\config.cpp <model = "p:\heli\heli.p3d"> Warning: bone fl_gear_a already listed in model.cfg/CfgSkeletons/heli_skeleton/ skeleton Warning: bone fl_gear_b already listed in model.cfg/CfgSkeletons/heli_skeleton/ skeleton Warning: bone fr_gear_a already listed in model.cfg/CfgSkeletons/heli_skeleton/ skeleton Warning: bone fr_gear_b already listed in model.cfg/CfgSkeletons/heli_skeleton/ skeleton Edited May 23, 2014 by Johno232 Share this post Link to post Share on other sites
surpher 1 Posted May 23, 2014 All your classes are called heli and they don't inherit anything. This line is telling you that you already have a class called heli File p:\heli\config.cpp, line 100: /CfgVehicles.heli: Member already defined. Share this post Link to post Share on other sites
warlord554 2065 Posted May 23, 2014 Yes you need to choose different inherit classnames Share this post Link to post Share on other sites
Johno89 20 Posted May 23, 2014 ok so should it be something like class helicopter or class default? Share this post Link to post Share on other sites
warlord554 2065 Posted May 23, 2014 Too difficult to explain on my mobile. Open the air_f_beta pbo and then open the attack helo config. Shows everything you need. You are missing some vital inherit base classes if you want everything to work properly, and it will show you the correct class structure, feel free to PM me with any questions Share this post Link to post Share on other sites
Johno89 20 Posted May 23, 2014 thanks for the advice, ill give it ago and get back to you Share this post Link to post Share on other sites
Redphoenix 1540 Posted May 24, 2014 Example: class CfgPatches { class mychopperclassname { units[] = {}; weapons[] = {}; requiredVersion = 0.1; requiredAddons[] = {"A3_Air_F_EPB_Heli_Light_03"}; }; }; class CfgVehicles { class Helicopter_Base_F; class mychopperclassname: Helicopter_Base_F { ...... }; }; Share this post Link to post Share on other sites
Johno89 20 Posted May 24, 2014 (edited) Ok so I've used the AH-99 config as a template for my own. I've kept the same class structure more or less (as appropriate for how far I've gotten with my project). Here is the new config; N.b, I've replaced the actual helicopter name with 'project', (i'd like to keep it secret until I feel it is ready for public release). class CfgPatches { class project { units[] = {"project"}; weapons[] = {}; requiredVersion = 0.1; requiredAddons[] = {"A3_Air_F"}; }; }; class CfgVehicles { class Heli_Attack_02_base_F; class project: Heli_Attack_02_base_F { class AnimationSources; class UserActions; }; class SpeechVariants { class Default { speechSingular[] = {"veh_air_gunship_s"}; speechPlural[] = {"veh_air_gunship_p"}; }; }; textSingular = "$STR_A3_nameSound_veh_air_gunship_s"; textPlural = "$STR_A3_nameSound_veh_air_gunship_p"; nameSound = "veh_air_gunship_s"; author = "Johno"; _generalMacro = "project"; model = "\project\project.p3d"; driveOnComponent[] = {"Wheels"}; icon = "\A3\Air_F_Beta\Heli_Attack_01\Data\UI\Map_Heli_Attack_01_CA.paa"; picture = "\A3\Air_F_Beta\Heli_Attack_01\Data\UI\Heli_Attack_01_CA.paa"; maxSpeed = 325; gearRetracting = 1; }; }; class AnimationSources: AnimationSources { class door_1 { source = "user"; animPeriod = 1; initPhase = 0; }; class door_2 { source = "user"; animPeriod = 1; initPhase = 0; }; }; memoryPointsGetInDriver = "pos Driver"; memoryPointsGetInDriverDir = "pos Driver dir"; driverAction = "Heli_Attack_02_pilot"; driverInAction = "Heli_Attack_02_pilot"; driverCanEject = 0; precisegetinout = 1; getinAction = "Heli_Attack_02_Pilot_Enter"; getoutaction = "Heli_Attack_02_Pilot_Exit"; memoryPointsGetInGunner = "pos Gunner"; memoryPointsGetInGunnerDir = "pos Gunner dir"; gunnerAction = "Heli_Attack_02_Gunner"; gunnerInAction = "Heli_Attack_02_Gunner"; gunnerCanEject = 0; gunnerGetInAction = "Heli_Attack_02_Gunner_Enter"; gunnerGetOutAction = "Heli_Attack_02_Gunner_Exit"; class UserActions { class Opendoor_1 { displayName = "Open door_1"; position = "door_1"; source = "user"; animPeriod = 1; }; class Closedoor_1 { displayName = "Close door_1"; position = "door_1"; source = "user"; animPeriod = 1; }; class Opendoor_2 { displayName = "Open door_2"; position = "door_2"; source = "user"; animPeriod = 1; }; class Closedoor_2 { displayName = "Close door_2"; position = "door_2"; source = "user"; animPeriod = 1; }; }; /* extern */ class Heli_Attack_02_base_F; class project: Heli_Attack_02_base_F { author = "Johno"; _generalMacro = "project"; scope = 2; side = 0; faction = "OPF_F"; crew = "O_helipilot_F"; typicalCargo[] = {"O_helipilot_F"}; accuracy = 5; displayname = "project"; class Library { libTextDesc = "TODO"; }; }; }; I got an error when i packaged the pbo, here it is; Config : some input after EndOfFile. Error 3 while parsing Error in config p:\project\config.cpp Edited May 24, 2014 by Johno232 Share this post Link to post Share on other sites
Redphoenix 1540 Posted May 24, 2014 Why are you defining your class two times? And that error probably means that you are missing a curved bracket " } " somewhere. Share this post Link to post Share on other sites
surpher 1 Posted May 24, 2014 (edited) Looks like you are having bracket issuses now. On line 15 you open your project class and on line 18 you close it. And your CfgVehicles class gets closed on line 38, everything after that is input after EndOfFile. Edited May 24, 2014 by surpher Share this post Link to post Share on other sites
Johno89 20 Posted May 24, 2014 RedPhoenix - I'm an utter noob when It comes to all this coding business, hence why I've apparently defined my class two times. I followed the AH-99 config as a guide. Surpher- So what should i do? Do i delete the closing brackets so that there is no break? Share this post Link to post Share on other sites
Redphoenix 1540 Posted May 24, 2014 Try this. Couldn't check for 100% on all brackets since I'm not on my working station, but it should work. class CfgPatches { class project { units[] = {"project"}; weapons[] = {}; requiredVersion = 0.1; requiredAddons[] = {"A3_Air_F"}; }; }; class CfgVehicles { class Heli_Attack_02_base_F; class project: Heli_Attack_02_base_F { class AnimationSources; class UserActions; class SpeechVariants { class Default { speechSingular[] = {"veh_air_gunship_s"}; speechPlural[] = {"veh_air_gunship_p"}; }; }; textSingular = "$STR_A3_nameSound_veh_air_gunship_s"; textPlural = "$STR_A3_nameSound_veh_air_gunship_p"; nameSound = "veh_air_gunship_s"; author = "Johno"; _generalMacro = "project"; model = "\project\project.p3d"; driveOnComponent[] = {"Wheels"}; icon = "\A3\Air_F_Beta\Heli_Attack_01\Data\UI\Map_Heli_Attack_01_CA.paa"; picture = "\A3\Air_F_Beta\Heli_Attack_01\Data\UI\Heli_Attack_01_CA.paa"; maxSpeed = 325; displayname = "project"; scope = 2; faction = "OPF_F"; crew = "O_helipilot_F"; typicalCargo[] = {"O_helipilot_F"}; gearRetracting = 1; class AnimationSources: AnimationSources { class door_1 { source = "user"; animPeriod = 1; initPhase = 0; }; class door_2 { source = "user"; animPeriod = 1; initPhase = 0; }; }; memoryPointsGetInDriver = "pos Driver"; memoryPointsGetInDriverDir = "pos Driver dir"; driverAction = "Heli_Attack_02_pilot"; driverInAction = "Heli_Attack_02_pilot"; driverCanEject = 0; precisegetinout = 1; getinAction = "Heli_Attack_02_Pilot_Enter"; getoutaction = "Heli_Attack_02_Pilot_Exit"; memoryPointsGetInGunner = "pos Gunner"; memoryPointsGetInGunnerDir = "pos Gunner dir"; gunnerAction = "Heli_Attack_02_Gunner"; gunnerInAction = "Heli_Attack_02_Gunner"; gunnerCanEject = 0; gunnerGetInAction = "Heli_Attack_02_Gunner_Enter"; gunnerGetOutAction = "Heli_Attack_02_Gunner_Exit"; class UserActions { class Opendoor_1 { displayName = "Open door_1"; position = "door_1"; source = "user"; animPeriod = 1; }; class Closedoor_1 { displayName = "Close door_1"; position = "door_1"; source = "user"; animPeriod = 1; }; class Opendoor_2 { displayName = "Open door_2"; position = "door_2"; source = "user"; animPeriod = 1; }; class Closedoor_2 { displayName = "Close door_2"; position = "door_2"; source = "user"; animPeriod = 1; }; }; }; Share this post Link to post Share on other sites
Johno89 20 Posted May 24, 2014 Thanks RedPheonix, I applied your edited version. But now i have these 4 errors; File p:\project\config.cpp, line 57: /CfgVehicles/project.AnimationSources: Member already defined. File p:\project\config.cpp, line 103: /CfgVehicles/project.UserActions: Member already defined. File p:\project\config.cpp, line 104: /CfgVehicles.Heli_Attack_02_base_F: Member already defined. File p:\project\config.cpp, line 121: /CfgVehicles.project: Member already defined. Share this post Link to post Share on other sites
Redphoenix 1540 Posted May 24, 2014 class CfgPatches { class johno232_project { units[] = {"project"}; weapons[] = {}; requiredVersion = 0.1; requiredAddons[] = {"A3_Air_F"}; }; }; class CfgVehicles { class Heli_Attack_02_base_F; class project: Heli_Attack_02_base_F { class SpeechVariants { class Default { speechSingular[] = {"veh_air_gunship_s"}; speechPlural[] = {"veh_air_gunship_p"}; }; }; textSingular = "$STR_A3_nameSound_veh_air_gunship_s"; textPlural = "$STR_A3_nameSound_veh_air_gunship_p"; nameSound = "veh_air_gunship_s"; author = "Johno"; _generalMacro = "project"; model = "\project\project.p3d"; driveOnComponent[] = {"Wheels"}; icon = "\A3\Air_F_Beta\Heli_Attack_01\Data\UI\Map_Heli_Attack_01_CA.paa"; picture = "\A3\Air_F_Beta\Heli_Attack_01\Data\UI\Heli_Attack_01_CA.paa"; maxSpeed = 325; displayname = "project"; scope = 2; faction = "OPF_F"; crew = "O_helipilot_F"; typicalCargo[] = {"O_helipilot_F"}; gearRetracting = 1; class AnimationSources: AnimationSources { class door_1 { source = "user"; animPeriod = 1; initPhase = 0; }; class door_2 { source = "user"; animPeriod = 1; initPhase = 0; }; }; memoryPointsGetInDriver = "pos Driver"; memoryPointsGetInDriverDir = "pos Driver dir"; driverAction = "Heli_Attack_02_pilot"; driverInAction = "Heli_Attack_02_pilot"; driverCanEject = 0; precisegetinout = 1; getinAction = "Heli_Attack_02_Pilot_Enter"; getoutaction = "Heli_Attack_02_Pilot_Exit"; memoryPointsGetInGunner = "pos Gunner"; memoryPointsGetInGunnerDir = "pos Gunner dir"; gunnerAction = "Heli_Attack_02_Gunner"; gunnerInAction = "Heli_Attack_02_Gunner"; gunnerCanEject = 0; gunnerGetInAction = "Heli_Attack_02_Gunner_Enter"; gunnerGetOutAction = "Heli_Attack_02_Gunner_Exit"; class UserActions { class Opendoor_1 { displayName = "Open door_1"; position = "door_1"; source = "user"; animPeriod = 1; }; class Closedoor_1 { displayName = "Close door_1"; position = "door_1"; source = "user"; animPeriod = 1; }; class Opendoor_2 { displayName = "Open door_2"; position = "door_2"; source = "user"; animPeriod = 1; }; class Closedoor_2 { displayName = "Close door_2"; position = "door_2"; source = "user"; animPeriod = 1; }; }; }; Try this, as said, im not on my working station. Share this post Link to post Share on other sites
Johno89 20 Posted May 24, 2014 No luck I'm afraid. If its alright with you can I message you later perhaps when you have more time to analyse what could be going wrong? Share this post Link to post Share on other sites
surpher 1 Posted May 24, 2014 Try adding another }; at the very end of the config RedPhoenix has given you. Share this post Link to post Share on other sites
Johno89 20 Posted May 24, 2014 yh I already did Surpher, didn't work though. I now get; File p:\project\config.cpp, line 18: '/CfgVehicles/project.': '{' encountered instead of '=' Config : some input after EndOfFile. Error reading binary file 'p:\project\config.cpp' Share this post Link to post Share on other sites
Redphoenix 1540 Posted May 24, 2014 I will look later into it. Share this post Link to post Share on other sites
Johno89 20 Posted May 24, 2014 thanks very much, here is the latest config; class CfgPatches { class project { units[] = {"project"}; weapons[] = {}; requiredVersion = 0.1; requiredAddons[] = {"A3_Air_F"}; }; }; class CfgVehicles { class Heli_Attack_02_base_F; class project: Heli_Attack_02_base_F { class AnimationSources; class SpeechVariants; { class Default { speechSingular[] = {"veh_air_gunship_s"}; speechPlural[] = {"veh_air_gunship_p"}; }; }; textSingular = "$STR_A3_nameSound_veh_air_gunship_s"; textPlural = "$STR_A3_nameSound_veh_air_gunship_p"; nameSound = "veh_air_gunship_s"; author = "Johno"; _generalMacro = "project"; model = "\project\project.p3d"; driveOnComponent[] = {"Wheels"}; icon = "\A3\Air_F_Beta\Heli_Attack_01\Data\UI\Map_Heli_Attack_01_CA.paa"; picture = "\A3\Air_F_Beta\Heli_Attack_01\Data\UI\Heli_Attack_01_CA.paa"; maxSpeed = 325; displayname = "project"; scope = 2; faction = "OPF_F"; crew = "O_helipilot_F"; typicalCargo[] = {"O_helipilot_F"}; gearRetracting = 1; class AnimationSources: Animations { class door_1 { source = "user"; animPeriod = 1; initPhase = 0; }; class door_2 { source = "user"; animPeriod = 1; initPhase = 0; }; }; memoryPointsGetInDriver = "pos Driver"; memoryPointsGetInDriverDir = "pos Driver dir"; driverAction = "Heli_Attack_02_pilot"; driverInAction = "Heli_Attack_02_pilot"; driverCanEject = 0; precisegetinout = 1; getinAction = "Heli_Attack_02_Pilot_Enter"; getoutaction = "Heli_Attack_02_Pilot_Exit"; memoryPointsGetInGunner = "pos Gunner"; memoryPointsGetInGunnerDir = "pos Gunner dir"; gunnerAction = "Heli_Attack_02_Gunner"; gunnerInAction = "Heli_Attack_02_Gunner"; gunnerCanEject = 0; gunnerGetInAction = "Heli_Attack_02_Gunner_Enter"; gunnerGetOutAction = "Heli_Attack_02_Gunner_Exit"; class UserActions { class Opendoor_1 { displayName = "Open door_1"; position = "door_1"; source = "user"; animPeriod = 1; }; class Closedoor_1 { displayName = "Close door_1"; position = "door_1"; source = "user"; animPeriod = 1; }; class Opendoor_2 { displayName = "Open door_2"; position = "door_2"; source = "user"; animPeriod = 1; }; class Closedoor_2 { displayName = "Close door_2"; position = "door_2"; source = "user"; animPeriod = 1; }; }; }; /* extern */ class Heli_Attack_02_base_F; class project: Heli_Attack_02_base_F { author = "Johno"; _generalMacro = "project"; scope = 2; side = 0; faction = "OPF_F"; crew = "O_helipilot_F"; typicalCargo[] = {"O_helipilot_F"}; accuracy = 5; displayname = "project"; class Library { libTextDesc = "TODO"; }; }; }; Share this post Link to post Share on other sites
Redphoenix 1540 Posted May 25, 2014 Okay, why don't you use the sample config provided with the tools? class CfgPatches { class Test_Heli_01 { units[] = {"O_Test_Heli_01_F","O_Test_Heli_01_unarmed_F"}; weapons[] = {}; requiredVersion = 0.1; requiredAddons[] = {"A3_Air_F"}; }; }; #include "basicdefines_A3.hpp" class WeaponCloudsMGun; class CfgVehicles { class Helicopter; class Helicopter_Base_F: Helicopter { class Turrets; }; class Helicopter_Base_H: Helicopter_Base_F { class Turrets: Turrets { class CopilotTurret; }; class AnimationSources; class Eventhandlers; class Viewoptics; class ViewPilot; class Reflectors { class Right; }; }; class Test_Heli_01_base_F: Helicopter_Base_H { armor = 30; /// just some protection against missiles, collisions and explosions altFullForce = 4000; /// in what height do the engines still have full thrust altNoForce = 6000; /// thrust of the engines interpolates to zero between altFullForce and altNoForce maxSpeed = 300; /// what is the maximum speed of the vehicle maxFordingDepth = 0.55; /// how deep could the vehicle be in water without getting some damage mainBladeRadius = 7.0; /// describes the radius of main rotor - used for collision detection //multiplier of lift force liftForceCoef = 1.1; //multiplier of body friction bodyFrictionCoef = 0.7; //multiplier of bank force cyclicAsideForceCoef = 1.0; //multiplier of dive force cyclicForwardForceCoef = 1.0; //multiplier of back rotor force backRotorForceCoef = 1.0; accuracy = 0.5; /// how hard it is to distinguish the type of the vehicle (bigger number means harder) displayName = "Test Heli"; /// how is the heli displayed in editor model = "\Samples_F\Test_Heli_01\Test_Heli_01.p3d"; /// path to model of the heli driveOnComponent[] = {"Wheels"}; icon = "\A3\Air_F\Heli_Light_02\Data\UI\Map_Heli_Light_02_CA.paa"; /// icon in map/editor picture = "\A3\Air_F\Heli_Light_02\Data\UI\Heli_Light_02_CA.paa"; /// small picture in command menu driverAction = pilot_Heli_Light_02; /// what is the standard pose for the pilot, defined as animation state driverInAction = pilot_Heli_Light_02; /// what is the standard pose for the pilot, defined as animation state precisegetinout = 1; /// describes what style of get in is used (0 - non-precise; 1 - precise on proxy; 2 - precise on model center) GetInAction = pilot_Heli_Light_02_Enter; /// what action uses the pilot to get in the heli, it uses "switchAction" script command on the proxy GetOutAction = pilot_Heli_Light_02_Exit; /// what action uses the pilot to get out of heli cargoGetInAction[] = {"GetInHelicopterCargo"}; /// actions for the cargo, the last one in array is used for the rest cargoGetOutAction[] = {"GetOutHelicopterCargo"};/// that means every cargo position could use different action to get in transportSoldier = 8; /// how many cargo positions are available cargoAction[] = /// the same array as getIn/getOut actions for actions to switch to for cargo while inside the heli { passenger_apc_narrow_generic03, passenger_apc_generic02, passenger_apc_narrow_generic01, passenger_apc_generic04, passenger_apc_narrow_generic02, passenger_generic01_leanright, passenger_generic01_leanleft, passenger_generic01_foldhands }; cargoIsCoDriver[] = {0, 0}; /// the cargo don't utilize some special memory points to get in memoryPointsGetInCargo = "pos cargo"; /// on what memory points should the cargo get in the heli memoryPointsGetInCargoDir = "pos cargo dir";/// what is the direction of the cargo facing during get in animation (and opposite for get out) hideWeaponsCargo = 1; /// this makes the poses easier and adds some performance gain because the proxies don't need to be drawn class TransportBackpacks /// adds various backpacks to cargo hold of the heli { bag_xx(B_Parachute,8); /// this utilizes a macro from basicdefines_A3.hpp to create a class with backpack inside }; class TransportItems /// adds various items to cargo hold of the heli { item_xx(FirstAidKit,10);/// this utilizes a macro from basicdefines_A3.hpp to create a class with FAK inside }; maximumLoad = 2000; /// capacity of cargo inventory for backpacks and various other items cargoCanEject = 1; /// cargo should be able to grab a chute and drop out of the vehicle driverCanEject = 0; /// pilot shouldn't be able to do so as he doesn't have eject seat class Exhausts /// describes the particle effects fro exhausts { class Exhaust1 /// there may be as many exhausts as you wish, bear in mind the particle limitation and performance { position = "exhaust1"; /// on what position should the particle effect start direction = "exhaust1_dir"; /// what is the default direction of the particle effect effect = "ExhaustsEffectHeliMed"; /// what class of particle effect is going to be used }; class Exhaust2 { position = "exhaust2"; direction = "exhaust2_dir"; effect = "ExhaustsEffectHeliMed"; }; }; memoryPointLMissile = "Rocket_1"; /// from what memory point should the even missiles start memoryPointRMissile = "Rocket_1"; /// from what memory point should the odd missiles start memoryPointGun = "machinegun_end"; /// from what memory point should the bullets start LockDetectionSystem = CM_Lock_Radar + CM_Lock_Laser; /// this uses macros from basicDefines_A3, just add more to gain more systems for the vehicle incomingMissileDetectionSystem = CM_Missile; /// for example CM_Lock_Laser + CM_Lock_Radar, parser is able to evaluate that, or simply 12 in that case selectionFireAnim = "muzzleFlash"; /// what selection is hidden when machinegun doesn't shoot weapons[] = {LMG_Minigun_heli,missiles_DAGR, CMFlareLauncher}; /// array of various vehicle weapons mounted on the heli magazines[] = {2000Rnd_65x39_Belt_Tracer_Green,12Rnd_PG_missiles, 168Rnd_CMFlare_Chaff_Magazine}; /// array of corresponding magazines class ViewPilot: ViewPilot /// describes what does the pilot see using bare eyes { initFov = 0.75; /// this is the standard field of view angle for soldier, bit more narrow than a real-life one minFov = 0.375; /// this is how much can people "zoom" their view via focusing on something maxFov = 1.1; /// this is how wide can the field of view be }; class Viewoptics: Viewoptics /// pilot doesn't use optics in this vehicle { initAngleX = 0; /// initial horizontal angle of the optics view relative to proxy position of pilot minAngleX = 0; /// maximum turn to the left relative to proxy position of pilot maxAngleX = 0; /// maximum turn to the right relative to proxy position of pilot initAngleY = 0; /// initial vertical angle of the optics view relative to proxy position of pilot minAngleY = 0; /// maximum elevation down relative to proxy position of pilot maxAngleY = 0; /// maximum elevation up relative to proxy position of pilot initFov = 0.1; /// the same functionality as in ViewPilot minFov = 0.1; /// the same functionality as in ViewPilot maxFov = 1.2; /// the same functionality as in ViewPilot }; class Turrets: Turrets /// just a copilot seat as a turret to enable taking the controls { class CopilotTurret: CopilotTurret /// taking controls is already defined in parrent class { gunnerAction = copilot_Heli_Light_02; /// what action does copilot switch to gunnerInAction = copilot_Heli_Light_02; /// what action does copilot switch to precisegetinout = 1; /// describes what style of get in is used (0 - non-precise; 1 - precise on proxy; 2 - precise on model center) gunnerGetInAction = copilot_Heli_Light_02_Enter; /// what action uses the copilot to get in the heli, it uses "switchAction" script command on the proxy gunnerGetOutAction = copilot_Heli_Light_02_Exit; /// what action uses the copilot to get out the heli memoryPointsGetInCargo = "pos copilot"; /// what is the position of get in action memoryPointsGetInCargoDir = "pos copilot dir"; /// what is the direction of get in action canEject = 0; /// copilot shouldn't be able to do so as he doesn't have eject seat minElev = -50; /// what is the lowest possible elevation of the turret maxElev = +30; /// what is the highest possible elevation of the turret initElev = 11; /// what is the starting elevation of the turret minTurn = -170; /// what is the left-most possible turn of the turret maxTurn = 170; /// what is the right-most possible turn of the turret initTurn = 0; /// what is the default horizontal turn of the turret gunnerLeftHandAnimName = "lever_copilot"; /// what bone in model is the left hand connected to via IK (pilot has it set by default in parrent class) gunnerRightHandAnimName = "stick_copilot"; /// what bone in model is the right hand connected to via IK (pilot has it set by default in parrent class) maxHorizontalRotSpeed = 3; /// how fast is the copilot able to look around (higher means faster) maxVerticalRotSpeed = 3; /// how fast is the copilot able to look around (higher means faster) }; }; class Damage /// damage changes material in specific places (visual in hitPoint) { tex[] = {}; mat[] = { "A3\Air_F\Heli_Light_02\Data\Heli_Light_02_ext.rvmat", /// material mapped in model "A3\Air_F\Heli_Light_02\Data\Heli_Light_02_ext_damage.rvmat", /// changes to this one once damage of the part reaches 0.5 "A3\Air_F\Heli_Light_02\Data\Heli_Light_02_ext_destruct.rvmat", /// changes to this one once damage of the part reaches 1 "A3\Air_F\Heli_Light_02\Data\Heli_Light_02_glass.rvmat", "A3\Air_F\Heli_Light_02\Data\Heli_Light_02_glass_damage.rvmat", "A3\Air_F\Heli_Light_02\Data\Heli_Light_02_glass_destruct.rvmat", "A3\data_F\default.rvmat", "A3\data_F\default.rvmat", "A3\data_F\default_destruct.rvmat", }; }; #include "sounds.hpp" /// sounds are included in separate file class AnimationSources: AnimationSources /// custom made animation sources { class Doors /// the class name is later used in model.cfg { source = "user"; /// user source means it is waiting on some scripting input animPeriod = 1; /// how long does it take to change value from 0 to 1 (or vice versa) initPhase = 0; /// what value does it have while creating the vehicle }; class HideWeapon { source = "user"; animPeriod = 0.00001; initPhase = 0; }; class Gatling { source = "revolving"; /// returns bullets left in magazine of said weapon weapon = "LMG_Minigun_heli"; /// this is the said weapon }; class Gatling_flash { source = "ammorandom"; /// this source returns some random value changine each time ammo is spent from this weapon - used for muzzle flashes weapon = "LMG_Minigun_heli"; /// this is the said weapon }; class Missiles_revolving { source = "revolving"; weapon = "missiles_DAGR"; }; class Proxy { source = "user"; animPeriod = 1; initPhase = 0; }; }; hiddenSelections[] = /// we want to allow changing of colours, this defines on what selection are the textures used { "camo1" }; class Reflectors: Reflectors /// landing lights of the heli, turned on by AI while in night and "careless" or "safe" { class Right { color[] = {7000,7500,10000}; /// defines red, green, blue and alpha components of the light ambient[] = {70,75,100}; /// the same definition format for colouring the environment around intensity = 50; /// how much does the light shine (in some strange units, just tweak until it is satisfying), rough approximation is intensity = (brightness * 50) ^ 2 size = 1; /// defines the visible size of light, has not much of an effect now innerAngle = 15; /// angle from light direction vector where the light is at full strength outerAngle = 65; /// angle from light direction vector where the light is completely faded out coneFadeCoef = 10; /// coefficient of fading the light between inner and outer cone angles position = "Light_R_pos"; /// name of memory point in model to take the origin of the light direction = "Light_R_dir"; /// name of memory point in the model to make a vector of direction of light from it's position hitpoint = "Light_R_hitpoint"; /// name of hitpoint selection in hitpoint lod of the model to be affected by damage selection = "Light_R"; /// name of selection in visual lods of the model that are going to be hidden while the light is off useFlare = true; /// boolean switch if the light produces flare or not flareSize = 10; /// how big is the flare, using the same metrics as intensity flareMaxDistance = 250; /// maximum distance where the flare is drawn dayLight = false; /// boolean switch if the light is used during day or not class Attenuation { start = 0; /// offset of start of the attenuation constant = 0; /// constant attenuation of the light in any distance from source linear = 1; /// coefficient for linear attenuation quadratic = 1; /// coefficient for attenuation with square of distance from source hardLimitStart = 100; /// distance from source where the light intensity decreases for drawing hardLimitEnd = 200; /// distance from source where the light is not displayed (shorter distances increase performance) }; }; class Left: Right { position = "Light_L_pos"; direction = "Light_L_dir"; hitpoint = "Light_L_hitpoint"; selection = "Light_L"; }; }; aggregateReflectors[] = {{"Left", "Right"}}; /// aggregates both sources into one to increase performance }; class Test_Heli_01_F: Test_Heli_01_base_F { scope = public; /// scope 2 means it is available in editor, this is one of the macros in basicdefines_a3.hpp side = 3; /// 3 stands for civilians, 0 is OPFOR, 1 is BLUFOR, 2 means guerrillas faction = CIV_F; /// defines the faction inside of the side crew = "Test_Soldier_F"; /// lets use the sample soldier we have as default captain of the boat accuracy = 1.50; /// harder to distinguish side than vehicle type icon = "\A3\Air_F\Heli_Light_02\Data\UI\Map_Heli_Light_02_rockets_CA.paa"; /// icon in map/editor picture = "\A3\Air_F\Heli_Light_02\Data\UI\Heli_Light_02_rockets_CA.paa"; /// small picture in command menu hiddenSelectionsTextures[] = /// changes of textures to distinguish variants in same order as hiddenSelections[] { "A3\Air_F\Heli_Light_02\Data\Heli_Light_02_ext_OPFOR_CO" }; availableForSupportTypes[] = {"Drop", "Transport"}; /// use any number of expressions from "Artillery", "CAS_Heli", "CAS_Bombing", "Drop", "Transport" cost = 2000000; /// we need some high cost for such vehicles to be prioritized by AA defences }; class Test_Heli_01_unarmed_F: Test_Heli_01_base_F { displayName = "Test Heli Unarmed"; scope = public; /// scope 2 means it is available in editor, this is one of the macros in basicdefines_a3.hpp side = 3; /// 3 stands for civilians, 0 is OPFOR, 1 is BLUFOR, 2 means guerrillas faction = CIV_F; /// defines the faction inside of the side crew = "Test_Soldier_F"; /// lets use the sample soldier we have as default captain of the boat accuracy = 1.50; /// harder to distinguish side than vehicle type weapons[] = {}; /// no weapons magazines[] = {}; /// no magazines hiddenSelectionsTextures[] = /// changes of textures to distinguish variants in same order as hiddenSelections[] { "A3\Air_F\Heli_Light_02\Data\Heli_Light_02_ext_CO.paa" }; availableForSupportTypes[] = {"Drop", "Transport"}; /// use any number of expressions from "Artillery", "CAS_Heli", "CAS_Bombing", "Drop", "Transport" class AnimationSources: AnimationSources /// custom made animation sources, takes most parameters from parent { class Proxy: Proxy { initPhase = 1; }; class Missiles_revolving: Missiles_revolving { initPhase = 1; }; }; cost = 900000; /// we need some high cost for such vehicles to be prioritized by AA defences }; }; Share this post Link to post Share on other sites
Johno89 20 Posted May 25, 2014 I will give it a try, however should i delete values that currently don't apply to my own .p3d? At present I have 0.00, Memory, View - Gunner, View - Pilot & basic Geometry LOD's. For instance my model doesn't have memory points for the exhausts. Should I delete the exhaust values from the config or can i get away with leaving them in? Share this post Link to post Share on other sites
surpher 1 Posted May 25, 2014 Don't delete anything, if it throws up an error just comment out the lines from the config. // Single line /* Multiple lines */ Share this post Link to post Share on other sites
Johno89 20 Posted May 25, 2014 Ah ok, thanks for the tip. Share this post Link to post Share on other sites