This thread is to help get the newest user up and editing as fast as possible. It's a collection of the major catch-all threads that break down the major parts of the character. (or it will be eventually)
THIS IS A FIRST STEP. Everything isnt included. There's a lot of stuff left out.
Check out the links if you have questions about each topic.
This thread explains what files Mugen, and the Characters use. Check it out if you dont know what any of the files do.
You'll need the character.def file listed in your Select.def for mugen to even show your character. It links to the cmd file that allows you to change the character's states inside the cns file, that calls on the air file to show the sprites (images) of the character. the cns also calls on the snd file to play sounds. the Def file decides who your character is. The CNS tells mugen how that character acts. The CMD finds out when the character can perform moves.
The start of your character's lists the Player's Variables at the top of the .cns file, lays down most of your character's traits. Just the basics.
A specific action is usually broken into these groups
the StateDef; starts the specific move
it plays a sound; because the character feels hollow if it doesnt
displays an effect; because fighters kick up dust and use magic left and right
hits player 2; because it's a fighting game!
and changes states;ends the move
The statedefs can do a heck of a lot more. These options are called controllers
Like if you wanted to make a projectile, or a move that makes other moves (a helper). All the controllers go under the statedef, and above the changestate. You dont have to have a changestate to end it, but most states do.
Deciding how to get each of those controllers up and running exactly the way you want, when you want, and why you want is the job of the triggers and variables. (and a bunch of other stuff)
Defining the triggers usually relies on math symbols. But the most basic is just the equal sign. Another important step in editing your characters is learning how to tell mugen, if this doesnt work, do something else. << Ifelse() and Cond() are as important to learn as Variables. Variables remember stuff between statedefs. If you set them up they can even remember between rounds. (Check the Player's Variables link)
In the CNS file there are two special statedefs, Statedef -2, and Statedef -3.
Statedef -1 IS/is in the CMD file.
Mugen constantly monitors these Statedefs without the character having to be in them.
States that are always executed (use statedef -2)
States that are executed when in self's state file (use statedef -3)
[Statedef -3]Would work best in Statedef -3 because if P2 throws you and uses stateno 106 the sound would play. Obviously this is something the other creator wouldnt want to happen.
;This controller plays a sound everytime KFM lands from a jump, or
;from his back-dash.
[State -3, Landing Sound]
type = PlaySnd
triggerall = Time = 1
trigger1 = stateno = 52 ;Jump land
trigger2 = stateno = 106 ;Run-back land
value = 40, 0
DO NOT FORGET YOUR [Statedef -2] and [Statedef -3]
Be sure these are located before all -2 and -3 state coding.
The CMD controls the controls. The input from the keyboard/controller is matched up to commands in the Command Definitions, then the State Entry kicks in. Command Definitions section has [Remap], [Defaults], and [Command]. There can be a maximum of 128 Command names.
The State Entry, Statedef -1, part is usually where you see all of the ChangeStates and AI code.
Commands can also be read as triggers which allows you to sneak in statedef -1 style changestates inside the CNS file. The name has to be inside the CMD file for it to work though.
If youre having trouble making the commands work, there's a common mess up.
As I mentioned, mugen is constantly searching statedef -1. It's also looking at button inputs to match against the command definitions. Because people arent super precise pressing buttons, Mugen gives us some leeway. While you may think you pressed F,D,DF, A, in reality you may have pressed, F,DF,D,DF,F, A. If you notice the first set of inputs is hidden inside the second set. Mugen lets that activate the command which will go down the line to the changestate. If both sets are actually a named command, both will be triggered in the order their listed.
Meaning if F,D,DF, A is above F,DF,D,DF,F, A. Mugen checks it first to see if any ChangeStates with that name can be activated. If not, Mugen will check if any Changestates F,DF,D,DF,F, A. can activate.
The way to make sure you can do all of your moves properly is to make sure the most complex input commands are at the top Going a step further you'd need to make sure your most complex ChangeStates are at the top of the State Entry section. This isnt always the case but it's important and just good practice.
This thread is a mess right now. I plan on editing this a lot. For now, I think I'll lock the topic until it's a little better.
If you feel I should refine or talk about anything and it's still locked, shoot me a PM and I'll add it.