MH attached types

Need some nice Mods? Here, you are right!
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: MH attached types

Post by sektor2111 »

To be honest I could see some troubles in my server ( in the past ) and I went ahead with crush movers. Result was visible shortly, when a cow cannot do what wants will quit playing. They weren't glad at all.

In order to not have player rushing map I have idea how to block turds but... they might feel frustrated, also it's a need to sort stuff due to many formulas developed. There are maps where you simply cannot kill all monsters. Want a Name? MH-GXech.unr - if memory doesn't cheat me. Map wants to be special but... There are some monsters in a total unreachable area - pointless anyway... to not mention that screwed Behemoth, collision is a thing which can be adjusted much better only by skilled people not by any cube-drawer. Spamming fragments from Ventilator? What are doing those Cannons anyway ?
That map could be something nice including a cute Bot Support but... at this moment I have a private one for me and my Bots, I did not share it anywhere.

For other normal Levels we might use an actor spawned later over End a bit bigger than end blocking player or killing player touching it (the blocker). This blocker once/5 or X seconds will test how many monsters are in map. If monsters are less than target number blocker will self remove or blocker will "Enable Touch" for MonsterEnd or any End Like. This can be a Server-Tool as well.

Other way is different one. Simply prevent End to work if MonstersTotal (or TotalMonsters) from controller are higher than number required to end map. It's doable right inside the End2 trigger. I did not used that as long as Bot/Mbot doesn't rush maps as in default and I have some stuff a la 2014-2015 which is a bit loved. Me personally I'm interested about stuff which can be ended with 0 Monsters. Even Bots can do such things but depends on mapper. I can help with Navigation stuff but I did not see people interested so I won't debate other options as long as 0 skill is main MH goal.
SC]-[WARTZ_{HoF}
Adept
Posts: 426
Joined: Tue Feb 21, 2012 7:29 pm

Re: MH attached types

Post by SC]-[WARTZ_{HoF} »

I like the Blocker idea. It may piss them off a bit but they will learn to play the map and not try to rush it.
Image
Image
Image
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: MH attached types

Post by sektor2111 »

If you want to do your mod in an up-to-date way (tiny adjustments) see link with mod above, Medor doesn't have final version as long as it's not tracking these topics. Also MBot is updated and all stuff. I think I'll prepare a signature. Archives are the mostly marked with date but I saw that Medor has outdated things (marked "New" of course). Collectors... :ironic:
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: MH attached types

Post by sektor2111 »

Cons Notes toward my attached MH2 version:
- This (old for me) MH2_NS_V2 cannot be expected to fix BSP from maps;
- Replacements for tricky pickups probably are not very ready - future ideas cannot be predicted earlier - I'm sorry for any future dumb "creativity". However in a newer version I solved pickups ported by movers or such "creative" setup;
- I forgot to test "empty" corpse deal. Playing only Bot maps with 4 Mbots with me they were destroying all corpses so I did not see recursive Corpse to corpse spawns. Bug never existed previously, it was obscure infiltrated when I solved chunks troubles in matching creature type. I solved this in a later mod by preventing Copses at small bodies;
- I did not counted all "fixes" operated in a Level - more logging specific problems describing everything;
- I ruined some stupid stuff which made some silly players happy so I have ruined their fun - I'm apology but in my house I like a clean place;
- I removed by default bWorldLog as long as World seems not so interested about UT'99 spamming news with UT4 which needs resources which I don't have and time for other bugs :ironic: ;
- Navigation visibility was not done configurable because I really don't think that need changes;
- I did not implemented Day related aggressiveness. Eg: Monday monster is more mad, Sunday is more relaxed, Friday is sleepy, etc. I won't do that as long as I want them mad all the time.
- several replacements aren't configurable because I never had in plan any removal of them;
- Very very custom Pawns have their extra super duper carcass - won't be like that in this version due to tweaks operated for decals and old crashes + Some Mullog sh!t green garbage landed in maps with extra textures messing up the good looking things;
- high loaded maps with many monsters seeing each-other might lag even stronger servers because they attack player with priority forcing CPU when they intend to help each-other against player. Eg.: MH-MeltTown any MH-Brutes][ and such. Those weren't in purpose to lag me...
Etc.
For these mentioned reasons Source-Code can be considered open in order to remove/add anything needed.
Mod was playable with XC_Engine and the rest of new things - I claim them "my new stock" to update at any UT install.
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: MH attached types

Post by sektor2111 »

Information
In other MH structure I think I made a deal type UT. Monster will be like Bot, won't make noise, won't attack, won't respond at any dropped rock, won't get hurt, until game is started - duh, I was hunting for years a Tournament monster and now I turned default monster into a Tournament compatible one :agree1: .
Next thing to solve is replacement for such case - because simply any Skaarj won't have any kind of weapon until game starts - and I want to address any weapon holder. It doesn't have reason to own his weapon if is not attacking yet, right ? Good...
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: MH attached types

Post by sektor2111 »

Given XCGE's features I have implemented a detection method. Simply some processes are not running if XC_Engine manages game.
Examples of routines used by me:
BaseMutator fired first

Code: Select all

class whateverBase expands mutator config(some_file);
var....
var int XC_GE;
var bool bAIHandled, bHaveXC;

event PostBeginPlay()
{
...
	log ("Looking for XC_Engine... ");
	XC_GE = int(ConsoleCommand("GET INI:ENGINE.ENGINE.GAMEENGINE XC_VERSION"));
	if (XC_GE >= 8)
	{
		log ("Detected running XC_Engine V"$XC_GE);
		bAIHandled=bool(ConsoleCommand("GET INI:ENGINE.ENGINE.GAMEENGINE bUseSetEnemyHook"));
		if (bAIHandled)
			log ("XC_Engine will manage Monster's SetEnemy.");
		else
			log ("XC_Engine won't manage Monster's SetEnemy.");
		if ( XC_GE < 16 )
		{
			if ( Level.NetMode != NM_StandAlone )
				log ("XC_Engine is older, Old Weapons Handler will be used.");
		}
		else
		{
			if ( Level.NetMode != NM_StandAlone )
				log ("XC_Engine will manage Old Weapons, Handler won't be used.");
			bHaveXC = True;
		}
	}
	else{
			log("Result: XC_Engine not found.");
			if ( Level.NetMode != NM_StandAlone )
				log("Old Weapons Handler will be used.");
		}
	if (bMHLog)
		log ("BaseMutator ended Initialization at "$GetAbsoluteTime());
	ShowConfig();
}
I get 2 boolean used later to load/no load stuff + logs.
Controller also can get these features:

Code: Select all

class MonsterHunt2 expands Domination config(into_a_file);

var bool ...,... bUseXC,....
function PostBeginPlay()
...
	if ( MonsterBasePlus(BaseMutator) != None )
	{
		bUseXC = MonsterBasePlus(BaseMutator).bAIHandled;
		if ( bUseXC )
		{
			log ( "XC_Engine will manage A.I. control.");
		}
	}
...
//then Bot code suffers less usage as long as XC_Engine has faster A.I. natural reaction.
function bool FindSpecialAttractionFor(Bot aBot)
{
...
	if (!bUseXC) //Iterator works if XC_Engine doesn't manage A.I. else 0 code runs from bellow
	{
	foreach AllActors(class 'Pawn', P)
	{
		S = ScriptedPawn(P);
		if ( S != None && S.Health >= 1 )
		{
		if (S.IsA('Nali') || S.IsA('Cow') || VSize(S.Location - aBot.Location) > S.SightRadius*0.95) //I think is still too much
			continue;
		if ((!S.Region.Zone.bWaterZone && !aBot.Region.Zone.bWaterZone )
			 || (aBot.Region.Zone.bWaterZone && !S.Region.Zone.bWaterZone && S.bHasRangedAttack)
			 || (!aBot.Region.Zone.bWaterZone && S.Region.Zone.bWaterZone && S.bHasRangedAttack)
			 || (S.Region.Zone.bWaterZone && aBot.Region.Zone.bWaterZone))
//			if ( S.LineOfSightTo(aBot) )
			if ( ValidSight(S,aBot)/*FastTrace(S.Location,aBot.Location)*/)
			{
				if (S.Enemy == None || ( S.Enemy != None && FRand() > 0.7 && VSize(S.Enemy.Location - S.Location) > VSize ( S.Location - aBot.Location ) ))	//Monsters need to attack if no enemy or random switching through hunters
				{																//but not very often
					gstate = S.GetStateName();
					if ( !S.IsInState('Attacking') && gstate != 'Sitting' && gstate != 'Teleporting')
					{
						S.Hated = aBot;
						S.Enemy = aBot;
						S.Target = aBot;
						S.LastSeenPos = aBot.Location;
						S.GoToState('Attacking');
					}
				}
				if ( (( FRand() > 0.8 && aBot.Enemy != None && aBot.Enemy != S ) || aBot.Enemy == None) && gstate != 'Sitting' )
					aBot.Enemy = S;
			}
		}
	}
... and the rest of load
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: MH attached types

Post by sektor2111 »

In case of troubles based on tick blocking Monster vs Monster fight + teaming them. I high loaded Levels might be lagging. USING Uscript we can notice if tick suffers or not decreasing frequency of checks up to 3 seconds from initially 0.5.

I gotta do a revision because something not works as supposed... These values are not what I want...

Edit: I was living with Idea that I was some writter in another life looking at previous function ReduceDamage which I wrote to get rid of troubles. Now I have changed my mind - I think is more simple like this:

Code: Select all

function int ReduceDamage(int Damage, name DamageType, pawn injured, pawn instigatedBy) //screwed properly
{
//	Section - no bullshitting
	if ( injured != None && injured.bIsPlayer && injured.PlayerReplicationInfo == None )
		injured.bIsPlayer = False;
//	End of Story

	if (!bUseXC)
	if ( InstigatedBy != None && injured != None && injured != InstigatedBy && injured.Health > 0
		&& injured.IsA('ScriptedPawn') && !InstigatedBy.IsA('ScriptedPawn') )
	{
		ScriptedPawn(injured).Hated = InstigatedBy;
		if (FRand() > 0.6)
		{
			ScriptedPawn(injured).Enemy = InstigatedBy;
			ScriptedPawn(injured).LastSeenPos = InstigatedBy.Location;
			ScriptedPawn(injured).Target = InstigatedBy;
		}
	}
	return Super(TeamGamePlus).ReduceDamage(Damage,DamageType,injured,instigatedBy); //Now go to momma Epic
}
:omfg:
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: MH attached types

Post by sektor2111 »

I think I have to fix command IAmTheOne for MH because it doesn't work correctly.

Code: Select all

exec function IAmTheOne()
{
	local ScriptedPawn A;
	local int Threat;

	ClientMessage("Agree, you are the ONE and that one under attack.");
	foreach AllActors (class'ScriptedPawn',A)
	{
		if ( A.Enemy == None || ( A.Enemy != None && (!A.LineOfSightTo(A.Enemy) || A.Enemy != Self) ) )
		{
			Threat++;
			A.LastSeenPos = Location;
			A.SeePlayer(Self);
			if ( Threat == 100 )
				break;
		}
	}
	ClientMessage("Enjoy...");
// Prepare 100 Creatures to kill that Jet Li - TheOne 
}
I think it's fixed now.
SC]-[WARTZ_{HoF}
Adept
Posts: 426
Joined: Tue Feb 21, 2012 7:29 pm

Re: MH attached types

Post by SC]-[WARTZ_{HoF} »

I'll Make sure to apply these fixes to the next MH2 Build. Still a lot of work needs to be done removing BS maps. Brattzilla was a very dedicated guy for the HoF MH server but he had no code experience and never read logs.
Image
Image
Image
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: MH attached types

Post by sektor2111 »

Oops, couple of updates:
- preventing an often JetLi;
- preventing ALL creatures attacking by removing test conditions before iterator - trigger the same firsts creatures from foreach cycle.

Note: I7 high speed machines I'm guessing won't be losing much TickRate at 250 Pawns hunting target - value changeable on fly by game and in game's ini not other ini located out of sand-box (aka Cute-Box).

Optional: If no paths (no nodes) - Kill by spawning a StoneTitan over his/her head in order to stomp TheOne and if Titan did not spawn, BlowUp TheOne properly in a complete blood bath also it might be OK to let TheOne falling from world.
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: MH attached types

Post by sektor2111 »

Given topic titled like "KillThemAll", I think I have an alternate option for reducing lagging problems based on overloaded MH Levels.
I prefer a permanent "guard" actor declared in "ServerActors". It removes excessive content as long as Factories have another tweaking in mod used (or separate if needs). We cannot speak about "mismatch" problems as long as this is server-side and can be modified any time, nothing is sent to player's cache.

Code: Select all

class NoSpam expands Actor;

var bool bMapAnalyzed, bNeedDestroy;
var int NumPwn, Stepping, Ds;

event PreBeginPlay()
{
	log (Self$" loaded and started...");
	SetTimer(Level.TimeDilation*3,False);
}

function DoAnalize()
{
	local Pawn P;

	Foreach AllActors( class 'Pawn',P ) //Debate all sort of shite including XPawn and so on
	{
		if ( P.PlayerReplicationInfo == None && P.Health > 0 )
		NumPwn++;
		if ( NumPwn > 300 )
		{
			Stepping = Clamp(NumPwn/300,1,NumPwn/300);
			bNeedDestroy=True;
		}
	}
	if ( bNeedDestroy )
		log (Self$" reporting "$NumPwn$" creatures. Will allow a creature at each "$Stepping$" creatures aiming 300 pieces." );
	bMapAnalyzed = True;
}

function DoRemoval()
{
	local Pawn P;
	local int Step;
	local Actor A;
	local bool bNotThis;
	local string ATag, AName;

	Foreach AllActors (class 'Pawn',P)
	{
		if ( P.PlayerReplicationInfo == None && P.Health > 0 )
		{
			if ( bNotThis )
				bNotThis = False;
			if ( !bNotThis )
			if ( P.Event != '' )
			{
				foreach AllActors (class 'Actor', A, P.Event)
				{
					if ( A != None && A != P ) //Warning!
					{
						bNotThis = True;
						break;
					}
				}
			}
			if ( !bNotThis )
			{
				if ( Stepping > 0 && Step < Stepping  )
				{
//					P.TakeDamage(1000000,None,P.Location,vect(0,0,0),'slashed'); //Crashing at 1639 creatures, btw ?
					if ( P.Weapon != None )
						P.Weapon.LifeSpan = 0.100000;
					P.Destroy();
					Ds++;
					NumPwn--;
					if ( NumPwn <= 300 )
						break;
				}
				Step++;
				if ( Step > Stepping )
					Step=0;
			}
		}
	}
	ConsoleCommand("OBJ GARBAGE");
	bNeedDestroy = False;
}

function Timer()
{
	if (!bMapAnalyzed)
	{
		DoAnalize();
		SetTimer(Level.TimeDilation,False);
		return;
	}
	if ( bNeedDestroy )
	{
		DoRemoval();
		SetTimer(Level.TimeDilation,False);
		return;
	}
	if ( DeathMatchPlus(Level.Game) != None && DeathMatchPlus(Level.Game).bRequireReady )
		SetTimer(Level.TimeDilation*2,False);
	if ( DeathMatchPlus(Level.Game) != None && !DeathMatchPlus(Level.Game).bRequireReady )
	{
		BroadcastMessage(Ds@"creatures have been eliminated by Spam-Guard.");
		return;
	}
}

defaultproperties
{
   bHidden=True
   RemoteRole=ROLE_None
}
A version compiled is located here
NoMHSpam.zip
(4.5 KiB) Downloaded 83 times
.
Post Reply