| Sprite Hacking Guide Part 3; after ablon's | |
|---|---|
| Topic Started: Jun 23 2010, 11:42 AM (1,500 Views) | |
|
|
Jun 23 2010, 11:42 AM Post #1 |
|
Programmer!
![]()
|
Sprite Hacking Guide Part 3 This is the 3rd addition to the sprite hacking guide started by ablon08. View his past 2 topics: http://s6.zetaboards.com/The_Rockman_EXE_Zone/topic/8597153/1/#new - Part 1 http://s6.zetaboards.com/The_Rockman_EXE_Zone/topic/8642308/1/#new - Part 2 You will also need to make some use of the BN Sprite File Format documented by mega rock.exe: http://s6.zetaboards.com/The_Rockman_EXE_Zone/topic/8632071/1/ - BN Sprite File Format Alright, so we need to view the BN Sprite File Format once in awhile, so keep the tab in FireFox or Google Chrome open. What we will be doing is going over leftover things not done by ablon. (doing a big help to him) [header] [animation pointers] [animation data] [sprite data] [palette data] [junk data] [oam data] Above is the sprite file format for everything in a sprite file. The exact size for MegaMan BN6's sprite file is about 740A. 10,000 bytes was used just for an estimate. The extra 2000 or so bytes didn't effect the file. Look over the sprite file format... The header doesn't really matter, so I'll go on with the pointers. I'll be explaining most of the confusing parts in more depth so here I go:
documented by megarock. Alright. The pointer is a 0000XXXX offset pointing to somewhere in the current sprite file. The second -, now. How big is the pointer is the first pointer you have subtracted by 4. That was pretty simple, right? Well, get ready for some harder stuff. D:
Okay. - animation data consists of 5 sets of 4 byte parts. That means there will be 5 sets of 00000000's put with pointers to somewhere within. The first 00000000 points to the graphics size. * reads 4 bytes to determine # of bytes to load for graphics. That should be self-explanatory. The second 00000000 points to the palette size. Like the graphics pointer. * reads 4 bytes to determine # of bytes to load for palette. Junk data is the 3rd pointer. No one cares about this so skip it all you want. The 4th pointer is pointing to your OAM data.
The last pointer is what I'm going to go in depth with. Its the animation tpye data. What it does is use frame delay and stuff like hold animation, end animation and loop animation.
I'll keep that here so we can just reference back to it if we need it. Alright. The animation type data reads 2 pairs of 16-bit data. The XX value and the YY value. XX = how many frames to delay. YY = the animation type. NOTE: This is used in the Custom Sprite Maker. Alright. Let's get into some action now, shall we? Its about time. Lets do the normal routine. Open up Visual Boy Advance and get outside a battle. Okay. We'll be editing MegaMan's damage animation. Use this list now: list The list was made by GM and is used for the Custom Sprite Maker. The damage animation is the second animation and its delay value is 3 seconds(according to GM). We need a good Hex Editor for this, and a powerful one too. Know one? I do. HxD, the one and only. Let me tell you a bit about a hex editor and take some confusion out. whats a hex editor? So open up your hex editor. Get the MegaManbn6.dmp file from the bottom of this thread. Drag and drop or open up the downloaded dump file to your hex editor. You are at the beginning of the sprite file, right? The first thing you should see is 60000000. 32-bit it in memory viewer if you'd like, and you'd get 00000060, which is the position of the file where MegaMan's idle animation data is. We don't want the first animation pointer! We want the second! Which should be 74. Goto the 74th byte of the file. Just press Ctrl+G and go there. You should end up here: ![]() So many values! Which one do I need? Okay. So you would normally view this in 32-bit. 32-bit has 8 values in it per 2 bytes. So select the first 4 bytes(you should have 8 numbers selected) from where your text enterer | thingie is. That first one is the graphics pointer. The second one is the palette pointer. Third is junk. 4 is OAM which ablon covers heavily in his guide. The last one is what we need. So I'll help you out with a picture here: ![]() Okay! We are all set now. We are editing the 16-bit value. Epic, right? Okay. So the first byte(00XX) edits the frame delay. The second byte(00YY) edits the animation type. We're going to edit the YY to change the animation type. Currently, damage anim. uses 00, play animation, holds frame by delay value before showing the next frame. 80 is used when it ends the animation and goes back to the current one. C0 loops the animation. Alright. So we're going to replace MegaMan's idle animation with its hurt animation indirectly. Alright. So go to the 60th offset. Go to the 5th pointer after that. I think it should be 02 00 80 00 you see. Change all that to 00's. So it has time delay of 00 and the play animation. Go to the 5th pointer after 74. It should be 04 00 00 00. change the 4 to a 0 and then the third 00 to 80 end animation. Then go fight a virus or something and watch. Through changing frame delay values and animation types, we indirectly set the idle animation to the damage animation. This practice should give you a full understanding on how it works. I sort of based all of this on MegaRock's Original Documentation on custom sprites. I'm not sure if he wants me to show you ALL of it, so I'll just show you a bit about the timers:
I hope you figured out a lot on how to use the frame delay value in this guide... so try figuring some out on your own. I'm sure you'll open a lot of knowledge. ![]() Thanks to Ablon for posting the first 2 guides and figuring out so much. Thanks to megarock for the bn sprite file format or most of the sprite hacking guides ablon made wouldn't be here. ![]() Ablon's correction: There are more than 5 pointers in each animation data. The number seems to vary, but every one has a palette data pointer, as well as the palette size pointer. Finding Which Pointers To Edit Its pretty easy. It'll involve some MD Hacking with it. Just to help you out on this, I'll write a detailed guide about this within this guide. Alright. Get the Serenade.dmp from the bottom of this thread. We'll be using her as an example. Use the Sprite List Viewer to import Serenade.dmp over a CLEAN ROM over MegaMan BN6, to be the easiest. Go use MD Hacking(using MD hacking for those that cannot use SLV & also because its easier to use within memory viewer). If you have apparently NO IDEA how to do MD Hacking, Base(inactive member now) has taught us all how to MD Hack. Simply go find his guide in the sub guides and read it... There's also an MD Hacking on the TREZ HP. If you do, lets continue. Alright(count how many times i've said alright), so use MMBN6 MD hacking to open up MegaMan's sprite. It shouldn't be hard. -_- Its not MegaMan... It seems to be.. Serenade! It should look beautifully like this(but turned around! D:) Change the palette index(1) to 0 so it doesn't glow weirdly:![]() Lets random pick now! I want to edit the animation for serenade looking like using a sword? Change the top FFFF to 01. Shuffle through everything until you get to: 5. I think when I used Serenade, I saw this animation, so I'll think we used this. 5 is the value! Go to the sprite file for serenade in HxD. Everything starts with 0. 0 is an animation too. So if 1 is the second pointer. 2 is the 3rd. Its one above eachother. Since 5 is out value, 6th pointer will be our pointer! Have fun. -_- Sprite Swapping 08031CDC - 32-bit At that value, you can shuffle through values of 4 to change to the next sprite. 2194 is Lan, 2198 is Mayl, 21A4 is Chaud and ProtoMan(on the net) and on. If you do this and you jack out, it sort of changes the whole sprite index of where everything is located, so use it correctly. And its right above the sprite list... 2194 is for Lan and MegaMan, keep that in mind. Then the next value, 08032314. It controls an object in that area. Somethign we haven't been able to do, right? If you go to ACDC area, this edits the chip trader. I haven't found any working values yet. Maybe you might be able to. How it works Alright, so how does what we just discovered work? Go to 08032194. Hmm... You see many offsets, don't you? So 08032194 holds Lan's OW sprite offset. 98 holds Mayl. A0 holds what we haven't been able to find... YAI!!! ![]() ![]() A4 holds ProtoMan and Chaud. It just matters about net or real. So it just reads the value at the specified location, right? You can even do Dex! Find where his offset is located in HxD. Place the location offset(not Dex's overworld offset) where you are supposed to... and walaahh! You're playing as Dex! =D Cool, right? ![]() ![]() That's only overworld. You see how it works? There's still more. You can do the same with mugshots. 08032598 is for Lan's. Just set the mugshot where its located in the sprite list. It reads the mugshot that its holding. MegaMan's is 08032674. It works the same way as Lan. Find the mugshot for... Mayl! Place the location offset like we did for overworld at Lan's offset. And we have it all! Still more. This time we're going to do it for battle sprites. Using all of this, we won't have to replace anything or repoint. Just set one offset and we are good! Alright. Now. Find the 08031CEC before the sprite list. We're going to change it. What?! It'll change where the sprite list starts! Nope. You're wrong. Its the same as always. It just sets the battle sprite. I know how you might've confused yourself that 08031CEC sets the start of the sprite list. Let's take this into action now. 081D8000 is located at 08031CEC, and that's the offset thats said at 08031CC4(where your supposed to find 08031CEC said). 081DF420 is HeatBeast. Change the 08031CEC to a 08031CF0(where 081DF420 is located), and you'll play as HeatBeast! Well, that's good. But it changes the index for everything else. So you'll play the next sprite as you're supposed to ![]() ![]() Cool eh? Now, you don't have to repoint who you are playing as and stuff. You just set a different offset at 08031CC4! And that's the 3rd addition to this guide! Have fun! Dumps MegaMan BN6 File : http://www.sendspace.com/file/tekxq8 - will be outdated so you must export your own. Serenade Dump: http://www.4shared.com/get/269789182/de8c7122/serenade.html - Credits to Ablon for releasing it at AHA. Edited by Agro, Jun 26 2010, 03:07 PM.
|
|
|
|
| Dramz | Jun 23 2010, 01:29 PM Post #2 |
|
Spastic Colon
![]()
|
Thats pretty cool, but I have one correction: There are more than 5 pointers in each animation data. The number seems to vary, but every one has a palette data pointer, as well as the palette size pointer. Also, we could really have put this on part 2, making it very clear you made this. The only reason there are 2 parts is that the guide broke the zetaboard character limit. Also, when describing a pointer, 0000XXXX isn't always accurate. some spires are just huge. eg) Gregar battle sprite. 000XXXXX comes up. Edited by Dramz, Jun 23 2010, 01:45 PM.
|
|
|
|
|
|
Jun 23 2010, 01:44 PM Post #3 |
|
Programmer!
![]()
|
Thanks for the correction. I see. If it doesn't cross the limit, I'll add it to your Sprite Hacking Guide Part 2. If it does, I guess we'll have to keep it like this. I might add a lot more discussing some more stuff, but we'll see. And 0000XXXX is said because it is guarenteed that those XXXX's will be filled up. Edited by Agro, Jun 23 2010, 06:24 PM.
|
|
|
|
| Dramz | Jun 23 2010, 01:46 PM Post #4 |
|
Spastic Colon
![]()
|
Its no problem keeping it like this If I ever do max the sprite hacking guide part 2's character limit (its something like 40 000 characters) I'll just have to put my stuff here. Edited by Dramz, Jun 23 2010, 01:47 PM.
|
|
|
|
| louman7777777 | Jun 23 2010, 02:28 PM Post #5 |
![]()
Newb
|
^Or make a part four I swear they'll be as many parts to this guides as there are Final Fantasy games which is too much for anyone to know or care but everyone plays the games since they're so awesome anyways Edited by louman7777777, Jun 23 2010, 02:29 PM.
|
|
|
|
|
|
Jun 24 2010, 04:49 PM Post #6 |
|
Programmer!
![]()
|
Newest additions -Finding which pointers to edit -Editing Lan and MegaMan's sprites(Battle, OW, and Mugshot) More is to come! |
|
|
|
| Dramz | Jun 24 2010, 11:53 PM Post #7 |
|
Spastic Colon
![]()
|
Mugshots and OWs are in my guides........ :boycott: I also covered importing and repointing on that subject, and palette work a bit later. Edited by Dramz, Jun 24 2010, 11:58 PM.
|
|
|
|
|
|
Jun 25 2010, 09:33 AM Post #8 |
|
Programmer!
![]()
|
Did you read it? I couldn't find a better name. I didn't teach them importing. I taught them something else. Read it. |
|
|
|
| Greiga Master | Jun 25 2010, 10:11 AM Post #9 |
![]()
Admin of the stars, owner of your soul...
![]()
|
I did not write that list >.> I fould not have made it so confusing, even i diddnt understand what "clear" meant. |
|
|
|
|
|
Jun 25 2010, 12:53 PM Post #10 |
|
Programmer!
![]()
|
O_O When me and you TeamViewered to use the Custom Sprite Maker when it wasn't released, you used that thing and i copied it off of you since I knew I would need it. =/ |
|
|
|
| Dramz | Jun 26 2010, 03:03 PM Post #11 |
|
Spastic Colon
![]()
|
You went over Sprite Swapping, and a little about 08031CC4, both of which are dealt with in my guides. Sprite swapping I went over the theory of, but didn't run through an example, as it is a simple task. I went into depth with 08031CC4. |
|
|
|
|
|
Jun 26 2010, 03:04 PM Post #12 |
|
Programmer!
![]()
|
Ah, I see. You're guides are so big I just skim through everything. |
|
|
|
| Dramz | Jun 26 2010, 03:35 PM Post #13 |
|
Spastic Colon
![]()
|
lol, I figured as much. |
|
|
|
| Mgamerz | Jun 28 2010, 01:03 PM Post #14 |
|
The ShoutBox King
![]()
|
I don't think I can, but should you merge these topics and just put each section in a spoiler box? |
| I run a Mass Effect 3 modding site named ME3Tweaks.com that details how to mod ME3 as well as showcasing mods for the multiplayer aspect of the game. I also developed a mod manager utility as well as an online mod creation tool named ModMaker. | |
|
|
|
|
|
Jun 28 2010, 01:24 PM Post #15 |
|
Programmer!
![]()
|
There's going to be too much characters again. I'm still adding to this guide. |
|
|
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Guides & Research · Next Topic » |




It should look beautifully like this(but turned around! D:) Change the palette index(1) to 0 so it doesn't glow weirdly:









