don't click here

Sonic Battle Hacking

Discussion in 'Engineering & Reverse Engineering' started by Phase, Aug 6, 2015.

  1. Phase

    Phase

    Member
    12
    0
    0
    Sonic Battle Hacking Suite
    Sonic Battle Hacking
    [​IMG][​IMG][​IMG][​IMG][​IMG]
    [​IMG][​IMG][​IMG][​IMG][​IMG]
    [​IMG][​IMG][​IMG][​IMG][​IMG]

    Youtube video of a full battle: [media]https://www.youtube.com/watch?v=w5v2e7TCdiA[/media]


    Sonic Battle is an isometric fighting game for the GBA, released in 2004. I started hacking it back in 2015, when the only tool around was the Sonic Advance PAL tool.
    I've since been able to crack the sprite format and we can now insert custom spritesheets!

    Sonic Battle Hack Suite is a tool I've been creating that will soon allow you to edit every aspect of Sonic Battle: characters, sprites, text, etc.

    SBHS is written in Kotlin using JFrame as a GUI.

    This only works with the American Release of SB, no Japanese or European versions over here.


    SBHS Overview
    Edit: This is outdated. We are now on Version 1.4.2 (as of 7/30/18)
    We can now edit every character relatively easily.

    [​IMG]

    Palette Editor
    The Palette Editor can edit any character in the game, though only some characters' colors are labeled. Clicking a color will open up a detailed color picker. When you click "OK", the color will automatically be written to the ROM. The Save button will save the palette into a 16x1 image, which you can then edit and upload using the Upload button, which will automatically write it to the ROM.
    NOTE: The conversions between GBA colors and RGBA are not always perfect, so it's best to upload your palette & resave it to get the correct colors for your sprites.


    Text Editor
    The Text Editor is not complete and won't work a majority of the time, but the main data structure is still there. You can select the story you want to edit and modify the text area. New lines the text area will display as such in game, but two newlines is converted to a "end this character talking" byte.

    Sprite Editor
    The Sprite Editor only has the ground shadow and some of Sonic's animations, but taking time to find the right offsets will fix that. The spritesheet is displayed in the tab, along with buttons to save it, upload a new one, and write it to ROM. The colors in the image you upload have to match the colors in the palette. If they do not, they will be replaced with 0.

    You can download the latest release and learn how to use it on GitHub.
    Join the Discord server!
     
  2. RenyNoise

    RenyNoise

    Literally Swimming in Privilege Banned
    Is any type of rebalancing for the game possible?
     
  3. Felik

    Felik

    Member
    1,845
    78
    28
    What kind of rebalancing would you want?
    Aside from Rouge being super annoying to play against thanks to he special ability and Emerl being OP when maximized I never had a problem with game balance.
     
  4. RenyNoise

    RenyNoise

    Literally Swimming in Privilege Banned
    Merely wondering if it's possible.
     
  5. Phase

    Phase

    Member
    12
    0
    0
    Sonic Battle Hacking Suite
    A lot of the story missions are incredibly difficult, including Knuckles' story which has you go 1v3 against the hardest enemy in the game. I should be able to edit what characters are in certain battles, essentially allowing you to rewrite story missions.

    Anything's possible as long as you edit the correct stuff. :)
     
  6. Knuckles' story to me was never difficult. Every character played uniquely, and Knuckles deals a lot of damage for his sluggish ass. I did enjoy the game. Beat Amy's and Cream's asses up. Brought me satisfaction as a young lad.
     
  7. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,735
    334
    63
    SonLVL
    It's about time someone started looking into Sonic Battle, I hope you have better luck than I did figuring out the sprites.
     
  8. Phase

    Phase

    Member
    12
    0
    0
    Sonic Battle Hacking Suite
    I don't know if I want to include LZ77 sprites, as you can just use unLZ-gba, but the uncompressed sprites are a pain. I've been trying, and failing, to find a nice way to display it in Java, though JFrame doesn't have the capabilities for directly editing an image.

    I've also been working on text editing, which is annoying to unload from the ROM and convert to the normal text. I've got the editor done, but the text itself is not getting unloaded and saved properly.
     
  9. Pexs

    Pexs

    Otherwise known as Spex Member
    If you're looking for visuals in Java, you're really probably gonna have a bad time. Java's graphical capabilities aren't usually the first thing you think of when you think about the language. If you've got the time, (or you're not too far into your project) I'd say you should at least take the time to consider either C# or Processing. C# is literally the same syntax as Java with a few minor niggles, it's entirely easy to mistake one for the other even as you program it. Processing is verbatim just Java, but fine-tuned for graphics and visuals. Both languages probably have a better shot a visuals than Java does.

    I think. In the least check 'em out, you might find out something cool. Looking forward to what you do here. Good luck.
     
  10. Phase

    Phase

    Member
    12
    0
    0
    Sonic Battle Hacking Suite
    I was originally going to write this in C#, but my current craptop can't handle Visual Studio, as it runs on Windows XP. I've never used Processing before, but I've seen what it can do.
     
  11. Phase

    Phase

    Member
    12
    0
    0
    Sonic Battle Hacking Suite
    [​IMG]
    I've been working on the Sprite Editor recently and was able to come up with this. Currently, you can only edit the ground shadow and Sonic's Idle animation, only because I don't know the offsets for everything else. I'm not an artist so this is the best I could come up with. I'll try changing it to a different character, but the editor currently doesn't account for changes that you've made to the sprite (it does, but it doesn't display them).

    Edit:
    [​IMG]

    Now you can upload a 16x1 image with your palette instead of selecting each color manually. Now I'm off to find the rest of the offsets.
     
  12. LoneDevil

    LoneDevil

    Eternal Underdog Member
    Soo far soo good, keep up the great work.
     
  13. Yuzu

    Yuzu

    Member
    2,548
    51
    28
    I'm loving the work so far! Sonic Battle has never really had a lot of hacking interest , so it's great to see this tool!

    The sprite editor has me pretty hyped, I'm not going to lie.
     
  14. Phase

    Phase

    Member
    12
    0
    0
    Sonic Battle Hacking Suite
    Version 1.1 has been released

    [​IMG]


    • This release contains a sprite editor than can upload/save PNG files and write them to the ROM.
      Only the ground shadow and Sonic can be edited as of now.
    • Palettes can be uploaded/saved for easier editability. Simply put your palette on a 16x1 PNG and upload.
    • The text editor is included, but does not work 100% yet.
    • The UI has been switched to your OS's, and an icon has replaced the stale Java one.

    Download it on GitHub
     
  15. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,735
    334
    63
    SonLVL
    I have to say, while I appreciate the work you've put in, I feel like it could be done better.
    Correct me if I'm wrong, but it seems like you're just having the program just use specific groups of tiles to make sprites, rather than using whatever type of sprite mapping data exists that would say exactly how each sprite should be constructed. Then again, I myself was unsuccessful in locating that data, and my attempt with the Advance series isn't quite there yet.
    Secondly, what is that palette interface? You really should consider something like SonLVL's palette editor:
    [​IMG]
    It shows you the actual colors currently in the palette, to the left you can edit the raw values for each channel, and if you right click you can use the Windows color picker dialog or import from an image or file.

    + - Also, Java sucks  
     
  16. n00neimp0rtant

    n00neimp0rtant

    EYES ONLY Member
    262
    0
    0
    South Park, PA
    Creation Kit (Skyrim mods and patches)
    As far as hacking this game is concerned, I'm probably more interested in any unused assets/strings/stuff you might be able to uncover. Sonic Battle doesn't even have a "game secrets" page on the wiki yet.
     
  17. Phase

    Phase

    Member
    12
    0
    0
    Sonic Battle Hacking Suite
    [​IMG]

    This is a gif by Nadyr that was created by writing the following spritesheet to the ROM.

    [​IMG]

    You can rip the spritesheet from the ROM, edit the sprites and the palette, upload them, and write them to the ROM.

    [​IMG]

    You can download the latest version on GitHub!
     
  18. Phase

    Phase

    Member
    12
    0
    0
    Sonic Battle Hacking Suite
    It's been a while, but the editor has grown a lot! Every animation is editable. Here are some examples.

    [​IMG]

    You can view these gifs on the website.

    There's a Discord Server with a small community forming.

    All the code is on GitHub as always.
     
  19. Aquaslash

    Aquaslash

    <The Has-been Legend> Moderator
    That's motivation to do some spritesheets if there ever was one. Though I'm only guessing the obligatory Metal Sonic hack is mod since he's really popular among moddrs
     
  20. Phase

    Phase

    Member
    12
    0
    0
    Sonic Battle Hacking Suite
    No one has made a Metal Sonic mod yet, the ones that are showcased on the website and pinned in the Discord server are the only ones out there.