• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
June 17, 2024, 11:44:10 am

News:

Use of ePSXe before 2.0 is highly discouraged. Mednafen, RetroArch, and Duckstation are recommended for playing/testing, pSX is recommended for debugging.


Modifying/Adding New Formulas

Started by SapphireFlames, November 09, 2012, 12:51:46 am

SapphireFlames

Greetings,

I am a novice hacker of sorts. My goal is to basically alter some of the formulas that already exist or to add new ones. There's obviously so many unused slots. I figured I could probably put one or two into good use-- assuming it's possible. I am not sure at this point.

At any rate, I was reading up on Zodiac's tutorial but I kept on getting stuck at certain parts. [ http://ffhacktics.com/tutorials.php?id=11 ]

Step 1:
At the part where he is describing the dummy test for a new spell, he makes Cure an Unholy spell. I downloaded psxrel.exe. I was able to make adjustments by typing in 0x5FC05 in the memory window ONLY. I did have the Disassembly, Registers, and Breakpoints open too but nothing had been done to them yet. On a side note, my Disassembly does NOT look like his. I'm not sure if it's supposed to or not but I know mine does not. Moreover, the file which I used was not a completely clean file; however, nothing had been done to cure.

Step 2:
I adjusted the values manually, like he requests-- 80, 53, 25. And I also change the MP and CT to 00. When I check to see, the changes do reflect the switch.

Step 3:
I target someone with my spell, quick save, and go to the Breakpoint window. This is the part I get stuck at. When I type in the Cure Y's value, I type in 0x8005FC08 and set the radio button on Memory with only Read checked. The 'size' is 1 as well. When I do all of this, this causes the game to screw up and lag strangely. The changes do NOT show up in the Registers window. R5 does not show 801938FA.

Questions: Am I supposed to type in something else? Or is the edits I've made before interfering somehow with the coding? Also, how does one know what to put in the Breakpoint? Is it always going to be the Y value or does it depend on something else?

Step 4:
I'm stuck essentially and cannot go forward anymore. Also, my Disassembly does NOT show what is highlighted in the red box. Nor does it show on the bottom bar/footer "Breakpoint on memory read (5fc08)". In fact, it shows nothing.

Some help please?

FFMaster

1) You can arrange the window sizes and locations as you like. Mine is fairly similar to the tutorial window, but adjusted to fit all 31 registers without scrolling because I felt it was better for me.

2) Cool, you changed the values (which you could have done in FFTPatcher =p ) but you managed to use the hex editor, which is very useful. Good stuff.

3) I think I had this problem before.... try using psxfin instead of psxrel. There was a reason I couldn't use psxrel, and that might have been it. No guarantees though. I think all the inputs are correct. A screenshot of the window before you confirm it will help though.

As for 4, I'm sure it will be fixed when we get 3 fixed.

EDIT: It's easier if you come on IRC. There aren't that many ASM hackers and I'm not sure if they browse the Help forum much. I certainly don't anyway =p
  • Modding version: Other/Unknown
☢ CAUTION CAUTION ☢ CAUTION CAUTION ☢

Pride

If you have having trouble following Xif's tutorial, there are some other ones on the forums as well including Pokeytax's, Glain's, and FDC's that all go into ASM hacking. I'm not sure which emulator you are using but I generally have good success with psxfin and its what I would recommend.

QuoteQuestions: Am I supposed to type in something else? Or is the edits I've made before interfering somehow with the coding? Also, how does one know what to put in the Breakpoint? Is it always going to be the Y value or does it depend on something else?


It depends on what you are trying to do. There is detailed and extensive documention on formula's in the game thanks to the hard work of the hackers on the site (most notably SecondAdvent and FDC) which you can find in Choto's post here and is well-worth the download so you don't go over information that has already been discovered. The entire thread is a good read for general hacking information and there are other threads that have some good information and little tricks you can use. There are threads throughout the Help section too that people have questions about ASM hacking that you can look at as well. You can always PM me if you have more questions and you don't always feel like creating a new thread and I'll assist you to the best of my ability.
  • Modding version: PSX
Check out my ASM thread. Who doesn't like hax?

Choto

I actually have a similar problem with psxrel with the breakpoints. After I put the breakpoint in, the game visually freezes and I can't see what is going on. I get around it by setting up an attack or whatever event is gonna trigger the breakpoint so that all I have to do is press 1 button and I know I'll hit the read/write or execute that I want. If the counter for the breakpoint I set increases, I know I hit it. Not sure if it's because I adjusted the frame rate on psxrel or not.. but that's my experience.

Also in addition to what the guys said, the wiki has the disassembly of most routines that we have documented. I think it's extremely useful: http://ffhacktics.com/wiki/Routine_Locations

The formulas are also on there on a different page, so you can see exactly what routines each formula calls and how you want to edit it.

If things seem overwhelming at first, don't worry about it. You seem well on your way to being successful if you put the time in. We all started the same way ^_^

Glain

November 09, 2012, 09:48:44 am #4 Last Edit: November 09, 2012, 10:29:59 am by Glain
I get a bunch of lag/processing when I set a breakpoint and it can take a while for it to resolve, but it should eventually; then again, I'm also using psxfin rather than psxrel. Every so often pSX will just straight-up crash on me when I set breakpoints, so sometimes you just have to try again.  I also find deleting breakpoints while stepping through code is a good way to cause a crash.  Best to delete/add them while the game is running normally, before hitting a breakpoint.

EDIT: You know what... that tutorial doesn't explain an intermediate step: After you set the breakpoint, go back to the game window and actually target someone with Cure; that should bring up the breakpoint at the debugger and change the disassembly, etc.

Edit again: Oh, and when you get to it, you can use my MassHexASM utility to assemble the MIPS code instead of Renegade64.  That will save you from having to flip the bytes.
  • Modding version: Other/Unknown

SapphireFlames

Thank you everyone for your responses. I appreciate it.  :mrgreen:

I will definitely apply what has been shared/discussed here when I am tinkering with things in the game some. I guess what might be helpful is a Tutorial on how to Edit formulas in the game. Potentially, I'd like to make new formulas in the game or edit the preexisting ones and allow them to have the ability to Counter and/or add statuses. Does anyone know how I could go about achieving this?

Also, one other thing: I am trying to change the Jump, Throw, and Charge-based skills. In this topic [http://ffhacktics.com/smf/index.php?topic=250.msg4000;topicseen#msg4000] it talks about how Lancers and Archers, if they are assigned to even a different skill set tend to mess up. In this topic [http://ffhacktics.com/smf/index.php?topic=2890.0;nowap], it goes on to say that these types of skillsets are very finicky about how they are read/processed in the game (is that the right word?). Ideally, I'd like to make Archers more of a Ranger class with better skills. I'd also like to do something about Lancers and possibly even Calculators. Possibly.

So here's my question: Is there a way I can give Archers/Lancers NORMAL Skill sets like the rest of the classes? If so, how? Is there a tutorial that explains how to do it?

Thank you everyone once again! Your responses are appreciated.