Search This Blog

Showing posts with label MoHAA. Show all posts
Showing posts with label MoHAA. Show all posts

Sunday, 10 August 2003

MoH:AA Co-op levels

This is a summary of the cooperative levels I have created for Medal of Honor: Allied Assault.


I have updated my Co-Op mods, fixed a few bugs and simplified the downloads.

How do I play the Co-Op Levels

See my notes on How to Play Co-Op.

Now download a level to try...

Co-Op Levels Ready to play

When you join or start a Co-Op level always WAIT for everyone to have connected before joining the battle. The server, very quickly, becomes too busy to accept connections, if there is any combat.
For use with the original MOHAA game, version 1.11

In each of these levels I have added; Extra troops, my teleport system and a simple mission.
Don't expect them to be like the original levels. They are intended to be played for fun, with your friends, it is extremely unlikely you can play them through without dieing many times. For best results, play in the same house or have an open phone or IP chat conversation going on at the same time.

x_coop_attack_fort_v2a.zip (3.2MB) - 10 August 2003
x_coop_blackout_huts_v2a.zip (3.8MB) - 10 August 2003
x_coop_escape_to_church_v2a.zip (3.3MB) - 10 August 2003
x_coop_farms_and_bunker_v2a.zip (2.7MB) - 10 August 2003 (the player running the server has to pick up the radio.)
x_coop_lighthouse_road_v2a.zip (2.5MB) - 10 August 2003 (my favourite)
x_coop_road_to_villa_v2a.zip (3.2MB) - 10 August 2003
x_coop_snow_norway_v2b.zip (3.1MB) - 3 September 2003 (popular) NEW version
x_coop_train_depot_v2a.zip (3.5MB) - 10 August 2003

Each file contains all the necessary files, so some pk3 files are duplicated in each one of the downloads above.

What about the old versions and menus?

Sorry, I don't have the time to support older versions. In my opinion the new method is much slicker, and have no intention of worrying about the old stuff. Just download the new ones and enjoy.

I want to create my own Co-Op levels

All the notes and tips you need are on my 'How To' pages.

Sunday, 20 July 2003

How do I create my own Co-Op mods for MoH:AA


If you have read my earlier post you may be interesting in creating levels for Medal of Honor: Allied Assault, that can be played cooperatively with others.

To do this you will need to find out as much as you can about scripting. I have listed a few notes to help, but, unfortunately, I don't have the time to make these pages complete. There are much better web sites for that. See the list at the end of this page. I have just tried to add a few notes, that are missing or incomplete on other sites.

What do I need installed?

Download any of my coop maps.  Here is a good one to try:
x_coop_snow_norway_v2b.zip (3.1MB)

Within all of the coop level downloads you will find the following files which you will need for your own levels:

x_jcbfixes200.zip - Required files to be able to play a Co-Op level Including
x_jcbmain200.pk3 - installed in the main folder
x_jcbmainta200.pk3 - installed in the mainta folder

These include changes to the sound file and the generic human to work with Co-op and other modded levels. Also included is the Select Mission option in the briefing room.

x_jcbextras508.pk3 - Some additional scripts I have used in this modification
x_jcbchanges100.pk3 - reduction of the melee damage, this affects all games not just coop!

Except where stated, the files MUST be in the ...\MOHAA\main folder.

Extract the contents of the PK3 files, using Pakscape, and read the comments in the script files.

What do I need to know to start Modding MOH:AA

See any one of the other Mod sites listed at the end, plus read a few of my notes:
How to get MOH:AA Co-Op to work - Set of notes to help create Co-op games from Single Player maps
MOH:AA Scripting - Notes I made for myself to help me create the scripts
MOH:AA Commands and Variables (150Kb) - Word document which I've compiled for my own reference while working on the above mods

Where else can I find out about Co-Op modding

Co-Op Big 5 Map Pack 1 home page - Collection of Co-Op missions including generic fix for co-op sound
Omaha Co-Op map - Useful example of Co-Op mods
Pakscape - Good tools for extracting files from .pk3 archives.
Extract the zip file and make sure any .pk3 files are in the '.../MOHAA/main/' folder. MOHAA will then automatically register the maps or other mods.


Forums and Information

Official MOH:AA site - links to more links
The Modding Theatre - helpful forums and links to more MOH sites
MOH Match - Good for a few downloads
LOKI's Modding Theatre - Some tutorial for Modding MOH
Nemesis's Tutorial Page - Very clear MOHRadiant mapping tutorials and some scripting
The Rjukan project - Very professional modding project
.map MOH:AA mapping project - Another usefull modding site

Saturday, 5 July 2003

Coop Mode for Medal of Honor: Allied Assault



Medal of Honor: Allied Assault does not have a Co-op mode as standard.

With a bit a messing about it is possible to play some levels cooperatively.

What is Co-Op play?

This is where you and your friends combine forces to complete the missions within the game. You all compete against the computer.
The maps and levels have to be created or modified to be played co-op. It is not perfect because the game does not have special features for playing Cooperatively, it's just a lucky coincidence available in the game.

What do I need?

You need someone to play on a machine running the server and everyone else play as clients.
You will have to be running, at least version 1.11 of the game and you will need the modified files, required to play the game, installed on both the server and all the clients machines.

Before any of the levels will work, you will need the various fixes and add-ons. Make sure the folowing are installed:

Download any of my coop maps.  Here is a good one to try:
x_coop_snow_norway_v2b.zip (3.1MB)

x_jcbmain200.pk3
x_jcbextras502.pk3
x_jcbchanges100.pk3
The numeric digits may be a higher numbers, they are the version of the file and ensure that future versions will work, even if the olf version is still installed.

How do I install the files?

All MOHAA mods are installed the same way, simply copy the files ending '.pk3' in to the 'main' folder with all the other '.pk3' files.
The default location for MOHAA to install is,

C:\Program Files\EA GAMES\MOHAA\main

The mods are distributed in compressed zip files, to keep bits together. Unzip the file, using your favourite zip extractor, or Windows XP built in compressed folder view.




Each modified level is supplied the same way, and needs to be uncompressed and the '.pk3' file copied in to the same place.

What do I do now it's installed?

Run MOHAA as normal, and set yourself up, with a name and character model.



Once that is complete, if you are the server, you need to exit MOHAA. If you are the client, go to the briefing room...

I want to run the server, what do I do?

Various options must be set to run the server. To do this, use the shortcut provided.



The shortcut, sets all the server settings and runs the level. You will eventually see the Server connection menu.



Use the information on this screen to help the client players connect.

Wait for all the players to connect, then press the 'Continue' button.

I am going to be one of the clients, what do I do?

Mainly, wait for the server!
Go to the briefing room, to select a mission:


If you have the mod installed correctly, you will have an addition option on this screen, the 'Select Mission' page.

Click on this to bring up a list of all the levels installed.


When playing Co-Op it is essential that the server and the client select the same map. Find out from the person running the server, which map to run. Double click on that map name.

Wait for the map to load.


When the level has loaded a connection menu will appear.

Find out from the person running the server, their IP Address and Port number. Enter those details in the space provided, in the following format:

192.168.20.31:12203

Press the connect button.
Wait for the map to connect, this may take a few minutes. Don't worry if the screen is grey to start with, move about a bit and it will redraw correctly.

Wait for all the players to connect BEFORE you shoot anything. If there is any action the server gets too busy and the other clients can not connect.

When everyone is ready, go shoot things...

==

I have more questions?

The above is all you need to run the game, but If you want to know a little more, read on.

How powerfull does my computer need to be?

If you are playing on a client, any computer able to run MOHAA in single player mode, is fine for Co-Op.
If you are running the server, you will need a more powerfull computer. This is because every enemy in the level has to be controlled, in addition to keeping the whole thing together!

I have run the server on a machine as low as an 800MHz Intel Pentium with 384Meg RAM. This was slow and unresponsive and is not recommended. A 1GHz AMD Athlon with 512Meg RAM, was fine, a 1.8GHZ Pentium with 512Meg RAM was good. I currently run it on a 2.5GHz Pentium, with 1Gig RAM. This is overkill :-)

Co-Op can not be run on a dedicated server.

What do the files do?

x_jcbmain200.pk3
x_jcbextras502.pk3
x_jcbchanges100.pk3

x_jcbmain200.pk3

This adds the briefing room menu, that lets you select any map to play. It also changes a couple of fundamental models that allow the characters to work in Co-Op mode. (It does not interfere with normal game play.)

x_jcbextras502.pk3

These are global scripts used within the levels. Among other things it contains the co-op menus, the scripts to spawn troops and weapons, plus the teleport system to avoid players spawning on top of each other. This file is essential for any of the levels to run. (It does not interfere with normal game play.)

x_jcbchanges100.pk3

This file reduces the damage done by melee. That's hand to hand, or tooth to groin, combat. I strongly recommend it for Co-Op play because it lets you survive a dog attack and the attack from the butt of the enemy weapon at close range. Unfortunately it affects the single player game, where it tends to make the dogs harmless! You may want to remove this file, before going back to play the single player game.

What is the Teleport System?

I originally created this as a way of minimising the chances of players starting on top of each other. This is caused because the mods are based on the single player levels which only have one start point. I developed this further so that you can move the start points. This makes Co-Op games much more fun, when you die, you start much nearer the action and don't have to spend ages running half way across the level.

I have older co-op levels, are they compatible?

No. The new levels use new menus, and different scripts to run. If the co-op levels were produced by me, I have converted them all to the new versions. See my web site.

Does this work with other Mods?

If two mods change the same file, one of them will not work. It is imposible to make all mods compatible, if in doubt or something does not appear to work, remove all other mods.
The '.pk3' files used by the game and mods are loaded in alphanumeric order. The highest letter wins.

I can't upgrade to game version 1.11, what do I do?

I have only been able to get Co-Op play to work properly, if I patch up to version 1.11 of the game. If you stick to an older version, you're on your own.
If you can't upgrade your game because it claims you have the wrong country version, there is a registry fix to correct the version number, and then the upgrade will install.

[HKEY_LOCAL_MACHINE\SOFTWARE\EA GAMES\Medal of Honor Allied Assault\1.1.12.200]

Thanks

I'd like to thank the numerous people on Forums, Newsgroups and Web Pages who have provided useful information to help me write mods and prepare these notes. Most of you are unidentifiable or lost in the mists of re-posts and quotes. If you happen to see something that you think you originated, then you are probably correct, and many thanks.

Sunday, 5 May 2002

How to get Co-op to work with MoH:AA


This is for use with Medal of Honor: Allied Assault

What is Co-Op play?

This is where you and your friends combine forces to complete the missions within the game. You all compete against the computer.
The maps and levels have to be created or modified to be played co-op.

What needs to be done?

There is a convenient feature of the game, that allows any level to be played Co-Op, as long as both the server and the client run the same level, before the client attempts to connect to the server.
Use a few command line options to launch the map and run the server at the same time, then the client can use the console command 'connect' to join that game.

To simplify things, the shortcut is usually provided by any modified co-op level, and can easily be changed to work with other levels.

I have created some menus, to simplify the client side of things, see further on in this guide.

Although I have said any level can be played co-op, this is misleading, because the objectives and obstacles in some Single Player levels, do not function or can not be passed by more than one player! This is why most levels have to be modified to work. In addition, some levels are too easy, when a team try to complete them. For this reason I have created some scripts to help improve co-op levels. This guide does not cover those, just the basics.

Which version of MOH:AA will I need?

I have only been able to get Co-Op play to work properly, if I patch up to version 1.11 of the game. If you stick to an older version, you're on your own.
If you can't upgrade your game because it claims you have the wrong country version, there is a registry fix to correct the version number.

[HKEY_LOCAL_MACHINE\SOFTWARE\EA GAMES\Medal of Honor Allied Assault\1.1.12.200]

What files do I need to modify?

You need:
Maps\coop_yourlevel.bsp (the main compiled map file)
Maps\coop_yourlevel.scr (script file - this is the one you have to edit)
Maps\coop_yourlevel_precache.scr (this is a list of all the models and the script used in the game)
The game will create the following automatically, once created, it's worth putting them in your pk3 file:
Maps\coop_yourlevel.min
Maps\coop_yourlevel.pth

How do I get characters to fire back?

Include the modified .tik file:
models/human/new_generic_human.tik

How do I get the sound to work?

Make sure your map files start with 'coop'.
Include the ubersound files, which have been modified to include map files that start coop as well as the normal ones:
ubersound/uberdialog.scr
ubersound/ubersound.scr
These files are included in any of my modded levels, look for the lastest mod on my web site and download that. 'x_jcbmain###.pk3' contains the sound and human model fixes. The hash (#) will be the version number of that file.

Several mods will have modified these files, so if the sound does not work, remove any other mods. I have tried to get my version to work with as many mods as possible, but due to the way mods and the files in MOH:AA work, it is not possible for all mods to be compatible.

What do I need to change in the scr file?

1) Remove all the friendly troops.
Add the following line to the script file:
$friendly remove
or
$friendlybob remove
$fredflintstone remove
$friendly2 remove
They are the targetnames of the characters followed by the command 'remove'. If the friendly characters do not all have the targetname 'friendly' you will have to put one line in for each targetname.

2) Remove any model, object or door that gets in the way.
$object_targetname remove

3) Fix the guys who jump out of cabinets. (if present)
Search for any line in the script that looks like this:

exec global/cabinet.scr
Change the line to have 'remove' at the end.
exec global/cabinet.scr remove
I don't know why it works, but I found this tip in the big 5 map pack notes and was originaly found by Fatz, thanks.

4) Disable any code that does not work.
Each map will have different problems. Some maps have vehicles at the start of the level which may need disabling and removing others may have events that cause problems, for example the alarms in m6l2a get turned on by the guards but can't be turned off by the players. In this case remove the alarm code:

// exec global/alarmer.scr
The // is the comment marker, so if a line starts with // it will not be executed.
Other lines I've had to remove to get things to work:
// exec global/spotlight.scr
The following line is possibly used in other scripts, but generally I have found it can be removed with no noticable consequenses.

level.script = maps/mxly.scr
The following, and anything refering to the $player, will not work on the server, until the $player is alive. On the server it is not good enough that the player has spawned.
In the main code, the script lines will have been processed BEFORE the player is alive, so that code will not work! For simplicity, you can simply remove those lines, but if they add to the plot, you may want to spend the time re-writing them in some way!

Examples of ones that can be removed:

$player stufftext "tmstop"

5) Check lines with references to other file names.
In most cases you should LEAVE the map name as per the original level. The script that is called will only have entries for existing levels. You may want to edit the script that is called to work with your level name, although this is usually unnecessary.

exec global/loadout.scr maps/mxly.scr // this assigns player items for the level
The loadout script can be removed. In single player it adds appropriate weapons, but this is overridden by the multiplayer weapon selection when playing co-op.
Leaving it usually creates more errors than it saves, but I am undecided. If you want to leave it, use the following line in all the co-op scripts.
exec global/loadout.scr maps/m5l3.scr // CO-OP to reduce warning error messages
It should be the first line of the level script.
exec global/ambient.scr mxly // this adds suitable background sound

6) Remove or change the objectives.
This can be tricky, but the level will probably work without touching the objectives. If parts of the level are not playable in Co-Op, try just removing the objectives. If you are familiar with scripting, you can probably set up a suitable Co-Op objective for the level.

** That's it, you should now have a Co-Op level.

7) Fix the enemy skill level.
This can be labourous. Normal SP skill levels are ignored when running a Multiplayer server. Most SP levels set the accuracy of the enemy to 100% and then use the skill level to adjust it down for the SP games. This can make Co-Op levels difficult but still fun.

If you want to feel better about your skill, you can use the 'targetname' of each character and set the accuracy of each enemy:

$guard_by_the_gate.accuracy = 20
$patroller1_in_yard.accuracy = 15
$enemy.accuracy = 25

How do I find individual characters or objects in an existing map?

Use a hex editor on the .bsp file and search for 'targetname'. Look for lines of code similar to the following:
{
"balconyheight" "128"
"enemysharerange" "0"
"#fnum" "1"
"origin" "-5392.00 -2368.00 72.00"
"testanim" "idle"
"model" "human/1st-ranger_medic.tik"
"scale" "1.0"
"classname" "ai_allied_2nd-ranger_private"
"$targetname" "friendly"
"type_idle" "idle"
"type_attack" "turret"
"type_disguise" "salute"
"type_grenade" "grenade"
"gun" "none"
"maxdist" "328"
"angle" "0"
"leash" "900"
"sound_awareness" "100"
"noticescale" "100"
"fixedleash" "0"
"waittrigger" "0"
"accuracy" "20"
"ammo_grenade" "0"
"disguise_range" "256"
"disguise_period" "15"
"disguise_level" "1"
"gren_awareness" "10"
}

How do I reference an individual character in my script?

You can reference the characters by their Targetname. The targetname acts on all the characters with that targetname all at once.
"$targetname" "friendly" "$targetname" "guard1" "$targetname" "officer2"

For example, to remove all the characters with the targetname 'friendly' use:

$friendly remove
or to remove individual characters you could use:
level.guy = $guard1
level.guy remove
It might be possible to reference the characters by their friendly number, but I have never tried to get that to work...

"#fnum" "1"
"#fnum" "2"
It's probably just the array number, e.g.
$friendly[2] remove

How do I reference the players in my script?

This is tricky but possible, but requires the addition of some simple code. As each player spawns $player becomes an array with one member for each player. $player[1], $player[2] etc.
To find out the total number of players connected check the array size.

level.total_players = $player.size
In addition to that, to reduce the amount of work the server has to do, I keep track of the maximum number of clients, using:
level.maxplayers = int ( getcvar (sv_maxclients) )
You can use these in a loop similar to the following:
loopforgame:
  for(local.i = 1;local.i <= $player.size;local.i++)
    {
        if ($player[local.i] isTouching $item_targetname)
        {
 iprintlnbold "Do something here..."
        }
        waitframe //infinite loop protection
    } //end loop for players
  waitframe //infinite loop protection
goto loopforgame
end
For this to work, you will have to loop indefinetely which could slow the game down, so be sparing with this type of code and make sure you have the waitframe commands in the right places.

How do I display messages on the players screen?

iprintln "A message"
iprintln_noloc "A message"
iprintlnbold  "A message"
iprintlnbold_noloc "A message"
Using the _noloc (no localisation) avoids the 'Need Localisation' errors, see the next section.

Why do I get 'Need Localisation' errors in the console?

All text you use needs to be in the localization.txt file to stop these errors. The game looks for a substitution, between the English used and the language you want to display. It will not stop the text displaying, but is a bit messy, so you might want to always use the _noloc versions of the iprint command.

Where do I put my code?

I find that adding or removing objects and most setup code works, if it is after:
//------------------------------------------------------
level waitTill prespawn
//------------------------------------------------------
and before:
//------------------------------------------------------
level waitTill spawn
//------------------------------------------------------
If it is something that happens, rather than adding or removing objects, or it has to interact with the player, it should be after:
//------------------------------------------------------
level waitTill spawn
//------------------------------------------------------
Having said the above, I am actually still not sure if the 'level waitTill spawn' works at all in multiplayer games. I have taken to removing it from my Co-Op scripts.

How can I make the levels easier to start?

I have created menus for this purpose. I am on my second version. These add to the level script, and pop up a menu when the players run the level.
See any of my new levels, the code is right at the start. You can find these on my web site. The menus are included in 'x_jcbextras###.pk3' supplied with each of my Co-Op levels. Look for the latest version number instead of the hash (#).

Can I use DM Maps for Co-Op

Not really, I have tried and I can add lots of troops using scripts, BUT I can't get them to patrol or move about, so the gameplay is a little boring. They duck and shoot at you, but that's about the best I can get.
I have tried to add info_pathnode entities to move actors to and from but the maps always crash. I have had confirmation from other people that adding info_pathnode entities crashes maps, so at the moment I've given up with DM maps.

SP Maps

The Single Player maps have lots of useful scripting worth having a read through.

Are they any good for Co-Op Play?

The following are just a few notes I have made about each level:
A=Already Co-Op, N=Needs work, E=Easier conversion
N * m1l1 Start in moving truck
N * m1l2a training
N * m1l2b training factory cut wires bit dull
N * m1l3a Moving jeep
A * m1l3c Road to lighthouse

A * m2l1 snow meet grillo - the snow one in Norway
N * m2l2a Need to check papers
N * m2l2b inside sub (too small)
E * m2l2c Outside sub, alarms sounding (needs work, OK, but small)
E * m2l3 inside building but starts inside the air con (needs work but OK.)

A * m3l1a Omaha landing (already done by someone else)
A * m3l1b Omaha bunker (already done by someone else)
A * m3l2 Farm house, with a platoon
E * m3l3 Six barrelled (needs rocket laucher, may be worth a look)

E * m4l0 Road up to house
A * m4l1 before plane then road to tunnel under church
A * m4l2 Train depot, (avoided need to get on the truck)
E * m4l3 truck to tank park (small but OK)

A * m5l1a Snippertown (needs some more work.)
A * m5l1b Lead Tank crew (needs some more work.)
N * m5l2a Tank
N * m5l2b Tank
N * m5l3  Protect Tank at bridge (too small)

E * m6l1a Snow forest
E * m6l1b More snow
N * m6l1c Need papers to get to riffle Stg44
A * m6l2a Snow leading to town - communication blackout
A * m6l3a Starts in a train with marines (marines removed!)
N * m6l3b Fort. (Starts in a lift)
N * m6l3c Fort again. (Starts in a lift again)
N * m6l3d More in the Fort (worse, wearing Gas Mask)
N * m6l3e End game (very short)

Thanks

I'd like to thank the numerous people on Forums, Newsgroups and Web Pages who have provided useful information to help me write mods and prepare these notes. Most of you are unidentifiable or lost in the mists of re-posts and quotes. If you happen to see something that you think you originated, then you are probably correct, and many thanks.