Users browsing this thread: 1 Guest(s)
Custom Command Help!

#1
Posts: 10
Threads: 5
Thanks Received: 0
Thanks Given: 2
Joined: Aug 2017
Reputation: 0
Status
Confuse
Hey!
Essentially, what i want to do is:
Throw -> Control with the use of a Relic.
Then, I'd like to change the Control command to just the Holy spell, similar to the Health/Pray and Shock commands.
Any ideas on how to make that happen?
Quote  

#2
Posts: 377
Threads: 34
Thanks Received: 10
Thanks Given: 7
Joined: Dec 2018
Reputation: 18
Status
Moog
This has to be done with a hex editor or with ASM, but it is relatively simple.

The relic side of it:
Code:
(Data - commands that can be replaced with other commands thanks to Relics)

C2/5452: 05   (Steal)
C2/5453: 0F   (Slot)
C2/5454: 0D   (Sketch)
C2/5455: 02   (Magic)
C2/5456: 00   (Fight)


(Data - commands that can replace above commands due to Relics)

C2/5457: 06   (Capture)
C2/5458: 18   (GP Rain)
C2/5459: 0E   (Control)
C2/545A: 17   (X-Magic)
C2/545B: 16   (Jump)
You need to pick a command from the first five to replace with Throw (which has a value of 08) and then pick a command from the second five to replace with Control.  Or... if you're fine with it, just replace Sketch in the top row with Throw and your second set of data is all ready already.

Once you've made that hex change, whatever relic has the "Sketch->Control" flag set will instead swap Throw for Control.

Casting Holy on use of the command is a little trickier.  You need to add new code to freespace for a new command that sets the spell idea to whatever spell # (in hexadecimal) Holy is, and then jump to C2/1722.
Code:
Freespace
C2/WXYZ
A9 QQ            LDA #$QQ, replace QQ with whatever spell number Holy is
                   (in hexadecimal, not decimal, use your comp's calculator to convert)
85 B6            STA $B6, saves the spell animation
A9 0F            LDA #$0F
85 B5            STA $B5, saves the command as Slot, which bypasses MP cost
4C 22 17      JMP $1722, goes to code shared by Health to handle message display and attacking.

Then, you just need to re-point Control to use this code instead of its default.

Code:
C2/19E3: 76 19     (Control)

Change this to YZWX
Addresses are little-endian for the SNES, which kinda turns them backwards when we're pointing to them.  That's an oversimplification, yes, but sufficient for what we're trying to do here

Animation might be funky if we don't change its pointer too...
If you try everything above and it looks funky (or the character backs away after using the command), try this:
Code:
C1/B791:    54BB        (0E)        (Control)

Change this to EBAB.  That should make it animate exactly as if someone had cast the spell.
  Find
Quote  
[-] The following 1 user says Thank You to C-Dude for this post:
  • xDaygo (07-07-2020)

#3
Posts: 10
Threads: 5
Thanks Received: 0
Thanks Given: 2
Joined: Aug 2017
Reputation: 0
Status
Confuse
Thank you for the thorough response! My only issue is I'm not entirely sure how to find said code.
How to I find C2, so on and so forth>
Quote  

#4
Posts: 377
Threads: 34
Thanks Received: 10
Thanks Given: 7
Joined: Dec 2018
Reputation: 18
Status
Moog
First, you'll need to know if your ROM has a header or not. You can sometimes figure this out by file size, or you can use a tool like NSRT to check the file.

Then, you need a hex editor. HxD works very well for this purpose. Make a copy of your ROM and open it with HxD. Make sure you've got the right file open, because HxD can change ANY file, and you don't want to mess up something you don't intend.

The addresses listed refer to locations in the ROM, but HxD reads them as direct file locations. Because of that, you need to subtract C00000 from any address to get its corresponding file address. In most cases, that means just dropping the "C" in front, but this will be important if you do more hex editing down the line.

You go to the address specified and look at the bytes therein, which are written in hexadecimal format. Then you change those bytes to what you want.
  Find
Quote  
[-] The following 1 user says Thank You to C-Dude for this post:
  • xDaygo (07-07-2020)

#5
Posts: 377
Threads: 34
Thanks Received: 10
Thanks Given: 7
Joined: Dec 2018
Reputation: 18
Status
Moog
Try this.
.zip  HolyControl Patch.zip (340 bytes, 7 downloads)

Freespace used: C2/FBFD-C2/FC07

This patch should make any item flagged with Sketch->Control instead change Throw into Control.  It should also make the Control command cast spell $0E, Pearl.

This patch does NOT
A) Change the name of the Control Command
B) Change the name of the Pearl Spell or its effects
C) Change the name or identity of items that set the command swap flag.  The default remains "FakeMustache".

FF3USME will still list the flag as Sketch->Control, but for whatever item that flag is set, it will instead change Throw into Control.
  Find
Quote  
[-] The following 2 users say Thank You to C-Dude for this post:
  • madsiur (07-29-2020), xDaygo (07-28-2020)



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite