Ripper Mutator

  • 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.

Twisted Metal

Anfractuous Aluminum
Jul 28, 2001
7,122
3
38
39
Long Island, NY
Bah, NOOOO! Problem. I type ucc make...it starts to compile then gets to my package and boom! It explodes. Here is the log:

Warning: Failed to load 'MyPackage.u': Can't find file 'MyPackage.u'
Warning: Failed loading package: Can't find file 'MyPackage.u'
Log: Analyzing...
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\MyPackage\Classes\MyRipperBlade.uc)
Log: Imported: Class MyPackage.MyRipperBlade
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\MyPackage\Classes\MyRipperMUT.uc)
Critical: UClassFactoryUC::FactoryCreateText
Critical: UFactory::StaticImportObject
Critical: UMakeCommandlet::Main
Exit: Executing UObject::StaticShutdownAfterError
Exit: Exiting.
Uninitialized: Name subsystem shut down
Uninitialized: Log file closed, 08/21/01 23:36:39

Any ideas?
 

simianangel

New Member
Aug 12, 2001
46
0
0
46
Delaware, USA
make sure that your new codes dont have any import lines, they usually reside at the top and start with the word "EXEC".

these are the lines that import information like sounds, models, textures and the such, all of which are already loaded by the origional ripper so delete them unless you are importing your own custom models.
 

Twisted Metal

Anfractuous Aluminum
Jul 28, 2001
7,122
3
38
39
Long Island, NY
Originally posted by simianangel
make sure that your new codes dont have any import lines, they usually reside at the top and start with the word "EXEC".

these are the lines that import information like sounds, models, textures and the such, all of which are already loaded by the origional ripper so delete them unless you are importing your own custom models.

Nope they don't. I just copied the code from above. :(
 

Papapishu

我是康
Jun 18, 2001
2,043
0
0
42
void
www.vovoid.com
Did you get this message in UT?
Or in UnrealED? (shouldn't use it...)
It seems as if it can't find the file at all.
Did you check to see if you got a .u-file in your system directory?
If you have and the compile was successful, maybe your settings are wrong...
Can you use other mutators?
There are some settings in unrealtournament.ini that specifies which directory to use.
Once my Music-dir was wrong, so I couldn't start because UT-Logo-Map.unr couldnt find the music file umenu23.umx...

This is the procedure for compiling:
X: is your drive
X:\UnrealTounament is your root directory
X:\UnrealTounament\System is your system dir
X:\UnrealTounament\MyPackage\classses is your -package/classes dir

make sure you have the three files in this directory.
goto the system directory
delete MyPackage.u
if it don't exist, that's your problem...
open unrealtournament.ini and add the line:
Editpackages=MyPackage
after the other ones (as shown)
save this file...
open a command prompt and chdir to your system directory
type: ucc make
and you should get an output like:
-----------Core---------
-----------Engine--------
e.t.c.
then last:
-----------MyPackage--------
Parsing thisfile
Parsing Thatfile
Parsing thosefiles
Compiling thisfile
Compiling thatfile
Compiling thosefiles
Success. Errors: 0 Warnings: 0

you get the ides...
Make sure you don't get any error messages, and preferably no warning messages.
Now check if the file was created: MyPackage.u, in your system dir.

Open UT
open the console
type: open ctf-face?mutator=MyPackage.MyRipperMUT
(this is where I assume you get an error)
if the file exists, there must be some other problem in UT
Try starting a normal game, then type (in console):
summon MyPackage.MyRipper

(btw, you don't have to call it MyRipper, since it's a rather uncreative name... and there might be conflicts, if another guy makes the same thing, and also have no imagination... ;)
 

Twisted Metal

Anfractuous Aluminum
Jul 28, 2001
7,122
3
38
39
Long Island, NY
The error message I printed was from UCC.log which got created after compiling. Anyway the error message I get in the DOS prompt says this:

------------------------MyPackage--------------------------
Analyzing...
General protection fault!

History: UClassFactoryUC::FactoryCreateText <- UFactory::StaticImportObject <- U
MakeCommandlet::Main

Exiting due to error
 

Papapishu

我是康
Jun 18, 2001
2,043
0
0
42
void
www.vovoid.com
You can get the weapon working right if you do it like this:

MyRipper.uc:

Code:
class MyRipper extends ripper;


defaultproperties
{
     ProjectileClass=Class'MyPackage.MyRipperBlade'
}
MyRipperBlade.uc:
Code:
class MyRipperBlade extends Razor2;


auto state Flying
{
 	simulated function HitWall (vector HitNormal, actor Wall)
	{
		local vector Vel2D, Norm2D;
                NumWallHits=1;
		bCanHitInstigator = true;
		PlaySound(ImpactSound, SLOT_Misc, 2.0);
		LoopAnim('Spin',1.0);
		if ( (Mover(Wall) != None) && Mover(Wall).bDamageTriggered )
		{
			if ( Role == ROLE_Authority )
				Wall.TakeDamage( Damage, instigator, Location, MomentumTransfer * Normal(Velocity), MyDamageType);
			Destroy();
			return;
		}
		SetTimer(0, False);
		MakeNoise(0.3);

		if ( NumWallHits == 1 ) 
		{
			Spawn(class'WallCrack',,,Location, rotator(HitNormal));
			Vel2D = Velocity;
			Vel2D.Z = 0;
			Norm2D = HitNormal;
			Norm2D.Z = 0;
			Norm2D = Normal(Norm2D);
			Vel2D = Normal(Vel2D);
			if ( (Vel2D Dot Norm2D) < -0.999 )
			{
				HitNormal = Normal(HitNormal + 0.6 * Vel2D);
				Norm2D = HitNormal;
				Norm2D.Z = 0;
				Norm2D = Normal(Norm2D);
				if ( (Vel2D Dot Norm2D) < -0.999 )
				{
					if ( Rand(1) == 0 )
						HitNormal = HitNormal + vect(0.05,0,0);
					else
						HitNormal = HitNormal - vect(0.05,0,0);
					if ( Rand(1) == 0 )
						HitNormal = HitNormal + vect(0,0.05,0);
					else
						HitNormal = HitNormal - vect(0,0.05,0);
					HitNormal = Normal(HitNormal);
				}
			}
		}
		Velocity -= 2 * (Velocity dot HitNormal) * HitNormal;  
		SetRoll(Velocity);
	}

}
defaultproperties
{
     LifeSpan=0.000000
}

MyRipperMUT.uc:
Code:
class MyRipperMUT extends Mutator;

function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
{
 If (Other.IsA('ripper') && !Other.IsA('MyRipper'))
 {
  ReplaceWith(Other,"MyRipper.MyRipper");
  Return False;
 }
 Return True;
}

!!Attention!! I made thisone using the package name "MyRipper"
If you use something else, replace the ReplaceWith class...


It's a bit more code, since I must copy the hitwall function and alter it (removing the numhits-counter)

I got the same error as you, but I builded it from scratch, one module at a time, checking which was faulty, (divide and conquer)
and then it worked fine.
I don't really understand what the problem was, but I don't think it's the code...

This worked fine on my system and the blades continued for as long as I could stand there watching...


Here's the compiled file from my system:
 

Twisted Metal

Anfractuous Aluminum
Jul 28, 2001
7,122
3
38
39
Long Island, NY
Yay! I compiled it and it worked! Thank you so much papapishu! Maybe I can actually learn something from this. hehe. Thanks again for all the help.