require advice on uscripted mutators

Discussions about everything else
Post Reply
UT99.org

require advice on uscripted mutators

Post by UT99.org »

billybill wrote:I'm sure many of us have had ideas of mutators to change up gameplay a little, and there are hundreds of them in existance. Nonetheless many of us haven't put enough thought into ideas to make them a reality or have come across roadblocks and given up entirely. I have said on these forums of me losing creativity, it's absolutely true but you will see reading this thread maybe I have more than I thought. Behind these thoughts, as Kelly said less focus on admin mods and more on gameplay. I was unsure whether to break both these into seperate threads but really there are only a couple things I have no idea how I am going to do. Anyhow both these are aimed at increasing player skill for when the mutators are taken away. Maybe people will like them if they are finished and find a good use for them

Mutator 1:
The combination of a shock rifle and translocator, the player has a shock rifle weapon but when they trigger a shock combo they are either instantly transported or transported at a fast speed into the outer rim of the combo but in the air above it. They will then be slowed down for a small duration of time as they fall towards the center possibly at a slowed down low gravity type physics. taking no damage from their own combo of course

The aim here is to make people think more about shock combos as well as get them around the map in a "different" way and probably provide some good fun if both were comboing a corner from both sides afraid to go near it. I know there already exists many teleporter type mods, mods to slow players down, and an instagib rifle where the secondary fire teleports you to where you have hit

My question here is about the view rotation. If I take a players view rotation from where they started, and place them somewhere else on the map with the same rotation I am assuming it would be copied over and work without a hitch. And this mutator shouldn't be too hard. I've seen 2 different types of server over the years, i believe one is 436 and one is 451. Although this may be a Pure function, I will explain. The person who shoots the shock ball of somebody else which explodes and kills a third person, who gets the frag? in 436 it is the owner of the shock ball, in 451 it is the player who shoots the shock ball. I guess I would have to enable both with the admin deciding which to choose, and hook the takedamage function to decide the killer. For this mutator, in the 436 situation you would shoot someone elses shock ball and it would instantly telefrag them into existance at that location which would be a real laugh



Onto mutator 2:

This one would run great alongside the exploding ammo boxes of the de.u package, which my friend Zeke made a fix for somewhere that doesnt require de (de has multiple versions and always mismatches with clients hence you don't see a lot of it on servers). With this mutator I intend to have weapons randomly jam up on people, keep firing until out of ammo. I am unsure whether this would only happen if they were already excessively spamming or at complete random. But it would be the same firing mode they are using which is going to make the rocket launcher do 8-balls, stacked rockets, single rockets, grenades etc. Anyhow the idea is to encourage players to throw away empty weapons which I beleive is part of the game unlike other unreal games where you can walk back to the "staying" weapon and reload it without having to first throw the empty weapon

A screenflash, screenshake and/or a message visually and/or audilly telling them about the jam-up should be simple enough. Changing weapon or throwing the weapon would instantly throw the weapon which would make a "turret" until the weapon is completely empty and dissapears. two problems here, assuming the best way is to make a new actor which can stick to the weapon. How would I know which end to shoot out of? Do I spawn a new weapon the moment it hits the ground and purposely rotate it to face away from the player?

Now the really advanced stuff, I'd like the recoil of it to move it around while on the ground, which will be interesting. It shoots one way it's going to blow itself backwards, this could apply to any weapon that has recoil (screenshake) and use the same scale for how far it's going to go. Maybe when it backs up against a wall it turns? maybe i have it blow itself up if the physics become too much for it. How hard exactly is all this going to be since I can't comprehend how I'm going to do it. Or is this more a case of never done it myself but it may not be too hard after all.

Thanks for taking the time to read guys :)
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: require advice on uscripted mutators

Post by JackGriffin »

A couple of thoughts. About mutator one, it's a dicey thing trying to preserve a player's view rotation. Ferali could probably give you a rock solid way of doing it but as for me I've had limited success on-server with always keeping it accurately. I ran smack into this coding the monsterhunt teleporter that would allow you to send a player off-server if you wanted (think 'Hub Map' here). Online I could sometimes keep rotation, sometimes not. I never fleshed out the issue because it wasn't an important bug for what I was working on but my guess is that you'd have to manually keep the setting until the teleport was successful and then reapply it yourself via uscript to be sure.

This sort of mod is exactly what I thought would go over huge in UT now. Simple mod, easy to pick up, not a huge download, and lots of maps work with it.

As for mutator two, i'll tell you something that I have always thought: the exploding ammo mod is one of the most overlooked gems in UT simply because of the version mismatch it has. In one version of monsterhunt I added my own recoded exploding ammo and it was a blast (pun intended) because MH maps tend to have massive piles of ammo placed all over. You could get pretty big chain reactions going in rooms and clear out monsters with a spectacular display. I ended up scrapping it because it affected the gameplay too much as there are just too many pickups in maps like Godz that it was a spamfest in the spawn rooms. Still I think a properly coded exploding ammo mod with no de dependencies would be a hit and it's something that the resident coders here ought to consider as a side project. Add explosion levels though if you go to remake this. It ought to scale from mini-boom to mega-blast, depending on what the admin wants. If the blasts were smaller it would work with MH but you'd need some serious explosions to make it relevant in most DM maps.

Lastly, making the weapon move around on the ground will be fairly tough I think. Once the player tosses or drops the weapon it goes to pickup state and you'll have to stop that and take server control of it. That might be hard to do since all the code is dedicated to making it sit still and dormant. I do like the idea though, but you'll have to account for damages caused by the ownerless weapon, etc. There would be a lot of bugs to squash but again I think you are onto simple game mechanics that make the UT experience fresh and fun.
So long, and thanks for all the fish
UT99.org

Re: require advice on uscripted mutators

Post by UT99.org »

billybill wrote:NoNo I understand how to get the view rotation from the clients. My question is more about applying it to a new location on the map. I assume this would work. I am even pondering moving them at lightspeed instead of teleporting them into the correct place (I will add some flames behind them :)). Although moving them in a straight line is the only way I can think of given limitations. They would have to be invincible for a time when they spawn in and for the psychics of slowing the player down in the seconds after they get there so that they can choose where they are facing as they land I have never messed with physics this part seemed the hardest of this mutator

Mutator 2, I shouldve said the trigger gets jammed in the 'on' position, I'm glad you understood that. Replace the weapon before it's thrown with a new thrown "jammed" one that is facing the same direction the bullets are going to come out. this requires both physics and rotation I guess the only way is to trial and test to see if it's possible

Making it move on the ground while retaining the firing at the correct end, man, what can I even relate this to?. Every time it rotates the attached actor must rotate. Hate to say it but this stuff sounds out of my league, it's going to be challenging but the key is knowing how it will work

Thanks for the compliments though

ed: Forgive my memory here, the exploding ammo do you remember if it applies to weapons as well, and does it take weapon size into account for the explosion size (ie big jetplanes would look rediculous with a riflebox explosion). And yeah the mutator 2 I would definitely like to run with this mod, absolute chaos. lol
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: require advice on uscripted mutators

Post by JackGriffin »

I only coded my version to work with ammo classes. If you don't then you can shoot other player's weapons and explode them while they hold them. Yeah, sounds fun but didn't work well in game and I scrapped that part very fast.
So long, and thanks for all the fish
User avatar
Wises
Godlike
Posts: 1089
Joined: Sun Sep 07, 2008 10:59 am
Personal rank: ...

Re: require advice on uscripted mutators

Post by Wises »

Mutator 1:
The combination of a shock rifle and translocator, the player has a shock rifle weapon but when they trigger a shock combo they are either instantly transported or transported at a fast speed into the outer rim of the combo but in the air above it. They will then be slowed down for a small duration of time as they fall towards the center possibly at a slowed down low gravity type physics. taking no damage from their own combo of course
I would look into the Matrix mod MatrixMoves

perhaps in respect to the slowing down feature.. actually its already apart of botpack.u I guess.. somewhere. All you would really need to do would be something like this;

> Get Player current location
> Check if combo registers a hit
> get combo location x,y,z?
> move player 256-512uu's away from combo radius.
> set player pov to combo-location
> execute combo Explosion and anims
> Teleport Player back to Current Location :)


idk..
>
UT99.org

Re: require advice on uscripted mutators

Post by UT99.org »

billybill wrote:Yeah making the weapons explode is a different story even with weaponstay on it difficult to check to see whether the pickup is even there or dissapeared already

A couple things that you guys are saying differs from my post but I can't blame you for that, Jack the turrets wont give any frag to any player unless the weapon is re-picked up, from the moment it jams it is going to keep shooting until thrown and to increase realism the weapon is thrown instead of changed when it is jammed. Unlike games like Rune the weapons don't get put on the players back or side when they walk around (idea?)

And Wises, the player should teleport to the shock combo instantly and to get around the spawn facing a wall issue i proposed the slowdown and loss of gravity. Unfortunately my math is really bad so even making the player spawn in the outter rim from the direction where they came from is difficult for me. The player is never teleported back to their original location

It's starting to look like I won't have any real issues with Mutator 1. Will be making the UWindow generator code first anyhow


here is the code to get and set a players rotation if anyone was interested

serverpackage that sets and gets rotation. it runs as a mutator serverside to ensure it starts on clients
http://depositfiles.com/files/pikq9pdft

lines from the actor that has the serverpackage as a dependency



(set their rotation on server then on client)

some event where one playerpawn is involved and they are "Other" in this example

Code: Select all

local rotateClient C;
local ROffset.pitch = 0;
local ROffset.yaw = 0;
local ROffset.roll = 0;

Other.SetRotation(roffset);
Other.ViewRotation = roffset;

this is event specific so there will only be one rotateclient in use
foreach AllActors(class'rotateClient', C) { 
	if (C.Owner == Other) { C.rotate(roffset); }
}
here's what i used to retrieve their rotation (where sender is the player saving their rotation)

Code: Select all

local rotator ROffset;
local rotator Y;
local rotateClient C;
local ROffset.pitch = 0;
local ROffset.yaw = 0;
local ROffset.roll = 0;

foreach AllActors(class'rotateClient', C) { 
	if (C.Owner == Sender) { 
		C.getrotation(Y);
		Roffset = Y; 
		}
	}

User avatar
Prestus
Novice
Posts: 27
Joined: Sun Aug 12, 2012 5:20 pm
Personal rank: Monster Hunter
Location: Brazil
Contact:

Re: require advice on uscripted mutators

Post by Prestus »

Good, Mutador, im waiting download =)

But the shock rifle, why this primary and secondary shots?
Image
Image
UT99.org

Re: require advice on uscripted mutators

Post by UT99.org »

billybill wrote:this thread is in the off-topic section. this is not a mutator it's an advanced snippet, part of a mutator you could potentially use

esta discussão está na seção off-topic. este não é um modificador é um trecho avançado, parte de um modificador você poderia usar
UT99.org

Re: require advice on uscripted mutators

Post by UT99.org »

medor wrote:Direct link for rotationse http://unrealtournament.99.free.fr/utfi ... setter.zip

There is a insragib who teleports with his shooting.
I ave found it in a HOF map slv.
I have it but can not remember the name

Have a look at http://unrealtournament.99.free.fr/utfi ... lGunV3.zip
UT99.org

Re: require advice on uscripted mutators

Post by UT99.org »

billybill wrote:I will let this thread die. But can you archive this medor http://www.ut99.org/viewtopic.php?f=7&t=4670&start=0
Post Reply