YesNoOk
avatar

Overview and Description of stage settings (Stages) (Read 43851 times)

Started by JustNoPoint, October 23, 2015, 04:46:45 am
Share this topic:
Overview and Description of stage settings (Stages)
#1  October 23, 2015, 04:46:45 am
  • ******
    • www.justnopoint.com/
A background in M.U.G.E.N consists of one or more background elements, and zero or more background controllers. These are combined with stage settings to produce the appearance and functionality of a stage for use in M.U.G.E.N.

The stage settings control general parameters such as the size of the stage, movement of the camera, starting position of characters and camera in relation to the stage, shadow color, floor reflections, etc. Most fighting games maintain consistent values of these background parameters across their constituent stages, especially in regards to stage size and camera movement.

A background element is an individual unit of graphical data that is displayed on screen. All the visible parts of the stage are formed out of background elements. Each background element has individual settings for its sprite data, transparency, location, tiling, scroll speed with respect to the camera, and animation (if applicable). "Parallaxing" elements add a raster effect when scrolling the camera. Background elements may be of any size, although in practice, backgrounds are usually pieced together from several moderately-sized elements.

A background controller will perform additional manipulations on a background element, such as change its position or velocity, make it invisible or invisible, etc. Applications of background controllers include making characters stroll back and forth in the background, having debris fly across the screen, or creating changes in the background at set times (such entering a cave when the characters are fighting on a ship). In general, background controllers may allow you to create more advanced effects for a stage or optimize certain animations to reduce memory consumption, although many stages will do quite well without any controllers at all.

When creating a stage, you must assure that the visible area on the screen is "covered" by background elements at all times. Leaving holes in the background will cause a hall-of-mirrors effect in that location. Enabling the debugbg parameter will fill all holes with a bright shade of magenta, which should assist you in locating and fixing them.

Besides the obvious use in stages, backgrounds objects are used in M.U.G.E.N for the backgrounds of all system screens such as the title screen and the character select screen, as well as for use in storyboards. These types of backgrounds are referred to as "system backgrounds" and "storyboard backgrounds" respectively. Background objects used for stages are called "stage backgrounds". Besides their intended use, there is essentially no difference between the different types of backgrounds. This document covers stage settings as well as the background object format.

Description of stage settings

Stage settings define the background's relationship with the stage. The stage settings must be in the same stage file as the background. There are several groups that make up the settings. They are:

(all parameters are required unless specifically marked as "optional")

Info Group 1.0 + 1.1b
Camera Group (Stages) 1.0 + 1.1b
PlayerInfo Group (Stages)
Bound Group (Stages)
Shadow Group 1.0 + 1.1b
Reflection Group (Stages)
Music Group (Stages)
StageInfo Group (Stages)


See also:
Description of background elements
Format or background elements
Static background elements
Animated background elements
Parallaxing background elements
Advanced Parameters
Other background element types
Background controllers
Simple Example
Cybaster's Complete Stage Creation Tutorial
Last Edit: March 15, 2017, 07:28:42 am by Odb718
Info Group (Stages) 1.0 + 1.1b
#2  October 27, 2015, 08:37:32 pm
  • ******
    • www.justnopoint.com/
name = stage_name This parameter sets the name of the stage. The parameter must be enclosed in double-quotes.

displayname = display_name This parameter sets the name to display in the stage select list. The parameter must be enclosed in double-quotes. If omitted, defaults to stage_name.

versiondate = version This parameter sets the version of the stage. The formats accepted are either a date (MM,DD,YYYY) or a x.xx version number, e.g. 1.23. This parameter is for informational purposes and is currently not used by the engine.

mugenversion = mugen_version This parameter sets the target version number of M.U.G.E.N that the stage is designed for. Valid values are 2002,02,14, 1.0 or 1.1. Defaults to 2002,02,14.

A version number of 2002,02,14 restricts camera movement to whole units of the stage coordinate space, whereas 1.0 and higher allows the camera position to assume fractional values.

author = author_name This parameter sets the name of the author of the stage. The parameter must be enclosed in double-quotes. This parameter is for informational purposes and is currently not used by the engine.
Last Edit: March 15, 2017, 06:40:46 am by Odb718
Camera Group (Stages) 1.0 + 1.1b
#3  October 27, 2015, 08:40:14 pm
  • ******
    • www.justnopoint.com/
startx = pos_x Sets the camera's starting x-position. Should be set to 0.

starty = pos_y Sets the camera's starting y-position. Should be set to 0.

boundleft = min_x This is the minimum x-value that the camera can move to. It must be negative. Adjust this value to limit how far left the camera can scroll.

boundright = max_x This is the maximum x-value that the camera can move to. It must be positive. Adjust this value to limit how far right the camera can scroll.

boundhigh = min_y Controls the minimum y-value that the camera can move to. It must be negative. Adjust this value to limit how far up the camera can scroll.

boundlow = max_y Controls the maximum y-value that the camera can move to. It must always be set to 0.

tension = h_dist This is the horizontal distance a player can get from the left and right edges before the camera starts to follow.

verticalfollow = closeness This value affects the vertical movement of the camera to follow the highest player. It should be set between 0 and 1. A value of 0 means the camera does not move up at all. A higher value makes the camera track the higher player closer. A value of 1 makes the camera track the player as close as possible. This parameter is ignored if tensionhigh and tensionlow are used.

floortension = v_dist This is the minimum vertical distance the highest player has to be from the floor (given as a positive value), before the camera starts to move up to follow him. This parameter is used only with the verticalfollow camera scrolling mode. This parameter is ignored if tensionhigh and tensionlow are used.

(Version 1.0 and higher)
tensionhigh = top_dist This is the vertical distance a player can get from the top edge before the camera starts to follow. The use of the tensionhigh and tensionlow parameters activates a method of vertical scrolling based on edge tension introduced in Version 1.1. If tensionhigh and tensionlow are specified, verticalfollow and floortension will be ignored.

tensionlow = bottom_dist This is the vertical distance a player can get from the bottom edge before the camera starts to follow.

overdrawhigh = top_pixels See below.

overdrawlow = bottom_pixels ; (Version 1.0 and higher)
Number of pixels beyond the top and bottom of the screen that may be drawn. Overdraw specifies the how much can be seen during an EnvShake. Overdraw pixels will also be used when the screen aspect is taller than the stage aspect.

cuthigh = top_pixels See below.
cutlow = bottom_pixels Number of pixels into the top and bottom of the screen that may be cut from drawing when the screen aspect is shorter than the stage aspect. These parameters suggest a guideline, and the actual number of pixels cut depends on the difference in aspect. If cuthigh and cutlow are omitted, the engine will attempt to guess a reasonable set of values.

startzoom = start_zoom_scale This specifies the initial scale factor for the stage. The effect of this parameter is most visible if there are no characters that affect the camera. Defaults to 1.

zoomout = zoom_out_scaleThis specifies the scale factor for the stage when the camera is fully zoomed out. Note that a smaller number allows the camera to zoom out more, e.g. zoomout = .5 specifies that the camera can zoom outwards by a factor of 2. Defaults to 1.

zoomin = zoom_in_scale This specifies the scale factor for the stage when the camera is fully zoomed in. Defaults to 1.
Last Edit: March 15, 2017, 06:49:11 am by Odb718
PlayerInfo Group (Stages)
#4  November 02, 2015, 05:23:42 am
  • ******
    • www.justnopoint.com/
p1startx = x_start Sets the starting x-position for Player 1.

p1starty = y_start Sets the starting y-position for Player 1.

p2startx = x_start Sets the starting x-position for Player 2.

p2starty = y_start Sets the starting y-position for Player 2.

p1facing = facing_flag Controls which way Player 1 faces at the start. Set to 1 to face right, or -1 to face left.

p2facing = facing_flag Controls which way Player 2 faces at the start. Set to 1 to face right, or -1 to face left.

leftbound = x_min Sets the minimum allowable x-position for all players.

rightbound = x_max Sets the maximum allowable x-position for all players.
Last Edit: March 15, 2017, 06:50:34 am by Odb718
Bound Group (Stages)
#5  November 02, 2015, 05:24:33 am
  • ******
    • www.justnopoint.com/
screenleft = min_dist_left Minimum allowable distance between players and the left edge of the screen. Must be positive.

screenright = min_dist_right Minimum allowable distance between players and the right edge of the screen. Must be positive.
Last Edit: March 15, 2017, 06:51:08 am by Odb718
Shadow Group 1.0 + 1.1b
#6  November 02, 2015, 05:27:37 am
  • ******
    • www.justnopoint.com/
intensity = darkness_val ;(optional) (int) This controls how dark the shadow is. Valid values range from 0 (lightest) to 256 (darkest). Defaults to 128 if omitted.

yscale = scale_y ;(optional) (float) This is the vertical scale factor of the shadow. Use a larger scale_y to make the shadow longer. You can use a negative scale_y to make the shadow fall on the other side of the players. Defaults to 0.4 if omitted.

fade.range = top_y, bot_y ;(optional) (int, int) This parameter lets you set the range over which the shadow is visible. It is used to create an effect of the shadow fading as the player gets farther away from the ground. The first value is the high level, and the second is the middle level. Both represent y-coordinates of the player. A shadow is invisible if the player is above the high level, and fully visible if below the middle level. The shadow is faded in between the two levels. If omitted, defaults to no effect (shadow is always fully visible). Take note that y-coordinate values are negative, and TOP_Y should be less than BOT_Y.

(deprecated)
color = r,g,b ;(optional) This parameter is no longer supported as of M.U.G.E.N 1.1 and will be ignored.  Use intensity instead

1.1b Exclusive Parameter
xshear = shear ;(optional) (float) Specifies the amount of horizontal shearing to apply to the shadow. A positive value shears the shadow to the left of the screen. Defaults to 0.
Last Edit: March 15, 2017, 06:55:00 am by Odb718
Reflection Group (Stages)
#7  November 02, 2015, 05:30:22 am
  • ******
    • www.justnopoint.com/
reflect = reflect_flag ;(optional) Set reflect to 1 to enable reflection shadows, 0 to disable them. Reflection shadows create a "shiny floor" effect. Defaults to 0 if omitted.
Last Edit: March 15, 2017, 06:55:40 am by Odb718
Music Group (Stages)
#8  November 02, 2015, 05:31:10 am
  • ******
    • www.justnopoint.com/
bgmusic = bgm_filename ;(optional) bgm_filename is the name of the music file to play in the stage. Music files are usually put in the sound/ directory. Leaving bgm_filename blank will result in no music being played. If the music file does not exist, no music will be played. To play CD audio, put the track number followed by ".da". Using a track number of 0 will play a random audio track. For example, to play track 3 from a music CD, use bgmusic = 3.da. If omitted, defaults to no music.

bgvolume = volume_offset ;(optional) This parameter adjusts the volume of the BGM being played. 0 is normal, negative for softer, and positive for louder (only for mp3, mods and CDA). Valid values are from -255 to 255. If omitted, defaults to 0.
Last Edit: March 15, 2017, 06:57:11 am by Odb718
StageInfo Group (Stages)
#9  November 02, 2015, 05:34:48 am
  • ******
    • www.justnopoint.com/
zoffset = v_dist  v_dist is the vertical distance of the ground level from the top of the screen, given in pixels. The zoffset parameter is inappropriately named, but has been left unchanged for compatibility purposes.

zoffsetlink = elem_ID  If this parameter is specified, it links the zoffset value to the y-position of a background element with the specified ID number. For example, you can link the value to a dummy element (see Other background element types) with a sin.y parameter to make the characters bob up and down in a sinusoidal fashion.

autoturn = turn_flag  Leave this parameter to 1 to make characters automatically turn to face each other. Setting this to another value will cause undesirable behavior.

resetBG = reset_flag  If set to 1, backgrounds will be reset between rounds. If set to 0, backgrounds will continue playing.

localcoord = width, height  Dimensions of the coordinate space of the stage. Defaults to 320, 240 if omitted.

xscale = xscale  Horizontal scaling factor of offsets, velocities, sprites and animations.

yscale = yscale  Vertical scaling factor of offsets, velocities, sprites and animations.
Last Edit: March 15, 2017, 06:58:27 am by Odb718
Re: Overview and Description of stage settings (Stages)
#10  April 14, 2023, 05:48:03 pm
  • **
  • Expert Noob
  • I am a lover and a fighter!
    • USA
Small correction on the Reflection group part.

The actual code is intensity = (int) (0 - 256)

Example
[Reflection]
intensity = 128

The value of intensity can be from 0 to 256 but KFM's stage uses 128 so that is the recommended value. Also, from personal testing, I have found out that if you are using reflection, then you generally will not want to use shadow and vise-versa. As they overlap each other and do/will not look right.
May you always win every round, both in MUGEN and Life. :)
Re: Overview and Description of stage settings (Stages)
#11  April 14, 2023, 10:07:06 pm
  • ****
  • it's me
  • Bat's a Wrap.
    • Chile
    • koakoa@jabber.org
    • Skype - koakumadevil69
Noticed this thread and finally got the chance to mention this:

I would recommend not to set your Player info's leftbound or rightbound too low compared to the camera Info's boundleft and boundright, you want clearance for most projectiles and helpers to be able to leave the camera space off-screen.
Yeaaaah im shootign ducks wiht the paino