Triggerall = p2statetype != A <- Trigger when the opponent is not in air Triggerall = p2bodydist x = <- Trigger when the opponent is between 0 to 40 pixels away horizontaly Triggerall = p2statetype != L <- Trigger when opponent is not lying on the floor Triggerall = random < 500 <- Trigger the move in 50% of the times the conditions is met (i'll explain more) Triggerall = statetype != A <- Trigger when the char is not in air
MUGEN AI PATCH TUTORIAL CODE
bar displays every move state no.īut the code above is very basic and will make the character keep punching continuasly like an idiot, So you must add more triggers to make the character punch only in a certain situation like this: of the moves, The second way is the easiest just open the character in fighter factory and press the animation tab, you'll find the begin action no. of the character moves while coding the AI, First one is choosing the character in training mode and turn on debug mode by pressing ctrl+D, Performing every move and the debug mode will tell you the state no. Now you told the CPU that when Var(59) equals 1 and you have control over the character then perform a change state, In this case the state wanted is a weak punch(value = 200), There are 2 ways to know the state no. Trigger1 = ctrl = 1 <- Character can be controled (Not performing a move) Triggerall = var(59) = 1 <- AI variable that must be used in every CPU command Triggerall = roundstate = 2 <- Trigger during the fighting phase of the round "Round One.Fight"
![mugen ai patch tutorial mugen ai patch tutorial](https://i.ytimg.com/vi/XpoGf0L8mZs/sddefault.jpg)
of the animation you want the CPU to perform Now you start programing the AI, Each cpu command must have declaration or -2 or -3 depending on the state you're programming the AI in, For example: (Thanks Cyanide)Įdit: Please note that the programing of the AI itself i'm about to explain doesn't matter if you use this activation method or Winane's method, It's the way AI is programed in both. It's a lot of copy and paste but that way you'll cancel any interferance from the default Mugen AI, Now the character is like a blank page for you to write what you see fit, But before we venture into AI programing, Open the CNS file and in the paragraph change the number of the IntPersistIndex to = 58, if it's already = 58 then keep it and if this line is not typed, Type it yourself "IntPersistIndex = 58" don't ask why cause i realy don't know, it just activates the AI faster i think.Įdit: This means if you activated the AI in round one, it'll still be active in round 2+. Trigger2 = command = "a" & command = "holdback" Trigger1 = command = "a" & command = "holdfwd" Triggerall = var(59) != 1 <- This cancels the AI usage of the human commands
MUGEN AI PATCH TUTORIAL ACTIVATION CODE
It's time to announce to the CPU that it has control over the character, You can add the activation code in the CMD file under preferbly at the end of the CMD, Or you can program the AI in one of the CNS files of the character under or under but those statedefs must be declared, in some characters -2 or -3 are not declared so you have to declare them yourself by typing or and then add the activation code under them, in the CMD is always declared by the creator so no need to declare it again but if you separate the AI from the character files in a separate file, You're gonna have to declare it again. You can add as much more as you like but don't exceed 60 cause the CMD only supports 128 unique commands per character including human commands, And you will not need that much any way, I only use 40 or even less, Also don't use same command combination, Each cpu command must have a unique combination and it doesn't matter what the combination is as you see above it's just some random combinations.
![mugen ai patch tutorial mugen ai patch tutorial](http://homepagerom.weebly.com/uploads/1/2/6/7/126728733/983869560_orig.jpg)
Name = "CPU1" <-(AI Command Name)Ĭommand = U, D, F, U, D, F <-(Command combination) Pupil (Beatrice A.I.) vs Teacher (Virgilia A.I.Code: -| AI |. Now, please allow to show how the Beatrice_AI(mugen1.0).zip and Virgilia_AI(mugen1.0).zip have made my Custom OMK Beatrice and Custom OMK Virgilia MUGEN A.I. I discovered that ホルン has made a Beatrice_AI(mugen1.0).zip and a Virgilia_AI(mugen1.0).zip for my Custom OMK Beatrice and Custom OMK Virgilia, and I gave it a try and it surely boosted my Beatrice and Virgilia's MUGEN A.I. Recently I came across with a Japanese MUGEN web space and found that ホルン has been making and releasing a lot of MUGEN A.I.