Raptor007 / aq2-tng

Action Quake 2: The Next Generation. Raptor007's sandbox for testing changes. When verified stable, this code is pushed to the official aq2-tng repo:
https://github.com/aq2-tng/aq2-tng/tree/bots
4 stars 2 forks source link

ltk_botfile and ltk_loadbots #140

Closed darkshade9 closed 1 year ago

darkshade9 commented 1 year ago

Some mostly some formatting differences here due to adding in a condition.

The purpose of this functionality was to provide the option to run the full LTK-enabled binary but with the option to turn off bots entirely via ltk_loadbots, so that we didn't have to build an entirely different library in case the server operator wanted to add bots at any time.

ltk_botfile gives the server operator the ability to load bots from different filenames, if they so choose (for flavor, or different bot counts based on game type, or vary the skins up, etc)

Raptor007 commented 1 year ago

Interesting. I was already using botdir on my server to change the bot config on the fly, just with different bots subdirectories rather than filenames. If you set it to a directory that doesn't exist or doesn't contain botdata.cfg, that would be equivalent to ltk_loadbots 0. But I guess there's no harm in offering multiple methods, and it might be cleaner to keep all the bot configs in one directory.

Raptor007 commented 1 year ago

More important than the two new cvars, it's cool that this lets you have different bots based on the map name!