Hyper.nl Unreal Services Forum Index Hyper.nl Unreal Services
The forum of Hyper.nl Unreal Services and the semi-offical resource for Winged Unicorn's Unreal mods
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Advanced Question: PawnsList

 
Post new topic   Reply to topic    Hyper.nl Unreal Services Forum Index -> Support
View previous topic :: View next topic  
Author Message
ShadyFox



Joined: 25 Jun 2004
Posts: 6
Location: Portland, Oregon, USA

PostPosted: Sun Jun 27, 2004 1:44 am    Post subject: Advanced Question: PawnsList Reply with quote

What goes in the class PawnsList?

Even on the full version of v2.2 there is no source.

I learn by example, and there are none.

- ShadyFox
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Winged Unicorn



Joined: 22 Jan 2004
Posts: 87

PostPosted: Sun Jun 27, 2004 11:11 am    Post subject: Reply with quote

There is source in the full version... check it out better

Code:

//=============================================================================
// PawnsList.
//
// Copyright(c) 2003, Winged Unicorn.
//=============================================================================
class PawnsList expands Info;


struct MCoopPlayer
{
   var string PlayerClass;      // the name of the class (i.e. "MCoop2.IceSkaarj")
   var name   AnimSequence;     // the name of the animation to play
   var byte   DrawScale;        // the size of the mesh
   var byte   PawnType;         // pawn type (used to check if this pawn is available)
                                // Note: it's '255' for pawns that are always available (humans, nalis, etc)
};

var MCoopPlayer PlayerClasses[50];   // the classes I would like to load for this pawns list
var int NumPawns;


function PostBeginPlay()
{
   local int i;

   // count how many effective pawns there are in this list
   NumPawns = 0;

   for ( i=0; i<ArrayCount(PlayerClasses); i++ )
      if ( PlayerClasses[i].PlayerClass != "" )
         NumPawns++;
}

function GetPlayersInfo(int Number, out string PlayerClass,
                out name AnimSequence,
                out float DrawScale,
                out byte PawnType )
{
   PlayerClass  = PlayerClasses[Number].PlayerClass;
   AnimSequence = PlayerClasses[Number].AnimSequence;
   DrawScale    = 0.01 * PlayerClasses[Number].DrawScale;
   PawnType     = PlayerClasses[Number].PawnType;
}


defaultproperties
{
     PlayerClasses(0)=(PlayerClass="MCoop2.MCoopFemaleOne",AnimSequence=Victory1,Drawscale=10,PawnType=255)
     PlayerClasses(1)=(PlayerClass="MCoop2.MCoopFemaleTwo",AnimSequence=Look,Drawscale=10,PawnType=255)
     PlayerClasses(2)=(PlayerClass="MCoop2.MCoopMaleOne",AnimSequence=Taunt1,Drawscale=10,PawnType=255)
     PlayerClasses(3)=(PlayerClass="MCoop2.MCoopMaleTwo",AnimSequence=Wave,Drawscale=10,PawnType=255)
     PlayerClasses(4)=(PlayerClass="MCoop2.MCoopMaleThree",AnimSequence=Victory1,Drawscale=10,PawnType=255)
     PlayerClasses(5)=(PlayerClass="MCoop2.MCoopSkaarjPlayer",AnimSequence=Breath,Drawscale=10,PawnType=255)
     PlayerClasses(6)=(PlayerClass="MCoop2.MCoopNaliPlayer",AnimSequence=Victory1,Drawscale=10,PawnType=255)
     PlayerClasses(7)=(PlayerClass="MCoop2.MCoopNaliPriest",AnimSequence=Spell,Drawscale=10,PawnType=255)
     PlayerClasses(8)=(PlayerClass="MCoop2.MCoopBird",AnimSequence=Flight,Drawscale=9,PawnType=0)
     PlayerClasses(9)=(PlayerClass="MCoop2.MCoopNaliCow",AnimSequence=Chew,Drawscale=9,PawnType=13)
     PlayerClasses(10)=(PlayerClass="MCoop2.MCoopBabyCow",AnimSequence=Shake,Drawscale=5,PawnType=13)
     PlayerClasses(11)=(PlayerClass="MCoop2.MCoopNaliRabbit",AnimSequence=Eat,Drawscale=10,PawnType=14)
     PlayerClasses(12)=(PlayerClass="MCoop2.MCoopHorseFly",AnimSequence=Flying,Drawscale=20,PawnType=9)
     PlayerClasses(13)=(PlayerClass="MCoop2.MCoopFly",AnimSequence=Flying,Drawscale=10,PawnType=5)
     PlayerClasses(14)=(PlayerClass="MCoop2.MCoopGasBag",AnimSequence=Float,Drawscale=8,PawnType=6)
     PlayerClasses(15)=(PlayerClass="MCoop2.MCoopGiantGasBag",AnimSequence=Grab,Drawscale=12,PawnType=7)
     PlayerClasses(16)=(PlayerClass="MCoop2.MCoopManta",AnimSequence=Fly,Drawscale=8,PawnType=11)
     PlayerClasses(17)=(PlayerClass="MCoop2.MCoopCaveManta",AnimSequence=Fly,Drawscale=8,PawnType=11)
     PlayerClasses(18)=(PlayerClass="MCoop2.MCoopGiantManta",AnimSequence=Fly,Drawscale=15,PawnType=8)
     PlayerClasses(19)=(PlayerClass="MCoop2.MCoopDevilFish",AnimSequence=Swimming,Drawscale=9,PawnType=4)
     PlayerClasses(20)=(PlayerClass="MCoop2.MCoopBiterFish",AnimSequence=Swim1,Drawscale=18,PawnType=1)
     PlayerClasses(21)=(PlayerClass="MCoop2.MCoopSquid",AnimSequence=Fighter,Drawscale=8,PawnType=20)
     PlayerClasses(22)=(PlayerClass="MCoop2.MCoopBlob",AnimSequence=Glob3,Drawscale=8,PawnType=2)
     PlayerClasses(23)=(PlayerClass="MCoop2.MCoopPupae",AnimSequence=Tear,Drawscale=10,PawnType=15)
     PlayerClasses(24)=(PlayerClass="MCoop2.MCoopTentacle",AnimSequence=Waver,Drawscale=7,PawnType=21)
     PlayerClasses(25)=(PlayerClass="MCoop2.MCoopSlith",AnimSequence=Scratch,Drawscale=10,PawnType=19)
     PlayerClasses(26)=(PlayerClass="MCoop2.MCoopBrute",AnimSequence=GutShot,Drawscale=8,PawnType=3)
     PlayerClasses(27)=(PlayerClass="MCoop2.MCoopLesserBrute",AnimSequence=CockGun,Drawscale=7,PawnType=3)
     PlayerClasses(28)=(PlayerClass="MCoop2.MCoopBehemoth",AnimSequence=WalkFire,Drawscale=9,PawnType=3)
     PlayerClasses(29)=(PlayerClass="MCoop2.MCoopKrall",AnimSequence=Laugh,Drawscale=10,PawnType=10)
     PlayerClasses(30)=(PlayerClass="MCoop2.MCoopKrallElite",AnimSequence=Twirl,Drawscale=10,PawnType=10)
     PlayerClasses(31)=(PlayerClass="MCoop2.MCoopMercenary",AnimSequence=NeckCrak,Drawscale=10,PawnType=12)
     PlayerClasses(32)=(PlayerClass="MCoop2.MCoopMercenaryElite",AnimSequence=BigDance,Drawscale=10,PawnType=12)
     PlayerClasses(33)=(PlayerClass="MCoop2.MCoopSkaarjTrooper",AnimSequence=Breath2,Drawscale=10,PawnType=17)
     PlayerClasses(34)=(PlayerClass="MCoop2.MCoopSkaarjGunner",AnimSequence=Shield,Drawscale=10,PawnType=17)
     PlayerClasses(35)=(PlayerClass="MCoop2.MCoopSkaarjInfantry",AnimSequence=guncheck,Drawscale=10,PawnType=17)
     PlayerClasses(36)=(PlayerClass="MCoop2.MCoopSkaarjOfficer",AnimSequence=Fighter,Drawscale=10,PawnType=17)
     PlayerClasses(37)=(PlayerClass="MCoop2.MCoopSkaarjSniper",AnimSequence=gunfix,Drawscale=10,PawnType=17)
     PlayerClasses(38)=(PlayerClass="MCoop2.MCoopSkaarjWarrior",AnimSequence=Breath,Drawscale=10,PawnType=18)
     PlayerClasses(39)=(PlayerClass="MCoop2.MCoopSkaarjAssassin",AnimSequence=WalkFire,Drawscale=10,PawnType=18)
     PlayerClasses(40)=(PlayerClass="MCoop2.MCoopSkaarjBerserker",AnimSequence=Stretch,Drawscale=12,PawnType=18)
     PlayerClasses(41)=(PlayerClass="MCoop2.MCoopIceSkaarj",AnimSequence=hairflip,Drawscale=10,PawnType=18)
     PlayerClasses(42)=(PlayerClass="MCoop2.MCoopSkaarjScout",AnimSequence=gunfix,Drawscale=10,PawnType=18)
     PlayerClasses(43)=(PlayerClass="MCoop2.MCoopSkaarjLord",AnimSequence=guncheck,Drawscale=11,PawnType=18)
     PlayerClasses(44)=(PlayerClass="MCoop2.MCoopWarLord",AnimSequence=Point,Drawscale=5,PawnType=23)
     PlayerClasses(45)=(PlayerClass="MCoop2.MCoopTitan",AnimSequence=TFist,Drawscale=4,PawnType=22)
     PlayerClasses(46)=(PlayerClass="MCoop2.MCoopStoneTitan",AnimSequence=TSnif001,Drawscale=4,PawnType=22)
     PlayerClasses(47)=(PlayerClass="MCoop2.MCoopQueen",AnimSequence=Meditate,Drawscale=5,PawnType=16)
     PlayerClasses(48)=(PlayerClass="UnrealShare.UnrealSpectator",AnimSequence=None,Drawscale=0,PawnType=255)
}

_________________
Ride to the starlight... there, where heroes lie
Back to top
View user's profile Send private message Visit poster's website
ShadyFox



Joined: 25 Jun 2004
Posts: 6
Location: Portland, Oregon, USA

PostPosted: Sun Jun 27, 2004 3:51 pm    Post subject: Reply with quote

Oh sure... NOW it shows and exports the source. (I reinstalled my Unreal client) :D

So to add new pawns to MCoop, I create a class for the pawnslist, one for each critter, and one for each inventory set. Anything else?
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Winged Unicorn



Joined: 22 Jan 2004
Posts: 87

PostPosted: Sun Jun 27, 2004 4:07 pm    Post subject: Reply with quote

Well, basically to add new pawns you have to:

  • create the new pawn classes
  • create new inventory classes for each pawn
  • create a new pawns list
  • create new mutators to support the new pawns

It's kind of a long thing, but that's it... heh.
_________________
Ride to the starlight... there, where heroes lie
Back to top
View user's profile Send private message Visit poster's website
ShadyFox



Joined: 25 Jun 2004
Posts: 6
Location: Portland, Oregon, USA

PostPosted: Tue Jun 29, 2004 5:33 am    Post subject: Reply with quote

Hmm... I think I got part of it figured out. I started with a simple monster.
Here's master.babytitan:
Code:

//=============================================================================
// BabyTitan.
//=============================================================================
class BabyTitan expands Titan;

defaultproperties
{
     SlapDamage=50
     PunchDamage=40
     GroundSpeed=200.000000
     Health=940
     DrawScale=0.200000
     CollisionRadius=25.000000
     CollisionHeight=24.000000
}


So in MasterMCoop/Classes/MasterBabyTitan.uc I put:
Code:

//=============================================================================
// BabyTitan.
//=============================================================================
class MasterBabyTitan expands MCoopTitan;

defaultproperties
{
     SlapDamage=50
     PunchDamage=40
     GroundSpeed=200.000000
     Health=940
     DrawScale=0.200000
     CollisionRadius=25.000000
     CollisionHeight=24.000000
}

And in MasterMCoop/Classes/MasterPawnsList.uc I put:
Code:

//=============================================================================
// PawnsList.
//=============================================================================
class MasterPawnsList expands PawnsList;


defaultproperties
{
     PlayerClasses(0)=(PlayerClass="MasterMCoop.MasterBabyTitan",AnimSequence=TFist,DrawScale=20,PawnType=22)
}

But when it comes to the mutator, I'm kinda stuck and confused.
It looks like I need to have my classes listed in function class<PlayerPawn> ModifyLogin() with a line like:
Code:

if ((DesiredClass ~= "MasterMCoop.MasterBabyTitan") || (InName ~= "babytitan")) { SpawnClass = Class'MasterBabyTitan'; }

But I don't know how to implement that, nor where to put that new mutator info.

Could you give me a script source example from the babytitan I've given?

Thanks!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Winged Unicorn



Joined: 22 Jan 2004
Posts: 87

PostPosted: Thu Jul 01, 2004 8:23 pm    Post subject: Reply with quote

What you've done is right, but... I'm working on MCoop 2.3 and making some minor changes. I have also made some little AKMCoop2 (it doesn't have all AKCoop2 pawns though) so you might want to give a look at that. I will release it pretty soon...
_________________
Ride to the starlight... there, where heroes lie
Back to top
View user's profile Send private message Visit poster's website
ShadyFox



Joined: 25 Jun 2004
Posts: 6
Location: Portland, Oregon, USA

PostPosted: Fri Jul 02, 2004 1:51 am    Post subject: Reply with quote

Thanks again! ;D
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Winged Unicorn



Joined: 22 Jan 2004
Posts: 87

PostPosted: Tue Jul 06, 2004 7:29 pm    Post subject: Reply with quote

ShadyFox, now you can find all the info you need in AKMCoop2. Just give a look at the code and re-use the same schema. Let me know if you have any further doubt or problem.
_________________
Ride to the starlight... there, where heroes lie
Back to top
View user's profile Send private message Visit poster's website
ShadyFox



Joined: 25 Jun 2004
Posts: 6
Location: Portland, Oregon, USA

PostPosted: Wed Jul 07, 2004 2:55 am    Post subject: Reply with quote

Thankee again!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Hyper.nl Unreal Services Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group