Backpacks

Discuss Artificial Intelligence and Bot programming.
Post Reply
redrum
Posts: 410
Joined: Wed Mar 28, 2007 11:35 pm
Location: Long Island, New York

Backpacks

Post by redrum »

Guys, how can I have a message displayed of the contents of a backpack when it is picked up?

Also, how can I get the Frikbots to pick up the backpacks?
They don't seem to be aggressive enough in picking them up.

I'm running a QW server with the Frikbot mod.

Thanks.
Welcome to the Overlook Hotel: The-Overlook-Hotel.game-server.cc
Orion
Posts: 476
Joined: Fri Jan 12, 2007 6:32 pm
Location: Brazil

Post by Orion »

Well, to the Frikbots get backpacks I don't know, but to the backpack display the messages, you'll see something like PRINT_LOW in the sprint parameters, change it to PRINT_MEDIUM or PRINT_HIGH in all BackpackTouch sprints.

Because some newer clients avoids "you got" messages, because they're PRINT_LOW.
Monster
Posts: 101
Joined: Sat Jan 07, 2006 10:27 pm
Location: North Carolina

Post by Monster »

I don't think the frikbots have a backpack pickup AI at all. They only will pick them up if they happen to run across one going through their waypoint paths.

It would be nice to have that though, then they would be much more of a challenge in 1v1 :D
scar3crow
InsideQC Staff
Posts: 1054
Joined: Tue Jan 18, 2005 8:54 pm
Location: Alabama

Post by scar3crow »

Just make the bots look at the backpacks as a weapon or an ammo pickup? You could get kind of fancy and have them take note of any victim who was using rl/gl/shaft and if so, their backpack gets a high priority.
FrikaC
Site Admin
Posts: 1026
Joined: Fri Oct 08, 2004 11:19 pm

Post by FrikaC »

Backpacks as a generic item are given a priority of like 5, which is quite low. The reason for the low value is that backpacks often drop into dangerous places , e.g. lava.
scar3crow
InsideQC Staff
Posts: 1054
Joined: Tue Jan 18, 2005 8:54 pm
Location: Alabama

Post by scar3crow »

I am making this suggestion with the admission that I don't know about qc.

Perhaps half a second after the backpack spawns, do a contents check, and if it is found to be in a hazardous material, flag itself as such. Then when bots see the entity, they see the entity's own flag (which it has already calculated and only does so once) and then can weigh it based upon the flag (lava basically being a no-go, slime being a maybe, water being a low risk, and other wise its good). The only time where backpacks are too high of a priority is taking a longer route to health for 25 additional shells...

I played the Frogbot recently, and I noticed on a hard skill, I died while firing rockets at it, and dropped a pack, containing my rl and at least 15 rockets... When I came back to the area (dm6, rl/ra room) I found the bot camping the rl to get more ammo - and not touching my backpack at all which was in plain sight.
Monster
Posts: 101
Joined: Sat Jan 07, 2006 10:27 pm
Location: North Carolina

Post by Monster »

Cool idea. But what if the backpack is in an unreachable location ? how would the bots know where to go to get the backpack? Maybe have them go to the waypoint closest to the backpack to get it..
scar3crow
InsideQC Staff
Posts: 1054
Joined: Tue Jan 18, 2005 8:54 pm
Location: Alabama

Post by scar3crow »

I would imagine (and this is still blind thinking regarding qc and fbx) that if it wasn't easy to immediately grab, they would check the route table for a path there, and seeing none, give up on it as it is outside of the reach as determined by the waypointer.
illithid
Posts: 14
Joined: Sat Jul 21, 2007 1:16 pm

Post by illithid »

The FrikbotX+ mod I uploaded had bots picking up backpacks. I've got a new version but I haven't uploaded it yet.
illithid
Posts: 14
Joined: Sat Jul 21, 2007 1:16 pm

Post by illithid »

I've uploaded the latest FBX+ and its languishing in the incoming folder of the Frikbot Resource Cube. *sob*
http://tlb.quakedev.com/files/fbxways/
redrum
Posts: 410
Joined: Wed Mar 28, 2007 11:35 pm
Location: Long Island, New York

Post by redrum »

The FrikbotX+ mod I uploaded had bots picking up backpacks. I've got a new version but I haven't uploaded it yet.
Illithid, what other changes are there in FBX+?
Welcome to the Overlook Hotel: The-Overlook-Hotel.game-server.cc
Dr. Shadowborg
InsideQC Staff
Posts: 1120
Joined: Sat Oct 16, 2004 3:34 pm

Post by Dr. Shadowborg »

illithid wrote:I've uploaded the latest FBX+ and its languishing in the incoming folder of the Frikbot Resource Cube. *sob*
http://tlb.quakedev.com/files/fbxways/
Whoops, sorry I left it in there so long. I've been kinda busy and distracted again. All three have now been moved to the variants directory. :wink:
illithid
Posts: 14
Joined: Sat Jul 21, 2007 1:16 pm

Post by illithid »

Dr Shadowborg :
Thanks.

redrum:
I rewrote bits of the item pickup priority code, included new waypoints for DM1, DM4, DM5 & DM6, added Deathmatch mode 3 support and random respawn spots. It's nothing fancy actually, but if you observe bot behaviour between the original FBX and FBX+, you'll see the difference.

The source code is included and commented so you can have a look in bot_ai.qc and bot_fight.qc to see the changes I made.

FBX+ basically came out of a need to have a "vanilla" code base for FBXDoom and FBX-PainKeep.
redrum
Posts: 410
Joined: Wed Mar 28, 2007 11:35 pm
Location: Long Island, New York

Post by redrum »

I have exploding backpacks in my mod. Well, they don't really explode they just deal heavy damage (depending on the contents).
How can I get the owner of the backpack to get credit for the kill?
Here is the code I added to items.qc:

Code: Select all

        if (self.ammo_rockets == 12 && (self.ammo_nails >= 200) )            
           {
           T_Damage (other, self, self, self.ammo_rockets*500);                    
           centerprint(other, "you found an exploding backpack!\n");
           }                        

        if (self.ammo_rockets == 11 && (self.ammo_nails >= 225) )               
           {
           T_Damage (other, self, self, self.ammo_rockets*500);                    
           centerprint(other, "you found an exploding backpack!\n");
           }
Welcome to the Overlook Hotel: The-Overlook-Hotel.game-server.cc
Post Reply