Jump to content
Sign in to follow this  
liukang168

Need model.cfg for planes and helicopters.

Recommended Posts

Hi folks,

in order to implement a custom air unit I require a model.cfg. Could some be so kind as to post a default model.cfg for these unit kinds?

I am not able to generate one in oxygen or inherit it from the infantry or car model.cfg.

THank you in advance.

Share this post


Link to post
Share on other sites

hi liukang168

Here's the C185 config

Its no different to the A2 version

class CfgSkeletons 
{ 
  class Plane; //Inherit base class.
  class GNT_C185Bones: Plane
  {
isDiscrete=1;
skeletonInherit = "";
skeletonBones[]=
{
	"vrtule staticka","",
	"vrtule0","",
	"floatwheels", "",
	"floatGeo","",
	"Gearrear1","",
	"wheelsR","Gearrear1",
	"Gearfront1","",
	"gearfrontL","Gearfront1",
	"wheelFL","gearfrontL",
	"gearfrontR","Gearfront1",
	"wheelFR","gearfrontR",
	"rudder","",
	"tailwheel","",
	"elevator","",
	"aileronL","",
	"aileronR","",
	"flapL","",
	"flapR","",
	"rudderfloatL","",
	"rudderfloatR","",
	"RPod",""
};
  };
};


class cfgModels
{
class Plane; //Inherit base class.
class GNT_C185: Plane
{
	skeletonName = "GNT_C185Bones";
	sectionsInherit="";
	sections[]=
	{
		"texFuse","texWing","texMisc","RPod","vrtule staticka","vrtule blur","clan","clan_sign","zbytek","floatwheels","floatGeo","Gearfront1","Gearrear1","gearfrontL","gearfrontL","rudder","tailwheel","elevator","aileronL","aileronR","flapL","flapR","rudderfloatL","rudderfloatR"

	};
class Animations
	{
		class RPod
		{
			type="hide";
			source="user";
			selection="RPod";
			hideValue = 0.1;
		};
		class Prop
		{
			type = "rotation";
			source = "rotor";
			selection = "vrtule0";
			axis = "osavrtule0";
			angle0 = 0;
			angle1 = 2 * 3.1415;
		};
		class LandContact
		{
			type="translation";
			source="MvA1";
			selection="floatwheels";
			begin="gearStart";
			end="gearEnd";
			sourceAddress = "clamp";
			memory = true;
			minValue=0.0; //The minimum value of the motion range. i.e. The controller input when animation phase is 0.
			maxValue=1.0; //The maximum value of the motion range. i.e. The controller input when animation phase is 1.
			offset0=0;
			offset1=1;
		};
		class WLR
		{
     			type = "rotation";
     			source = "wheel";
			selection ="wheelsR";
			axis = "axiswheelsR";
			memory = 1; 
			sourceAddress = "loop";
			minValue = 0;
             	maxValue = 2.0;
               angle0 = 0; 
			angle1 = "rad 360"; 
		};
		class WLFL
		{
     			type = "rotation";
     			source = "wheel";
			selection ="wheelFL";
			axis = "axiswheelFL";
			memory = 1; 
			sourceAddress = "loop";
			minValue = 0;
             	maxValue = 1.0;
               angle0 = 0; 
			angle1 = "rad 360"; 
		};
		class WLFR
		{
     			type = "rotation";
     			source = "wheel";
			selection ="wheelFR";
			axis = "axiswheelFR";
			memory = 1; 
			sourceAddress = "loop";
			minValue = 0;
             	maxValue = 1.0;
               angle0 = 0; 
			angle1 = "rad 360"; 
		};
		class FloatGeo
		{
			type="translation";
			source="MvA1";
			selection="floatGeo";
			begin="floatStart";
			end="floatEnd";
			sourceAddress = "clamp";
			memory = true;
			minValue=0.0;
			maxValue=1.0;
			offset0=0;
			offset1=1;
		};
		  class GearFront
		 {
			type="rotation";
			source = "MvA2";
			initPhase= 0;
			animPeriod=2;
			selection="Gearfront1";
			axis="axisgearfront";
			angle0=0;
			angle1="rad -120";
		};
		  class GearRear
		 {
			type="rotation";
			source = "MvA2";
			initPhase= 0;
			animPeriod=2;
			selection="Gearrear1";
			axis="axisgearrear";
			angle0=0;
			angle1="rad 40";
		};
  			class RudderX
		{
			type = "rotation";
			source = "rudder";
				selection = "rudder";
			axis = "axisrudder";
			memory = true; 
			sourceAddress = "clamp";
			minValue = -1;
			maxValue = 1;
			angle0 = "rad 22"; 
			angle1 = "rad -22";
  			};
  			class RudderWh
		{
			type = "rotation";
			source = "rudder";
				selection = "tailwheel";
			axis = "axistailwheel";
			memory = true; 
			sourceAddress = "clamp";
			minValue = -1;
			maxValue = 1;
			angle0 = "rad 30"; 
			angle1 = "rad -30";
  			};
  			class RudderF1 : RudderX
		{
				selection = "rudderfloatL";
			axis = "axisrudderfloatL";
  			};
  			class RudderF2 : RudderX
		{
				selection = "rudderfloatR";
			axis = "axisrudderfloatR";
  			};
		class GearFrontSteer1
		{
			type="rotationY";
			source="noseWheelTurn";
			selection="gearfrontL";
			axis="axisgearfrontL";
			memory=1;
			minValue=-1.000000;
			maxValue=1.000000;
			angle0="rad -30";
			angle1="rad 30";
		};
		class GearFrontSteer2 : GearFrontSteer1
		{
			selection="gearfrontR";
			axis="axisgearfrontR";
		};
		class AileronL
		{
			type ="rotation";
			source="aileron";
			selection="aileronL";
			axis="axisaileronL";
			minValue=-1.00000;
			maxValue=1.00000;
			angle0="rad -19";
			angle1="rad 19";
		};
		class AileronR: AileronL
		{
			selection="aileronR";
			axis="axisaileronR";
			angle0="rad -19";
			angle1="rad 19";
		};
  			class ElevatorX
		{
			type = "rotation";
			source = "elevator";
				selection = "elevator";
			axis = "axiselevator";
			memory = true; 
			sourceAddress = "clamp";
			minValue = -1;
			maxValue = 1;
			angle0 = "rad -15"; 
			angle1 = "rad 15";
  			};
  			class flapR1
		{
			type = "rotation";
			source = "flap";
				selection = "flapR";
			axis = "axisflapR";
			memory = true; 
			sourceAddress = "clamp";
			minValue = 0;
			maxValue = 1;
			angle0 = "0"; 
			angle1 = "rad 40";
  			};
  			class flapL1
		{
			type = "rotation";
			source = "flap";
				selection = "flapL";
			axis = "axisflapL";
			memory = true; 
			sourceAddress = "clamp";
			minValue = 0;
			maxValue = 1;
			angle0 = "0"; 
			angle1 = "rad -40";
  			};

	};
};
class GNT_C185F: GNT_C185 {};
};

Share this post


Link to post
Share on other sites

if the config files are the same from arma 2 then why doesnt just dragging and droping an actual aircraft from arma 2 work? they dont roll. once theyre in the air theyre fine, but the wont move on the ground. Do you have to make a physx LOD with the aircraft too? and if so... how?

Share this post


Link to post
Share on other sites

I think config.cpp is different, simulation=plane etc. Just a hint ...

And as you said, like cars there must be a physx part.

So far I was unsuccessful porting the sample a10 (combined out of a1&2)...

Having a problem with the glas of the cockpit and the plane on the ground

Edited by liukang168

Share this post


Link to post
Share on other sites

if you look at the ingame config viewer in the editor, their is definitely a "plane" class defined, which is why Gnat was able to make the cessna. I know you have to control it with the default controls (mouse and keyboard) because BI hasnt provided a control customization box for airplanes yet.

as far as porting.... maybe its just the class inheritance? not an incorrect one, but the game interpreting it differently.

@[APS]Gnat

would you be able to send me the unbinarized model of the Cessna so I could look at it for my own mod?

or impart some more of your knowledge as far as how to made it work?

Share this post


Link to post
Share on other sites
Having a problem with the glas of the cockpit and the plane on the ground

Probably the MATERIAL definition of the glass. Likely a "CA" reference. Or a RVMAT

if you look at the ingame config viewer in the editor, their is definitely a "plane" class defined, which is why Gnat was able to make the cessna. I know you have to control it with the default controls (mouse and keyboard) because BI hasnt provided a control customization box for airplanes yet.

as far as porting.... maybe its just the class inheritance? not an incorrect one, but the game interpreting it differently.

The model.cfg may be the same, the CONFIG.CPP is definitely not the same. Neither is all the RVMAT texture references. All new.

@[APS]Gnat

would you be able to send me the unbinarized model of the Cessna so I could look at it for my own mod?

or impart some more of your knowledge as far as how to made it work?

No.

The model is little different from the A2. Use the A1 or A2 samples.

Until A3 tool set is released, little different can be done (like adding PhysX)

Share this post


Link to post
Share on other sites

I tried using your code to make the engines use a custom wss sound file ... no success.

Share this post


Link to post
Share on other sites

ooooh sound editing :P my favorite. can you post your file?

Share this post


Link to post
Share on other sites
ooooh sound editing :P my favorite. can you post your file?

I used the old settings an changed the engine ones as gnat did ... just to see if it was this problem ...

class Sounds
{
		class Engine
		{
			sound[]=
			{
				"sound\A10AroundEngine",   <................................. mymod\sound\xxx.wss !!!!!!!!!!!!!!!!!!!!!!!
				2.2387211,
				1.2,
				700
			};
			frequency="1.0 min (rpm + 0.5)";
			volume="engineOn*(rpm factor[0.85, 0])";
		};
		class EngineHighOut
		{
			sound[]=
			{
				"sound\A10AroundEngine",
				2.2387211,
				1.6,
				700
			};
			frequency="1";
			volume="engineOn*(rpm factor[0.55, 1.0])";
		};
		class ForsageOut
		{
			sound[]=
			{
				"sound\PlaneAfterburner",
				2.2387211,
				1.1,
				1800
			};
			frequency="1";
			volume="engineOn*(thrust factor[0.5, 1.0])";
			cone[]={3.1400001,3.9200001,2,0.5};
		};
		/*class WindNoiseOut
		{
			sound[]=
			{
				"ca\sounds\Air\AV8\ext\ext-jetair-wind1",
				0.56234133,
				1,
				100
			};
			frequency="(0.1+(1.2*(speed factor[1, 150])))";
			volume="(speed factor[1, 150])";
		};*/
		class EngineIn
		{
			sound[]=
			{
				"sound\A10BackEngine",
				0.31622776,
				1
			};
			frequency="1.0 min (rpm + 0.5)";
			volume="(1-camPos)*(engineOn*(rpm factor[0.85, 0]))";
		};
		class EngineHighIn
		{
			sound[]=
			{
				"sound\A10BackEngine",
				0.31622776,
				1
			};
			frequency="1";
			volume="(1-camPos)*(engineOn*(rpm factor[0.55, 1.0]))";
		};
		class ForsageIn
		{
			sound[]=
			{
				"sound\PlaneAfterburner",
				0.31622776,
				1.1
			};
			frequency="1";
			volume="(1-camPos)*(engineOn*(thrust factor[0.5, 1.0]))";
		};
		class WindNoiseIn
		{
			sound[]=
			{
				"sound\A10FrontEngine",
				0.31622776,
				1
			};
			frequency="(0.1+(1.2*(speed factor[1, 150])))";
			volume="(1-camPos)*(speed factor[1, 150])";
		};
};

---------- Post added at 10:19 ---------- Previous post was at 10:17 ----------

oh, just saw that i didnt make the proper link to the file ... should be mymod\sound\xxxx.wss

Yeah is working now ...

---------- Post added at 10:31 ---------- Previous post was at 10:19 ----------

if the config files are the same from arma 2 then why doesnt just dragging and droping an actual aircraft from arma 2 work? they dont roll. once theyre in the air theyre fine, but the wont move on the ground. Do you have to make a physx LOD with the aircraft too? and if so... how?

class A10: Plane

{

simulation="airplane"; <---------- made it work for me ...

Edited by liukang168

Share this post


Link to post
Share on other sites

cool! and thats weird... wss used to be the default

Share this post


Link to post
Share on other sites
cool! and thats weird... wss used to be the default

yeah it is, the problem was the folder declaration. before I had just sound/mysound_file ... forgot the mod subfolder. ;)

Share this post


Link to post
Share on other sites

that makes sense! glad you were able to get it straightened out!

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  

×