- Open the DEF file with Notepad, and set debugbg to 1. Save the file.
- Launch Fighter Factory, and open the SFF file of the stage by clicking on "Sprites - Open"
Like so:
- Spoiler:
[You must be registered and logged in to see this image.]
- Browse to the correct path, and load the SFF of your stage (or in this case the template stage you're editing) MAKE SURE IT'S THE SAME SFF AND DEF FILE YOU'RE EDITING THAT WILL BE IN YOUR MUGEN
- You should now see that the sprites are launched. I will now explain various buttons you can see in Fighter Factory, in order for you to add or remove sprites, align them, etc.
Here are the most important buttons we'll be using during the stage creation process. There are many other buttons, which you'll have to discover yourself, by playing with them.
- Spoiler:
[You must be registered and logged in to see this image.]
Number definition:
1. The button defining which file you're working on. The sprites in your case. Other buttons concern AIR file, SND, DEF, CNS, etc. Don't bother with those. Those are for characters and characters only.
2. The zone in which you can see your sprites. The cross in the middle defines the 0,0 axis (the origin). You can move the cross in the zone for better visibility, and you can interactively move sprites around the cross to change the axes of a sprite.
3. This button allows you to add sprites to the SFF, it adds the sprite just after the sprite you are on.
4. This button allows you to change the sprite you're currently on by another sprite of your choice.
5. Press this button to save your progress in a new file. You can use it to make backups.
6. Press this button to save your progress.
7. This button allows you to duplicate sprites. You won't be using it here. It's mainly for characters.
8. and 9. These buttons allow you to delete a sprite or a group of sprites.
10. This bar allows you to browse through all the sprites, you can see under it your position and the number of sprites in the SFF.
11. These blocks define the Group and Image parameters of the current image. You can use whatever group and number you want, but be
careful to never have two (or more) sprites having the same group and same number or it'll fuck up in mugen. The convention is to put all sprites of the same type in a single group, and number them from 0 to the number of sprites. These group numbers are your spriteno's in the .def
12. These blocks define the X-axis and Y-axis of the current sprite. You can see their position in zone 2, compared to the central cross.
13. You can see the size of the image here. It comes handy when you have to do some calculations for alignment.
14. These magnifying glasses allow you to zoom in and out of zone 2, in order to get a better view of the sprites.
NEXT STEP- Go on the second sprite of the SFF (sprite 0,1), and press the "Change" button (button 4 on the screenshot).
Like so:
- Spoiler:
[You must be registered and logged in to see this image.]
Browse until you find your floor sprite which should be an indexed .pcx file we covered that.
- You now see that the sprite was exchanged, and that our floor is the sprite 0,1, with axis=0,0. I personally prefer aligning my sprites in the def rather than in the sff file, at least concerning the X axis. At the bottom left of FF, you can see the size of the sprite : 768x37 pixels. What I want to do is center the sprite on the cross X-wise, so that I will just have to use an axis of 0 in the DEF file later on. The calculation is very simple, we just have to divide the width of the sprite by 2 to get the center : 768/2 = 384. We just have to change the X-axis of the sprite to 384 and we will have centered it. You can either move it with the mouse in zone 2, or just write down the correct axis in the right box. By doing so, you won't see the sprite move in zone 2. Don't worry, it's just a little glitch. Go to sprite 0,0 with the bar, and go back to sprite 0,1. You can see your sprite is well placed now. You must always divide your sprite width by two and make the sum your x axis. Using start values in your .def you can place your sprite wherever in the stage.
- Press the save button (button 6 on the screenshot) and launch Mugen to see how it looks like now. Make sure you specify your sprite no's in the mugen .def (a la your floor sprite as whichever group number it is in FF)
When you load your floor into mugen you're bound to find problems. You want to play with the start values to fix your floor as it should be, and if your floor cuts off at the left and right your bounds come into play (Like i did with Necro's stage.)
CODING YOUR FLOOR
- Code:
[BG 1]
type = normal
spriteno = 0, 1
start = 0, 185
delta = 1, 1
mask = 0
velocity = 0, 0
tile = 1, 0
tilespacing = 0, 0
Let's analyze the code a little bit.
- type = normal is the usual parameter for regular sprites, you may also see type = anim. This is for animation code which we'll go over later.
- spriteno is the sprite number : group and number. 0,1 corresponds to our floor.
- start defines the position of the sprite at the beginning of the fight. The first value (0 in our case) is the X-axis in FF, second value (185 here) is the Y-axis in FF you can play with these to find the correct placement of your sprites.
- delta allows you to create depth in the stage, by making the elements move one between the others, as some elements our closer to the fight while other are very far. For the floor, the delta should ALWAYS be 1,1 for low-res stages, and 2,2 for high-res stages. If you fail to comply with this, the characters will appear to slide on the floor, which is not suitable at all. The further the element is in the background, the lower its delta must be, in order for it to look natural and realistic. The deltas are very important and are different for all Mugen engines.
- Velocity is what allows you to make the element move, tile and tilespacing allow you to tile your sprite. I will come back on these parameters later. For now, just change the tile to 0,0 :
Like so:
- Code:
tile = 0, 0
- You now have to align the floor Y-wise. To do this, just change the second value of the start parameter until you find something that suits you. After several tries, it turns out the best value is Y=203. If it's lower than 203, you will see pink, if it's higher than 203, part of the sprite will be lost out of the screen. Hence, I just changed the code to. Remember this always changes according to your sprite. Gotta play with it, trial and error.
- Code:
start = 0, 203
- However, even though the floor is well placed, the characters may look as though they're floating in the air. Playing with your zoffset fixes it.
Setting the sky (or background object in front of the sky. In your case the trees you cut up, and the sky will be behind this in your .def. The .def goes from closest objects coded at the top of the stage code, floors at bottom. Check some of my .defs fore reference.
- In FF, go on sprite 0,0.
- Press the "Change" button.
- Browse to (the sky sprite or in your case the trees) and click on "Open".
- The sprite has its axis at 0,25. We will once again center it X-wise. The sprite's width being 1023 pixels, the center is 511.
Save your SFF file and launch Mugen. Use the above information in both to edit it to your liking.
You will use the same placement technique for your remaining sprites. (DO NOT ADD ANIMATION YET WE'LL COVER THIS LATER)
This time you will have to use sprites
- Start by cleaning the code of the unnecessary stuff (I'll come back to it later) : remove trans, tile, tilespacing and window lines if you see any. Example:
- Code:
[BG 0]
type = normal
spriteno = 0, 0
layerno = 0
start = 0, 0
delta = 1, 1
trans = none
mask = 0
tile = 1, 0
tilespacing = 0,0
window = 0,0, 319, 239
- As you may see, your sky is showing pink or pink may still be showing. If you left debug on, this is to help detect parts that should be covered in your stage (Pink.) with correct start values, deltas and bounds you should be good to go.
Now you may be asking: "Damn, I have a huge floor and very wide sky, but my stage is small, how's that ?!" This is what we are going to correct now, which means setting correctly the bounds : the left, the right and the height one. We will set the left/right bounds, before setting boundhigh.
In the DEF file, go in the [Camera] part of the code, and change the values of boundleft and boundright to higher values if your stage/floor can be extended. Continue playing with them as shown above.)
Then, after saving, launch Mugen and go to one corner to see how it worked. You're going to have to keep doing this until you find the right value. A trick that I use to keep my .def launced simultaneously with mugen is to edit your .def while mugen is open in another window and save your .def edits and press "SHIFT + F4" to reload mugen with your changes.
Now we are going to set the boundhigh parameter following a similar process. However, usual characters can't go very high in the sky to allow you to check boundhigh. There are two ways of testing it, use the one you prefer :
1) Activate Debug mode by pressing Ctrl+D in game. Jump with a character and quickly press Ctrl+I when the character is in the air. He will then stand in the air. Repeat the process as much as you need until the character reaches the top of the stage.
2) Choose one character of your choice which will always be your test character (it's better if you use this method only in a Test Mugen). Open the CNS file of the character, and look for the [Movement] section at the beginning of the file. Set the number of air jumps you can perform to a very high number, as such :
- Code:
[Movement]
airjump.num = 999 ;Number of air jumps allowed (opt)
You character can now jump like crazy, allowing you to reach very high portions of stages. Make sure you change it back when you're done. If you use this method.
Once you have chosen the method you prefer, set the boundhigh to a high value, and repeat the same process as for boundleft and boundright. It's all trial and error as well.
With all the work accomplished now, you have a very basic functional stage. It has a floor and a background. All the bounds are set correctly, the camera doesn't move all over the place when characters jump, etc.
In fact, we've already gone further than most beginners. If you want, you can start creating basic one layer stages with this process, that's what many beginners do anyway.
To finish this part, let's just change the name of the stage and add an author name, because it's not a "Training Stage" anymore. Name your stage and put your name in the author section. (See above in .def understanding for reference.)