Adding Water

This is a basic tutorial on how to add water to your custom map.

For example purposes, ABC is used as the modID, your 3 letter name may be different. Also, this example is done using Kashyyyk assets but can be manipulated for use with any shipped world (that has water).

First you have to open your "ABC.req" file (in …\BF2_ModTools\data_ABC/worlds/ABC/world1/); this is where you place your water textures.

Then open kas2.req (in …\BF2_ModTools\assets/worlds/KAS/world2) and scroll down the column for:

REQN {
      "texture"           
      "platform=pc"

and copy this next part of the kas2.req (from below the above code in the .req) and paste it in your ABC.req under the word "texture":

"water_bumpmap_0"
"water_bumpmap_1"
"water_bumpmap_2"
"water_bumpmap_3"
"water_bumpmap_4"
"water_bumpmap_5"
"water_bumpmap_6"
"water_bumpmap_7"
"water_bumpmap_8"
"water_bumpmap_9"
"water_bumpmap_10"
"water_bumpmap_11"
"water_bumpmap_12"
"water_bumpmap_13"
"water_bumpmap_14"
"water_bumpmap_15"

"water_normalmap_0"
"water_normalmap_1"
"water_normalmap_2"
"water_normalmap_3"
"water_normalmap_4"
"water_normalmap_5"
"water_normalmap_6"
"water_normalmap_7"
"water_normalmap_8"
"water_normalmap_9"
"water_normalmap_10"
"water_normalmap_11"
"water_normalmap_12"
"water_normalmap_13"
"water_normalmap_14"
"water_normalmap_15"

"water_specularmask_0"
"water_specularmask_1"
"water_specularmask_2"
"water_specularmask_3"
"water_specularmask_4"
"water_specularmask_5"
"water_specularmask_6"
"water_specularmask_7"
"water_specularmask_8"
"water_specularmask_9"
"water_specularmask_10"
"water_specularmask_11"
"water_specularmask_12"
"water_specularmask_13"
"water_specularmask_14"
"water_specularmask_15"
"water_specularmask_16"
"water_specularmask_17"
"water_specularmask_18"
"water_specularmask_19"
"water_specularmask_20"
"water_specularmask_21"
"water_specularmask_22"
"water_specularmask_23"
"water_specularmask_24"

Scroll further down your ABC.req to this section:

REQN {
     "envfx"
     "ABC"
     }

This section calls the envfx (environment effects) file called ABC.fx which has not been created yet.
Since Kashyyyk is the sample map, go back to the world folder (in …\BF2_ModTools\assets/worlds/KAS/world2), search for the kas2.fx file, and copy this into your …\BF2_ModTools\data_ABC/worlds/ABC/world1 folder.
Now rename this new kas2.fx file into ABC.fx so it corresponds with your modID.

Open your ABC.fx file and scroll down to this section:

PC()
{
Tile(2.0,2.0);
MainTexture("kas2_water.tga");  <------------------
LODDecimation(1);
RefractionColor(5, 217, 255, 255);
ReflectionColor(57,90,138,255);
UnderwaterColor(61, 124, 144, 128);
FresnelMinMax(0.3,0.6);
FarSceneRange(1500)

The file needs a texture called kas2_water.tga.
Go back to …\BF2_ModTools\assets/worlds/KAS/world2, find this .tga and copy it into the …\BF2_ModTools\data_ABC/worlds/ABC/world1 folder.

The other necessary files live in …\BF2_ModTools\assets/worlds/KAS/effects/PC.
Copy the contents of this folder into your …\BF2_ModTools\data_ABC/worlds/ABC/effects (if you don't have this folder, just create it).

With all the files in hand, you have to place water on your map using Zeroeditor:

  1. Click on the Water Edit Mode.
  2. You see on the left side a box with fields to change. Make these changes:

width = "1" and depth = "1"
Layer = "1"
u vel = "0.02" and v vel = "0.02" (This helps to modify it for waves, if required)
u rept = "1" and v rept = "1"
texture = blank (Don't fill anything in there)
color = 0, 0, 200
alpha = 255 (Alpha is the transparency of the water. 0 = Invisible, 255 = Completely Visible)
glow = off (unused)

Add water as you would texture the terrain.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License