Botpathing request thread

Tutorials and discussions about Mapping - Introduce your own ones!
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Botpathing request thread

Post by Higor »

This thread is dedicated to adding bot support to maps.

Post your botpathing requests here, pointing out specific changes desired.
If you're taking a request let us know so someone (me or moderators) updates the status here.
Feel free to post unfinished WIP's if you feel it could be improved even more.
Keep offtopic to minimum.

Useful tutorials and pathing tricks:

- ToggledPath
- XC_PathBuilder and InventoryDetector

Rules:
- Standard UT bot support should be the minimum requirement.
- If the map has already been released before, stick to adding a proper preffix/suffix that indicates bot pathing to it.
- Removal of elements from the original map should only be done if it makes bot support impossible.
- Don't alter credits.
- Do not repack if it's not your map, only add the .UNR file plus external pathing resources that need to be loaded.




=== Requests ===
DM-InfinityCity

=== Work in progress ===
DM-BedroomPunkysSnipeHuntD_0Pt - taken by Sektor2111
* - taken by *

=== Released ===
CTF-6H-SC-Knurled
DM-(NYA)Infinity_City
CTF-Xizlor
MH-Sk_Cryptrunners
* (link to post / download link to original if possible)

=== Known problems ===
MH-LongCorridor2006 - Bots don't use paths near spawn.
* (description of this map's problem)
Last edited by UnrealGGecko on Mon Aug 12, 2019 6:18 am, edited 12 times in total.
Reason: added 2 more from this thread that were missing.
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: Botpathing request thread

Post by Higor »

Got this one from a sniper server ages ago, appears to be an edit of DM-InfinityCity http://www.moddb.com/games/unreal-tourn ... finitycity
You do not have the required permissions to view the files attached to this post.
User avatar
papercoffee
Godlike
Posts: 10507
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.

Re: Botpathing request thread

Post by papercoffee »

:tu: I like this thread already.
SC]-[WARTZ_{HoF}
Adept
Posts: 427
Joined: Tue Feb 21, 2012 7:29 pm

Re: Botpathing request thread

Post by SC]-[WARTZ_{HoF} »

I would like to see some more sniper maps with bot pathing instead of bots standing around picking their noses. Thanks in advance.
Image
Image
Image
Red_Fist
Godlike
Posts: 2192
Joined: Sun Oct 05, 2008 3:31 am

Re: Botpathing request thread

Post by Red_Fist »

Well don't anyone do

MH-ChrystalMines4

I need to PM him.
Binary Space Partitioning
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: Botpathing request thread

Post by Higor »

I have a halfassed pathed MH-CrystalMine4.unr in my folder, don't know if it's the same map you request.
Link me to the map and I'll take a look.

If it's the map I have, then there's a small Bot problem that'll require a little bit of BSP editing.
In that case it's best that the map had all brushes and a clean rebuild (default sliders)


EDIT:
I'll make a tutorial for horizonal lift pathing (that works with stock bots) later, maybe during my trip lol.
Red_Fist
Godlike
Posts: 2192
Joined: Sun Oct 05, 2008 3:31 am

Re: Botpathing request thread

Post by Red_Fist »

No, it's done, on slomo 4 with 16 bots on adept, takes about 5 minutes, so if it is 4 times slower, would be about 20 minutes.

But the end room is where most of the time adds up by the way the map-fights is made. So that takes a while, high health on 6 titans, a queen, a warlord and other things, so it would take some time from that alone.

So I will send him the map.

Chrystal mines 3, needs to be done.
Binary Space Partitioning
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: Botpathing request thread

Post by Higor »

Gotta start putting all these in a package.

Code: Select all

//=============================================================================
// ToggledPath.
//=============================================================================
class ToggledPath expands BlockedPath;

var(NavigationPoint) bool bTriggerOnceOnly;
var(NavigationPoint) int ExtraCostAlt;

event Trigger( Actor Other, Pawn EventInstigator)
{
	local int temp;

	temp = ExtraCost;
	ExtraCost = ExtraCostAlt;
	ExtraCostAlt = temp;

	if ( bTriggerOnceOnly )
		Disable('Trigger');
}

defaultproperties
{
    ExtraCostAlt=10000000
}
User avatar
sektor2111
Godlike
Posts: 6433
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Botpathing request thread

Post by sektor2111 »

Pretty similar to PathsToggler or PathSwitcher.
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

XC_Engine only: enhanced path rebuilder

Post by Higor »

Using XC_Engine's path builder in your Unreal Editor, plus inventory detector.
======================================
XC_PathBuilder actor for Unreal Editor
======================================

This small addition allows the mapper to alter the behaviour of Unreal Editor's path network builder.
Available for Unreal Editor, when inserting this actor into the map a full path rebuild will run (status box doesn't appear).
Once path rebuild is done, the actor will instantly self-destruct and be removed from the level.


========
Loading:

Open the actor class browser and load XC_Engine.u
Alternatively, add XC_Engine as 'EditPackage' to make it automatically load upon editor launch.


======
Rules:

This path rebuild will follow these particular directives

- Max scan distance changes from 1000 to XC_PathBuilder.MaxScanRange (set in default properties via editor)
** Increasing scan distance may make path pruning impossible, use carefully.
** Make sure you keep node distances consistent across the ENTIRE map.

- InventorySpot class changes from InventorySpot to [XC_PathBuilder.InventorySpotClass] (set in default properties via editor)
- InventorySpot paths that are visible in the editor aren't removed.
- Inventory items that aren't visible in the editor don't get a InventorySpot marker
** Object groups can be used to quickly hide batches of items that aren't intended to receive InventorySpot markers.
** If you rebuild paths once, then hide the item and show the InventorySpot marker you can 'manually' keep this marker on this item without being touched by the path rebuilder, this is useful to force a connection onto this individual marker.
- The 'Event' field of any NavigationPoint actor will force a direct connection to any other NavigationPoint whose Tag or Name matches.
Reducing navigation point count #inventoryspot:
- Create a Group in your map, name it "NoInventorySpot".
- If you see multiple items of the same type all clumped together, add all except one into this group (this one will be the one generating the InventorySpot node).
- When rebuilding:
-- Hide "NoInventorySpot" group
-- Insert XC_Pathbuilder, let it roll
-- Show "NoInventorySpot" group
With this your map will have somewhere between 10 (DM) to 200 (MH) less navigation points, this reduces the chances of hitting the internal 1000 lookup limit.

The below InventorySpot class is only usable with XC_Engine's Path Builder.
It will detect items and mark them so that bots can recognize them.
- Put it exactly where an item is supposed to spawn (box, spawner, etc).
- NEVER USE THE DEFAULT PATH BUILDER (or this will be deleted from the map).
- Never hide this actor in the editor.
- If you want to extend detection, increase collision size (don't overdo it)
- Don't push the box before shooting it :loool:

Code: Select all

//=============================================================================
// InventoryDetector.
//=============================================================================
class InventoryDetector expands InventorySpot;

event PostBeginPlay()
{
	Super.PostBeginPlay();
	SetTimer( 1+FRand(), true);
}

event Timer()
{
	local Inventory Inv;
	local vector V;

	if ( (MarkedItem != None) && !MarkedItem.bDeleteMe && (MarkedItem.Owner == None) )
		return;
	ForEach VisibleCollidingActors( class'Inventory', Inv, 100, Location, false)
		if ( Inv.IsInState('Pickup') && Inv.MyMarker == None )
		{
			V = Location - Inv.Location;
			if ( (VSize( V*vect(1,1,0)) < CollisionRadius+Inv.CollisionRadius) && (Abs(V.Z) < CollisionHeight+Inv.CollisionHeight) )
			{
				MarkedItem = Inv;
				Inv.MyMarker = self;
				break;
			}
		}
}

defaultproperties
{
    bNoDelete=True
    bStatic=False
    bHiddenEd=False
}
User avatar
sektor2111
Godlike
Posts: 6433
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Botpathing request thread

Post by sektor2111 »

I'll turn this into a state code without timer.
Red_Fist
Godlike
Posts: 2192
Joined: Sun Oct 05, 2008 3:31 am

Re: Botpathing request thread

Post by Red_Fist »

I was trying to decrease the max desireability using a propertyFlipper.

Pretty sure it works, BUT I believe once the new item respawns I think it reverts back.

any simple solution to having settings stay before respawn, ? all I can think of is use triggers ahead to always trigger the propertyFlipper as they run through.
I think that will work because if they are always ahead of the pickup they will always trigger it for low desire. Like a built in time delay, they never get a chance to want it. could put a few triggers around.

Not using very many here, like 4 or 5 propertyflippers, and it's really not needed, I just thought to add a few to experiment.
Binary Space Partitioning
User avatar
sektor2111
Godlike
Posts: 6433
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Botpathing request thread

Post by sektor2111 »

Points already said:
- replacements are not taking your "desire" in account;
- MonsterWayPoint can be protected and a better MH can be used;
- PathsTogglers are available as posted by Higor.
You are wasting time with those desirability things - for this way you need CUSTOM null pickups a la BotBurguer (I shared such a sample modified for MH - increasing automated the desire when monsters are around - and it works properly). The rest is blabbering.
Red_Fist
Godlike
Posts: 2192
Joined: Sun Oct 05, 2008 3:31 am

Re: Botpathing request thread

Post by Red_Fist »

You don't take into consideration letting the bots finish using AI or using brute force.

The whole idea for me is having bots want to finish a map, all the while using stock navigation actors or pickups.

For instance, to make them WANT to make it all the way to a blocked path, as opposed to using a switch and force them there.

My levels have a certain amount of Zen, the full appreciation of godly randomness :agree1: :agree1: :agree1:

But you guys run a prison camp of orderliness, poor bots :P
Binary Space Partitioning
User avatar
OjitroC
Godlike
Posts: 3743
Joined: Sat Sep 12, 2015 8:46 pm

Re: Botpathing request thread

Post by OjitroC »

Higor wrote:Got this one from a sniper server ages ago, appears to be an edit of DM-InfinityCity
Bots get stuck at the end of this corridor
Shot0058.jpg
You do not have the required permissions to view the files attached to this post.