UT2U1 - Loathsomes UT Tweak - v2.0 Final

Search, find and discuss about Mutators!
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 -Unreal Actors in UT games..... Alpha/Beta/Test

Post by MrLoathsome »

papercoffee wrote:Do I understand it right ...this gem you are working on will merge UT with U1 in online play?
Or even offline at home?? What can the bog-standard common user expect?
I think it will...

As for what to expect, lots of things. Things you always thought should have worked before when you tried them, but they didn't.
They might work with this. Actually everything should work with this, as it is now.

The almost ready version of the next SwarmSpawner update, will just enhance it, Just need to get a good Readme file done for it
and organize/document a slew of various example ini files.

But just to be clear, you and everyone else should test the beta version of this in post 1 now, in any type of UT game, online or off.
Let me know if any errors. Post the relevant log file sections if there are any. Let me know if things seem any faster.

I must sleep now. I have been busy this week.

Check out this un-noticed thread I posted elsewhere with some details on how I fixed the SkaarjTroopers weapon issues if you are bored,

http://www.ecoop.tk/forum/16-114-1

Disregard the 2nd to the last line in that post, as this UT2U1 thingy fixed that problem.

I am going to have to update the BadNews mutator now to add back the SkaarjTrooper classes.
Maybe later. I need to sleep.
blarg
User avatar
Rakiayn
Masterful
Posts: 550
Joined: Fri Aug 28, 2009 3:33 pm

Re: UT2U1 -Unreal Actors in UT games..... Alpha/Beta/Test

Post by Rakiayn »

keep up the good work!
will test later
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: UT2U1 -Unreal Actors in UT games..... Alpha/Beta/Test

Post by JackGriffin »

I have this running now on my coop server. It's causing a lot of problems but that's because of my massive replacement code. Give me a day or two to remove a bunch of it and the server will run much smoother. In fact I might password my coop until I get it playing nicer.

Your simple code switch fixed all my skaarj problems too Loath.
So long, and thanks for all the fish
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: UT2U1 -Unreal Actors in UT games..... Alpha/Beta/Test

Post by Higor »

Netcode, just don't use Unreal I weapons.

What you can do, is subclass the weapons and rebuild them under TournamentWeapon one by one.
Then, get rid of the mutator's CheckReplacement functions and instead, choose the desired item equivalents yourself.

This goes back to 2005 on MissionTeamGame class, which is subclass of Unreali.TeamGame (ouch):

Code: Select all

enum EWeapType
{
	SoloUnreal,
	UTChance,
	SoloUT,
};
var() config EWeapType TipoDeItems;
var() config float ChanceDeItemsUT;
var localized string UnrealiWeapClass[48];	//Reemplazar estas armas
var class<Weapon> UnrealiWeapC[48];
var localized string UTWeapReplace[48];		//por estas.
var localized string UIWeapReplace[48]; //versiones UI
Here we specify what kind of equivalents we want for the base unrealI weapons, I didn't want to remake the weapons one by one so I simply grabbed an OLWeapons package just to see how it worked.

Code: Select all

function PreBeginPlay()
{
	local class<GameInfo> Upack;

	UPack = class<GameInfo>( DynamicLoadObject("UPak.UPakSinglePlayer", class'class',True));

	if (UPack != none)
		if (ClassIsChildOf(UPack, Level.DefaultGameType) )
			bUPak = True;

	if (bUPak)
	  UPakSCUBAclass = class<Pickup>(DynamicLoadObject("UPak.UPakScubaGear", class'Class'));

	Super.PreBeginPlay();
}
My UPak file was edited by myself from the RTNP cd, I don't really know how the h*** I managed to remove the DLL reference, but it worked after a few load/save tries between editors.
The UPak.dll is incompatible with UT 436.


Code: Select all

event PostBeginPlay()
{
	local FAlteradorMusical Alterador;
	local int i;
	local vector NewV;
	local LevelChangeTrigger LCT;

	i = 0;
	ForEach AllActors (class'FAlteradorMusical', Alterador)
		if (Alterador.Master)
		{
			Alteradores[i] = Alterador;
			i++;
		}
	Super.PostBeginPlay();
	if ( Level.Title == "Ending Sequence" )
	{
		NewV.X = 642;
		NewV.Y = -2107;
		NewV.Z = 29000;
		LCT = Spawn(class'LevelChangeTrigger',,,NewV);
		LCT.URL = "DuskFalls";
	}
}
Keeping Unreal and expansion chained together.

Code: Select all

event InitGame( string Options, out string Error )
{
	MutatorClass = class'Fernando.MissionFerMutator';
	Super.InitGame( Options, Error);
	MonsterMaker = Spawn( class'FV_MonsterMaker');
	LoadWeapons();
}
Dynamic monstermaker, never got to finish it, it was my attempt at increasing monstercount in a way it doesn't get too obvious.

Code: Select all

function int ReduceDamage(int Damage, name DamageType, pawn injured, pawn instigatedBy)
{
	local int reducedDamage;

	if (injured.Region.Zone.bNeutralZone)
		return 0;
	
	if ( instigatedBy == None )
		return Damage;

	Damage *= instigatedBy.DamageScaling;

	if (instigatedBy != injured) 
	{
		if ( InstigatedBy.bIsPlayer && !InstigatedBy.IsA('ScriptedPawn'))
			if ( injured.bIsPlayer && !injured.IsA('ScriptedPawn'))
			{
				if (Injured.PlayerReplicationInfo.Team != instigatedBy.PlayerReplicationInfo.Team)
					return Damage * 0.9;
				return (Damage * FriendlyFireScale);
			}
		else if (injured.bIsPlayer)
			return (Damage * ((996.0 + float(Dificultad)) / 1000.0));
	}
	return Damage;
}
All players spawn in the same team, and damage has some sort of scaling against players (difficulty goes from 0 to 255 after all).
Don't remember why i used an alternate variable...


Now to IsRelevant Logic, we don't even use the mutators to replace weapons, it's best not to load them at all, use the predefined arrays instead and process each thing individually:

Code: Select all

	if ( Other.IsA('SkaarjTrooper') && (SkaarjTrooper(Other).WeaponType != none) )
		ReemplazarUiSkaarj( SkaarjTrooper(Other) );
Do weapon replacement here on skaarj trooper classes, right before they get to spawn the weapon itself.

Code: Select all

	if (Other.IsA('Decoration') )
		Redecorate(Decoration(Other));
Do item and weapon replacement here on Decorations

Code: Select all

	if (Other.IsA('Inventory'))
	{
		ReplaceInv( Other);
	}
//Run the final inventory replacement here, do it specially for weapons and ammo that aren't 'Tournament'


Back to more game logic:

Code: Select all

event PostLogin( playerpawn NewPlayer )
{
	local Pawn P;

	Super.PostLogin( NewPlayer);

	if ( Level.DefaultGameType != class'VRikersGame' )
	{
		if ( MonsterMaker == none )
			MonsterMaker = Spawn( class'FV_MonsterMaker');
		if ( ++CurPlayers >= AllTimePlayers )
			MonsterMaker.IncreaseMonsters(0.4, Dificultad);
	}

}
Adding monsters every time the maximum amount of players ever increased.

Code: Select all

	if (Level.Title ~= "Chizra-Nali Water God" || 
		Level.Title ~= "Templo del Dios Marino Chizra-Nali")
		if (Other.Name == 'Mover118')
		{	Mover(Other).InitialState = 'BumpOpenTimed';
			Mover(Other).GotoState('BumpOpenTimed');
		}
	if (Level.Title ~= "Skaarj Generator" ||
		Level.Title ~= "Generador Skaarj")
		if (Other.Name == 'Teleporter1')
			Teleporter(Other).URL = "extremedark#dark?peer";
Add these two checks somewhere too, they'll enable a secret in the Chizra map, and fix the skaarj generator map (destruction map has a faulty transporter actor.


Code: Select all

function bool SkaarjOwner(weapon Arma)
{
	local pawn aPawn;
	local string IDNum;
	local bool bSuccess;

	aPawn = Level.PawnList;
	IDNum = String(Rand(1000));
	bSuccess = False;

	while ( aPawn != none )
	{
		if (aPawn.SpecialMesh == IDNum)
			aPawn = none;
		if (aPawn.IsA('SkaarjTrooper') && SkaarjTrooper(aPawn).WeaponType != none )
//			if (VSize(Arma.Location - aPawn.Location) < 80  && aPawn.Weapon == none)
			if (Arma.Location == aPawn.Location && aPawn.Weapon == none)
			{	bSuccess = True;
				Arma.Touch(aPawn);
				aPawn = none;
			}
		aPawn.SpecialMesh = IDNum;
		aPawn = aPawn.NextPawn;
	}
	return bSuccess;
}
Fuuuuu! this is slow as heck, it's a double check on skaarj weapons (done on weapons themselves) you should reformulate this in a better way.

Code: Select all

function PowerUp( Weapon Disp)
{
	local int Influencia;
	local float FinalDecision;

	if ( Disp == none )
		return;
	if ( Disp.Tag == 'BePlayer' )
		return;
	Disp.bCanThrow = True;
	if ( (PlayerPawn(Disp.Owner) != none) || Level.DefaultGameType==class'VRikersGame')
		return;
	Influencia = 100 + int(Dificultad) + int(EscalaDeVida * 100);
	FinalDecision = (RandRange(-0.15, 0.75) + float(Influencia)/1000);

	if (FinalDecision < 0.20)
		return;
	else if (FinalDecision < 0.40)
		Disp.SetPropertyText("PowerLevel", "1");
	else if (FinalDecision < 0.60)
		Disp.SetPropertyText("PowerLevel", "2");
	else if (FinalDecision < 0.80)
		Disp.SetPropertyText("PowerLevel", "3");
	else
		Disp.SetPropertyText("PowerLevel", "4");
}
Those skaarj troopers will now enhanced dispersion pistols now!



That's my 2(?) cents for now.
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 -Unreal Actors in UT games..... Alpha/Beta/Test

Post by papercoffee »

Sooooo ...I have installed it and activated the mutator ... nothing happened so far ...what exactly should I see there?
Do I have to use a map where Unreal weapons are placed?
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 -Unreal Actors in UT games..... Alpha/Beta/Test

Post by MrLoathsome »

papercoffee wrote:Sooooo ...I have installed it and activated the mutator ... nothing happened so far ...what exactly should I see there?
Do I have to use a map where Unreal weapons are placed?
On default UT maps, nothing is exactly what you should see. Possibly things are running faster, but unlikely that you would really notice that much.

Several ways to see it in action. Either summon some Unreal weapons, or have them added via some type of mutator.

For a quick test, you can try the following, if you have Unreal or UnrealGold available.

1. Copy the map file DmAriza.unr into your UT Maps folder.
2. Fire up UT practice game on the DmAriza map with this mutator loaded.

All the Unreal weapons, pickups and guns will be there and working fine.

As Higor mentioned, for any online use you will want to replace the UnrealI and UnrealShare weapons with their OLweapons counterparts.
With this running, you can now have a nice simple straightforward checkreplacement mutator, that will replace UT guns with either default
Unreal guns or the OLweapons. Mix and match em any way you want.

Some good info there Higor, but I suspect some of that can be accomplished even simpler now if you have this little thing running as 1st mutator.
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 -Unreal Actors in UT games..... Alpha/Beta/Test

Post by papercoffee »

MrLoathsome wrote:
papercoffee wrote:Sooooo ...I have installed it and activated the mutator ... nothing happened so far ...what exactly should I see there?
Do I have to use a map where Unreal weapons are placed?
On default UT maps, nothing is exactly what you should see. Possibly things are running faster, but unlikely that you would really notice that much.
Can it be that even bot react faster??
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: UT2U1 -Unreal Actors in UT games..... Alpha/Beta/Test

Post by JackGriffin »

There is obviously an increase in aggression, speed, and overall intelligence in the monster classes too. I wonder why that is (but it's surely there)?
So long, and thanks for all the fish
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 -Unreal Actors in UT games..... Alpha/Beta/Test

Post by papercoffee »

Normally I can win "easily" against a godlike bot ...but with this mutator running ...even a masterful bot can screw me up now.
it's interesting but unexpected.
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 -Unreal Actors in UT games..... Alpha/Beta/Test

Post by MrLoathsome »

I have been noticing that as well, and the only explanation I can come up with for it at this point is that by eliminating that
CRAP from the Base DMMutator class, has actually reduced the load on the engine enough so that the Bot/Monster AI code is
now running faster.

Just a wild guess there, but what the hell else could it be?

This does NOTHING other than hijack the BaseMutator, and eliminate those replacements I thought shouldn't be there.
That is it. My log files, both in offline and online tests are just nice and clean.

In testing the last few days, 5 default bots in the average to skilled range, and 1 each of the 5 skaarj with weapons were just
destroying me. Never thought I would have to add ZarkAssaultRifle, cherrybomb gun and ZoomInstagib to my server
just to keep up with only FIVE troopers. But that is what I did yesterday. (Plays pretty good if players have better guns.)

*Edit. This caused no issues with my little basic standard type checkreplacement mutator I am using to add those guns.
UTSniper replaced by ZarkAssault, UT Pulsegun replaced by CherryBomb and UT Shock replaced by the ZoomShockRifle. (Instagib)

And the 5 Troopers are using U1 weapons. :shock: :wtf:
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 -Unreal Actors in UT games..... Alpha/Beta/Test

Post by Dr.Flay »

Would BotZ bypass this speedup ?

It occurs to me, that this would also be useful with Unreal+UT server IpDrv modification http://www.ut99.org/viewtopic.php?f=33&t=4619
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 -Unreal Actors in UT games..... Alpha/Beta/Test

Post by papercoffee »

I like this side effect ...UT offline play is now challenging again. :tu:
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 -Unreal Actors in UT games..... Alpha/Beta/Test

Post by MrLoathsome »

I don't think this would effect BotZ at all.
*Edit. Or it might.... If default bots and scripted pawns are now processing better (faster?), botz or anything else running in UT should also..... I think. :rock:

The speedup is not any kind of speedup in the gameplay. It is eliminating
a bunch of unnecessary checks in the default Botpack code that slows down processing of everything at an even lower level
in the script. Way to early to even think about how this might function, or not, with 3rd party stuff that has dll's.
It should work fine, but depending upon how the 3rd party extension does things, it might not.... Ain't got that far yet.

This will not be the final version of this. This version did leave out one little bit of DMMutator that should probably still be
in there. Did not notice the absence in testing, but putting it back in todays testing didn't break anything, so that is back in.

Been doing a lot of testing here on it. Only one error has cropped up so far. And it only happens in online coop games
that are running the oldskool coopgame2 or anything else that extends that.

Jack pointed it out to me. I missed it because of a DERP in my server config, but he was right.
(Thanks a lot Jack. You just made me spend 2 hours trying to read OldSkool source code tonight. :help: :tongue: )

There are only 3 or 4 server admins on the planet that this will effect, but I am gonna try an fix it before I release the next version.
Me and Jack are 2 of those admins, so I am gonna get that fixed one way or another. It must be fixed. It will be fixed.

The error(s) only show up server-side, and only on coop servers.
So far. Have tested it with my new gametypes, coopgame2 variants and default DeathMatchPlus online, but not with MH, BT or any other
3rd party gametypes.

The error log Jack showed me from this version, and the one I recreated on my own servers after I corrected my admin DERP, showed the same thing. Just 2 or 3 accessed nones
happening in the BaseMutators checkreplacement function. (2 or 3 statements where it happens. LOTS of lines in the servers log file..... :? )

Tonights dev. version, is only cranking out 1 accessed none. 1 for every single freaking actor in the map. LOL (And only in coopgame2 games. )

I now have the issue isolated to 1 statement in a function that now is under 20 statements. But still trying to figure out which one. :loool: :noidea

Posting the log file off the coop server with these errors would be pointless, so instead I will post a log file section from a game where I was running
my development copy of this thing, with it logging a line for every single actor that is on the map, or spawned into the game via a mutator.

Note: I am not asking for an help with this yet, just wanted to post this log file as a teaser for what the next releases of the Mega (BP5) gametypes and SwarmSpawner
can do in combination with this thing. Look close at it if you are bored. Also had the swarmspawner logging some detailed info regarding what it was doing in there, detailing
all the classes involved. I did not edit this bit of log file. It is 1 whole game.

It is big, but just because of the logging being done.

Errors you would expect are just not there.

But I want to post this log as an example of how many times this BaseMutator CheckReplacement code runs in a game. It runs A LOT.
And as mentioned, all the stuff I yanked out of there is freaking pointless 99.9% of the time.

...
CRAP.

Damn thing is too big with all the logging to put in a Spoiler. See attached if you are interested.

Well CRAP again.
@ admins here. WTF is this crap? "The extension log is not allowed."

Computers are fun. "The extension txt is not allowed."

I guess I will try to zip the goddamn thing, and if that doesn't work, nobody gets to see it.

That worked. *Welcome to my blog. :omfg:

**Edit2 - Ripping out some stale code posted here. The brief source code is included in the download on post 1.

Also. This post is still too long.
Attachments
UnrealTournament_UT2U1v0.4Test.zip
Test log file
(13.77 KiB) Downloaded 143 times
Last edited by MrLoathsome on Fri Jun 14, 2013 3:16 am, edited 2 times in total.
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 -Unreal Actors in UT games..... Alpha/Beta/Test

Post by papercoffee »

MrLoathsome wrote: Well CRAP again.
@ admins here. WTF is this crap? "The extension log is not allowed."

Computers are fun. "The extension txt is not allowed."

I guess I will try to zip the goddamn thing, and if that doesn't work, nobody gets to see it.
To make it short ...only .zip and .rar are allowed.
Don't ask me why, the Boss decided this.
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 -Unreal Actors in UT games..... Alpha/Beta/Test

Post by MrLoathsome »

Good answer. And I know why, it just annoyed me momentarily. LOL

Back on topic. I am starting to think that the answer for that one coop error, is either a patch for Oldskool, or perhaps coopgame3.
blarg
Post Reply