YesNoOk
avatar

How to make the AI use less the same moves/combo's (Read 10022 times)

Started by MagmaStone24, January 05, 2022, 01:09:47 am
Share this topic:
How to make the AI use less the same moves/combo's
#1  January 05, 2022, 01:09:47 am
  • *
    • Netherlands
    • www.youtube.com/user/TheMugenVideos
How can I make the AI less aggressive and less spammy and use more a variety of different moves?

Right now the AI spams a lot of the same moves over and over again, and I want to reduce that. Can I edit that in the CMD file?
Re: How to make the AI use less the same moves/combo's
#2  January 05, 2022, 01:56:46 pm
  • ****
    • crepa.neocities.org
Yes. In the CMD you need to find the moves coded for the AI (not to be confused with the ones intended for the player) and change their "random" values. You can spot if a command is used by the AI if one of the triggers is "AIlevel".

If you want to take a look at similar topics that I answered, they are a little more detailed:
https://mugenguild.com/forum/topics/tweaking-ai-falcon-rapper-characters-etc-194392.0.html
https://mugenguild.com/forum/topics/edit-ai-cvs2-chars-190798.0.html
https://mugenguild.com/forum/topics/editing-characters-ai-pattern-189022.0.html
Re: How to make the AI use less the same moves/combo's
#3  January 07, 2022, 11:33:19 am
  • ******
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
Besides changing the number on the "random" percentage, you could also fine-tune it with additional statements. This is one of my tricks when I code my AIs

Take a generic AI pattern as this one:
trigger1 = P2BodyDist x <= 75 && Random < 250

and fine-tune it with additional conditions such as this one:
trigger1 = P2BodyDist x <= 75 && Random < (250 -50*(enemynear,statetype=A)-100*(enemynear,vel x>0) +75*(enemynear,movetype=H))

250 is the AI percentage base of the move
-50 will decrease the percentage if the enemy is jumping
-100 will decrease the percentage if the enemy is moving forward
+75 will increase the percentage if the enemy is currently hit

With these patterns, you have an adaptive  AI that will adjust the odds of a move coming out depending on further conditions

XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!