File system and Set...
 
Notifications
Clear all

File system and Settings

1 Posts
1 Users
0 Reactions
281 Views
(@virtualltek)
Reputable Member Admin
Joined: 2 years ago
Posts: 150
Topic starter  

MUGENext follows the same directory structure as Elecbyte's M.U.G.E.N:

  • data: sub folder for system/menu data (motifs/screenpacks, storyboards) and mugen.cfg (configuration file);
  • chars: sub folder for characters;
  • font: sub folder for fonts;
  • sound: sub folder for soundtracks;
  • stages: sub folder for stages;

Additionally:

  • shaders: sub folder for shader code;

On MUGENext, the user has more freedom on folder structure, as we allow mugen.cfg to be placed in the root executable folder, and a new setting for redirecting content is available in the settings file. The virtual file system also allows custom package distribution by separating any file or folder (except mugen.cfg) in one single compressed archive.

In fact, only chars and shaders folders are strict necessary as the others can be anything else based on the relative path specified in definition files, like a stage in select.def, for example.


File Formats

MUGENext is 100% compatible with Elecbyte M.U.G.E.N, meaning it uses the same file formats as the former. But, as we extend some functionality, new formats are also available.

DEF: INI-like text file for definitions. This file has multiple groups ([group] lines), parameter / value pairs (parameter = value) and is used to describe content for Characters, Stages, Fonts and System Screens.

AIR: text file used for describing animations. See more.

CMD: text file used for describing character commands. This file is also used for state machine code like ST (for command activation tests on StateDef -1). See more.

CNS: text file used for describing character constants. This file is also used for state machine code like ST. See more.

ST: text file used for the character's state machine. See more.

SFF: binary file for storing sprites. Can be created in Fighter Factory or Elecbyte's sprmaker tool.

SND: binary file for storing sounds. Can be created in Fighter Factory or Elecbyte's sndmaker tool.

FNT: binary file for storing font data (legacy). Can be created in Fighter Factory or Elecbyte's fntmaker tool. See more.

Any text file uses ; (comma) to define comments, which are ignored while reading its contents.


Virtual File System

Content paths in definition files are always relative to the game's root directory (where the executable is). But, files can be both physical (real) or virtual (within a compressed archive).

At start, the engine scans all directories (and sub directories) for archives of the extensions set in [Config] ArchiveExtensions, then everything found becomes a "mount" point at its root folder, meaning you could just compress any content in zip files, as long as the folder structure inside the archive "extends" the physical/real folder.

Consider the following example:

/MUGENext/chars/MyChar/...

You can compress the entire MyChar folder into MyZIPChar.zip, and as long it remains inside the /MUGENext/ directory, everything will run smootly without changes (it even helps speed up loading times).

Final folder structure:

/MUGENext/chars/MyZIPChar.zip

Archives are scanned and mounted alphabetically, meaning you can name them in such a way that controlling the order they are registered is possible. This allows you to create additional content/DLCs/Mods, or even bug fixes without replacing existing files, just by adding a top priority archive to read the new content from.


Settings

Just like M.U.G.E.N, settings are stored in a INI-like text file named mugen.cfg.

MUGENext uses the same file as the original engine, with the same settings, but some are just ignored (obsolete) and new options are also available.

[Options]: Game settings configurable in options screen goes here (except key config).

  • Difficulty: The game's difficulty. From 1 (lowest) to 8 (highest). Deafults to 4 (normal).
  • Life: Player max life, as a percentage of the character's own life (20 to 300). Defaults to 100.
  • Time: Round maximum time (-1 for infinite, 20 to 99 otherwise). Defaults to 99. Fight Screen [Time] FramesPerCount determines how many frames is one unit. So, if FramesPerCount is equal to [Config] GameSpeed, one unit is 1 second.
  • GameSpeed: The game's speed. From -9 (slowest) to 9 (fastest). Defaults to 0 (normal speed).
  • Team.1VS2Life: Teams life balancing scaling (unused/ignored). This is a percentage over the two teams life, so 200% is a scale of 1, meaning no change at all. Varies from 100 to 300. Defaults to 200.
  • Team.LoseOnKO: Determines if the team should lose the round if one one the players get KO'ed. 0 to disable or 1 to enable. Defaults to 0.
  • Motif: The game's motif/system defintions (relative to root directory). Motifs are themes that define the look and feel of the game (this is not accessible in options screen).

[Rules]: Some game logic options/constants.

  • GameType: Unused. Only VS is supported, but changing this may produce undesired results as the implementation of other game modes are incomplete at the time, so keep at VS.
  • Default.Attack.LifeToPowerMul: This is the amount of power the attacker gets when an attack successfully hits the opponent. It's a multiplier of the damage done. For example, for a value of 3, a hit that does 10 damage will give 30 power. Defaults to 3.
  • Default.GetHit.LifeToPowerMul: This is like the above, but it's for the person getting hit. These two multipliers can be overridden in the HitDef controller in the character's state machine by using the "getpower" and "givepower" options. Defaults to 2.
  • Super.TargetDefenceMul: This controls how much damage a super does when you combo into it. It's actually a multiplier for the defensive power of the opponent. A large number means the opponent takes less damage. Leave it at 1 if you want supers to do the normal amount of damage when comboed into. Defaults to 1. Note 1: this increase in defence stays effective until the opponent gets up from the ground. Note 2: the program knows you've done a super when the "superpause" controller is executed. That's the instance when this change becomes effective.

[Config]: General resource related settings.

  • GameSpeed: Sets the game's frame rate. The default is 60 frames per second. The larger the number, the faster it goes. Don't use a value less than 10.
  • GameWidth: Game native width. This should match the content's resolution.
  • GameHeight: Game native height. Recommended settings are: 640x480 (Standard definition 4:3), 1280x720 (High definition 16:9), 1920x1080 (Full HD 16:9).
  • Language: Preferred language (ISO 639-1), e.g. en, es, ja, etc. See the List of ISO codes. Leave blank automatically detect the system language.
  • ArchiveExtensions: Space separated list of allowed extension for archives (besides the file extension, accepted formats are zip and 7z only).
  • ContentDir: Base directory for assets. Can be used to redirect content to another sub directory.
  • CharSelectOnContinue: Set to 1 to get back to select screen on continue, and 0 to retry the fight. Defaults to 1.
  • DrawShadows: Set to 1 to draw shadows (default). Set to 0 if you have a slow machine, and want to improve speed by not drawing shadows.
  • AfterImageMax: Number of simultaneous AfterImage effects allowed. Set to a lower number to save memory (minimum 1).
  • LayeredSpriteMax: Maximum number of layered sprites that can be drawn. Set to a lower number to save memory (minimum 32).
  • SpriteDecompressionBufferSize: Size of sprite decompression buffer in KB. Increasing this number may help if you experience slow performance when there are many sprites and/or large sprites shown over a short period of time. Minimum 256 for acceptable performance. If you set this too large you may also experience performance degredation.
  • ExplodMax: Maximum number of explods allowed in total. Note that hitsparks also count as explods. Set to a lower number to save memory (minimum 8).
  • SysExplodMax: Maximum number of system explods allowed. Set to a lower number to save memory (minimum 8).
  • HelperMax: Maximum number of helpers allowed in total. Set to a lower number to save memory (minimum 4, maximum 56).
  • PlayerProjectileMax: Maximum number of projectiles allowed per player. Set to a lower number to save memory (minimum 5).
  • FirstRun: This is 1 the first time you run MUGEN.

[Debug]: Options to allow/help Debugging your game.

  • Debug: Set to 0 to disable starting in debug mode by default.
  • AllowDebugMode: Set to 0 to disallow switching to debug mode by pressing Ctrl+D. If Debug = 1, this will be ignored.
  • AllowDebugKeys: Set to 1 to allow debug keys at all times. Otherwise debug keys allowed only in debug mode.
  • Speedup: Set to 1 to run at maximum speed by default.
  • StartStage: Default starting stage for quick versus.
  • HideDevelopmentBuildBanner: Set to 1 to hide the Safe mode and bottom info banners, plus info box (F1 does nothing).

[Video]: Video/screen configuration.

  • RenderMode: The graphics renderer to be used. Accepts Auto and OpenGL, plus DirectX on Windows. For compatibility with M.U.G.E.N, System = Auto and OpenGLScreen = OpenGL.
  • SafeMode: 0 = disabled (render to texture is enabled, allowing post-process shaders to be used). 1 = same as M.U.G.E.N 1.1 ("safe" mode is enabled. This is used for older graphics cards, where many features will be disabled. Uses scale and cut to fit content of screen). 2 = same result as 0, but without render to texture (lower system requirements as 1. Good if old hardware must be supported without loosing the original aspact ratio).
  • Width: The video/screen resolution width. Defaults to the same as the game resolution. In windowed mode, this specifies the window width.
  • Height: The video/screen resolution height. Defaults to the same as the game resolution. In windowed mode, this specifies the window height.
  • Depth This is the color depth at which to run the game. Ignored. Current screen depth is used.
  • VRetrace: Set to 1 to enable vertical retrace synchronization (V-Sync).
  • FullScreen: Set to 0 to start in windowed mode, fullscreen otherwise. 1 enables exclusive fullscreen, which may give better performance and 2 for the borderless mode (Width and Height are ignored in this case).
  • Resizable: Set to 1 to make the window resizable when in windowed mode.
  • KeepAspect: Set to 0 to stretch the video to fit the whole window. Set to 1 to keep a fixed aspect ratio.
  • BlitMode: Ignored as there's no software 16-bit mode anymore.
  • StageFit: Stage fit mode. 0 = stage drawn to width of screen (may crop stages with tall aspect). 1 = stage shrunk to fit into screen.
  • SystemFit: System fit mode. 0 = system drawn to width of screen (may crop motifs with tall aspect). 1 = system shrunk to fit into screen.
  • ForcePOT: Force texture dimensions to be power of two (potential performance increase).
  • WindowTitle: For desktop only. Changes the window's title if desired, in double quoted string form.

[Sound]: Sound configuration.

  • Sound: Set the following to 1 to enable sound effects and music. Set to 0 to disable.
  • SampleRate: Set the sample rate of the game audio. Higher rates produce better quality but require more system resources. Lower the rate if you are having problems with sound performance. Recommended values are 22050, 44100, or 48000.
  • BufferSize: Sets the audio buffer size. Larger buffers take less CPU but cause more latency when playing sounds. Smaller buffers give less latency but take more CPU. Also, if the buffer size is smaller than your system can handle, you may experience audio problems. The buffer size is set to 2^n samples, where n is the value you specify here. Valid values for n are between 8 and 15. A good rule of thumb is to pick 10 for 22050 Hz audio, or 11 for 44100 Hz and 48000 Hz. Slower machines may require a larger buffer size.
  • StereoEffects: Set the following to 1 to enable stereo effects in-game (panning). Set to 0 to disable.
  • PanningWidth: This is the width of the sound panning field. If you Increase this number, the stereo effects will sound closer to the middle. Set to a smaller number to get more stereo separation on sound effects. Only valid if StereoEffects is set to 1.
  • ReverseStereo: Set the following to 1 to reverse left and right channels on your sound card.
  • WavChannels: Number of voice channels to use.
  • MasterVolume: This is the master volume for all sounds, in percent (0-100).
  • WavVolume: This is the volume for sound effects and voices, in percent (0-100).
  • BGMVolume: This is the master volume for music, (0-100).
  • SFXResampleMethod: Method used for rate conversion of sound effects. Choose from: SDL (no interpolation, low quality, low resource usage). libresample (bandlimited interpolation, medium/high quality, higher resource usage).
  • SFXResampleQuality: Quality parameter for resampling, if libresample is used. Valid values are 0 (medium quality) or 1 (high quality).
  • BGMResampleQuality: Quality parameter for BGM resampling, using libresample. Valid values are 0 (medium quality) or 1 (high quality).

[Music]: Ignored, no plugin system for now. Native support for MP3, OGG Vorbis, FLAC, IT, MOD, S3M, XM. Settings here are a bit useless anyway.

[Misc]: Miscelaneous settings.

  • PlayerCache: Number of extra players to cache in memory. Set to a lower number to decrease memory usage, at cost of more frequent loading.
  • Precache: Set to 1 to allow precaching. Precaching attempts to start loading player data as early as possible, to reduce apparent loading times between matches. To get the best performance, set PlayerCache to at least 1. The optimal number for PlayerCache is 4 when precaching is enabled.
  • BufferedRead: Ignored, always buffered, but loading works in chunks (no large buffer of entire file).
  • UnloadSystem: Set to 1 to free system.def data from memory whenever possible. This decreases memory usage, in exchange for loading time before system screens.
  • PauseOnDefocus: Set to 1 to pause the game when the window is in the background.
  • SFXBackgroundMode: Configures the handling of sound effects and voices when the window is in the background (i.e., defocused). Set to "Mute" to mute sound effects, or "Play" to let sound effects play.
  • BGMBackgroundMode: Configures the handling of BGM when the window is in the background. Set to "Pause" to pause the music, "Mute" to mute the music but leave it running at normal speed, or "Play" to continue playing as usual. If you are running in fullscreen mode, then this setting is always set to "Pause".
  • ForceStageZoomout: Set to nonzero to force stages to have the specified zoomout scale factor. This option has no effect on stages that have either zoomin or zoomout parameter set to a value other than the default of 1.

[Behavior]: Engine bahavior settings.

  • Explods: Define how explods will behave. Valid values are DOS, Win, 1.0, 1.1, Next or Player (based on the player's mugenversion).

[Arcade]: Arcade mode configuration.

  • AI.RandomColor: Set to 0 for computer to choose color 1 if possible. Set to 1 for computer to randomly choose a color.
  • AI.Cheat: This option allows the AI to input commands without having to actually press any keys (in effect, cheating). Set to 1 to enable, 0 to disable.

AI ramping

For both parameters below, the first number corresponds to the number of matches won, and the second number to the AI difficulty offset. The actual difficulty is the sum of the AI difficulty level (set in the options menu) and the value of the offset at a particular match.

AIramp.start = start_match, start_diff

AIramp.end = end_match, end_diff

The difficulty offset function is a constant value of start_diff from the first match until start_match matches have been won. From then the offset value increases linearly from start_diff to end_diff. After end_diff matches have been won, the offset value is end_diff.

e_d                      /----------
                         /
s_d _______/
     ^          ^          ^          ^
1st_m       s_m  e_m    last_m

For example, if you have:

AIramp.start = 2,0

AIramp.end = 4,2

For 6 matches at level 4, the difficulty will be (by match):
4,4,4,5,6,6

  • arcade.AIramp.start / arcade.AIramp.end: Arcade Mode AI Ramping.
  • team.AIramp.start/ team.AIramp.end: Team Mode AI Ramping.
  • survival.AIramp.start/ survival.AIramp.end: Survival Mode AI Ramping.

[Input]

  • P1.UseKeyboard: Set to 1 to allow player 1 using the keyboard, 0 to disable.
  • P2.UseKeyboard: Set to 1 to allow player 2 using the keyboard, 0 to disable.
  • P1.Joystick.type: Set to 1 to allow player 1 using a joystick, 0 to disable.
  • P2.Joystick.type: Set to 1 to allow player 2 using a joystick, 0 to disable.
  • InputDirMode: Command input direction mode. 0 = Commands are input in direction player faces. 1 = Commands are input in direction of nearest opponent (experimental; do not use).
  • AnyKeyUnpauses: 0 = Only pause key will unpause. 1 = Any key unpauses if there is no menu

[P1 Keys] / [P2 Keys]: Key config (configurable from M.U.G.E.N). Each value is a double quoted string with the key name. Supports digit based setting from M.U.G.E.N at some extent.

  • Jump: Jump button. 
  • Crouch: Crouch button.
  • Left: Left button.
  • Right: Right button.
  • A: A button. 
  • B: B button.
  • C: C button.
  • X: X button.
  • Y: Y button.
  • Z: Z button.
  • Start: Start button.

[P1 Joystick] / [P2 Joystick]: Joystick config (configurable from the game). Each value is a double quoted string with the key name. Supports digit based setting from M.U.G.E.N at some extent.

Valid values are: "LStickLeft", "LStickRight", "LStickUp", "LStickDown", "LStick", "RStickLeft", "RStickRight", "RStickUp", "RStickDown", "RStick", "A", "B", "C", "X", "Y", "Z", "LB", "RB", "LT", "RT", "Select", "Start", "DPadLeft", "DPadRight", "DPadUp" and "DPadDown".

  • Jump: Jump button. 
  • Crouch: Crouch button.
  • Left: Left button.
  • Right: Right button.
  • A: A button. 
  • B: B button.
  • C: C button.
  • X: X button.
  • Y: Y button.
  • Z: Z button.
  • Start: Start button.

 

This topic was modified 1 year ago 4 times by VirtuallTek

   
Quote
Share: