I am now hosting a mod which targets bot's improvements. The goal is to have them as smart as possible, by harvesting the low hanging fruits first. The server is set with teams of 5 bots which are at skill level 7 (their skill range starts at 1 and ends at 9, so they're not at their best, but they're rather strong, for bots).
I intend to keep this post updated as I add elements on my TODO list or when I implement things. Feel free to comment on my ideas or to provide your own ideas, I'll try to implement everything I can to make bots as fun as possible to fight, and tools which don't just feed enemy's team if not explicitly asked for (by servers owners).
The behaviors should be affected by their individual botSkill value when it makes sense.
Currently, following changes are implemented:
- human bots can buy light armors at stage 0 (they can not on vanilla)
- human bots mix flamers and pulse rifles (they can not buy pulse rifle on vanilla)
- human bots won't buy radars if that means that more than 75% of the team will have one
- human bots run when their target is friendly. This means they will run when going to armory for equipment, when going to medistation for healing, and when trying to repair things
- marauders jumps to flee faster
- tyrants charge to flee faster
- mantis and dragoons pounce to flee faster
- aliens flee until they reach creep, instead of a fixed distance of 100 (except for booster)
- aliens touch booster when trying to heal
- humans don't run if the stamina cost would prevent them to jump, if skilled enough
- rushScore is now calculated by considering the total credits bots (bot aliens and humans) have (including already owned evolutions), the maximum credits they can spend in current stage, and their skill: the more skilled they are, the less likely they will rush if that means they can't buy decent evolutions when they die.
- they should be able to use grenades
- bots decision to go to heal is no longer affine and depends on their skill. That mean that, if they're slightly hurt (say, at 95% health) but close to medistation, they will go there to heal before moving on.
- human bots will equip (armors, backpacks, grenades) before going to repair stuff
- human bots now defend their base instead of waiting for medistation to be free (range might be improved)
- don't throw grenades or firebombs if close enough to reactor
- Have a minimum health percentage to evolve for aliens (maybe sell stuff for humans until healed?).
- Have bots evolve even at low health: limitation is based on healScore < 0.5, which depends on the skill.
- Have bots do fast retreat at high skill only. (no fast retreat below skill 5)
- Bots have multiple skills: aim, move and aggressiveness, which are randomly set, with their "level" as a base (the number of points spent are always equal to "level * nb_skills")
- Bots chase time depends on their "move" skill
- Bots aim speed depends on their "aim" skill
- fixed bots selling their weapon and not buying one (including ckit)
- work around situations where bots are misled by navmesh bug or by meeting friend they can't jump over
- humans bots should not queue at medistation.
- if close enough to reactor, owning a luci and attacked, buy pulse rifle to repel invaders
- distances should not be about Euclidean distance, but about the navmesh's size between bot and target
- bots should be able to place back critical buildings (spawns, RC/OM, armory, medistation, booster) in some conditions (this include being able to spawn as builder)
- bots should defend builders instead of rushing or roaming when number of critical buildings is too low
- roaming distance should depend on their status (skill, health, money, etc)
- new actions: raid and defend. When rush, target enemy's critical buildings. When raid, target defenses. WHen roaming, just wander. When defending, stay close to base.
- players of same team should be able to give them basic instructions (defend here, defend main base, roam, raid, rush, follow me)
- bots should be able to reload depending on situation and skill level
- bots should be able to play grouped
- a good rush implies to not rush alone: require at least N% of team raiding to switch their action to rush.
- don't fight acid tubes on melee, instead, move back out of range
- move (if possible) when fighting buildings damn it!
- jump over stairs, fences, etc (shortcuts in various maps)
- ability to use covers from walls or friends
- aliens able to target human buildings on heights
- when a ranged attack is available, backpedal when retreating, except when reloading or really low hp (faster when moving forward)
- Switch to blaster when target is too far to be reached with current weapon
- Don't pursue for ages when main weapon is a CKit (and switched to blaster to defend)
- Fix pain saw estimated range, when buildings are on walls or ceilings. I suspect this one is because the building's perception might, in practice, be "projected to ground".
- bots should not sell powerful equipment because of momentum loss, but they should still be able to upgrade only the worst equipment. Currently only applies to armors.
- they should be able to wallwalk and use jetpacks
- rewrite remaining score functions, which are used to take decisions, so that they use as little as possible hard-coded values, instead, base decisions on gameplay elements (equipment's price, game's age (better to attack buildings when game is old, since they're hard to rebuild then), etc).
-> done: HealScore, which now enables opportunistic use of healing structures. I'm rather happy with the result.
-> done: RushScore, which now considers the total amount of money the bot is worth, how skilled bot is, and maximum spendable money depending on server config and stage. I'm not happy with this, as the function is linear, and it does not really prevents aliens bots to constantly rush.
-> TODO: EnemyPriority, which should probably be a mix between distance, a target defensive score (based upon armor and health) to favor easy kills?, a target offensive score to defend base, and other things. I am unsure about how exactly to build it.
- bots should be able to refuel ammo (including adv goons), health, poison when close enough to armoury, medistation or booster
-> done for healing, still have to implement resupply (reload ammo, get new clips, get poison, get grenades, get barbs)
- when healing or resupplying, search enemies to attack
-> half done: bots will stop their healing routine if enemy is close enough to the heal point, but won't try to fight from afar, which would allow them to effectively heal in the meantime.
Starting with now (24/07/2021), games will timeout at 3H, because I had a 10 hours old game on forlorn with the skill 3 server. This was rather stupid anyway, 3H games sucks (for unvanquished, that is).