GameBanana shows no ads to members. Sign up now!
Ads keep us online. Without them, we wouldn't exist. We don't have paywalls or sell mods - we never will. But every month we have large bills and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3

How to change Data Select Sprites

A Tutorial for Sonic 3 A.I.R

It's Finally Doable!

                                
                                    Data Select Tutorial

Today we’re gonna learn how to replace sprites in S3AIR but to do that we’re gonna need to mod RawData of which Lego made a tutorial already so I’d go check that out.

For now let’s get to what we will need to accomplish this:

Requirements


Sprite Work

We have work to do, We have to set up our sprite for S3K to interpret.

We can’t just throw a sprite at it and expect it to come out the way we want!

So how do we do this? Well first you need to know how Sonic 3 interprets it’s sprites it accomplishes this through 4 means:

Mappings (Maps Out your Sprites)
Dynamic Pattern Load Cues (Draws the Sprite)
Tiles (Pieces of a Sprite)
Palettes (Colors your Sprite)

So let’s explain each:

Mappings:
Mappings are the layout of your sprite so let’s just say if we could modify the mappings we wanted to use this sprite in our Data Select:

We would need to find out how many tiles it will take to fulfil it, specifically the minimum amount we could give it and still have it render correctly.

We do this by overlaying our sprite on a checkerboard made of 8x8 tiles black out the tiles our sprite needs and pink out the ones it doesn’t:

Then in Flex 2 we would use tiles to map out the black area finally we import our sprite, save our work, move the disassembly files we edited to our mod.

We would then open “rominjections.json” and paste in the offsets we need to inject our mappings and tiles at.
 
This presents a problem however as the Tiles are easily injected:

The Mappings on the other hand:


Not so much this is because RD only injects .bin file our mappings are a “.asm” file and even if it was .bin then our mappings can’t exceed the originals file size

One day mappings will be changable but for today we can only work with sonic’s normal mappings:

So we need to find a sprite that fits in that black box so for this tutorial we’ll be using this Sprite:

Upside to not changing mappings is we can simple import our sprite over Sonic’s Data Select Sprite. 

Downside is as of right now with no way to edit the Data Select mappings (or at least it can’t be done through RawData) Importing this sprite to S3AIR is simply not possible:


When Importing a sprite remember to export your sprite as a PNG with a transparent background I know the sprites above have a background but that’s just to map the sprite.

Now let’s get our sprite imported to do that we need Flex 2

Dynamic Pattern Load Cues
These are instructions for sprites the game's engine doesn't draw it tells the game and flex 2 how to draw said sprites, so the game can draw them. 

Without them the game will draw the sprites incorrectly making them look glitchy, this ultimately breaks immersion.

The Data Select doesn't use these as the sprites are drawn in-engine.

Tiles
These are what actually make up your sprite! Every sprite in Sonic 3 big or small is made up of tiles that are 8x8. 

For bigger sprites they duplicate the tile until it makes a bigger tile this process is called "Meta Tiling" 8x8 tiles can build Meta Tiles as big as 256x256. 

Which is the size of a single AIZ1 loop, these and Palettes are stored in a ".bin" file and, the tiles for the characters on the Data Select are under "Misc.bin"

Palettes
Palettes are used not just in Sonic 3, 1, or 2 its used everywhere! In pixel art however they are usually limited and the colors are close together in someway this is to make the sprite look apealing.

Fun fact by the way, did you know the palette for the Sonic 3 Sprite rips on The Spriters Resource is wrong? That's because when it was exported the color palette was set to "Raw" instead of "Full" really!

If S3AIR uses the incorrect color feel free to make a mod to correct them.

Anyway back on topic!  Palettes are stored in .bin files in the disassembly the file for the data select is called "Chars.bin".

Now that we got that out of the way we can finally move on to importing the files we need into Flex 2! 

Flex 2

If you’ve hacked a Sonic game before you should remember a little program called SonMapED:

Flex 2 is basically SonMapED 2.0, It’s a more updated version of this obsolete tool though calling it “SonMapED 2.0” is inaccurate as setting it up is a little different.

In SonMapED You’d load up each file one at a time in Flex 2 you load all the files at once plus it can be hard to get a handle on using it. So I will walk through how to get it set up:

Open Flex 2 for the first time and you’ll be greeted with this:


No there is no tactical nuke incoming, that’s flex’s logo.

What we want to do from here is click “New Project” and name it whatever you want then click “Create {Project Name Here}”. 

Click that button and it will open a prompt to save your project again save it anywhere you’d like.

Now your Screen should have changed you will simply have to click the button labeled “Create Object”. 

Once done a box will appear below with the buttons “Show Config, Load Data, Save Data” in that order.

Click “Show Config” and your screen should look like this:

 

See those labels “Art,Mappings,DPLC,and Palettes” that is where we’ll be importing the files from the disassembly.

For Art we’ll find it in “skdisasm-master\General\Save Menu\Kosinski Art” the file misc.bin is the one we want, so load that up. Also set compression to Kosinski.

For Mappings we go a folder back so we go to “skdisasm-master\General\Save Menu\” and the file we want to load is “Map - Save Screen General.asm”

“Map - Save Screen General S3.asm” those are the data select mappings for Sonic 3 alone we want the mappings for S3&K  so don’t load it.

For DPLCs leave it set to no the game itself draws our sprite so they aren’t needed.

For Palettes go to “skdisasm-master\General\Save Menu\Palettes” the file to load is “Chars.bin”
So load it up TWICE why twice?

Loading it up once will give Sonic and co a more “purple” look and when we go to save it will translate into rom.

Once everything’s loaded up it should look like this:


Now scroll up and click the “Load Data” button the tiles for the Data Select should appear on the left.


See the tiles for the “New” sprite? That means we got the right files now click on the “Mappings” tab in the center panel. You will be taken to this screen:


You may think you did something wrong because there is no sprite however if you look at the bottom right hand corner you should see the Data Select cursor. (What we use to select a save file)

Scroll down some more and you’ll find Sonic,Tails, and Knuckles’ data select sprites select the character you want (in my case that’s sonic):



Now their sprite should appear in the middle area but what we’re interested in is the bottom menu:


Select “Import over Sprite” and navigate to your replacement sprite (make sure it’s 1x or course.) then double click/ import it and…


Now our sprites in the game! ...Kinda, or it will be when we save however sonic’s shoes don’t quite look right do they?

This is your chance to fix any import mistakes made before we save and move on to injecting so best do that now. We can do this by entering draw mode done by pressing M:


Notice anything different? The stats have been replaced by a left-click color (White,Right) and a right-click color (Transparent, Left) so right clicking in this case will make a white pixel appear left clicking erases a pixel.

I need red though so lets click on the left color doing so presents us with:


Look familiar? This is the palette we loaded up when we started! Now if I select the proper colors and with a little pixel art work sonic will look like this:



Looking good, Sonic! Now once all adjustments are made we will go back to the “Projects” tab and click “Save Data”:


This will overwrite the old data (Tiles, Mappings, etc.) with the stuff we just put in now all that’s left is to find their offsets and inject,

However since I really only changed the tiles sonic used that’s the only file I’ll need and I know my offset already it’s 0x3A23AA. Now we get into injecting! 

Injection into S3AIR

With our files saved now it’s time to inject depending on the sprite you edited and what you edited, your offset might be different but I only edited Sonic’s tiles so I’ll need to inject at 0x3A23AA which is where Sonic’s tiles are in MY S3AIR Rom (S3K rom S3AIR uses.)

To find your follow Lego’s tutorial on RawData and How to find offsets, it should lead you to where you need to inject.

So now I can close Flex 2 and for need to go to my Sonic 3 AIR folder find my doc folder and go
into the sample mods folder:


If you already are working on a mod you will only need the RawData folder so copy that into your mod for the purposes of this tutorial however I will copy all three of these files into a new mod.

Now you will need to go to your mods folder which by default is in  C:\Users\YOURUSERHERE\AppData\Roaming\Sonic3Air\mods

Now find your mod and paste the RawData folder there, then go inside:

Delete “default-palette-sonic.bin” and “special-stage-sonic.bin’ we won’t need them unless we want to edit sonic’s palette in-rom.

Now go back to your disassembly and copy the files you edited which in my case are the tiles (“Misc.bin” if you remember), and Paste them into the

Finally return to the mods folder and paste the file you just copied then, open “rominjections.json” and you’ll see this text:

{
// Overwrite Sonic's colors with red tones in the default non-underwater palette;
// this will affect Sonic himself (unless a palette mod is used), and also other places
// where his colors are used, e.g. his image on the signpost
"red_sonic_palette":
{
"File": "default-palette-sonic.bin",
"RomInject": "0x0a8a40"
},
// Overwrite Sonic's colors in the special stages
"special_stage_red_sonic":
{
"File": "special-stage-sonic.bin",
"RomInject": "0x00897e"
}
}
The text with “//” Infront of it is of no concern what is are the labels, files, and hex address to inject at.

So we need to edit this code to load the file we just put in and in my case remove the second block entirely to clean things up a little so my code will look like this:
{
// Replace Data Select Sprites
// This will change sonic’s sprites on the data select.
"Data Select":
{
"File": "Misc.bin",
"RomInject": "0x3A23AA"
}
}
The lines on top are commented so they can be edited without affecting anything again what matters is the label (Data Select) File (“File”:”Misc.bin”,) and hex address (“RomInject”: “0x3A23AA”)

Now save the file and load your Mod up in the Mod Loader boot S3AIR go to normal game and…


Ta-Da! That’s our sprite! Here’s without the mod for comparison:

Not a big change but it does give Sonic a different, more cocky, feel it makes him feel like he’s ready for the journey ahead whereas his normal data select sprites give him a “Eh, whatever I’m along for the ride” feel. 

That is how you change Data Select sprites in S3AIR as for mappings?

That we still don’t know but we’ll figure it out soon enough and once done I will update this tutorial adding how to change the mappings and how to get the game to use your custom mappings.

Anyway, Happy Modding!

Sign up to access this!

Embed

Share banner
Image URL
HTML embed code
BB embed code
Markdown embed code

Credits

Key Authors
legobouwer9
Rawdata tutorial
Nickyfan7
Tutorial Writer
Contributors
legobouwer9
Provided Info on RawData

Submitter

Sign up to access this!
Sign up to access this!
Sign up to access this!

Game

Sign up to access this!

Category

Details

Difficulty Level
Beginner

Attributes

Share

  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • Today's Pick
    Featured on May 1 2020
  • 2
  • 2.0k
  • 8
  • 26d
  • 24d

More from Submitter

WiPs by Submitter

More Save Data Tutorials