Making a Command cast a single spell - Printable Version +- FF6 Hacking (https://www.ff6hacking.com/forums) +-- Forum: Discussion Forums (https://www.ff6hacking.com/forums/forum-5.html) +--- Forum: Magitek Research Facility (https://www.ff6hacking.com/forums/forum-9.html) +--- Thread: Making a Command cast a single spell (/thread-4032.html) |
Making a Command cast a single spell - Febreeze - 08-11-2020 Hi everyone I'm new to FF6 hacking and I want to make a command that casts a spell similar to what the health and shock commands do. I made it so Control casts my spell but when a character uses it they: Walk forward, Walk forward again, Do the spell, and then not walk all the back. I based the code on this thread (specifically C-Dude's first post) Is the double walk forward a bug or a specific issue with the spell I'm casting, If not is there anyway to fix it. RE: Making a Command cast a single spell - Everything - 08-11-2020 What are you using for your spell? Some animations have the step forward built in, so you would need to disable it. RE: Making a Command cast a single spell - Febreeze - 08-11-2020 (08-11-2020, 11:51 AM)Everything Wrote: What are you using for your spell? Some animations have the step forward built in, so you would need to disable it. It's a custom spell animation I made FF3usMe it is built off of the shock animation. I can't figure out how I would get rid of the built in step forward. Is there an easy to get rid of it. RE: Making a Command cast a single spell - Everything - 08-11-2020 This will be tricky because Shock uses a special animation for stepping forward. Right now you're using the generic step forward for a normal spell, followed by the Shock animation. So you get two steps forward but only one step back. C-Dude's tutorial assumes that you're using a normal spell. Since you're using Shock you might want to take a different approach for the animation. Which spell animation index did you modify in FF3usME for your custom spell? Was it 130 (Megahit/Shock) or something else? Did you just modify the values in FF3usME, or did you also modify the animation script in a hex editor? RE: Making a Command cast a single spell - Febreeze - 08-11-2020 (08-11-2020, 01:28 PM)Everything Wrote: This will be tricky because Shock uses a special animation for stepping forward. Right now you're using the generic step forward for a normal spell, followed by the Shock animation. So you get two steps forward but only one step back. Sorry for the late response I assigned Control to cast 129 (which was 7 Flush) Then modified 129. I modified the values in FF3usMe. In FF3usME 129 looks like this: Idx: 8080 Pal. 0: 0 Idx: 01C9 Pal. 1: 238 Idx: FFFF Pal. 2: 0 Idx: 0080 SFX: 80 Byte 10: 09 Speed: 16 RE: Making a Command cast a single spell - Everything - 08-11-2020 Okay, here's something you can try. Instead of hijacking the normal spell animation code you're going to modify the code for Control to make it look more like Shock. Follow everything in C-Dude's tutorial except the last step. Code: C1/B791: 54 BB (0E) (Control) Next, modify the animation code for Control to make it look just like Shock (for reference, the code for Shock is at C1/BB49). Code: Modify the code at C1/BB54 to this: Last, change the animation data pointer for Control to instead point at 7-Flush. Code: C2/B530: 18 16 ; change this to 0E 07 (calculated from 129 * 14 = 1806 = 0x070E) As an alternative to the last step, you can avoid overwriting the vanilla 7-Flush animation data and instead modify the animation data for Control to match what you put into FF3usME. I don't think this can be done in FF3usME though, you would have to do it with a hex editor (For some reason the animation editor in FF3usME only goes up to 255 and Control is at 404). Code: Modify animation data for Control to the following: Hopefully I got all that right. Let me know how it works. RE: Making a Command cast a single spell - Febreeze - 08-11-2020 It took me a little bit to do it but your code works thanks for the help! the control command still does control I'm not sure why though. RE: Making a Command cast a single spell - C-Dude - 08-11-2020 (08-11-2020, 04:14 PM)Febreeze Wrote: It took me a little bit to do it but your code works thanks for the help! Did you remember to re-point Control's battle function at C2/19E3 away from its original code to your new freespace code? It sounds like you changed the animation and not the pointer. Remember that it's little-endian, and that your new code has to be in C2. EDIT: @Everything, I think that the animation called for Control might be in the FF3USME Battle Editor (the one with Terra swinging a sword on the button). That's where I found other command animations, like the one for Terra's Morph and the one for Possess. RE: Making a Command cast a single spell - Everything - 08-11-2020 (08-11-2020, 08:28 PM)C-Dude Wrote: EDIT: @Everything, I think that the animation called for Control might be in the FF3USME Battle Editor (the one with Terra swinging a sword on the button). That's where I found other command animations, like the one for Terra's Morph and the one for Possess. Aha, you're right! Control is number 45 under "Animations 2". Make sure to do all the other steps in C-Dude's tutorial except the last one. That's what changes the actual effect of the attack. |