Jump to content
  • 0

Make a character AI only.


rockocalypse

Question

If I have character Y and I want to take the ability of it being human controlled away and have him just be his AI All the time, is there a universal way to go about it? Like a certain file or line of coding I can delete to make him be AI always? Or does the sort of thing vary from character to character? 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

I think one of the common ways to achieve this is, to modify a MUGEN character's CMD file.

 

Take MUGEN1.0 KFM as an example, in his CMD file:

;Smash Kung Fu Upper (uses one super bar)
[state -1, Smash Kung Fu Upper]
type = ChangeState
value = 3050

triggeall = AILevel != 0     ; add this line to make this super move available when A.I. is in use
;triggerall = command = "SmashKFUpper"   ; comment out this line (using the ";" key) or remove the line to make this super move available to the A.I. only
triggerall = power >= 1000
triggerall = statetype != A
trigger1 = ctrl

trigger1 = random <= 30                ; add this line to tell the A.I. to perform this super move with a 30/999 probability, whenever it has control

                                                        or use a VarRandom state controller to make the random action happen more subtly and precisely
trigger2 = hitdefattr = SC, NA, SA, HA
trigger2 = stateno != [3050,3100)
trigger2 = movecontact
trigger3 = stateno = 1310 || stateno = 1330 ;From blocking

 

For the old winmugen MUGEN characters, the triggeall = AILevel != 0 might be replaced by triggeall = var(59) != 0 as var(59) is a commonly used MUGEN variable in the old winmugen A.I. activation, yet it highly depends on the MUGEN creator's/author's habit.........

 

Of course there are some other ways.............yet I think the above way is the most convenient one I could think of.......

Link to comment
Share on other sites

  • 0

So, for instance, this command is

;Throw Fire

[state -1, Throw Fire]
type = ChangeState
value = 1200
triggerall = var(40) = 0
triggerall = power >= 1000
triggerall = command = "y"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
 
So to make it all AI I change it to
;Throw Fire
[state -1, Throw Fire]
type = ChangeState
value = 1200
triggeall = AILevel != 0
triggerall = var(40) = 0
triggerall = power >= 1000
triggerall = command = y (no more quotations)
triggerall = command != holddown (no more quotations)
trigger1 = statetype = S
trigger1 = ctrl

trigger1 = random <= 30 

would these be the right changes to make the AI control the command in place of the human?

Link to comment
Share on other sites

  • 0

So, for instance, this command is

;Throw Fire

[state -1, Throw Fire]
type = ChangeState
value = 1200
triggerall = var(40) = 0
triggerall = power >= 1000
triggerall = command = "y"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
 
So to make it all AI I change it to
;Throw Fire
[state -1, Throw Fire]
type = ChangeState
value = 1200
triggeall = AILevel != 0
triggerall = var(40) = 0
triggerall = power >= 1000
triggerall = command = y (no more quotations)
triggerall = command != holddown (no more quotations)
trigger1 = statetype = S
trigger1 = ctrl

trigger1 = random <= 30 

would these be the right changes to make the AI control the command in place of the human?

 

Perhaps my explanation was misleading.  Commenting out a line in MUGEN code is to put a ";" before any line so,

 

triggerall = command = "y"
triggerall = command != "holddown"
 
commenting these two (2) human-usable command code will look like this:

;triggerall = command = "y"

;triggerall = command != "holddown"
 
this way a human play can never execute the button "y" and hold down command anymore
 
and, before using the triggeall = AILevel != 0 line, you have to make sure you are using MUGEN1.0, or it will crash for sure.
 
last, the triggerall = var(40) = 0 line..........it suggests a condition requirement where the MUGEN variable #40 must be equal to 0

you need to investigate how was this var(40) used.  It could be anything - P2 is down, game time is less than 50, no helpers/strikers, a certain amount of hits made, some distance between players, P2's name not equal to "KFM"........etc........

 
 
Link to comment
Share on other sites

  • 0

It's never as simple as you think it's gonna be in coding. That being said, having the ; around the command means that the human can't ever execute the move from what Im now to understand. so what if I just add the ";" to every command to make them all non-human controlled? Will the AI automatically take over those commands?

 

(I am for a sure using 1.0. Im going to test my theory.)

 

Edit: My theory was terrible. all it did was make the character float to one side of the stage with no animations. I think this is way over my head XD

Link to comment
Share on other sites

  • 0

It's never as simple as you think it's gonna be in coding. That being said, having the ; around the command means that the human can't ever execute the move from what Im now to understand. so what if I just add the ";" to every command to make them all non-human controlled? Will the AI automatically take over those commands?

 

(I am for a sure using 1.0. Im going to test my theory.)

 

Edit: My theory was terrible. all it did was make the character float to one side of the stage with no animations. I think this is way over my head XD

 

OK, let's do it straight-forward:

- every time you see some lines that contains " command = "blah" ", just delete the whole lines

- without those " command = "blah" " lines, the only being that can control the MUGEN character is the CPU A.I.

 

And, things like " triggerall = command != holddown " (in your previous post you took out the double-quotation marks) can only make your MUGEN crash.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...