Frikbot waypointing question

Discuss Artificial Intelligence and Bot programming.
Lightning Hunter
Posts: 169
Joined: Wed Nov 28, 2007 6:15 am

Frikbot waypointing question

Post by Lightning Hunter »

Edit: This question has been solved.

Is there a way to make Frikbots aware of a trap when it has been activated? I'm doing waypoints for cmania2, and am having an issue with a certain hallway. There is an RL a hallway that is over some lava. When a button is pressed, the hallway floor goes down into the lava, killing the person who happened to be going for the RL at the time. The problem is that the bots will press the button to activate the trap, then proceed to go for the RL and kill themselves. I tried giving the waypionts before the hallway the AI flag of "wait for plat", but it didn't work. They still go running right into the lava. Any suggestions?

Screenshots of the trap:

Image

Image
Last edited by Lightning Hunter on Wed Sep 30, 2009 6:43 pm, edited 1 time in total.
FrikaC
Site Admin
Posts: 1026
Joined: Fri Oct 08, 2004 11:19 pm

Post by FrikaC »

Put "Door Flag" on the waypoint(s) over the trap. This means there's a door entity under the waypoint and you shouldn't go there if the door isn't present (IE the slime pit in E1M1).

Also set "Door flag no open" from the second set of flags, this means do not try to open the door if its not present (otherwise they'll probably trigger the trap over an over trying to get the door to show up).
Lightning Hunter
Posts: 169
Joined: Wed Nov 28, 2007 6:15 am

Post by Lightning Hunter »

Awesome, that worked. I did actually read your readme file plenty of times, but I guess I didn't understand the door flag part completely until now. Thanks. :)

I've got another question, if you don't mind! Is there a way to force frikbots to jump across larger gaps, despite the hazzard below? I've encountered several situations where the bots need to jump across a gap over some slime/lava to obtain an item, but end up running back and forth at the edge, refusing to jump across. I've had to use "superjump" flags with a few such jumps, but the bots are just terrible at rocket jumping in such situations. They usually end up blowing themselves in the slime/lava 50% of the time, regardless of where I put the waypoints.

Take this jump in cmania2 for example. Humans can easiliy do a normal jump across this lava pit, but bots get stuck on the edge and refuse to jump across. They will attempt to rocketjump, but end up going straight up and down into the lava 50-75% of the time. They are lucky if they make it across.

Image
Lightning Hunter
Posts: 169
Joined: Wed Nov 28, 2007 6:15 am

Post by Lightning Hunter »

Edit: This question has been solved.

Sorry for another question so quick (and a double post), but I have another waypointing question (this one even more important). Why is it that sometimes the "wait for plat" flag doesn't work? I'm working on this one map in which NONE of the lifts work with the "wait for plat" flag. The lifts are in a shaft, with a waypoint before the lift, above the lift, and after the lift. I set the first waypoint to "wait for plat" - like I do with all lifts. However, when the bot gets to the first waypoint, he just sits there and stares at the lift! I've noticed this behavior in a few other maps as well. The bot will use the lift just fine if I take off all flags, except for one major problem - they will not wait for the lift to come back down, and will get stuck below it constantly.

Here is a screenshot to show what I mean. The bot at the bottom is just sitting there because the waypoint he is on has the "wait for plat" flag set.
Image

I uploaded the map I'm working on with full waypoints here in case anybody wants to see it for themselves. I currently don't have flags set for any of the lifts, so the bots get stuck under the platforms all the time. Is there a way to get the bots using these lifts properly?

Download:
http://filebeam.com/3b778ff2670b0e8307b129b063ff75c7

EDIT: I figured it out! I must have been really tired last night, because it took me about 20 minutes of tinkering to fix it this morning. I looked at the .ENT file of the map in question, and realized that all the lifts were set as "func_door", so of course the "wait for plat" flag won't work. I went back to the readme file again, and decided to try using the "ride the train" flag. After moving the waypoints around, they finally use the lifts correctly. :D

My question before this one is still not answered, though.
FrikaC
Site Admin
Posts: 1026
Joined: Fri Oct 08, 2004 11:19 pm

Post by FrikaC »

Ah sorry for not answering questions. I've been really busy lately.
Lightning Hunter wrote:Awesome, that worked. I did actually read your readme file plenty of times, but I guess I didn't understand the door flag part completely until now. Thanks. :)

I've got another question, if you don't mind! Is there a way to force frikbots to jump across larger gaps, despite the hazzard below? I've encountered several situations where the bots need to jump across a gap over some slime/lava to obtain an item, but end up running back and forth at the edge, refusing to jump across. I've had to use "superjump" flags with a few such jumps, but the bots are just terrible at rocket jumping in such situations. They usually end up blowing themselves in the slime/lava 50% of the time, regardless of where I put the waypoints.
Try a combination of blind ("ignore any qualms about lava") and using an explicit jump waypoint.
Lightning Hunter
Posts: 169
Joined: Wed Nov 28, 2007 6:15 am

Post by Lightning Hunter »

Whoops! I figured that out ages ago, but forgot to respond. Yeah, I've actually managed to make the bots do plenty of hard jumps now (just look at cmt1b). I found that the best way to make them jump large gaps consistently is to have them backtrack a little first using a one-way path. Otherwise, they build up their speed and attempt the jump at an odd angle. When they backtrack and use blind + jump, they make it over lava and difficult gaps like 99% of the time, unless a player or another bot interrupts them. :)
Lightning Hunter
Posts: 169
Joined: Wed Nov 28, 2007 6:15 am

Post by Lightning Hunter »

Hey FrikaC, you know what AI Flag I really wish existed? A simple "brake" flag. I'd say that about 80% of the time when Frikbots mess up on a jump, platform, or wind tunnel, it's because their acceleration was having them go the wrong direction of the jump/critical waypoint. This results in them being very inconsistent. They can behave differently depending on what direction they approach from and how high their acceleration was. Of course, this can be helped by having them backtrack first like I stated in my last post, but it would be much nicer if they stopped their acceleration in the direction they are currently traveling when they reach a waypoint. The precision flag does not do justice, because then they will travel at a snails pace, and cannot complete most jumps.

Edit: Actually, an equally useful flag would be to have them take turns sharper. It's when they slide around corners at full acceleration that makes them miss jumps around turns (which is like 75% of them).
FrikaC
Site Admin
Posts: 1026
Joined: Fri Oct 08, 2004 11:19 pm

Post by FrikaC »

Ah, if I had more time.
Lightning Hunter
Posts: 169
Joined: Wed Nov 28, 2007 6:15 am

Post by Lightning Hunter »

FrikaC wrote:Ah, if I had more time.
Indeed. :)

Hey, I have a really simple question for ya. Is there a way to change to the next map in the cycle in the middle of a game? I simply want to be able to press a key or type something in the console to go to the next map in the cycle, without having to type the mapname. Is there a command for this?
FrikaC
Site Admin
Posts: 1026
Joined: Fri Oct 08, 2004 11:19 pm

Post by FrikaC »

No, but you could change the timelimit to like 1, wait then turn the timelimit off. It will cause an intermission and go to the next map. Closest I can think of.
Lightning Hunter
Posts: 169
Joined: Wed Nov 28, 2007 6:15 am

Post by Lightning Hunter »

Hmmm, ok. I guess there is no easy way to add code myself to switch the map eh?
r00k
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Post by r00k »

FrikaC wrote:Ah, if I had more time.

No, but you could change the timelimit to like 1, wait then turn the timelimit off. It will cause an intermission and go to the next map. Closest I can think of.
if only this (forced intermission) worked for real life then we could finish all our Quake projects! :P
Lightning Hunter
Posts: 169
Joined: Wed Nov 28, 2007 6:15 am

Post by Lightning Hunter »

r00k wrote: if only this (forced intermission) worked for real life then we could finish all our Quake projects! :P
I wondered if you'd ever post in my Frikbot threads. :P

Want to join me in my Quest to add waypoints for all known DM maps R00k? Oh wait, just kidding. Qrack needs your undivided attention. :mrgreen:
Lightning Hunter
Posts: 169
Joined: Wed Nov 28, 2007 6:15 am

Post by Lightning Hunter »

I've come across a rather frustrating problem with the Frikbots many times now - especially with the latest map I'm trying to improve the waypoints for. Whenever there are teleporters that teleport Frikbots in the opposite direction to another teleporter, the Frikbots often go right back into the teleporter, messing up their path. They then walk in the direction of the waypoint they are supposed to have ended up at, even though they are nowhere near it. This problem is the absolute worst when there are strings of teleporters that all connect.

I'm trying to improve the waypoints for jvx1, and I've found that the teleporter system in this map can not be handled by the Frikbots. They will spend the entire game going in and out of teleporters - resulting in telefrags every 10 seconds or so. I've tried using directional waypoints, blind waypoints, and pretty much everything else - but with no luck... The Frikbots just aren't very good at using teleporters. :(

I think this problem has to do with their orientation when they come out of a teleporter. A humans acceleration will naturally take them in the proper direction when they come out of a teleporter, whereas a Frikbot will sometimes keep it's acceleration in the wrong direction upon exiting a teleporter. This makes the bot go right back into the teleporter it came out of, when it didn't intend to. This messes up the path the bot was originally taking...
FrikaC
Site Admin
Posts: 1026
Joined: Fri Oct 08, 2004 11:19 pm

Post by FrikaC »

Not true, the teleport lockdown works fine for the frikbots, this has been tested rather extensively. I'd suggest using directional on any waypoints near the teleporter that they might miss due to being teleported, but I'm not sure how well that works with telelinks.
Post Reply