B Other [WB] Competitive-style combat AI - Playable version (0.2) out!

Users who are viewing this thread

Oliveran

Master Knight
Hello!

I'm a long-time competitive player, who's always really enjoyed all aspects of singleplayer - but as I increased in skill, the AI got dull very quickly, as I grew with the competitive scene's skill. As the game has reached a relatively stagnant point in terms of figuring out mechanics, break down playstyles and ways to play as a team; I figured I could use the knowledge to make an AI that can play more player-like, that can be functional in both singleplayer and mutiplayer (though ofc not at a competitive level :razz:)

  • Block&Attack safely
  • Feinting
  • Footwork, not get outranged or kicked
  • AI kicking
  • Archers aim for all parts of the body
  • Avoid clumping between teammates
  • Spearmen targetting cavalry
  • Archer spread out aim over targets

The bot is to be enjoyed using manual blocking, and working with fast paced mechanics. Difficulty will be ignored to what extent there possible is (apart from the damage lowering), to make it truly a challenge :party: The current bot will beat the best competitive players in melee unless they play with full focus.

Once it's done, I'll release source so it can be added to mods.

Here's a few testplays at the different stages of developement I'm in, or have done.


https://www.youtube.com/watch?v=X9XICIGK5yY
https://www.youtube.com/watch?v=7O9hFlkLSNA&feature=youtu.be
https://www.youtube.com/watch?v=tgyhKRcFVL8&feature=youtu.be
https://www.youtube.com/watch?v=ppcOawQ7z1Q&feature=youtu.be

https://www.youtube.com/watch?v=VJyeI1iHoRk&feature=youtu.be





Download link
Code:
To use this AI, you must use the Warband Script Enhancer - Lua Edition (WSE Lua) included in the download of this file.
It uses a library not included in the one currently uploaded on the forum. Therefor, you must use the included version instead.

Put this into the MAIN folder of your Warband directory, i.e. /Program Files (x86)/Mount&Blade - Warband/

Then run the game via /Program Files (x86)/Mount&Blade - Warband/WSE Lua/WSELoader.exe

Running the module included without WSE Lua will cause errors, crashes and glitches.

Please do not forget to give feedback on glitches or problems you may have while testing it; suggestions are also very welcome and I'll make sure to at the very least read every post and make decisions based on whatever feedback and suggestions I get.
Note: If you play with this in edit mode, because of the loops running in the code, it will slow it down extremely. For some, it might be unplayable. To have the game run fluently and at your usual framerate, please turn editmode off.






Credits to Krex and Gotha for putting up with my irritating questions regarding the ModSys at times :party:
And credits to Belendor for helping me start doing the AI :cool: Wouldn't have known where to begin, otherwise.
 
Looks awesome, good luck! It's certainly in good hands. Really interested to see what you can do with the cavalry, they seem to be the most difficult to handle with things like this.
 
Update:
Kicking added!

The AI can now kick. I recorded these videos, giving a random chance for the AI to do the actual attack after landing kicking, to showcase the actual kick rather than make the AI fights short :party: It will however kick more rarely, but always complete the attack if the kick hit in the actual release of the module. The random chance it had in these videos will not be there in the actual gameplay! :wink:

Videos:

Going to work on archer's aim now.
 
Holy ****! 0.37 - 0.40. That guy is turk, what a rekt. Nice stuff bae
 
Update:
The AI can aim at different parts of the body now!

It can aim at specific parts of the body (feet, knees, hands, forearms, thighs etc) to make it more dynamic, and fun to both face and also to see where it'll shoot next! It will choose the head 25% of the time, feet 25% of the time, other bodyparts 50%. There's currently 17 bodyparts in Warband, so feel free to enjoy arrows sticking out from more places than the thighs, feet and chest now :twisted:

 
AIDS said:
It stand for The Last Days of the Third Age of Middle Earth, it's a very popular Lord of the Rings mod. In fact if you take a look at the steam workshop, it's among the most downloaded mods there. When last I checked, they've been having some problems, in that certain races such as dwarves and orcs are shorter than regular humans, but they had the same hitboxes, so when archers shot at the "head", they would miss the actual target.
There's information where you could potentially set those values differently; in 'openBRF', you can check the human bone position - if you can find them, you could probably change them somehow.
 
Oliveran said:
AIDS said:
It stand for The Last Days of the Third Age of Middle Earth, it's a very popular Lord of the Rings mod. In fact if you take a look at the steam workshop, it's among the most downloaded mods there. When last I checked, they've been having some problems, in that certain races such as dwarves and orcs are shorter than regular humans, but they had the same hitboxes, so when archers shot at the "head", they would miss the actual target.
There's information where you could potentially set those values differently; in 'openBRF', you can check the human bone position - if you can find them, you could probably change them somehow.

Actually, all they need is your code adjusted for the proportions of the custom skeletons TLD has.
 
Efe Karacar said:
Actually, all they need is your code adjusted for the proportions of the custom skeletons TLD has.
Yeah. They had done that, apparently, but not used the correct code to alter the aim properly. Gave my aim code to them, so they should be able to fix it.
 
In order of functionality, I will re-write the AI to not have too many target the same enemy (i.e. 1 horse, 20 around him doing nothing...), before I do any work with anti-cavalry spearmen. Clumped up teammates is problem that I have to deal with when spearmen try to cover cav, so I want to solve that 'logical issue' first. To make the spearmen work, there must be little-to-no collision chances, first.
 
BNS Marko said:
AI in general is a messy job, big props to you for undertaking this so succesfully!
The issue lies in balancing when it follows the path; if I tell it to 'hold here', should it still distance itself from teammates? During fights too? What about while running forward? It seems counter-productive for it to move backwards then cus it was too close to the back of it's teammate, and so on.

This is the issue, not the AI in itself but the wide scope of potential things that can happen.
 
Reminds me of my Ultimate Combat OSP. Very nice work! You can look at my code if you want, it contains shield bashing stuff as well as a decapitation system.
 
Back
Top Bottom