Jump to content
Sign in to follow this  
furean

Having trouble with clutter

Recommended Posts

Hello folks, new mapmaker here!

I've fooling around with Terrain Builder for the past week or so, and have made some decent progress on my first map, but non-working clutter's left me stuck. Arma 2 clutter that I'm attempting to use in my map doesn't seem to be working as I've written in my various config files. I've probably messed something up in the code, but unfortunately I can't seem to the find the problem. :(

I'm using AiA TP, and would assume the same pathing as A2 maps use for their clutter should work.. though I may be wrong.

Any help would be much appreciated. I've included my various configs below.

Config.cpp

 
class CfgPatches
{
       class Valas
       {
               units[] = {"Valas"};
               weapons[] = {};
               requiredVersion = 0.1;
               requiredAddons[] = {"A3_Data_F","A3_Roads_F","A3_Structures_F","A3_Map_Data","A3_Map_Stratis","CAData","CABuildings","CABuildings2","CAMisc","CARoads2","CACharacters2"};
               author[] = {"Furean"};
               authorUrl = "";
               versionDesc = "";
               version = "1.00";
               versionStr = 1.0;
               versionAr[] = {1, 0, 0};
       };     
};

class CfgVehicles{};

class CfgWorlds
{
       class DefaultWorld {
               class Weather {
                       class Overcast;
               };
       };

       class CAWorld: DefaultWorld {
               class Grid{};
               class DayLightingBrightAlmost;
               class DayLightingRainy;
               class DefaultClutter;
               class Weather: Weather {
                       class Lighting;
                       class Overcast: Overcast {
                               class Weather1;
                               class Weather2;
                               class Weather3;
                               class Weather4;
                               class Weather5;
                               class Weather6;
                       };
               };
       };

       class DefaultLighting;

       class Valas: CAWorld {
               cutscenes[] = {};
               description = "Valassaaret";
               icon = "";
               worldName = "\valas\valas.wrp";
               pictureMap = "";
               pictureShot = "";
               plateFormat = "AS$-####";
               plateLetters = "ABCDEGHIKLMNOPRSTVXZ";
               author = "Furean";
               mapSize = 6000;
               mapZone = 31;
               longitude = N6852352;
               latitude = E531523;
               elevationOffset = 0;
               envTexture = "A3\Data_f\env_land_ca.tga";
               newRoadsShape = "valas\data\roads\roads.shp";
               startTime = "10:45";
               startDate = "5/5/2014";
               centerPosition[] = {1040,1000,500};
               seagullPos[] = {1040,850,500};
               clutterGrid = 1.5;
               clutterDist = 125;
               noDetailDist = 65;
               fullDetailDist = 15;
               midDetailTexture = "A3\Map_Data\middle_mco.paa";
               minTreesInForestSquare = 4;
               minRocksInRockSquare = 4;
               loadingTexts[] = {"Borkborkbork..."};
               ilsPosition[] = {0, 0};
               ilsDirection[] = {0, 0, 0};
               ilsTaxiIn[] = {};
               ilsTaxiOff[] = {};
               drawTaxiway = 0;

               class SecondaryAirports {};

               class ReplaceObjects {};

               class Sounds {
                       sounds[] = {};
               };

               class Animation {
                       vehicles[] = {};
               };

               class Clutter
               {

					class GrassDesertGroupSoft: DefaultClutter
					{
						model = "A3\plants_f\Clutter\c_GrassGreen_GroupSoft.p3d";
						affectedByWind = 1.0;
						swLighting = "true";
						scaleMin = 0.6;
						scaleMax = 1.1;
					};
					class VAL_GrassBunch: DefaultClutter
					{
						model = "ca\plants2\clutter\c_GrassBunch.p3d";
						affectedByWind = 0.35;
						swLighting = 1;
						scaleMin = 0.6;
						scaleMax = 1;
					};
					class VAL_GrassCrooked: DefaultClutter
					{
						model = "ca\plants2\clutter\c_GrassCrooked.p3d";
						affectedByWind = 0.3;
						swLighting = 1;
						scaleMin = 0.7;
						scaleMax = 1.4;
					};
					class VAL_GrassTall: DefaultClutter
					{
						model = "ca\plants2\clutter\c_GrassTall.p3d";
						affectedByWind = 0.4;
						swLighting = 1;
						scaleMin = 0.7;
						scaleMax = 1;
					};
					class VAL_BlueBerry: DefaultClutter
					{
						model = "ca\plants2\clutter\c_BlueBerry.p3d";
						affectedByWind = 0.05;
						swLighting = 1;
						scaleMin = 0.85;
						scaleMax = 1.3;
					};
					class VAL_FernAutumn: DefaultClutter
					{
						model = "ca\plants2\clutter\c_fern.p3d";
						affectedByWind = 0.1;
						scaleMin = 0.6;
						scaleMax = 1.2;
					};
					class VAL_FernAutumnTall: DefaultClutter
					{
						model = "ca\plants2\clutter\c_fernTall.p3d";
						affectedByWind = 0.15;
						scaleMin = 0.75;
						scaleMax = 1;
					};
					class VAL_SmallPicea: DefaultClutter
					{
						model = "ca\plants2\clutter\c_picea.p3d";
						affectedByWind = 0.05;
						scaleMin = 0.75;
						scaleMax = 1.25;
					};				
					class GrassBrushHighGreen: DefaultClutter
					{
						model = "A3\plants_f\Clutter\c_Grass_BrushHigh_Green.p3d";
						affectedByWind = 0.8;
						swLighting = "true";
						scaleMin = 0.5;
						scaleMax = 0.7;
					};

					class ThistleSmallYellow: DefaultClutter
					{
						model = "A3\plants_f\Clutter\c_Thistle_Small_Yellow.p3d";
						affectedByWind = 0.3;
						swLighting = "true";
						scaleMin = 0.3;
						scaleMax = 0.9;
					};

					class ThistleThornGreen: DefaultClutter
					{
						model = "A3\plants_f\Clutter\c_Thistle_Thorn_Green.p3d";
						affectedByWind = 0.3;
						swLighting = "false";
						scaleMin = 0.3;
						scaleMax = 1.0;
					};

					class ThistleThornGreenSmall: DefaultClutter
					{
						model = "A3\plants_f\Clutter\c_Thistle_Thorn_Green.p3d";
						affectedByWind = 0.25;
						swLighting = "false";
						scaleMin = 0.4;
						scaleMax = 0.7;
					};

					class FlowerLowYellow2: DefaultClutter
					{
						model = "A3\plants_f\Clutter\c_Flower_Low_Yellow2.p3d";
						affectedByWind = 0.4;
						swLighting = "true";
						scaleMin = 0.6;
						scaleMax = 1.0;
					};
					class StrGrassDryGroup: DefaultClutter
					{
						model = "A3\plants_f\Clutter\c_StrGrassDry_group.p3d";
						affectedByWind = 0.65;
						swLighting = "true";
						scaleMin = 0.65;
						scaleMax = 1.0;
					};
					class StrGrassDryMediumGroup: DefaultClutter
					{
						model = "A3\plants_f\Clutter\c_StrGrassDryMedium_group.p3d";
						affectedByWind = 0.7;
						swLighting = "true";
						scaleMin = 0.8;
						scaleMax = 1.0;
					};
					class StrWeedBrownTallGroup: DefaultClutter
					{
						model = "A3\plants_f\Clutter\c_StrWeedBrownTall_group.p3d";
						affectedByWind = 0.3;
						swLighting = "true";
						scaleMin = 0.9;
						scaleMax = 1.25;
					};
					class StrWeedGreenTall: DefaultClutter
					{
						model = "A3\plants_f\Clutter\c_StrWeedGreenTall.p3d";
						affectedByWind = 0.3;
						swLighting = "true";
						scaleMin = 0.8;
						scaleMax = 1.2;
					};
					class StrPlantMullein: DefaultClutter
					{
						model = "A3\plants_f\Clutter\c_StrPlantMullein.p3d";
						affectedByWind = 0.35;
						swLighting = "true";
						scaleMin = 0.7;
						scaleMax = 1.15;
					};
					class StrThistleYellowShrub: DefaultClutter
					{
						model = "A3\plants_f\Clutter\c_StrThistleYellowShrub.p3d";
						affectedByWind = 0.2;
						swLighting = "true";
						scaleMin = 0.7;
						scaleMax = 1.1;
					};
               };

			class Names
			{
				#include "valas.hpp"
			};


               class Grid: Grid {
                       offsetX = 0;
                       offsetY = 0;
                       class Zoom1     {
                               zoomMax = 0.2;
                               format = "XY";
                               formatX = "000";
                               formatY = "000";
                               stepX = 100;
                               stepY = -100;
                       };
                       class Zoom2 {
                               zoomMax = 0.95;
                               format = "XY";
                               formatX = "00";
                               formatY = "00";
                               stepX = 1000;
                               stepY = -1000;
                       };
                       class Zoom3 {
                               zoomMax = 1e+030;
                               format = "XY";
                               formatX = "0";
                               formatY = "0";
                               stepX = 10000;
                               stepY = -10000;
                       };
               };

       };
};

class CfgWorldList{
       class Valas{};
};

class CfgMissions{
       class Cutscenes {

       };
};


#include "cfgSurfaces.hpp"

cfgSurfaces.hpp

class CfgSurfaces
{
       class Default {};

		class VAL_grass_Surface: Default
		{
			access = 2;
			files = "gdt_green_grass_*";
			character = "VAL_grass_Character";
			soundEnviron = "grass";
			soundHit = "soft_ground";
			rough = 0.08;
			maxSpeedCoef = 0.9;
			dust = 0.15;
			lucidity = 4;
			grassCover = 0.05;
			impact = "hitGroundSoft";
			surfaceFriction = 1.7;
		};
		class VAL_beach_Surface: Default
		{
			access = 2;
			files = "gdt_beach_*";
			character = "Empty";
			soundEnviron = "sand";
			soundHit = "soft_ground";
			rough = 0.1;
			maxSpeedCoef = 0.9;
			dust = 0.83;
			lucidity = 1.25;
			grassCover = 0.0;
			impact = "hitGroundSoft";
			surfaceFriction = 1.6;
		};
		class VAL_dry_grass_Surface: Default
		{
			access = 2;
			files = "gdt_dry_grass_*";
			character = "VAL_dry_grass_Character";
			soundEnviron = "drygrass";
			soundHit = "soft_ground";
			rough = 0.08;
			maxSpeedCoef = 0.9;
			dust = 0.5;
			lucidity = 2;
			grassCover = 0.1;
			impact = "hitGroundSoft";
			surfaceFriction = 1.75;
		};
		class VAL_dirt_Surface: Default
		{
			access = 2;
			files = "gdt_dirt_*";
			character = "VAL_dirt_Character";
			soundEnviron = "dirt";
			soundHit = "hard_ground";
			rough = 0.09;
			maxSpeedCoef = 0.9;
			dust = 0.5;
			lucidity = 1;
			grassCover = 0.03;
			impact = "hitGroundSoft";
			surfaceFriction = 1.8;
		};


};
class CfgSurfaceCharacters
{
class VAL_dirt_Character
{
	probability[] = {0.3,0.2,0.01,0.02,0.05};
	names[] = {"GrassDesertGroupSoft","VAL_GrassBunch","GrassBrushHighGreen","ThistleSmallYellow","VAL_SmallPicea"};
};
class VAL_grass_Character
{
	probability[] = {0.4,0.2,0.1,0.05,0.15,0.05,0.05};
	names[] = {"VAL_GrassBunch","VAL_GrassCrooked","VAL_GrassTall","VAL_BlueBerry","VAL_FernAutumn","VAL_FernAutumnTall","VAL_SmallPicea"};
};
class VAL_dry_grass_Character
{
	probability[] = {0.21,0.35,0.21,0.09,0.06,0.02};
	names[] = {"StrGrassDryGroup","StrGrassDryMediumgroup","StrWeedBrownTallGroup","StrWeedGreenTall","StrThistleYellowShrub","StrPlantMullein"};
};
};

layers.cfg

class Layers
{
 class grass_green
 {
   texture = #(rgb,1,1,1)color(0.5,0.5,0.5,1,cdt);
   material = "valas\data\gdt_grass_green.rvmat";
 };
 class beach
 {
   texture = #(rgb,1,1,1)color(0.5,0.5,0.5,1,cdt);
   material = "valas\data\gdt_beach.rvmat";
 };
 class dry_grass
 {
   texture = #(rgb,1,1,1)color(0.5,0.5,0.5,1,cdt);
   material = "valas\data\gdt_dry_grass.rvmat";
 };
 class dirt
 {
   texture = #(rgb,1,1,1)color(0.5,0.5,0.5,1,cdt);
   material = "valas\data\gdt_dirt.rvmat";
 };
 class gravel
 {
   texture = #(rgb,1,1,1)color(0.5,0.5,0.5,1,cdt);
   material = "valas\data\gdt_gravel.rvmat";
 };
};

class Legend
{
 picture="valas\source\mapLegend.png";
 class Colors
 {
grass_green[]={{0,255,0}};
beach[]={{255,255,0}};
dry_grass[]={{0,100,0}};
dirt[]={{255,0,255}};
gravel[]={{0,0,255}};
 };
};

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

And in case you're wondering, this is how it looks like ingame: https://dl.dropboxusercontent.com/u/1224981/2015-01-23_00001.jpg

Share this post


Link to post
Share on other sites

I've not made a separate cfgClutter.hpp. I've included the class clutter and the various clutter assigned to the map in the config.cpp.

Edited by Furean

Share this post


Link to post
Share on other sites

Sorry, I totally missed that.

Going over them, I don't see anything wrong with them. One thing I did notice is that the sum of some probability values goes over 1.0, I'm not 100% sure but I think that's bad and can lead to errors.

Can I ask if you're using AddonBuilder or PBOproject to pack your map?

Share this post


Link to post
Share on other sites

I've tried both of them, with the same end result which you can see in the screenshot I linked in the opening post.

I've also tried reducing the probability on the grass (which was 1.0) to below 1.0 as you suggested, but it seems it had no effect. :s

Share this post


Link to post
Share on other sites

You as an author, should have a tag that goes before any class entries or anything else that you make. This prevents problems of other people's work overwriting yours or yours overwriting theirs. For example, mine is jsp so all my pbos are jsp_*name of terrain*. My terrain folders are P:/jsp/jsp_*name of terrain*. My textures are "jsp_*name of terrain*_green_grass". Trust me when I say this makes things a lot easier. In your case I would do "P:/yourTag/yourTag_valas" for your project folder and "yourTag_valas_textureType" for your textures.

Creating a New Tag

Go to http://www.ofpec.com/

Create an account if you don’t have one already.

Go to http://www.ofpec.com/tags

This area is here for addon makers to create and register their tag.

Having a tag, and using it properly, helps to make sure that addons don’t override one another or elements of one another.

Create a tag.

Type the tag you want into the “Tag†field and press the Check Availability button.

If your tag is available continue on. If not think of a new one and try again.

You if wish, fill out the rest of the form.

Hit Submit Tag. You now should have a tag.

a.) Make sure all your clutter has a unique name with your tag in front of it. For example, your first entry does not have it. (ex. GrassDesertGroupSoft should be VAL_GrassDesertGroupSoft)

b.) Make sure your textures have unique names with your tag in front of it (ex. gdt_gravel.rvmat is not a good one to use)

I don't know if any of this will solve your problem but there is a possibility it might since you're sharing names with other terrains which might be screwing things up. Additionally, check your RPT files for any errors that might be related to your terrain by checking the RPT file located here: C:\Users\yourUserName\AppData\Local\Arma 3

Share this post


Link to post
Share on other sites

Right, I gave giving all the clutter classnames, files, etc, the tag a go. But this in turn caused all A3 clutter to cease working, which leads me to believe that my map is somehow making use of the default clutter configs for Stratis (since changed classnames lead to non-functional clutter). The question is how and why.. x|

Share this post


Link to post
Share on other sites
Right, I gave giving all the clutter classnames, files, etc, the tag a go. But this in turn caused all A3 clutter to cease working, which leads me to believe that my map is somehow making use of the default clutter configs for Stratis (since changed classnames lead to non-functional clutter). The question is how and why.. x|

That includes textures right? The textures are no longer named gdt_*name*? Make sure that is the case and make sure you changed this line in your cfgSurfaces: files = "gdt_green_grass_*";

Share this post


Link to post
Share on other sites

Precisely. My current configs are as follows;

config.cpp

class CfgPatches
{
	class Valas
	{
			units[] = {"Valas"};
			weapons[] = {};
			requiredVersion = 0.1;
			requiredAddons[] = {"A3_Data_F","A3_Roads_F","A3_Structures_F","A3_Map_Data","A3_Map_Stratis","CAData","CABuildings","CABuildings2","CAMisc","CARoads2","CACharacters2","AiA_Plants2_Clutter_Data"};
			author[] = {"Furean"};
			authorUrl = "";
			versionDesc = "";
			version = "1.00";
			versionStr = 1.0;
			versionAr[] = {1, 0, 0};
	};
};

class CfgVehicles{};

class CfgWorlds
{
	class DefaultWorld {
			class Weather {
					class Overcast;
			};
	};

	class CAWorld: DefaultWorld {
			class Grid{};
			class DefaultClutter;
			class DayLightingBrightAlmost;
			class DayLightingRainy;
			class Weather: Weather {
					class Lighting;
					class Overcast: Overcast {
						class Weather1;
						class Weather2;
						class Weather3;
						class Weather4;
						class Weather5;
						class Weather6;
					};
			};
	};

	class DefaultLighting;

	class Valas: CAWorld {
			cutscenes[] = {};
			description = "Valassaaret";
			icon = "";
			worldName = "\valas\valas.wrp";
			pictureMap = "";
			pictureShot = "";
			plateFormat = "AS$-####";
			plateLetters = "ABCDEFGHIKLMNOPRSTVXZ";
			author = "Furean";
			mapSize = 6000;
			mapZone = 31;
			longitude = N6852352;
			latitude = E531523;
			elevationOffset = 0;
			envTexture = "A3\Data_f\env_land_ca.tga";
			newRoadsShape = "valas\data\roads\roads.shp";
			startTime = "10:45";
			startDate = "5/5/2014";
			centerPosition[] = {1040,1000,500};
			seagullPos[] = {1040,850,500};
			clutterGrid = 1.5;
			clutterDist = 125;
			noDetailDist = 65;
			fullDetailDist = 15;
			midDetailTexture = "A3\Map_Data\middle_mco.paa";
			minTreesInForestSquare = 4;
			minRocksInRockSquare = 4;
			loadingTexts[] = {"Borkborkbork..."};
			ilsPosition[] = {0, 0};
			ilsDirection[] = {0, 0, 0};
			ilsTaxiIn[] = {};
			ilsTaxiOff[] = {};
			drawTaxiway = 0;

			class SecondaryAirports {};

			class ReplaceObjects {};

			class Sounds {
					sounds[] = {};
			};

			class Animation {
					vehicles[] = {};
			};

			#include "cfgClutter.hpp"

			class Names
			{
				#include "valas.hpp"
			};

			class Grid: Grid {
				offsetX = 0;
				offsetY = 0;
				class Zoom1 {
					zoomMax = 0.2;
					format = "XY";
					formatX = "000";
					formatY = "000";
					stepX = 100;
					stepY = -100;
				};
				class Zoom2 {
					zoomMax = 0.95;
					format = "XY";
					formatX = "00";
					formatY = "00";
					stepX = 1000;
					stepY = -1000;
				};
				class Zoom3 {
					zoomMax = 1e+030;
					format = "XY";
					formatX = "0";
					formatY = "0";
					stepX = 10000;
					stepY = -10000;
				};
			};
	};
};

class CfgWorldList{
class Valas{};
};

class CfgMissions{
	class Cutscenes {
	};
};

#include "cfgSurfaces.hpp"

cfgClutter.hpp

class Clutter
{

	class VAL_GrassBunch: DefaultClutter
	{
		model = "valas\clutter\c_GrassBunch.p3d";
		affectedByWind = 0.35;
		swLighting = 1;
		scaleMin = 0.6;
		scaleMax = 1;
	};
	class VAL_GrassCrooked: DefaultClutter
	{
		model = "valas\clutter\c_GrassCrooked.p3d";
		affectedByWind = 0.3;
		swLighting = 1;
		scaleMin = 0.7;
		scaleMax = 1.4;
	};
	class VAL_GrassTall: DefaultClutter
	{
		model = "valas\clutter\c_GrassTall.p3d";
		affectedByWind = 0.4;
		swLighting = 1;
		scaleMin = 0.7;
		scaleMax = 1;
	};
	class VAL_BlueBerry: DefaultClutter
	{
		model = "valas\clutter\c_BlueBerry.p3d";
		affectedByWind = 0.05;
		swLighting = 1;
		scaleMin = 0.85;
		scaleMax = 1.3;
	};
	class VAL_FernAutumn: DefaultClutter
	{
		model = "valas\clutter\c_fern.p3d";
		affectedByWind = 0.1;
		swLighting = 1;
		scaleMin = 0.6;
		scaleMax = 1.2;
	};
	class VAL_FernAutumnTall: DefaultClutter
	{
		model = "valas\clutter\c_fernTall.p3d";
		affectedByWind = 0.15;
		swLighting = 1;
		scaleMin = 0.75;
		scaleMax = 1;
	};
	class VAL_SmallPicea: DefaultClutter
	{
		model = "valas\clutter\c_picea.p3d";
		affectedByWind = 0.05;
		swLighting = 1;
		scaleMin = 0.75;
		scaleMax = 1.25;
	};
};

cfgSurfaces.hpp

class CfgSurfaces
{
	class Default{};

		class VAL_grass_Surface: Default
		{
			acesss = 2;
			files = "VAL_green_grass*";
			character = "VAL_grass_Character";
			soundEnviron = "grass";
			soundHit = "soft_ground";
			rough = 0.08;
			maxSpeedCoef = 0.9;
			dust = 0.15;
			lucidity = 4;
			grassCover = 0.05;
			impact = "hitGroundSoft";
			surfaceFriction = 1.7;
		};

		class VAL_beach_Surface: Default
		{
			acesss = 2;
			files = "VAL_beach*";
			character = "Empty";
			soundEnviron = "sand";
			soundHit = "soft_ground";
			rough = 0.1;
			maxSpeedCoef = 0.9;
			dust = 0.83;
			lucidity = 1.25;
			grassCover = 0.0;
			impact = "hitGroundSoft";
			surfaceFriction = 1.6;
		};

		class VAL_dry_grass_Surface: Default
		{
			acesss = 2;
			files = "VAL_dry_grass*";
			character = "VAL_grass_Character";
			soundEnviron = "drygrass";
			soundHit = "soft_ground";
			rough = 0.08;
			maxSpeedCoef = 0.9;
			dust = 0.5;
			lucidity = 2;
			grassCover = 0.1;
			impact = "hitGroundSoft";
			surfaceFriction = 1.75;
		};

		class VAL_dirt_Surface: Default
		{
			acesss = 2;
			files = "VAL_dirt*";
			character = "VAL_grass_Character";
			soundEnviron = "dirt";
			soundHit = "hard_ground";
			rough = 0.09;
			maxSpeedCoef = 0.9;
			dust = 0.5;
			lucidity = 1;
			grassCover = 0.03;
			impact = "hitGroundSoft";
			surfaceFriction = 1.8;
		};
};
class CfgSurfaceCharacters
{
class VAL_grass_Character
{
	probability[] = {0.46,0.14,0.16,0.10};
	names[] = {"VAL_GrassBunch","VAL_GrassTall","VAL_FernAutumnTall","VAL_SmallPicea"};
};
};

Share this post


Link to post
Share on other sites

Don't mean to butt in and this probably isn't the issue but I don't think this is how that property is supposed to be named:

[b]acesss[/b] = 2;

Shouldn't it be:

[b]access = 2;[/b]

I checked my own files and I don't even have that property in there so I'm not sure what it does, just thought I'd mention it.

Share this post


Link to post
Share on other sites

Ah, woops. Typo there. I'll try fixing it and see if it helps.

EDIT: Removed the line, and still no clutter about. :(

---------- Post added at 15:47 ---------- Previous post was at 15:11 ----------

Right, folks. Seems I've got it fixed. Simply not using the standard A3 ground textures and using a custom one made the clutter work because of ???.

Anyways, thanks for all the advice and help regardless. :)

Edited by Furean

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  

×