Page 1 of 1

How to use foliage?

Posted: Sun Dec 09, 2012 9:03 am
by Redline
Some worlds like Endor or Felucia work with Foliage.
As far as know it's for the adding of grass or bushes.
Otherwise you would have to place the grass 1000 of times on the map.
Also you would have to rotate and place the grass on mountains and this would take much time and many nerves.

Okay, so what I've to do? Is it some work in the world abc.req?
Where can I tell the game which types of objects it shall load?
Hidden/Spoiler:
Image

Re: How to use foliage?

Posted: Sun Dec 09, 2012 10:06 am
by THEWULFMAN
There are 4 Foliage levels, as you can see in ZE. They each are a callback in the .prp (Prop File). The Prop file is called for in your worlds .req.

You can check out Felucia's stock files. It will have a prop file, and using that you can see how it's setup. I added some comments to the first section, marked in bolded blue.

fel.prp
Hidden/Spoiler:
Layer(0) // layer level
{
SpreadFactor(0.2);
Mesh()
{
File("fel1_prop_foliage_b.msh", 100); // model name
Frequency(70); // how frequently it will place the object
Scale(1); // how big they will be
Lighting(1); // no idea, maybe asking if it is to be affected by lighting or not
Stiffness(0.0); // again, no idea
AIVisibilityFactor(0.2,0.5); // how much the AI's view range will be decreased inside the foliaged area
}
}

Layer(1)
{
SpreadFactor(0.7);
Mesh()
{
File("fel1_bldg_pitcher_bush.msh", 100);
Frequency(70);
Scale(1.0);
Stiffness(0.1);
ColorVariation(0.4);
UseCollision(1);
Lighting(1);
AIVisibilityFactor(1.0,1.0);
Sound("fel_amb_wildlife", 8.0, 2.0);
CollisionSound("foliage_collision");
}
}

Layer(2)
{
SpreadFactor(0.3);
Mesh()
{
File("fel1_prop_foliage_d.msh", 100);
Frequency(60);
Scale(1.0);
Stiffness(0.0);
CollisionSound("foliage_collision");
AIVisibilityFactor(1.0,1.0);
}
}

Layer(3)
{
SpreadFactor(0.2);
Mesh()
{
GrassPatch("fel1_prop_thick_bush.odf", 95);
File("editor_prop_bush.msh", 95);
Frequency(95);
Scale(0.45);
Lighting(1);
Stiffness(0.0);
Sound("fel_amb_wildlife", 8.0, 2.0);
CollisionSound("foliage_collision");
AIVisibilityFactor(0.1,0.25);
}
}

TreeLine()
{
Path("jungle1")
{
Distance(20);
BorderOdf("fel1_prop_hellbush");
}
}
It's exceedingly helpful, practically a necessity. Like, I used them for adding tons of rocks all over my Titan map, which would have been nearly impossible to do otherwise.

Re: How to use foliage?

Posted: Sun Dec 09, 2012 10:11 am
by AceMastermind