XC_Engine add-ons-XC_MonsterHunt-NavAdder stuff

User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

XC_Engine add-ons-XC_MonsterHunt-NavAdder stuff

Post by sektor2111 »

Intro:
XC_Engine by Higor hooktestvX aka v19 is able to bring the most wanted Voodoo Magic by replacing bad function from a common actor into another one - changed. As result we can replace original Engine stuff for a more sanitized game-server. We have "a few" errors to solve which I'm gonna quote right from source-code.

This list >>
  • log (Self.Name@found XC_Engine Version@NXC$". Proceed tweaks...");
    class 'BigBioGel'.Default.RemoteRole = ROLE_SimulatedProxy;
    ReplaceFunction( class 'GameInfo', Class 'XC_GameInfo', 'ScoreKill', 'ScoreKill' );
    ReplaceFunction( class 'GameInfo', Class 'XC_GameInfo', 'Killed', 'Killed' );
    ReplaceFunction( class 'Decoration', Class 'XC_Decoration', 'ZoneChange', 'ZoneChange' );
    ReplaceFunction( class 'Decoration', Class 'XC_Decoration', 'Destroyed', 'Tw_Destroyed' );
    ReplaceFunction( class 'Decoration', Class 'XC_Decoration', 'skinnedFrag', 'Tw_skinnedFrag' );
    ReplaceFunction( class 'Decoration', Class 'XC_Decoration', 'Frag', 'Tw_Frag' );
    ReplaceFunction( class 'Weapon', Class 'XC_Weapon', 'CheckVisibility', 'CheckVisibility' );
    ReplaceFunction( class 'TranslocStart', Class 'XC_TranslocStart', 'SpecialHandling', 'SpecialHandling' );
    ReplaceFunction( class 'JumpSpot', Class 'XC_JumpSpot', 'SpecialCost', 'SpecialCost' );
    ReplaceFunction( class 'JumpSpot', Class 'XC_JumpSpot', 'SpecialHandling', 'SpecialHandling' );
    ReplaceFunction( class 'Pickup', Class 'XC_Pickup', 'UsedUp', 'Tw_UsedUp' );
    ReplaceFunction( class 'Flashlight', Class 'XC_FlashLight', 'Tick', 'Tw_Tick','Activated' );
    ReplaceFunction( class 'Eightball', Class 'XC_Eightball', 'Tick', 'Tw_AltFireTick', 'AltFiring' );
    ReplaceFunction( class 'Eightball', Class 'XC_Eightball', 'Tick', 'Tw_FireTick', 'NormalFire' );
    ReplaceFunction( class 'Eightball', Class 'XC_Eightball', 'BeginState', 'Tw_BeginState', 'FireRockets' );
    ReplaceFunction( class 'UT_Eightball', Class 'XC_UT_Eightball', 'BeginState', 'FireRockets_BeginState', 'FireRockets' );
    ReplaceFunction( class 'ShockProj', Class 'XC_ShockProj', 'SuperExplosion', 'Tw_SuperExplosion' );
    ReplaceFunction( class 'RazorBladeAlt', Class 'XC_RazorBladeAlt', 'Tick', 'Flying_Tick', 'Flying' );
    ReplaceFunction( class 'BruteProjectile', Class 'XC_BruteProjectile', 'BlowUp', 'Tw_BlowUp', 'Flying' );
    ReplaceFunction( class 'Pawn', Class 'XC_Pawn', 'AdjustHitLocation', 'Tw_AdjustHitLocation' );
    ReplaceFunction( class 'NaliRabbit', Class 'XC_NaliRabbit', 'PickDestination', 'Tw_PickDestination', 'Evade' );
    ReplaceFunction( class 'ScriptedPawn', Class 'XC_ScriptedPawn', 'AttitudeTo', 'AttitudeTo' );
    ReplaceFunction( class 'ScriptedPawn', Class 'XC_ScriptedPawn', 'SeePlayer', 'SeePlayer' );
    ReplaceFunction( class 'ScriptedPawn', Class 'XC_ScriptedPawn', 'FireProjectile', 'Tw_FireProjectile' );
    // ReplaceFunction( class 'ScriptedPawn', Class 'XC_ScriptedPawn', 'ChooseAttackMode', 'ChooseAttackMode', 'Attacking' );
    ReplaceFunction( class 'ScriptedPawn', Class 'XC_ScriptedPawn', 'ChooseTeamAttackFor', 'ChooseTeamAttackFor' );
    ReplaceFunction( class 'ScriptedPawn', Class 'XC_ScriptedPawn', 'Killed', 'Killed' );
    ReplaceFunction( class 'ScriptedPawn', Class 'XC_ScriptedPawn', 'SetHome', 'StartUp_SetHome', 'Startup' );
    ReplaceFunction( class 'ScriptedPawn', Class 'XC_ScriptedPawn', 'MeleeDamageTarget', 'Tw_MeleeDamageTarget' );
    ReplaceFunction( class 'ScriptedPawn', Class 'XC_ScriptedPawn', 'StartRoaming', 'Tw_StartRoaming' );
    ReplaceFunction( class 'ScriptedPawn', Class 'XC_ScriptedPawn', 'TakeDamage', 'Patroling_TakeDamage', 'Patroling' );
    ReplaceFunction( class 'ScriptedPawn', Class 'XC_ScriptedPawn', 'TakeDamage', 'Guarding_TakeDamage', 'Guarding' );
    ReplaceFunction( class 'ScriptedPawn', Class 'XC_ScriptedPawn', 'TakeDamage', 'Threatening_TakeDamage', 'Threatening' );
    ReplaceFunction( class 'ScriptedPawn', Class 'XC_ScriptedPawn', 'Timer', 'Charging_Timer', 'Charging' );
    ReplaceFunction( class 'ScriptedPawn', Class 'XC_ScriptedPawn', 'Timer', 'TacticalMove_Timer', 'TacticalMove' );
    ReplaceFunction( class 'ScriptedPawn', Class 'XC_ScriptedPawn', 'PlayCombatMove', 'XC_PlayCombatMove' );
    ReplaceFunction( class 'ScriptedPawn', Class 'XC_ScriptedPawn', 'PickDestination', 'TacticalMove_PickDestination', 'TacticalMove' );
    ReplaceFunction( class 'ScriptedPawn', Class 'XC_ScriptedPawn', 'BeginState', 'TacticalMove_BeginState', 'TacticalMove' );
    ReplaceFunction( class 'BabyCow', Class 'XC_BabyCow', 'TakeDamage', 'Grazing_TakeDamage', 'Grazing' );
    ReplaceFunction( class 'BabyCow', Class 'XC_BabyCow', 'PickDestination', 'Grazing_PickDestination', 'Grazing' );
    ReplaceFunction( class 'SkaarjTrooper', Class 'XC_SkaarjTrooper', 'BeginState', 'StartUp_BeginState', 'StartUp' );
    ReplaceFunction( class 'SkaarjTrooper', Class 'XC_SkaarjTrooper', 'SetHome', 'ST_SetHome', 'StartUp' );
    ReplaceFunction( class 'SkaarjTrooper', Class 'XC_SkaarjTrooper', 'PlayMovingAttack', 'Tw_PlayMovingAttack' );
    ReplaceFunction( class 'SkaarjTrooper', Class 'XC_SkaarjTrooper', 'PlayFiring', 'Tw_PlayFiring' );
    ReplaceFunction( class 'Pupae', Class 'XC_Pupae', 'PlayMeleeAttack', 'Tw_PlayMeleeAttack' );
    ReplaceFunction( class 'Nali', Class 'XC_Nali', 'Killed', 'Tw_Killed' );
    ReplaceFunction( class 'Nali', Class 'XC_Nali', 'AdjustHitLocation', 'Tw_AdjustHitLocation' );
    ReplaceFunction( class 'Titan', Class 'XC_Titan', 'SpawnRock', 'Tw_SpawnRock' );
    ReplaceFunction( class 'Titan', Class 'XC_Titan', 'PunchDamageTarget', 'Tw_PunchDamageTarget' );
    ReplaceFunction( class 'Titan', Class 'XC_Titan', 'SlapDamageTarget', 'Tw_SlapDamageTarget' );
    ReplaceFunction( class 'Warlord', Class 'XC_Warlord', 'PlayRangedAttack', 'Tw_WPlayRangedAttack' );
    ReplaceFunction( class 'Warlord', Class 'XC_Warlord', 'PlayMovingAttack', 'Tw_WPlayMovingAttack' );
    ReplaceFunction( class 'Mercenary', Class 'XC_Mercenary', 'SprayTarget', 'Tw_SprayTarget');
    ReplaceFunction( class 'Brute', Class 'XC_Brute', 'PlayRangedAttack', 'Tw_PlayRangedAttack');
    ReplaceFunction( class 'Gasbag', Class 'XC_Gasbag', 'PlayRangedAttack', 'Tw_PlayRangedAttack');
    ReplaceFunction( class 'Gasbag', Class 'XC_Gasbag', 'SpawnBelch', 'SpawnBelch');
    ReplaceFunction( class 'GiantGasbag', Class 'XC_GiantGasbag', 'SpawnBelch', 'SpawnBelch');
    ReplaceFunction( class 'Queen', Class 'XC_Queen', 'SpawnShot', 'SpawnShot');
    ReplaceFunction( class 'SkaarjWarrior', Class 'XC_SkaarjWarrior', 'SpawnTwoShots', 'SpawnTwoShots');
    ReplaceFunction( class 'Tentacle', Class 'XC_Tentacle', 'PlayRangedAttack', 'PlayRangedAttack');
    ReplaceFunction( class 'SkaarjBerserker', Class 'XC_SkaarjBerserker', 'WhatToDoNext', 'Tw_WhatToDoNext');
    log (Self.Name@ - Tweaks Done!);
has been implemented into a mutator which is in testing/working stage in purpose to fix several things (bad projectiles, bad monster action, Decorations crappy spam etc.; the goal is cleaning up toilette messages which default UT is doing and without to replace a lot of things using "ReplaceWith". These are possible by only using XC_Engine stuff v19+ else this thing will not work.
As long as I don't see all the time functions from projectiles tweaked well due to Net codes involved I was heading to ruin some hard-coded projectiles which looks ugly in Net games. As example is old Eightball with SeekingRocket - you cannot define AltProjectileClass because weapon refers to a class declared not at "defaultproperties" - stupid move. In this case function firing bad class will be attacked for firing another class (a hybrid projectile looking better On-Line). Aside firing function is wrapped in case of a projectile swallowed by some BSP or other thing causing a null access to a NON fired projectile - the same is UT_Eightball.

Thoughts:
Due to my job and the rest of things taking my brain space I think I forgot some stuff and I want to listen at some proposals toward these fixes. We don't have to forget that some Monsters are using modified functions for firing projectiles, so Net Stuff will involve a bit of work for each subclass abstract eg: SkaarjWarrior.uc - function "SpawnTwoShots" - in case of bad projectile will fire better ones. As you can see I'm trying to address General bad stock stuff and not a single target (game-type).
If we can debate other custom stuff without causing dependencies I listen proposals... I won't nominate examples of errors to not initialize some storm as long as some coders think are OK but they are not, and neither interested to finish their work.

Edit: Releasing something: XC_MonsterHunt >> https://goo.gl/wuCQFo
Edit2 May 28 2018: A conformed update in package XC_MonsterHunt_1_02.zip is available.
Last edited by sektor2111 on Mon May 28, 2018 11:51 am, edited 5 times in total.
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: XC_Engine add-ons

Post by sektor2111 »

Hmmm, I suspect that I have caused a sort of brainstorming making people to get stuck thinking - or not. If not, let's move toward. When this version will be ready we can speak about this mutator MH version. Why separate ?
- Because it will be causing MH dependencies which a DM server doesn't need;
- Because Even functions from default MH can be changed in run-time getting rid of what MH does + briging RazorJack back in game and/or a [quadsh!t] oops quadshot - Flak because if it's held by a monster looks as a Flak and it doesn't work;
- rewriting Shadow formula and moving it to Player not ticking server with null craps;
- rewriting SetPawnDifficulty calls into CheckReplacement a single call;
- adding PickupMessges as in BotPack stuff - Botpack is a dependent file anyway;
- Speeding up CountMonsters and CountHunters using the newer iterator by Higor, etc.
- etc. Continuing with Amplifier and OsPowerUp forgotten stories...
Yes, you have guessed well, a MH revolution is about to come in XCGE v19 if anyone wants an old Unreal feeling in MH.
But let's see Engine finished first.

Edit:
The mostly is an idea or a fix so to speak. I found MH stuff with Monsters firing SeekingRocket or UT_SeekingRocket which nobody noticed as being "Seekers". Actually people mapping them for sure doesn't know why they don't track anyone only reacting as a normal rocket, aside SeekingRocket (old version has a crappy Net code) sometimes cannot be seen that well. I might think to solve this problem with changes to setup a Queen a la Higor (I like that very much) + some real seeking rockets projectiles making the Queen to be a beautiful and powerful animal and even forcing some team-work around hunters... If you don't like this fix, I'll do that for me because I don't have any problems with monsters (they do have problems with me) so it will be let's say... configurable ON/OFF seeking.
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: XC_Engine add-ons

Post by sektor2111 »

Ahah, I have a morning type recall about some crappy stuff.
Boulder whatever with Mesh changed and almighty IntroDude will gonna get kicked in eye using "Replacefunction" as welll. Wheew, might worth writing a few lines for creatures without mesh "Fighter".
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: XC_Engine add-ons

Post by sektor2111 »

IntroDude IntroBoss and the rest of IntroDick problems have been solved using another way because that animation is being called in state code. Else Other tweaks have been added

  • ScriptWarning: Addon ... Addon0 (Function IpToCountry.Addon.Tick:0060) Accessed None
    ScriptWarning: Slith ... Slith10 (Function UnrealShare.Slith.ClawDamageTarget:0021) Accessed None
    ScriptWarning: Slith ... Slith15 (Function UnrealShare.Slith.ClawDamageTarget:0021) Accessed None
    ScriptWarning: Slith ... Slith57 (Function UnrealShare.Slith.ClawDamageTarget:0021) Accessed None
    ScriptWarning: SkaarjLord ... SkaarjLord9 (Function UnrealShare.Skaarj.ClawDamageTarget:0025) Accessed None
    ScriptWarning: SkaarjLord ... SkaarjLord15 (Function UnrealShare.Skaarj.SpinDamageTarget:0025) Accessed None
    ScriptWarning: SkaarjLord ... SkaarjLord27 (Function UnrealShare.Skaarj.ClawDamageTarget:0025) Accessed None
    ScriptWarning: SkaarjLord ... SkaarjLord61 (Function UnrealShare.Skaarj.SpinDamageTarget:0025) Accessed None
    Log: Breadth path list overflow from Spawnpoint77
Path List is Higor's problem as long as that's a Log not ScriptLog...
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: XC_Engine add-ons

Post by sektor2111 »

Bumping only for showing a fix for garbage IntroCraps used here and there. It is not a need for XC_Engine but because I dropped code into the mutator and can be used even normally let's see how do looks my tweak:
Call from PrebeginPlay this one:

Code: Select all

function SolveIntroBullShit()
{
	local Decoration StupidDeco;
	local int NumCraps;
	local DecoControl DC;

	foreach AllActors (class'Decoration',StupidDeco)
	{
		if ( StupidDeco.Class == Class 'Botpack.IntroDude' )
		{
			if ( StupidDeco.Mesh != LodMesh'Botpack.IntroDude' )
			{
				NumCraps++;
				DC=Spawn(class'DecoControl',StupidDeco);
				if ( DC != None && !DC.bDeleteMe )
				{
					DC.Mesh = StupidDeco.Mesh;					//copy this until will run the crappy Begin Sequence
					StupidDeco.Mesh=LodMesh'Botpack.IntroDude';	//Put back the default - I'm sorry, No more shit in here
					StupidDeco.Tag = '';
					StupidDeco.Disable('Trigger');
					StupidDeco.Disable('UnTrigger');	//Soon DecoControl will do the right thing after running original animation.
				}
			}
		}
		else if ( StupidDeco.Class == Class 'Botpack.IntroBoss' )
		{
			if ( StupidDeco.Mesh != LodMesh'Botpack.IntroBoss' )
			{
				NumCraps++;
				DC=Spawn(class'DecoControl',StupidDeco);
				if ( DC != None && !DC.bDeleteMe )
				{
					DC.Mesh = StupidDeco.Mesh;					//copy this until will run the crappy Begin Sequence
					StupidDeco.Mesh=LodMesh'Botpack.IntroBoss';	//Put back the default - I'm sorry, No more dumbness here
					StupidDeco.Tag = ''; //Because it is screwed will not trigger it with any matter
					StupidDeco.Disable('Trigger');
					StupidDeco.Disable('UnTrigger');	//Soon DecoControl will do the right thing after running original animation.
				}
			}
		}
	}
	if ( NumCraps > 0 )
	{
		if ( NumCraps == 1 )
			log(NumCraps@"Intro... Guy type Deco screwed has been solved.");
		else
			log(NumCraps@"Intro... Guys types Deco screwed have been solved.");
	}
}
Then DecoControl (like other similar things) will guard problem without additional iterators as follows:

Code: Select all

class DecoControl expands Actor;

event PostBeginPlay()
{
	LifeSpan=1.50; //Will wait animation before dying
}

event Destroyed() //I'm saying good bye to all nice people
{
	if ( Owner != None )
		Owner.Mesh = Mesh; //Now put Mapping crap back
	Super.Destroyed();
}

defaultProperties
{
	bGameRelevant=True
	bHidden=True
	RemoteRole=ROLE_None
}
And we have a simple log rather than 37 lines mooing in server because engine has been forced to run nothing:

  • ScriptLog: Mutators NsUTw.NsUTw,LightningTw_4.DynLight,LessTele2.LessTele
    ScriptLog: Add mutator NsUTw.NsUTw
    ScriptLog: NsUTw0 is looking for XC_Engine...
    ScriptLog: NsUTw0 found XC_Engine Version 19. Proceed tweaks...
    ScriptLog: 37 Intro... Guys types Deco screwed have been solved.
    ScriptLog: NsUTw0 - Tweaks Done!
    ScriptLog: Add mutator LightningTw_4.DynLight
    ScriptLog: Light Notify Initialized...
    ScriptLog: DynLight0 version 4.00 has initialized Lighting Tweaks...
    ScriptLog: Add mutator LessTele2.LessTele
Of course Boulder has been tweaked with ReplaceFunction (it was PostBeginPlay).
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: XC_Engine add-ons

Post by sektor2111 »

Keep going a while...
I was thinking (taking past in account - imagination in those times ) how do looks original MonsterHunt game-type with SkaarjOfficer + "RazorJack" properly armed and the rest too. Looks like without creating dependencies with MH this problem can be solved having monster armed with "old stuff" by rewriting ReplaceWith not as in 2014-2015 but as in 2016, probably for ON-Line mutator has to be in full priority before to see any default replacement messing up.
[attachment=0]V503.png[/attachment]
They are nice in 2016...
I was testing local some codes:
Main mutator line:
NsUTw wrote:

Code: Select all

...
ReplaceFunction( class 'Mutator', Class 'XC_Mutator', 'ReplaceWith', 'Tw_ReplaceWith' );
...
Then we have the virtual Mutator with a tweaked one replacement (and without a different size :noidea - and without to call other function because will crash the travel... :| ).
XC_Mutator wrote:

Code: Select all

/* ReplaceWith()
Call this function to replace an actor Other with an actor of aClass.
*/
function bool Tw_ReplaceWith(actor Other, string aClassName)
{
	local Actor A;
	local class<Actor> aClass;

	if ( Inventory(Other) != None && (Other.Location == vect(0,0,0)) )
		return false;
//==== Stupid hack for a stupid typo crap
	if ( aClassName == "MonsterHunt.OLRajorjack") //they use only name and not file
		aClassName = "MonsterHunt.OLRazorJack";
//====
	aClass = class<Actor>(DynamicLoadObject(aClassName, class'Class',True)); //yes, might fail
	if ( Weapon(Other) != None && Other.Instigator != None && Other.Instigator.PlayerReplicationInfo == None ) //Main test
	{
		if ( aClass != None ) //If we have what we need
		{
			Weapon(Other).SetOwner(Other.Instigator);
			Weapon(Other).LifeSpan = 0.15; //Do not destroy that fast - we need it (or not ?)
			Other.Instigator.Weapon = None;
			A = Spawn(aClass,Other.Owner,Other.tag,Other.Location,Other.Rotation);
			if ( Weapon(A) != None )
			{
				Other.Instigator.bIsPlayer = True; //using Epic trash to not ruin garbage from under bed
				Weapon(A).RespawnTime = 0; //This won't respewn
				A.Touch(Other.Instigator); //Love it
				Other.Instigator.bIsPlayer = False; //remove dump properly
			}
			Goto EndReplacement; //And Finish HIM !
		}
	}
	if ( aClass != None ) //the rest
		A = Spawn(aClass,Other.Owner,Other.tag,Other.Location,Other.Rotation);
	else
		log ( "Replacement unable to load >>"@aClassName ); //log a bit
	if ( Inventory(Other) != None )
	{
		if ( Inventory(Other).MyMarker != None )
		{
			Inventory(Other).MyMarker.markedItem = Inventory(A);
			if ( Inventory(A) != None )
			{
				Inventory(A).MyMarker = Inventory(Other).MyMarker;
				A.SetLocation(A.Location 
					+ (A.CollisionHeight - Other.CollisionHeight) * vect(0,0,1));
				Inventory(A).bRotatingPickup=Inventory(Other).bRotatingPickup; //Take in account
				Inventory(A).bFixedRotationDir=Inventory(Other).bFixedRotationDir;
			}
			Inventory(Other).MyMarker = None;
		}
		else if ( A.IsA('Inventory') )
		{
			Inventory(A).bHeldItem = Inventory(Other).bHeldItem; //These should be examined well
			Inventory(A).Respawntime = Inventory(Other).RespawnTime;
			if ( !Level.bStartUp ) //Um...
			{
				Inventory(A).RemoteRole = ROLE_DumbProxy;
				Inventory(A).bCollideWorld = True;
				Inventory(A).Velocity.Z = RandRange(250,301);
				Inventory(A).Velocity = VRand() * RandRange(100,201);
				Inventory(A).SetPhysics(PHYS_Falling);
				Inventory(A).GotoState('Pickup','Dropped');
			}
		}
	}
	if ( A != None )
	{
		A.event = Other.event;
		A.tag = Other.tag;
		A.RotationRate = Other.RotationRate; //+ rotation
		return true;
	}
EndReplacement:
	return false;
}
LOL :lol2:
Attachments
V503.png
User avatar
SilverSound
Adept
Posts: 341
Joined: Fri Nov 06, 2015 10:12 am
Personal rank: Curious
Location: St. Cloud, Florida

Re: XC_Engine add-ons

Post by SilverSound »

You and higor have done a lot over the years with this. It's amazing to see we are getting to the level of fixing the games problems. I'm excited to see what this can do for UT in the comming months - years!

Maybe we will have a flawless game?! :ironic:

Though that's obviously super optimistic thinking.

Let me know if you need specific testing done. I wouldn't mind helping.
"Woah what?! I wish I was recording that...."
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: XC_Engine add-ons

Post by sektor2111 »

SilverSound wrote:Maybe we will have a flawless game?! :ironic:
Probably pretty closer...
At this moment I was rewriting some stuff for Navigation aids by doing other stuff and calling it, still have travel crashes at this point... but I'm hoping to be solved, else I have to write another trashes...
The rest of flaws are directly done by clueless users unable to figure an ass from their logs being to dumb for a 16 years old stupid thing. Ironically or not I was playing one by one 4-5 rocket matches with 0 Accessed Nones. The trivia, Mr. Flakson and the rest of Skaarj types participated at party with no issues :tongue: .
Okay I might wanna insert old Bots tweaking here an there... but I think special handling has to be tested because those idiots doesn't know ImpactJump and TranslocateToTarget things or I really might drop them away because are useless in Bot maps.
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: XC_Engine add-ons

Post by sektor2111 »

Meh... while the rest of things keep running I was playing a few matches (MH). I'm not sure how much you like stuff or not but When I'm looking at stupid Bot using BioRifle and even UT_FlakCannon in water first time I'm laughing and then I'm getting mad.
Code related to RateSelf seriously sucks. Is not completed, doesn't have a timing when pawn loads weapon and immediately wants to hunt (or getting weapon during combat). Mainly ALL weaponry (even ripper) have the same dumb code. Using ReplaceFunction I'm guessing I can speak to Bot about minigun more suitable in water than a retarded BioRifle. But first of all rating is priority as long as randomly I could see error logs:

Code: Select all

	if ( AmmoType.AmmoAmount <=0 )
		return -2;
What thinks pawn if weapon doesn't have ammo yet ? Heck knows... But this is definitely different:

Code: Select all

	if ( AmmoType == None || AmmoType.AmmoAmount <=0 )
		return -2;
If no ammo or low ammo do not recommend it.
Aside "new" Biorifle looks different with something added:

Code: Select all

	if ( Pawn(Owner).Region.Zone.bWaterZone )
	{
		bUseAltMode = 0; //No need mooing
		if ( Pawn(Owner).Enemy.Location.Z+200 > Pawn(Owner).Location.Z
			&& Pawn(Owner).Enemy.Location.Z < Pawn(Owner).Location.Z+500 && EnemyDist < 180 ) //Let me see this thing first
			return 0.5;
		else
			return -2;
	}
Issue occurred when enemy was in a down position in water and idiot fired gun committing a suicide in a few seconds without to even do a scratch to enemy, because Biogel projectiles were coming back up like a boomerang. Actually later firing weapon against a long range enemy was dumber than shit, all projectiles going up. Yeah, Deck16][ corrodes pawns but not November :loool: . So... from now on XCGE is a must-have in my UT gaming.
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: XC_Engine add-ons

Post by sektor2111 »

Bump:
Looking closer at Pawn.uc function Died

Code: Select all

function Died(pawn Killer, name damageType, vector HitLocation)
{
	local pawn OtherPawn;
	local actor A;

	// mutator hook to prevent deaths
	// WARNING - don't prevent bot suicides - they suicide when really needed
	if ( Level.Game.BaseMutator.PreventDeath(self, Killer, damageType, HitLocation) )
	{
		Health = max(Health, 1); //mutator should set this higher
		return;
	}
	if ( bDeleteMe )
		return; //already destroyed
	Health = Min(0, Health);
	for ( OtherPawn=Level.PawnList; OtherPawn!=None; OtherPawn=OtherPawn.nextPawn )
		OtherPawn.Killed(Killer, self, damageType);
	if ( CarriedDecoration != None )
		DropDecoration();
	level.game.Killed(Killer, self, damageType);
	//log(class$" dying");
	if( Event != '' )
		foreach AllActors( class 'Actor', A, Event )
			A.Trigger( Self, Killer );
	Level.Game.DiscardInventory(self);
	Velocity.Z *= 1.3;
	if ( Gibbed(damageType) )
	{
		SpawnGibbedCarcass();
		if ( bIsPlayer )
			HidePlayer();
		else
			Destroy();
	}
	PlayDying(DamageType, HitLocation);
	if ( Level.Game.bGameEnded )
		return;
	if ( RemoteRole == ROLE_AutonomousProxy )
		ClientDying(DamageType, HitLocation);
	GotoState('Dying');
}
Now I'll share what I think and you might share what you think.
First check would be bDeleteMe to not have any deal in that stage - I think that.
Then, WTF was wrong with that PreventDeath ? - GOOD LUCK with preventing death of LeglessKrall - which uses to die when has nothing to do...
This will also trigger a PawnList calling killed (even for self) with no exception I simply removed self from list (because Pawn died) and I don't see issues - destroyed later calls another PawnList, ScriptedPawn will deliver another PawnList for killed, and... Berserker continues PawnList as a retarded thing as it is. Why I'm not surprised about Recursive crashes ? Well, that crash is normal after all...
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: XC_Engine add-ons

Post by sektor2111 »

Bump...
A few time ago I did some updates for Sample XC MH server but files involved doesn't have dependencies with MH. It's about fixing LavaTitan's and WaterTitan's rotating boulders ON-Line. Files needed are sent automated to player if map does the request. All setup is simple without new packages defined. There is fixed Default Titan but I decidee to address the rest as well taking in account that tutorial* written by Higor in classes.
We have 3 files: 1 main actor managed by XCGE and 2 packages on demand (when map has a LavaTitan and/or WaterTitan).
All files are going nearby U files (aka System folder) and <XC_Engine.ini> file needs to look as follows:

Code: Select all

[XC_Engine.XC_Engine_Actor_CFG]
Description[0]=This list contains subclasses of XC_Engine.XC_Engine_Actor to be spawned
Description[1]=The main XC_Engine_Actor will call XC_Init() on these actors before InitGame()
Description[2]=The : symbol indicates that a certain package has to be loaded as condition
XCGE_Actors=Unreali:XC_Engine_UT99.XC_Engine_UT99_Actor
XCGE_Actors=Unreali:XC_Engine_MHTitans.XC_Titans
[attachment=2]MHTitans.7z[/attachment]

In company of last XCGE, if everything is properly set, server's log should have inserted a new line:

Code: Select all

XC_Engine: Bringing Level UT-Logo-Map.MyLevel up for play (30)...
ScriptLog: Hooking AdminLogin...
XC_Engine: Engine function replacements done (0.000411 second)
XC_Titans0: > Has Been Initialized.
XC_Engine: Conditional function replacements loaded (0.377200 second)
Discard time taken from here (0.3 seconds), I've been firing a sample test on a very awesome 1 core machine - sample bellow.
[attachment=1]Nice_Cpu.PNG[/attachment]
And it works properly in the system:
[attachment=0]Temp_Good.PNG[/attachment]
Actually CPU is more colder than Hard-Drives and main-board is like a nice spring.
Leaving not very important notes, you might figure that this CPU doesn't use SEE2 SSE3 instructions but a XC_Server runs fine. Images bellow are taken after finishing a map played in on this machine on a LAN server fired in the same machine.
Attachments
Temp_Good.PNG
Nice_Cpu.PNG
Nice_Cpu.PNG (26.14 KiB) Viewed 5671 times
MHTitans.7z
Rotating Boulders ON-Line for WaterTitan/LavaTitan addressing MH.
(8.57 KiB) Downloaded 96 times
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: XC_Engine add-ons

Post by sektor2111 »

It is XC_MonsterHunt dependent on XC_Engine in a public stage - I was using it last 2 months while I did various updates. Perhaps others will want to feel it too...
Location it's in my GDrive near older MH504 (ignore it right now) - archive name should be self explanatory >>
https://goo.gl/wuCQFo
It can be used Off-Line, On-Line, ONLY in environments having XC_Engine installed, else it will not run.
Interface is being still linked with old MH - I'm not bother with that too much because... it's not used in dedicated servers anyway.
It should be compatible with MH maps but NOT for MAPPING, it is addressing for MH game play.
A document is included with some information, the rest is subject for checking source-code by interested people. Perhaps if I find it useful for me, it might be useful for others too... if not, don't use it.
The link is shared in first post too.
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: XC_Engine add-ons - XC_MonsterHunt

Post by sektor2111 »

Opening a small speech about adds for MH, I could figure that admins wants to load some stuff in MH, various maps are impossible or very hard without a load or a random load... However, that ...wrapper or whatever mod doesn't take in account some factors, map and monster. They are primitive and borked.
My first question is: Why we do replace weapons from map ? Map did not ask anything.
Next: Why do we have to screw that "rotating pickup" with an utter garbage making map to look stupid ?
And then: Why we don't simply give to PLAYER what Needs player leaving map alone as it is ?
Let's say that I did not take in account a weapon loader doing the load as UTJMH29 does - random weapon.
I think also this random should be allowing a configuration - what weapons do we need - perhaps we have a better "stock". I think that sort of "ALLWeapons" mod can be turned into a second tool for servers loading player with a random weapon from "ServerPackages". More packages = more options - in decent limits for downloads.
I'll start working then...
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: XC_Engine add-ons - XC_MonsterHunt

Post by sektor2111 »

All right, given environment of this tool, dynamic array + RandRange - both of them unused by UT's stock, I went to expand usage of XCGE (not really natives implemented) for supporting an UScript Access Level to these arrays defined VIA INI file. We have a random weapon loader mutator - Server tool addressing XCGE servers with at least v20.
[attachment=0]RandWeapon.zip[/attachment]

Document and source-code is there. INI file is the key.
Use source-code or decompile mod without presence of INI file, or else a wrong source-code generated by Editor and a future compilation will crash game instantly.
Attachments
RandWeapon.zip
(62.69 KiB) Downloaded 101 times
Aldebaran
Masterful
Posts: 672
Joined: Thu Jan 28, 2016 7:30 pm

Re: XC_Engine add-ons - XC_MonsterHunt

Post by Aldebaran »

I tried to play XC MonsterHunt on Hofs server with a UT 4.51 client and after downloading the needed files the connection stopped, I could not play several maps. If it's impossible to play XC Monster Hunt with UT 4.51 clients it would be nice to inform the player before the connection stops that he should use another UT version. With UT 4.36 I can play fine there and it makes much fun to have bots in there :-)
Post Reply