Kitty Corp Meow Mix Forums

Help & Tutorials => A/A Tutorials => Topic started by: KingJigglypuff on March 21, 2018, 08:22:30 AM



Title: [Novice] Altering Hard-Coded Bone IDs, GFX, and SFX
Post by: KingJigglypuff on March 21, 2018, 08:22:30 AM
This tutorial wouldn't have been possible without being guided by Codes/TheGag96 (http://forums.kc-mm.com/index.php?action=profile;u=40919).

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 (https://github.com/TheGag96/CodeWrite/releases) .
-A hex editor. I personally recommend HxD (https://mh-nexus.de/en/downloads.php?product=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
Start by opening CodeWrite. You will be greeted with this window.
(https://i.imgur.com/110ZYnZ.png)

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
(https://i.imgur.com/cUQPl78.png)

GFX:
lis r4, 0x0018
ori r4, r4, 0x0010
(https://i.imgur.com/YQtDe3a.png)

SFX:
li r4, 0x2C8
(https://i.imgur.com/olwC5li.png)

2.) HxD Usage
Now that you have the ASM you're wanting to look for, open your character's module in your hex editor, and one-by-one, search for your highlighted sections (only use my examples if you're making something over Pit). In HxD, press Ctrl + F, and the following window will appear.
(https://i.imgur.com/MEbsRYX.png)
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)
(https://i.imgur.com/HvfB87U.png)

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)]
(https://i.imgur.com/CGUKUf7.png)

SFX ID (in my case, I didn't need to change the Register)
(https://i.imgur.com/ZLnGwa4.png)

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
If you can't find what you're looking for with this method, despite entering all possible Register values, then your issue can be narrowed down into 3 different options.
1.) You just simply typo'd when searching and/or fixing something in either the module or moveset file. In that case, just go back, double-check, and fix your mistake.
2.) It turns out you missed something when editing your moveset file. Double check to make sure you're sure you're not missing anything.
3.) Your Bone ID, GFX ID, and/or SFX ID is located in the sora_melee.rel. This is the most difficult of all options, since it requires the use of making a gct code in order to alter your given ID (since it's not recommended to directly alter the sora_melee unless you know what you're doing). This is something I wouldn't know how to do. So unless you know someone who knows their way around the sora_melee, I'm afraid you're out of luck.

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