• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
April 19, 2024, 07:33:10 am

News:

Don't be hasty to start your own mod; all our FFT modding projects are greatly understaffed! Find out how you can help in the Recruitment section or our Discord!


flaw with ASM received from FFTpatcher; Unsure if out of place or incorrect code

Started by Talcall, January 31, 2020, 06:59:35 am

Talcall

I am editing Oracle abilities to turn them into spellblade abilities, by altering their effects, changing which formula they use, etc (if more information is needed i can send screenshots of each ability and their edits) and i came across this error with the data i received back from the FFTpatcher, which wants me to edit these bytes shown such that the second byte is identical to the byte already there?

I have correctly identified where the first portion is supposed to go using an online editor's search function, and that all runs smoothly, however pulling up SCUS with this hex editor (that i can copy and paste from, making using FFT Org ASM generator far easier to use) it's apparent that something is wrong. is there dummy code here that's being skipped over by the patcher, or is it incorrectly processing what I've fed it?

if anyone can help, this would be greatly appreciated
  • Modding version: PSX & WotL
""The only thing more hardcoded than FFT, is more FFT."
    - A wise man"
       - Talcall
  • Discord username: Talcall

Xifanie

I don't see anything wrong. What's the issue? What's the problem you experienced in-game?
  • Modding version: PSX
Love what you're seeing? https://supportus.ffhacktics.com/ 💜 it's really appreciated

Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

Glain

That's 0x5FE74, not 0x5EE74.  Location in file is 0x50674, not 0x4F674.
  • Modding version: Other/Unknown

Talcall

The issue is that the FFTPatcher should only give values that need to be altered. as shown in the image it wants me to change the two bytes "82 00" to "00 00" however if it gave a value that only needed to be altered, it would give me "3005fe74 0000"

And yes, the offset isn't exactly that shown by data given by the patcher, but this is due to the fact that the patcher is designed to patch directly onto the full game, rather than onto each binary file of the game. the game starts with about 0x1000 bytes of unusable kernel data, followed by SCUS_942.21 (I believe this is the order, anyhow) which means i need to use external programs to find the data to be edited (as seen in the note above the one i highlighted, 3005EDCE 0001 actually corresponds to 0x0004f5CE 0001);

first i open the game, find the binary location shown by the patcher, and i recall the bytes shown either there or just before there, depending on if it ends with 0 or not.

then i open an online hex editor and search through each binary file with the byte data until i find the location that resembles the data shown in game, comparing it to the game data so i don't miss anything

then i open the hex editor i installed (because i can copy paste the data there), and find the value the online hex editor shows, compare it to the game, and begin replacing the code.

however my problem arises here now. the patcher wants me to replace data that belongs to the monk's abilities (check my post in 'spam' which made monk abilities cost a ridiculous amount) even though i didn't edit those abilities at all, and also wants me to replace 00 with 00, which shouldn't be right at all
I've performed this once before, however i assumed i was at fault and tried again. the first time i went through this, i found myself replacing patterns in the data, like those columns of 41 in 03 or 0B, and that there was a really suspicious repetition of 11 22 every 12 bytes.

hopefully this clears up something
  • Modding version: PSX & WotL
""The only thing more hardcoded than FFT, is more FFT."
    - A wise man"
       - Talcall
  • Discord username: Talcall

Talcall

aww jees, I'm terribly sorry, I'm going to mark this as solved

turns out there was way more of a jump than i anticipated between the data, I'm terribly sorry if i caused any inconvenience

I just checked the offset with a hex calculator, and found out i need to go way further down the editor, I am terribly sorry, again
  • Modding version: PSX & WotL
""The only thing more hardcoded than FFT, is more FFT."
    - A wise man"
       - Talcall
  • Discord username: Talcall

Xifanie

What I'd like to know in the first place is why you're doing hex edits instead of just patching with FFTPatcher... Whatever it is you're trying to do, you might not have the best solution in mind.
  • Modding version: PSX
Love what you're seeing? https://supportus.ffhacktics.com/ 💜 it's really appreciated

Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

Talcall

because I also want to edit the Formulae 0A, 0F, and 10, which the patcher doesn't cover, so i may as well compile it all into the same coherent asm hack anyway. it's much neater on my file space
as well as this, many story encounters will need to be edited so that i don't have a class unable to use rods using rods, or a class that can't use bows using bows.

I'm using the patcher as a tool, as well, to become more familiar with asm coding. this is something i just needed to learn, always be 100% certain i know what I'm doing is right.
  • Modding version: PSX & WotL
""The only thing more hardcoded than FFT, is more FFT."
    - A wise man"
       - Talcall
  • Discord username: Talcall

Xifanie

.xml hacks take way more space than the .fftpatch format, so if file size is a concern, you're going the wrong way... not that it would matter since if you can hold a FFT image on your drive, these files' sizes would be insignificant. Not only are you making your own life way more complicated, but it will also be a massive amount of trouble to go back and edit anything.

Plus if you really wanted to 'ASM hack', which I'm guessing you mean patching with FFTOrgASM, you can just set the offset type to memory and ditch the leading 3/8 on the gameshark codes. Still, I would really recommend that you forget about manually hex editing unless you're doing something like testing an ASM hack before making an .xml out of it, and not hex editing stuff FFTPatcher can already patch. Even then, the scenarios where this is practical are very limited.

You could code a tool to parse the ENTD data, cross-verify it with the job data, and show which units have something equipped they shouldn't have. Honestly I'm not sure what else you could do... besides manually checking every unit through FFTPatcher's ENTD tab, which would be a pain in the ass.

FFTPatcher can only edit defined tables of data, it won't help you learn ASM whatsoever. I'm confused by your statement.
  • Modding version: PSX
Love what you're seeing? https://supportus.ffhacktics.com/ 💜 it's really appreciated

Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

Talcall

the file size, my apologies, i meant file organisation. If i have all the hacks in one place and the games in the other, i feel it's more organised that way.

and I thought the patcher doesn't generate gameshark codes for ENTD data? It's why i haven't really gone through that...

As for making my life way more difficult than it needs to be... maybe! But the mod I just made came with it a sense of gratification. and maybe less "learning" but certainly becoming familiar with the game's code, at least. familiarity makes learning much easier.
  • Modding version: PSX & WotL
""The only thing more hardcoded than FFT, is more FFT."
    - A wise man"
       - Talcall
  • Discord username: Talcall