Pages: [1]
  Print  
Author Topic: Bots shooting at shootable buttons?  (Read 8842 times)
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« on: October 15, 2019, 04:21:16 AM »

Hello, just placing here a reminder for an idea which surfaced on Discord.
While developing the milestone tribute mappack, we noticed that in the original q3tourney6 map, bots behavior of shooting at the shootable button is an hack hard-coded into gamecode by id software, which cannot be applied to other maps. The code shows that, in case the name of the map fits, bots check if there are enemies (but not themselves or teammates) in the hardcoded coordinates of the crusher trap, and in that case, they start shooting at the hardcoded coordinates of the button. Hence, it's not possible to reproduce a similar behavior on other maps.

So, the idea would be to see if it may be possible to have bots shooting buttons. A low priority thing of course, but in case someone wants to try looking into it, it may be nice.

So, some considerations:
- Bots might at least randomly shoot at buttons by now and then, as at the moment it looks like to me that they never to that. Or at least, I don't remember ever seeing them doing that (well, there are also very few maps with shootable buttons around), apart q3tourney6 where it is a map-specific gamecode "hack".
- Pay attention to do not make it shoot at there continuosly, in case the button is always visible like in q3tourney6ish maps...
- I don't know if it may be possible, or how hard it may be, to have bots learn the cause-effect relationship of shootable buttons, like to understand when to shoot at them (e.g. shooting them when there is some enemy in the trap they activate, or shooting at them to open a door they wish to enter).
-- I think I've seen bots trying to enter a (push)button-activated door, finding out it won't open just running into it, then pushing a button nearby and opening the door. I don't know it that may be used as a starting point for a shootable-variant of the same. I don't know if bots activate button-activated traps knowing what's actually going on, or just randomly.
- I'm not sure if bots do actually try to push pushable buttons also on their own, or only if there are item_botroam next to them. Surely item_botroam can be used to invite bots to randomly push buttons more often... but that cannot be applied to shootable buttons as item_botroam mimics something to pickup, not an enemy to shoot at.
-- Maybe an optional key like "shootme/1" on item_botroam, or a complete new entity, to suggest bots places where to randomly shoot? That starts to sound a bit complex...
- Even if we add in new gamecode the ability for bots to shoot at buttons, things like shootable-button-activated-doors would still be a problem for bots when playing in any old mod, and map makers should use them carefully!
- Now that I think about it, I don't even know if bots do shoot at shootable-only doors (func_door with health key)!
« Last Edit: October 15, 2019, 08:51:09 AM by Gig » Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
Neon_Knight
In the year 3000
***

Cakes 49
Posts: 3775


Trickster God.


« Reply #1 on: January 20, 2020, 01:27:04 PM »

Indeed, the fact that it's hard-coded is something that should be fixed! Also, it could mean more maps, pre- and post-OA may gain a better botplay as well!

However I have a lot of fixes waiting in the Gamecode repo, so I can't do anything yet. I don't know if/when Sago is going to commit them, though.
Logged


"Detailed" is nice, but if it gets in the way of clarity, it ceases being a nice addition and becomes a problem. - TVT
Want to contribute? Read this.
Pages: [1]
  Print  
 
Jump to: