Jump to content
Alucard_Voss

Grass issue or cfgClutter / cfgSurface issue

Recommended Posts

I have tried everything, searching this forum, looking in threads posted by others, but i just can't figure things out why the clutter is not displaying on the map. Sorry for the names.

cfgClutter.hpp

http://pastebin.com/07gz2DYt

cfgSurfaces.hpp

http://pastebin.com/qRxXh25h

config.cpp

http://pastebin.com/9B14rvm8

layers.cfg

http://pastebin.com/jsMSbJDf

Edited by Alucard_Voss
Updated the config.cpp

Share this post


Link to post
Share on other sites

Testing purpose, i still haven't figured out how i can add custom sound to map, and thous files are not working + deleted the files, forgot to edit the config.cpp

# updated the first post

Share this post


Link to post
Share on other sites

try :

on your surfaces.hpp

class foa_grass_green : Default

{

files = "foa_grass_green";

rough = 0.1;

dust = 0.05;

maxSpeedCoef = 0.8;

soundEnviron = "grass";

character = "grass_green_clutter"; //must be the same name defined on your clutter.hpp

soundHit = "soft_ground";

};

on your clutter.hpp

class grass_green_clutter: DefaultClutter

{

model = "A3\plants_f\Clutter\c_Grass_Green.p3d";

affectedByWind = 0.6;

swLighting = "true";

scaleMin = 0.7;

scaleMax = 1.0;

};

Edited by 19thCypeRevenge

Share this post


Link to post
Share on other sites

i am not on my computer.....

class CfgSurfaceCharacters

{

class foa_grass_green

{

probability[]={1, 1};

names[]={"grass_green_clutter","foa_Flower1"};

};

all that i have in my mind, so if you find errors .....

Share this post


Link to post
Share on other sites

its hard to answer you from my cellphone.....

i need to check your problem when i am on my computer!

Share this post


Link to post
Share on other sites
try :

on your surfaces.hpp

class foa_grass_green : Default

{

files = "foa_grass_green";

rough = 0.1;

dust = 0.05;

maxSpeedCoef = 0.8;

soundEnviron = "grass";

character = "grass_green_clutter"; //must be the same name defined on your clutter.hpp

soundHit = "soft_ground";

};

on your clutter.hpp

class grass_green_clutter: DefaultClutter

{

model = "A3\plants_f\Clutter\c_Grass_Green.p3d";

affectedByWind = 0.6;

swLighting = "true";

scaleMin = 0.7;

scaleMax = 1.0;

};

This is probably going to cause more problems, I'm afraid...

This line...

files = "foa_grass_green"; needs to refer to "all files" so it has to be something like files = "foa_grass_green*"; - with the "wildcard" symbol so it catches ALL the "foa_grass_green*anything*" files...

and this line....

character = "grass_green_clutter"; //must be the same name defined on your clutter.hpp

Actually must be a "surface character class" as defined further down in the cfgSurfaces.hpp, most definitely NOT the name of one of your clutter definitions...

There's multiple other inconsistencies in your other files too - all of which may be contributing to the clutter problem.

Lets quickly take a look at the files - using the versions from your first post as reference....

cfgClutter

        class foa_grass_green: DefaultClutter
               {
                       model = "A3\plants_f\Clutter\c_Grass_Green.p3d";
                       affectedByWind = 0.6;
                       swLighting = "true";
                       scaleMin = 0.7;
                       scaleMax = 1.0;
               };
       class foa_Flower1: DefaultClutter
               {
                       model = "A3\plants_f\Clutter\c_Flower_Medium_White1.p3d";
                       affectedByWind = 0.6;
                       swLighting = "true";
                       scaleMin = 0.7;
                       scaleMax = 1.0;
               };

This is fine - you have two clutters defined - "foa_grass_green" and "foa_Flower1" - definitions look good, all parameters look in position... You can add more clutter types later if you like, but these two will be fine for now...

Layers.cfg

class Layers
{
 class foa_grass_green   [color="#FF0000"] \\Haven't you already used this classname for a clutter type? [/color]
 {
   texture = "applegate\data\foa_grass_green_co.paa";   [color="#FF0000"]// just leave this definition empty (texture="";) - its for "legacy tech"[/color]
   material = "applegate\data\foa_grass_green.rvmat";
 };
 class sand
 {
       texture = "";
       material = "applegate\data\foa_desert.rvmat";
 };
 class concrete
 {
       texture = "";
       material = "applegate\data\foa_concrete.rvmat";
 };
 class seabed
 {
       texture = "";
       material = "applegate\data\foa_[color="#FF0000"]S[/color]eabed.rvmat";  [color="#FF0000"]// No CAPS in texture paths!![/color]
 };
};
class Legend
{
 picture="applegate\source\mapLegend.png";
 class Colors
 {
       foa_grass_green[]={{140,195,80}};
       sand[]={{230,230,120}};
       seabed[]={{120,120,121}};
 };
};

Ok... Several things wrong here - firstly see the notes within the code itself for that first class definition - that needs fixed.

Secondly - in the top section you have Four texture classes defined, but in the colours section below you only have Three of them associated with actual mask colours. That's no good - you've defined four surface types - you need to associate all four with appropriate mask colours in the section below.

If there's no "concrete areas" on your mask - get rid of the definition for concrete in the top section... If there ARE concrete areas on your mask - then associate concrete with the mask colour you used for those areas in the bottom section... Either way - make it consistent.

Speaking of being consistent.....

cfgSurfaces

class CfgSurfaces
{
       class Default {};
       class foa_grass_green : Default   [color="#FF0000"] /// There's that same classname AGAIN!! Try "foa_grass_green_Surface" instead[/color]
       {      
               files = "foa_grass_green_*";    [color="#FF0000"]// Yay! Wildcard (*) in use!! (are you sure about that underscore before it though? "foa_grass_green_*" will successfully find "foa_grass_green_co.paa" and it'll find "foa_grass_green_nopx.paa" but it will Fail To Find "foa_grass_green.rvmat")[/color]
               rough = 0.1;
               dust = 0.05;
               maxSpeedCoef = 0.8;
               soundEnviron = "grass";
               character = "grass_green_Character";  [color="#FF0000"]//Correct! - this unique classname will be defined below![/color]
               soundHit = "soft_ground";
       };
       class concrete : Default   [color="#FF0000"] /// again - be consistent with classnames and don't duplicate - "foa_concrete_Surface" would be a good choice here[/color]
       {      
               files = "concrete*";
               character = "Empty";   [color="#FF0000"]// Correct again - for no clutter, just use "Empty"[/color]
               soundEnviron = "concrete";
               soundHit = "concrete";
               rough = 0.05;
               maxSpeedCoef = 1;
               dust = 0.15;
               lucidity = 0.3;
               grassCover = 0.0;
               impact = "hitConcrete";
       };
};

class CfgSurfaceCharacters
{
       class grass_green_Character
       {
                       probability[]={1, 1};   [color="#FF0000"] /// These values must TOTAL 1.0, or preferably 0.99[/color]
                       names[]={"foa_grass_green", "foa_Flower1"};   [color="#FF0000"]//As defined in your cfgClutter.hpp[/color]
       };
};

Ok - once again, a few embedded comments above, but the most important thing is? - where's all the surfaces?? You defined Four in Layers.cfg, only associated Three of them with actual mask colours (concrete wasn't one of them), now here you only actually have Two surfaces defined - one of which is... concrete ???

Four colours on mask?

=Four textures defined in Layers.cfg

=Four textures associated with four colours in Layers.cfg

=Four Surfaces defined in cfgSurfaces.hpp

=Plus - any Surface definition in cfgSurfaces which has a "surface character" (ie: a "clutter mix" defined must have that surface character defined - under the same classname you used in "character=" - below in the Surface Characters section

Try to maintain consistency in your classnames and don't repeat yourself...

eg:

foa_grass_green_clutter = cfgClutter clutter model definition

foa_grass_green = Layers.cfg Texture class

foa_grass_green_Surface = cfgSurfaces surface material class

foa_grass_green_character = cfgSurfaces "surface character section" classname for the "clutter mix" associated with that surface

I didn't check thru the Huge config in any great detail :o try fixing all the above stuff - regenerating the Layers, resaving the .wrp and repacking the terrain first - see if you get a result...

B

Edited by Bushlurker
  • Like 1

Share this post


Link to post
Share on other sites

You my sir are genius ! It finally worked like a charm, thank you i can't thank you enough, all because of stupidity and you pointed them out + all good in game !!! Thank you a lot ! You deserve a price or donation.

Share this post


Link to post
Share on other sites

Yeah, Bush, great explanations whatsoever! Loved your tutorials on terrain making!

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

×