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 »

I am assuming all this goes in Roaming --> PickDestination().

Apart from that, just like in MH-Canyon, something similar happens in MH-LandsofNaPali, where bot gets stuck at doors. They are not getting feeling that door is blocking them!
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 »

Not PickDestination, like I said it's state roaming label "Moving:". I have to update these into repository for clarification.
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 »

Related to Bot Pathing and this topic, I get rid of XC_Core clocking dependency used in BotyMan2 and I have removed all XC stuff from a clean client in order to check V3 which I've modified using even a couple of stock sounds - I don't want any other file, a clean tool perhaps is better. So to speak...
BotyMan3.zip
(353.48 KiB) Downloaded 133 times
should be a stand-alone tool for testing purpose.
For CTF due to default NavigationPoints limitations I'm not sure if is a good move to write a testing tool. TranslocStart/TranslocDest together might develop a crappy crash as I could see in a random occurrence or something went wrong at default collision deal.
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 »

At this moment I was looking at a solution for Bot when sometimes runs at walls. The wise thing is to remove or tweak stuff or else more things will get messy. While I was preventing such things I see nasty things in DM-Zeto. Due a fascinating trigger placement centered in wall for opening Shield room. If Bot is tweaked to not run in walls it won't open ever such things. Else if develop nasty things in maps is better to quit using dumb works. I have rewritten this MBot a bunch of times due to Navigation Issues and at a moment each solution was developing a funky thing later. That's it, rammed stuff deserve no attention. When this will be somehow considered ready I'll rename another version of this type and I'll do a release with some Accessed Nones Killed OUT - so to speak a more stable Bot but not perfect, due to the rest of stuff - to not mention retarded weapons with A.I. code doing sucks.
A hard Bot code is another stupid load lagging useless as long as MAP needs fixed not the damn MBot. Poor Bot is innocent if mapper is clueless how do works a lift, etc.
MrLoathsome
Inhuman
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Personal rank: I am quite rank.
Location: MrLoathsome fell out of the world!

Re: Short Bot Note

Post by MrLoathsome »

Have something running on a slow timer.

It checks bots current state and location.

If they remain stuck for too long, it gives bot new orders/direction.

Might be the "brute force" method, but would be much easier to implement
than rewriting the bot code.

We must work with the bots, not against them. :satan:

If done properly, it could fix issues with badly pathed maps and work with the default bots or any other bots.
blarg
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 »

MrLoathsome wrote:Have something running on a slow timer.
Nope, problem is a general one. It's called "Go if Reachable"

Things went perfect in firsts tweaks as long as goal was denied based on "No Reachable" - Please check Trigger4 from DM-Zeto. Epic Liked to screw things doing shit. An then a "smart" explanation from Polge "because of a threshold problem" and the bla bla solution - I have pathed properly tiny Ledges as I considered, and they were perfectly operational - no one would dream at a Bot coming that way.
While I did some wrappers, things went more smarty until a session in old DM-Zeto where... LOL to the shield, we get it only if we are under attack (leaving the rest of states untweaked - just for case) - for the record see triggers from shield room - it's a pure guess work and a matter of luck. So MBot was camping near door being easy target because Unreachable stuff was not supposed to be touched - actually it's impossible to touch center of that trigger as it is. Talisman was almost like Cannon at doing tech stuff - out of tech so to speak. MBot was done in purpose to Navigate better but those smarty tweaks won't work in retarded maps. Too bad. MBot uses a "half-push" if you know what I mean. Due to my lack of experience toward movement+animations I did an Owned keypoint (as HoldSpot used) but that Keypoint is permanent, on demand MBot jump if MoveTarget doesn't trace with Legs region properly so it jumps when it needs randomized as a less skilled player rather than running at ledges like an idiot. Now problem goes nasty for such "specialhandling" issues. I have to see if we have some boolean checker which I've failed to see or to rewrite that formula using another way. Because of such smarty maps I will not be able to prevent evil things.
Now who is stupid ? Bot, right ? Not the mapper who cannot understand in 30 years what "reachable" term is and placing stuff like shit...
Next solution is to deal with a Trace+Extent - another lousy formula for preventing manure.
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 »

Something happens in MH-LandsofNaPali where bot / MBot/ MBotv2 is struggling hard to move through the door.
Derdak2rot did some mistake by setting the door to TriggerOpenedTime
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 »

There might be bad timing related to speed VS door speed, I think with a bit of work problem is solvable somehow. My problem for that LandsOfNapali was a spot LandOfRetardedBot where they might get stuck between 2 points due to an awesome NavigationPoint soup and the only way to solve issue was shooting moron until he recover the proper movement - and for this thing you have to return at spot. And now problems:
- fixing Bot with extra codes = higher load and Map is a big one too for A.I. - see logs;
- without fixing bot, things goes bad.
So tell me a solution if doesn't help a random jump around in purpose to gain another "entrance" in Network. In small places without a proper tracer = Bot felt in damage zones. Pretty nasty...
Another answer to these game-types issues might be a particular actor for fixing based on map-name and a suffix like botz mutator. So main mod has an ini, in ini we have titles to solve - mod will check level title, if match config then load that actor-class, actor will start tweaking stuff then die. changing timers at doors, some Navigation stuff moved or screwed, pawn felt from map moved to a good spot, etc. else I don't see a general solution available everywhere. Others being more dumb, they did dumb stuff too different from older so will need special particular considerations.
First thing coming in my head toward DM-Zeto is moving that trigger in reachable spot VIA mutator-actor. I really don't see anything logic to run in a point from wall - this is utterly dumbness. I was thinking at a strategy with door triggers but DM-Zeto was a big deception, that stuff should be a mapping example but it's just a "How To Not Do" example. Of course default Bot being retarded will run at wall - looks with no issues but real issues occurs when does the same things where it shouldn't. Anyway MBot was a product fired after a few sessions with Bot having 2 HP and watching what it does, heh...
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 »

I think I did other small nice tweak related to status when MBot wants to pickup an item which is not properly centered at InventorySpot and then Touch seems to not have always a good call by Engine. The result, Bot is running like a moron in Spot unable to get item even is very very closer. Short decision: Call Touch, Demand No MoveTarget, jump in "Moving Label" for stop acceleration, finish animation and pick another destinatation - very CUTE. So is this finished ? Um... will see. Btw this is code:
Original:

Code: Select all

...
			if ( InventorySpot(MoveTarget).markedItem.GetStateName() == 'Pickup' )
				MoveTarget = InventorySpot(MoveTarget).markedItem;
			else if (	(InventorySpot(MoveTarget).markedItem.LatentFloat < 5.0)
...
Which doesn't seems to wrapped - it is very dependent on pickup placement toward geometry around, player has options, A.I. doesn't have so much brain but might have features (longer fingers - so to speak...).
New code:

Code: Select all

			if ( InventorySpot(MoveTarget).markedItem.GetStateName() == 'Pickup' )
			{
				MoveTarget = InventorySpot(MoveTarget).markedItem;
//***
				if ( VSize(Location-MoveTarget.Location) <= CollisionRadius * 1.5 )
				{
					InventorySpot(MoveTarget).markedItem.Touch(Self);
					MoveTarget = None;
					Goto('Moving');
				}
//***
			}
			else if (	(InventorySpot(MoveTarget).markedItem.LatentFloat < 5.0)
I have marked that section with asterisk types in order to find and revert modifications if needs removal more easy. But I'm not convinced about removal. So I started to love "Touch" or love is based of "Touch", heck I might be right or wrong about love. Long time I was suspecting these pickup troubles related to "touch" which should be natively called but something doesn't work as supposed so I think if we enforce with UScript won't be harmful as long as it's called a bit earlier and Bot will look for next spot without major issues. Of course I have real evil examples of what was doing Editor... at pathing job...:sad2: .
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 »

So this also goes under Moving: label??
And can you explain what is LatentFloat??
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Short Bot Note

Post by Barbie »

Rocky wrote:what is LatentFloat??
The class Actor defines some "Internal" variables:

Code: Select all

var const byte            LatentByte;    // Internal latent function use.
var const int             LatentInt;     // Internal latent function use.
var const float           LatentFloat;   // Internal latent function use.
var const actor           LatentActor;   // Internal latent function use.
I guess they are used by latent functions, see also Experimental results on this web page:
Sleep() does indeed use LatentFloat to keep track of how long it still has to sleep: While Sleep(2.0) is running, LatentFloat counts from 2.0 down to just a little more than 0.0.
Assuming this the following line of Bot.uc makes sense:

Code: Select all

CampTime = FMin(5, InventorySpot(MoveTarget).markedItem.LatentFloat + 0.5);
Hey Bot, wait at this position until the item respawns - but not longer than 5s.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
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 »

We have 2 things confusing you:

1) Bot High Skilled is able to predict respawning. Clock is ticking, Item has an internal timer until it respawns (that latent float bla bla). If there are 5 seconds to respawn, high skilled Bot will wait there and is able to be there right on time. And then will pick up item in cause which was sleeping, even if other the same type is around (that might be an alternate tweak against wasting time).

2) This Problem is about Where InventorySpot is located and Where is placed our item VISIBLE - NOT ALWAYS in THE SAME X,Y Location - Thanks Editor for your retarded JOB - in such case, fixing map requires "manual override" like a pilot says. Pull Inventory under InventorySpot using TopView the mostly. Bot is sent by engine to InventorySpot but shortly is redirected to item - not really always reachable and/or simply engine "forgot" the "touch". Then we demand that thing. Other case was a pickup almost buried - sadly MH mappers with skill were doing such garbage+ desired LULUs. Player jumping was getting that ammo, not the Bot running there until something is triggering it under a sudden threat, else we have 2 months of retarded run-in-place. I was thinking at solutions: Bring item higher (Bot ExtraPower) - or a small actor or anything integrated into game-type (yes not a default one), jump as player computing craps and still different Levels will mock that trash, Extend touch (THIS is what I've used), Isolate that based on a unreachable timer (this is a nasty solution heading to a broken path through that point - not an answer), if Bot could not get that in 30 seconds - do ruin that item - end of bullshitting (allow InventorySpot as a valid path).
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 »

I think I have properly rammed that "run-in-place" for default MH, and I have rewritten several animation things. I saw many times "tweentorunning(0.1)". I'm not sure if we do really need such a "fixed" values since we have already "PlayRunning()" wrapped somehow and which can be called ONLY if it needs to be called, the rest is "PlayWaiting()" completed with a "Wandering" if we have no goal. Running in place was disturbing me for years even in an InventorySpot due to an insane "SetAttractionState" used by TeamGamePlus which make pawn to shake legs with brute force - I really believe that is just a stupid way to move pawn, but that's the option for default Bot.

Original MH says: "Target is Waypoint move there and shake legs" - this is a pathetic translation of a crap - we have hundreds of cases with no target and no paths so keep shaking legs useless - sorta Accessed None but thanks to Bot it won't spam console but not even working properly.

MBot says: I don't have target so I won't shake not even a half of a leg, but I will look at these walls in exchange - perhaps are interesting and straight like you never see. I want to run sometimes, but if I don't have a reason I won't dig holes under my foots.
Gotta do some CTF testing and DM in order to prevent some bad occurrences before to put up some version for everyone.

Aside because I don't like TeamGamePlus "addon" with "SetAttractionState" I have rewritten it in MH2 - looks smoother enough.
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 »

So I gave a try to what you said like make a actor which will do some tweaks and destroy itself after some seconds.

Code: Select all

class AnyTweakingActor extends Actor config(MBotv2Config);

enum EClassAction
{
	CA_Tweak,
	CA_Destroy
};

struct Anytwk
{
	var() config string MapTitle;
	var() config name ActorName;
	var() config name ActorState;
	var() config EClassAction ClassAction;
	var() config String ActorSettings;
};

var() config Anytwk AnyTweaker[128];

event PostBeginPlay()
{
	TweakSomething();
	SaveConfig();

	SetTimer(5.0, false);
}

simulated function TweakSomething()
{
	local int i;
	local Actor A;
	local int Pos;
	local string CSettings;

	for(i = 0; i < 127; i++)
	{
		if(Level.Title == AnyTweaker[i].MapTitle)
		{
			if(AnyTweaker[i].ClassAction == CA_Tweak)
			{
				ForEach AllActors(Class'Actor', A)
				{
					if( (AnyTweaker[i].ActorName != '') && A.Name == AnyTweaker[i].ActorName)
					{
						if(A != None && AnyTweaker[i].ActorState != '')
							A.GotoState(AnyTweaker[i].ActorState);
						
						if(A != None && AnyTweaker[i].ActorSettings != "")
						{
							CSettings = AnyTweaker[i].ActorSettings;
							T1H:
							if(len(CSettings) > 0)
							{
								Pos = InStr(CSettings,";");
								if(Pos < 0)
									Pos = InStr(CSettings,",");
								if(Pos < 0)
								{
									SetActorSettings(A,CSettings);
									CSettings = "";
								}
								else
								{
									SetActorSettings(A, Left(CSettings,Pos));
									CSettings=Mid(CSettings,Pos + 1);
									goto T1H;
								}
							}
						}
					}
				}
			}
			else if(AnyTweaker[i].ClassAction == CA_Destroy)
			{
				ForEach AllActors(Class'Actor', A)
				{
					if( (AnyTweaker[i].ActorName != '') && A.Name == AnyTweaker[i].ActorName)
					{
						if(A != None)
						{
							A.Destroy();
							A = None;
						}
					}
				}
			}
		}
	}
}

simulated function SetActorSettings(Actor A, String CSettings)
{
	local string Property;
	local string Value;
	local string Prev;
	local string Next;

	Property=Left(CSettings,InStr(CSettings,"="));
	Value=Mid(CSettings,InStr(CSettings,"=") + 1);

	if(A != None)
	{
		Prev=A.GetPropertyText(Property);
		A.SetPropertyText(Property,Value);
		Next=A.GetPropertyText(Property);
	}
}

simulated function Timer()
{
	Destroy();
}

defaultproperties
{
	RemoteRole=ROLE_SimulatedProxy
}
In below MH-LandsOfNapali map, these list of door movers where Bots gets stuck at door. Now they are navigating well.

Code: Select all

AnyTweaker[0]=(MapTitle="MH-LandsOfNapali",ActorName=Mover34,ActorState=TriggerControl,ClassAction=CA_Tweak,ActorSettings="")
AnyTweaker[1]=(MapTitle="MH-LandsOfNapali",ActorName=Mover35,ActorState=TriggerControl,ClassAction=CA_Tweak,ActorSettings="")
AnyTweaker[2]=(MapTitle="MH-LandsOfNapali",ActorName=Mover45,ActorState=TriggerControl,ClassAction=CA_Tweak,ActorSettings="")
AnyTweaker[3]=(MapTitle="MH-LandsOfNapali",ActorName=Mover46,ActorState=TriggerControl,ClassAction=CA_Tweak,ActorSettings="")
AnyTweaker[4]=(MapTitle="MH-LandsOfNapali",ActorName=Mover52,ActorState=TriggerControl,ClassAction=CA_Tweak,ActorSettings="")
AnyTweaker[5]=(MapTitle="MH-LandsOfNapali",ActorName=Mover53,ActorState=TriggerControl,ClassAction=CA_Tweak,ActorSettings="")
AnyTweaker[6]=(MapTitle="MH-LandsOfNapali",ActorName=Mover32,ActorState=TriggerControl,ClassAction=CA_Tweak,ActorSettings="")
AnyTweaker[7]=(MapTitle="MH-LandsOfNapali",ActorName=Mover33,ActorState=TriggerControl,ClassAction=CA_Tweak,ActorSettings="")
AnyTweaker[8]=(MapTitle="MH-LandsOfNapali",ActorName=Mover44,ActorState=TriggerControl,ClassAction=CA_Tweak,ActorSettings="")
AnyTweaker[9]=(MapTitle="MH-LandsOfNapali",ActorName=Mover43,ActorState=TriggerControl,ClassAction=CA_Tweak,ActorSettings="")
AnyTweaker[10]=(MapTitle="MH-LandsOfNapali",ActorName=Mover51,ActorState=TriggerControl,ClassAction=CA_Tweak,ActorSettings="")
AnyTweaker[11]=(MapTitle="MH-LandsOfNapali",ActorName=Mover27,ActorState=TriggerControl,ClassAction=CA_Tweak,ActorSettings="")
AnyTweaker[12]=(MapTitle="MH-LandsOfNapali",ActorName=Mover40,ActorState=TriggerControl,ClassAction=CA_Tweak,ActorSettings="")
AnyTweaker[13]=(MapTitle="MH-LandsOfNapali",ActorName=Mover41,ActorState=TriggerControl,ClassAction=CA_Tweak,ActorSettings="")
AnyTweaker[14]=(MapTitle="MH-LandsOfNapali",ActorName=Mover39,ActorState=TriggerControl,ClassAction=CA_Tweak,ActorSettings="")
AnyTweaker[15]=(MapTitle="MH-LandsOfNapali",ActorName=Mover55,ActorState=TriggerControl,ClassAction=CA_Tweak,ActorSettings="")
AnyTweaker[16]=(MapTitle="MH-LandsOfNapali",ActorName=Mover36,ActorState=TriggerControl,ClassAction=CA_Tweak,ActorSettings="")
AnyTweaker[17]=(MapTitle="MH-LandsOfNapali",ActorName=Mover42,ActorState=TriggerControl,ClassAction=CA_Tweak,ActorSettings="")
AnyTweaker[18]=(MapTitle="MH-LandsOfNapali",ActorName=Mover28,ActorState=TriggerControl,ClassAction=CA_Tweak,ActorSettings="")
AnyTweaker[19]=(MapTitle="MH-LandsOfNapali",ActorName=Mover10,ActorState=TriggerControl,ClassAction=CA_Tweak,ActorSettings="")
AnyTweaker[20]=(MapTitle="MH-LandsOfNapali",ActorName=Mover8,ActorState=TriggerControl,ClassAction=CA_Tweak,ActorSettings="")
AnyTweaker[21]=(MapTitle="MH-LandsOfNapali",ActorName=Mover9,ActorState=TriggerControl,ClassAction=CA_Tweak,ActorSettings="")
AnyTweaker[22]=(MapTitle="MH-LandsOfNapali",ActorName=Mover7,ActorState=TriggerControl,ClassAction=CA_Tweak,ActorSettings="")
AnyTweaker[23]=(MapTitle="MH-LandsOfNapali",ActorName=Mover13,ActorState=TriggerControl,ClassAction=CA_Tweak,ActorSettings="")
AnyTweaker[24]=(MapTitle="MH-LandsOfNapali",ActorName=Mover17,ActorState=TriggerControl,ClassAction=CA_Tweak,ActorSettings="")
AnyTweaker[25]=(MapTitle="MH-LandsOfNapali",ActorName=Mover18,ActorState=TriggerControl,ClassAction=CA_Tweak,ActorSettings="")
User avatar
Barbie
Godlike
Posts: 2792
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Short Bot Note

Post by Barbie »

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...
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Post Reply