UT2U1 - Loathsomes UT Tweak - v2.0 Final

Search, find and discuss about Mutators!
Post Reply
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: UT2U1 - Loathsomes UT Tweak

Post by papercoffee »

MrLoathsome wrote:@Paper. Cool. I have been testing with a few other mutators, and no problems here either.
Notice you are still using the RC1 version. If you do notice a glitch with that, grab RC2 and try it first.
I didn't notice any glitches ...but if you recommend to use the RC2, then I should do it.
User avatar
Dr.Flay
Godlike
Posts: 3347
Joined: Thu Aug 04, 2011 9:26 pm
Personal rank: Chaos Evangelist
Location: Kernow, UK
Contact:

Re: UT2U1 - Loathsomes UT Tweak

Post by Dr.Flay »

Oh dear Loathsome, may angels mop your fevered-brow, as you try and fix your work-horse.
See if it behaves with a Linux Live boot disk. I often find it the quickest way to decide between broken hardware or OS.
You can test your complete Hardware with Ultimate Boot CD
http://www.ultimatebootcd.com

Jack, you are no doubt aware of the politics in the Unreal camp. I have made a point of not taking sides as it will only limit my support options. My only allegiance is to the people who want to have honest fun. I even find them on the sites I hate visiting, so I keep sticking my head in the lions mouth, whilst treading on egg-shells :lol2:

Take all the "warnings" from each camp with a pinch of salt (as you seem to be doing). Analyse, then do what is in the best interest of you, and the whole shrinking community.
Don't get caught between a rock and a hard place.
I guess some people are not aware who you are, as you have used a few tags and have been spending more time with UT99, though I thought Gopostal was you best known name in the Unreal world :noidea
As there has become more integration of the 2 games, interest in your work may well raise.

To be honest Jack and Loathsome, you and a few other eminent notables here, I would actually prefer to see working with UEd3 :wink:
The huge variety of quality monsters and zombies available for UT2004, far out-weigh those available for U1 games.
The vast majority of monsters in U1, just being a tweaked version of something else.

...Oh dear... I can see all the looks of horror around the world :roll:
Sure I just heard "Burn him the at the stake!"
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: UT2U1 - Loathsomes UT Tweak

Post by MrLoathsome »

I am going to try and explain my thinking on this again.

I am almost positive now that the engine processes BaseMutator differently than normal mutators.

This is now running online with a number of other mutators.

DoubleJumpUT, DE.Volatile ammo, MoreGoreLGE, Relics, x3dfxMapvotev24c, Autofill (adds bots based on mapsize), and a
currently unreleased version of my SwarmSpawner thing.

It breaks NONE of them as long as it is first in the list. If I place it 3rd in the list, the first 2 mutators break, exactly as you would
expect.

Online I am testing it with those new gametypes I have been playing with, but it works the same with the default UT games.
Should also work with MH.

I drafted up a quicky replacement mutator that swaps out the default Unreal guns with the OLweapons versions that work online. That is also running on the servers.

I now have the 10 Dm maps that came with Unreal Gold now working fine online on my UT servers. All the weapons are replaced by the OLweapons that work online for players.
The 5 Troopers that are on there are using the OLweapons also, and now drop them when killed. (That is optional...)

ALL of this is working exactly as I have been describing it.

At this point, I would advise anybody who is working on any sort of mod that changes BaseMutator to do pretty much NOTHING in that class except for what this
does. (or doesn't do.....)

Then put all their new code in a separate mutator class.

I suspect some of you have just glanced at the source, and then assumed you know exactly what is going to happen without actually trying it.

You should try it. The people who have seem impressed. There are no errors in the log files from this. The number of them that used to
be there has gone down.
blarg
[]KAOS[]Casey
Average
Posts: 30
Joined: Fri Mar 30, 2012 7:56 pm

Re: UT2U1 - Loathsomes UT Tweak

Post by []KAOS[]Casey »

Considering that U1's base mutator is Engine.Mutator.. BaseMutator is just called first for everything, that's it. Mutator isn't even referenced in native code except that it is defined.
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: UT2U1 - Loathsomes UT Tweak

Post by MrLoathsome »

Post 1 updated with RC3 version of this.

It is currently running on my TDM/DOM servers.

Thanks to Higors input, it no longer breaks the mutator chain if not loaded first.

I also included a 2nd mutator that swaps out the Unreal guns for the OLweapons. (U12OS)
This only needs to be used on servers that have Unreal guns on them.

@Casey. Thanks for the input. Took a look at your NewSkool stuff briefly tonight.
Think I see what you and Pcube did there, and it looks like a good starting shell for a new UT coopgametype.

But this UT2U1 thing is attempting to make all the Unreal content other than SP maps work in the default UT and various other
custom gametypes. (If they don't mess with the basemutator....) Everything EXCEPT coopgames.

I see how the code you have there fixes the U1 weapons, but I am not going to be doing new TournamentPlayer or other classes for this thing.
It is going to remain as short as I can make it. Started work on a new little mutator that is going to attempt to make the Unreal guns work online
for players without any new weapon or playerpawn classes. Its not working yet, but I do have the default Unreal guns firing online if a player
picks them up. They just fire and fire. Non-stop, until they run out of ammo.
:loool:

If I make them work right, I will post that up..... For now, I am happy with just requiring the OLweapons package to make that all work online.

The troopers, are freaking fixed. But that happens in SwarmSpawn.
blarg
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: UT2U1 - Loathsomes UT Tweak

Post by papercoffee »

MrLoathsome wrote:Post 1 updated with RC3 version of this.
RC3 is it now... ok
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: UT2U1 - Loathsomes UT Tweak

Post by MrLoathsome »

Yes, for now....

I got something working tonight, that fixes the default UnrealI/UnrealShare weapons online. That is probably going to
be included with RC4 of this. Still more testing to do....

It is running on my TDM/DOM test servers right now. They now no longer have OLweapons or any oldskool class as a serverpackage.

Keep testing RC3 and provide any feedback that comes to you while testing it.

It doesn't seem as if the inclusion of Higors bits in PostBeginPlay or AddMutator have broken anything. :mrgreen: :tongue: :tu: (I didn't think it would...)

I do have 1 small question regarding the fix I came up with today. Going to post the question and the fix in a new thread in the coding forum next.

And also, yesterdays U12OS mutator that swaps the default Unreal guns for the OLweapons, is now obsolete. :loool:

(Is there a coding contest going on anywhere?)
blarg
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: UT2U1 - Loathsomes UT Tweak

Post by papercoffee »

MrLoathsome wrote: (Is there a coding contest going on anywhere?)
*cough* http://www.ut99.org/viewtopic.php?f=12&t=4895 *cough*
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: UT2U1 - Loathsomes UT Tweak

Post by MrLoathsome »

Progress update - RC4 almost done.

The fix for using Unreal guns online is now built into this. It is optional, since the
only time it needs to be active is for servers that have UnrealI or UnrealShare or other non-TournamentWeapon
guns on them.

RC4 should make things run even better that RC3 did.

The previous versions of this have been working so well and the side effects of reducing a bunch of processing in this
function were so interesting that I decided to take a closer look at what I had left intact in the CheckReplacement
function of the BaseMutator.

Wanted to see if it could be optimized further. I think it can. :mrgreen:


Going to provide some details on what I did here for discussion. This will be a bit long....

Some of these things will be applicable to those of you working on Coop gametypes.
Several of them have been removed from the basemutator for coopgame2 and the
NewSkool files Casey posted, but some of them are still in their basemutator replacement....

I am just going to go over them in the order they appear in the original Botpack.DMMutator source
and explain what I thought was wrong with each, and what I have UT2U1 doing now for each case.

After I looked at it closer, I continue to be stunned that Epic did this stuff in the BaseMutator.CheckReplacement function.

First thing was this check right at the top of the function:

Code: Select all

	if ( MyGame.bMegaSpeed && Other.bIsPawn && Pawn(Other).bIsPlayer )
	{
		Pawn(Other).GroundSpeed *= 1.4;
		Pawn(Other).WaterSpeed *= 1.4;
		Pawn(Other).AirSpeed *= 1.4;
		Pawn(Other).AccelRate *= 1.4;
	}
Why is that check happening for every single actor that is spawned for the entire game?

By placing it into a ModifyPlayer function, it now happens once for each Bot or Player.

Code: Select all

function ModifyPlayer(Pawn Other)
{
	if ( MyGame.bMegaSpeed )
	{
		Other.GroundSpeed *= 1.4;
		Other.WaterSpeed *= 1.4;
		Other.AirSpeed *= 1.4;
		Other.AccelRate *= 1.4;
	}

	Super.ModifyPlayer(Other);
}
Next consider this horrible block of code that is doing 2 things:

Code: Select all

	Inv = Inventory(Other);
 	if ( Inv == None )
	{
		bSuperRelevant = 0;
		if ( Other.IsA('TorchFlame') )
			Other.NetUpdateFrequency = 0.5;
		return true;
	}

	if ( MyGame.bNoviceMode && MyGame.bRatedGame && (Level.NetMode == NM_Standalone) )
		Inv.RespawnTime *= (0.5 + 0.1 * MyGame.Difficulty);
For every single thing that is not an Inventory item, Epics code has been checking it to see if it is a UnrealShare.TorchFlame, then making that
adjustment. I put some logging in, and haven't found a DM/CTF/DOM map that has a TorchFlame on it.....
It seems to me that even if a map DID have TorchFlames in it, they would all be there at map start in the map.
Doubt if there are any mutators or mods out there spawning TorchFlames during games.

I put this bit of code in the mutators PostBeginPlay function just so that bit would still happen if this gets
used on a map that does contain the TorchFlames:

Code: Select all

	forEach AllActors(class'TorchFlame', TF)
	{
		TF.NetUpdateFrequency = 0.5;
		log("UT2U1 - TorchFlame found: "$TF);  // This line will be out of the release version....
	}
The 2nd thing that horrible block of code is doing, is an adjustment to Inventory items RespawnTime, but it looks to me
like that is only happening in cases where the player is playing Ladder or Training matches offline with a bNoviceMode difficulty.....
I don't think any new Inventory items can get added to the game in that case, but I wanted to leave that bit in somewhere just
in case somebody knows how to use a mutator in the Ladder/Training matches and wants to try them with UT2U1.
That has also been moved into PostBeginPlay, so the adjustment only happens once in the rare cases where it is even applicable.

Still a bit more testing to do before RC4 is ready, but it is close.....
blarg
[]KAOS[]Casey
Average
Posts: 30
Joined: Fri Mar 30, 2012 7:56 pm

Re: UT2U1 - Loathsomes UT Tweak

Post by []KAOS[]Casey »

Torchflame is a U1 light, the question is why they'd change the net update frequency really. I have no logical answer.
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: UT2U1 - Loathsomes UT Tweak

Post by MrLoathsome »

[]KAOS[]Casey wrote:Torchflame is a U1 light, the question is why they'd change the net update frequency really. I have no logical answer.
Indeed it is, and about the only maps I might expect to find it on, are various SP missions. *Although it could of course be used by any mapper.

It is puzzling as to why they felt the need to put that check in there at all. I don't know nothing about no mapping, but it seems like that value should
be set at the time the actor was being added to the map.

The real question is why was this was being checked for in the place that it was..... Wow. :ironic: :noidea
blarg
User avatar
Dr.Flay
Godlike
Posts: 3347
Joined: Thu Aug 04, 2011 9:26 pm
Personal rank: Chaos Evangelist
Location: Kernow, UK
Contact:

Re: UT2U1 - Loathsomes UT Tweak

Post by Dr.Flay »

It seems to me it allows for dynamic lighting/movement.
You could have a torch on a boat/mover.
What about using it as weapon ammo, or the flame on a projectile, or a Molotov-Cocktail ?
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: UT2U1 - Loathsomes UT Tweak

Post by MrLoathsome »

Dr.Flay wrote:It seems to me it allows for dynamic lighting/movement.
You could have a torch on a boat/mover.
What about using it as weapon ammo, or the flame on a projectile, or a Molotov-Cocktail ?
Here is what happens if you try to add a TorchFlame via a mutator:

Code: Select all

Warning: SpawnActor failed because class TorchFlame has bStatic or bNoDelete
You can't summon one either.

If a mapper was adding a torch on a boat/mover I am guessing it would have the boat/mover
as its base, and only actually be spawned once.

(Keep in mind, I don't know nothing about no maps....)
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: UT2U1 - Loathsomes UT Tweak - RC4

Post by MrLoathsome »

Bump. RC4 now available. See post #1.
blarg
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: UT2U1 - Loathsomes UT Tweak - RC4

Post by Higor »

Inspiration for optimization can come from the least expected places, I have deprecated the usage of DMMutator in Siege after seeing your conclusions on how bloated it is.
Post Reply