Warning: include(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/work_environment.php on line 3

Warning: include(http://map.planetmedalofhonor.gamespy.com/mohaa/poll/poll_cookie.php): failed to open stream: no suitable wrapper could be found in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/work_environment.php on line 3

Warning: include(): Failed opening 'http://map.planetmedalofhonor.gamespy.com/mohaa/poll/poll_cookie.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/work_environment.php on line 3
.map :: Mapping for MoHAA

 
IRC :: #.map on Quakenet.org or simply go to irc://irc.quakenet.eu.org/.map
 

 
Warning: include(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/work_environment.php on line 57

Warning: include(http://map.planetmedalofhonor.gamespy.com/mohaa/leftindex.php): failed to open stream: no suitable wrapper could be found in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/work_environment.php on line 57

Warning: include(): Failed opening 'http://map.planetmedalofhonor.gamespy.com/mohaa/leftindex.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/work_environment.php on line 57
 
 

Work Environment Setup :: Innkeeper
-------------------------------------------------------------------------------

This tutorial describes a way to set up your work environment for creating MOHAA maps. This tutorial assumes that you have fundamental Windows® skills and know how to use a text editor. This tutorial is based on the making of a death match map named ambient_test. This is a map I created for testing various features, beginning with ambient sounds.

-------------------------------------------------------------------------------
Step 1 : Directory Structure
-------------------------------------------------------------------------------

Create the directory structure for your various maps. Add a projects folder in MOHAATools, and then add a folder there for a particular map you are developing. Below that, add three folders, one for the files you will add to your .pk3, one for the distribution .zip you will make and one for the source map. Below is the file structure that I am using. I have two projects that I am working on, Ambient and EwaR. The picture below may help to visually understand what I am talking about.

In the .pk3 folder, add the necessary folders that will be included in your_map.pk3, at the very least you would need the '/maps/dm' folder.

In the distribution folder add any folders that would not be included in the .pk3 file. These usually contain rather large .mp3 files. An example would be 'sound/amb_stereo', if you are using some music files that did not come with MOHAA. Here I make a suggestion that you add a folder with your maps name to add the files to, such as, 'sound/amb_stereo/test_ambient' so that a user of your map can easily find the files relating to your map in the future if he wants to delete them.

In the source map folder I add a folder for the autosave file created by mohradiant.

-------------------------------------------------------------------------------
Step 2 : MoH Radiant
-------------------------------------------------------------------------------

Add a 'New Project', (in the file menu), within 'mohradiant' and name it after your map. It will save a configuration file such as, 'ambient_test.qe4'. Make sure you check the 'Project Settings' to make sure that the paths are correct. Mine are:

basepath : F:\MOHAA\

mapspath : F:\MOHAA Map Development\MOHAATools\Projects\
Ambient\ map_source\

autosave : F:\MOHAA Map Development\MOHAATools\Projects\
Ambient\ map_source\auto_save\yourautosavemapname.map

The name of the 'autosave' map needs to be included. If for some reason your changes don't seem to be saved the next time you open 'mohradiant', check to make sure that another .qe4 file with the same name is somewhere. This one had me puzzled for some time until I found out what was happening.

The paths are rather long so they don't show up completely in the picture below.

-------------------------------------------------------------------------------
Step 3 : Desktop Folder
-------------------------------------------------------------------------------

Create a new folder on your desktop with the name of your project. I don't usually like folders on my desktop, but in this case it is rather convenient. In this folder create a shortcut to 'mohradiant'. In the properties of this shortcut, add to the target, a space and the name of the project you just created in 'mohradiant'. Mine is:

"F:\MOHAA Map Development\MOHAATools\mohradiant.exe" ambient_test.qe4

The path is rather long, so it didn't show up completely in the picture below.

This shortcut will launch 'mohradiant' with the project you named.

Now add a shortcut to your favorite text editor for working on your '.scr' files and such. I have just started using UltraEdit and think I like it. It allows you to create projects as well.

Next create a batch file in your map's project directory, such as, 'Build_ambient_test.bat'. The full path to mine is:

F:\MOHAA Map Development\MOHAATools\Projects\
Ambient\Build_ambient_test.bat

You can leave it blank for the moment as I will show you what to put in it later in Part 6. Now add a shortcut to it in your desktop folder.

I have been doing my development for Spearhead so I wanted a shortcut to launch my map as well. There are configuration files that come with Spearhead for the server. I copied the free-for-all file, 'ffa.cfg' to the name 'ffa_ambient.cfg', and edited it to my preferences and set the map and rotation as follows:

// Map
// Starting map on the rotation.
map "dm/ambient_test"

// Map Rotation List
sv_maplist "dm/ambient_test"

Then add a shortcut to MOHAA, or Spearhead in my case, in your desktop folder. In the properties of the shortcut, add the normal stuff you add for development and '+ exec ffa_yourmap.cfg'. Mine is below for reference.

"F:\MOHAA\moh_spearhead.exe" +set developer 1 +set thereisnomonkey 1 +set cheats 1 +set ui_console 1 +logfile 3 +exec ffa_ambient.cfg

All the '+' stuff is to be typed on one line with the executable path. The quotes around the executable are not really needed here, but if you have any spaces in the path name, they are required. The '+logfile 3' creates a log of the information sent to the console in the main folder named 'qconsole.log'. This is very handy for debugging.

There is an alternative to adding a shortcut to MOHAA in the desktop folder as I will explain later in Part_6.

I assume that you can do the same for MOHAA as Spearhead, although I really haven't tried it. I really didn't get into making MOHAA maps until I got Spearhead. There are a few things that you need to do so that your spearhead maps operate smoothly in MOHAA, but that will be in another tutorial.

My desktop folder looks like this:

-------------------------------------------------------------------------------
Step 4 : The .pk3 File
-------------------------------------------------------------------------------

Create a '.zip' file in the distribution folder and give it the name of your map. You can leave it empty for now because it will be taken care of in Part 6. Now you need to rename it to a '.pk3' file. For me the easiest way to do this is to open a 'Command Prompt' window and change to the directory that the new zip file is. Then in the 'command' window type:

ren yourmapname.zip yourmapname.pk3

Now you have a new '.pk3' file. You can close the 'command' window now. For example, the path to mine is:

F:\MOHAA Map Development\MOHAATools\Projects\
Ambient\ambient_dist\ambient_test.pk3

NOTE : Be aware that if you have a copy of your '.bsp' in the game's directories, it may be used instead of the one in your '.pk3'. This can confuse you when you have just added a flak gun in your map and it doesn't show up the next time you test your map. Take it from me, I've been there.

-------------------------------------------------------------------------------
Step 5 : The Distribution File
-------------------------------------------------------------------------------

Create a '.zip' file in your distribution folder giving it the name of your map, such as 'maymap.zip'. You do this in the same manner as making a '.pk3' file. For example the path to mine is:

F:\MOHAA Map Development\MOHAATools\Projects\
Ambient\ambient_dist\ambient_test.zip

Adding a 'read.me' file is always good; just create it in the distribution folder. Add some information about how to install, uninstall, and whatever you like. Mine read as follows:

* Ambient_test demo map read.me *

To install, extract the contents of this archive to your \MOHAA\main folder using the supplied paths.

To remove this map, delete ambient_test.pk3 from your \MOHAA\main folder and delete the \MOHAA\main\sound\amb_stereo\ambient_test folder. And of course, remove this read.me file.

This '.zip' is the file that you would want everyone to download and play.

-------------------------------------------------------------------------------
Step 6 : The Batch File
-------------------------------------------------------------------------------

This is the most tedious part of the whole process, but can give the most benefit. MBuilder is a nice little program for quickly creating a '.bsp' file. But it lacks the versatility that I want. This is where making a batch file comes in most handy.

Open the batch file you made earlier in a text editor and add the commands to compile your map. Jv_map has written a great tutorial on this subject. You can find it here.

Now let's make it do even more. Have it copy the new '.bsp' file to your 'maps\dm' folder for your '.pk3'.

We also want to update the '.pk3' and '.zip' files. You will need the command line add-in for WinZip for this. If you don't have it, you can get it at http://www.winzip.com/wzcline.cgi. Add lines to your batch file similar to those of mine below. The command line executable for WinZip is 'wzzip.exe'.

Finally copy the '.pk3' file to the 'MOHAA\main' folder for testing.

A copy of my batch file is below.

REM batch file to build ambient_test.bsp

"F:\MOHAA Map Development\MOHAATools\Q3map"
-gamedir F:\MOHAA

"F:\MOHAA Map Development\MOHAATools\Projects\
Ambient\map_source\ ambient_test.map"

"F:\MOHAA Map Development\MOHAATools\Q3map"
-vis -gamedir F:\MOHAA

"F:\MOHAA Map Development\MOHAATools\Projects\
Ambient\map_source\ambient_test.map"

"F:\MOHAA Map Development\MOHAATools\MOHLight"
-gamedir F:\MOHAA

"F:\MOHAA Map Development\MOHAATools\Projects\
Ambient\map_source\ ambient_test.map"

pause

Copy "F:\MOHAA Map Development\MOHAATools\Projects\Ambient\
map_source\ambient_test.bsp"

"F:\MOHAA Map Development\MOHAATools\Projects\Ambient\ambient_pk3\maps\dm"

pause

"H:\Program Files\winzip\wzzip" -p -r -u "F:\MOHAA Map Development\MOHAATools\Projects\Ambient\
ambient_dist\ambient_test.pk3"

"F:\MOHAA Map Development\MOHAATools\Projects\Ambient\ambient_pk3\*.*"

pause

"H:\Program Files\winzip\wzzip" -p -r -u "F:\MOHAA Map Development\MOHAATools\Projects\Ambient\
ambient_dist\ambient_test.zip"

"F:\MOHAA Map Development\MOHAATools\Projects\
Ambient\ambient_dist\*.*"

pause

copy "F:\MOHAA Map Development\MOHAATools\Projects\Ambient\
ambient_dist\ambient_test.pk3" F:\MOHAA\main

pause

Word wrapping has distorted the presentation a little. Everything that does not have a blank line between it should be written on the same line. Remember to use quotes around paths that have spaces in them.

'REM' in a batch file means remark, used just like '// 'when writing scripts. The word 'pause' stops the execution of the batch file, waiting for any key press to resume. This allows you to see what has happened without the screen scrolling by. The last pause will keep the window from closing until you press a key, so that you may read any last information.

The command line parameters for 'wzzip.exe' are:

wzzip [options] zipfile [files…]

options:

-p|P Store folder names. A lower case p stores only the names of folders recursed (subfolders included) via the -r option, while an upper case P stores all folder information specified on the command line.

-r Recurse into subfolders (include subfolders). This option requires the -p or -P option.

-u Update: add files that are new or have changed. This command adds to the Zip file any files that are not already in the Zip file, and replaces any files that have a more recent date on disk. Put another way, this command is the same as -a (Add) except that it skips files that are already in the Zip file and have the same date in the Zip file and on disk..

Make sure you use the lower case '-p'. This updates your '.pk3' and '.zip' files to include all the files you create.

If you want to go a step further, you can have the batch file start the game. Replace the last 'pause' in the batch file, add the following:

ECHO To NOT launch the game, press ctrl-break then enter. Answer Y.
pause

cd F:\MOHAA
"F:\MOHAA\moh_spearhead.exe" +set developer 1 +set thereisnomonkey 1 +set cheats 1 +set ui_console 1 +logfile 3 +exec ffa_ambient.cfg

'ECHO' means to output this line to the screen. Pressing '<ctrl-break> <enter>' interrupts the batch file asking if you wish to terminate it. The batch file then needs to change to the MOHAA folder, ('cd F:\MOHAA'), or you will get a MFC error when the next line is executed. This is because 'moh_spearhead.exe' can't find the '.dll' files it needs. The next line looks just like the target you set in the shortcut before, surprise. Do not put a pause at the end so that the window will close itself.

This is a simple batch file; just make sure that your paths are all correct. You can remove the pauses if you don't want it to stop between steps. I generally leave them in until I know it is working right.

NOTE: The command window is not DOS, so some of the great old DOS batch commands don't work. None of those are used here.

-------------------------------------------------------------------------------
Step 7 : Get to Work
-------------------------------------------------------------------------------

Now just go edit your map and script files to your heart's content. When you want to test your map, double click the shortcut to the batch file and wait for it to finish. Then you can double click the shortcut you made to the game and check it out. Or if you added the "step further" stuff to your batch file, just press any key.

Note : When testing your map, make sure there are no '.pk3' files in 'MOHAA\main' or 'MOHAA\mainta' that did not come with the game except for 'entdefs.pk3'. This can cover some bugs or missing textures and such that may be in your '.pk3'.

-------------------------------------------------------------------------------
Editors Note :
-------------------------------------------------------------------------------

This tutorial is by no means professing that this is the best way to set up a development environment. But it is one way, one that works for me. If you are working on a map with others, that's a whole issue in itself, and I won't go into that now. I hope that you have found something that has helped or sparked your creative ideas.

Use the forums, they are a great resource.

Later; Innkeeper.

Need any help : Ask in the Forum

 

 


 
Warning: include(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/work_environment.php on line 435

Warning: include(http://map.planetmedalofhonor.gamespy.com/mohaa/rightindex.php): failed to open stream: no suitable wrapper could be found in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/work_environment.php on line 435

Warning: include(): Failed opening 'http://map.planetmedalofhonor.gamespy.com/mohaa/rightindex.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/work_environment.php on line 435


 


Warning: require(): open_basedir restriction in effect. File(/home/map/cgi-bin/mohaa/poll/include/config.inc.php) is not within the allowed path(s): (/var/www/vhosts/own3mall/mohaaaa.co.uk:/usr/share/php:/usr/share/pear) in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/work_environment.php on line 446

Warning: require(/home/map/cgi-bin/mohaa/poll/include/config.inc.php): failed to open stream: Operation not permitted in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/work_environment.php on line 446

Fatal error: require(): Failed opening required '/home/map/cgi-bin/mohaa/poll/include/config.inc.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/own3mall/mohaaaa.co.uk/httpdocs/mohaa/tutorials/work_environment.php on line 446