How do I add rain? (FAQ)

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
User avatar
tnt_1992
Rebel Sergeant
Rebel Sergeant
Posts: 180
Joined: Mon Feb 18, 2008 4:48 pm
Games I'm Playing :: SWBF2 and ts3
Location: Georgia, usa
Contact:

How do I add rain? (FAQ)

Post by tnt_1992 »

how do add rain?
Taivyx
2008 Best Games Related Avatar
Posts: 1706
Joined: Thu Jun 07, 2007 3:34 pm
Projects :: Terra Strife - discontinued
Games I'm Playing :: none
xbox live or psn: No gamertag set
Contact:

Adding rain to your map

Post by Taivyx »

1) Browse to BF2_ModTools\assets\worlds\KAM\world1

2) Copy kamino1.fx

3) Paste it into BF2_ModTools\data_ABC\worlds\ABC\world1

4) Rename kamino1.fx to ABC.fx (replace ABC with your 3 letter modID)

5) OPTIONAL: Open it up with wordpad.
These sections of defining values and functions are pretty easy to understand, but just for further reference, this is the code that calls for rain:

Code: Select all

Effect("Precipitation")
{
	Enable(1);
	Type("Streaks");
	Range(12.5);
	Color(216, 220, 228);
	VelocityRange(1.0);
	ParticleDensityRange(0.0);
	CameraCrossVelocityScale(0.2);
	CameraAxialVelocityScale(1.0);

	GroundEffect("com_sfx_rainsplash");
	GroundEffectSpread(8);

	PS2()
	{
		AlphaMinMax(0.8, 1.0);
		ParticleSize(0.06);
		ParticleDensity(80.0);
		Velocity(8.0);
		StreakLength(1.7);
		GroundEffectsPerSec(7);
	}
	XBOX()
	{
		AlphaMinMax(0.2, 0.3);
		ParticleSize(0.02);
		ParticleDensity(256.0);
		Velocity(9.0);
		StreakLength(1.0);
		GroundEffectsPerSec(15);
	}
	PC()
	{
		AlphaMinMax(0.3, 0.45);
		ParticleSize(0.02);
		ParticleDensity(256.0);
		Velocity(9.0);
		StreakLength(1.0);
		GroundEffectsPerSec(15);
	}
}
You can safely omit the XBOX and PS2 blocks from the code above.

If you don't want the rain effect to show up inside your buildings or whatever then you'll need to set up rainshadow regions in ZeroEditor but you should not rotate them or else they may not work ingame.
User avatar
elfie
Field Commander
Field Commander
Posts: 931
Joined: Fri Jan 25, 2008 8:26 pm
Games I'm Playing :: no games
xbox live or psn: no live
Location: Coruscant, Jedi Temple
Contact:

Re: weather

Post by elfie »

how do you change the rain color?
User avatar
tnt_1992
Rebel Sergeant
Rebel Sergeant
Posts: 180
Joined: Mon Feb 18, 2008 4:48 pm
Games I'm Playing :: SWBF2 and ts3
Location: Georgia, usa
Contact:

Re: weather

Post by tnt_1992 »

thx
do u have to add anything to the req
or lua?
i did what u said nothing happend
is it possialbe to add a sandstorm

Don't triplepost. The edit button is there for a reason. Thanks! -Staff
Last edited by tnt_1992 on Wed Feb 20, 2008 1:40 am, edited 1 time in total.
User avatar
elfie
Field Commander
Field Commander
Posts: 931
Joined: Fri Jan 25, 2008 8:26 pm
Games I'm Playing :: no games
xbox live or psn: no live
Location: Coruscant, Jedi Temple
Contact:

Re: weather

Post by elfie »

Code: Select all

is it possialbe to add a sandstorm 
you have to add dust in ZE using the geonosis assets. I put a sandstorm in my geonosis map.
http://www.gametoast.com/forums/viewtop ... 29&t=13072
User avatar
tnt_1992
Rebel Sergeant
Rebel Sergeant
Posts: 180
Joined: Mon Feb 18, 2008 4:48 pm
Games I'm Playing :: SWBF2 and ts3
Location: Georgia, usa
Contact:

Re: weather

Post by tnt_1992 »

i did what u said to do with the rain and it didnt work. do i have to add any thing to the lua or req or ze???
Last edited by tnt_1992 on Wed Feb 20, 2008 12:45 am, edited 1 time in total.
woner11
Sith
Sith
Posts: 1361
Joined: Tue Sep 18, 2007 10:17 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The lost world of pickels
Contact:

Re: weather

Post by woner11 »

Get a log for your map. That may explain what's going on with the rain. You might also have a simple typo. Recheck everything. :yes:
User avatar
tnt_1992
Rebel Sergeant
Rebel Sergeant
Posts: 180
Joined: Mon Feb 18, 2008 4:48 pm
Games I'm Playing :: SWBF2 and ts3
Location: Georgia, usa
Contact:

Re: weather

Post by tnt_1992 »

every thing looks ok in the fx file
woner11
Sith
Sith
Posts: 1361
Joined: Tue Sep 18, 2007 10:17 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The lost world of pickels
Contact:

Re: weather

Post by woner11 »

Post a log. That might have something and post your fx. You might just not have recognized your typo.
User avatar
tnt_1992
Rebel Sergeant
Rebel Sergeant
Posts: 180
Joined: Mon Feb 18, 2008 4:48 pm
Games I'm Playing :: SWBF2 and ts3
Location: Georgia, usa
Contact:

Re: weather

Post by tnt_1992 »

i got it working just after i posted my last post. thx for the help.
ZappelClone
Private Recruit
Posts: 22
Joined: Fri May 07, 2010 11:05 am

Re: How do add rain? [Solved]

Post by ZappelClone »

uhm....i did exactly what you told me to like a 1000 times and my map is still crashing..i have absolutely no idea why.

i took the kamino1.fx put it in my world1 folder...renamed it to "TST.fx" munged and when i try to load the map it crashes.(actually iam not sure about the munge since you didnt mention one to be required)

anyway my mungelog says something like this:

Munging TST.req
0 Files moved.
Munging TST.req
The system cannot find the declared path.
0 Files moved.

the rest looks alright to me....any ideas? (btw iam actually german so i translated the log just incase it didnt turn out being the same style the original english mungelog is in...you now know why :wink: )

EDIT: solved..i deleted everything else in the .fx except for the rain properties.
the rain is now ingame but without sound...but i guess the sound wasnt included in this tut though.
genaral_mitch
Jedi
Jedi
Posts: 1056
Joined: Fri Aug 14, 2009 12:32 am

Re: How do add rain? [Solved]

Post by genaral_mitch »

Read the rules, man.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: How do add rain? [Solved]

Post by AQT »

^Topics in the SWBF2 Modding forum remain unlocked for a reason. ZappelClone did the right thing to bump a topic that covers the same problem as his, rather than creating a new one (meaing he used the Search function).
genaral_mitch
Jedi
Jedi
Posts: 1056
Joined: Fri Aug 14, 2009 12:32 am

Re: How do add rain? (FAQ)

Post by genaral_mitch »

Whoops, didn't see that.
User avatar
Culvar
1st Lieutenant
1st Lieutenant
Posts: 429
Joined: Thu Jul 10, 2008 10:36 am

Re: How do I add rain? (FAQ)

Post by Culvar »

Do rain and fog mix? If I add them both to my .fx my map crashes. If I remove rain It'll work though.
ARCTroopaNate
Jedi
Jedi
Posts: 1161
Joined: Mon Mar 21, 2011 8:12 pm
Projects :: Star Wars Battlefront - Tides of War
Games I'm Playing :: SWBF2 RC EAW
xbox live or psn: I have ps4
Location: STALKER!
Contact:

Re: How do I add rain? (FAQ)

Post by ARCTroopaNate »

When we munge what do we select? Thanks in advance.
Darth_Spiderpig
Sith Master
Sith Master
Posts: 2631
Joined: Fri Mar 27, 2009 10:23 am
Projects :: Something cool...
Games I'm Playing :: BF2 CoDBO BFBC2
xbox live or psn: Has no xbox....Yup
Location: Does whatever a Spiderpig does
Contact:

Re: How do I add rain? (FAQ)

Post by Darth_Spiderpig »

Common.
CalvaryCptMike
Captain
Captain
Posts: 476
Joined: Sat Feb 19, 2011 3:10 pm
Projects :: Nothing--absolutely nothing
Location: Freed by alien robots, now living on Mars
Contact:

Re: How do I add rain? (FAQ)

Post by CalvaryCptMike »

ARCTroopaNate wrote:When we munge what do we select? Thanks in advance.
Darth_Spiderpig wrote:Common.
Wait, :? you don't need to munge with common checked, for changes to the Worlds folder you don't need any of those boxes checked. Just run Visual Munge, uncheck "Common" and munge away! :mrgreen:
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: How do I add rain? (FAQ)

Post by Marth8880 »

CalvaryCptMike wrote:
ARCTroopaNate wrote:When we munge what do we select? Thanks in advance.
Darth_Spiderpig wrote:Common.
Wait, :? you don't need to munge with common checked, for changes to the Worlds folder you don't need any of those boxes checked. Just run Visual Munge, uncheck "Common" and munge away! :mrgreen:
It certainly saves quite a large amount of time to munge without the Common check box checked because the shaders and localization always take forever to munge.
Wolffe1138
Recruit Womprat Killer
Posts: 9
Joined: Wed Apr 12, 2017 5:57 pm
Projects :: No Mod project currently.
Games I'm Playing :: SWBF 2
xbox live or psn: No gamertag set

Re: How do I add rain? (FAQ)

Post by Wolffe1138 »

What about the sound for the rain I got thunder sounds just not the rain, anyone mind helping?
Post Reply