No announcement yet.

It is me or something is wrong with bot support?

  • Filter
  • Time
  • Show
Clear All
new posts

    It is me or something is wrong with bot support?

    Recently I tried to fix bot pathing on my maps, as I got reports of them doing stupid stuff. But there appears to be plain bug in UT3 code.

    They sometimes take corners or turns a bit too early and never reach that health or powerup they are after. That results in bots bouncing around some pickup. on my map DM-Judith they notoriously missed stairs by turning just 2-3 steps before reaching them and going under as a result.

    I checked collision around but they do it even on flat, horizontal BSP surface.

    So I am doing something wrong, or it is one of bugs that will be fixed?

    They often wander back-and-forth across the pathnode lines so that it doesn't look like a robot following a straight path. And on corners they often attempt to curve between the nodes assuming that their line-cast calls don't show an obstacle in the way.
    So if you have objects in the way on the corner of a path, the bots may get hung up. For example, if there was a short staticmesh trim placed in the bottom corner of a hall that has collision on it, the bots may hang up on that.
    Or if there is a hall with a 90 degree corner to some stairs, and the pathnodes are not placed far enough out to make a proper arc, the bots may attempt to curve along the path and hang up on the corner.
    Also, if you have multiple floors or ledges that are closely spaced in height, and pathing lines occur between the upper and lower nodes or pickups, bots may attempt to hop or shortcut there.
    So placement of your PathNodes and pickups is often critical in many designs and layout or the bots may mess up. This is not an issue with the bots, but incorrect pathing procedures by the level designer.
    I recommend checking out all of the UT99 and UT2004 pathing tutorials on UnrealWiki and UDN and doing a Google search on it for other tuts.


      Would placing a blocking volume that only blocks paths keep bots from cutting the corner?


        Well DGUnreal how then you explain such behavior:
        Bot heads for health pack (i can see it is goal in Showdebug) then 2 steps before picking health, he turns back and heads for rocket ammo, then 2 steps before picking ammor he turns for health pack. This all on plain BPS surface without corners or obstacles. Is there some property that can tell bots to go exactly on path node before changing direction?

        Edit: I usually turn off all collision on small floor and wall static meshes and replace it with big flat blocking volume, I am one of those who hate to get stuck while running backwards.


          Originally posted by Nawrot View Post
          Well DGUnreal how then you explain such behavior:
          If you have a pathnode between the two pickups, you have it equally spaced.
          Bots are simply running a script that is an item collection until they spot something to shoot. So while the bot is moving down the path, they look ahead through the pathing network to where the next items are located, and weigh them in priority of what they need for their inventory and what the item's value is. So if they are currently positioned exactly between two equally rated items, they will loop.
          The same thing occurs even in UT2004 if you have a super-pickup such as SuperHealth, SuperShield, Redeemer, etc., and you have pathnodes on both sides that are equally spaced in unreal units.
          The bot sees the weighted goals and when they get to the node away from it, they get stuck in a loop heading back for the goal.
          If you change the location of the pathnodes so that they are different distances on each side of a major pickup, the issue usually goes away.


            I did not want to reply here until i was quite sure. Indeed they love to take most idiotic shortcuts possible, and that can be avoided. But there is one (or two) bug in bot script that can not be fixed by node placement.

            Sometimes when bot heads to any kind of pickup, he never reaches it, but instead turns back 1-2 steps before. And runs to last node he visited (this is some anti stuck code i assume) then he repeats his way to pickup and again turns just few steps before reaching it. This happens randomly on any pair of pickup and node, but usually when bot took shortcut to that node and probably wrongly calculated new distance to pickup. And this is between node and one pickup, so no changing goal middle way. I watched showdebug and i am quite sure It was not case of "going for another target" before he reached pickup. Green calculated path to goal does not change, he just keeps running last part of green line back and forth.

            Another bug that is not as common as above (It happened just 2-3 times so far, but may be just another manifestation of above one). Sometimes when bot gets to two pickups (placed one next to another), he changes mind and tries to pickup another one. But like in above bug he stops just step away from them and rapidly swaps targets.

            Recently I spend many hours lurking at bots, and those 2 bugs are quite common, well there was not single game that bot survived without getting stuck for more than 15min. I replicated those bugs on Epic's stock maps. For eg. on DM-Shangrila there are 2 pickups near bio-gun, and bots demonstrated second bug there.


              The bots have never been perfect, they do incredibly stupid things.

              In ut2004 they just get in and out of the same vehicle for the entire game, hope thats been fixed.

              The thing is all you can do is live with their weird behavior and set your paths to the best you can.

              Play test them and tweak them until they do what you want them to do.

              Or just use a basic path because most maps are played online against people not bots.