This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: 09 - Water Script in Depth  (Read 6785 times)

Steff

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 4551
    • View Profile
09 - Water Script in Depth
« on: December 08, 2012, 01:10:28 am »

Introducing



The problem with noggit in the current version is that it doesn't support new water included since 3.2.2 in the ADT files. There are 3 tools at the moment to handle water.

    * A comand line tool that just adds water on one level on one ADT.
    * A GUI tool where you can turn on and off water per chunk with different settings and height.
    * A tool to extract water and add it again later.

I only work with the first tool at the moment, but I will have a look at the others and expand this tutorial part later.

Quote
A comand line or CMD tool have no grafic interface. You can use it with the comannd line console by typing commands.
http://en.wikipedia.org/wiki/Command_Prompt

The CMD Tool AllWater_wotlk.exe



The tool is located at

E:WoWModdingToolsCMDAllWater_wotlk.exe

I use scripts where I add a command for every single ADT with needed parameters. This way you can just run the script and all ADTs have water back again. You used such a script already in part 04 of the tutorial.

So lets have a closer look at this script

>> Open the script in your favorite text editor like notepad or notepad + +

F:WoWModdingProjectsTutorialProjectscriptsWater-Test01.bat


Quote
If you later create your own script the ending extention is important. It must be .bat NOT .txt. If you click on a .bat file, windows will open it and run every line of text inside as a comand.

You see different lines in the following style.

Code: [Select]
"../../../tools/AllWater_wotlk.exe" ../patch/world/maps/test01/test01_31_31.adt 0 2 80
So what do these lines do?

The first part runs the AllWater_wotlk.exe over a relative path.
The 2 dotts ".." just tell the CMD to exit the folder you are currently in.

E:WoWModdingProjectsTutorialProjectscripts

So the first ".." exits scripts folder and the second the folder TutorialProject and the last the folder Projects.
So the CMD is now located in

E:WoWModding

Now we enter the tools subfolder where we find our AllWater_wotlk.exe

tools/AllWater_wotlk.exe

Next we give the tool 4 parameters that it should use.

    * ../patch/world/maps/test01/test01_31_31.adt
    * 0
    * 2
    * 80

The first one defines the ADT we want to edit again as a relative path. We exit scripts, enter patch/world/maps/test01 and use the ADT file test01_31_31.adt

The next parameter (0) define the height of the water surface. It´s just the Z value from noggit. 0 is used for ocean level most of the time.

The next parameter (2) is the type of the water. This manages the sound you hear and the look of the water inside the client . You can get this ID from the DBC liquid.dbc

The next value is the transparency of the water surface. As lower the value the more you can see the ground under the water surface.

At the first look all of this seems to be quite complicated but if you use the tutorial structure, you can just copy the line in the future and only have to change the path to the ADT and the settings to your needs and won't have to think about the rest.

Fix Errors



If you got an error you can start the script inside a CMD window to see possible errors.

>> Open up a commandline window by typing CMD into the windows search field inside the start menu and select cmd.exe
>> Type f: and return to change the drive you work on. You have to choose your drive here where the WoWModding folder is located.
>> Type CD WoWModdingProjectsTutorialProjectscripts and return. To get into the scripts folder
>> Type Water-Test01.bat and hit return
 
Now the script runs and you can see if it throws any error messages.

This guide has been completely proof-read and corrected in grammar by Mountainlion. Feel free to message him.


10 - Add a full new map from scratch
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Please mark as solved if solved.
Don't ask if you could ask a question... JUST ask the Question.
You can send me also offline messages. I will answer if I get online.
Skype: project.modcraft
Discord: steff#6954

kakuzu

  • Registred Member
  • MS Paint Freak
  • *****
  • Posts: 4
    • View Profile
Re: 09 - Water script in depth
« Reply #1 on: February 25, 2013, 11:46:55 pm »
Quote from: "Steff"

Fix errors



If you got an error you can start the script inside a CMD window to see possible errors.

>> Open up a comandline window by typing CMD into the windows search fild inside the start menu and select cmd.exe
>> Type f: and return to changge the drive you work on. You have to chouse your drive here where the WoWModding folder is located.
>> Type CD WoWModdingProjectsTutorialProjectscripts and return. To get into the scripts folder
>> Type Water-Test01.bat and hit return
 
Now the script runs and you can see if it throws any error messages.


Or use pause Command in the bat file

Example
Code: [Select]
"../../../tools/cmd/AllWater_wotlk.exe" ../patch/world/maps/test01/test01_31_31.adt -0.8 2 80
"../../../tools/cmd/AllWater_wotlk.exe" ../patch/world/maps/test01/test01_31_32.adt -0.8 2 80
"../../../tools/cmd/AllWater_wotlk.exe" ../patch/world/maps/test01/test01_31_33.adt -0.8 2 80

"../../../tools/cmd/AllWater_wotlk.exe" ../patch/world/maps/test01/test01_32_31.adt -0.8 2 80
"../../../tools/cmd/AllWater_wotlk.exe" ../patch/world/maps/test01/test01_32_32.adt -0.8 2 80
"../../../tools/cmd/AllWater_wotlk.exe" ../patch/world/maps/test01/test01_32_33.adt -0.8 2 80

"../../../tools/cmd/AllWater_wotlk.exe" ../patch/world/maps/test01/test01_33_31.adt -0.8 2 80
"../../../tools/cmd/AllWater_wotlk.exe" ../patch/world/maps/test01/test01_33_32.adt -0.8 2 80
"../../../tools/cmd/AllWater_wotlk.exe" ../patch/world/maps/test01/test01_33_33.adt -0.8 2 80

pause
« Last Edit: January 01, 1970, 01:00:00 am by Admin »