Page 1 of 9

Botpathing request thread

Posted: Fri Nov 24, 2017 9:37 pm
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

- 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 ===

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

=== Released ===
* (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)

Re: Botpathing request thread

Posted: Fri Nov 24, 2017 9:39 pm
by Higor
Got this one from a sniper server ages ago, appears to be an edit of DM-InfinityCity ... finitycity

Re: Botpathing request thread

Posted: Sat Nov 25, 2017 2:02 am
by papercoffee
:tu: I like this thread already.

Re: Botpathing request thread

Posted: Sat Nov 25, 2017 3:08 am
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.

Re: Botpathing request thread

Posted: Sat Nov 25, 2017 3:57 am
by Red_Fist
Well don't anyone do


I need to PM him.

Re: Botpathing request thread

Posted: Sat Nov 25, 2017 4:15 am
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)

I'll make a tutorial for horizonal lift pathing (that works with stock bots) later, maybe during my trip lol.

Re: Botpathing request thread

Posted: Sat Nov 25, 2017 4:35 am
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.

Re: Botpathing request thread

Posted: Sat Nov 25, 2017 8:37 am
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 )


Re: Botpathing request thread

Posted: Sat Nov 25, 2017 9:22 am
by sektor2111
Pretty similar to PathsToggler or PathSwitcher.

XC_Engine only: enhanced path rebuilder

Posted: Sat Nov 25, 2017 10:01 am
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.


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


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()
	SetTimer( 1+FRand(), true);

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

	if ( (MarkedItem != None) && !MarkedItem.bDeleteMe && (MarkedItem.Owner == None) )
	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;


Re: Botpathing request thread

Posted: Sat Nov 25, 2017 12:38 pm
by sektor2111
I'll turn this into a state code without timer.

Re: Botpathing request thread

Posted: Sat Nov 25, 2017 8:49 pm
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.

Re: Botpathing request thread

Posted: Sat Nov 25, 2017 9:08 pm
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.

Re: Botpathing request thread

Posted: Sat Nov 25, 2017 9:23 pm
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

Re: Botpathing request thread

Posted: Sat Nov 25, 2017 9:33 pm
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