Need More Fixes ?

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:

Re: Need More Fixes ?

Post by Nelsona » Tue May 21, 2013 4:36 pm

Fixations based on replacements...

Not bad ... but not always good. I killed a Manta flying so high. While dying throwed something from pocket. But I have to fly to get that thing (armor, whatever...) is just stucked in air.

Fall problem solved. The common replacements are really insufficient in more MH instances. We have to deal with something like "DropWhenKilled" as in lower description:

Code: Select all

function SetPawnDifficulty (.....)
	if (S.DropWhenKilled != None)
	{
		if (S.DropWhenKilled == class 'UT_ShieldBelt')
			S.DropWhenKilled = class 'MH2_NS_V2.MHUT_ShieldBelt';
		if (S.DropWhenKilled == class 'ShieldBelt')
			S.DropWhenKilled = class 'MH2_NS_V2.MHUT_ShieldBelt';
.....
bla bla until end
This time is hard to clone stuff properly (need a bunch of lines) but is usefull to collect something felt not hanging in air.

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: Need More Fixes ?

Post by Nelsona » Tue May 28, 2013 3:59 pm

Moving and wandering in the same time.

A few people know (not all), about that SetEnemy Accesed None delivered succesfully by Devilfish and Squid. Here is something not loved by me when ruin attitude code returning dumb things. I'm in fog at this code:

Code: Select all

function bool SetEnemy( Pawn NewEnemy )
....
	if ( !bCanWalk && !bCanFly && !NewEnemy.FootRegion.Zone.bWaterZone )
		return false;
....
Let me translate after my understanding: If creature cannot Walk (true - squid never stoled flag :evil: ), and creature cannot Fly (I couldn't see devilfish and squid in the skybox :evil: ) and if my legs aren't in water (lol, water is too cold this time) then we return false - not enemy. Really ? Even they are hating me ? Even I fired a rocket hitting them ?
Well ... I think is time to redo this crap properly. External fix ? I don't think is possible, this is acting too fast. Maybe I have to evolve that "Intelligence=BRAINS_NONE" of devilfish (I won't expect to play chess but...). A proper coded pawn is highly recommended.

I read somewhere about MonsterHunt as having "temperamental beast". I'm not so sure, The most of "credits" goes to Epic - I'll redo credits menu properly to share my gratitude for hours of work.

User avatar
Dr.Flay
Posts: 268
Joined: Sun Apr 07, 2013 6:35 am
What is the middle number? (one, TWO, three): 2
ExtraAntiSpam: Blue
extraextraantispam: Yes
NoMoreSpam: Silver
Location: Kernow, UK
Contact:

Re: Need More Fixes ?

Post by Dr.Flay » Tue May 28, 2013 10:09 pm

This is all the sort of territory that Higor is covering with the BotZ mod.
Maybe he or the BotZ mod can help ?
Image
chaoticdreams.org - @TheChaosMod - Web IRChat - [url=irc://irc.quakenet.org/chaoticdreams]IRChat[/url]

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: Need More Fixes ?

Post by Nelsona » Tue May 28, 2013 11:37 pm

I'm not sure if Botz can fix monster Squid or Devilfish. This is ScriptedPawn code. Exist maps where they act normaly without errors. Where more exactly ? In those environments full of water where player enter in water first before to encounter them, and condition is not respected so they act normally. If player is on a kind of bridge or Bot too, firing and triggering such a monster will return Accesed Nones because is not in water and this monsters cannot walk or fly (normally for water creatures).

Btw, exist a new fix for Botz ? Last time they never passed a simple area falling in acid all the time. Krall and Mercenary hunted player very well even normal Bot managed this road but those Botz constantly fell in acid.
passing.JPG
Look at corner - Normal Bot is passing. Botz tried a "shortcut" falling and dying in acid. I'm waiting fixes (not for MonsterWayPoint - this is not default original MH with tons or errors - default MonsterWayPoint won't ever work in other MonsterHunt versions that's why not works in any attached version ONLY in MINE - I recoded A.I. controller).

I have a single Bug at A.I. (I'll try to fix that) Order for attacking in MonsterHunt should be "Search and Destroy" not "Assault the base" - I did not see any Base of Monsters (neither a HomeBase) in any of those "maps"...
You do not have the required permissions to view the files attached to this post.

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: Need More Fixes ?

Post by Nelsona » Wed May 29, 2013 4:16 pm

Yep, a small and cute fix is always a better way rather than recoding a bunch of classes.

Now I have Order for Attack "Search and Destroy" (even in my controller is not necessary any of such order - they simply start hunting without to bug human with any cover, only ordered).

User avatar
Hermskii
Site Admin
Posts: 8501
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: Need More Fixes ?

Post by Hermskii » Thu May 30, 2013 12:06 pm

You are still applying all of these fixes somewhere right? If so, are they only for the admin of the server and if so, does it break other people's Monster Hunt when they connect?
~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: Need More Fixes ?

Post by Nelsona » Thu May 30, 2013 3:14 pm

These settings belongs to a new MH (can be any name) but using MH maps as support - a kind of MonsterHunt - to be browsed properly.

Original Package is still loaded (called by Map) but player is not really using it. Technical Reasons:
- End is other trigger - all recoded MH games have this new type because default won't end map;
- Old Weapons - all (absolute all) old weapons are now integrated into this game-type with proper effects, sounds, without any dummy class called - credits here almost only for me because I lost 2 weeks fixing them and losing some hair, especially because they have codes hacked from Botpack - so, not many credits - or credits goes only to Epic - they are owners;
- Monsters (almost all) - are acting friendly because they are a team - small flaws are adjusted in 0.8 seconds (Maybe I'll quit this strategy using other things - I'm thinking) - I said almost all because I have some Fixed classes which not crash server due to original messed attitude code - they won't deny teaming because they have a Leader (doesn't matter if is only spectating - is Leader and they are glad (Idiotic trick for idiotic creatures));
- PlayerCanSeeMe bug was found last time in 2012 not this year - I play only pretty good maps - pathed and RelevantTimeOut=40;
- Monsters killed by death triggers won't come back to life (will see them again only if map is revoted);
- Except monster Fly, certain classes have now Animation sequence "Fighter" solved;
- Monsters can be amplified to a higher level in case of a very skilled hunter who kill 100 monsters with a Spoon in 3 seconds :D;
- A few Projectiles bugging people and server are rebuilded to not spread errors;
- Weapons throwed on ground by dead pawns are keept in a decent limit;
- Monster blocked firing in a wall useless painting decals is stopped shortly if there is no enemy nearby;
- Player heavy ambushed might crouch down - will S..ts a grenade from a.. and will deliver 300 SplashDamage dying with the dignity of a kamikaze warrior;
- Player fighting with monsters will see blood splashed on walls as for human player - green for Mercs, some Spinners, Insekt, ect.;
- All armed monsters with old weapons can use their weapons (net aliases properly) throwing good things;
- common stuff throwed falls on ground properly;
- monsters can by pissed off by other "pawns" which might attack them responding, fighting back - Cannons, FlockPawns, different crappy pawns non-monsters ?;
- .... ?

In other A.I. enhancements - Bot hunter:
- Bot won't bug player with an assumed cover - will freelance;
- Bot won't run in place when map doesn't have paths - the mostly this is noticed at game start;
- Bot will asses a target - as long as target is not touched is kept and won't perform a bunch of "Foreach AllActors" constantly seeking target - works faster;
- Bot is friend with pawns "hunters" and they hate monster by default;
- Bot is not interested in any race to end as long as is surrounded nearby by Monsters - is interested to kill them;
- Bot reached at End is waiting nice to end game runing a bit around End to check if monsters aren't still intended to spawn until map is ending;
- Bot touching a Point Will announce "Control point is secure." - with "mutate ai" player can see the target and can travel (as admin in 451 - as anybody in 436) can use Bot feature to find the desired point. MonsterWayPoint touched will shows up as being Translucent. Unvisited WayPoint is still masked normally;
- Is impossible to break attack touching to early another Position than required, breaking attack at certain moment - MonsterWayPoint has protection against idiotic attack;
- Bot is not interested by any Nali or any Cow;
- Bot lost in a plane field too far from paths than normal, will check his position and will run to a pathnode to recover navigation;
- Bot if will notice a pathed map but no way to end will collect stuff as in DM and will wait any enemy at AmbushPoints - even a monster can use them, read again;
- from 3 HUDS, 2 are reworked to support Bots implemeted in maps by default (eg. B99-MinasTirith) without spaming errors at Player;
- ........ ?

Controller tunes:
- We can see if map doesn't have Relic/Bot support;
- Timer is removed because we know how many hunters are in game just looking for some Botpack stuff without doubling craps already done by Epic;
- A few functions were modified to gain speed - as suggested by Kelly;
- Bonuses exist even I started to hate using timers in BaseMutator- so I advanced their utility;
- small tricks were done to game-type to asses another order without reworking new Bots, new player class, new voice packs - using just defaults but triggered properly;
- a bullshit attitude code locking server looks removed I think some 90% - Might have change 1 at 10000000 to happen based on a nasty player?;
- player entered is a nice guy. Why ? If kills other player will suffer a heart attack, if try to mess up a mover will die crushed. If is joined will modify speed being aligned to 20kb/s speed according to spam MH parameters, if wants to throw an empty weapon or any weapon bugging other hunter, this one will get vanished in maximum 2 seconds. If wants to shoot a mate, antiboost will stop throwing friend very far, but he can blow up himself punished by his own action;
- we receive an anouncement when ANY hunter is firing redeemer - a more fixed one - credits for Mars, Tina and to UTPT for helping me in hunting this bug: PostRender.Accesed None;
- Redeemer is assumed to not lag player at first sight because I set a precache code properly;
- Also I tried to speed up precaching of monsters (because of new content) who might lag a bit;
- ........ ?

Appologises:
- I think I forgot all fixes;
- I won't add other required 3 pages of scripts addressing certain maps - will slow down performance and I worked too much to have sensitive monsters;
- There are maps with a bunch of craps implemented (assumed usefull or cool) in fact they just ruin game - out of my duty to fix tens of GB.;
- As long as I cannot rebuild all meshes because FULL UT SOURCE-CODE IS NOT AVAILABLE ANYWHERE, read again, I don't need scripts only (pls, Medor do not post a crap link here as you did somewhere) because Mars asked for MESHES resources not Scripts;
- And so on... ?

To work ?
- destroy useless "lives" usage - we don't need players left from servers;
- asses respawning for Implemented Bot(s) in maps;
- a few customizable values - with limits;
- fixing stock monsters errors completely;
- ... others ?

These are implemented (and others might be implemented as well) in any kind of MonsterHunt game-type. Exist a small trick to have server in MH browser - game controller is different because I don't need any interference with old controller to spread errors. MH ideea was awsome for everybody - not the controller. In fact I think I'll name this game MonsterKiller to not awake any doubt, even to use maps named LH - (lamer hunt) or others like these added as MonsterHunt maps but having nothing in common with default MonsterHunt game.

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: Need More Fixes ?

Post by Nelsona » Thu Jun 06, 2013 12:51 am

:!:
I'll be busy for a while.
Explanation. I started a few months ago at other stock monsters. In case you failed reading logs from game (any Local, Server dedicated or non-dedicated), Monsters develop errors and I think I'll get rid of them.

All common troubles are coming from Accesed Nones. What are these ? Attempts to deal with unexistent things. For me masking them or starting a silent console is not a solution.
A bunch of sequences done by Epic are messing up codes developing a mess. Why default monster won't do anything for Bot (only called by game - pushed in battle) ? Is time to rework attitude and others. Assuming if we have at least PC from 2004 2005 and or newer and a server is not rendering or making noise I'll rework monster as follows:
- Monster for MH has a purpose - kill hunters and destroy his mission objectives not other Monsters (if anybody can do some monster settings) - was completed;
- monster has a default attack range 500 (used for pawns non-humans) - enhanced to 1800 (to test intensive) - Bot has 1600;
- monster is not a great roamer - for default more than 4 roamers are blocked - is time to extend roamers at 50 pieces to bring some action - tests are recommended;
- monster doesn't deal too much with fear - why I need to seee their fear ?
- monster have some code buging me bad - attempt actions for unexistent things - a bunch of functions were messed up for this chapter.
- prevent idiotic mapping by default - monster intended to trigger itself or other the same class won't do this - You will be surprised to see still craps used even in 2012-2013 after 10-15 years of UT - You are unable to learn something in 10 - 15 years ? Good... keep being addicted then.

In a Script we might see Accesed None so we have to avoid this using:
if (Something != None). Translated somehow we are doing an action if a something is different from NONE, or else will be a None nice accesed I started to hate this guy NONE being accesed by everybody like a cool Web-Page. All fixes are gonna be solved using handlers and others meant to stop pawns attacking a NONE target or Adjusting Aim to a NONE target.
Other things are more or less nasty depending on understanding:
1 Spawn something
2 Put light to Something
3 Asses an effect to Something
Points 2 and 3 might develop errors. Why ? We must to be sure if "something" was spawned:
1 Spawn Something
if (Something != None) // If Something is different from that guy NONE because spawning might fail sometimes depending on location
{
2 Put light to Something
3 Asses an effect to Something
}
Else sequences 2 and 3 will act like this:
2 Put light to NONE - Accesed NONE
3 Asses an Effect to NONE - Accesed NONE

Tons of GB are messing up like this and people are complaining about a server-crash. Better get rid of such cool stuff who spam errors and keep them in a decent limit as much as possile. Or... fix them. Clowns uncaching stuff can delete their content if were cool noobs with 15 GB of UT for playing in public servers.

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: Need More Fixes ?

Post by Nelsona » Mon Jul 01, 2013 12:36 am

Good day ?

I don't know if I need to keep some lines for future monsters. Why I'm saying this ? Maybe you will understand something from this chain of codes finalized with a totally VOID. Is about sounds and fearsounds or whatever crappy unexistent sounds (not only animation sequences are missing - LOL)
Skaarj (generally - original code)

Code: Select all

function PlayFearSound()
{
	if ( bCanSpeak && (TeamLeader != None) && !TeamLeader.bTeamSpeaking )
	{
		phrase = 'Fear';
		phrasesyllable = 0;
		Speak();
		return;
	} 
	Super.PlayFearSound();
}
Phrase ? Good ideea. But... watch later (original code)

Code: Select all

function Speak()
{
	local float decision, inflection, pitch;
	
	//if (phrase != '')
	//	SpeakPhrase();
	bIsSpeaking = true;
	if ( FRand() < 0.65)
	{
		inflection = 0.6 + 0.5 * FRand();
		pitch = voicePitch + 0.4 * FRand();
	}
...
SpeakPhrase not exist but we have an useless "phrase" declared. Meh, let's forget this sequence stepping on "Super.PlayFearSound()"
Super means Call to parent ScriptedPawn
There is simple (original code)

Code: Select all

function PlayFearSound()
{
	if (Fear != None)
		PlaySound(Fear, SLOT_Talk,, true); 
}
My question is WHY ? This chain has no Fear sound so I think is just stupid.
Fearless.JPG
I cannot see any sound related to fear just useless codes called.
Maybe we need this (suggested code):

Code: Select all

function PlayFearSound()
{
	if ( bCanSpeak && (TeamLeader != None) && !TeamLeader.bTeamSpeaking )
	{
//		phrase = 'Fear';
//		phrasesyllable = 0;
		Speak();
		return;
	} 
//	Super.PlayFearSound();
}
Since they used "//", I think I need to complete these "//", maybe are cute and effects are the same speeding up a bit these dumb calls to the VOID.
You do not have the required permissions to view the files attached to this post.

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: Need More Fixes ?

Post by Nelsona » Thu Jul 11, 2013 3:46 pm

Back with notes

If you see something like "Engine.Decoration.SkinnedFrag... Accesed None" maybe is time to rework these more properly overriding default without any Super...... call. Simple.
Old code: (a kind of mess as I can see ....)

Code: Select all

simulated function skinnedFrag(class<fragment> FragType, texture FragSkin, vector Momentum, float DSize, int NumFrags) 
{
	local int i;
	local actor A, Toucher;
	local Fragment s;

	if ( bOnlyTriggerable )
		return; 
	if (Event!='')
		foreach AllActors( class 'Actor', A, Event )
			A.Trigger( Toucher, pawn(Toucher) );
	if ( Region.Zone.bDestructive )
	{
		Destroy();
		return;
	}
	for (i=0 ; i<NumFrags ; i++) 
	{
		s = Spawn( FragType, Owner);
		s.CalcVelocity(Momentum/100,0);
		s.Skin = FragSkin;
		s.DrawScale = DSize*0.5+0.7*DSize*FRand();
	}

	Destroy();
}
If looks OK... I have another proposal

Code: Select all

simulated function skinnedFrag(class<fragment> FragType, texture FragSkin, vector Momentum, float DSize, int NumFrags) 
{
	local int i;
	local actor A, Toucher;
	local Fragment s;

	if ( bOnlyTriggerable )
		return; 
	if (Event!='')
		foreach AllActors( class 'Actor', A, Event )
			A.Trigger( Toucher, pawn(Toucher) );
	if ( Region.Zone.bDestructive )
	{
		Destroy();
		return;
	}
	for (i=0 ; i<NumFrags ; i++) 
	{
		s = Spawn( FragType, Owner); //Let's TRY to spawn - Yes - is just a try...
		if ( s != None ) //If is Spawned will happen events from parenthesis, if not,
				// won't happen nothing, LOOOL to NONE this time, :P
		{
			s.CalcVelocity(Momentum/100,0);
			s.Skin = FragSkin;
			s.DrawScale = DSize*0.5+0.7*DSize*FRand();
		}
	}

	Destroy();
}
End of episode.

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: Need More Fixes ?

Post by Nelsona » Thu Aug 22, 2013 10:29 pm

Toying with a lost game MonsterHuntArena I was thinking to do replacements which bugged Skaarj in other way:

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;
//Section Power-Tweak 2013
			if (Inventory(A).IsA('Weapon'))
			{
				W = Weapon(Inventory(A));
				W.PickupMessageClass = Class'Botpack.PickupMessagePlus'; //Some Big Normal Tournament anouncement at pickup 
				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;
						W.Touch(P);
					}
				}
			}
//End of Power-Tweak 2013
		}
	}
	if ( A != None )
	{
		A.event = Other.event;
		A.tag = Other.tag;
		A.RotationRate = Other.RotationRate;
		return true;
	}
	return false;
}
If you think that using Pawn is bad, use ScriptedPawn. Now I removed some lines from Timer because this one seems to works well. This function is placed original in Engine.Mutator (yes, Engine...). For other mutators can be rewrited properly.

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: Need More Fixes ?

Post by Nelsona » Sun Aug 25, 2013 1:53 am

And because I spoke about A.I. and weapons...

Adding in a map 30 ammo spots almost locking Bot over there and spamming console is very bad ideea.

Things are simple. Ammo need to be spreaded, a faster respawn time is helpfull. And.... MOD ITSELF might be crap (more mods) if is using Regeneration to a higher level, this thing need to be anounced even at ammo not only in healing replacements. Bot can read if ammo is rescalled and it won't desire ammo if weapon is loaded well. Neither to see player camping in ammo spots just to load LocalLog useless (if is used - not me).

Code: Select all

function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
{
...
...
...
	if ( Other.IsA('Ammo') && !Other.IsA('WarHeadAmmo') )
	{
		Ammo(Other).MaxAmmo = Ammo(Other).Default.MaxAmmo * MaxAmmoMultiplier;
	}
Always a simple code before bSuperRelevant, is doing a much better work than a ton of lines.
Where MaxAmmoMultiplier can be debated in ammo regeneration as well for a proper match, even declared configurable as needed.

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: Need More Fixes ?

Post by Nelsona » Sun Aug 25, 2013 8:17 am

Another subject, removing some blindness in CTF games.

Higher spots a bit far from paths might lead in camping happy with the flag (I spoke somewhere), nothing can be changed and time is passing. For bot there is a solution to find carrier even is a bit out of paths. At 1000 UU distance and a few units higher Bot can still smell the carrier if exist an open line between carrier and a NavigationPoint.
example:

Code: Select all

......
			else if ( aBot.Orders == 'Attack' )
			{
				// break off attack only if needed
				if ( bSeeFlag || (EnemyFlag.Holder != None) 
					|| (((FriendlyFlag.Position().Region.Zone != FriendlyFlag.Homebase.Region.Zone) || (VSize(FriendlyFlag.Homebase.Location - FriendlyFlag.Position().Location) > 1000)) 
						&& ((aBot.Region.Zone != EnemyFlag.Region.Zone)
							|| (VSize(aBot.Location - EnemyFlag.Location) > 1600) || (VSize(aBot.Location - FriendlyFlag.Position().Location) < 1200))) )
				{
				FriendlyFlag.bKnownLocation = true;
				aBot.MoveTarget = aBot.FindPathToward(FriendlyFlag.Position());
				if ( aBot.MoveTarget != None )
				{
					SetAttractionStateFor(aBot);
					return true;
				}
// Attaching New A.I.
				else
				{
					FindPathToThreat(aBot);
					if ( aBot.MoveTarget != None )
					{
						SetAttractionStateFor(aBot);
						return true;
					}
				}
// End of simple hunt
....

function FindPathToThreat(Bot aBot)
{
	local CTFFlag FriendlyFlag;
	local NavigationPoint N, TPoint;
	local int Dist, GoodDist;

	FriendlyFlag = CTFReplicationInfo(GameReplicationInfo).FlagList[aBot.PlayerReplicationInfo.Team];
	GoodDist = 4000; //Assuming some weapons high rated are .... in fact :|
	for ( N=Level.NavigationPointList; N!=None; N=N.NextNavigationPoint )
	{
		if (N != None && !N.IsA('Teleporter') && VSize(FriendlyFlag.Position().Location - N.Location) < 4000 && FastTrace(FriendlyFlag.Position().Location,N.Location))
		Dist = VSize(FriendlyFlag.Position().Location - N.Location);
		if ( GoodDist > Dist && Dist > 40)
		{
			TPoint = N;
			GoodDist = Dist;
		}
	}
	if ( TPoint != None )
	{
		if (aBot.ActorReachable(TPoint))
		{
			aBot.MoveTarget = TPoint;
			if (FriendlyFlag.bHeld && FriendlyFlag.Holder.Health > 0 && FriendlyFlag.Holder != None )
				aBot.Target = FriendlyFlag.Holder;
		}
		else aBot.MoveTarget = aBot.FindPathTo(TPoint.Location);
	}
}
After adding these I took Enemy-Flag and I camped where usually I couldn't have a problem to prepare a coffe. This time enemies killed me and almost won the match. I need to change my old habbits.

Don't worry, is place for more good improvements if I'm facing a new controller.

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: Need More Fixes ?

Post by Nelsona » Wed Aug 28, 2013 3:43 pm

Good whatever (day, night, etc.)

I just recalled some of my first moments ON-LINE playing (the mostly assuming playing) CTF. A few players were fast. They used very often Translocator to travel at enemy Base.

Because I want to copy in big parts such CTF, I cloned some attitude at Bots. Small advantages exists at once with issues, Bot has speed in execution but not always enough Brain. In a kind of CTF game I just modified some A.I. control and I think I can do more if I learn more functions.
News and options ?
Let's see:
- travel using randomly Translocator (do not ask for doors yet);
- recovering Flag even if a camper is resting in a higher spot out of paths (at least will decrease number of camping places);
- also a flag throwed on higher place has chances to be recovered even without JumpSpots or TranslocDest - not always but is possible;
- support for ScriptedPawns;
- support for OLD weapons.

Basic travel used in default CTF:

Code: Select all

if ( aBot.MoveTarget != None )
{
	SetAttractionStateFor(aBot);
	return true;
}
That's usually in purpose to set Bot on move when a path to a certain destination has been found.

Now... a beta basic crappy extension - say what you want.

Code: Select all

if ( aBot.MoveTarget != None )
{
	if ( FRand() > 0.6 && aBot.MyTranslocator != None && aBot.bCanTranslocate && !aBot.Region.Zone.bWaterZone && !aBot.IsInState('Attacking'))
		aBot.TranslocateToTarget(aBot.MoveTarget);
	else
	{
		SetAttractionStateFor(aBot);
		return true;
	}
}
Can you imagine how works this ? Feel free to experiment what you need.

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: Need More Fixes ?

Post by Nelsona » Fri Aug 30, 2013 1:28 am

Other small add-on ?

I fought with Bot in Red base in map CTF-Command even in other more tuned version. I boosted a Bot into acid. Poor guy... Will die ? I don't know. Depends on ...

Code: Select all

function FindSpecialAttractionFor(Bot aBot)
{
....
local NavigationPoint NP;
...
	if ( aBot.PlayerReplicationInfo.Team == 0 )
		EnemyFlag = CTFReplicationInfo(GameReplicationInfo).FlagList[1];
	else
		EnemyFlag = CTFReplicationInfo(GameReplicationInfo).FlagList[0];
//Add-on: Attempt to teleport out of damage zone even if has flag - LIFE is Priority, flag will return anyway
//Step 1) Try to ignore flag and go higher for less damage
	if ( aBot.MyTranslocator != None )
	{
		if (aBot.Region.Zone.bWaterZone && aBot.Region.Zone.bPainZone && aBot.FootRegion.Zone.bPainZone)
		{
			if ( !aBot.bCanTranslocate && EnemyFlag.Holder != None && EnemyFlag.Holder == aBot ) //even if has flag has chances to save life
				aBot.bCanTranslocate = True;
			aBot.velocity.Z = 380; //Data from JumpOutOfWater() and attempt a clear firespot
		}
//Step 2) A NavigationPoint in closer range and visible is a target for my translocation
		if (!aBot.HeadRegion.Zone.bWaterZone && aBot.FootRegion.Zone.bWaterZone && aBot.FootRegion.Zone.bPainZone)
		{
			foreach aBot.RadiusActors (class 'NavigationPoint',NP,800)
			{
				if (NP != None && !NP.Region.Zone.bWaterZone && aBot.LineOfSightTo(NP) && aBot.bCanTranslocate )
				{
					aBot.MoveTarget = NP;
					aBot.MoveTimer = 1.00;
					aBot.TranslocateToTarget(NP);
					break; //Probably need to recover itself... Is so scared...
				}
			}
		}
	}
Assuming other kind of tunes are recommended and possible, I'll teach some classes for DEFAULT Bots in purpose to make them better.
In case I forgot to mention, I need functionality and challege, not COLORS.

Post Reply