Guide to activating the decal system in SWBF1.

Started by SleepKiller, January 26, 2012, 03:47:14 PM

Previous topic - Next topic
I'm so thrilled at the moment. I just discovered how to get this ODF line to do some thing.

Decal = "decal_explosion"

It is surprisingly simple, first go into assets then to shipped worlds and go into Naboo. After that go into the effects folder from this folder we need the following files.

decal_explosion_crack_bump.tga
decal_explosion_crack_bump.tga.option
decal_explosion_scorch.tga
decal_explosion_scorch.tga.option
nab2_decals.fx

Now you can do this to any level or any side. You just need to put these files in that things effects folder and add this to its .req file.

REQN
{
"config"
"nab2_decals"
}

Note, sadly they only show up on the terrain, but they bend and morph to fit the terrain. So it looks better than the method of adding them to the explosion .FX file.

Enjoy!

so, does this mean we could have anything in the TGA file?  Like flowers?  or a picture of a wookie head or something?
Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet

Quote from: Buckler on January 26, 2012, 06:57:59 PM
so, does this mean we could have anything in the TGA file?  Like flowers?  or a picture of a wookie head or something?
Well you could use any texture you wanted, but I think the ones Pandemic had are good. Leaving behind a picture of a Wookie after an explosion seems a bit strange.

Quote from: SleepKiller on January 26, 2012, 07:06:36 PM
Well you could use any texture you wanted, but I think the ones Pandemic had are good. Leaving behind a picture of a Wookie after an explosion seems a bit strange.

heh, ya, just having some fun with the idea  ;)
Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet

Here is some additional information about decals from Sereja:

Quote from: Sereja on January 24, 2013, 04:15:09 PM
Not at all! :P
This effect, named "decal", and I never sow it, on any mod or stock maps, or even never found tutorial about this. So, it is posible, my personal discovery :cheer:. Probably, creators, made it for SWBF1, but keep it, only for SWBF2...
So, here the small tutorial about this:

Making Decal.

1. First, go to SWBF2 assets, and find decal file, named hot1_decals.fx, in next directory:
C:\BF2_ModTools\assets\worlds\HOT\effects
Rename it to your ModID, like 027_decals.fx, and put it, in your Worlds Effects folder.
2. In same directory, you may found lot's of tga footprint and explosion samples, so copy them to your effects, or create your own. Do not forget to edit alpha channel.
3. Open your world ModID.REQ file, and add the name of your decal file, exactly in next lines:
[spoiler]ucft
{
    REQN
    {
        "config"
    }

    REQN
    {
        "class"
    }

    REQN
    {
        "texture"
        "027_map"
    }


    REQN
    {
        "texture"
        "platform=pc"

    }

    REQN
    {
        "path"
        "027"
    }
    REQN
    {
        "congraph"
        "027"
    }
    REQN
    {
        "envfx"
        "027"
        "027_decals"
    }
    REQN
    {
        "world"
        "027"
    }
    REQN
    {
        "prop"
        "027"
    }
    REQN
    {
        "boundary"
        "027"
    }
    REQN
    {
        "config"
        "flyerspray"
        "walkerstomp"
        "walkerstomp_sm"
        "hailfire_wake"
        "dustwake"
        "bigwalkerstomp"
    }

}

[/spoiler]
4. Edit your decal file, and put in there all needed names of your footprint and explosion scourch tga. Here the sample of it:
[spoiler]XBOX()
{
   Decal("decal_explosion")
   {
      Texture("decal_explosion_scorch");
      BumpTexture("decal_explosion_crack_bump");
      Lifetime(60.0);
      FadeInTime(1.0);
      FadeOutTime(6.0);
      MaxDecals(50);
      Color(255,255,255,255);
   }
}

PC()
{
   Decal("decal_explosion")
   {
      Texture("decal_explosion_scorch");
      BumpTexture("decal_explosion_crack_bump");
      Lifetime(60.0);
      FadeInTime(1.0);
      FadeOutTime(6.0);
      MaxDecals(50);
      Color(255,255,255,255);
   }


   Decal("decal_blast_explosion")
   {
      Texture("decal_blast_explosion_scorch");
      Lifetime(10.0);
      FadeInTime(1.0);
      FadeOutTime(6.0);
      MaxDecals(50);
      Color(255,255,255,255);
   }


   Decal("decal_missile_explosion")
   {
      Texture("decal_missile_explosion_scorch");
      Lifetime(10.0);
      FadeInTime(1.0);
      FadeOutTime(6.0);
      MaxDecals(50);
      Color(255,255,255,255);
   }



   Decal("decal_atxt_footprint")
   {
      BumpTexture("atxt_footprint_bump");
      Lifetime(10.0);
      FadeInTime(0.0);
      FadeOutTime(6.0);
      MaxDecals(50);
      Color(255,255,255,255);
   }

   Decal("decal_atrt_footprint")
   {
      BumpTexture("atrt_footprint_bump");
      Lifetime(10.0);
      FadeInTime(0.0);
      FadeOutTime(6.0);
      MaxDecals(50);
      Color(255,255,255,255);
   }

   Decal("decal_atte_footprint")
   {
      BumpTexture("atte_footprint_bump");
      Lifetime(10.0);
      FadeInTime(0.0);
      FadeOutTime(6.0);
      MaxDecals(50);
      Color(255,255,255,255);
   }

   Decal("decal_atat_footprint")
   {
      BumpTexture("atat_footprint2_bump");
      Lifetime(10.0);
      FadeInTime(0.0);
      FadeOutTime(6.0);
      MaxDecals(50);
      Color(255,255,255,255);
   }

   Decal("decal_atst_footprint")
   {
      BumpTexture("atst_footprint_bump");
      Lifetime(10.0);
      FadeInTime(0.0);
      FadeOutTime(6.0);
      MaxDecals(50);
      Color(255,255,255,255);
   }

   Decal("decal_spider_footprint")
   {
      BumpTexture("spider_footprint_bump");
      Lifetime(10.0);
      FadeInTime(0.0);
      FadeOutTime(6.0);
      MaxDecals(50);
      Color(255,255,255,255);
   }

   Decal("decal_dwarfspider_footprint")
   {
      BumpTexture("dwarfspider_footprint_bump");
      Lifetime(10.0);
      FadeInTime(0.0);
      FadeOutTime(6.0);
      MaxDecals(50);
      Color(255,255,255,255);
   }
   Decal("decal_soldier_footprint")
   {
      BumpTexture("soldier_footprint_bump");
      Lifetime(8.0);
      FadeInTime(0.0);
      FadeOutTime(2.0);
      MaxDecals(500);
      Color(255,255,255,255);
   }
   
   Decal("decal_tauntaun_footprint")
   {
      BumpTexture("beast_footprint_bump");
      Lifetime(10.0);
      FadeInTime(0.0);
      FadeOutTime(6.0);
      MaxDecals(100);
      Color(255,255,255,255);
   }
}

[/spoiler]
5. Now, you should edit odf, and the lines are different, for different tipe of units.
Soldiers:
probably, it is imposible to add different footprints, for different tipe of soldiers, so, humans, droids and wookie use the same boots :D.
Walkers:
You can add the name, and edit footprint size, by this lines:
StompDecal          = "decal_atte_footprint"
StompDecalSize = "1.1"

Explosion:
You can add the name of decal, by this line:
Decal = "decal_explosion"
But the size, of explosion decal, connected, with explosion damage:
Damage = "40.0"
DamageRadius = "30.0"

That's it! :)
Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet