Jump to content
Sign in to follow this  
chOdec

How to create cfg file to view addon in editor?

Recommended Posts

Hi guys, I cannot find any way how to create cfg file for addon which would be possible to find in editor. I just found few tutorials where was example of one specific cfg file (for example for car) but no explanation of system how is cfg file created generally. I was trying to use these few examples, with no success.

I am trying to use my own building as addon in Arma 2 OA editor, but I cannot find it anywhere (Men, Car, Support,...) in editor.

Please, is there anybody who is familiar with this and could help me?

I really don't know, how to write cfg file in a correct way..

#define true 1

#define false 0

#define private 0

#define protected 1

#define public 2

#define TEast 0

#define TWest 1

#define TGuerrila 2

#define TCivilian 3

#define TSideUnknown 4

#define TEnemy 5

#define TFriendly 6

#define TLogic 7

class CfgPatches

{

class domecek

{

units[] = {"domecek"};

weapons[] = {};

requiredVersion = 1.59;

requiredAddons[] = {};

};

};

class CfgVehicleClasses

{

class DomecekClass

{

displayName = "Muj domecek";

};

};

class CfgVehicles

{

class Men {};

class domecek: Men {

displayName="domecek";

vehicleClass="DomecekClass";

model="domecek\domecek";

};

};

Edited by chOdec

Share this post


Link to post
Share on other sites

Thanx man, I had allready that declaration in cfg file, but during many changes I deleted it.

Anyway, after putting that back, it still doesn't work, I can't find that addon in editor. I am talking about Arma 2 OA - are there any main changes - in classes etc..? Because I think that I must have some problem in these classes, I don't know how it's work.. :(

Share this post


Link to post
Share on other sites

class CfgPatches
{
class YourTag_Domecek
{
	units[] = {"YourTag_Domecek"};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {"CACharacters_E"};
};
};
class CfgVehicleClasses
{
class YourTag_DomecekClass
{
	displayName = "Muj domecek";
};
};
class CfgVehicles
{
class CIV_EuroMan01_EP1;
class YourTag_Domecek: CIV_EuroMan01_EP1
{
	displayName = "Domecek";
	vehicleClass = "YourTag_DomecekClass";
	model = "YourTag_Domecek\domecek.p3d";
};
};

1) Replace YourTag with your OFPEC TAG: www.ofpec.com/tags/

2) Put the domecek.p3d into the new location/renamed folder.

3) Pack to YourTag_Domecek.pbo.

4) Put to .\arma2\@YourTag\addons\YourTag_Domecek.pbo

5) Launch game with -mod=@YourTag

Share this post


Link to post
Share on other sites

Oh man, thanx a lot, I am going to work on it right now!! ;)

Share this post


Link to post
Share on other sites

For a house use:

requiredAddons[] = {"CAStructures_E"};

//and

class House_EP1;
class Land_YourTag_Domecek: House_EP1
{
	scope = 2;
	armor = 500;
	displayName = "Domecek";
	vehicleClass = "YourTag_DomecekClass";
	model = "YourTag_Domecek\domecek.p3d"; 
	class DestructionEffects {};
	class Damage {};
};

Edited by .kju [PvPscene]

Share this post


Link to post
Share on other sites

Ok guys, thanx a lot, I made everything like you said, but still I can't find addon in editor.. I have last version of code in cfd from PvPscene, but tell me - where I can find this building in editor?

cfg file:

class CfgPatches
{
class DDD_Domecek
{
	units[] = {"DDD_Domecek"};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {"CAStructures_E"};
};
};

class CfgVehicleClasses
{
class DDD_DomecekClass
{
	displayName = "Muj domecek";
};
};


class CfgVehicles
{

class House_EP1;
class Land_DDD_Domecek: House_EP1 {

       scope = 2;
       armor = 500; 
displayName="Domecek";
vehicleClass="DDD_DomecekClass"  
model="\DDD_Domecek\domecek.p3d";
class DestructionEffects {};
class Damage {};

};



};

Edited by chOdec

Share this post


Link to post
Share on other sites

Place a unit first and then Empty > your houseclass should appear in the drop down list

Share this post


Link to post
Share on other sites

Wow, guys, thanks!!! Finally success!!! Now i can start to work on right proportions, specular and normal maps etc.. Thanks again and have a nice day.. :yay:

Share this post


Link to post
Share on other sites

Guys, does anyone have any idea where I did something wrong?

2l9prw7.jpg

I have two rvmat files with different textures. Each is attached to it's own faces. Without rvmat its ok, because there is only diffuse map (no spec or normal map). This is only with rvmat..

I don't know, if the problem is in rvmat definition or in normal/specular maps..

example of rvmat which I used:

surfaceInfo = "DDD_Domecek\DDD_Drevo.bisurf"; //Definition od physical properties ambient[]={1.000000,1.000000,1.000000,1.000000}; diffuse[]={1.000000,1.000000,1.000000,1.000000}; forcedDiffuse[]={0.000000,0.000000,0.000000,0.000000}; emmisive[]={0.000000,0.000000,0.000000,1.000000}; specular[]= {0.536604, 0.600000, 0.480000, 1.000000}; specularPower=850; /// Glossiness; 1 = high, 64 = middle, 1000 = none PixelShaderID = "NormalMapDetailSpecularDIMap"; // The pixelshader // The pixelshader tells what stages (modes) the face should use.

VertexShaderID = "NormalMap";

class Stage1 { // The "NormalMap" 

texture="DDD_Domecek\DDD_wall02_NOHQ.paa"; 
uvSource="tex"; 

class uvTransform { 
aside[]={1.000000,0.000000,0.000000}; 
up[]={0.000000,1.000000,0.000000}; 
dir[]={0.000000,0.000000,0.000000}; 
pos[]={0.000000,0.000000,0.000000}; 
}; 

};

class Stage2 { // The "Detail" 

texture="DDD_Domecek\DDD_wall02_DT.paa"; 
uvSource="tex"; 

class uvTransform { 
aside[]={1.000000,0.000000,0.000000}; 
up[]={0.000000,1.000000,0.000000}; 
dir[]={0.000000,0.000000,0.000000}; 
pos[]={0.000000,0.000000,0.000000}; 
}; 

};

class Stage3 { // The "SpecularDIMap" 

texture="DDD_Domecek\DDD_wall02_SMDI.paa"; 
uvSource = "tex";

class uvTransform { 
aside[] = {1.000000, 0.000000, 0.000000}; 
up[] = {0.000000, 1.000000, 0.000000}; 
dir[] = {0.000000, 0.000000, 0.000000}; 
pos[] = {0.000000, 0.000000, 0.000000}; 
}; 

}; 

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  

×