[Novice] Altering Hard-Coded Bone IDs, GFX, and SFX

Started by KingJigglypuff, March 21, 2018, 02:22:30 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

This tutorial wouldn't have been possible without being guided by Codes/TheGag96.

Have you ever ran into a situation when despite your efforts to completely change a character's Bone IDs, GFX, or SFX, but still end up with a leftover that you just can't seem to find? Chances are that Bone ID, GFX, or SFX call is hidden away somewhere in the respective character's module. This tutorial will show you what you need to do in order to locate and change these calls.

Requirements:
-CodeWrite .
-A hex editor. I personally recommend HxD.
-Your character's module file (ft_*.rel).

Now that we have what we need, let's get started. This tutorial will be split into two parts: CodeWrite Usage, and HxD Usage.

For this tutorial, I'll be altering the Bone ID, GFX, and SFX Pit calls when reflecting something with his Mirror Shield, since that's what I originally used this process for.

1.) CodeWrite Usage
Sorry but you are not allowed to view spoiler contents.


Here, you'll insert the following into the ASM section depending on whether you're looking for a Bone ID, GFX, or SFX. Once you've entered what you're going to be looking for, click the arrow near the bottom of the window.

Bone ID
X = Register (usually 4, but can sometimes be between 4 through 9)
Y = Bone ID (Hexadecimal)
li rX, 0xY

GFX
X = Register (usually 4, but can sometimes be between 4 through 9)
Y = Effect.pac ID (Hexadecimal)
Z = GFX ID (Hexadecimal)
lis rX, 0xYYYY
ori rX, rX, 0xZZZZ

SFX:
X: Register (usually 4, but can sometimes be between 4 through 9)
Y: SFX ID (Hexadecimal)
li rX, 0xY

So in my example cases, I'll be entering the following ASM. Notice the highlighted parts. This will be important later on.

Bone ID:
li r4, 0x2C
Sorry but you are not allowed to view spoiler contents.


GFX:
lis r4, 0x0018
ori r4, r4, 0x0010
Sorry but you are not allowed to view spoiler contents.


SFX:
li r4, 0x2C8
Sorry but you are not allowed to view spoiler contents.


2.) HxD Usage
Sorry but you are not allowed to view spoiler contents.

Just change the "Datatype" from "Text-string" to "Hex-values", enter your highlighted section, and click "OK". If it says it can't find your value, go back to CodeWrite, change the Register, and search again. Repeat this process until the program finds something. If you've already found a previous value, I'd recommend going back to the top of the file and searching again (or change the "Search direction" from "Forward" to "Backward").

Bone ID (in my case, I had to change the Register from 4 to 5)
Sorry but you are not allowed to view spoiler contents.


GFX ID [in my case, I didn't need to change the Register, the second part is highlighted because this contains both the Effect.pac and GFX IDs, but I only searched for the Effect.pac ID (the first selection is the Effect.pac ID, while the second selection is the GFX ID)]
Sorry but you are not allowed to view spoiler contents.


SFX ID (in my case, I didn't need to change the Register)
Sorry but you are not allowed to view spoiler contents.


Now that you have what you're looking for, just change the IDs to what you need (only edit the last 4 bytes of the highlighted entries), save, and test.

Bonus.) Troubleshooting
Sorry but you are not allowed to view spoiler contents.


That concludes my tutorial, I hope this is able to help those experiencing the same issues I've had with this.
I don't take requests.

My PSA Thread
[move][/move]