How to add lightning

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
modmaster13
General
General
Posts: 777
Joined: Wed Aug 18, 2010 4:23 pm
Games I'm Playing :: COD SWBF
xbox live or psn: KrypticcElementt
Location: Twitter @_KrypticElement
Contact:

How to add lightning

Post by modmaster13 »

Hey I couldn't find this in the FAQ's, so hopefully this will be added.

1. First, copy an .fx file from the assets folder (C:\BF2_ModTools\assets\worlds\KAM\world1).

2. This will take us to the kamino world source files. Copy the kamino1.fx file

3. Paste it into C:\BF2_ModTools\data_***\Worlds\***\world1 folder

(replace *** with your map ID).

4. Open up your kamino1.fx file

5. Scroll down until you see this:
Hidden/Spoiler:
Effect("Lightning")
{
Enable(1);
Color(255, 255, 255);
SunlightFadeFactor(0.1);
SkyDomeDarkenFactor(0.4);
BrightnessMin(1.0);
FadeTime(0.2);
TimeBetweenFlashesMinMax(3.0, 5.0);
TimeBetweenSubFlashesMinMax(0.01, 0.5);
NumSubFlashesMinMax(2, 5);
HorizonAngleMinMax(30, 60);
SoundCrack("kam_amb_thunder");
SoundSubCrack("kam_amb_thundersub");
}
6. This is the code that will make your lightning ingame

8. Rename your kamino1.fx to "***.fx"

9. Have fun! :P

NOTE: If you only want lightning, you can remove everything else in the .fx file, exept for the code above.
User avatar
agentsmith38
Command Sergeant Major
Command Sergeant Major
Posts: 283
Joined: Thu May 27, 2010 9:47 am
Projects :: The Final Push Future - Omaha Beach
Games I'm Playing :: ArmA 2 OA
xbox live or psn: No gamertag set
Location: In the Trenches, getting ready to go over the top..

Re: How to add lightning

Post by agentsmith38 »

Hey, good idea man. Nice simple tutorial
User avatar
naru1305
Major General
Major General
Posts: 657
Joined: Fri Jan 07, 2011 4:57 pm
Games I'm Playing :: SWBF2
Location: Germany
Contact:

Re: How to add lightning

Post by naru1305 »

yepp, this is very useful :thumbs:
User avatar
Jendo7
Sith
Sith
Posts: 1304
Joined: Wed Apr 01, 2009 6:37 pm
Location: Cambridge, England.
Contact:

Re: How to add lightning

Post by Jendo7 »

Good little tutorial, although it's basically the same principal as adding rain/snow/fog etc from the FAQ: How do I add rain? (FAQ) , Adding fog to your map.

Just saying!
User avatar
commander501stappo
Jedi
Jedi
Posts: 1016
Joined: Tue Sep 28, 2010 8:13 am
Games I'm Playing :: Skyrim BF4 KSP CIV V
xbox live or psn: DarthAppo
Location: In a galaxy very, very close by...

Re: How to add lightning

Post by commander501stappo »

Nice tutorial :)
modmaster13
General
General
Posts: 777
Joined: Wed Aug 18, 2010 4:23 pm
Games I'm Playing :: COD SWBF
xbox live or psn: KrypticcElementt
Location: Twitter @_KrypticElement
Contact:

Re: How to add lightning

Post by modmaster13 »

Jendo7 wrote:Good little tutorial, although it's basically the same principal as adding rain/snow/fog etc from the FAQ: How do I add rain? (FAQ) , Adding fog to your map.

Just saying!
Yeah I know what you mean, but there wasn't any lightning tutorial, so I said to myself "Why not?" :wink:
User avatar
Jendo7
Sith
Sith
Posts: 1304
Joined: Wed Apr 01, 2009 6:37 pm
Location: Cambridge, England.
Contact:

Re: How to add lightning

Post by Jendo7 »

Yeah, you've got a good point. :)
Post Reply