Mutator probs...

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

LupusStudios

New Member
Jun 16, 2003
18
0
0
No matter what i do my mutator wont show up ingame... I have specifed both the .inf file and the defaultproperties like friendly whatever but it still doesn't show! What more do i need to make it appear?
 

Radiosity

Minty Fresh!
Jan 3, 2003
2,217
0
0
45
UK
www.radiant-studios.net
Well, if you've named a file with an inf extension it won't show up, since the correct extension is .int, with a 'T'.

However, if that was just a spelling mistake (the f is close to the t on a keyboard after all :) ) then check your int file against this:

Code:
[PUBLIC]
Object=(Class=Class,MetaClass=Engine.Mutator,Name=yourpackage.yourmutator,Description="Description.")

...for how it should look.
 

Wormbo

Administrator
Staff member
Jun 4, 2001
5,913
36
48
Germany
www.koehler-homepage.de
Also make sure your .int file really is .int and not .int.txt and that your class actually compiled without any errors, i.e. you should have a new .u file in your system directory.
 

LupusStudios

New Member
Jun 16, 2003
18
0
0
Here is the code of the mutator itself:
Code:
//=============================================================================
class Ghostwar extends Mutator;

function ScoreKill(Pawn Killer, Pawn Other)
{

local xPawn x;
	x = xPawn(Other);

if ((Killer != Other) && (Other != None) && (Killer != None))
{

	Killer.ScaleGlow += 0.1;
	x.MultiJumpBoost -= 10;
	
	Other.ScaleGlow -= 0.1;
	x.MultiJumpBoost += 10;

if (Other.ScaleGlow < 0.1)
	Other.ScaleGlow = 0.1;
}

if ( (Other != None) && ((Killer == None) || (Killer == Other)) )
{
	Other.ScaleGlow -= 0.1;
	

if (Other.ScaleGlow < 0.1)
	Other.ScaleGlow = 0.1;
}
	Other.Visibility = Other.Default.Visibility * Other.ScaleGlow;
	Killer.Visibility = Killer.Default.Visibility * Killer.ScaleGlow;
	
	
}
function bool CheckReplacement( actor Other, out byte bSuperRelevant)
{
if ( Other.IsA('Pawn') || Other.IsA('Carcass') )
Other.Style = STY_Translucent;

if ( Other.IsA('Invisibility') )
return FALSE;

return TRUE;
}

defaultproperties
{
     GroupName="Ghostwar"
     FriendlyName="Ghostwar v.1.0"
     Description="Each time you die you take anothet step down the road of spirits!|Fight it!"
}
And here is the content of the .int file (hehe just a typo before):

[Public]
;Object=(Class=Class,MetaClass=Engine.GameInfo,Name=Matrix.MatrixMatch,Description="DM|The one|xinterface.Tab_IADeathMatch|xinterface.MapListDeathMatch|false")
Object=(Class=Class,MetaClass=Engine.Mutator,Name=matrix.MutMatrix,Description="Each time you die you take anothet step down the road of spirits!|Fight it!")

[GhostwarConfig]
DialogText.Caption="Ghostwar 1.0"
DialogText2.Caption="Misc. Ghostwar Settings"

I actually borrowed most of this for learning porpourses but if this doesn't even work....
 
Last edited by a moderator:

Shuriken

Cordless Pixie
Apr 11, 2002
153
0
0
35
Yoo`kay
www.planetunreal.com
Code:
Object=(Class=Class,MetaClass=Engine.Mutator,Name=matrix.MutMatrix,Description...)

That part isn't right. The Name= section should have your packagename.filename, but I
think it's still the text from the file you borrowed from (MonkeyMatrixMoves I believe...)
 
Last edited:

Radiosity

Minty Fresh!
Jan 3, 2003
2,217
0
0
45
UK
www.radiant-studios.net
Good point. Where are you storing your classes? Are they in a new folder you've created or have you just added the mutator into the Matrix folder? If they're in a different folder then you need to change your int file to the new folder name.
 

LupusStudios

New Member
Jun 16, 2003
18
0
0
Yeah the mutator shows up ingame now... Thx guys! But then i have another question?`We the heck doesn't the mutator dfo what its supposed to?

It's supposed to make people a little more transparent each time they die and make them a little less transparent each time they kill someone.

i think it was for UT originaly this idea but since i got no compiling errors i thought it would work... Any help?

Setion

PS: And yes it was from matrix monkey! Hehe - i believe that it's a good way to learn by looking at other peoples work - but sometimes it happens that i just copy and pastes... Shame one me! :( :)
 

nickelplate

New Member
Jun 20, 2003
24
0
0
Montréal, Canada
Visit site
ScoreKill() is not a member of the mutator class, it is defined in the GameRules class. So you would have to subclass gameRules and override ScoreKill by putting your GhostWar code into it. Don't forget to pass the function down the GameRules chain:

function ScoreKill(Controller Killer, Controller Killed)
{
// your code here

// pass the function down the GameRules chain
Super.ScoreKill(Killer, Killed);
}

Look into the GameRules code. I hope that helps.
 
Last edited:

LupusStudios

New Member
Jun 16, 2003
18
0
0
Ok i looked into the gamerules stuff and found out it's now called controller killer, controller killed so i tried to replace some parts of the code - the one with all the other stuff but and i tottaly stripped it down! But now it's complaining about my mutator info - is this beacause it ain't in the mutator category anymore?

Here's the code now:

Code:
class Ghostwar extends GameRules;

function ScoreKill(Controller Killer, Controller Killed)
{

if ((Killer != Killed) && (Killed != None) && (Killer != None))
{

	Killer.ScaleGlow += 0.1;


	Killed.ScaleGlow -= 0.1;


if (Killed.ScaleGlow < 0.1)
	Killed.ScaleGlow = 0.1;
}

if ( (Killed != None) && ((Killer == None) || (Killer == Killed)) )
{
	Killed.ScaleGlow -= 0.1;
	

if (Killed.ScaleGlow < 0.1)
	Killed.ScaleGlow = 0.1;
}

	

 Super.ScoreKill(Killer, Killed);
}

defaultproperties
{
     GroupName="Ghostwar"
     FriendlyName="Ghostwar v.1.0"
     Description="Each time you die you take another step down the road of spirits!|Fight it!"
}

It now says: Unknown property in defaults...
 
Last edited:

LupusStudios

New Member
Jun 16, 2003
18
0
0
Ok thanks it worked - well sorta! The mutator still doesn't do a thing and im beginning to feel that this project may never go another step! :(

Anybody have aclue why people aint becoming transparent when the get shot? :rolleyes:

Code is the same as above... but i stripped the original code totally becasue of errors i couldn't fix!
 

Magus

New Member
Oct 7, 2001
69
0
0
Visit site
UT2003 does not use scaleglow anymore to make the player transparent as you could in ut. You need to replace the pawn skin with a shader and add a constant color for the opacity layer of the shader. To get transparency to work.

Fading Actors
 

nickelplate

New Member
Jun 20, 2003
24
0
0
Montréal, Canada
Visit site
Imagine I subclass the Pawn class, by adding a shader and constant color as shown in the tutorial.

Now how would I replace all existing pawns in the Controller class with the NewPawn class just created,
so I would be able to override the ScoreKill() function to execute the desired effect?
 
Last edited:

Magus

New Member
Oct 7, 2001
69
0
0
Visit site
You dont need to create a new pawn to get them to fade. Using new pawn and controllers is not recommended for mutators since it limits compatibility with other mods. I will give you a quick run through of doing what you want without having to create a new pawn class.

Making the player fade will be controlled through a inventory item that you will give the player every time that they respawn. So you are going to need a class that extends Inventory. This class should contain 3 functions postbeginplay, destroyed, and modifyVisibility. PostBeginPlay is similar to the fading actors postbeginplay just use instigator to access skin values. The biggest change to this function is that at the end you will calculate the players starting visibility. You can get the number of kills, suicides, and deaths from the playerReplicationInfo. Destroyed has no big changes. The ModifyVisibility function just decreases the Faders alpha by 1. The Timer/Tick or whatever is not needed.

The next class is your GameRules class. For the scorekilled function you just need to search the killers inventory for your inventory item. Then call the VisibiltyModifier function to change the killers visibility. You dont have to do anything to the Killed player.

The final class is the mutator itself, it should be the same as what you have except for the addition of one function. You will add the ModifyPlayer(...) to your class, you will spawn your inventory item, and then give it to the pawn.

If need be I can post some code if it is required but this is basicly how to go about doing what you want.
 

Magus

New Member
Oct 7, 2001
69
0
0
Visit site
Shuriken said:
Would it be possible to make a weapon that (for example) decreases opaquity of enemy when hit by primary, and increases opaquity on secondary?

The method would be similiar to that above, so in the mutator you would give every player a item as above in modifyPlayer(...). Or a better method might be on first hit of the weapon check to see if the player has an item when they are hit by the weapon if they dont have one then spawn one for them. Then you would only be spawning the item when needed to make them transparent, since you might die several times without every being hit by the weapon. When you find the item that the player possess then all you need to do is modify the transparency like modifyVisibility does in the scorekilled.