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:


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




Scroll further down your ABC.req to this section:


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:

MainTexture("kas2_water.tga");  <------------------
RefractionColor(5, 217, 255, 255);
UnderwaterColor(61, 124, 144, 128);

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