The Mugen Fighters Guild

Help => M.U.G.E.N Development Help => Topic started by: Redben on March 05, 2021, 04:37:56 PM

Title: How to prevent an AI from applying a move?
Post by: Redben on March 05, 2021, 04:37:56 PM
Hello, one can outright delete the coding of a move, or give it meter requirement that exceeds the limit of power the character has.. but these solutions sometimes can produce problems with the gameplay of the AI during the match.. not always, but sometimes. So I wonder if there was another option, thanks.
Title: Re: How to prevent an AI from applying a move?
Post by: DS on March 05, 2021, 05:26:19 PM
If you're using MUGEN 1.0 or above, you can go in the CMD, find the move, and add this:

triggerall = !AIlevel

You will still be able to perform the move, but the AI won't.
Title: Re: How to prevent an AI from applying a move?
Post by: Redben on March 05, 2021, 08:39:15 PM
If you're using MUGEN 1.0 or above, you can go in the CMD, find the move, and add this:

triggerall = !AIlevel

You will still be able to perform the move, but the AI won't.

Thanks for the answer, but are you sure that's the exact coding? Because I've tried it on the character in both mugen1.1 beta and mugen 1.0 and the game crashed before the match.
Title: Re: How to prevent an AI from applying a move?
Post by: DS on March 06, 2021, 09:30:38 AM
Yes, sure. You put it right above the other triggers.
Should look like this:

[State -1, move you want to remove]
type = ChangeState
value = 3000
triggerall = !AIlevel
triggerall = command = "2qcfp"
triggerall = power >= 1000
trigger1 = statetype = S
trigger1 = ctrl
[...]
Title: Re: How to prevent an AI from applying a move?
Post by: beterhans on March 06, 2021, 04:40:30 PM
If you're using MUGEN 1.0 or above, you can go in the CMD, find the move, and add this:

triggerall = !AIlevel

You will still be able to perform the move, but the AI won't.

Thanks for the answer, but are you sure that's the exact coding? Because I've tried it on the character in both mugen1.1 beta and mugen 1.0 and the game crashed before the match.

you need to declare the character version before you can use 1.0 or 1.1 code
in you char def file
mugenversion = 1.0 or 1.1
if you saw a date it's winmugen. you can't use 1.0 or 1.1 code
Title: Re: How to prevent an AI from applying a move?
Post by: Redben on March 14, 2021, 06:24:23 PM
If you're using MUGEN 1.0 or above, you can go in the CMD, find the move, and add this:

triggerall = !AIlevel

You will still be able to perform the move, but the AI won't.

Thanks for the answer, but are you sure that's the exact coding? Because I've tried it on the character in both mugen1.1 beta and mugen 1.0 and the game crashed before the match.

you need to declare the character version before you can use 1.0 or 1.1 code
in you char def file
mugenversion = 1.0 or 1.1
if you saw a date it's winmugen. you can't use 1.0 or 1.1 code


So basically if the mugen version is older one needs to change it to 1.0 or 1.1 in the DEF file before adding the code.

I'm a bit late, but I would also add that sometimes adding the coding in the cmd won't be enough, so adding it to the Hitdef (s) of the move in the cns file as well can finish the job (just below the type).
And sometimes many codings of the same move can be spread over different parts of the cns, which means you will have to make sure to check all of them and look for the number of the move and add the coding.

But if there is a seperate AI cns file, one has to add the coding below the move there. Usually in this case that all one needs; so instead of adding it in the cmd or other cns files just go straight to the AI file.