Discutions about MonsterHuntArena

Posts about Nelsona's findings in UT!
Post Reply
User avatar
Nelsona
Posts: 998
Joined: Sun Mar 06, 2011 11:45 am
What is the middle number? (one, TWO, three): 2
ExtraAntiSpam: Blue
extraextraantispam: Yes
Location: Still at Keyboard
Contact:

Discutions about MonsterHuntArena

Post by Nelsona » Sat Aug 10, 2013 12:32 pm

Maybe very few people know this game-type (another Game-type) implemented a few years ago in default MonsterHunt.u package probably before Shrimp to leave the UT99 stage.

This game-type can be called in any line of server or whatever call using MonsterHunt.MonsterHuntArena.

Even is a subclass of MonsterHunt - child game - There are a crapton of errors spaming both: server and player until one of them or both will crash. Being a mess, some guys found ideea to map some ... "maps" being even totally noobs and misunderstanding that a game full of errors won't run well ever and even the worst UT99 admin won't mess with it. Sooner or later as I noticed ideed I could find an ON-Line server runing MA (just in Mapvote as alternate game) - not played of course.

Default Points - without scanning intensive this controller I just can presume how works a child VS parent because it looks like a joke:

Code: Select all

// ============================================================
// MonsterHuntArena
// ============================================================
//       		=== Monster Hunt ===
//
//       Copyright 2000 - 2002 Kenneth "Shrimp" Watson
//          For more info, http://shrimpworks.za.net
//    Not to be modified without permission from the author
// ============================================================

class MonsterHuntArena expands MonsterHunt
	config(MonsterHunt);

defaultproperties
{
     GoalTeamScore=500.000000
     StartUpTeamMessage="Welcome to the ultimate arena battle!"
     FragLimit=500
     StartUpMessage="Work with your teammates to overcome the monsters!"
     StartMessage="The battle has begun!"
     GameEndedMessage="Arena Cleared!"
     SingleWaitingMessage="Press Fire to enter the arena."
     MapListType=Class'MonsterHunt.MonsterArenaMapList'
     MapPrefix="MA"
     BeaconName="MA"
     LeftMessage=" left the arena."
     EnteredMessage=" has entered the arena!"
     GameName="Monster Arena"
     GameReplicationInfoClass=Class'Botpack.TournamentGameReplicationInfo'
}
Now describing things a bit (laugh if you need, is not so important). Let me see:
- And empty class child of MonsterHunt - copyright Shrimp - we have to ask Shrimp if we want to develop null games he wanted to be owner of a null code - this is his point of view - good, good... Original technology in how to develop a totaly VOID belongs to Epic if we check quadshot. That one is an original NOTHING not this crappy game-type. So for this point permission should go to Epic.
- GoalTeamScore = 500. Woow, Why Was necessary this bullshit, being a subclass of MH which has nothing to do with that value ? This one can be destroyed being useless.
- FragLimit = 500 . I'm asking again myself where was debated FragLimit in these messed craps.
- Subject .... GameReplicationInfoClass=Class'Botpack.TournamentGameReplicationInfo'. Aparently is an innocent line. Problem ... MonsterHunt has other custom GameReplicationInfoClass called in HUD. In our Game HUD automatically is coming from the parent game named MonsterHunt. So, this "replicationinfo" has no link with MH or MH has no link with this one speaking about new data undebated and bad called. We should modify this properly to call "Hunters" and "Monsters" strings correctly. Here is simply called a replicationinfo uninitialized in GameInfo. Being a stupid code I don't think is logic to debate permissions for using it since need to be entirely reworked not used as it is.
End of Introducing original.
Last edited by Nelsona on Sat Aug 10, 2013 4:53 pm, edited 1 time in total.

User avatar
Nelsona
Posts: 998
Joined: Sun Mar 06, 2011 11:45 am
What is the middle number? (one, TWO, three): 2
ExtraAntiSpam: Blue
extraextraantispam: Yes
Location: Still at Keyboard
Contact:

Re: Discutions about MonsterHuntArena

Post by Nelsona » Sat Aug 10, 2013 1:29 pm

Now, assuming we want a new controller we have to rework a mod or a class from whatever MH mod doing proper calls. I prefer to speak about more rewriten lines, just because monsters are subject NumberOne here and Epic forgot more things and proudly presenting a bNoMonsters=True. Modifying this value won't solve nothing, will bring problems in game.

If we want a normal attack order we have to debate a child of MH or a child of TeamGamePlus.
If we want order "Search and Destroy" we need to debate a child of Domination Game with default Domination functions alterred.
I started with this subject because is about first line from controller deciding which "Voice" will be used (except Bot) Bot might still order "Assault the Base". Yeah, I tested this feature.
Later we need to define some variables integers, booleans, even completed later with others. These are going to be used by game during play and to block certain things in certain moments. Example Boss was killed - Bot enter in state "Roaming,LongCamp". No need to run like moron through map. This one can be controlled with a boolean value. And so on for other things.
Specific for the game as a custom stuff is that giant END Trigger

Code: Select all

class MonsterArenaEnd expands MonsterEnd;

function TriggerObjective()
{
	local MonsterHuntArena MH;
	local pawn P;

	MH = MonsterHuntArena(Level.Game);
	if (MH != None)
		MH.EndGame("Arena Cleared!");
	else
		log("MonsterArenaEnd - TriggerObjective - MH == None");
}

defaultproperties
{
     bInitiallyActive=False
     InitialState=OtherTriggerTurnsOn
     Texture=Texture'MonsterHunt.MAEnd'
     CollisionRadius=15000.000000
     CollisionHeight=15000.000000
}
Actually people and Bots are fighting covered by this trigger. This trigger is turned ON by Boss killed if THE EVENT triggered by Boss is matching the TAG of this trigger. I think I can slap this problem without a new trigger playing from a separate package and cloning there a kind of MonsterEnd (using default trigger as model).

Let me see other bad start. Quote from MonsterHunt (the parent game)

Code: Select all

	// This lot is a crappy hack to get Tournament mode
	// to work... Hacked from DeathMatchPlus
Message from me after some works with monsters. BAD and real WORST not CRAPPY. All problems seen with Skaarj are coming from that thing named "Waiting for Players" inflicting a timer unloved by Monsters. Only Bot knows what is a "StartMatch", monster is attacking instantly. Anyway dropping invisible weapons bug is coming right from this point as well called INITGame - right from root which is a wrong start - DONE. That hack done by Shrimp just solved nothing. When map is loaded game need to starts instantly, NO TIMERS and no wait for some cool dude because maybe he won't join, LOL. To develop this Tournament style we need other technology and bunches of tests.

MonsterWeapons - a dead class described summary

Code: Select all

// ============================================================
// MonsterWeapons
// ============================================================
//       		=== Monster Hunt ===
//
//       Copyright 2000 - 2002 Kenneth "Shrimp" Watson
//          For more info, http://shrimpworks.za.net
//    Not to be modified without permission from the author
// ============================================================

// OBSOLETE - INCORPORATED INTO MONSTERBASE

class MonsterWeapons expands Mutator;
Of course are obsolete, why not ? Bugs were moved not fixed. These old weapons have a lot of sequences missing. That's why I did not checked them too much earlier having trust in authors who "fixed" them. Noticing Mr. LoathSome's desire for a mutator to keep Skaarj Original and to not bug players I writed in that time faster a mutator inspired from other source meant to make Old weapons original to work. First code worked but there weren't necessary so many things, player being replicated by server. I did not release anything yet, because I don't like to mess up with dumb incomplete things. Now I finished technology for using OLD weapons in original, LoathSome did it different helped by Higor. My code works, his fixes works. I think we can use old weapons On-Line more smoother than Tournament stuff, LOL - here I think Epic implemented more useless things in TournamentPlayer. Until this moment I even did not noticed that trash move fire making weapon to delay fire only in NetPlay and looking at Players suiciding with Rockets because of that SaveMove thing which should not be always saved (I guess) - this is controlled by tick and not saved to be triggered later in a wall. The only problem is player console with those functions mising, but I couldn't see serious troubles with them playing more minutes. SO ... I think I won't replace any OLD weapon enjoying amplifier and powerup in original (after case). Many years I played with craps, is time to recover stuff.

In this case - noticing strong computers used (with more that 750 MHz) I think we can debate decals problem. Except for OLD weapons we can attach decals in game for LIVING creatures and new tweaked carcasses as suggested by AF_Core - with all credits. Of course to be sure about solving old CanSeeMe crashes I developed other function in UScript as replacement for that native sensitive crap making things to work as original without major differences - just more decals. That trouble is a result of a bad timer as well, DONE.

Regeneration things ? Should not go in any BaseMutator. Bad Ideea and making things to go wrong. We need a small object, actor to guard player, not mutator. That one should work in a separate engine thread out of pawns.

Movers ? We have some in MA ? If Yes, I'll prepare some soup. No pawn blocked, and as much as possible no mover ruined by pawns killed around.

Fixing Boss ? I have a few doubts. We need delay in here. Why ? Pawn's PostBeginPlay need to be initialized or else you cannot scan Drawscale correctly. Some of them I think don't have a bIsBoss debated. So, a kind of actor-tick delayed might controll certain things.

Pause. Is already too much work ? I did not say that will be easy. But I (we ?) can start working it.

User avatar
Nelsona
Posts: 998
Joined: Sun Mar 06, 2011 11:45 am
What is the middle number? (one, TWO, three): 2
ExtraAntiSpam: Blue
extraextraantispam: Yes
Location: Still at Keyboard
Contact:

Re: Discutions about MonsterHuntArena

Post by Nelsona » Mon Aug 12, 2013 12:17 pm

At this moment I reworked a kind of very basic game-type just to test a small thing (I intend to use it in a future DM game-types), I set a small tool to gain aggressive monsters against different pawns. First time logs told some things action on-screen proved reality. Simply in this MonsterHuntArena I did not used any attraction (powerfull Bot code) to trigger monsters, I want to use that code only for small things. I declared GameThreat (neither Bot attitude) and this tool called by BaseMutator which works slow and safe with a short code. If my tests are going to be OK, I'll work more at some MonsterHuntArena game.

In a fixed private version of MA-SkaarjLord_RV.unr (I ought to do MA-Pupae, MA-Squid, MA-Fly, and so on finishing with MA-Pig, MA-Hen, MA-Elephant, Tiger, Bear an such cool titles because I think they will be loved :mrgreen: ) Nothing is more great for player than a common stupid name of a stock monster, map having 0 ideea, 0 logic and 0 functionality. In this private version fixed for MA, my kind of game-type ran fine, I finished a basic tuning just to test A.I. - first time I totaly excepted package MonsterHunt for compilation just using place-holders. I noticed my thing removed by GameInfo and later I used normal MH package (for coders) to compile game well. I have a pause at loading, which means I have to check a few things (InitGame, etc).

I cannot say anything about MonsterHuntDefence and MonsterHuntSolo for the moment. They are somehow identically null mods as original Arena implemented in MonsterHunt.u but never mentioned in INT to open a Game Menu for them.

User avatar
EvilGrins
Posts: 2654
Joined: Thu Jun 30, 2011 8:50 pm
What is the middle number? (one, TWO, three): 2
ExtraAntiSpam: Blue
extraextraantispam: Yes
NoMoreSpam: Silver
Location: Palo Alto, CA
Contact:

Re: Discutions about MonsterHuntArena

Post by EvilGrins » Tue Aug 13, 2013 1:09 am

MA-Hen?
Image
Egads, to be clucked to death!
Image

User avatar
Kelly
Posts: 131
Joined: Sat Dec 01, 2012 2:29 am
What is the middle number? (one, TWO, three): 2
ExtraAntiSpam: Blue
extraextraantispam: Yes
NoMoreSpam: Silver
Location: Coos Bay, Oregon

Re: Discutions about MonsterHuntArena

Post by Kelly » Tue Aug 13, 2013 9:19 am

CTC! OMG, that brings back so many funny memories!
When everyone you ever known is headed for a headstone
I don’t wanna give the end away but we’re gonna die one day

User avatar
EvilGrins
Posts: 2654
Joined: Thu Jun 30, 2011 8:50 pm
What is the middle number? (one, TWO, three): 2
ExtraAntiSpam: Blue
extraextraantispam: Yes
NoMoreSpam: Silver
Location: Palo Alto, CA
Contact:

Re: Discutions about MonsterHuntArena

Post by EvilGrins » Tue Aug 13, 2013 11:56 am

Kelly wrote:CTC! OMG, that brings back so many funny memories!
I never actually tried it out. Found it in my endless quest to find more monsters, only to discover it wasn't one.

User avatar
Hermskii
Site Admin
Posts: 8500
Joined: Sun Jul 10, 2005 9:56 pm
What is the middle number? (one, TWO, three): 2
ExtraAntiSpam: Blue
extraextraantispam: Yes
NoMoreSpam: Silver
Location: Houston, Texas
Contact:

Re: Discutions about MonsterHuntArena

Post by Hermskii » Tue Aug 13, 2013 9:54 pm

I like that bird. Cool! Can it replace bunnies or work with them? Or maybe replace or with baby cows?
~Peace~

Hermskii

User avatar
Hook
Posts: 3444
Joined: Fri Feb 16, 2007 9:41 am
What is the middle number? (one, TWO, three): 3
extraextraantispam: No
NoMoreSpam: Silver
Location: Minnesota USA (Just West of MPLS - by a pond beneath a tree - Dead & Buried)
Contact:

Re: Discutions about MonsterHuntArena

Post by Hook » Tue Aug 13, 2013 11:14 pm

Wow - I don't recall ever seeing that chicken. :shock:
=Hook= of Hook's UT Place - Hopelessly Addicted to UT99!
Forum: https://hooksutplace.freeforums.net
CROSSBONES Missile Madness {CMM} (GT Top 50)
PRO-Redeemer | PRO-SNIPER-Redeemer | SEEKER-Redeemer
Birth Place of ALL Seeker/Scoped Deemers!
IP: NEW IP to come!
CROSSBONES Monster Hunt {CMH} (Special Edition MH by mars007)
IP: 108.61.238.93:7777

medor
Posts: 86
Joined: Wed Feb 16, 2011 8:08 am
What is the middle number? (one, TWO, three): 2
ExtraAntiSpam: Blue
extraextraantispam: Yes

Re: Discutions about MonsterHuntArena

Post by medor » Wed Aug 14, 2013 7:02 am


User avatar
EvilGrins
Posts: 2654
Joined: Thu Jun 30, 2011 8:50 pm
What is the middle number? (one, TWO, three): 2
ExtraAntiSpam: Blue
extraextraantispam: Yes
NoMoreSpam: Silver
Location: Palo Alto, CA
Contact:

Re: Discutions about MonsterHuntArena

Post by EvilGrins » Wed Aug 14, 2013 12:22 pm

Near as I can tell the chicken works like a variation of Domination but in Deathmatch. Only the person holding the chicken can score any points, so you try to kill whoever has it so you can get points...

...but we're getting off topic and this is Nelsona's thread.

User avatar
Hermskii
Site Admin
Posts: 8500
Joined: Sun Jul 10, 2005 9:56 pm
What is the middle number? (one, TWO, three): 2
ExtraAntiSpam: Blue
extraextraantispam: Yes
NoMoreSpam: Silver
Location: Houston, Texas
Contact:

Re: Discutions about MonsterHuntArena

Post by Hermskii » Wed Aug 14, 2013 6:30 pm

What's wrong? Are you... chicken?
~Peace~

Hermskii

User avatar
Nelsona
Posts: 998
Joined: Sun Mar 06, 2011 11:45 am
What is the middle number? (one, TWO, three): 2
ExtraAntiSpam: Blue
extraextraantispam: Yes
Location: Still at Keyboard
Contact:

Re: Discutions about MonsterHuntArena

Post by Nelsona » Thu Aug 15, 2013 8:58 am

There is not problem for small OFF-Topic things, we need to KNOW, not like others ... (no names, :P).

I have to search all servers with downloads available to gain more MA maps. Next subject in HUD (last thing to be done). I debated a Bot A.I. support for a new MA (as did Epic with all default game-types). Let's say I need to test more in order to gain different results.

What is about ? A.I. rules.
Artificial hunters are going to be informed about location from Main threat and importance of this Boss threat calling other native BOT code :twisted: - I think humans don't need informations. Of course, somebody (like Shrimp himself ?) assigned 2 Bosses (aka MA-Queens) to end map. So we can talk about ... more MAIN Threats. In this case hunter will select as he consider one of those clowns, ooops pawns. If another small freak will bug hunter (Mercenaries spawned in game), if is too close is seleted as a bigger threat being "good to kill" even for the rest of team because our mate need help. In a very dynamic situation (GodLike Bot), these pawns can be switched if another bad situation has been borned at a moment. As priority of course, are going to be assigned those involved in triggering end, after removing small louses as a recover mission point.

I logged results, maps are different indeed but I think I can start more tests in a few maps from that small hill of maps (not a mountain as in MH - wrong, is not a mountain of maps just Editor trashes). Good... math is not one of my heat point so I need to try "in practice" how works certain values.

If I forgot something to say, in this game you have all rights to stole weapons from Skaarj (I won't ban you for stoling) and you can use them against their own Boss in original OLD formula, except that NOTHING named quadshot replaced with desired weapon using the same ammo as original not others supposed.

Functions Killed and ScoreKill were reworked to see all KILLS. I'll show you some code later if you want to suggest improvements or if you want to do more tests (if exists a candidate).

I think TIMER won't bug this mod since only other external tools are involved withoutb to bug controller and/or mutator. Game starts by default (I have more reasons for this after 14 years of monster killings) we simply don't need timers before start matches... Woow, I'm wasting time.
Order: Nelsona, stop posting and go to test... NOW !

User avatar
Kelly
Posts: 131
Joined: Sat Dec 01, 2012 2:29 am
What is the middle number? (one, TWO, three): 2
ExtraAntiSpam: Blue
extraextraantispam: Yes
NoMoreSpam: Silver
Location: Coos Bay, Oregon

Re: Discutions about MonsterHuntArena

Post by Kelly » Thu Aug 15, 2013 9:16 am

You talk too much. Post some fixes people can use or quit complaining all the time ;)
When everyone you ever known is headed for a headstone
I don’t wanna give the end away but we’re gonna die one day

User avatar
Nelsona
Posts: 998
Joined: Sun Mar 06, 2011 11:45 am
What is the middle number? (one, TWO, three): 2
ExtraAntiSpam: Blue
extraextraantispam: Yes
Location: Still at Keyboard
Contact:

Re: Discutions about MonsterHuntArena

Post by Nelsona » Thu Aug 15, 2013 4:47 pm

I set HUD (as I've seen so far seems not bugged), next 1 or 2 days I'll toy with some Scoreboard, a small Menu to be more handy is also required. In this moment I have a controller with Verbose option (Good to speak about certain things). I was very close to set end after 3 seconds if Boss is not linked with End but... Queens ... blocked me, I quited ideea. Ok then, let me quote some controller.

Code: Select all

function bool FindPathToMonster(Bot aBot, Actor MATarget)
{
	local ScriptedPawn S;
	local NavigationPoint N, Path;

	if ( MATarget == None || MATarget.IsA('NsWayPoint') )
	{
		aBot.SetOrders('Freelance', None, true);
		return false;
	}
	S = ScriptedPawn(MATarget);
	ForEach S.RadiusActors(class'NavigationPoint',N, 700)
	{
		if (N != None && S.CanSee(N)) //Made sure won't be obfuscated when attempt to fire
		{
			Path = N;
			break;
		}
	}
	if (bArenaVerbose)
		log ("Closer Node to Target is: "$Path);
	if ( S != None && Path != None )
		aBot.MoveTarget = aBot.FindPathToward(Path);
	else
		aBot.MoveTarget = aBot.FindPathTo(S.Location);
	if ( aBot.MoveTarget == None )
	{
		aBot.bStayFreelance = true;
		aBot.Orders = 'FreeLance';
		if ( aBot.bVerbose )
			log(aBot.PlayerReplicationInfo.PlayerName$" freelance because no path to Boss "$S$" from "$aBot.Location);
		return false;
	}
	else
	{
		SetAttractionStateFor(aBot);
		return true;
	}
}
..
..
..
function bool FindSpecialAttractionFor(Bot aBot)
{
	local bool bFound, foundtarget;
	local NsWayPoint WP;
	local NsWayPoint NextPoint;
	local NSMonsterEnd E;
	local Pawn P;
	local ScriptedPawn S;

	if ( aBot.LastAttractCheck == Level.TimeSeconds )
		return false;
	aBot.LastAttractCheck = Level.TimeSeconds;

	if ( aBot.Enemy != None && aBot.LineOfSightTo(aBot.Enemy) )
	{
		if ( MATarget == None )
			MATarget = aBot.Enemy;
		if (MATarget != None && MATarget.bIsPawn && aBot.Enemy != Pawn(MATarget))
			MATarget = aBot.Enemy;
		if ( aBot.IsInState('Attacking') )
			return false;
		else
		{
			aBot.GotoState('Attacking');
			return True;
		}
	}
	
	if (MATarget == None)
	{
		if ( NumPts > 0 )
		{
			foreach AllActors( class 'NsWayPoint', WP )
			{
				if (!WP.bVisited && (WP.Position == LastPt + 1))
				{
					NumPts--;
					NextPoint = WP;
					MATarget = NextPoint;
					log (NumPts$" is NUMPTS value.");
					foundtarget = True;
				}
			}
		}
		else if (!foundtarget)
		{
			foreach AllActors (class 'NSMonsterEnd', E)
			{
				if ( E != None && !foundtarget )
				{
					for ( P=Level.PawnList; P!=None; P=P.nextPawn )
					{
						S = ScriptedPawn(P);
						if ( S != None && S.Health > 0 && S.Event == E.Tag )
						{
							MATarget = S;
							foundtarget = True;
							break;
						}
					}
				}
			}
		}
		foundtarget = False;
	}
	if ( MATarget != None )
	{
		if (bArenaVerbose)
			log ("Target Assigned is "$MATarget);
		if ( aBot.ActorReachable(MATarget) )
		{
			if ( MATarget.IsA('NsWayPoint') )
			{
				aBot.MoveTarget = MATarget;
				bFound = ( aBot.MoveTarget != None );
			}
			if ( MATarget.bIsPawn && aBot.CanSee(MATarget) && Pawn(MATarget).Health > 0)
			{
				aBot.Target = MATarget;
				aBot.GotoState('Attacking');
			}
			if ( bFound )
			{
				if ( aBot.Enemy != None )
					aBot.bReadyToAttack = True;
				SetAttractionStateFor(aBot);
				return true;
			}			
		}
		else
		{
			if ( MATarget.IsA('NsWayPoint'))
			{
				aBot.MoveTarget = aBot.FindPathTo(MATarget.Location);
				bFound = ( aBot.MoveTarget != None );
			}
			if ( MATarget.IsA('ScriptedPawn') )
			{
/*				if ( aBot.Enemy != None )
					MATarget = aBot.Enemy;
*/
				return FindPathToMonster(aBot, MATarget);
				bFound = ( aBot.MoveTarget != None ) ;
			}
			if ( bFound )
			{
				if ( aBot.Enemy != None )
					aBot.bReadyToAttack = True;
				SetAttractionStateFor(aBot);
				return true;
			}
		}
		if (aBot.Enemy != None && MATarget != None && MATarget.IsA('ScriptedPawn') && !aBot.CanSee(MATarget) && aBot.CanSee(aBot.Enemy))
		{
			MATarget = aBot.Enemy;
			aBot.Target = MATarget;
			aBot.GotoState('Attacking');
		}
	}
	return False;
}
...
...
...
function float GameThreatAdd(Bot aBot, Pawn Other)
{
	local float Threaten;
	Threaten = 0;
	if ( Other.IsA('ScriptedPawn') && Other.Event != '' && Other.Health > 0 )
		Threaten = 5;
	else if ( Other.IsA('ScriptedPawn') && !Other.IsA('Cow') && !Other.IsA('Nali') && Other.Event == '' && Other.Health > 0 )
		Threaten = FClamp((aBot.SightRadius*2)/VSize(Other.Location-aBot.Location),-5,10);
	if ( Other.IsA('TeamCannon') || (Other.Location.Z - aBot.Location.Z > 500) )
		Threaten = -5;
//	log ("Game threat for "$aBot.GetHumanName()$" is "$Threaten$ " at "$Other.GetHumanName());
	return Threaten;
}
...
With awsome Participation of a small actor without RemoteRole (not necesary) as follows:

Code: Select all

class Tweaker extends Actor;

var int HelperCheck, MaxMonsterAllow;
var bool bInitialized;

function PostBeginPlay()
{
	if (bInitialized) return;
	bInitialized = True;
	InitChecks();
	SetTimer(1.50,True);
	log ("A tweaker has been spawned.");
	Super.PostBeginPlay();
}

function InitChecks()
{
	local ScriptedPawn S;
	
	MaxMonsterAllow = ArenaMonster(Level.Game).MaxMonsterHealth;
	ForEach AllActors (class'ScriptedPawn',S)
	{
		if (S != None)
		{
			if (S.DrawScale > 3) S.DrawScale = 3;
			if (S.DrawScale < 0.5) S.DrawScale = 0.5;
		}
	}
}

event timer()
{
	local ScriptedPawn S;
	local Pawn P, En;

	for ( P=Level.PawnList; P!=None; P=P.NextPawn )
	{
		S = ScriptedPawn(P);
		if ( S != None && S.Health > 0 && !S.IsA('Nali') && !S.IsA('Cow'))
		{
			foreach S.VisibleActors (class'Pawn',En,S.SightRadius)
			{
				if (En != None && !En.IsA('ScriptedPawn') && En.Health > 0 && !En.IsA('PlayerPawn') && En.bBlockActors)
				{
//					if (S.LineOfSightTo(En))
//					{
						if ( S.Enemy == None )
						{
							S.Hated = En;
							S.Enemy = En;
							S.Target = En;
							//log ("Tweaker works for "$S$" - Enemy is "$aBot.GetHumanName());
							if (!S.IsInState('Attacking'))
								S.GotoState('Attacking','');
				
						}
						if (S.Enemy != None && FRand() > 0.6)
						{
							S.Hated = En;
							S.Enemy = En;
							S.Target = En;
							//log ("Tweaker works for "$S$" - Enemy is "$aBot.GetHumanName());
						}
						if (En.IsA('Bot'))
						{
							if (Bot(En).Enemy == None || (VSize(S.Location - Bot(En).Location) < VSize(Bot(En).Enemy.Location-Bot(En).Location) ))
								Bot(En).Enemy = S;
						}
//					}
				}
			}
			if (S.Enemy != None && S.Enemy.IsA('ScriptedPawn'))
			{
				S.Hated = None;
				S.Enemy = None;
				S.bHunting = False;
				if ( S.OldEnemy != None && S.OldEnemy.IsA('ScriptedPawn') )
					S.OldEnemy = None;
				S.GotoState('Waiting');
			}
			S.TeamTag = 'Arn';
			if (S.Health > MaxMonsterAllow)
				S.Health = MaxMonsterAllow;
			if (S.bIsPlayer)
				S.bIsPlayer = False;
		}
	}
	if ((Level.Game).bGameEnded) Destroy();
	HelperCheck++;
	if (HelperCheck >= 3)
	{
		ArenaMonster(Level.Game).CountMonsters();
		HelperCheck = 0;
	}
}

defaultproperties
{
     RemoteRole=ROLE_None
     bGameRelevant=True
	 bHidden=True
}
Next classes are ArenaMutator, HUD, I'll work different small things. Regeneration is coming from other mutators working in other threads.

User avatar
Nelsona
Posts: 998
Joined: Sun Mar 06, 2011 11:45 am
What is the middle number? (one, TWO, three): 2
ExtraAntiSpam: Blue
extraextraantispam: Yes
Location: Still at Keyboard
Contact:

Re: Discutions about MonsterHuntArena

Post by Nelsona » Fri Aug 16, 2013 11:25 am

Continuing ... or different said - MakeNoise(1.00)

May I speak about Skaarj fixations ? I couldn't find many but as a preservation. I toyed with a MH map having some Skaarj with quadshot to see how works replacement. Even without Timer in Base mutator I noticed ... LOL ? Skaarj right in weapon place holding ... AIR. And because I don't need to deal with MH fixes I decided to slap another technology without any Timed control. Master Key for this tweak is reworking that function ReplaceWith from Engine.Mutator ported properly for other cases (remider to tell ya other interesting byte subject).
Here it is:

Code: Select all

function bool ReplaceWith(actor Other, string aClassName)
{
	local Actor A;
	local class<Actor> aClass;
	local Pawn P;
	local Weapon W;

	if ( Other.IsA('Inventory') && (Other.Location == vect(0,0,0)) )
		return false;
	aClass = class<Actor>(DynamicLoadObject(aClassName, class'Class'));
	if ( aClass != None )
		A = Spawn(aClass,Other.Owner,Other.tag,Other.Location, Other.Rotation);
	if ( Other.IsA('Inventory') )
	{
		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(Other).MyMarker = None;
		}
		else if ( A.IsA('Inventory') )
		{
			Inventory(A).Respawntime = 0.0;
			Inventory(A).bHeldItem = True;
// To work from here - Watch this
			if (Inventory(A).IsA('Weapon'))
			{
				W = Weapon(Inventory(A));
				W.PickupMessageClass = Class'Botpack.PickupMessagePlus'; //Important for me
				Foreach W.RadiusActors(class 'Pawn', P, W.CollisionRadius-3)
				{
					if (P != None && P.FindInventoryType(aClass) == None && P.Health > 0)
					{
						log ("Found closer Pawn "$P$" for "$Inventory(A)$" as replacement for "$Other);
						if (!P.bIsPlayer)
							P.bIsPlayer=True; //Only players can Touch
						W.Touch(P); //They need love, and love means Touching.
					}
				}
			}
// Until this point. Will check if still bug me
		}
	}
	if ( A != None )
	{
		A.event = Other.event;
		A.tag = Other.tag;
		A.RotationRate = Other.RotationRate; //Agree
		return true;
	}
	return false;
}
And this replacement is proudly done BEFORE bSuperRelevant = 1; else seems to not be removed OLD wep. I'm still wander how works these in DMMutator since in other case might cause problems based on strong relevancy and they aren't removed. Anyway DMMutator seems to have a lucky timing or some small log to consume engine tick making replacements to work at limits (usually in normal games Skaarj have TournamentWeapons 99%), or is very computed ... I don't know very exactly.

PS:___
As I could see from logs, in that moment Weapon spawned by Skaarj doesn't have an Owner, LOL. Calling Owner leaded me VIA error right in Engine. So I could see what is a ValidTouch. Looks like nobody can gain a weapon if is not bIsPlayer "till have a weapon".

Post Reply