How to add rain and edit weapons tutorial

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
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:

How to add rain and edit weapons tutorial

Post by elfie »

Hello and welcome to the rain and weapons tutorial. This is my first time writing a tutorial so I will try to be clear. First, I have frequently heard the question, "how do you add rain", posted around gametoast. Well I will show you a way that is easy and works.

First thing you need to do is create a new map. Once you have a map, go to the assets folder, go to worlds, click on KAM, go to world 1 and copy kamino1.fx to your world's world1 folder. Once it is in there, rename as ABC.fx, ABC will stand for your 3 letter name. Now we are on the last step, which I am not sure is required, but appeared to be needed when I did it. Open ABC.fx with word pad and trim it down so that these are the only lines in the document:

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);
	}
}

Now munge your map and enjoy the storm!


Next I will explain how to edit the weapons, but more specifically the colors of the bullets.
Editing the bullet color is hard in the begining and requires a lot of concentration. Make sure you check your work because if you get one number wrong, the whole thing crashes.

Copy the rep side from the assets and the common side to your sides folder. Go to rep's odf and open up rep_weap_inf_rifle_ord with wordpad. com_sfx_laser_blue is under properties. This is the effect color of the bullet. If you wish to edit it you can in C:\BF2_Modtools\data_ABC\Common\effects. Change com_sfx_laser_blue to com_sfx_laser_green. then look at the next 2 lines:

LaserGlowColor = "92 136 250 100"
LightColor = "92 136 250 100"

These numbers stand for RGB or red green and blue and they are always in that order. The properties shown above are for blue bullets. We need to make them green. so change them to this:

LaserGlowColor = "99 243 106 100"
LightColor = "99 243 106 100"

Your old odf was like this:

[OrdnanceClass]
ClassParent = "com_weap_inf_rifle_ord"

[Properties]

LaserTexture = "com_sfx_laser_blue"
LaserGlowColor = "92 136 250 100"
LightColor = "92 136 250 100"

Your new one should be like this:

[OrdnanceClass]
ClassParent = "com_weap_inf_rifle_ord"

[Properties]

LaserTexture = "com_sfx_laser_green"
LaserGlowColor = "99 243 106 100"
LightColor = "99 243 106 100"

Get it? Now put dc: infront of side\rep in abcc_con.lua. munge and play to see if you are successful. if you have any questions or suggestions, post away!
Last edited by elfie on Thu Feb 21, 2008 8:29 pm, edited 1 time in total.
User avatar
Silas
Captain
Captain
Posts: 481
Joined: Thu Oct 11, 2007 5:30 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Re: How to add rain and edit weapons tutorial

Post by Silas »

nice tut. that'll clear up a lot of questions about adding rain. if it isn't there already, i think it should be put in the everything you need thread. :)
Post Reply