SWBFGamers

Modding for the Original SWBF1 and SWBF2 => SWBF1 Modding => Topic started by: Epifire on April 15, 2015, 10:06:06 AM

Title: Painting Rock Foliage.
Post by: Epifire on April 15, 2015, 10:06:06 AM
Welp as you can guess by the title I'm trying to use the foliage system like how Pandemic did with their rocks on Rhen Var. Just a simple set I made here that were all separated to use by the population placement system. [spoiler](https://www.swbfgamers.com/proxy.php?request=http%3A%2F%2Fi905.photobucket.com%2Falbums%2Fac254%2FEpifire%2FModel%2520Pics%2FScreen%2520Shot%252004-15-15%2520at%252012.01%2520PM_zpskw5leaum.png&hash=4522b38bdc8a0f9f17a85fea0c2caab34039c0c3)[/spoiler]

So far I'm just getting nothing in ZE which is sorta strange, cause there's no typos in the .prp file I made and I've cross referenced it with several other stock .prp files. Do the referenced meshes need to be in the regular MSH folder or somewhere else?
Title: Re: Painting Rock Foliage.
Post by: Sereja on April 15, 2015, 11:00:20 AM
Nah, if the game, didn't find a grass msh - it crashed for sure. Perhaps you add some wrong lines in .prp. Usualy, the layer should looks like this:
[spoiler]Layer(0)
{
    SpreadFactor(0.1);
    Mesh()
    {

File("umb_grass_la.msh", 100);
Frequency(270);
Scale(1.0);
Stiffness(0.0);
ColorVariation(0.1);
Lighting(1);
AIVisibilityFactor(1.0,1.0);
CollisionSound("foliage_collision");
    }
}
[/spoiler]
Or perhaps you forget to add grass tills with ZE brush.
According your pic - the half of the rocks, most likely will be underground.
Title: Re: Painting Rock Foliage.
Post by: Epifire on April 15, 2015, 11:36:37 AM
The screenshot was just the rocks in XSI just to show you what I'm wanting to put in-game. They're centered for export, individually (not shown in that shot). This is what my .PRP file looks like...

I did use the different layer brushes, but nothing came up. I had thought maybe they were underground but going beneath the terrain didn't show anything.

Layer(0)
{
    SpreadFactor(0.3);
    Mesh()
    {
        File("Env_Pointy_Rock_1.msh", 600);
        Frequency(25);
        Scale(1);
        Stiffness(0.0);
        CollisionSound("");
        ColorVariation(0.2);
    }

    Mesh()
    {
        File("Env_Pointy_Rock_2.msh", 600);
        Frequency(25);
        Scale(1);
        Stiffness(0.0);
        CollisionSound("");
        ColorVariation(0.2);
    }

    Mesh()
    {
        File("Env_Pointy_Rock_3.msh", 600);
        Frequency(25);
        Scale(1);
        Stiffness(0.0);
        CollisionSound("");
        ColorVariation(0.2);
    }

    Mesh()
    {
        File("Env_Pointy_Rock_4.msh", 600);
        Frequency(25);
        Scale(1);
        Stiffness(0.0);
        CollisionSound("");
        ColorVariation(0.2);
    }
}

Layer(1)
{
    SpreadFactor(0.1);
    Mesh()
    {
        File("Env_Tiny_Rock_1.msh", 600);
        Frequency(25);
        Scale(1);
        Stiffness(0.0);
        CollisionSound("");
        ColorVariation(0.2);
    }

    Mesh()
    {
        File("Env_Tiny_Rock_2.msh", 600);
        Frequency(25);
        Scale(1);
        Stiffness(0.0);
        CollisionSound("");
        ColorVariation(0.2);
    }

    Mesh()
    {
        File("Env_Tiny_Rock_3.msh", 600);
        Frequency(25);
        Scale(1);
        Stiffness(0.0);
        CollisionSound("");
        ColorVariation(0.2);
    }

    Mesh()
    {
        File("Env_Tiny_Rock_4.msh", 600);
        Frequency(25);
        Scale(1);
        Stiffness(0.0);
        CollisionSound("");
        ColorVariation(0.2);
    }
}

Layer(2)
{
    SpreadFactor(0.3);
    Mesh()
    {
        File("Env_Slab_Rock_1.msh", 600);
        Frequency(25);
        Scale(1);
        Stiffness(0.0);
        CollisionSound("");
        ColorVariation(0.2);
    }

    Mesh()
    {
        File("Env_Slab_Rock_2.msh", 600);
        Frequency(25);
        Scale(1);
        Stiffness(0.0);
        CollisionSound("");
        ColorVariation(0.2);
    }

    Mesh()
    {
        File("Env_Slab_Rock_3.msh", 600);
        Frequency(25);
        Scale(1);
        Stiffness(0.0);
        CollisionSound("");
        ColorVariation(0.2);
    }
}
Title: Re: Painting Rock Foliage.
Post by: Snake on April 15, 2015, 12:05:50 PM
Try inserting a stock mesh for some prp rock and see if it shows up correctly.
Title: Re: Painting Rock Foliage.
Post by: Epifire on April 15, 2015, 01:21:05 PM
Yeah I used both the assets and the actual stock .prp file for the test (renaming the .prp to the mod id of course) but still nothing. I think my builder setup is somehow bugged.

I'm inserting the assets, painting the terrain (any and all layer types) but just getting nothing.
Title: Re: Painting Rock Foliage.
Post by: Snake on April 15, 2015, 04:05:59 PM
Did you add it to the map req? It might already be in the map req but marked out, I can't remember. If it is, then remove the dashes and it should work.
Title: Re: Painting Rock Foliage.
Post by: Epifire on April 15, 2015, 08:23:37 PM
Quote from: Snake on April 15, 2015, 04:05:59 PM
Did you add it to the map req? It might already be in the map req but marked out, I can't remember. If it is, then remove the dashes and it should work.

Erm... Actually I really don't know jack diddly about the req file's purpose so I've never messed with it. Given my inadequate knowledge of this part, I'll repost it and see what to make of it.

ucft
{
    REQN
    {
        "config"
    }

    REQN
    {
        "class"
    }

    REQN
    {
        "texture"
        "Kej1_map"
    }


    REQN
    {
        "texture"
        "platform=pc"

    }

    REQN
    {
        "path"
        "Kej1"
    }
    REQN
    {
        "congraph"
        "Kej1"
    }
    REQN
    {
        "envfx"
      --  "Kej1"
    }
    REQN
    {
        "world"
        "Kej1"
    }
    REQN
    {
        "prop"
     --   "Kej1"
    }
    REQN
    {
        "boundary"
        "Kej1"
    }
    REQN
    {
        "config"
    --    "flyerspray"
    --    "walkerstomp"
    --    "hailfire_wake"
    --    "dustwake"
    }

}



If the problem is my req file, that'd be a relief.
Title: Re: Painting Rock Foliage.
Post by: Sereja on April 15, 2015, 11:16:53 PM
This line:

        "prop"
     --   "Kej1"
   

Means, your map can't accept props.
This should be the right way:
       "prop"
       "Kej1"
Title: Re: Painting Rock Foliage.
Post by: Snake on April 16, 2015, 06:12:17 AM
Yep, just remove the dashes from the "prop" area and it should work.
Title: Re: Painting Rock Foliage.
Post by: Epifire on April 16, 2015, 01:16:28 PM
It works! [spoiler](https://www.swbfgamers.com/proxy.php?request=http%3A%2F%2Fscreenshot.xfire.com%2Fs%2F130358666-3.jpg&hash=ab412334bce622a9d92ad720d9385f63d8347386)[/spoiler]

It'll require some layer tweaking but at least it's showing up in-game (which is what really matters). Now there is one last thing that's still not quite working right which is the editor. I can paint the layers but it actually doesn't show up, it just works when I compile it. Maybe an option that controls that in the config file?
Title: Re: Painting Rock Foliage.
Post by: Snake on April 16, 2015, 06:47:11 PM
That's strange, I'm not sure about that.. Also, be careful about painting on slopes, often you'll get floating props.
Title: Re: Painting Rock Foliage.
Post by: Epifire on April 16, 2015, 06:51:18 PM
Quote from: Snake on April 16, 2015, 06:47:11 PM
That's strange, I'm not sure about that.. Also, be careful about painting on slopes, often you'll get floating props.

So far the slopes have actually worked pretty good. I exported my rock props to go through the ground a ways to help compensate for that. Just messing with figures now. As long as I know what's in what layer I'm good.

Mainly using them to skirt other larger rock props without having to make a whole other asset. Though to be fair I see myself still needing to make a lot more rocks yet. :wacko:

Also one last thing, is there a way to enable collision or shadows? Figured it'd be a long shot but I really like my shadows to work when I can.
Title: Re: Painting Rock Foliage.
Post by: Sereja on April 16, 2015, 11:39:13 PM
Perhaps, collision msh, should be inside the model. This line in .prp confirm this:
UseCollision();
Shadow may work, if you put -highresshadow line in msh.option.
EhPortal 1.34 © 2024, WebDev