• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
June 17, 2024, 12:41:51 pm

News:

Please use .png instead of .bmp when uploading unfinished sprites to the forum!


Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Doval

1
@RavenOfRazgriz: Thanks! That all makes sense.

@Pickle Girl Fanboy: Pride says his code works. I haven't confirmed it myself yet, so give it a shot and see what happens.

If someone could answer this particular question I'd be very grateful!
QuoteWhat do I do when I want to insert so much ASM that it's impossible not to overwrite code I need? Obviously I would need to put the code somewhere else and add jumps to and from it in Battle.Bin, but...where do you put it?
2
All right, so far so good, I've understood everything the both of you have thrown at me. Haven't had much time to play around with the patched ISO but I figure I might as well ask this now because I know it's going to come up:

What do I do when I want to insert so much ASM that it's impossible not to overwrite code I need? Obviously I would need to put the code somewhere else and add jumps to and from it in Battle.Bin, but...where do you put it?

While we're at it, what are the precautions and I need to take when patching code in various ways? My goal is have FFT Complete with most of the Japanese/WotL differences (increased JP costs, higher job unlock requirements, nerfed SMN, etc) and a couple of my own ASM hacks (like the bare hands nerf.) That means applying a combination of PPF-o-Matic (for FFT Complete), FFT Patcher (for the easy value changes), TacText (to fix job and spell descriptions after I change their values) and FFTorgASM (for my own ASM code.) That's a lot of patching and I don't know if some parts need to be done in sequence or if most of the changes are independent of the rest.

When I was looking into FFT Complete I read that PPF patches should only be applied to clean ISOs, so that's always going to be the first in the patching process. FFT Patcher seems to be able to patch a "dirty" ISO without trouble - presumably because it's not adding new code, only altering values - so no problem there.  Is it safe for me to assume that whatever I do in TacText targets completely different pieces of code than most ASM hacks? I.e. I can apply TacText patches and ASM hacks in any order as long as my ASM code isn't overwriting necessary code?
3
Oh wow, I'm totally blown away. There's no way in hell I could've figured all of this out on my own. I've still got some questions, but I've got the gist of it now.
QuoteNow you'll notice at 0x00185ad8 the attacker's current PA is being loaded, so we'll have to load the original value on our own and rewrite a bit of this ugly code to save space and the trouble of jumping to a different section of battle.bin.
Don't you mean at 0x00185ad4? 0x00185ad8 says MA on the code comments.
Quote00185aec: 3c0251eb lui r2,0x51eb

This will work because the code above it we will need since its beginning the multiplication we'll use. And now to write our own.
So basically, you chose this point because that's when the formula stopped being redundant with our own, right? I.e. The calculations above that line were useful to us, but not the ones below. Another question: when we insert our own code at this point, are we literally inserting it at that position and pushing the rest of the code down, or are we overwriting the lines of code that were already there? Are there any special precautions I need to observe when inserting code into files?

Is this the correct way to put the code into MassHexASM? I.e. Little Endian checked and use the RAM offset? At least, that's how I got it to produce the same hex as what you posted. I find it strange that it would use the RAM offset and not the file offset. What about in FFTOrgASM? Would I use the RAM or file offset in the XML?

Thanks a lot to the both of you. You've been a tremendous help.
4
QuoteI'll assist you in writing it if you would like.
Yes, please. I'm still feeling a little lost. From your last post I understood that I need to edit Battle.BIN (which I would rip from the game using CDMage, right?) and that Battle.Bin is loaded into memory at address 0x67000 (and thus the offsets within Battle.bin = Memory Offset - 0x67000.) The file Battle.bin Data.txt seems to contain the ASM code inside of Battle.Bin along with some extra comments explaining the code, but not sure what to do with that yet. I could interpret the RAM->File part of Data locations.txt but I don't know what to make of everything below that. Looking at Main Formula Data.txt, I can see that this is the portion of Battle.Bin that contains the weapon formulas - I imagine the offsets in this file are memory offsets and not Battle.Bin offsets? As for SCUS RAM.txt, I don't know what this file has. The stuff about Allocated Space and the Kanji table went over my head as well.

That's about it...still not sure how to proceed from here. Thanks, by the way. I wasn't expecting such a quick reply. I really appreciate it.
5
Hi all, new member here. I'd like to hack the hell out of this game, but I'm finding it difficult to find the right information - it seems to be spread all over the forum and wiki. I've already read the Beginner tutorial to ASM hacking and ASM tutorial 2. I'm a computer engineering student so I was already familiar with Hex values, bitwise operators, assembly code, etc. So, I've got a good grip on writing ASM code, but...where do I start writing it?

As an example, I'd like to change the bare hands formula from:
PA * PA * Brave/100
to
PA * (Naked PA) * Brave/100
Where Naked PA is basically the base PA of the character without any equipment or stat-altering abilities. The basic idea is for equipment and Accumulate to increase bare fists damage linearly instead of exponentially by only affecting one instance of PA in the formula (similar to how Charge/Aim works.)

Right now I don't have the slightest clues what file I would be editing, what part of the file I'd insert my new ASM code into, and how I'd go about retrieving or calculating the Naked PA. The Formula Hacking article in the Wiki has this value: "0x0030 Original PA" which is probably what I'm looking for, but I don't know how to interpret that list of offsets and values. Please help! I just need someone to point me in the right directions - I'm willing to do my own homework.