banner



How To Add Image On Mugen Portrait Template

This tutorial for creating M.U.Grand.E.Northward Characters is made for use with the software Fighter Manufactory Archetype. It is suggested that yous read this entire tutorial before beginning. Information technology is also important to note that Mugen itself contains some very complete documentation to assist in character creation.

Contents

  • 1 Step ane - Sprites
    • one.one Sprite Suggestions
    • 1.two Converting your Sprites
  • two Step 2 - Create the initial SFF file and default palette
    • two.1 Using a mugen template
    • ii.two Creating a SFF file from scratch
  • three Step 3 - Compile SFF file
  • four Step 4 – Animations
  • v Step 5 – Constants Files & Programming
    • 5.1 Creating a [Statedef]
  • half dozen Step 6 – Command File and Coding
    • 6.one CMD Top Section
    • half-dozen.2 CMD Bottom Department
    • 6.3 Optional CMD Parameters
  • 7 Step seven – Sounds
  • 8 Step eight – Making Palettes
    • 8.ane Creating Additional Palletes

Step 1 - Sprites

To begin with, yous should take all of the character sprites that you want to use before continuing to the next section. Mugen uniform sprites need to exist 256 colors, contain the desired transparent color as index 0, and saved every bit a pcx graphic format. A typical G.U.Yard.E.N grapheme will have the post-obit sets of sprites:

Description Sprite Grouping
Opinion 0
Turn 5-half-dozen
Crouch 10-12
Walk 20-21
Jump 40-47
Dash 100-110
Guard 120-155
Lose 175
Win 180
Intro 190
Taunt 195
Punches 200-229
Kicks 230-259
Crouch Punches 400-429
Crouch Kicks 430-459
Jump Punches 600-629
Leap Kicks 630-659
Throw 800
Special Attacks 1000-1999
Hyper Attacks 3000-3999
Get Hit 5000-5299
Portraits 9000

The sprite group numbers listed in a higher place adjacent to the descriptions are suggested groups to assign your sprites to as you add them to your SFF file. Although this numbering design is standard, it is not required with a few exceptions (those being Plow and Get Hit sprite groups).

In addition to the required grapheme sprites you may also wish to add a diversity of special effect sprites to your character. These can include hitting sparks, guard sparks, projectiles, smoke, hyper backgrounds or merely virtually anything y'all can imagine that would be useful.

Sprite Suggestions

Suggestions on how to procure your sprites for your character are as listed:

  • Rip Sprites - You can capture sprites from previously made video games or simple utilise a pack of sprites that was previously ripped. Many pre-ripped sprite packs can be constitute on the Infinity Mugen Team website. Click hither to browse the Sprite Packs.
  • Create Sprites - A creator may have the ability to draw their own sprites using a graphics program such as Photo Store, Paint Store Pro or Gimp.
  • Edit Sprites - Another option is to accept a set of ripped sprites and edit them equally desired. Click hither for Sprite Editing tutorials.
  • Utilize a premade SFF file - To use an .sff file complied by another author you will demand to first ask that author's permission.

Converting your Sprites

Once yous have your sprites it is necessary to convert them into a strict 256 color palette with correct indexing and format.

Step 2 - Create the initial SFF file and default palette

03a.png

Thanks to Fighter Manufactory the process of combining sprites into a unmarried SFF file has been profoundly simplified since the time Mugen was offset introducted. Certain Mugen conventions are too important to note

1) Portrait - Mugen has two standard portraits. Breif details are given as follows while more than details can be found as necessary throughout the tutorial.

  • Large Select Screen Portrait (9000,1) - In a standard Mugen Screen pack this portrait's dimensions are 120 10 140. Information technology is not necessary for this graphic to use a "shared palette" but oft if this sprite is preceding a series of "shared palette" sprites the colors for the rest of the grapheme volition exist corrupted.
  • Small Select Screen Portrait (9000,0) - In a standard Mugen Screen pack this portrait'southward dimensions are 25 x 25. This sprite should accept the "shared palette" option selected. This portrait is likewise used in the fight screen'due south lifebars in a standard mugen screen pack.

Using a mugen template

Various character templates are bachelor for mugen. Subsequently downloading a template and extracting the file into a single binder you may desire to rename the folder as the proper noun of the graphic symbol you are creating. Later doing and so, open the folder and detect the def file (e.one thousand. kfm.def). Rename this file with the same name as the folder. Listing of character templates

i) Load your first sprite into the template and set the palette.

  • Open the graphic symbol template in Fighter factory
  • In Fighter Factory, in the Sprites menu scroll to sprite 9000,0 information technology should be the first ane. (Hint: In that location is a search button to help you find sprites.)
  • On the left select the "alter" push button to load one of the character'south sprites. (Any one will do, eventually you will need to change this sprite to be the pocket-size portrait for the select screen only right now we're just setting the palette.)
  • Once the sprite is changed yous should be able to come across information technology right there in front of yous and it should await simply normal, with the correct colors and everything.
  • On the correct hand side you can see the palette box and buttons. Click the "open up the current image" button to load this images palette into fighter factory.
  • Notice all the colors on the palette just changed to lucifer your sprite, absurd!
  • On the right hand side again, click "save" to save your palette. (Hint: Fighter manufactory has a "save all" option in the file bill of fare. Even when you click relieve all, the palette changes volition not be saved, you have to e'er save those on the palette carte du jour.)
  • At this signal you may want to close so reopen your grapheme in guild to make sure the palette is performance correctly. In such a case, brand sure to select "Save All" form the File card before endmost.

Creating a SFF file from scratch

Although using a template is prefered for creating a Mugen SFF file, Fighter Factory is equiped to permit a user to make a SFF file from scratch.

1) Load your first sprite into the template and set the palette.

  • Open up Fighter Manufacturing plant and select the Sprite menu icon from the top of the screen to access the sprite carte
  • On the left select the "Add" button to load 1 of the character's sprites. (Any one volition do. Since this is the start sprite in the file eventually y'all volition need to change this sprite to exist the modest portrait for the select screen but right at present we're just setting the palette.) Prepare the Group to 9000, the Prototype number to 0 and select shared palette.
  • Once the sprite is added you should exist able to see it right there in front of yous and it should expect but normal, with the correct colors and everything.
  • On the right hand side y'all can meet the palette box and buttons. Click the "open the current paradigm" button to load this images palette into fighter mill.
  • Detect all the colors on the palette just changed to match your sprite, cool!
  • On the right hand side once again, click "salve" to relieve your palette. (Hint: Fighter manufactory has a "save all" option in the file card. Even when you click save all, the palette changes will not exist saved, yous have to always save those on the palette menu.)
  • At this point you may want to close and so reopen your character in order to make sure the palette is operation correctly. In such a case, make certain to select "Save All" form the File bill of fare earlier closing.

Step 3 - Compile SFF file

03a.png

Once you accept a saved SFF file that is compatible with your sprites and palette then you lot tin can add/change all the sprites yous wish.

i) Add sprites - When you add sprites to your SFF file using the Add button on the left in that location are many things you need to know.

  • Yous can add together multiple sprites at one time.
  • You lot will select the group number for the sprites you are adding. The grouping number will exist the same for all the sprites you lot add while on this menu then make sure to merely select sprite frames that belong in the same group (for example, opinion is a group, walking is a group, calorie-free dial is a group.)
  • The image number will start at what ever number y'all type in and keep to number all the images yous've selected to add together. For example if you exit the image number as 0 then the sprites will be numbered 0,1,2,three then on.
  • You can set the sprite position in this screen but if you're not sure what information technology should exist you lot can always realign the sprite once you lot get out this menu.
  • On the correct you have an selection for "shared palette", every sprite with this choice selected will utilize the palette you created for your character. Yous won't want to select this option for special FX, hyper backgrounds or whatever particular that won't be using this aforementioned palette.
  • As well on the correct is the "auto crop" option, this will cut out whatsoever unnecessary portions from the sprites.
  • Information technology is e'er all-time to keep all of your "shared palette" sprites next to each other in the SFF file and your not "shared sprites" palettes carve up.

2) Change sprites - Templates come in many different varieties with various levels of complexity. Sometimes, rather than "calculation" a new sprite you lot may but need to "modify" the current sprites. In such situations you lot will not need to select whatsoever of the options higher up, rather after selecting the "change" push button all you lot demand to do is select the sprite you wish to swap into the SFF file.

3) About the Crosshairs - Once you leave the "add" or "alter" menu you'll see your sprite on the screen as well as a little crosshair. This represents the basis in mugen where your graphic symbol will stand so make sure to put the anxiety then they are touching the crosshairs. Await at other mugen characters for examples of how this works. Your character should also be centered horizontally over the crosshairs.

(Hint: If yous chose the EoH character template, there are identify holder for each sprite that is necessary in Mugen, this includes the opinion (0,0) and the get hit sprites (5000,0 - 5072,20) Just "modify" each sprite with the correct sprite in your character.

Step 4 – Animations

03b.png

The AIR file contains all of the animation for the graphic symbol in a text format. Each of these animations are chosen an "activity". Although yous could type out the AIr file past hand, Fighter Factory has a module to create this file for you based on the imput yous provide. Start by clicking on the animations icon at the acme of Fighter Factory, and you lot will run across the following window:

05.png

The window breaks down into the peak department and the bottom section:


i) The top section deals with general animations:

  • Each animation has an option name in society to aid y'all organize the data. You can apply the peak scroll bar to rotate through each animation that is independent in the grapheme. The green plus button will add a new (bare) animation. The green minus button will delete the electric current animation.
  • The Begin Activity Number is the number you assign to each animation for hereafter reference as you lot program the character. The mugen standards for these animations numbers are similar to the sprite groups listed in a higher place. (e.yard. Begin Action Number 0 is the stance, Begin Action Number 200 is Lite Punch.) Much like the sprite groups, the most of import animations hither that depend on the mugen standards are the stance (0), Turns (5-6) and the Get Hits (5000 - 5072)


(Hint: If you are using a template have detect find that all of the top section'south basic animations accept been set up for you lot. All you need to do is adjust the bottom section.)


two) The bottom section deals with frames in each animation:

  • The Scroll bar here lets y'all scoll between frames in the animation. The green plus botton will add together a frame after the current frame. The dark-green minus button willdelete the current frame.
  • When you blazon in a Grouping Number and Paradigm number, the same epitome in the SFF file with those specifications will apear and the current frame. Each frame of the animation can exist added this way.
  • One time you accept entered a few frames into your animation you tin can fix the "Time" for each frame. The fourth dimension is how long each frame volition be show on the screen. (pressing the ,8 button will copy the electric current frame's fourth dimension to all the frames in the animation)
  • The "Flip" choice allows you to flip your fram horizontally or vertically if necessary (pressing the ,H button will bopy the current frame'south flip to all the frames in the animation.
  • The Trans choice requite y'all the ability to select a level of transparency for a frame. The most common option in this screen is "A1" which volition brand the fram partially invisible, somewhat transparent. This is oftentimes used for many special effects like Hit Sparks.
  • The "LoopStart" option lets y'all select a frame where the blitheness will repeat back to once the animation has reached its end. This choice is just used when you lot don't wan't the animation to echo back to the first frame. In general, many animations exercise non loop at all only will apear to be looping when you lot press the play button on this carte. An example of this would typically be Begining Action 200, which is commonly a punch attack. The code discussed in Department 4 deals with when an animtion repeats itself or not.


(Hint: As you get used to layout of an blitheness you tin can select the "Edit Action in TXT" push button to add frames manually equally a textr file. This can be much faster in setting up your animation.)


3) Collision Boxes (CLSN):

  • The blue (and greenish) boxes are for getting hit CLSN boxes. These boxes tell MUGEN where your grapheme exists and thus can be hitting. These should be in most all of your characters animations (typically non necessary for intro, win or lose animations.)
  • The ruby (and yellowish) boxes are for the hitting CLSN boxes. These boxes tell MUGEN where your graphic symbol is going to set on, and these are only needed for the frames of animations where an attack should connect with an opponent.
  • Fighter Factory has a button to automaticaly add standoff boxes to an animation titled "automobile". In full general this part is frowned upon because information technology may add too many standoff boxes to your character. The but problem with more collision boxes is that information technology tends to dull downwardly much older computers. In general this is no longer an event with the improved quality of processors but many authors volition still attempt to find optimal CLSN boxes in order to increase processor performance.


Examples:

Optimal Not Prefered
char02a.png char02b.png

Step five – Constants Files & Programming

03c.png

The main code of a Mugen character is plant in the CNS (Constants) files. Perhaps thebest mode to become aquanted with this file is to open up a CNS file for a premade character and review it'south contents. Elecbyte develope the character Kung Fu Homo in gild to be a template with explanations for each major line in the CNS file. Each character can take multiple constant files although merely one is required:

  • CNS File - is where the main portion of your character code below. Sometimes y'all may see a character with multiple CNS files, perchance ane for regular moves, i for special moves and some other for hypers. This is not necessarialy needed although it helps some authors to proceed track of their information and programming.
  • ST File - is simply some other title for a CNS file. This is nigh likey to be used for whatever additional codeing rather than the main programing. ST files are not necessary and may even exist renamed as CNS.
  • Common1.cns - is typically located in the Mugen/data/ folder and contains programming that is shares amongst all the characters (such as the "stance" or "walking forrad"). Any of the information listed here tin be overwritten by one of two ways. First if you copy the common1.cns file into your grapheme's folder, nay changes you make to the version in your folder volition have priority over the version independent in the Mugen/data/ binder. Second, if any of the statedef numbers (meet beneath) establish in the common1.cns file are used over again in your CNS file, the version in your CNS file will accept presidence.


A CNS file contains the post-obit sections:

  • Top portion - on the top of the main CNS file y'all will detect code for [Data], [Size], [Velocity] and [Movement] for your character. These sections are fairly self explanitory simply information technology is important to know that if your grapheme has multiple CNS files this data only exist on the main CNS file.
  • [Statedef] - each CNS file contain multiple [statedef]s which taken animations/deportment from the AIR file and assigns them properties such as movement and attack power. The [statedef]south tend to follow the aforementioned numbering organization as the sprite groups in the SFF file and the begin action numbers in the AIR file. (e.g. [statedef 0] is the opinion. [statedef 200] is a punch attack.)
  • [statedef -2] - typically plant at the lesser of the CNS file, or on a separate CNS/ST file, any code added to [statedef -2] will be active at all fourth dimension, regardless of what other [statedef] a grapheme happen to be using at any given moment.
  • [statedef -3] - typically found at the bottom of the CNS file, or on a separate CNS/ST file, lawmaking added to [statedef -three] volition be agile only while the character in in a selfstate. (When a character is thrown the opponent takes control of your grapheme. during this fourth dimension your graphic symbol is not in a "selfstate" until the throw is over. During this fourth dimension the opponents programming controls your character. Later the set on is over your character is returned to a "selfstate" where the grapheme'due south on programming takes over again.)

(Hint: When ever y'all meet the character ; in a CNS file, information technology simply means that any text following that symbol volition not be read by the computer. Thus this symbol is used to add whatever notes to your code that you may feel necessary)

Creating a [Statedef]

A [statedef] within a CNS file may start out something similar this:

          [Statedef 200]   type = S                         ;State-type: South-stand, C-crouch, A-air, 50-liedown   movetype = A                     ;Move-type: A-set on, I-idle, H-gethit   physics = S                      ;Physics: S-stand, C-crouch, A-air   juggle = ane                       ;Number of air juggle points move takes   velset = 0,0                     ;Set velocity (ten,y) (Def: no change)   ctrl = 0                         ;Ready ctrl (Def: no modify)   anim = 200                       ;animation/Begin Action Number   poweradd = 20                    ;Power to add together to hyper bar(Default: 0)   sprpriority = 2        

This lawmaking lone won't actually practice annihilation. In fact, the character won't even load if naught else follows this fix of code. This is simply the heading to your set of code which will then exist follow by 1 or more than sctrls (state controls). Remember, each character will accept dozens of [statedef]due south which each comprise various sctrls.

See as well List of sctrls

A great characteristic on the CNS screen of Fighter Factory is that all of the sctrls are located on a menu to your right, and when y'all double click one of these the necessary lawmaking will be provided, all you take to do is fill in the parameters.

Step 6 – Command File and Coding

03d.png

The CMD(Command) file contains all the code necessary to connect controller(or keyboard) input commands with statedefs (mentioned higher up). The CMD file (list most other files) has a top and a bottom section:

CMD Top Section

The top section contants multiple [command] codes that assigns names to a series of button pushes. Each control code will expect something like this.

          [Control]   name = "10"              ;The proper name of the command is given in the parenthesis   command = ten             ;The button (or series of buttons) are listed here   fourth dimension = 1                ;The amount of gameclick (time) that this control must exist performed inside.        

An example of a more circuitous [command] is as follows.

          [Command]   proper noun = "upper_x"           ;The name of the command is given in the parenthesis   command = ~F, D, DF, x     ;The button (or serial of buttons) are listed here   fourth dimension = 20                  ;The amount of gameclick (time) that this command must be performed within.        

It is important to annotation that the more circuitous (the more buttons) a [command] uses the earlier in the CMD file it needs to be placed. For the two examples higher up, the second [control] should ever precede the first [command] in the height portion of the CMD file. The post-obit society is generally used from summit to lesser - Hyper attacks, Super Attacks, so normal attacks.

See also List of Control Perameters

CMD Bottom Section

If you were paying attending before you probably asked yourself "what happened to statedef -1?" Well here is it as the bottom one-half of the CMD file. Much like all of your statedefs in a higher place, the [statedef -1] in the CMD file contains tons of sctrls, all of which are "ChangeState"s that connects your [command] names from the top of the CMD file with [statedef]s from the CNS file. Let'south breifly annalize 1 of the sctrls:

          [Land -ane, Stand Light Dial]   type = ChangeState   value = 200   triggerall = command = "x"   triggerall = command != "holddown"   trigger1 = statetype = S   trigger1 = ctrl   trigger2 = stateno = 200   trigger2 = time > half-dozen        

Each of the sctrls institute in the CMD file volition be 'type = ChangeState' because the purpose of the controls is to move from one state to the side by side. The 'value = 200' come across to a higher place is saying that this set of code controls [statedef 200] in the CNS file (which happens to be Light Punch.) The triggers so start, let or forestall the lawmaking from activating.

  • triggerall = in every situation these parameters must be met. Here nosotros meet 'command = "10"' which means you must be pressing "x" and we besides see 'command != "holddown"' which ways this movement can only be activated when the histrion is continuing, or non crouching (! = not).
  • trigger# = each additional trigger is what additional conditions must be met for the move to exist actived. In the lawmaking above we see that the lawmaking tin can be activated in either one of 2 situations (trigger1 and trigger2.) Kickoff the move in a higher place tin be activated when the player is in 'statetype = s' (which ways standing) and so the player has 'ctrl'. The second state of affairs is when the graphic symbol is already doing a Light Punch (stateno = 200) and when the game time is greater than 6 game clicks. (Hint: 'Triggerall' is optional, only a 'trigger1' is absolutely required.)

See likewise List of Triggers

Although all the sctrls listed under [statedef -ane] tend to follow the same order that the commands are listed in the top [command] portion of the CMD file, it is not necessary and is simply the standard used to aid find lawmaking within your character'south CMD file.

Optional CMD Parameters

You besides have to option to add together code to the very top of your CMD file that would allow you to remap your buttons or change CMD deafults. The lawmaking would look like the following

          [Remap]   x = x   y = y   z = z   a = a   b = b   c = c   s = s        
          [Defaults]   command.time = 15   command.buffer.fourth dimension = 1        

Pace 7 – Sounds

03e.png

The SND file contains all the Wav files necessary for your grapheme. The Sound module in Fighter Mill looks like the post-obit:

06.png

As you add together Wav files to youe SFF file you will need to assign a group number and sound number to each sprite. These are utilise to reference the sounds in the CNS file.

The Sound module also has a resampling option at the lesser.

Footstep 8 – Making Palettes

03f.png

If yous followed all the steps up to this point then your graphic symbol already has one pal file. Even if yous're editing a premade character at that place is at to the lowest degree ane palette. If you lot find yourself in a rare circumstance where you have a character but the palette isn't functioning and so y'all may need to follow the steps in the Indexing Sprites tutorial.

Creating Additional Palletes

In the sprites menu whorl to detect a character sprite that has the colors you'd like to create a new palette for. Typically one of the sprites in group 0 are sufficent. Once you're looking at the sprite of your choice on screen the open up the Palette Menu. 02.png

Simply enough, y'all select the color yous desire to change on the palette, then you replace it with which ever color you desire. Once you replace all the colors save the palette. Recall though, for every palette your create, you need to add together information technology to the character's def file for it to work in the game.

How To Add Image On Mugen Portrait Template,

Source: https://www.infinitymugenteam.com/infinity.wiki/mediawiki/index.php?title=Character_Creation_Tutorial

Posted by: jonesuner1965.blogspot.com

0 Response to "How To Add Image On Mugen Portrait Template"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel