Users browsing this thread: 2 Guest(s)
Some final code requests (and screenshots)

Posts: 315
Threads: 20
Thanks Received: 0
Thanks Given: 2
Joined: Dec 2017
Reputation: 2
Status
None
(10-26-2018, 04:18 PM)Gi Nattak Wrote: Basically it's done by going into the Level Editor to locate either the NPC or event trigger of the boss (depends on how the battle is triggered, such as Atma Weapon on the Floating Continent map where you must talk to him to initiate the battle) and finding what the offset is for the event code associated with it, it'll show this offset when you select it, among other info. It helps to remove the header before going into the Level Editor to get the exact offset without having to factor in the +200 for offsets. Then once you know the address you can use the event dump and navigate right to that, as well as see the breakdown of the whole event code dealing with the battle.

You'd then do the jump to free space technique and add the play song command of F0 XX, making sure it's right before the battle to make it as seamless as possible. Depending on the boss battle, you may wind up needing to relocate the whole thing if it starts right off with the 'Invoke battle', it depends.

I think I'll work on a small guide, with some pics and elaboration on what I'm about to go into, but for now here is a brief breakdown of Atma Weapon to give you an idea.

Step 1) Go into the Level Editor (headerless ROM) and go to the map with Atma Weapon on it:
[$18A] Floating Continent, Outside

Step 2) Enable at the top the NPCs to be shown (View>NPCs). Then, under the map name you'll see 'NPCS', so click on that tab. Then locate the NPC that is Atma Weapon on the map. Atma is NPC #0 here, which is actually going to be NPC $10 in the event/hex... Anyways, select Atma, NPC #0, and you'll see there in the little window labeled 'Event' the event address associated with this battle. It is DA30. That is going to be address CA/DA30. If it was 1DA30 it'd be CB/DA30. And if it was 2B/DA30 it'd be CC/DA30. These are the three event code banks. So, since this is DA30, it is CA/DA30.

Step 3) Make ready your hex editor with event dump document in hand and go to CA/DA30. You will see the event code there for the Atma Weapon battle...okay I need to stop here, because looking at your ROM/Gen. Leo Edition I see that fedorajoe made an edit to this exact event already, my guess to deal with something Shadow-related. You can see at CA/DA2F that he does a B2 jump: B2 A4 0D 02, which is address CC/0DA4 (the 02 is bank CC and first and last bytes are reversed, so a jump to CC0DA4 in hex would be B2 A4 0D 02...confusing shit, I know.) so going there he has the relocated code for the battle, and a bunch of free space afterwords. So he already did the work for us in this case lol, you'd just need to put the play song command there before the 4D 50 3F (Invoke battle, enemy set $50, background $3F) and move his code 2 bytes further ahead.

All this is pretty damn challenging to explain and depict over typing... please ask questions about anything and I or others can try to elaborate. There's things I did not explain like how to 'display offset as SNES HiROM' if your using WindHex that is, in order to see the bank of the offset, which can help when first starting to understand the correlation between bank and address/offset. And I'm beginning to ramble so I should stop for now lol.

Thanks Gi Nattak, you da man!  I will see what I can do after I finish work today.  It is actually helpful that fedorajoe already moved the Atma weapon event, since I can study what he did and duplicate it for other events (like the Atma encounter in Kefka's tower as well). 

Don't worry about the headers and offset display stuff, as I am well beyond that now - at least I hope so.  Lol.  I have already managed to move the instrument code and music code in order to add dozens of new songs/instruments - so I think I am at least somewhat competent at doing some of this stuff now!

Edit: well, I successfully added the F0 XX command to the already moved ATMA code, so your tutorial so far is working. Now I need to do the hard part and find more events to move and tweak! I think I'll start with the ATMA encounter in Kefka's tower. Smile I meant to ask, when you use the B2 jump command, do you have to end that set of code with another command that goes back to the original position, or does the game automatically do that?
  Find
Quote  



Messages In This Thread
RE: Some final code requests (and screenshots) - by Lightning - 10-26-2018, 06:09 PM

Forum Jump:

Users browsing this thread: 2 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite