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/sp_wotest.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/sp_wotest.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/sp_wotest.php on line 3 .map :: Mapping for MoHAA
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/sp_wotest.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/sp_wotest.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/sp_wotest.php on line 57
Single player maps without 'test_'
:: Jv_map
-------------------------------------------------------------------------------
Most mappers will have noticed that when creating
a single player map, they have to prefix 'test' to their
map name to get the sounds and AI to work. There are
however disadvantages of prefixing 'test'. If you do
this, the game will load all sounds and all animation
files when loading your map. This results in a long
loading time and memory abuse during the game. A better
way is described in this tutorial, but it's also more
work. To get the sounds fixed please refer to one of
my previous tutorials, Ubersound
Work-Around. The tutorial you're currently reading
is about how to get the AI to work.
In most single player maps the AI won't work because
it cannot find the necessary animation files. MoHAA
uses so-called aliases to refer to animation files.
Animation aliases are defined in the TIKI files of all
enemies. Every enemy has a specific TIKI file in the
models/human folder of pak0.pk3. This TIKI file contains
information about the 3D model of the enemy, the skin
applied, the equipment he carries and the animation
aliases that can be applied on this enemy. At the end
of every German TIKI file, you'll find the line:
This line loads all dialogue animations that German
soldiers use when attacking. These are not animations
like shooting, but mostly head and lip animations when
saying things. At the end of American TIKIs, you'll
find:
This loads American conversations. At the end of every
AI TIKI you'll find:
$include models/human/new_generic_human.tik
This is the line that loads running, shooting and all
other animations and that's causing the problems. See
the small section of the new_generic_human file below:
//
More scripted animations
$include models/human/animation/scripted/balcony.tik
$include models/human/animation/scripted/ opeltruck.tik
}
The 'includes' means: "does the file name of the
map include this set of characters?". Thus, if
your map name includes 'test', the TIKIs between the
{ and the } will be loaded. These TIKIs contain the
animation aliases. The developers of MoHAA have made
a separate section for every level which loads the necessary
TIKIs. This prevents that too many animations are loaded
for a mission. So if you want to load exactly the right
number of animations for your level, you'll have to
work around this file.
-------------------------------------------------------------------------------
Working around the new_generic_human.tik
-------------------------------------------------------------------------------
The only way to work around this file is to alter the
TIKIs for AI soldiers. As these are original MoHAA files,
that's not a good idea. So just create your own enemies.
Find an enemy in MOHRadiant that you like and look for
the corresponding TIKI in pak0.pk3, for example 'models/human/german_panzer_ grenadier.tik'
for the ai->german->panzer->grenadier enemy.
Extract the TIKI file and open it with a text editor.
Copy everything and paste it into an empty text file.
Now change the line
This will make your new enemy appear in MOHRadiant
in the popup menu under 'ai-> mymapname -> german
-> panzer -> grenadier'. Save the file as 'mymapname_enemyname.tik'
in the models/human directory, for example 'models/human/ mywonderfulmap_german_panzer_grenadier'.
Now extract the new_generic_human.tik file from pak0.pk3
and remove everything between
If you're constructing a basic map, you'll only need
the NPC weapon animations for the weapons the AI can
use in the map. You only need the scripted animations
if you use them in your script. When you've added all
necessary TIKIs, save the file as 'models/human/mymapname_generic_human.tik'.
Now just add your new enemy to your map (in the 'ai->mymapname'
menu) and compile it. If you don't want to have the
AI talking by script commands, you're ready now. Otherwise,
keep on reading.
When you've done everything above, it's time to fix
the dialogue animations. All humans in MoHAA need an
animation alias for everything they say. So if you're
working on an US soldier, extract the file models/human/animation/dialogue/generic_dialogue_US.tik,
if you're adding a German AI extract the file generic_dialogue_german.tik
from the same directory of pak0.pk3. Open the file and
remove everything above the line:
// REAL GENERIC US FILES
(line 64, for US dialogue)
// REAL GENERIC GERMAN FILES
(line 29, for German dialogue)
Now you can add the TIKIs you need for your dialogue
animations on top of this file. The following TIKIs
are available:
// for German soldiers: $include models/human/animation/dialogue/M1L1_dialogue_ german.tik
$include models/human/animation/dialogue/M2L2_dialogue_ german.tik
$include models/human/animation/dialogue/M3L1_dialogue_ german.tik
$include models/human/animation/dialogue/M6L1_dialogue_ german.tik
$include models/human/animation/dialogue/M6L3_dialogue_ german.tik
If you open any of these TIKIs you can see exactly
what aliases are available and thus what 'say' commands
you can use in your script. You can also make your own
dialogue TIKI. To do this, just copy aliases from any
of the files above and put them in your own TIKI. Aliases
look like the following:
dfr_M1L1_add05
ACTOR_m1l1_add05.skc
{
client
/// Powell, check the door
{
first
sound dfr_M1L1_add05
}
}
The bold text is the alias to use in a say command,
for example:
$sergeant say dfr_M1L1_add05
The text in italics is the name of the sound alias
used. It doesn't necessarily have the same name as the
animation alias. When you've copied the aliases you
need to your custom dialogue TIKI, save it using a filename
that contains your map name, for example 'models/human/animation/dialogue/mywonderfulmap_dialogue_
US.tik'. Also add an include line in the generic_dialogue
file. Anyway, when you're done, save the generic_dialogue_US
file as 'models/human/animation/dialogue/mymapname_generic_
dialogue_US.tik' and the German dialogue file as 'mymapname_
generic_dialogue_german.tik' in the same folder. Now
the last thing you have to do, is to include your new
dialogue file in your AI TIKI. So replace this line
If you've done all this, you're ready and you can use
'say' commands in your script and add custom sounds.
Final Notes
I hope this tutorial has increased your understanding
about animations in single player levels. If you have
any problems, you can either contact
me or post at the forums
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/sp_wotest.php on line 416
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/sp_wotest.php on line 416
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/sp_wotest.php on line 416
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/sp_wotest.php on line 427
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/sp_wotest.php on line 427
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/sp_wotest.php on line 427