How to add water so the map DOESN'T crash (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

Rebel Warrant Officer
User avatar
Posts: 315
Joined: Tue Mar 14, 2006 2:55 pm

RE: How to add water so the map DOESN

Postby Dragon93 » Sun Nov 19, 2006 1:16 pm

ֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱ
Worked for Me.
ֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱֱ
- Dragon93

Droideka88

RE: How to add water so the map DOESN

Postby Droideka88 » Sun Nov 19, 2006 1:24 pm

But that's for BF1. Unless it works for BF2 then that may explain why we have custom maps with water. I thought perhaps those with water were lucky.

Also there is no instruction regarding adding water in ZeroEdit unless the req "assist" you in them.

Sith Master
User avatar
Posts: 2652
Joined: Sat Jun 03, 2006 5:15 pm
Location: In An Epic Space Battle!

RE: How to add water so the map DOESN

Postby Hebes24 » Sun Nov 19, 2006 2:34 pm

Copy the "water" section of an ***.fx file from a map that has water, located in assets\worlds\***\world1 (like Yavin). then paste them into your ***.fx file located in data_***\worlds\***\world1 folder. (first two *** = 3 letter assets map ID, last three *** = 3 letter Mod ID )

Field Commander
User avatar
Posts: 962
Joined: Wed Nov 08, 2006 5:13 pm

Postby Elmo » Sun Nov 19, 2006 2:38 pm

Ok Hebes I'll try :P And to let you know, I'm fairly new to modding, and I don't understand a lot of the terms lol :P

Edit: What is this fx thing? I can't find it.

Ok, well I found the fx folder in the yavin folder, but I can't open it. It says, "windows cannot open this file because windows does not know which program created it" What do I do?!

Jedi
User avatar
Posts: 1080
Joined: Wed Apr 05, 2006 12:34 pm
Location: UK
Projects :: No Mod project currently.
Games I'm Playing :: Shadow Complex
xbox live or psn: Rekubot

Postby Rekubot » Sun Nov 19, 2006 2:48 pm

When in the world did Hebes say that you need to open it? He just said to copy and paste. Sheesh. You need the particle editor working before you can open the .fx file.

Jedi
User avatar
Posts: 1119
Joined: Sat Apr 23, 2005 8:52 pm

Postby Ace_Azzameen_5 » Sun Nov 19, 2006 2:50 pm

Does windows give you any option to choose? If it doesn't, open note pad or some word editing program and use 'open' from inside that program, and then got to that file with the open box and chose it. It should open. Sorry if I sound too 'down talking'.

Field Commander
User avatar
Posts: 962
Joined: Wed Nov 08, 2006 5:13 pm

Postby Elmo » Sun Nov 19, 2006 2:55 pm

ok, so you don't need to open it?! Because he says to copy over the water section of the Fx file. So I'm confused, and to get a section, you need to open it... right?

And ya, windows does give me 2 options to open it. I don't know... select the program from a list or use the web service to find the program or something like that

Sith Master
User avatar
Posts: 2652
Joined: Sat Jun 03, 2006 5:15 pm
Location: In An Epic Space Battle!

Postby Hebes24 » Sun Nov 19, 2006 3:03 pm

It doesn't matter. If you copy the wholre file it should work fine too.

Open with notepad

Field Commander
User avatar
Posts: 962
Joined: Wed Nov 08, 2006 5:13 pm

Postby Elmo » Sun Nov 19, 2006 3:05 pm

ahhhh ok I'll try. And where is the notepad?

I know I'm coming out like a total noob, but you know I just don't know a lot of these things :P

So I just copy it into my *** world1 folder?

Gametoast Staff
Posts: 3471
Joined: Mon Aug 21, 2006 6:23 am

Tutorial: How to add water to your map

Postby AceMastermind » Sun Nov 19, 2006 8:59 pm

Try this, it works everytime for me.

How to add water to your map (ponds, lakes, rivers....etc):
NOTE: "ABC" Is only an example of a modID, your 3 letter modID may be different.

In this tutorial we will add the same water that Kashyyyk (kas2) uses, but you can use other SWBF2 map's water as the base file if you choose.

Open your "ABC.req" file located here:
    data_ABC/worlds/ABC/world1/ABC.req
in that file is where you list the names of your water textures.

Then open kas2.req located here:
    assets/Worlds/Kas/world2
and scroll down until you see this:
Code: Select all
REQN {
      "texture"           
      "platform=pc"
and just copy this part of it:
Hidden/Spoiler:
Code: Select all
        "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"

then paste it in your ABC.req under "texture" just as you found it in kas2.req, then save it.

With your ABC.req still open, scroll down to this section:
Code: Select all
REQN {
     "envfx"
     "ABC"
     }

This section calls the envfx (environment effects) file and is called ABC.fx which has not been created yet, so lets get one.
Since we used Kashyyyk water for our map we'll go into the world folder of Kashyyyk located here:
    assets/Worlds/Kas/World2
and search for kas2.fx then copy and paste it in:
    data_ABC/worlds/ABC/world1 folder.

You can remove everything in it except the water related stuff:
Hidden/Spoiler:
Code: Select all
Effect("Water")
{

   // general parameters
   PatchDivisions(4,4);

   // ocean parameters
   OceanEnable(0);

   // water event parameters
   WaterRingColor(148, 170, 192,255);
   WaterWakeColor(192, 192, 192,255);
   WaterSplashColor((192, 192, 192,255);


   // PC parameters
   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)

      NormalMapTextures("water_normalmap_",16,8.0);
      BumpMapTextures("water_bumpmap_",16,8.0);
      SpecularMaskTextures("water_specularmask_",25, 4);
      SpecularMaskTile(2.0, 2.0);
      SpecularMaskScrollSpeed(0.0,0.0);
      Velocity(0.01,0.01);

   }
   
}


Now you have a kas2.fx file in your world1 folder, but you have to rename it because your ModID is ABC, not kas2.
Rename kas2.fx to ABC.fx

Now open your ABC.fx file and scroll down to this section:
Code: Select all
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)

This file needs a texture called:
kas2_water.tga
so lets go get it!

Go to:
    Assets/Worlds/Kas/world2 folder
and search for kas2_water.tga and copy it into your:
    data_ABC/worlds/ABC/world1 folder!


You also have to copy the other textures needed for this water!
Go to:
    assets/worlds/kas/effects/PC
and copy the whole "PC" folder which contains all of the files required for this water to work, and paste it into your:
    data_ABC/worlds/ABC/effects folder!
If you don't have an effects folder in:
    data_ABC/worlds/ABC
then create one!


Now you have to paint water in your map using ZeroEditor.
1. You must first prepare the terrain by at least lowering an area using the Height tools.
2. Click on Water edit mode located between Texture and Foliage
3. You'll see on the left a box with some fields you can change to customize your water.
    The default options from ZE for Kashyyyk's water are shown below:
    Code: Select all
    Width = "1" and Depth = "1"      (this is your paint brush size)
    Layer = "1"                            (this refers to the water layer for the water, anything other than 1 is discarded by terrainmunge)
    Height = "1"                           (enter a # here for however high/low you want the water level)
    U Vel = "1" and V Vel = "1"        (speed of texture animation in U and V)
    U Rept = "1" and V Rept = "1"    (how many texture repeats in U and V)
    Texture = blank                      (don't fill anything in there)
    Color = 151, 177, 167              (RGB color values for the water)
    Alpha = 255                           (the transparency of the water, 0 = Invisible, 255 = Completely Visible)
    Glow = off                             (unused)

4. Add water the same as you would paint a texture on the terrain.
5. Save your world and close ZE then munge and try it out!

Rippentuck's original tutorial

Jedi Admin
User avatar
Posts: 11040
Joined: Wed Sep 07, 2005 11:42 pm
Location: Indiana
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set

Re: RE: How to add water so the map DOESN

Postby Teancum » Sun Nov 19, 2006 9:53 pm

Droideka88 wrote:But that's for BF1. Unless it works for BF2 then that may explain why we have custom maps with water. I thought perhaps those with water were lucky.

Also there is no instruction regarding adding water in ZeroEdit unless the req "assist" you in them.


You can read on how to do it in the SWBF1 Mod Tool documentation. So in that sense, it actually is in the docs.

Jedi Admin
User avatar
Posts: 2186
Joined: Mon May 30, 2005 5:22 pm
Location: North Texas

Postby EraOfDesann » Sun Nov 19, 2006 11:29 pm

The differences between adding water to BF1 and BF2 are very small. Strangely enough, Rippentuck's tutorial worked for me in Battlefront II but not the first game.

Field Commander
User avatar
Posts: 962
Joined: Wed Nov 08, 2006 5:13 pm

Postby Elmo » Tue Nov 21, 2006 1:24 am

Ok, I'll try.

EDIT
AceMastermind, I tried but the map crashes, and when I finish munging, I get 2 errors- something about it couldnt find a closing bracket in a folder or file or something.. wahts wrong?

Gametoast Staff
Posts: 3471
Joined: Mon Aug 21, 2006 6:23 am

Keep trying if at first you don't succeed

Postby AceMastermind » Tue Nov 21, 2006 2:09 am

If at first you don't succeed, try, try again.
There is some copying of files from different locations and opening other files that you may not be familiar with, and the only way to learn it is to do it until you get it right. :wink:

Also, here's a little advice if I may, if you're trying something for the first time, use a "test map", if it crashes, you'll be thankful it's not your project map.
And when you finally get something working on your "test map", then you can apply that same knowledge to your project map.

Old School Staff
User avatar
Posts: 1176
Joined: Fri Oct 21, 2005 2:33 pm

Postby Epena » Tue Nov 21, 2006 12:03 pm

Go to the REQ that you edited and make sure that you closed it with a bracket. (I'm sure you didn't, thus the error) Go to ANY files you edited and make sure that you closed them.

Field Commander
User avatar
Posts: 962
Joined: Wed Nov 08, 2006 5:13 pm

Postby Elmo » Tue Nov 21, 2006 12:13 pm

Ok, well Ace mastermind you said to copy something into the req folder and save it under textures, could you be a bit more specific please? Like could you show me a picture of how you did it?

Field Commander
User avatar
Posts: 962
Joined: Wed Nov 08, 2006 5:13 pm

Postby Elmo » Wed Nov 22, 2006 1:50 am

Gotcha :wink: I'll try it out

Edit: So.. I don't do anything to the req files?!

Edit: Ok, I'm really stumped. I got no errors this time, but the map STILL crashes ARG! OK. *calming down* What do i do?

Lieutenant General
User avatar
Posts: 688
Joined: Sun Apr 13, 2008 1:39 pm
Location: UK

Re: How to add water so the map DOESN'T crash (FAQ)

Postby theultimat » Thu Apr 24, 2008 12:44 pm

I got all the water to work and all, but it seems to be floating...
How can I stop this happening?
Thanks

Jedi Admin
User avatar
Posts: 7420
Joined: Mon Aug 21, 2006 11:03 pm

Re: How to add water so the map DOESN'T crash (FAQ)

Postby Maveritchell » Thu Apr 24, 2008 12:49 pm

"Floating?" I assume you mean that it's higher than you want it to be?

You can adjust the height of the water in ZE with one of the controls on the left (when you're working in the "water" tab.

2008 Best Games Related Avatar
User avatar
Posts: 1707
Joined: Thu Jun 07, 2007 3:34 pm
Projects :: Terra Strife - discontinued
Games I'm Playing :: none
xbox live or psn: No gamertag set

Re: How to add water so the map DOESN'T crash (FAQ)

Postby Taivyx » Thu Apr 24, 2008 4:31 pm

Then lower the height of the ground so there's a bank leading to the lake/puddle/river

Next

Return to SWBF2 Modding

Who is online

Users browsing this forum: No registered users and 0 guests