Creating monsterplayers for mcoop2

14 Jul

I recently was asked If I could  create some playable playerpawns based on the pack6 monsters for AAR’smcoop  server.
I  considered  it sort of a trivial task to me (Hopefully), Simple –  Get the source for pack6 , add a custom Class that subclasses the  appropriate mcoop player-class and extend the defined script and defaults.  But alas. It was not ever possibly going to be that easy …

Mcoop2 is a weird mix of open and closed source , and It is freely available  with and without source  on hypers site, But there are some issues to this , Mcoop uses a custom native dll that contains some of the games  functions , Which limit it to running in 224/225/226/gold builds. I didnt feel like attempting to ‘fix’ this problem and decided to run it on 225 , witch was more convenient for me in the end.

At first i used the unrealeditor to create the subclass ,But setting all the defaults was a hassle for 4 classes  and i had only uc sources  of the  pack6 scripts  so its seemed way easier,To  just export  the beginning of my work to UC and continue  working in notepad and wotgunreal with ucc.Ssometime i think unrealed is the worst possible way ever to do any serious  work.

While I did manage to properly compile the classes and get a proper playerpawn , Mcoop is a bit more complex then that and requires a few more key steps to function.

AAR Didn’t understand, But  mentioned something about a mcoop PawnsList That may need to be created and she was correct. I opened up akmcoop and discovered that pawnslist defines the animations and pawntype of the playerclass. So I created my own pawnlist for p6mcoop and add it to the mod  and the ini files with no luck.

So i broke down since i have no idea how mcoop works ..I could have probably stared at the sources for 3 hours and figured it out but i though I was  missing some important detail that I had overlooked and decided to ask somone on unrealsp who might be more  familiar then me.  witch is usually against how I  do things. guess a bit of help sometimes wont hurt

I got a reply almost immediately,  AlCapowned mentioned That I need to create a loginmutator  that allows the game to process the new pawns name and replace it at join,  and he was kind enough to even write me a working example mutator based on the akcoop login mutator.

It should have ended there , except it seems we have 2 different mcoop versions and that   the games seemed to require exact capitalization in handlers.

So your asking what does this mean to me and how does this explain how to create mcoop classes properly?

Things you need:

  • You need to create a pawnlist that defines the pawn type
    look at the pawn type in the editor or the root classes that you subclassed. Manta is type 11, I declared the animation sequence as all but you can use any proper animation.

class p6PawnsList extends PawnsList;

  • You need a loginmutator class that allowes your pawntype to be replaced at login. this mutator needs to reference the pawns class , and the pawns name , As well as it’s spawn type  number so it knows where to spawn.Things in bold need to be modified.

class p6LoginMutator extends MCoopBaseLoginMutator;

function class<PlayerPawn> ModifyLogin(string InName, string DesiredClass, out byte InTeam, out byte

local class<PlayerPawn> SpawnClass;

if ( NextMutator != None )
SpawnClass = NextMutator.ModifyLogin(InName, DesiredClass, InTeam, PawnType);
if ( SpawnClass != None )
return SpawnClass;

InTeam = 1;

if ((DesiredClass ~= “p6mcoop.mcoopfiredragon“) || (InName ~= “firedragon“))         { SpawnClass

= Class’mcoopfiredragon‘;      PawnType = 11; }

return SpawnClass;

function string GetMonsterInfo(int PawnType)
local string result;

if ( NextMutator != None )
result = NextMutator.GetMonsterInfo(PawnType);

if ( PawnType == 11)               result = result @”- Firedragon“;

return result;

  • You need to add entries to the mcoop2.ini section that are appropriate for you mods name , Referencing the pawnlist and loginmutator you created above.ProperCapitalization is very important , make sure you use the exact same name.
  • PawnsLists[0]=MCoop2.PawnsList

I would  like to thank AlCapowned for his seemingly 2-3 hours of help to test and get This figured out, and dealing with my problems.
I had asked on oldunreal and  3 days later not a single person even responded , I asked on and 5 minutes later there was a very helpful reply and somone willing to   help.

I have this idea in my head tofurther  extend this to make it easier somhow , prehaps using dynamicloadclass to allow classes that are not force linked into the loginhandler , so you can choose what files to use.

Time to go make about 40  more playerclasses for AAR..
.fuuuuuuuuuu how did I get myself into this…lol no big deal.I  just dont think she knows how much work has to go into somthing like this..

Leave a comment

Posted by on July 14, 2012 in Uncategorized


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s