Short Bot Note

Need some nice Mods? Here, you are right!
Spectra
Masterful
Posts: 542
Joined: Tue Jan 22, 2013 5:23 pm
Personal rank: Nullified!
Location: (X) Unable To Locate....

Re: Short Bot Note

Post by Spectra »

Barbie wrote:

Code: Select all

if(Level.Title == AnyTweaker[i].MapTitle)
I'd not use Title but the map name here - Title is not necessary unique among a set of maps...
That is experiment.
Ofc I am going to use Map names instead of title.
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Short Bot Note

Post by sektor2111 »

Meh...
I like LandsOfNapali - Not original of course. Why ? See bellow:
- There are zones stupidly done with no paths - Bot will stay there 3 months;
- There are spots blabbering a navigation loop That area with Minigun and Sniper near starts;
- That MyLeveled "awesome" Flak has a bullshit code, at a moment it spams crap;
- The rest of 1000 Navig.Points I think can be removed by... using a nasty solution - removing all pickups, build paths, add pickups back - Why Nasty ? Because of mods still messing with default replacement method which is primitive as brainless worm.

To be honest with you I have changed it, and it will use a SFC package (that super flak) from an outside "outer" FIXED. Several NavigationPoints can be deleted because are pointless. If I check all details I think I can get rid of 50 PathNodes without to affect Bot. In large areas I can prevent a lost Bot using an Internal actor able to recover mindless Bot boosted out of path-net.
Take a look at this. You might call it The Pill For Eyes

Code: Select all

class NoLost expands Actor;

var() float Interval;
var() int RangeRun;
var bool bGoodSet, bReady;

event PostBeginPlay()
{
	if ( Interval > 4.00 )
		bGoodSet=True;
	else log (Self.Name$" >> Check Settings, Bad move!");
}

function CheckLost()
{
	local Bot aBotyMan;
	local PathNode N, N1;
	local int BestPointDist;

	BestPointDist = RangeRun;
	foreach AllActors (class 'Bot', aBotyMan)
	{
		if ( !aBotyMan.bHidden && aBotyMan.Health > 0
		&& aBotyMan.Enemy == None && aBotyMan.Orders != 'Follow'
		&& aBotyMan.MoveTarget == None && aBotyMan.IsInstate('Wandering') )
		{
			if ( !NearbyNode(aBotyMan) )
			{
				foreach RadiusActors ( class 'PathNode', N, RangeRun , ABotyMan.Location)
				{
					if (VSize(N.Location-aBotyMan.Location) <= BestPointDist && FastTrace(N.Location,aBotyMan.Location))
					{
						N1 = N;
						BestPointDist = Vsize(N.Location - aBotyMan.Location);
					}
				}
				if ( N1 != None && aBotyMan.FastTrace(N1.Location,aBotyMan.Location))
				{
					aBotyMan.Target = N1;
					aBotyMan.MoveTarget = N1;
					aBotyMan.bCamping = False;
					aBotyMan.PlayRunning();
					aBotyMan.GotoState('Roaming','SpecialNavig');
				}
			}
		}
	}
}

function bool NearbyNode(Bot aBotyMan)
{
	local bool bIsNearby;
	local Pathnode P;

	bIsNearby = False;

	foreach RadiusActors( class 'PathNode',P,500,aBotyMan.Location )
	{
		if ( FastTrace(P.Location,aBotyMan.Location) )
		{
			bIsNearby = True;
			break;
		}
	}
	return bIsNearby;
}

state FixSeeker
{
Begin:
	Sleep(3.00);
DoLooping:
	if ( !Level.Game.bGameEnded && bGoodSet )
		CheckLost();
	else
		Goto('TheEnd');
	Sleep(Interval);
	Goto('DoLooping');
TheEnd:
}

defaultproperties
{
     InitialState=FixSeeker
}
If you have a Level with plane large areas you don't even need a bunch of nodes, just a line from Begin to End, and if by chance a "player" is getting lost will track the nearest PathNode as a Destination. Some "Polge" said that entering The Path-Network is expensive. No shit me, I think They might enter in Path-Network with only 0.01 Penny as cost even from 4000 UU with 0 troubles (range is configurable depending on Level needs) IF we speak about PLANE Bigger areas, else different trackers might sustain what "FindPathToward" is doing sucks as it is, if pawn is very far, and I find it stupid since C++ has a superior power to UScript and looks like this MyLeveled crap doesn't lag anything and I did not use it in Nail-Box type maps, it was a big one + the rest of "pushers".
So each day passing I think that some of those original DOCS are garbage for sustaining fire during winter - fuel so to speak because... they didn't even know what is doable in this Engine. Already MBot can recover Paths from long ranges + my MH2 unlocks such things as well - I think I'll go for more but I must see if I can optimize code much better.
To summarize is place for good things at this chapter.
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Short Bot Note

Post by sektor2111 »

So perhaps this is more closer to normal - less errors, hunting more convinced in DM, prevent dumb running forever in MH, and the most of "if (SomethingAccessed != None)", I'm curious if I could destroy these errors...
[attachment=1]MBot_A.zip[/attachment]

The rest of MH maps problems are revealed by tester tool (works even in servers if is "Packaged") - ONLY for default MH and similar compilations, not all known MH2 types containing Bot Stuff...
[attachment=0]MHBotyMan3.zip[/attachment]


Edit:Obviously I did a small research in "compiling ugly" way. Explanation, I'm looking for a proper solution in replacing AssaultRadomizer, JumpSpot, TranslocatorStart, and such. I can't promise nothing yet, perhaps later, these days are a bit boring for me, I'll sort out some time for different things... For the moment I have removed all paths without to crash game with Bot which is a Start.
Attachments
MHBotyMan3.zip
(413.04 KiB) Downloaded 140 times
MBot_A.zip
(5 MiB) Downloaded 147 times
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Short Bot Note

Post by sektor2111 »

Bump:
MBot changed to version without "return;" except iterators and tiny updates according to NavPoints less friendly.
Technically this is MBot_B.
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Short Bot Note

Post by sektor2111 »

Back into Bot Chapter.
I've done a new update MBot_C. Quoting small... changes:
- if some desired inventory spot distracting Bot around has a weapon on a nearby box (or a sort of higher spot) MBot might go for it. More relevant is a testing Level included in package for testing. Use 1 Bot and then use 1 MBot_C, do spectate each of them separate.
- a few iterators are going to use last XC_Engine only if is found installed so to speak won't create file dependencies.

If this update is not good, see source-code for fixing or delete archive.

Edit:Archive updated with both compressions useable (LZMA/UZ)
[attachment=0]MBot_C.zip[/attachment]
Attachments
MBot_C.zip
Archive updated with LZMA and UZ compression (lzma was wrong - older compilation)
(7.1 MiB) Downloaded 133 times
User avatar
OjitroC
Godlike
Posts: 3605
Joined: Sat Sep 12, 2015 8:46 pm

Re: Short Bot Note

Post by OjitroC »

There is certainly a difference between the behaviour of MBot_C and both the previous versions and the default bots. MBot_C is now much more likely to go for inventory items that are in elevated locations (on top of boxes for example) and, I think, more likely to go for inventory items per se. Still less likely to go for health items though.

The only (slight) downside I have observed (and this may be due to the maps as much as anything else) is that MBot_C uses the translocator more often and sometimes in inappropriate locations; also it may attempt to follow the player or another bot up on to a box or ledge, resulting in a telefragging.
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Short Bot Note

Post by sektor2111 »

OjitroC wrote: also it may attempt to follow the player or another bot up on to a box or ledge, resulting in a telefragging.
Indeed here I might try to avoid <taken> targets (in hoping to not see engine mooing at me - because will need other heavy check then). The goal on purpose was to be more interested about loading weaponry and using even translocator for speed. But I might do small changes. The truth is that I did not love in Deck16][ their less interest for PulseGun (only in combat they were being interested about it) else even BotyMan3 proved me what dumb pathing was done there in some spots (around minigun). I might think well at some solution against triangle looping as that Deck does... because so far it was a harder job, maybe adding cost temporary for spots which are too often roamed for being interested in alternate routes... heck new variables new resets...
User avatar
OjitroC
Godlike
Posts: 3605
Joined: Sat Sep 12, 2015 8:46 pm

Re: Short Bot Note

Post by OjitroC »

sektor2111 wrote:The goal on purpose was to be more interested about loading weaponry and using even translocator for speed.
They're certainly more interested in loading weaponry now - also, now you mention it, I do notice MBot_C using the translocator for speed, to get on to a ramp from the ground for example - just have to make sure that you're not too close when they do.
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Short Bot Note

Post by sektor2111 »

Bumpee
- Regarding to some update which I was doing "_D" suffix in cause -
I made a few changes at Wall encroaching while Bot goes down-way Bugs a la DM-Grit-Tourney in RocketLauncher spot. I went into some troubles in exchange bugging me. While I can setup path in very nasty small locations, I could not manage well innocent "Hitwall" calls as long a Bot can use even a rope closer to a wall for navigation and then... it will fall there.
I was interested in recreating those down-way bugs as in fore-mentioned Level but I cannot do them :noidea , default Bot managed well such locations, MBot uses aggressive jumps to get away from walls both of them being pretty functional. While map is well aligned at grid and brushes well separated, things do work properly so I cannot setup a demo bugged Level on purpose. I have used Semisolids for ground and small walls without a single BSP problem (small Level indeed) which was build in aprox. 200-300 ms :| .

But because I have somehow failed in creating a stupid bugged Level, I went to spread Bot into 2 entities for a better functionality. This will help somehow CTFGame (any CTF Game). If Bot carrier is a super-duper survivor, after bringing enemy Flag at Home, it will go for a new capture... without selecting an AlternatePath :( . In this case MBot_D is able to randomize 70% an AlternatePath to enemy base even if he/she did not died/respawned making it more efficient in switching routes - THIS feature is available by ONLY using XC_Engine, else it won't be active. Also this secondary entity will manage Bot sensitivity toward a visible Pawn when Engine is "forgetting" SeePlayer and/or Pawn is not a player and/or Bot defending is very busy to look at a wall ignoring threat, and it works in full Bot's SightRadius range using Higor's iterators (apology, but I will abuse that stuff as long as it do works perfectly).
I just need to do more tests around zones/Maps with "Falling" chances for figuring if other things are needed.
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Short Bot Note

Post by sektor2111 »

Bump topic with some facts which I think they have to be known.
@Rocky
Speaking about translocations and different jumps during movement between 2 nodes I guess we don't have too many options, looks like Bot is in "latent" guidance and Engine is taking ledges and walls in account - "MoveTo" "LoopAnim" are native - looks like not much things gets called when Bot goes retarded so I'm out of responses - in hoping to not wrong here. However, I have manged now pretty well knee obstructions getting rid of some codes running in state roaming which weren't that helpful. Else if MBot has a visible enemy won't stop at translocation and will stay moving if target is whatever Non JumpSpot thing - see TranslocatetoTarget - change conditions related to "SpecialPause".
Then the most helpful is secondary entity which attack in certain conditions even if Bot is busy with latent movement ignoring stupid buggers and staying stuck in ledge. By using XCGE, MBot_D loads a controller (secondary brain) which injects some stuff in kicker style (external pushing) but calling only Bot internals things. WE have by example:
- Pawn moving not in lift and not waiting at lift and not in water;
- Movement speed is almost 0;
- Head (eyes can see moving goal) but legs cannot trace destination.
THEN start increasing obstructed cycles 1 cycle at 0.3 seconds - if we have 8 cycles this means pawn is in troubles - DO JUMP
If moving speed is high (close to normal) decrease cycles if are bigger than 0. And... now Bot can perform a needed jump if goes stuck in "Vertex" craps. If a BSP is very ugly (insane higher barrier) probably not even human won't deal with that - fix map.
I prefer this unlocking stuff done VIA XCGE because those iterators doesn't increase internal cycles count (said by Higor) and looks faster. Without XCGE secondary brain won't be used.

Another stupid thing.
A small space like a column did a good trace to a ShieldBelt and Bot was attempting to get the shield through a small hole running at wall forever due to "PickLocalInventory" crap. It's probably time to do multiple traces: Head has line to item ? Chest ? Left Shoulder ? Right Shoulder ? NO ? Then quit being an idiot and follow paths normally for getting that item and stop doing a shortcut through rat holes.
These being spoken I'm gonna do some checks - MH-Canyon, MH-TheBeginning, some DM with more "damaged wood" with knee obstructions, etc. I'm sorry but walls in different angles doesn't call HitWall so I don't see valid recovery solutions.
Edit:
I see that (after fixing pathing even for default Bot) MBot_D doesn't have troubles here even configured medium skilled...
[attachment=0]And_Small_BT.JPG[/attachment]
Attachments
Using custom stuff for Navigation around nasty areas.
Using custom stuff for Navigation around nasty areas.
Spectra
Masterful
Posts: 542
Joined: Tue Jan 22, 2013 5:23 pm
Personal rank: Nullified!
Location: (X) Unable To Locate....

Re: Short Bot Note

Post by Spectra »

For Run and Translocate, I simply made copy of TranslocateToTarget() and removed the specialpause, but it is still not stable. I will be needing your suggestions here.
This is inside State Roaming > PickDestination().

Code: Select all

if((MyTranslocator != None) && !Region.Zone.bWaterZone && PlayerReplicationInfo.HasFlag == None)
		{
			if(RouteCache[2] != None && !RouteCache[2].Region.Zone.bWaterZone)
			{
				if(VSize(RouteCache[2].Location - Location) > 500 && VSize(RouteCache[2].Location - Location) < 910 && FastTrace(RouteCache[2].Location, Location))
				{
					TranslocateToTarget2(RouteCache[2]);
					return;
				}
			}
		}
Here is TranslocateToTarget2():

Code: Select all

function TranslocateToTarget2(Actor Destn)
{
	foreach AllActors(class'TranslocatorTarget',TT)
	{
		if(TT != None && TT.Instigator == Self && TT.Instigator != None )
		{
			PlaySound(MyTranslocator.AltFireSound);
			//TT.LifeSpan = 1.0;
			TT.Destroy();
		}
	}

	PendingWeapon = MyTranslocator;
	MyTranslocator.DesiredTarget = Destn;
	//if ( Weapon == None )
		//ChangedWeapon();
	if ( Weapon != PendingWeapon )
		Weapon.PutDown();
	else
		MyTranslocator.PlayPostSelect();

	MoveTarget = Destn;
	DesiredRotation = Rotator(MoveTarget.Location - Location);
}
Btw, I don't know if it is GameClass bug or MBot bug, but when I enable god mode and it works (No Damage taken), but after I kill MBot and then it respawns and starts shooting me again, then I get damage. Why??

Also here how I solved the Sound import problem. I assume that when you had sound issue your defaultproperties would be like this:
Spoiler

Code: Select all

defaultproperties
{
     CarcassType=Class'Botpack.TMale1Carcass'
     drown=Sound'Botpack.MaleSounds.(All).drownM02'
     breathagain=Sound'Botpack.MaleSounds.(All).gasp02'
     HitSound3=Sound'Botpack.MaleSounds.(All).injurM04'
     HitSound4=Sound'Botpack.MaleSounds.(All).injurH5'
     Deaths(0)=Sound'Botpack.MaleSounds.(All).deathc1'
     Deaths(1)=Sound'Botpack.MaleSounds.(All).deathc51'
     Deaths(2)=Sound'Botpack.MaleSounds.(All).deathc3'
     Deaths(3)=Sound'Botpack.MaleSounds.(All).deathc4'
     Deaths(4)=Sound'Botpack.MaleSounds.(All).deathc53'
     Deaths(5)=Sound'Botpack.MaleSounds.(All).deathc53'
     GaspSound=Sound'Botpack.MaleSounds.(All).hgasp1'
     UWHit1=Sound'Botpack.MaleSounds.(All).UWinjur41'
     UWHit2=Sound'Botpack.MaleSounds.(All).UWinjur42'
     LandGrunt=Sound'Botpack.MaleSounds.(All).land01'
     JumpSound=Sound'Botpack.MaleSounds.(All).jump1'
     VoicePackMetaClass="BotPack.VoiceMale"
     HitSound1=Sound'Botpack.MaleSounds.(All).injurL2'
     HitSound2=Sound'Botpack.MaleSounds.(All).injurL04'
     Die=Sound'Botpack.MaleSounds.(All).deathc1'
}
Just remove those MaleSounds.(All) and it should play sound rather than importing everything again.
Like this:
Spoiler

Code: Select all

defaultproperties
{
     CarcassType=Class'Botpack.TMale1Carcass'
     drown=Sound'Botpack.drownM02'
     breathagain=Sound'Botpack.gasp02'
     HitSound3=Sound'Botpack.injurM04'
     HitSound4=Sound'Botpack.injurH5'
     Deaths(0)=Sound'Botpack.deathc1'
     Deaths(1)=Sound'Botpack.deathc51'
     Deaths(2)=Sound'Botpack.deathc3'
     Deaths(3)=Sound'Botpack.deathc4'
     Deaths(4)=Sound'Botpack.deathc53'
     Deaths(5)=Sound'Botpack.deathc53'
     GaspSound=Sound'Botpack.hgasp1'
     UWHit1=Sound'Botpack.UWinjur41'
     UWHit2=Sound'Botpack.UWinjur42'
     LandGrunt=Sound'UnrealShare.Male.MLand3'
     JumpSound=Sound'Botpack.jump1'
     VoicePackMetaClass="BotPack.VoiceMale"
     HitSound1=Sound'Botpack.injurL2'
     HitSound2=Sound'Botpack.injurL04'
     Die=Sound'Botpack.deathc1'
}
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Short Bot Note

Post by sektor2111 »

Eh, if I'll post in slopes it's because on wine... all right, let's see first something, and then I still have a small/big issue with slants angle surfaces a la MH-Forbidden type vs Wick Bot left alone to roam for items first and it do still roam at wall randomly - IDIOT ! This bug is a hard hunt - I see it in server more hard to catch.

Oke, TranslocateToTarget doesn't need a rename, it needs rewritten.
A sort of suggestion:

Code: Select all

function TranslocateToTarget(Actor Destn)
{
	local float Distance;

	PendingWeapon = MyTranslocator;
	MyTranslocator.DesiredTarget = Destn;
	if ( Weapon == None )
		ChangedWeapon();
	else if ( Weapon != PendingWeapon )
		Weapon.PutDown();
	else
		MyTranslocator.PlayPostSelect();
	MoveTarget = Destn;
	DesiredRotation = rotator(MoveTarget.Location - Location);
	Distance = VSize(MoveTarget.Location - Location);
	if ( Enemy == None || (Enemy != None && !LineOfSightTo(Enemy)) )
		SpecialPause = (Distance*1.7)/450; //Presuming at 500 we need 1.7 seconds then... for 1100 need more
//	SpecialPause = 1.5; //Drop this in toilette
}
First is more patience - it do helps in good moments.
Then, If NO ENEMY or ENEMY IS NOT REALLY VISIBLE use pause, (else you can take in account Z location) - sometimes waiting is a NEED. I prefer to not have them as easy target camping at translocation - I took in account my Bots VS the rest of insane combatants which are aiming well in higher skill with "static" targets.
Like I said and read well in roaming Bot internals reacts in NavigationPoints locations the rest seems really latent and doesn't offer many options. Secondary brain can react better altering latent code.

I gotta hunt that slant crap (what you did, Polge ???). Else, If I cannot stop execution I might hijack it to not happen in infinite loops VIA secondary brain which seems to have a lot of importance after all. Oke... thinking...
PS: Probably I won't solve it (calling Higor... buzzzz) if it's about a trace line through a slant surface Not Floor and Not Wall which reacts stupidly toward Bot traces because I could see this bug in other such instances as well... recalling even some stupid Kralls doing the same sh!t and they are good navigators not like pupaes...
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Short Bot Note

Post by sektor2111 »

Moving things here:
It's time to no longer go for items felt in Death Zones (Lavas, Acids, etc.) - due to some Pinata "feature" you might have such a party with weapons dropped at bottom of Lava :omfg:. Also mod doing such (a MH2 on purpose) has been rewritten at this point - I might be removing a lot of old codes which I was using - they don't help Boty Spree, and neither Monster Spree.

Edit:
I've figured old post:
Reply related to God mode:
MBot kills everything kill-able - No bullshit cheating - I'm getting tired of Bot firing BioRifle/GesBioRifle at Slith/LavaSlith (lol Shrimp - acid and lava are 2 different things) with no result and looking like a retard - so MBot doesn't recognize GODs - it removes your "feature" as long as they are normal and fight with a normal enemy for BALANCE and FAIR PLAY. If you want your's back, do it, at this moment I'm happy to see MBot Navigating around BlockMonsters, killing any creature, and Covering me for real.
Nice occurrence: I was firing BioRifle at Sliths (no other weapon in that map unlocked for the moment) without much results until MBot was showing up there, then things went back to normal - as you can see MBot is a trusted player. (later I fixed map - Sliths there :lol2: )
Spectra
Masterful
Posts: 542
Joined: Tue Jan 22, 2013 5:23 pm
Personal rank: Nullified!
Location: (X) Unable To Locate....

Re: Short Bot Note

Post by Spectra »

In CTF-Entropy, MBot was constantly trying to translocate to a teleporter which was failing and then going to state wandering for some time.
For now I did this...

Code: Select all

JL3160:
		if ( MoveTarget != None && !MoveTarget.IsA('Teleporter') )
		{
			if ( MoveTarget.Base == None 
			&& MoveTarget.Location.Z > Location.Z + CollisionHeight + MaxStepHeight
			&& LineOfSightTo(MoveTarget) && MoveTarget.Location.Z - Location.Z < 801
			&& !FastTrace(FootRegion.Zone.Location, MoveTarget.Location+vect(0,0,-20)) )
			{
				if ( bCanTranslocate && !MoveTarget.Region.Zone.bWaterZone && !HeadRegion.Zone.bWaterZone )
					TranslocateToTarget(MoveTarget);
			}
		}
Maybe translocating directly on a teleporter is not a good idea.
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Short Bot Note

Post by sektor2111 »

Hm... I could see MBot translocating to sWJumpad (which is a sort of teleporter) and it worked... but of course for preventing troubles this sanitizer can be added... what can we do it's even using a FRand() with a slower rate, trying to stop doing the same thing all time, Yesterday evening in exchange that jump-down for items in lava did a real map break... I have to update Bot with your code too. Then I'll post XC_Booster (I'm gonna abuse Higor's iterators as long as they don't load iterations cycles and they look like work pretty fast).
Post Reply