Jump to content
Sign in to follow this  
maatz

Problems withmy config.cpp

Recommended Posts

hey guys, i got a problem with my config.cpp

if i want to make my objects in to a new vehicle class, it doesn't show up correctly!

ERROR.jpg

heres the config part:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{

model="\maa_hesco\mil1";

armor=200000;

scope=2;

vehicleClass="HESCO Objects";

displayName="Mil 1";

}

Share this post


Link to post
Share on other sites

As bdfy already said, before you can use a vehicleclass you need to define it first.

In your case you need to add this before class CfgVehicles:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class CfgVehicleClasses

{

class MyHesco // or whatever you want to call it

{

displayName="HESCO Objects";

};

};

Your sample needs to look like this then:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{

model="\maa_hesco\mil1";

armor=200000;

scope=2;

vehicleClass="MyHesco";

displayName="Mil 1";

}

Share this post


Link to post
Share on other sites

If this is your first ArmA addon you should check how class loading works now -- opposed to what you had to do in OFP.

Also you should use antoher TAG, as the one you're using is already reserved for MAA of CSLA! wink_o.gif Check OFPEC Tags here. You can reserve something else for you there.

Share this post


Link to post
Share on other sites

thanks a lot guys. now the problem is solved.

oh, and i changed my TAG to another one ;-) thanks raedor!

but now i got a new problem, for which i don't want to start a new thread.

i am making custom editor icons for the objects, but how can i make them exact the size, they are in game then? because my icons now are much bigger than the real model then. i hope you understand my problem!?

greetings and thanks so far

maatz

Share this post


Link to post
Share on other sites

Think what your looking for Maatz is like;

Quote[/b] ]mapSize=6;

in your object class config under CFGVehicle.

Share this post


Link to post
Share on other sites

thank you Gnat!

but i still got problems.

in the wiki stands this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">mapSize

Float: Default Value = 10 (meters).

Used for the map editor to show the icon associated with this model class.

There is no x y component to this, the meaurement units are meters.

To creat a circular, rectangular or other 'non sqaure' image, you need to make a pac file for the icon with, a transparent layer.

mapSize = 0.7; // small object such as a tree

mapSize = 4; // a small'ish building

The Mission Editor map is not very good in this regard (as noted above). However, the main problem is the base classes of the engine. The mapSize= for most objects, particularly buildings, is a one shoe fits all. A forest, eg, is the same mapSize= as a tree !!!

Later Oem addons, *generally* are better and more specific in this regard, making position and fitting a little easier.

so, i made a icon and gave it the size mapsize=1.23; in the config. because the object is exactly 1.23 x 1.23m. but in the editor the icon is still bigger than the object ingame then, you know?

and i also tried it with mapsize=6, as you mentioned, but that was even bigger...

i hope you get the point?

oh btw, whats the best way making a custom icon?

i did "solid fill faces" in the "top view" in oxygen and the used it as the icon... or is it better to draw them with PS?

greetings and a happy new year

maatz

Share this post


Link to post
Share on other sites

Maybe this is the "radius", so try the half of it?

Share this post


Link to post
Share on other sites
Maybe this is the "radius", so try the half of it?

well, i tried as you said, but it didn't work.

the icons still don't fit 100%... sad_o.gif

isn't there another way, of making the icon excatly the real object size?!

Share this post


Link to post
Share on other sites

still playing around with this icon-size-thingy, though. have not found a way of making the icon the exact object size...

well, but i got a new problem:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class wtower1: TargetGrenade

{

model="\maatz_hesco\wtower1";

armor=200000;

scope=2;

vehicleClass="HESCO_Objects";

ladders[]={{"start","end"}};

//mapSize=0.61;

//icon="\maatz_hesco\i\mil1_i.paa";

displayName="Watch Tower 1";

irTarget = 0;

}

the thing is, that the ladder doesn't work in ArmA. dunno whats wrong. i have set up a MemoryLod with the start and end things, and wrote it in the config, but it doesn't seem to work ingame!

but in good ol' ofp the ladder works, without problems...

plus:

i cannot make my normal maps working in AmrA!

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgTextureToMaterial

{

class HESCO_material

{

textures[] = {"maatz_hesco\t\ht.pac"};

material = "#HESCO_material";

};

};

class CfgMaterials

{

class HESCO_material

{a

mbient[] = {1.0, 1.0, 1.0, 1.0};

diffuse[] = {0.0, 0.0, 0.0, 1.0};

forcedDiffuse[] = {0.0, 0.0, 0.0, 1.0};

emmisive[] = {0.0, 0.0, 0.0, 1.0};

specular[] = {0.0, 0.0, 0.0, 1.0};

specularPower = 0.0;

PixelShaderID = "NormalMapDetailSpecularMap";

VertexShaderID = "NormalMap";

class Stage1

{

texture = "maatz_hesco\t\ht_nohq.paa";

uvSource = "tex";

class uvTransform

{

aside[] = {1.0, 0.0, 0.0};

up[] = {0.0, 1.0, 0.0};

dir[] = {0.0, 0.0, 0.0};

pos[] = {0.0, 0.0, 0.0};

};

};

class Stage2

{

texture = "maatz_hesco\t\ht.pac";

uvSource = "tex";

class uvTransform

{

aside[] = {1.0, 0.0, 0.0};

up[] = {0.0, 1.0, 0.0};

dir[] = {0.0, 0.0, 0.0};

pos[] = {0.0, 0.0, 0.0};

};

};

class Stage3

{

texture = "maatz_hesco\t\ht_smdi.paa";

uvSource = "tex";

class uvTransform

{

aside[] = {1.0, 0.0, 0.0};

up[] = {0.0, 1.0, 0.0};

dir[] = {0.0, 0.0, 0.0};

pos[] = {0.0, 0.0, 0.0};

};

};

};

};

this config part was more or less taken from Linker_Spits tut for normal maps etc...

but it doesn't work ingame. it says:

aaavg0.jpg

is anybody able to help me out somehow?

thanks in advance

maatz

Share this post


Link to post
Share on other sites
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class HESCO_material

{a

mbient[] = {1.0, 1.0, 1.0, 1.0};

this config part was more or less taken from Linker_Spits tut for normal maps etc...

but it doesn't work ingame.

Looks like the ambient[] part is spread over two lines. Combining the two lines should fix this error wink_o.gif

Share this post


Link to post
Share on other sites

thanks, that fixed the issue. but now the new texture is much darker than the original one!?

Share this post


Link to post
Share on other sites

Try the below code as your .RVMAT file:

Quote[/b] ]class CfgTextureToMaterial

{

class HESCO_material

{

textures[] = {"maatz_hesco\t\ht.pac"};

material = "#HESCO_material";

};

};

class CfgMaterials

{

class HESCO_material

{a

mbient[] = {1.0, 1.0, 1.0, 1.0};

diffuse[] = {0.0, 0.0, 0.0, 1.0};

forcedDiffuse[] = {0.0, 0.0, 0.0, 1.0};

emmisive[] = {0.0, 0.0, 0.0, 1.0};

specular[] = {0.0, 0.0, 0.0, 1.0};

specularPower = 0.0;

PixelShaderID = "NormalMapDetailSpecularMap";

VertexShaderID = "NormalMap";

class Stage1

{

texture = "maatz_hesco\t\ht_nohq.paa";

uvSource = "tex";

class uvTransform

{

aside[] = {1.0, 0.0, 0.0};

up[] = {0.0, 1.0, 0.0};

dir[] = {0.0, 0.0, 0.0};

pos[] = {0.0, 0.0, 0.0};

};

};

class Stage2

{

texture = "maatz_hesco\t\ht_smdi.paa";

uvSource = "tex";

class uvTransform

{

aside[] = {1.0, 0.0, 0.0};

up[] = {0.0, 1.0, 0.0};

dir[] = {0.0, 0.0, 0.0};

pos[] = {0.0, 0.0, 0.0};

};

};

};

};

In your current setup, you were using the regular coloured texture, as your SMDI "shiny/gloss" map, which would make it look dark.

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  

×