BF2142 Weather

BF2142 Weather tutorial

Based on info from jeffreyrichey

This is a short explanation on getting weather to work ingame.

In your mod/2142 folder theres a bunch of .con files names rain, rain\_heavy, snow\_medium, etc. etc

* Copy the .con of the weather you want

* Paste it into your levels main folder (mods/bf2142/levels/My\_Map)

* Rename this .con you just pasted "Weather"

* Open your init.con for the level

* Add 2 lines to your init .con(in Bold):

```
if v\_arg1 == BF2Editor

run Heightdata.con
LevelSettings.InitWorld
run Terrain.con BF2Editor
run StaticObjects.con BF2Editor
run Sounds.con
run Sky.con BF2Editor
**run weather.con BF2Editor**
run Editor/GamePlayObjects.con host
UndergrowthEditable.create
Undergrowth.load Levels\Rising\_Tides\
run Overgrowth/Overgrowth.con
Overgrowth.editorEnable 1
run AmbientObjects.con BF2Editor
run Water.con
run TriggerableTemplates.con BF2Editor

else

run Heightdata.con
run Terrain.con v\_arg2
run Sky.con v\_arg2
**run weather.con v\_arg2**
run CompiledRoads.con
run Sounds.con
run tmp.con v\_arg1
Undergrowth.load Levels\Rising\_Tides\
run Overgrowth/Overgrowth.con
run Overgrowth/OvergrowthCollision.con
run AmbientObjects.con
run Water.con
run TriggerableTemplates.con

```

**CUSTOM WEATHER**

You can also make your own weather. (JUNAUM and I found out this stuff while working on a custom map)
Note if you follow these instructions you do not need a mod, this will work in default 2142 because you do not actually modify any client data.  For example, you can make your own sprite.   Each weather con file has a line stating where the texture/sprite for that weather is found. The default setting is

"rainmanager.settexture common/textures/snow"

So the texture is in fact located in mods/2142/common\_client/textures. This means that the game will reference this file in this location. However if you add a new texture to this directory your players wont have it (becasue its added to the players client data.) Instead you can make the game reference the texture instead from a location within your map. Simply make a new folder in your map folder (I named mine "textures") and place your new texture you want in there. Then in your weathers con file change the location settings to

"rainmanager.settexture levels/your\_mapname\_here/textures/your custom texture"

The best way to find the best weather settings is to find a default one thats closest to what you want and start with that as a base, then modify it.  Here is what the settings mean from what I have been able to figure out. I'm using the weather con from "snow\_light" as an example.

```
rainmanager.enabled 0 -- Don't know
rainmanager.particlecount 3000 -- Amount of particles of course. IE density. 10000 is alot of snow, 1000 not so much
rainmanager.offset 0,10,0 -- Governs where the effect begins in relation to the map. For instance 0,10,0 means it begins high and ends near the ground. If you change it to 0/70/0 the snow will end way above the player for example.
rainmanager.emitradius 80,30,80
rainmanager.particlecolor 1,1,1,0.5
rainmanager.particlesize 8 -- particle size. 20 is rather large. You could use this for hail (plus modifying other parts of course)
rainmanager.particleMaxsize 20 -- I think this governs the max size if the particle size fluctuates.
rainmanager.particleScale 0,0.1,0
rainmanager.particlevelocity 0,-0.5,0.15
rainmanager.particlespeed 6 -- Particles Movment speed. For example rain falls faster then snow so it has a higher particle speed. 6 is slow
rainmanager.fadeoutrange 0.875 -- Well, its the fade out range. What setting constitutes what I dont know. 2 dosn't work. I think the max is actaully 1
rainmanager.maxdeviation 3,3,3 -- How far individual sprites move back and forth (x,y,z ?)
rainmanager.anglespeed 50,50 -- Speed at wich the particles change direction. For instance snow actually falls back and forth and sways.
rainmanager.celldisplay 0
rainmanager.linedisplay 0 -- 0 for Snow, 1 for rain. This setting governs if the sprite leaves a "streak" when it falls, like rain. 0=no 1=yes
rainmanager.settexture common/textures/snow -- location of where your sprite is stored
rainmanager.enabled 1 -- I assume 1 means weather enabled 0 is off

```

Rain:

```
rainmanager.enabled 0
rainmanager.particlecount 5000
rainmanager.offset 0,10,0
rainmanager.emitradius 60,30,60
rainmanager.particlecolor 0.5/0.5/1/0.1
rainmanager.particlevelocity -0.1/-1/0
rainmanager.particlespeed 60
rainmanager.linelength 3 -- Length of the streak left when the particle falls
rainmanager.linedisplay 1
rainmanager.settexture common/textures/snow
rainmanager.enabled 1

```

NOTES
When finished set your init.con to read only so it dosn't get reset.