Unvanquished / Unvanquished

An FPS/RTS hybrid game powered by the Daemon engine (a combination of ioq3 and XreaL)
https://unvanquished.net
Other
972 stars 155 forks source link

Bot behaviors do not work with some combinations of cvars #2968

Open sweet235 opened 5 months ago

sweet235 commented 5 months ago

A bug I invented can be seen on the juggernaut server. That server has set g_disabledEquipment ckit.

If a server does that, but has set g_bot_buildHumans on, one assumption I made in the bot build behavior is invalid. I assumed that it would always be possible for a bot to suicide and spawn as a builder (as long as there are spawns). The effect is to put one human bot in an endless suicide loop.

Now I wonder how to fix that. This particular case would be easy to handle by adding a way to query g_disabledEquipment in the behavior tree language. But do we want that? These files are already rather difficult to test.

Please help me answer these questions:

slipher commented 5 months ago

Disabling the ckit is not really compatible with standard gameplay, so I feel this is not a case bot developers should have to deal with. The juggernaut mod has a completely different gameplay objective so its author should provide an appropriate BT instead of relying on default ones.

The default BTs should gracefully handle settings that only slightly tweak the gameplay e.g. disabling Lucifer Cannon.

Now I wonder how to fix that. This particular case would be easy to handle by adding a way to query g_disabledEquipment in the behavior tree language.

In general we should probably have APIs for testing if a weapon/upgrade/etc. is available, combining disabled equipment/gbot cvars, and unlock status. I believe this exists in C++ but is not yet exposed for BT.

slipher commented 5 months ago

On the other hand we should handle g_bot_ckit being disabled. So if we did that using an API for equipment availability, then the case of ckit being disabled for everyone would be covered too.