SFMB - How to work with sprites
Summary
This wiki explains how to download and use the SFMB SpriteEditor program, and how to work with sprite resources (.png & .sprite files)
SFMB SpriteEditor
What is it?
Some people think that the SFMB SpriteEditor is a sprite creator program, like Aseprite, but that’s not the case. The purpose of the SFMB SpriteEditor is to configure compatible spritesheets (e.g., Item.png) and sprites (e.g., LayerOverworld.png). These configurations are saved into a .sprite file with the same name as the spritesheet (e.g., Item.png -> Item.sprite). But what does “configure” actually mean, you may ask.
A spritesheet consists of multiple sprites. These sprites can appear in different positions on the sheet, with different sizes. The main goal of this sprite editor is to set these up.
In addition, here you can also configure things like:
- How much the subject should be offset on the X and Y axis compared to its original origin.
- Where the helmets (Buzzy,Spiny,PumpkinandSanta) of the player should be placed for each sprite frame, and in what direction and angle they should face.- All helmet types share the same values (position, direction, angle)
 
- Where the propellers should be positioned and whether they appear in front of the player, behind, or not at all.
- Where the wing(s) of enemies should be placed.
- Speed, frame count, and loop type of custom-made or predefined animations.
There are also cases where an image doesn’t contain a spritesheet but only a single sprite, like unanimated background layers (e.g., SMB LayerOverworld.png).
And of course, there are exceptions when it’s not possible to create a .sprite file for a spritesheet or a sprite, since its configuration is hardcoded in the game itself (e.g., TileOverworld).
Download & Setup
Where
- For beta testers: pinned messages in the #resource-spritetext channel.
- For DEMO users: pinned in the #demo-game-themesforum channel.
How
- Download the latest version.
- Move it into your Mario Multiversefolder next toMario.exe.
- Open it there.
- Make sure to check for updates by pressing the Check updatebutton on theOptions etc.tab.
- Open a .spritefile.- You can use the open button inside the SpriteEditor program.
 	- 
- Or you can associate .spritefiles with SpriteEditor and open them directly.Show how
- You can also click on the program icon to open recently used sprites.
 
- You can use the open button inside the SpriteEditor program.
 	- 
- It's also possible to create a .spritefile from a.pngwith thenewbutton, but sometimes it's easier to just copy-paste an existing one.
- If done right, you should see the spritesheet or sprite displayed.
    
Setup layout
- You can rearrange the panes (sub-windows) by grabbing the top of its border and dragging it.
- While dragging, small arrow icons will appear. If you drag one pane into it, it will attach to the edge of that another pane.
 
Panes
There are several docking panes (sub-windows) in SpriteEditor.
Preview pane
- Here you can see the animations and sprites with the set offset.
- The intersection of the two lines is the origin of the current subject.
    
Properties pane
- This is where the properties of Sprite FramesorAnimationsappear when you click on them.
Sprite frames pane
- If you click on one, it will appear in the Previewwindow with the set properties, and its properties will appear in thePropertieswindow.
- Here you can set the area where the sprite is, but this happens automatically when you double-clickon it.
- You can also set the offset here, but this is easier with the small arrow icons in the Hometab. With the offset you can shift the sprite from the center of the origin on the X and Y axes.- 
         Show common origins- Center Bottom:
  - Players
- Enemies
- Background Objects
- Items
- So most things that interact with the ground
 
- Left Top (x:0; y:0):
  - Background Layers
- Fonts
- So most UI-related resources
 
 
- Center Bottom:
  
 
- 
        
Animations pane
- 
    If you click on one - the animation will appear in the Previewpane.
- and its properties will appear in the Propertiespane.- FirstFrame-> Set which frame to start from.
- FrameCount-> How many of the following sprite frames it should use.
- Delay-> Delay between frames.- -1means to use the default.
- 1means next sprite every frame (for 60fps animation)
- 2means next sprite every 2nd frame (for 30fps animation)
- …
 
- LoopType-> Whether it should loop or play once.
 
 
- You can also create your own animations, but the names of animations are defined in the game.
    - Some by the ThemeSettings
        - e.g. Background Objects, Background Layers
 
- And some by internal game code
        - e.g. Players, Enemies
- You can read the list on this page: [[sfmb_sprite_named_animation]]{Named animation definition}
 
 
- Some by the ThemeSettings
        
- Sometimes you only create an "animation" to reference a sprite (from a spritesheet) in the ThemeSettings editor. That means you don't create a real animation with frames, you just name a sprite to reference it later.
    - e.g. Background Objects.
 
- Some spritesheets don't support animations at all. Those use predefined sprite frame indexes for specific sprites.
    - e.g. Enemy.spriteorHelmet.sprite.- For example, in the Helmet.spritefile, thesprite framewith index 7 is always the front-facing spiny helmet sprite no matter what.
 
- For example, in the 
- You can read the full list on this page: [[sfmb_sprite_index]]{Sprite indexes}
 
- e.g. 
Hotkeys
- Double-click: Auto select area and offset of sprite
- CTRL+- Scroll wheel: Zoom
- W,- A,- D,- Xkeys: Move offset
Workflows
- If you make changes to the .pngfiles, make sure to pressReload Imageon theHometab in the SpriteEditor, so it displays the latest version of the spritesheet image.
- Regularly check for updates by pressing the Check updatebutton on theOptions etc.tab.
- Don’t forget to save regularly!
- If you wan't to extended animations by using named animations for specific enemies or items (like BowserorCoin) from the combined big spritesheet resources that have all the enemies or items, which use predefined sprite frame indexes (likeEnemyorItem)- you can create individual spritesheets resources for each of them, by creating an I_{ItemName}orE_{EnemyName}override.- e.g. I_CoinorE_Bowser.
 
- e.g. 
- You can still keep the full spritesheet with the predefined sprite frame indexes, because if there isn't an {X}_{Name}override for an item or enemy, it will defualt back to the full spritesheet.
- You can read the list of named animations on this page: [[sfmb_sprite_named_animation]]{Named animation definition}
 
- you can create individual spritesheets resources for each of them, by creating an 
- If you wan't to use HD (2x) sprites
    - Choose a render eninge in Mario Config that supports HD render.
- Set the sprite load mode in Mario Config to HD first(recommended) orboth.
- Name your HD image files as {ImageFile}@2x.png.
- Create a half resolution duplicate without the @2xpart.- This will be used for calculations, and if HD sprites cannot be loaded.
- Check the Load HD Texturecheckbox in SpriteEditor on theOptions etc.tab.
- If you are ripping sprites, use this tool to automate some of the steps: Sprite rips to MM sprite resources
 
 
Players
- For all possible animations, you can check existing player .spritefiles.
- When working with player sprites, you not only need to create and configure each Sprite frameandAnimation, but also the helmet and propeller offsets. But before you do that, make sure that theHelmetresource (.png&.spritefiles) is already created and configured.
Helmets
- Click on the Helmetitem and select aSprite framein theSprite framespane. If this doesn't make the helmet display in thePreviewpane, click on one of the arrows in theHometab.- You can change which helmet is displayed by changing the selected item in the Helmet preview.
 
- To change the helmet offset, use the arrow icons on the Hometab.
- You also need to define what direction the player is facing (if the head is visible) by selecting an item in Face direction for Helmet, so the correctly oriented helmet can be displayed.
- You can also change the angle of the helmet by adjusting the FaceAnglefield in thePropertiespane.- e.g. when the player is looking up or ground pounding
        
 
- e.g. when the player is looking up or ground pounding
        
Propeller
You only need to set this when configuring players with the propeller power-up.
- Click the Propelleritem to work with it.
- It's basically the same as helmets, but without face directions.
- You can change its Z-order (to be behind or in front of the player sprite) or hide it completely for specific situations.
    
Enemies
- When working with enemies (either with the full enemies spritesheet or the individual enemy spritesheets), you need to configure their wing position(s) for each Sprite frame.
- Click the desired Wingitem to work with it.- Wing1is the left wing (default),- Wing2is the right wing (can be set to display as a left wing) (optional).
- You can set the offset of each wing separately.
 
- The workflow is very similar to helmets, but with different options.
- You can decide the Wing styleof the sprite to display in-game:- Default-> decided by the game.
- None-> doesn’t display wings even if set.
- Single-> only displays- Wing1.
- Double-> displays one- Wing1and one- Wing2.
- Double2-> displays two- Wing1.
 
Background layers
- Background layers must be named as the following: Layer{DescriptiveName}- e.g. LayerOverworldHills
 
- e.g. 
- Avoid using FarBackground{ThemeName}.pngresources, it's obsolete!
- You can set at what height the Sprite framesshould display in-game by changing theirOffsetYvalues- e.g. for clouds that appear and start repeating higher.
- OffsetY:- 0means fixed to ground.
 
- You should always keep the OffsetXat0
- You can set the speed of the animation by adjusting the Delayin thePropertiespane.
Create new background layer
Static background layer
- Add one Sprite frame.
- Click the Full imagebutton on theHometab to automatically set the sprite area as the entire image and reset the offsets to zero.
Animated background layers
- Add a Sprite framefor each frame and adjust the area for each, while keepeing theOffsetXat0and setOffsetYas needed.
- Make sure all Sprite Frameshave the same size (width and height).
- Add an animation and name it the same as the file.
    - e.g. File name: LayerUnderground, Aniamtion name:Underground
 
- e.g. File name: 
- Set frame count of the Animationto the number ofSprite Frames.
Modify existing background layer
Static background layer
- Select the first (and only) Sprite Frame.
- Check and note the currently set OffsetY.
- Click the Full imagebutton on theHometab to automatically set the sprite area as the entire image and reset the offsets to zero.
- Re-enter the old OffsetY.
Animated background layer
- Adjust the area of each Sprite Frameand adjustOffsetYif needed.
- Make sure all Sprite Frameshave the same size (width and height).
- Adjust frame count of the Animationif you changed the number ofSprite Frames.
If you want to change how and what background layers appear in-game, please check this detailed tutorial: [[sfmb_tutorial_theme_settings]]{How to use ThemeSettings}.
Fin.
That’s not all, but other things might be easier to figure out if you experiment with them. That’s one of the best ways to learn!
If something is still not clear, DM me, the author (Marci599) on Discord and I will try to help!
