Page 2 of 2

Re: UT Bot View tilting / Ps2 thumb stick lock on view tilti

Posted: Mon Nov 09, 2015 12:09 am
by SilverSound
Dr.Flay wrote:Some work has been done to add tilting (and more) for Unreal
Body wareness mod by Z-enzyme
http://unrealsp.org/viewtopic.php?f=3&t=1829#p38927
bmUjn1t-Hk8
This looks amazing! I'll have to see if there is any source code I could pick through and find the tilt thing there. It looks promising.

Thank you for this post. I thought I was going to have to figure this out myself.....that's a scary thing for a somewhat new scripter.


Edit:I'm probably not going to be able to do this alone. Even though this script is set up simply and small it's actually complex. I'm not sure how to tackle this.

Re: UT Bot View tilting / Ps2 thumb stick lock on view tilti

Posted: Mon Nov 09, 2015 6:02 am
by PrinceOfFunky
SilverSound wrote:Hello all!
Welcome :D

I'm sorry but this time i will not use quotes cause this phone is crazy. XD

Not to ruin your idea of a mystery behind a bot, but it's just code, the bot doesn't even exist. :/
I think you would like to know that in 2012 a bot from an Unreal Tournament designed by a guy that now I can't check the name cause if I do, what I wrote till now randomply disappears, was able to pass the Turing test (a test where a human face a machine without knowing it, and if the human believe that the machine is a human, then the machine passed the test). This bit was designed to learn from human players, just like how we do.

To make something like that you would need to use neural algorithms that allows you define artificial coded neurons that work together to create new algorithms basing on their errors and other stuff.


p.s. I played since I was 5 too .o.

EDIT: And sorry for my mega errors. I said: "This phone is crazy" :/

Re: UT Bot View tilting / Ps2 thumb stick lock on view tilti

Posted: Mon Nov 09, 2015 6:55 am
by SilverSound
PrinceOfFunky wrote:
SilverSound wrote:Hello all!
Welcome :D

I'm sorry but this time i will not use quotes cause this phone is crazy. XD

Not to ruin your idea of a mystery behind a bot, but it's just code, the bot doesn't even exist. :/
I think you would like to know that in 2012 a bot from an Unreal Tournament designed by a guy that now I can't check the name cause if I do, what I wrote till now randomply disappears, was able to pass the Turing test (a test where a human face a machine without knowing it, and if the human believe that the machine is a human, then the machine passed the test). This bit was designed to learn from human players, just like how we do.

To make something like that you would need to use neural algorithms that allows you define artificial coded neurons that work together to create new algorithms basing on their errors and other stuff.


p.s. I played since I was 5 too .o.

EDIT: And sorry for my mega errors. I said: "This phone is crazy" :/


I was told something like this a long time ago. I never really grasped it back then but now that I can look and see how everything in Bot.uc works, I can understand that everything is scripted in a way.

I actually just came up with an idea. A little bit ago I was slowly and not as painstakingly looking through bot.uc in botpack.u

All of the aim procedures are in-deed chained and scripted. Target location is set and rotation is calculated then the fire happens but before a projectile goes out it add's error. In that order I think.

My idea is I can somehow hook the player into this code so that when he holds a button the controls for the player are now being linked to a bot script that handles the rotatin. Now I know what your thinking "But silver....that's an aimbot!" well let me explain my theory here.

Yes as it seems it's an aimbot but the aim script seems to have some interesting things to me right now. The only way I can learn about this is to study it in ways I can control. Right now I can't find out where exactly the bot is in it's code execution. If I could I'd just watch that and see when he tilts the gun then find that exact place in the pointed function. But I don't know a mute that let's me have that much detail. Maybe there is some debug commands for that?


If I can roughly hook the player to a script that is a cut out version of bot aim handle (aim error and all) Maybe I could learn a few things. If anyone wants to help me out in this little science exploration let me know and we can get in touch through skype.

I'll read through some more tomorrow my sleep schedule is all kinds of screwed up. I'll post what I find.

I'm sure I can get this into a mutator form. I want to avoid the wrong idea here. This will not be an online thing.

I have no interest in cheating. I have interest in doing something I've always wanted to do in this game. A weird fantasy....two actually. But let's focus on the first....first.

(P.S I found where cheats are stored! in the player. kinda weird. I'll check out ways to add the avatar command. Worst case I'll have to figure out a whole new class for TeamCannons that are controllable.)(sorry for some issues in my post((grammer and stuff)) I'm really tired)

Re: UT Bot View tilting / Ps2 thumb stick lock on view tilti

Posted: Mon Nov 09, 2015 3:11 pm
by PrinceOfFunky
SilverSound wrote:P.S I found where cheats are stored! in the player. kinda weird
Yes it is :/ A programmer should make the code as much portable as it can be, and putting the cheats inside the player is not the best way to make them portable.
SilverSound wrote:I'll check out ways to add the avatar command.
There's no need :) There is already a command that let you view bots, even if they are not on your team, this command is: "cheatview", search it in the "PlayerPawn" class :)
After that you can use "behindview", and if you want execute them both without writing them all, you can create a "txt" inside your System folder, and execute it in the game like: "exec avatar.txt".

Re: UT Bot View tilting / Ps2 thumb stick lock on view tilti

Posted: Mon Nov 09, 2015 7:31 pm
by SilverSound
SilverSound wrote:I'll check out ways to add the avatar command.
PrinceOfFunky wrote:There's no need :) There is already a command that let you view bots, even if they are not on your team, this command is: "cheatview", search it in the "PlayerPawn" class :)
After that you can use "behindview", and if you want execute them both without writing them all, you can create a "txt" inside your System folder, and execute it in the game like: "exec avatar.txt".

The avatar command is a cheat that allows you to possess a pawn. In UT2k4 this is present. In UT99 however it is not.
That is what I ment when I said "avatar command"

Besides I have Xconsole. Just view the bot with f4 and press "first person"

Re: UT Bot View tilting / Ps2 thumb stick lock on view tilti

Posted: Sat Oct 01, 2016 12:10 am
by SilverSound
LOOKIE LOOKIE P-76ZUebycU


I even isolated the code that does it.

Code: Select all

event UpdateEyeHeight(float DeltaTime)
{
	local float smooth, bound, TargetYaw, TargetPitch;
	local Pawn P;
	local rotator OldViewRotation;
	local vector T;

	// update viewrotation
	OldViewRotation = ViewRotation;
	if ( (bFire == 0) && (bAltFire == 0) )
		ViewRotation = Rotation;

	//check if still viewtarget
	bViewTarget = false;
	for ( P=Level.PawnList; P!=None; P=P.NextPawn )
		if ( P.IsA('PlayerPawn') && (PlayerPawn(P).ViewTarget == self) )
		{
			bViewTarget = true;
			if ( bVerbose )
			{
				if ( (Enemy != None) && Enemy.bIsPlayer )
					P.ClientMessage(PlayerReplicationInfo.PlayerName@"Orders"@orders@"State"@GetStateName()@"MoveTarget"@MoveTarget@"AlternatePath"@AlternatePath@"Enemy"@Enemy.PlayerReplicationInfo.PlayerName@"See"@LineOfSightTo(Enemy), 'CriticalEvent' );
				else
					P.ClientMessage(PlayerReplicationInfo.PlayerName@"Orders"@orders@"State"@GetStateName()@"MoveTarget"@MoveTarget@"AlternatePath"@AlternatePath@"Enemy"@Enemy, 'CriticalEvent' );
			}
			break;
		}

	if ( !bViewTarget )
	{
		bVerbose = false;
		return;
	}

	if ( Enemy == None )
	{
		ViewRotation.Roll = 0;
		if ( DeltaTime < 0.2 )
		{
			OldViewRotation.Yaw = OldViewRotation.Yaw & 65535;
			OldViewRotation.Pitch = OldViewRotation.Pitch & 65535;
			TargetYaw = float(ViewRotation.Yaw & 65535);
			if ( Abs(TargetYaw - OldViewRotation.Yaw) > 32768 )
			{
				if ( TargetYaw < OldViewRotation.Yaw )
					TargetYaw += 65536;
				else
					TargetYaw -= 65536;
			}
			TargetYaw = float(OldViewRotation.Yaw) * (1 - 5 * DeltaTime) + TargetYaw * 5 * DeltaTime;
			ViewRotation.Yaw = int(TargetYaw);

			TargetPitch = float(ViewRotation.Pitch & 65535);
			if ( Abs(TargetPitch - OldViewRotation.Pitch) > 32768 )
			{
				if ( TargetPitch < OldViewRotation.Pitch )
					TargetPitch += 65536;
				else
					TargetPitch -= 65536;
			}
			TargetPitch = float(OldViewRotation.Pitch) * (1 - 5 * DeltaTime) + TargetPitch * 5 * DeltaTime;
			ViewRotation.Pitch = int(TargetPitch);
		}
	}

	smooth = FMin(1.0, 10.0 * DeltaTime/Level.TimeDilation);
	// smooth up/down stairs
	If ( (Physics == PHYS_Walking) && !bJustLanded)
	{
		EyeHeight = (EyeHeight - Location.Z + OldLocation.Z) * (1 - smooth) + BaseEyeHeight * smooth;
		bound = -0.5 * CollisionHeight;
		if (EyeHeight < bound)
			EyeHeight = bound;
		else
		{
			bound = CollisionHeight + FMin(FMax(0.0,(OldLocation.Z - Location.Z)), MaxStepHeight);
			 if ( EyeHeight > bound )
				EyeHeight = bound;
		}
	}
	else
	{
		smooth = FMax(smooth, 0.35);
		bJustLanded = false;
		EyeHeight = EyeHeight * ( 1 - smooth) + BaseEyeHeight * smooth;
	}
}