Zoom Mutator. Zoom any weapon. RC2 - Final.

Search, find and discuss about Mutators!
Post Reply
MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Zoom Mutator. Zoom any weapon. RC2 - Final.

Post by MrLoathsome »

RC2 Readme:

Code: Select all

12:33 AM 7/1/2013

Zoom Mutator by MrLoathsome.    RC2 - Final.

This little mutator will let you zoom your view with any gun.  (Or even without one....)


Install:

Place Zoom.u and Zoom.int in your UnrealTournament/System folder.

Select "Zoom Zoom Zoom" from your mutators list.

For servers, mutator name: Zoom.Zoom.    This runs server-side.
No need for uz file on the redirect.
This does NOT need to be in ServerPackages.


Configuration:

You need to add a couple of lines in the [Engine.Input] section
of your User.ini file to make this work.

First find the first empty entry in the Aliases array.

Modify it so it looks like this:
Aliases[nn]=(Command="mutate ZoomZoom",Alias=Zoom)
(nn = whatever value was already there for that line....)

Then in the section under the Aliases you will need to
bind a key or button that you want to use for the zoom function.

For example:

Insert=Zoom | OnRelease mutate StopZoom

or

MiddleMouse=Zoom | OnRelease mutate StopZoom


Usage:

Press and hold the key/button you have configured to start zooming.  Release it to stop at any point.
Tap it again to return to normal view.   Switching weapons will also return you to normal view.

This will work in harmony with your usual sniper rifle scope(s).

Enjoy !
For any of you who looked at it, RC1 was an excellent example of making things much harder
than they needed to be. Also a good example of releasing something prematurely.

RC2 now works exactly the way I wanted it to. And the compiled U file is smaller than the Readme.

Here is the full source for this mutator:

Code: Select all

// Zoom.uc --> Zoom Mutator - 07/1/13 by MrLoathsome.

class Zoom extends Mutator;

function Mutate(string MutateString, PlayerPawn Sender)
{
	if (MutateString ~= "StopZoom")
		Sender.StopZoom();
	else if (MutateString ~= "ZoomZoom")
		Sender.ToggleZoom();
	Super.Mutate(MutateString, Sender);
}

defaultproperties
{
}
Maybe I will obfuscate it later, and release version RC3. :loool: Or maybe not..... :wtf: :tongue:

*Edit - 1 person downloaded a version of this that was missing a line. If you were the first to download this, download it again..... :what:
Attachments
Zoom_RC2.zip
Zoom_RC2 - Final
(2.11 KiB) Downloaded 220 times
Last edited by MrLoathsome on Mon Jul 01, 2013 12:47 pm, edited 3 times in total.
blarg
User avatar
UTDeath
Skilled
Posts: 248
Joined: Sat Apr 20, 2013 11:35 pm
Personal rank: Tournament Champion.
Location: Mexico.

Re: Zoom Mutator. Zoom any weapon.

Post by UTDeath »

Well, have you tried looking at the Sniper code? Since the zoom only activates while you're pressing the alt fire button then perhaps it is the key to achieve what you're looking for.
Or maybe the Chaos Sniper and make the zoom stop thing, sounds easier and would give it an advanced binocular gadget feel :)
You cannot kill what is already dead.
UT99.org

Re: Zoom Mutator. Zoom any weapon.

Post by UT99.org »

billybill wrote:here's a User.ini version I hastily put together (so let me know if it didn't work for some reason) http://utsea.tk/zoomer.zip. A note that it replaces whatever you use your mousewheel for, so do not use it if you normally switch weapons this way, bunnyhop etc.
MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: Zoom Mutator. Zoom any weapon.

Post by MrLoathsome »

UTDeath wrote:Well, have you tried looking at the Sniper code? Since the zoom only activates while you're pressing the alt fire button then perhaps it is the key to achieve what you're looking for.
Or maybe the Chaos Sniper and make the zoom stop thing, sounds easier and would give it an advanced binocular gadget feel :)
The Zoom Mutator uses functions that are built into playerpawn to accomplish the zooms. Same functions used by the SniperRifle and
the UnrealI.Rifle. The rifle code itself sort of binds the whole zoom function to whatever key the player has set for AltFire.

I wanted this to be compatible with the existing sniper guns, as well as working like the UnrealI.Rifle scope does. (i.e. no HUD stuff)
If you have any of the existing sniper guns as your active weapon, the Zoom mutator will use that guns scope HUD when zooming.
Any other type of gun, and the view will zoom. Your current crosshair will remain, but the gun will disappear from view.
You can of course continue using fire/altfire on your weapon while zooming with this.

You can start the zoom with the rifle, then have the view return to normal by tapping the key you have bound to mutate zoomzoom
Or you can start/stop the zoom by using mutate zoomzoom twice, then return to normal view by hitting your sniper guns altfire.

One of the main things I didn't like about the Chaos sniper was the jerky zoom in to the various stops.

Billybills approach was quite interesting, and does work. (Liked the bit where you can zoom backwards into behindview.)
But it has the same sort of jerky zoom as the Chaos sniper, and also requires 2 keys to function.
And since it is using FOV adjustments, it tends to warp and skew things rather than being a true zoom.
It is an excellent example of how to use the exec commands in your user.ini file.


This mutator does work. (Has anybody actually tried it ?)

Was just looking closer at the code in PlayerPawn and Pawn, and might have an idea regarding why OnRelease isn't
working the way I hoped. Will post update if I figure anything out, as my goal was to have this working
EXACTLY like the UnrealI.Rifle, but on any 1 input key/button the user wished.
blarg
UT99.org

Re: Zoom Mutator. Zoom any weapon.

Post by UT99.org »

medor wrote:
This mutator does work. (Has anybody actually tried it ?)
Yes Zoom rc1 works but seems to move the reticule a little at top left.
User avatar
UTDeath
Skilled
Posts: 248
Joined: Sat Apr 20, 2013 11:35 pm
Personal rank: Tournament Champion.
Location: Mexico.

Re: Zoom Mutator. Zoom any weapon.

Post by UTDeath »

I was not on my computer when I downloaded it and forgot to save it on my USB :(
I'm guessing you're open to suggestions and people messing with the code as well to see what works, right?
I will see what I get from my point of view.
I didn't like the zoom stops either, I disabled them :D but I thought it would be kind of nice to get both options, since it is not for a single weapon and some players do like the zoom stops.
And like I said, it would give the feel that you're using binoculars and just adjusting the zoom, perhaps another key to zoom out?
I saw someone trying to make binoculars once and it would be cool actually, I picture it somewhere between the normal view and the scope view from the I.R.P.R from the Nali Weapons, all green James Bond style.
You cannot kill what is already dead.
MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: Zoom Mutator. Zoom any weapon. RC2 - Final.

Post by MrLoathsome »

First post updated.

Note, one thing I did not test this with, was a rifle that has the zoom stops. It should work with them fine, and
give you the option of either zoom style simultaneously.
blarg
MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: Zoom Mutator. Zoom any weapon. RC2 - Final.

Post by MrLoathsome »

Has anybody tried the RC2 version?

You can test it without even installing it on my MegaTDM server. (99.67.106.156:7777)
Just add the Aliases line and keybind to your User.ini file and connect. It should work.
blarg
UT99.org

Re: Zoom Mutator. Zoom any weapon. RC2 - Final.

Post by UT99.org »

medor wrote:not work for me

other ... ou can remove
ServerPackages=De
MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: Zoom Mutator. Zoom any weapon. RC2 - Final.

Post by MrLoathsome »

Hmmm, it should work for you. I have tested it on 2 different installs.

Double check to make sure you have the Alias and keybind set correctly in your User.ini file.
It has to be exactly like I have it in the readme to function correctly, but it seems to work perfect if you do.

Re: The De package.

I like the exploding ammo. Everybody should just use the same version of De.u as I have on my servers.
blarg
User avatar
Wises
Godlike
Posts: 1089
Joined: Sun Sep 07, 2008 10:59 am
Personal rank: ...

Re: ZoOM ZoOM ZoOM ~ Mutator

Post by Wises »

MrLoathsome wrote: Re: The De package.

I like the exploding ammo. Everybody should just use the same version of De.u as I have on my servers.
^ absolutely .. Agree with you there 500%.. Image or just install a different exploding ammo mod perhaps?.. Image
in fact you know you could change the GUID and there wouldn't be a mismatch ImageImageImage
MrLoathsome wrote: Maybe I will obfuscate it later, and release version RC3. :loool: Or maybe not..... :wtf: :tongue:
^ Again... totally Agree 2987.65% Image.. Why people don't just do this by default is beyond my understanding... Image There should be a Image "RULE"
Rule #1 wrote:~Requires all developers of all Unreal Engines to Fully Obfuscate their code
Failing to adhere to this rule may cause Ghoulbladder Problems as well as the odd hemorrhoid...
..In fact I am contemplating downloading all 53 Gigabytes of files from Medors & UnrealKillers websites Immediately! and running them ALL through my MEGA-L33T-AUTO-OBFUSCATER!.. Very Soon..
^
Spoiler
Image
because I think that every mans code is Image and should not be exposed to nubs like This guy lest they go and make some kind of ShockRifle with 20 Ammo & instant kills then release it as a final product.. or...ImageImageImageImageImageImageImage

NOW on a more Serious Note and regarding the actual MOD..

I found this highly effective advertising material below.ImageImage

[youtube]8oe6UzVs7_Y[/youtube]ImageImage.................ImageImage
ImageImageImageImageImageImageImageImage

Please Note: Most Imageticons in this post were DeObfuscated from here.. & yes... yes you may. But first.. Image
Please also note: that no illegal substances were partaken during the mas editing/production of this *Ehem* post.. aside from 3/4's pack of JPS Cigarettes and copious amounts of water..
TTFN...Image

Image
User avatar
papercoffee
Godlike
Posts: 10443
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: Zoom Mutator. Zoom any weapon. RC2 - Final.

Post by papercoffee »

You really like that smileys ... Don't go over-board with it your post is hardly readable. :mrgreen:
User avatar
Wises
Godlike
Posts: 1089
Joined: Sun Sep 07, 2008 10:59 am
Personal rank: ...

Re: Zoom Mutator. Zoom any weapon. RC2 - Final.

Post by Wises »

haha yeah lol.. cause i kept editing it.. to the point that it lost its humour somewhat..

like... play the youtube clip and look at the smilies under neith and see if it humours you a little..

was in a cheaky mood and I read this post and noticed the bro making some funny 'digs' at certain things.. hehe
just thought i'd join the bandwagon.. but went over board.
whoops.. Image
Post Reply