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/ubersound.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/ubersound.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/ubersound.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/ubersound.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/ubersound.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/ubersound.php on line 57
 
 

Ubersound Work-Around v1.1 :: Jv_map
-------------------------------------------------------------------------------

This tutorial is obsolete. A better method of adding new sound aliases has been found and is described in the Adding Custom Sounds tutorial. This page is only still there for reference.

Probably everyone who ever started a singleplayer map has noticed that the sounds don't work. Other mappers tried to add sounds to a multiplayer map, but it didn't work either. After searching the web for tutorials or after doing some research himself, the mapper finds out that the problem lies in the ubersound.scr file and decides to either prefix 'test' to his mapname or to create his own ubersound file and send it along with the map in the pk3. Both methodes have vast disadvantages. Prefixing 'test' to your map name will cause CPU and memory abuse and will increase the loading time of your map. Creating your own ubersound is a nicer way, but your map will conflict with other user maps if there are a lot of pk3s in the main folder. I think the best way is to make a series of TIKIs that load the necessary standard sounds for single player maps and make a custom sounds TIKI that loads any custom sounds. If you construct your map using the following work-around method, it will no longer trouble other maps and it's more resistant to 'hostile' paks.

-------------------------------------------------------------------------------
Ubersound and ubedialog
-------------------------------------------------------------------------------

First a little explanation about these. The ubersound.scr and uberdialog.scr files are in pak0.pk3 in the 'ubersound' directory. These files contain a lot of lines like the following:

aliascache snd_step_wood1 sound/characters/fs_wood_01.wav soundparms 0.4 0.3 0.6 0.2 200 2500 auto loaded maps "m1l1 m1l2a m1l2b m2l1 m2l2a m2l2b m2l2c m2l3 m3l1a m3l1b m3l2 m3l3 m4l0 m4l1 m4l2 m4l3 m5l1a m5l1b m5l2a m5l2b m5l3 m6l2a m6l2b m6l3a m6l3b m6l3e dm moh obj train"

This line means: cache the resource sound/characters/fs_wood_01.wav on channel auto (channel 0, lowest priority), preload it (loaded) for the maps m1l1, m1l2a ... m6l3e (bsp names) and dm, moh, obj and train (folder names) and use the name snd_step_wood1 as an alias. The alias is the name the game refers to when trying to load a sound. There's an explanation about the soundparms on top of the ubersound.scr file

For example, when a player in the game fires his M1 Garand rifle, the game starts looking for the alias m1_snd_fire. In the ubersound.scr file, you'll notice that this alias doesn't exist but that there are two similar aliases: m1_snd_fire1 and m1_snd_fire2. In this case, MoHAA randomly chooses one of these sounds. All sounds are client-side, this means, when you're playing MoHAA online, you don't hear exactly the same sounds as other players on the server. A rifle shot could on one system cause the m1_snd_fire1 alias to play, on others the m1_snd_fire2 alias.

All this is not very important for us mappers/modders, the problem is the 'maps' section. If you create a user map, the mapname is not on the list unless you choose a very special name or put your map in a dm, moh, obj or train folder within the maps directory. If you're working on a multi-player map without custom sounds, ubersound will not be a problem. You can just put your map in a 'dm' or 'obj' folder. The problem is that when you're creating a single player map or are trying to add custom sounds to your multiplayer map, you'll respectively hear exactly nothing or your custom sounds don't play. The section below describes how to solve the problem, depending on your map type.

-------------------------------------------------------------------------------
Multiplayer maps
-------------------------------------------------------------------------------

As mentioned above, if you don't need custom sounds in your multiplayer map, just put them in a 'dm' or 'obj' folder. Otherwise, place it in one of these folders as well and follow the procedure described below in the appendix Appendix A: Making a custom sounds TIKI. This should work as long as you don't want to add more than approximately 200 custom sounds. If you want to add more, you'll have to follow the procedure a few times to create multiple TIKI files, but with some inventivity I'm sure you'll manage.

-------------------------------------------------------------------------------
Singleplayer maps
-------------------------------------------------------------------------------

It's also possible to work around the ubersound and uberdialog when working on a single player map. Because a single player map should not be in a 'dm' or 'obj' folder, standard sounds will not be loaded and the player won't hear a thing. A solution is to load all standard sounds you need on your map using TIKIs. A problem with TIKIs is, that there is a limit to their allowed size, so the ubersound and uberdialog files have to be split up into several files. See Appendix B: Duplicating the original files to TIKIs on how to create the TIKIs necessary for the standard sounds. Then take a look at Appendix A: Making a custom sounds TIKI on how to create a TIKI for your own sounds.

-------------------------------------------------------------------------------
Final Notes
-------------------------------------------------------------------------------

Well, that's all folks. Just one remark, make sure you add the sound TIKIs to your final pk3 when releasing your map. If you're wondering why all this works, take a look at Appendix C: Technical background. If you're wondering why it doesn't work, either post a message on one of the forums or drop me a line. I will add all common questions you ask me to a FAQ that will be released at a later date. If you're constructing a single player map that previously was prefixed with 'test', you cannot just delete this tag after following this tutorial. If you do that, you'll notice that the AI won't work anymore. This is because you have to work around another file, called new_generic_human.tik in the models/human directory of pak0.pk3. A tutorial about how to this will be available soon.


Contact Information
e-mail: jv_map@quake3stuff.com
website: www.quake3stuff.com/freebrief

-------------------------------------------------------------------------------
Appendix A: Making a custom sounds TIKI
-------------------------------------------------------------------------------

This appendix describes how to create a custom TIKI that preloads custom sounds.

(1) Create a text file in the main/models/sound/mymapname directory.

(2) Start with the following template:

TIKI

setup
{
        path models/fx/dummy
        skelmodel dummy3.skd
}

init
{
        server
        {
                classname ScriptModel
                rendereffects +dontdraw
                notsolid
        }
        client
        {
                settiki none
                // sound aliases and caches go here
        }
}

animations
{
                idle dummy3.skc
}

(3) Now replace the green line with the custom sound caches you need. I used sound/mywav1.wav and sound/mywav2.wav as an example.

TIKI

setup
{
        path models/fx/dummy
        skelmodel dummy3.skd
}

init
{
        server
        {
                classname ScriptModel
                rendereffects +dontdraw
                notsolid
        }
        client
        {
                settiki none
                aliascache mywav1 sound/mywav1.wav (...) maps                 "mymapname"
                aliascache mywav2 sound/mywav2.wav (...) maps                 "mymapname"
        }
}

animations
{
                idle dummy3.skc
}


(4) Save your text file as a TIKI. To prevent user maps from overwriting other user map's sounds, it's necessary that this TIKI is in a specific folder. For instance save it as 'custom.tik' in the main/models/sound/mymapname directory.

(5) Open your map's precache script. If you don't have one, create a file called 'mymapname_precache.scr' in the same directory as your bsp is in.

(6) Add the TIKI you just created on top of the precache script the same way as in the example below:
cache models/sound/mymapname/custom.tik

(7) Save the precache script and load your map. The newly added sounds should work without overwriting the original ubersound files.

-------------------------------------------------------------------------------
Appendix B: Duplicating the original files to TIKIs
-------------------------------------------------------------------------------

This appendix describes how to load all necessary standard sounds for single player maps without using the ubersound and uberdialog files. For convenience, I've created a standard TIKI package that you can download and easily edit. See the readme file for more details.

(1) Download the TIKI package (64 kB) and put it somewhere on your disk, it doesn't have to be in the MoHAA directory.

(2) Open the ZIP file. You'll find a bunch of TIKI files divided into sections. Select the TIKIs you need and extract them to your main/models/sound/mymapname folder. Now open all TIKIs you extracted with a text editor and replace 'mymapname' by your mapname at every alias. You'd best use an automatic replace function for this.

(3) Now take a closer look at the TIKIs and decide what sounds you need. In the original state most sounds have been commented out by the /* and */ on top of and below each section. When you need a particular section on your map, remove the /* and */. These sounds will now be loaded when you start your map.

(4) When you've done all that, open up the precache script of your map (maps/mymapname_precache.scr). Now add a line for every TIKI that you extracted on top of it.

For example:

cache models/sound/mymapname/body.tik
cache models/sound/mymapname/bullets.tik
cache models/sound/mymapname/footsteps.tik
cache models/sound/mymapname/global.tik
cache models/sound/mymapname/weapons_A.tik
cache models/sound/mymapname/weapons_B.tik
cache models/sound/mymapname/dialog_german_alarm.tik
cache models/sound/mymapname/dialog_german_attack.tik
cache models/sound/mymapname/dialog_german_curious.tik
cache models/sound/mymapname/dialog_german_death.tik
cache models/sound/mymapname/dialog_german_flee.tik
cache models/sound/mymapname/dialog_german_idle.tik
cache models/sound/mymapname/dialog_german_misc.tik
cache models/sound/mymapname/dialog_german_pain.tik

(5) Now load your map. You should be able to hear all non-commented-out sounds from the TIKIs that are loaded by the precache script. If you notice any 'ERROR PlaySound: ... needs an alias in ubersound.scr or uberdialog.scr - Please fix' errors in the console while playing, you'll have to uncomment more sections from the TIKI files or to extract more TIKIs.

-------------------------------------------------------------------------------
Appendix C: Technical background
-------------------------------------------------------------------------------

I'll give you some background information about the TIKIs. The 'setup' stage doesn't actually do something, but prevents error messages in the console. The 'server' section is just used to spawn the object in game, and telling the game that it's a non-solid non-drawn entity. The 'client' section is most interesting. First, the 'settiki none' command means all subsequent commands are applied to all TIKIs. This line is very important. You'll also find it on top of the ubersound file, which is in fact a TIKI file as well. The 'animations' stage is not really interesting, it only contains some information for MOHRadiant on how to render the TIKIs.

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/ubersound.php on line 419

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/ubersound.php on line 419

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/ubersound.php on line 419


 


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/ubersound.php on line 430

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/ubersound.php on line 430

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/ubersound.php on line 430