Sykotik Character Creation Tutorial

Note: Done in a day, might be sloppy, e-mail me for corrections and changes, if you want something added, in the subject line, put the name of the section that you want it added to, thank you...

Note: I will also be rushing through the first 3 or 4 sections, since they have been done before, so sorry if this has caused you any inconvienence...

Note: I recommend that you use KFM's template files for the base of your first character, or at least for testing while reading this tutorial...

Introduction

Ok, this tutorial was meant for people who want their favorite character in MUGEN, the 2d fighting game engine created by Elecbyte, and have no idea whatsoever on how to start. I will go over the following things in detail and with descriptions of what they do. This is what I will be following in this version of the tutorial:

- Ripping Sprites

- How to make sprites acceptable in MUGEN (cleaning, cropping, making it the right file type, etc.)

- How to make a palette for the character in MUGEN

- How to make the SFF file (the axis of pictures, group numbers, and image numbers)

- How to make the AIR file (CLSN boxes, how to make an action, etc.)

- How to make a command in the CMD file (along with AI and what the different options for a State -1 are)

- How to make a state in the CNS file (pretty much descriptions of what all the options are)

- Examples of most of the above and how to program things that you always wanted to program (artificial intelligence, super jumps, launchers, combos, moves that hit twice, etc.)

- Finally, link to other great tutorials by famous MUGEN gods

Without any further ranting, I think we can start with the tutorial now...

Ripping Sprites

Ripping the sprites of the character that you are going to make is an essential part of MUGEN, since if they weren't there, there wouldn't be any character. First of all, you must find a character that you would want to make. Also, it would be a good idea to see if he was even made, first. Now, once you've found out who you want to make, the next step is to get a rom and/or emulator with that character, so that you can begin the sprite ripping process. With some roms, like NeoRageX, sprite ripping is made incredibly easy with shot factory. Shot factory disables any unneeded layers, presumably the background and other fighter, then allows you to save the picture that you have. Plus, it allows you to play the rest of the game with those layers disabled, allowing you to take much faster and easier pictures. Some other roms, like Zsnes, Callus, and Bleem, are easy to rip from with the ability to screen capture, but they aren't as detailed as NeoRageX, and only allow you to take a picture and edit everything out later. However, Zsnes has the ability to disable layers so that only you and your opponent are left, making the cleaning process easier. Callus even has a feature so that you can slow down animation very much, which makes ripping every sprite much easier. Whichever emulator that your character is on, it shouldn't be too much of a trouble ripping them. Unfortunately, some good emulators don't even have a screen capture feature. "Then, how do I rip sprites from it", you make ask, and the answer is simple. You just have to download a screen capture program from off the internet, enlarge your emulator screen to full size, and set the screen capture program to capture the pic when you press a certain key. A few good screen capture programs happen to be Namo Capture and a program called just plain Capture. I believe that I have touched base with about everything needed in this section of the tutorial. If you would like anything else added to this section that makes sense, just e-mail me and I will probably add it.

How To Make Sprites Acceptable In MUGEN and How To Make A Palette For The Character In MUGEN

First of all, most emulators, as I have mentioned above, help out a lot in this process. Some convert the pictures to 8-bit PCX, like what MUGEN accepts, and even take out all of the unneeded layers. However, this section will deal with a picture that was screen captured, uncleaned, in some type of BMP format, and whatever else that might make the picture harder to make MUGEN acceptable. Ok, first you can download PCX Clean from Elecbyte's website and then use that to take out all unneeded objects in the picture. I have never used PCX Clean, so unfortunately, I won't be able to tell you how to use it. I figure that you are smart enough to find out how to use this. Next, we must make a palette by opening up Paint Shop Pro or Adobe Photosop, whichever you use, and converting the picture to an 8-bit PCX, so that you can make a palette for it. Then, click on save palette and save it as something that you will remember. Do the following with every other picture, but instead of saving the palette, click load palette, and load the palette that you saved earlier. This shouldn't cause too many problems, but you can e-mail me if some problems pop up, and if they are familiar to me, I will be able to help fix them. I think that I have pretty much touched base on everything here, also, so I will go on to the next section of this tutorial. However, if want anything added to this section of the tutorial, just be sure to e-mail me and I will be happy to add it, if it would fit here mind you.

Sunboy's Commentary: For creating a palette, I suggest getting all sprites with different colors and putting them into one big PCX to convert to 8-bit color and apply that palette to all the other frames.

How To Make The SFF File

Ok, first you have to go to S駸' page and download the Mugen Character Maker. Not only is this little gadget handy for making SFF files, but it is the only way to make SFF files in this day and age. Once you download Mugen Character Maker and play around with it a bit, it shouldn't be too hard to figure out how to use it. I might as well go over the basics though first. Keep in mind, when using Mugen Character Maker, it does crash quite a bit, but not nearly as much as MuGenerator does. Now, when you open up MCM (Mugen Character Maker from now on), you will notice that its pretty blank. I suggest putting MCM in the directory with your characters sprites, since that is a good place to save the SFF file and it makes it easier to add sprites. All you have to do basically is keep on adding sprites until every one of them is in the SFF. My advice, though, is to save your sprites in the order that they're animated when put in the SFF file. That way, when you go to do SFF work, like the group and image numbers, you don't have to travel all over the SFF looking for the next frame of animation or even wondering what it is, if the animation is so fluid that the frames look the same and are nowhere near each other. Anyway, once you have added every sprite you must do the axis for the sprites, which is pretty easy, and I really can't help you, since every character (well almost) has a different axis. But, I'm sure you can figure out that the horizontal line on the + in the middle of the MCM screen is the floor, which you want your characters feet to be a little below that, since floors aren't one line in MUGEN and you want them to not be at the very beginning of the wall, but in the middle of the floor. After you are done with the axis for every sprite, you must now do the group and action numbers. Both numbers mean what sprite you will use, since the following is how they are used (excerpt from an AIR file):

0,0 0,0 10

The first two 0's are its group and image number, the second two are its x,y position, and the 10, standing for amount of game ticks, is how long the animation plays. Sorry, for taking a huge bite out of the AIR file section, but I will explain stuff more detailed there. Also, keep in mind that the group number is usually the same as its action number in the AIR file and its state number in the CNS file. I believe that I have pretty much covered this section. Once again, e-mail me if you want to see anything added to this section of the tutorial and I will do so if I see it fitting.

How To Make The AIR File

This is probably one of the easiest parts of MUGEN programming, so I probably won't be spending too much time on it. Let's just start by defining for you, every part of an action so that you can see exactly what the actions in the AIR file really do. Then, I will go into CLSN boxes, which shouldn't be much of a problem if you use AirEdit like any other normal Windows program. Anyway, the following is from an upcoming characters AIR file, we will define every part of the state there, as said above, so that you can have a better understanding of the state:

;--------------------------------------------------------------------------- ;Divider (Unrequired)
; Standing Animation ;Name Of Move (Unrequired)
[Begin Action 000] ;Action Number Of Move (Required)
Clsn2Default: 2 ;Number Of CLSN2 default boxes used for all sprites below it (Required)
Clsn2[0] = -13, 0, 16,-79 ;CLSN box (Required)
Clsn2[1] = 5,-79, -7,-93 ;CLSN box (Required)
0,1, 0,0, 10 ;Group Number, Sprite Number X Axis, Y Axis Time (Game Ticks) (Required)
0,2, 0,0, 10 ;Group Number, Sprite Number X Axis, Y Axis Time (Game Ticks) (Required)
0,3, 0,0, 10 ;Group Number, Sprite Number X Axis, Y Axis Time (Game Ticks) (Required)
0,4, 0,0, 10 ;Group Number, Sprite Number X Axis, Y Axis Time (Game Ticks) (Required)
0,5, 0,0, 10 ;Group Number, Sprite Number X Axis, Y Axis Time (Game Ticks) (Required)
0,6, 0,0, 10 ;Group Number, Sprite Number X Axis, Y Axis Time (Game Ticks) (Required)
0,7, 0,0, 10 ;Group Number, Sprite Number X Axis, Y Axis Time (Game Ticks) (Required)

As you can see, the AIR file isn't really that tough at all, but if you are still skeptical, here is another excerpt from the same character, showing you that it doesn't get much tougher than the above:

;--------------------------------------------------------------------------- ;Divider (Unrequired)
; New Super ;Name Of Move (Unrequired)
[Begin Action 6050] ;Action Number Of Move (Required)
Clsn2Default: 1 ;Number Of CLSN2 default boxes used for all sprites below it (Required)
Clsn2[0] = 15, 0,-20,-91 ;CLSN box (Required)
6050,0, 0,-10, 6 ;Group Number, Sprite Number X Axis, Y Axis Time (Game Ticks) (Required)
Clsn1: 7 ;Number Of CLSN1 boxes used for all sprites below it (Required)
Clsn1[0] = 82,-110, 72,-89 ;CLSN box (Required)
Clsn1[1] = 74,-95, 63,-83 ;CLSN box (Required)
Clsn1[2] = 67,-87, 55,-80 ;CLSN box (Required)
Clsn1[3] = 12,-71, 24,-60 ;CLSN box (Required)
Clsn1[4] = 21,-73, 35,-66 ;CLSN box (Required)
Clsn1[5] = 33,-68, 47,-78 ;CLSN box (Required)
Clsn1[6] = 43,-74, 59,-84 ;CLSN box (Required)
6050,1, 0,-20, 6 ;Group Number, Sprite Number X Axis, Y Axis Time (Game Ticks) (Required)
Clsn1: 7 ;Number Of CLSN1 boxes used for all sprites below it (Required)
Clsn1[0] = 31,-130, 14,-50 ;CLSN box (Required)
Clsn1[1] = 74,-95, 63,-83 ;CLSN box (Required)
Clsn1[2] = 67,-87, 55,-80 ;CLSN box (Required)
Clsn1[3] = 12,-71, 24,-60 ;CLSN box (Required)
Clsn1[4] = 21,-73, 35,-66 ;CLSN box (Required)
Clsn1[5] = 33,-68, 47,-78 ;CLSN box (Required)
Clsn1[6] = 43,-74, 59,-84 ;CLSN box (Required)
6050,2, 0,-30, 6 ;Group Number, Sprite Number X Axis, Y Axis Time (Game Ticks) (Required)
6050,3, 0,-30, 6 ;Group Number, Sprite Number X Axis, Y Axis Time (Game Ticks) (Required)
6050,4, 0,-20, 6 ;Group Number, Sprite Number X Axis, Y Axis Time (Game Ticks) (Required)
6050,5, 0,-10, 6 ;Group Number, Sprite Number X Axis, Y Axis Time (Game Ticks) (Required)

This action number seems to be much more difficult at first, but after reading the comments, you can see that it is just like the first, just with larger group numbers for the sprites and more CLSN boxes (Heh, notice that there are even less sprites in this action number). Now, I will go into how to make a CLSN box. First of all, open AirEdit through Windows and not MSDos. Then, click open and select your characters AIR file (everything except for the CLSN boxes should be done in here at this point), then select its SFF file. Note that it might be SFF file then the AIR file. Either way, make sure that AirEdit is in your characters directory so that you can access the characters files easier. Then, once you are done with that, select (click on the boxes next to, causing an X to appear) Show CLSN1 Boxes and Show CLSN2 Boxes. Afterwards, just highlight where you want the box to be, click Save1 (or Save2 etc. if you want to add a second or more boxes to the same frame), and then go to File>Save to select which kind of CLSN box that you would like to make. In order to delete a box, without drawing a box, click Save1 (or Save2 etc. depending on which box that you want to delete), and then go to File>Save>CLSN1 so that it says something about there being no boxes highlighted and would you like to delete all boxes in this frame. However, it only illusions all boxes being deleted, and only the box that you selected will be deleted. After you do all of the CLSN boxes, click exit and they should all be automatically saved, but it is safe to keep on reopening AirEdit and checking that it saved the new boxes right, but I think what I told you might fix that problem. As always, if you want anything else added to this section, just feel free to e-mail me and I will most certainly do so as long as it fits here. Now, onto the examples of making a CNS and CMD file, which should be more detailed on how to do so, but won't explain how to do everything.

How To Make A Command In The CMD File

This shouldn't be too hard, so I'll first explain a few things before I get into the basics with a bunch of examples. The CMD file isn't all that hard at all, and you should be able to learn it quickly. The sooner the better because all AI programming is done in the CMD, pretty much. Well, actually there isn't much else to say, so let me get into a command. The following is an example one with descriptions on what each part does:

;-| Special Motions |----------------------------------------- ;Header For The Type Of Moves To Follow (Unrequired)
[Command] ;Defines that this is a command (Required)
name = "QCF_x" ;The name of the move, which you use later when you are doing the State-1's (Required)
command = ~D, DF, F, x ;The command that needs to be done in order to do the move (Required)

As you can see, the command isn't that complicated. The name can be whatever you want, and so can the command, but it is recommended that you make the command the same as it is in the game. However, if you have trouble understanding the stuff that comes after "command =", read the CMD file for Kung Fu Man, and it explains what you put in for each kind of motion that is possible in MUGEN. Now, to teach you people about the State-1's which is basically just a state that is lower in the CMD file that calls the command and tells it what state in the CNS to affect. Here is an example of the State-1 that calls the above command, so study it carefully:

[Statedef -1] ;This Does Not Come Before Every Move, But Is Rather The Header To The State-1's (Required)
;--------------------------------------------------------------------------- ;Divider (Unrequired)
;Light Kung Fu Palm ;Name Of Move (Unrequired)
;カンフー突き手（弱） ;Gibberish, but probably a description or something (Unrequired)
[State -1, Light Kung Fu Palm] ;All Moves In The Statedef-1 Start Like This, With The "Light Kung Fu Palm" Being The Name Of The Move
type = ChangeState ;Changes The State So That It Goes To The Value Below In The CNS (Required)
value = 1000 ;This Is The State Number In The CNS That The Command Activates When Move Is Performed (Required)
triggerall = command = "QCF_x" ;This Tells The State-1 To Activate When The Command To The Left Is Performed (Required)
trigger1 = statetype = S ;This Tells The Command To Only Work When The Opponent Is Standing (Unrequired)
trigger1 = ctrl ;This Tells The Command To Work Only When The Character Has Control (Unrequired)
trigger2 = (stateno = [200,299]) || (stateno = [400,499]) ;Tells Command To Occur If Character Is Between These States (Unrequired)
trigger2 = stateno != 440 ;This Tells The Command To Not Occur When In State 440, Since != Means Not
trigger2 = movecontact ;Tells The Command To Occur On Move Contact

This might confuse you, but keep in mind it is only to give you a very basic idea of the MUGEN game engine, and since this is a very early version of the tutorial, it will probably have many mistakes, and I have asked you people before to help me in correcting them. If you are talented in MUGEN and wants to continue this tutorials, please feel free to as long as credit to me is given for the first version. Also remember, I will only let you continue this tutorials if I believe that you can handle it right. And as I have said many times before, e-mail me if you believe that something is missing and/or wrong, and I will fix it immediately as I see fitting. Now, we must go on to the CNS, which will be a little less descriptive, since I can't cover anywhere near everything that is needed in order to program for MUGEN.

How To Make A State In The CNS File

Ok, this will be on of the shortest sections since I don't have much to say on this subject. CNS file programming, in my opinion, is the hardest thing about MUGEN, so I am just going to explain about a few triggers and commands and what they do. I will probably also go over a basic state header and footer, and who knows what else. After this I will get into some of the more fun stuff, like artificial intelligence, super jumping, launchers, and all sorts of combos, but we must first learn the basics. First, I will give you an example state header and a state footer and describe what it does, before I give you a few pieces of coding that you can use in the CNS. Here is the header and the footer, borrowed from an upcoming character by myself which will be released soon, so read the comments carefully and study so that you get them right.

Header

;--------------------------------------------------------------------------- ;Divider (Unrequired)
; Kung Fu Palm ;Name Of Move (Unrequired)
; CNS difficulty: medium ;Difficulty Of Programming (Unrequired)
[Statedef 6050] ;Number Of Statedef That Is Called From Command (Required)
type = S ;Tells The Type Of The Move Which Is A Standing Move
movetype= A ;A Stands For Attack Since This Move Is Actually An Attack (Required)
physics = S ;S Stands For Standing Which Is The Characters Physics At The Time Of The Move (Required)
juggle = 4 ;Tells The Game How Many Times The Characters Is Allowed To Juggle The Opponent With This Move (Unrequired)
poweradd= 110 ;This Adds The Amount Of Power Stated To The Left To The Power Bar (Unrequired)
velset = 0,0 ;Tells The Characters To Move To This Position On Screen, Here It Would Be Standing Still (Unrequired)
anim = 6050 ;Tells The Characters To Use This Animation
ctrl = 0 ;Takes Control Away From The Character

Footer

[State 1000, 7] ;Number Of The State, The Footer Is Usually The Last State (Required)
type = ChangeState ;Tells The Character To Change His State (Required)
trigger1 = AnimTime = 0 ;Tells The Character To Do So After The Number Of Seconds To The Left (Required)
value = 0 ;The Value To The Left Is The State Number Where The Characters Goes, Usually 0, The Standing Animation (Required)
ctrl = 1 ;This Gives Control back To The Character

The rest of the states that come between this explain what the move does, and that is pretty much the purpose of the CNS and its states, to tell what the move is supposed to do. Unfortunately, in return for an earlier release, I won't go much further into the CNS, but I will add the following to the next section, Cool Tricks And Tips:

- Artificial Intelligence

- Super Jumping

- Explods

- Projectiles

- Teleporting

Cool Tips And Tricks

Ok, here I will explain how to do some cool stuff in the MUGEN game engine. I will start with artificial intelligence, which I am sure that a lot of you would like to learn about. First, you must make as many commands as you can with the time being one and the commands can be something like U, D, D, U. The command can be anything as long as time is small and command is impossible for a human to do in that time. The computer, however, if you have the illusion of AI (see mugen.cfg) turned on, can do these controls easily. This command will activate AI, and a good thing to do is make about 50 something of these commands. Because the more commands that you have, the better the chance that the AI will start. It's kind of like pulling a winning ticket out of a hat. The more winning tickets there are, the better the chance that you'll choose it. Anyway, I think you get the point. I am too lazy to go intro description about this so just copy what is below and learn yourself or wait for the other artificial intelligence tutorial that somebody is making:

*Just Copy This At The Top Of The CMD File, I Am Too Lazy To Explain Everything*

;-| AI Commands |----------------------------------------------------------
[Command]
name = "cpu1"
command = U, U, U, U
time = 1
[Command]
name = "cpu2"
command = U, U, U, D
time = 1
[Command]
name = "cpu3"
command = U, U, D, D
time = 1
[Command]
name = "cpu4"
command = U, D, D, D
time = 1
[Command]
name = "cpu5"
command = D, D, D, D
time = 1
[Command]
name = "cpu6"
command = D, D, D, U
time = 1
[Command]
name = "cpu7"
command = D, D, U, U
time = 1
[Command]
name = "cpu8"
command = D, U, U, U
time = 1
[Command]
name = "cpu9"
command = U, D, U, U
time = 1
[Command]
name = "cpu10"
command = U, U, D, U
time = 1
[Command]
name = "cpu11"
command = D, U, U, D
time = 1
[Command]
name = "cpu12"
command = U, D, D, U
time = 1
[Command]
name = "cpu13"
command = D, U, D, U
time = 1
[Command]
name = "cpu14"
command = U, D, U, D
time = 1
[Command]
name = "cpu15"
command = F, F, F, F
time = 1
[Command]
name = "cpu16"
command = B, B, B, B
time = 1
[Command]
name = "cpu17"
command = F, B, F, F
time = 1
[Command]
name = "cpu18"
command = F, F, B, F
time = 1
[Command]
name = "cpu19"
command = B, F, F, F
time = 1
[Command]
name = "cpu20"
command = F, F, F, B
time = 1
[Command]
name = "cpu21"
command = F, B, B, F
time = 1
[Command]
name = "cpu22"
command = B, F, F, B
time = 1
[Command]
name = "cpu23"
command = F, B, F, B
time = 1
[Command]
name = "cpu24"
command = B, F, B, F
time = 1
[Command]
name = "cpu25"
command = D, F, D, F
time = 1
[Command]
name = "cpu26"
command = D, B, D, B
time = 1
[Command]
name = "cpu27"
command = D, B, D, F
time = 1
[Command]
name = "cpu28"
command = D, F, D, B
time = 1
[Command]
name = "cpu29"
command = U, F, D, B
time = 1
[Command]
name = "cpu30"
command = U, B, D, F
time = 1
[Command]
name = "cpu31"
command = B, D, F, U
time = 1
[Command]
name = "cpu32"
command = F, D, B, U
time = 1
[Command]
name = "cpu33"
command = U, U, U, U
time = 1
[Command]
name = "cpu34"
command = U, U, U, D
time = 1
[Command]
name = "cpu35"
command = U, U, D, D
time = 1
[Command]
name = "cpu36"
command = U, D, D, D
time = 1
[Command]
name = "cpu37"
command = D, D, D, D
time = 1
[Command]
name = "cpu38"
command = D, D, D, U
time = 1
[Command]
name = "cpu39"
command = D, D, U, U
time = 1
[Command]
name = "cpu40"
command = D, U, U, U
time = 1
[Command]
name = "cpu41"
command = U, D, U, U
time = 1
[Command]
name = "cpu42"
command = U, U, D, U
time = 1
[Command]
name = "cpu43"
command = D, U, U, D
time = 1
[Command]
name = "cpu44"
command = U, D, D, U
time = 1
[Command]
name = "cpu45"
command = D, U, D, U
time = 1
[Command]
name = "cpu46"
command = U, D, U, D
time = 1
[Command]
name = "cpu47"
command = F, F, F, F
time = 1
[Command]
name = "cpu48"
command = B, B, B, B
time = 1
[Command]
name = "cpu49"
command = F, B, F, F
time = 1
[Command]
name = "cpu50"
command = F, F, B, F
time = 1
[Command]
name = "cpu51"
command = B, F, F, F
time = 1
[Command]
name = "cpu52"
command = F, F, F, B
time = 1
[Command]
name = "cpu53"
command = F, B, B, F
time = 1
[Command]
name = "cpu54"
command = B, F, F, B
time = 1
[Command]
name = "cpu55"
command = F, B, F, B
time = 1
[Command]
name = "cpu56"
command = B, F, B, F
time = 1
[Command]
name = "cpu57"
command = D, F, D, F
time = 1
[Command]
name = "cpu58"
command = D, B, D, B
time = 1
[Command]
name = "cpu59"
command = D, B, D, F
time = 1
[Command]
name = "cpu60"
command = D, F, D, B
time = 1
[Command]
name = "cpu61"
command = U, F, D, B
time = 1
[Command]
name = "cpu62"
command = U, B, D, F
time = 1
[Command]
name = "cpu63"
command = B, D, F, U
time = 1
[Command]
name = "cpu64"
command = F, D, B, U
time = 1

*Just Copy This Under The Statedef -1, I Am Too Lazy To Explain Everything*

;-|AI Routine|----------------------------------------------------------------------------
;-|Signal AI Routines|--------------------------------------------------------------------
[State -1]
type = VarSet
v = 7
value = 1
triggerall = RoundState = 1 || RoundState = 2 || RoundState = 3 || RoundState = 4
triggerall = ctrl = 0 || ctrl = 1
trigger1 = command = "cpu1"
trigger2 = command = "cpu2"
trigger3 = command = "cpu3"
trigger4 = command = "cpu4"
trigger5 = command = "cpu5"
trigger6 = command = "cpu6"
trigger7 = command = "cpu7"
trigger8 = command = "cpu8"
trigger9 = command = "cpu9"
trigger10 = command = "cpu10"
trigger11 = command = "cpu11"
trigger12 = command = "cpu12"
trigger13 = command = "cpu13"
trigger14 = command = "cpu14"
trigger15 = command = "cpu15"
trigger16 = command = "cpu16"
trigger17 = command = "cpu17"
trigger18 = command = "cpu18"
trigger19 = command = "cpu19"
trigger20 = command = "cpu20"
trigger21 = command = "cpu21"
trigger22 = command = "cpu22"
trigger23 = command = "cpu23"
trigger24 = command = "cpu24"
trigger25 = command = "cpu25"
trigger26 = command = "cpu26"
trigger27 = command = "cpu27"
trigger28 = command = "cpu28"
trigger29 = command = "cpu29"
trigger30 = command = "cpu30"
trigger31 = command = "cpu31"
trigger32 = command = "cpu32"
trigger33 = command = "cpu33"
trigger34 = command = "cpu34"
trigger35 = command = "cpu35"
trigger36 = command = "cpu36"
trigger37 = command = "cpu37"
trigger38 = command = "cpu38"
trigger39 = command = "cpu39"
trigger40 = command = "cpu40"
trigger41 = command = "cpu41"
trigger42 = command = "cpu42"
trigger43 = command = "cpu43"
trigger44 = command = "cpu44"
trigger45 = command = "cpu45"
trigger46 = command = "cpu46"
trigger47 = command = "cpu47"
trigger48 = command = "cpu48"
trigger49 = command = "cpu49"
trigger50 = command = "cpu50"
trigger51 = command = "cpu51"
trigger52 = command = "cpu52"
trigger53 = command = "cpu53"
trigger54 = command = "cpu54"
trigger55 = command = "cpu55"
trigger56 = command = "cpu56"
trigger57 = command = "cpu57"
trigger58 = command = "cpu58"
trigger59 = command = "cpu59"
trigger60 = command = "cpu60"
trigger61 = command = "cpu61"
trigger62 = command = "cpu62"
trigger63 = command = "cpu63"
trigger64 = command = "cpu64"

Ok, now that you have done that, look at all of the moves that your character has and copy and paste them all under what it says above and you can put a label that says "AI Moves" or something if you want. I will now tell you how to alter the move so that the AI can use them. Here is an example move explaining the AI only commands and you can edit them to your own tastes. Please study this and add the AI only command to all of the moves that you have copied and pasted under the above code. AI only commands will be marked by an asterisk (*) next to them:

[State -1, Triple Kung Fu Palm]
type = ChangeState
value = 3000
*triggerall = var(7) = 1
triggerall = power >= 1000
trigger1 = statetype = S
trigger1 = ctrl
*trigger1 = statetype != A ;Tells the AI not to do the move in the air, add this to the move and feel free to change != A to anything that you want
*trigger1 = p2bodydist X <= 50 ;Tells the AI to do this move only when it is less than 50 pixels away from the opponent, add this to the move and feel free to change <= 50 to whatever you want
*trigger1 = p2movetype != A ;Tells the AI not to do this move then opponent is doing an air move, add this to the move and feel free to change != A to whatever you want
*trigger1 = random < 599 ;Tells the AI to do this move when a number of less than 599 out of 999 is randomly chosen, add this to the move and feel free to change < 599 to whatever you want
trigger2 = hitdefattr = SC, NA, SA
trigger2 = movecontact

If you copy and pasted what I told you to do and added those triggers to each move that you copied for the AI, you will have artificial intelligence. Remember, that you must keep on trying your AI until you find something that is very good and works. I'm sorry I couldn't go into much detail on this move, but as long as you have a basic understanding (hopefully), then I believe that I have accomplished what I wanted to accomplish from the beginning.

Conclusion

Because of time and boredom, I have decided to stop the tutorial here. I know that this isn't much of anything and is a large disappointment to many who wants to make a character. I close now with coding to a very basic Explod and Projectile. Add these to the state of the move where you want them, and they should work after they have been edited a bit. If you crave for more information visit FallenAngel's or [E]Magius's sites. Thank you for your time and concern.

Explod

[State 1000, 8]
type = Explod ;the type is an explod
trigger1 = AnimElem = 1 ;triggered on the first sprite
anim = 6070 ;this is the animation of the explod
postype = p1 ;this is where the explod will appear...choices of p1, p2, front, back, left, or right
pos = 0,0 ;position of the epxlod on the screen...in this case right where specified above...p1 (player 1)
bindtime = 100 ;how long the explod will stay where it was specified...in this case the whole move until animation is done

Projectile

------------------------------------------------------------

Projectile ;I figure if nobody reads the docs, maybe they'll read this...

------------------------------------------------------------

Creates a projectile for the player. The Projectile controller takes

all the parameters of the HitDef controller, which control the HitDef

for the projectile. In addition, Projectile has the following additional parameters:

Required parameters:

none

Optional parameters:

ProjID = id_no (int)

Specifies an ID number to refer to this projectile by. Should be

positive, if specified.

projanim = anim_no (int)

Specifies the animation action number to use for the projectile's

animation. Defaults to 0 if omitted.

projhitanim = anim_no (int)

Specifies the animation action number to play when the projectile

hits the opponent. Defaults to -1 (no change in animation) if

omitted.

projremanim = anim_no (int)

Specifies the animation action number to play when the projectile

is removed (due to its time expiring or hitting the its removal

boundaries, etc.) If omitted, projhitanim is used instead.

projcancelanim = anim_no (int)

Specifies the animation action number to play when the projectile

is cancelled by hitting another projectile. If omitted,

projremanim is used instead.

projremove = remove_flag (int)

Set to a nonzero value to have the projectile be removed after it

hits, or to 0 to disable this behavior. Defaults to 1.

projremovetime = remove_time (int)

Specifies the number of ticks after which the projectile should be

removed from the screen. Defaults to -1 (never time out).

velocity = x_vel, y_vel (float)

Specifies the initial x and y velocities for the projectile to

travel at. Defaults to 0,0 if omitted.

remvelocity = x_vel, y_vel (float)

Specifies the x and y velocities at which the projectile should

travel while being removed. Defaults to 0,0 if omitted.

accel = x_accel, y_accel (float)

Specifies the acceleration to apply to the projectile in the x and

y directions. Defaults to 0,0 if omitted.

velmul = x_mul, y_mul (float)

Specifies x and y velocity multipliers. The projectile's velocity

is multiplied by these multipliers on every tick. The multipliers

default to 1 if omitted.

projhits = num_hits (int)

Specifies the number of hits that this projectile should be able

to do before being removed. Defaults to 1.

projmisstime = miss_time (int)

If the projectile does multiple hits, specifies the least number

of ticks that must elapse between hits. Defaults to 0, but you

will most likely need a nonzero value.

projpriority = proj_priority (int)

Specifies the projectile priority. If the projectile collides with

another projectile of equal priority, they will cancel. If it

collides with another of lower priority, it will cancel the lower-

priority projectile, and the higher-priority one will have its

priority decreased by 1.

Defaults to 1.

projsprpriority = priority (int)

Specifies the sprite priority of the projectile. Higher-priority

sprites are drawn on top of lower-priority sprites. Defaults to 3.

projedgebound = value (int)

This is the distance (in pixels) off the edge of the screen before

the projectile is deleted. Defaults to 40.

projstagebound = value (int)

Specifies the greatest distance the projectile can travel off the

edge of the stage (not screen) before being deleted. Defaults to

40.

projheightbound = lowbound, highbound (int)

Specifies the least and greatest y values the projectile is

allowed to reach. If the projectile leaves these boundaries, it is

removed. Note: since y values decrease with increasing height on

the screen, lowbound actually specifies the greatest height the

projectile can attain. These parameters default to -240,1 if

omitted.

offset = off_x, off_y (int)

Specifies the x and y offsets at which the projectile should be

created. Both parameters default to 0 if omitted. The exact

behavior of the offset parameters is dependent on the postype.

postype = type_string

type_string specifies the postype -- how to interpret the pos

parameters.

In all cases, a positive y offset means a downward displacement.

Valid values for postype are the following:

- p1

Interprets pos relative to p1's axis. A positive x offset is

toward the front of p1. This is the default value for postype.

- p2

Interprets pos relative to p2's axis. A positive x offset is

toward the front of p2.

- front

Interprets xpos relative to the edge of the screen that p1 is

facing toward, and ypos relative to p1's y axis. A positive x

offset is away from the center of the screen, whereas a

negative x offset is toward the center.

- back

Interprets xpos relative to the edge of the screen that p1 is

facing away from, and ypos relative to p1's y axis. A positive

x offset is toward the center of the screen, whereas a

negative x offset is away from the center.

- left

Interprets xpos and ypos relative to the upper-left corner of

the screen. A positive x offset is toward the right of the

screen.

- right

Interprets xpos and ypos relative to the upper-right corner of

the screen. A positive x offset is toward the right of the

screen.

projshadow = shad_r, shad_g, shad_b (int)

Specifies the R, G, and B components of the projectile's shadow.

These components should be integers between 0 and 255,

inclusive. If shad_r evaluates to -1, then the stage's shadow

color will be used. The higher a component value, the less of

that color is displayed in the shadow. So a perfectly black shadow

is 255,255,255. Defaults to 0,0,0 (no shadow).

supermovetime = move_time (int)

Determines the number of ticks that the projectile should be

"unfrozen" during a SuperPause. Defaults to 0.

pausemovetime = move_time (int)

Determines the number of ticks that the projectile should be

"unfrozen" during a Pause. Defaults to 0.