/*===========================================================================================================
		HOW TO USE THAT MAGIC PROGRAM ALSO KNOWN AS USTRIPPER :P
===========================================================================================================*/


OK, here we are. As you already know, this great program can strip source from packages and make Joss
& friends suicide instantly (yeah.. i wish :| sigh). Anyway, it basically "hides" the code and obfuscates
some variables and functions names. But let's see what the syntax of the exe file is...

ustripper <package.u> -s -f -v -k:<hex code key>


More in detail:


/*----------------------------------------------------------------------------------------------------------*/

1) <package.u>

Right, the first parameter is obvious :P If you have this program, you probly won't use it to strip Windows's
command.com, will you? ;)


/*----------------------------------------------------------------------------------------------------------*/

2) -s

This option strips all of the code of the package and throws it in the toilet :P It's basically the same as
loading Ued and deleting manually all the files in your package. It reduces the size of the u file BUT it
won't make it secure at all. UTPT or WOTGreal can still read its content, so... this is not enough!


/*----------------------------------------------------------------------------------------------------------*/

3) -f

Use this parameter to strip all the names of the functions you wrote. To hide them, just put "xx" in front of
their names and ustripper will do the job. Note: you can't apply this to existing functions! So don't even try
to have a xxPostBeginPlay() or whatever... :|


/*----------------------------------------------------------------------------------------------------------*/

4) -v

Maybe the most powerful feature of this awesome toy... it strips variables :D  Once again, to strip some variable
just put "zz" in front of it and don't drool too much :P This time you can also apply it to existing variables,
but you gotta be VERY careful or you'll mess ur mod up :S I tried myself many possibilities and i figured out what the
limitations of this program are. To make it short, just follow these rules:

- DON'T use zz for config/globalconfig variables
- DON'T use zz for editable variables  [ var() bool something ]
- DON'T use zz for all those variables that have a default value set in defaultproperties
- DON'T use zz for all those variables you want to be seen by the outside. Most of you might consider this a bullshit,
  but there might be programs that look for a certain variable and will get an error if they dont find it. Consider it
  this way: if you strip a variable, there's no way to access to it from an external package anymore. So, if you plan to
  make a mutator or a serverside tool or whatever, just remember not to strip the "core" vars ok? :P
- USE it for all the other cases.. woohooo :D


/*----------------------------------------------------------------------------------------------------------*/

5) -k:<key>

Actually i don't think this is really THAT important, cuz it doesn't seem any helpful... but that's just my opinion,
so if you wanna try and encrypt your package go ahead. The key must be a 16 digits hex code, don't make a big deal
out of it, just choose a random one :P For the ones of you that don't know what hex code is, here is a list of the
digits you can pick...

				1 2 3 4 5 6 7 8 9 10 A B C D E F

/*----------------------------------------------------------------------------------------------------------*/

Finally, an example. This function was originally PlayDying from Pawn, i just modified it to make it clear to stripters :)


				* Before Stripping *

function xxExample(name zzDamageType, vector zzHitLoc)
{
	local vector zzX, zzY, zzZ, zzHitVec, zzHitVec2D;
	local float zzdotp;

	if ( Velocity.Z > 250 )
	{
		PlayBigDeath(zzDamageType);
		return;
	}
	
	if ( zzDamageType == 'Decapitated' )
	{
		PlayHeadDeath(zzDamageType);
		return;
	}
			
	GetAxes(Rotation,zzX,zzY,zzZ);
	zzX.Z = 0;
	zzHitVec = Normal(zzHitLoc - Location);
	zzHitVec2D = zzHitVec;
	zzHitVec2D.Z = 0;
	zzdotp = zzHitVec2D dot zzX;

	if ( zzHitLoc.Z - Location.Z > 0.5 * CollisionHeight )
	{
		if (zzdotp > 0)
			PlayHeadDeath(zzDamageType);
		else
			PlayGutDeath(zzDamageType);
		return;
	}
	
	if (zzdotp > 0.71)
		PlayGutDeath(zzDamageType);
	else
	{
		zzdotp = zzHitVec dot zzY;
		if (zzdotp > 0.0)
			PlayLeftDeath(zzDamageType);
		else
			PlayRightDeath(zzDamageType);
	}
}


				* After Stripping *


function (private name , private Vector )
{
	local private Vector ;
	local private Vector ;
	local private Vector ;
	local private Vector ;
	local private Vector ;
	local private float ;

	if ( Velocity.Z > 250 )
	{
		PlayBigDeath();
		return;
	}
	
	if ( zzDamageType == 'Decapitated' )
	{
		PlayHeadDeath();
		return;
	}

	GetAxes(Rotation,,,);
	= 0;
	= Normal(- Location);
	= ;
	= 0;
	= dot ;

	if ( - Location.Z > 0.5 * CollisionHeight )
	{
		if ( > 0)
			PlayHeadDeath();
		else
			PlayGutDeath();
		return;
	}
	
	if ( > 0.71)
		PlayGutDeath();
	else
	{
		= dot ;
		if ( > 0.0)
			PlayLeftDeath();
		else
			PlayRightDeath();
	}
}


/*----------------------------------------------------------------------------------------------------------*/

Final words... to make Joss and company pathetic lives more complicated, just mess your code up a lil bit. For example,
since you can't hide the name of existing functions, just make them call a new function u have written. Like...


function GetKeyValue( string zzPair, out string zzKey, out string zzValue )
{
	xxGetKeyValue(zzPair, zzKey, zzValue);
}

function xxGetKeyValue( string zzPair, out string zzKey, out string zzValue )
{
	if( InStr(zzPair,"=")>=0 )
	{
		zzKey = Left(zzPair,InStr(zzPair,"="));
		zzValue = Mid(zzPair,InStr(zzPair,"=")+1);
	}
	else
	{
		zzKey = zzPair;
		zzValue = "";
	}
}


/*----------------------------------------------------------------------------------------------------------*/

Thanks for reading this sucky guide (i apologize for my crappy inglisch, if you have any question just ask me on
Unreal or email me at ale.sardo@tin.it ...Cya have fun with your hidden scripts ;D


Winged Unicorn