Final Fantasy Hacktics

Modding => Hacking/Patching Tools => Topic started by: formerdeathcorps on May 14, 2011, 07:57:55 AM

Title: FFT Patcher .478 Source Code
Post by: formerdeathcorps on May 14, 2011, 07:57:55 AM
I know everyone's been waiting forever for this, so here it is.

This is the original from Melonhead for .478, errors and all.




NEWEST VERSION HERE:
http://ffhacktics.com/smf/index.php?topic=7163.msg212754#msg212754

-Elric
Title: Re: FFT Patcher .478 Source Code
Post by: Pride on May 14, 2011, 08:30:57 AM
What are some errors in .478? I heard that the propositions don't work but is there anything else?
Title: Re: FFT Patcher .478 Source Code
Post by: despa on May 14, 2011, 09:35:57 AM
thanks for posting this, fdc! :)
Title: Re: FFT Patcher .478 Source Code
Post by: Pickle Girl Fanboy on May 16, 2011, 06:33:44 PM
Thank you.
Title: Re: FFT Patcher .478 Source Code
Post by: formerdeathcorps on May 16, 2011, 11:42:42 PM
What are some errors in .478? I heard that the propositions don't work but is there anything else?

Let's see:
1) orgASM is reputed to fail (as in create bugged files).
2) TacText is reputed to fail (as in create glitched text).
3) My compilation of FFTPatcher doesn't load at all.
4) ShiShi's EVTCHR editor is half-done.
Title: Re: FFT Patcher .478 Source Code
Post by: Pickle Girl Fanboy on May 16, 2011, 11:44:20 PM
Did you do this manually, or with Subversion?  Can we download specific builds with Subversion?
Title: Re: FFT Patcher .478 Source Code
Post by: formerdeathcorps on May 16, 2011, 11:46:09 PM
Did you do this manually, or with Subversion?  Can we download specific builds with Subversion?

I have no clue what Subversion is.  All I did last April was take melonhead's .478 files from his online source folder, opened it up in my C# compiler, fixed enough runtime bugs so the thing would compile right (this took 2 nights of work), and then released it.
Title: Re: FFT Patcher .478 Source Code
Post by: Pickle Girl Fanboy on May 16, 2011, 11:49:49 PM
I just figured out what subversion is a week ago.  It automatically downloads source files from a specified location, and it can do other things too.  Hopefully, it can download specific versions.  Look into it, I'll be gone for another week, car still isn't fixed.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on September 10, 2011, 01:51:47 PM
So, I did a Subversion checkout of the FFTPatcher, etc code at the Google Code page for it. To clarify, Subversion is source control (like SourceSafe or TFS or what have you). It lets you check in files, check out files, all that sort of jazz, but we don't really need it for anything other than just doing an initial download of what's there.

I grabbed the top download here (requires registration, which is annoying): http://www.open.collab.net/downloads/subversion/
Then was able to open a command prompt and use the command shown on the "Checkout" part of the Google Code page, namely:
Code: [Select]
svn checkout http://lioneditor.googlecode.com/svn/trunk/ lioneditor-read-only (It'll create its own subdirectory for the code in the directory you ran the prompt in)

What's interesting about this is that there were only three compile-time errors, all relating to a certain parameter (Something to do with PSP info) not being passed in to various methods. I added those in and am getting running versions of everything (Patcher, ASM, TacText, SSE). Navigate to (Project)/(x86, if necessary)/bin/Debug to find the appropriate executables. Patcher's missing two tabs (Propositions and Animations); not sure why. SSE also appears to have been reworked to have its own change files (like .fftpatch?) that you just apply to ISOs?

I'll check it out, though the problem is that the current descriptions of problems (patching incorrectly, etc) are really vague and may be hard to track down.
Title: Re: FFT Patcher .478 Source Code
Post by: Cheetah on September 10, 2011, 04:03:31 PM
Continuing work on FFTPatcher would be incredible. Do you need a more organized effort of testing out this latest version and finding all the errors?
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on September 10, 2011, 05:01:36 PM
Hm. I actually suspect I've downloaded an old version; Patcher is showing v0.388. That would explain the missing forms, etc. I guess I need to find a new version. Not sure why I would have gotten an old version that way.

The problem is... I don't know where fdc got his files, and his zip seems to be missing some key components, or else I'm doing something terribly wrong. The build process is trying to find files that don't exist; I can't even get to the point where I could even try to build the code with those files.

If we could find a version to get started on, having some testing would, of course, be nice. That sort of thing never hurts. I'm basically just trying to get my bearings on this at this point though.

I suppose I'm going to try pasting the missing stuff from fdc's zip from the downloaded code into fdc's files and see where that gets me. Those files didn't seem like the type to really change ever (or were just text files), so hopefully they'll be the same, regardless of the Patcher version.

EDIT: I did get it to compile! I had to mess with a batch file, which hopefully didn't mess anything up! Patcher loads up okay, but calls itself v0.457. The current patcher is v0.478. Augh, is this another old version?

EDIT 2: Okay, melonhead's newest changes are in branches/imageEditorv2/ and not trunk/ which, I believe, is why I got the old version. I'll have to see what I can do with this.

EDIT 3: This seems to compile fine. Patcher=v0.457
Title: Re: FFT Patcher .478 Source Code
Post by: Cheetah on September 11, 2011, 04:19:13 PM
Excellent to hear that you at least have the newest version now. I would definitely throw a lot of resources towards improving FFTPatcher. You can count me in as a tester.
Title: Re: FFT Patcher .478 Source Code
Post by: RavenOfRazgriz on September 11, 2011, 04:44:42 PM
Excellent to hear that you at least have the newest version now. I would definitely throw a lot of resources towards improving FFTPatcher. You can count me in as a tester.

Most of the missing resources exist in my spreadsheets already, honestly.  Propositions, Shop Edits, etc. etc. etc.  It'd really just be translating all those into FFTPatcher.  It'd be nice to have everything in one place, sure, but it'd also put me out of a yob.  You really wanna put me out of a yob?
Title: Re: FFT Patcher .478 Source Code
Post by: Pickle Girl Fanboy on September 14, 2011, 06:15:20 PM
Most of the missing resources exist in my spreadsheets already, honestly.  Propositions, Shop Edits, etc. etc. etc.  It'd really just be translating all those into FFTPatcher.  It'd be nice to have everything in one place, sure, but it'd also put me out of a yob.  You really wanna put me out of a yob?
MAKE WAY FOR PROGRESS.  And besides, won't this leave you more time to work on, say, your patches, your non-spreadsheet editing tools, and your reverse-engineering projects?
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on September 16, 2011, 01:59:21 AM
Well... okay, I haven't done too much with this yet. I am starting to get a feel for the code here and there. I'm sorta interested in the current state of the stuff I have, though. (i.e. how it works, if things really fail). There's some weird discrepancies between what I've found and what FDC was saying, so I find that a bit odd. (I didn't have any compile-time errors to fix, FFTPatcher loads fine for me, etc). I don't have all the greatest test cases or what have you, so I figured I'd upload my compile in case anyone wants to test it and see what's working and what isn't.

Hopefully I've included everything needed. I took the Debug/ directories of each application's subdirectory; let me know if there are any more files needed to get these EXEs to run.

EDIT - The latest version is attached further down in the thread. Removing from this post.
Title: Re: FFT Patcher .478 Source Code
Post by: formerdeathcorps on December 07, 2011, 04:05:06 PM
Looking at this, all the tools work as they should, though I haven't yet tested orgASM.  If this version of orgASM works without bugs, we should have exactly one version of FFTP on the main site available for download which will include:

1) R999's 478 ShiShi
2) This version of FFTP with a modified Resources.zip (Melonhead actually removed the titles on a lot of names of flags that we already know about)
3) This version of orgASM, if it works.  Otherwise, it should include 457/466 orgASM.
4) This version of TacText, if it works.  Otherwise, it should include 457/466 TacText.
Title: Re: FFT Patcher .478 Source Code
Post by: formerdeathcorps on December 30, 2011, 06:02:39 AM
If I'm not mistaken, if we just fix the offset Patcher writes store inventory changes to, it should then work.

FILE: StoreInventory.cs
CHANGE:
                return Codes.GenerateCodes( Context.US_PSX, PatcherLib.PSXResources.Binaries.StoreInventories, this.ToByteArray(), 0x18D840, Codes.CodeEnabledOnlyWhen.World );
TO:
                return Codes.GenerateCodes( Context.US_PSX, PatcherLib.PSXResources.Binaries.StoreInventories, this.ToByteArray(), 0xAD844, Codes.CodeEnabledOnlyWhen.World );

The error melonhead made is obvious; he forgot to get the ROM address from WORLD.BIN RAM.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on December 30, 2011, 06:54:28 AM
fdc, I believe that method, GenerateCodes(), is actually for generating the Gameshark codes, so the RAM address, and not the WORLD.BIN file address, would be correct. Not sure why it's off by 4, though.

melonhead seems to refer to gameshark codes as "Codes" throughout the FFTPatcher source, and actually writing to the game files as "patches", so we'd need to look at the analogous method for "Patches", which seems to be GetPatches() (StoreInventory.cs:213), where we see:

result.Add(PatcherLib.Iso.PsxIso.StoreInventories.GetPatchedByteArray(bytes));
(StoreInventory.cs:223)

PsxIso.StoreInventory is of type KnownPosition, which is made up of sector, start location, and length (the constructor for this type of object takes arguments in that order), and defined like this:

StoreInventories = new KnownPosition( Sectors.WORLD_WORLD_BIN, 0xAD844, 0x200 );
(PsxIso.cs:100)

So it looks like it's already looking at 0xAD844 in WORLD.BIN for patching.
Title: Re: FFT Patcher .478 Source Code
Post by: formerdeathcorps on December 30, 2011, 07:44:38 AM
Are you sure this routine actually works though?  Because this feature has existed since v.457 and no one seems to be able to get it to work.  Furthermore, this is doing exactly what RAven's spreadsheet is.  And yet, that has no problems.  Thus, the problem must lie with FFTP.

1) Is there any checking mechanism between what is being patched and the GS Code?
2) Somewhere along the line, could he have mistakenly called "StoreInventories" as "StoreInventory"?  I see he has both defined in his code.

EDIT: Testing shows that it's not getting written to WORLD.BIN.
3) Is there something wrong with the write to ISO routine?
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on December 30, 2011, 03:05:47 PM
One of my first thoughts was that the Sectors.WORLD_WORLD_BIN constant could be set to the wrong number (It's set to 84261; I have no clue if that would be right or not, or exactly what it even means)... however, that same constant seems to be used for TacText and I'm pretty sure that patches WORLD.BIN properly.

So I'm not really sure what the problem is, but finding out that WORLD.BIN isnt getting patched should be really useful. I'll try running my copy of his code through my local debugger and see what I can come up with.
Title: Re: FFT Patcher .478 Source Code
Post by: formerdeathcorps on December 30, 2011, 03:37:13 PM
Glain, 84261 is the disk sector WORLD.BIN starts in.  That would mean WORLD.BIN starts at 0x0BD003F0 = 84261 * 2352 in the ISO, which checks out as correct.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on December 30, 2011, 04:27:37 PM
I think I fixed it.

There was a variable that determined whether or not any store inventory patches were made... but it didn't update properly, because the "Store Inventory" checkbox on the Patch PSX ISO form didn't have an event handler. I added it in and I'm getting results.

I'm attaching my new version of FFTPatcher. Let me know if it works (i.e. you can edit shop inventories with it).

EDIT - This is in the latest attachment. Removing from this post.
Title: Re: FFT Patcher .478 Source Code
Post by: Eternal on December 30, 2011, 04:37:19 PM
It works, I just tested it. Wonderful job!
Title: Re: FFT Patcher .478 Source Code
Post by: Dome on December 30, 2011, 04:39:38 PM
So...we can edit shops with the FFPatcher now?
P.s: For the love of god, please tell me you guys are not using a FFPatcher with WOTL names
Title: Re: FFT Patcher .478 Source Code
Post by: Eternal on December 30, 2011, 04:40:56 PM
No, it had Vanilla names. And yes, the shop function works in this- as does Propositions. I tested Props earlier with FDC.
Title: Re: FFT Patcher .478 Source Code
Post by: Dome on December 30, 2011, 04:41:59 PM
Epicly awesome
Even better would me combining every tool we have into one...but I think it's not possible >_>
Title: Re: FFT Patcher .478 Source Code
Post by: RavenOfRazgriz on December 30, 2011, 05:06:00 PM
Any other unworking features in .478 can we get to work?

May as well do 'em all now, and I'll cut everything that works out of my Workbooks.
Title: Re: FFT Patcher .478 Source Code
Post by: formerdeathcorps on December 31, 2011, 02:46:52 AM
I intend to submit this to Site Submissions, but before we do, can we please update the checkboxes and formula descriptions?  478 is in many respects worse than 457.  In other words, integrate the findings of:
http://ffhacktics.com/smf/index.php?topic=4714.msg105412#msg105412
http://ffhacktics.com/smf/index.php?topic=6538.0 (Just the formula descriptions)
http://ffhacktics.com/smf/index.php?topic=3092.0
http://ffhacktics.com/smf/index.php?topic=4554.msg103524#msg103524
into the formal descriptions of checkboxes on FFT Patcher.

I'll also soon give an picture attachment showing what I mean.
Title: Re: FFT Patcher .478 Source Code
Post by: formerdeathcorps on December 31, 2011, 07:43:35 AM
All right, here's the picture.

Title: Re: FFT Patcher .478 Source Code
Post by: Pickle Girl Fanboy on December 31, 2011, 08:28:59 PM
Requesting 2x zoom version for people with bad eyesight.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on January 01, 2012, 01:24:33 AM
All right, I made a few changes, namely:

* Updated flag titles so that they're like the post above, with my own changes in some places (in an effort to make things clearer). In some cases, if I had already renamed a flag and it was similar to what fdc showed in the image, I didn't change it.
* Redid ENTD descriptions. Many events were listed as the wrong ENTD, some were unlisted. Many names were too long and got cut off, so those were shortened.
* Updated formula descriptions to include evasion type.

I'm calling this "0.479" to differentiate from previous versions, even though it doesn't really correspond to an SVN check-in or anything like that. This is basically a candidate for what we could end up using for "0.479".

Anyhow, this should work the same as before. Hopefully this update makes things a bit clearer. I'm attaching it to the bottom of the post.

EDIT: Unattached rar file because it didn't include the needed DLLs; see my post below for the new version.
Title: Re: FFT Patcher .478 Source Code
Post by: Elric on January 01, 2012, 02:13:08 AM
I just downloaded this and it looks very nice already, it's very helpful to someone like me, where i have done alot with ENTD but nothing with abilities personally.
Also, I was wondering if you guys could add in the 2 missing flags under immortal in ENTD or the one under Has ??? Stats? I don't even know what these are personally, but I'm sure
they could be useful
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on January 01, 2012, 05:25:36 AM
Oops, I forgot to include the DLLs that it needs to run, so you might still see the old labels if you just run the program. Try this file instead; I've included the right DLLs in it.

EDIT - These changes are in the latest attachment. Removing from this post.
Title: Re: FFT Patcher .478 Source Code
Post by: RavenOfRazgriz on January 10, 2012, 05:34:44 PM
I've been using the .479 you posted to assemble Journey of the Five Chapter 1's battle system, Glain, and I noticed a few things -

1. You have two flags in the box with "Learn with JP (Player)" etc. labeled as "Requires Monster Skill" and "Uses Weapon Range."  Yet, these flags are never used in the entire game, not even on Monster Skill attacks or the Charge command, where they would be applicable.  How do you have any clue they do as you've written they do?

2. In the top box full of flags, you have the topright-most one labeled as "Longbow Attack", but again, it's never used once in the entire game.  How can we be sure it's for "Longbow Attacks", then, when Vanilla can't even natively make a Longbow-only Attack?

Or maybe I'm retarded and these flags are used somewhere I skimmed over, but I couldn't find any instances of any of them being used once.
Title: Re: FFT Patcher .478 Source Code
Post by: formerdeathcorps on January 10, 2012, 07:59:06 PM
I've been using the .479 you posted to assemble Journey of the Five Chapter 1's battle system, Glain, and I noticed a few things -

1. You have two flags in the box with "Learn with JP (Player)" etc. labeled as "Requires Monster Skill" and "Uses Weapon Range."  Yet, these flags are never used in the entire game, not even on Monster Skill attacks or the Charge command, where they would be applicable.  How do you have any clue they do as you've written they do?

2. In the top box full of flags, you have the topright-most one labeled as "Longbow Attack", but again, it's never used once in the entire game.  How can we be sure it's for "Longbow Attacks", then, when Vanilla can't even natively make a Longbow-only Attack?

Or maybe I'm retarded and these flags are used somewhere I skimmed over, but I couldn't find any instances of any of them being used once.

These are from SA's notes when he debugged part of the AI code.  These flags are unflagged on the skill table (SCUS), but are hard-code set when the skill has the necessary property and translated into the skill RAM table (BATTLE.BIN), which then affect the AI.
Title: Re: FFT Patcher .478 Source Code
Post by: RavenOfRazgriz on January 10, 2012, 08:26:35 PM
I see.  Okay then.  Good to know.  Then shouldn't they have like, DO NOT TOUCH labels or something on them, then?

Also, why the hell was Persevere renamed to "Channel"?  I had to open up .457 to see what the fuck that even was, and Persevere is still the better name since it's easier to understand what the skill actually does.  (Aka, I can read the word Persevere and know the effect persists.  I read Channel, and, um, think of a TV, honestly.)  I heartily request that one gets reverted.  The other renames are much better overall, but that one sucks.  Though, speaking of a rename, I'm surprised "Vertical Fixed" wasn't at least attempted at giving a more descriptive name, but I suppose the current one is decent enough once you see how its used.
Title: Re: FFT Patcher .478 Source Code
Post by: formerdeathcorps on January 10, 2012, 08:31:38 PM
Well, I could see the use for the "longbow range" flag since someone may want the AI to use a skill only from 3-7 range away (though the AI may try to overreach and hit units beyond its range if it stands at a higher elevation).
Title: Re: FFT Patcher .478 Source Code
Post by: RavenOfRazgriz on January 10, 2012, 08:42:31 PM
That last bit was what I thought too, main reason I suggested them having DO NOT TOUCH labels.  If the AI never targets outside its legal range from a higher elevation, though, I could see use for that flag.
Title: Re: FFT Patcher .478 Source Code
Post by: RavenOfRazgriz on January 10, 2012, 09:27:52 PM
Another thing I noticed: The "Normal Attack?" flag was renamed to "Counter", but Counter is tied to the Countergrasp flag (which was inaccurately renamed to only be "Blade Grasp").  For example, I can Counter the skill Steal Weapon, but it does not have the "Counter"/"Normal Attack?" flag checked, merely the "Blade Grasp" flag.  Last I recalled, "Normal Attack?" governed Hamedo, but Hamedo triggers on skills such as Weapon Break which do not have "Counter"/"Normal Attack?" flagged - and it should be obvious that I can Counter these skills as well.

So please, rename "Blade Grasp" back to "Countergrasp."  I think that "Normal Attack?" is pretty much the correct name for that flag - the only skills that use it are the two we know govern the Attack command in some way. (Those would be the topmost skill, and bottommost skill that's directly above Potion.)  How this flag affects those skills, I do not know, but my theory would be that it tells the AI that those skills are legal for use within the Attack Command?  I tried to edit the Attack command to contain skills many eons ago and failed because the AI wouldn't use them, but none of the skills had "Normal Attack?" flagged.  Then again, I also couldn't flag it, as I was attempting to do this with the Charge skillset.  But still.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on January 10, 2012, 10:39:43 PM
We may need to think about some of these labels a bit, because in some cases the original names didn't make any sense either.

"Normal Attack?": This is fine, except I'm trying to avoid question marks, but we could use "Normal Attack" or keep "Normal Attack?" if there's really nothing better.

"Countergrasp":
Affected by Blade Grasp as the counter ability?
Having Blade Grasp equipped causes a counter strike?
Counters Blade Grasp with a counter strike?
Can't be affected by Blade Grasp, because the ability counters it?
Who knows!

Any way to make this better? Are Counter and Blade Grasp the only abilities affected? "Counterable" is really vague but we don't have much space. Maybe we need a tooltip or something. Or "Counterable (ALSO BLADE GRASP)" :)

"Persevere":
The only thing this flag name suggests is that you would continue charging the ability even if you get attacked. However... that's how all abilities work (Attacks don't interrupt you; you just take more damage). I tried changing it to "Channel" because at least an ability being flagged as channeled would imply that it uses up your action... however, as you say, that label still isn't necessarily great at describing what it does. I contend that "Persevere" is worse ("I had to persevere through the adversity of having turns in order to keep charging/channeling my ability?" I would never guess that it means that).

Continuous? Perform? Performing? Continue Through Turns? I played around with "Skip Turns" but it's ambiguous whether it skips the caster's turns or the target's, and in what situation. I don't know... we should be able to find something that makes sense here.
Title: Re: FFT Patcher .478 Source Code
Post by: formerdeathcorps on January 10, 2012, 10:53:22 PM
Persevere = Performing because that's what that flag does.  It changes a charged attack into a performed one.

Countergrasp is affected by the following:
Counter
Blade Grasp
Counter Tackle
Brave Up
Dragon Spirit
Sunken State
This is the information from the Battle Mechanics Guide by Aerostar.
Title: Re: FFT Patcher .478 Source Code
Post by: RavenOfRazgriz on January 11, 2012, 12:57:54 AM
I would leave it as "Normal Attack?" until more thorough research is done.  It's stupid to give it a name that sounds like we /know/ what it does when we very clearly don't have the full low-down on it yet.

Continuous pr Performing is fine for Persevering.  I prefer Continuous since it can be used on things that aren't actually a performance. (Aka, aren't Songs/Dances or even remotely related to them, you can have continuously-triggered weapon or magic attacks.) I still find Channel to be the worst name, though.  I can simply reverse your example - "I channeled magic and cast my spell through my foe's attacks."  At least Persevere is a synonym for Persist, whereas Channel is very much implied to be magic-only if you're read up on nerdy magic lore at all or is otherwise worthless.  It's too narrow and implies many things it shouldn't, like that it only works on magical skills, assuming you can even figure out what it is without cross-referencing it somehow.

Countergraspable is also fine because it's basic FFT slang - if you've ever read the Battle Mechanics Guide, you'll know the term, and know it refers to whether the ability is affected by the Reactions Counter Tackle, Counter, and Blade Grasp / Shirahadori, and whether the Reaction can trigger Dragon Spirit / Dragon's Soul, Sunken State / Vanish, and Brave Up / Bravery Boost.  The term Countergrasp is taken directly from the Battle Mechanics Guide and even got its own section in said guide, posted here:


If you haven't even read the Battle Mechanics Guide... I can't expect you to be able mod the gameplay aspect of FFT competently, honestly.  It contains basic info on a lot of Formula and other-related stuff that most people here will assume you know or easily know how to look up as a baseline when modding.
Title: Re: FFT Patcher .478 Source Code
Post by: Pickle Girl Fanboy on January 14, 2012, 04:51:43 PM
At least Persevere is a synonym for Persist...
Why not use "Persists"?
Title: Re: FFT Patcher .478 Source Code
Post by: Eternal on January 14, 2012, 04:56:14 PM
Why can't we stick with Persevere? Everyone knew what it did.
Title: Re: FFT Patcher .478 Source Code
Post by: formerdeathcorps on January 14, 2012, 04:58:23 PM
Raven, you're missing my point.  Flagging "perform" flag causes the unit to gain "performing" status.  This status is different in vanilla FFT than "charging" since you don't take 1.5x damage when "performing".  Hence, it doesn't make much sense to give that flag any other name.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on January 14, 2012, 09:26:45 PM
I want to move away from Persevere because it isn't clear. I certainly didn't know what it meant.

If everyone knew what it did, then it was because everyone just memorized it, and in that case, it doesn't matter what the label is anyway. It might as well have been called Flag 22 or something.

We can't make any progress if we shy away from changing things because people memorized the old ways.

EDIT: For the record, I like "Performing" because of what fdc is saying.

Also, is the "Countergrasp" term really well known? Not sure how many people have really read the BMG. I'm okay with it if so. Counter/Grasp maybe, but it still doesn't show everything. I'll try adding a tooltip to it maybe to show all the things it affects.
Title: Re: FFT Patcher .478 Source Code
Post by: Pickle Girl Fanboy on January 14, 2012, 09:40:09 PM
Does countergraspable refer to "When flagged, this ability triggers reactions dependent on HP damage"?  And, if anyone cares about my opinion, then FDC is right, it should be "Performing".
Title: Re: FFT Patcher .478 Source Code
Post by: RavenOfRazgriz on January 14, 2012, 09:48:13 PM
Does countergraspable refer to "When flagged, this ability triggers reactions dependent on HP damage"?

Look at the spoiler in this post (http://ffhacktics.com/smf/index.php?topic=7163.msg164333#msg164333), PGF.  You obviously read this post once since you replied to my response to Glain...



Performing is fine.  I wasn't saying it was wrong - it's right for the reasons FDC listed.  I just prefer "Continuous" because it shows the skill is continuous, and that the flag works on anything, and not just a "performance" skill like Singing or Dancing.  Yes that's a weird way to look at people but that's how your average shmoe who knows nothing about code could easily see it.  I'm fine with either label though, really.

Like I said, Glain, modding without reading the BMG sounds like a terrible idea.  If you don't know how things work, how can you mod it?  If you can add a tooltip, though, that'd be fine.  Just name it CounterGraspable and have a tooltip pop up if you hover over the name for a minute or something, I dunno.  The only one Reaction I ever forget is Countergraspable is Brave Up though, myself, simply because I always expect it to be in parity with Faith Up.  (And hence, my request to you in your ASM thread.)
Title: Re: FFT Patcher .478 Source Code
Post by: Pickle Girl Fanboy on January 14, 2012, 10:04:05 PM
Look at the spoiler in this post (http://ffhacktics.com/smf/index.php?topic=7163.msg164333#msg164333), PGF.  You obviously read this post once since you replied to my response to Glain...
I was surprised by that, and I wanted verification, but I decided to be a little sneaky about it.  I thought the "bonus" reactions were separate from the "damage-enemies" and the "evade-attacks".
Title: Re: FFT Patcher .478 Source Code
Post by: RavenOfRazgriz on January 14, 2012, 10:11:19 PM
They're not.  What the Reaction does is irrelevant to the trigger.  There's several triggers:

Counter Grasp (Counter, Blade Grasp, etc)
Counter Flood
Counter Magic
HP Damage (Caution, Regenerator, PA Save, MA Save, some others)
Affected by Attack/Skill (Faith Up, maybe others)
Affected by Specific Formula (Catch, Finger Guard)

[Uncertain] Weapon Ranged Skill (Hamedo)

Then there's Distribute and maybe one or two others I missed with very weird and unique trigger conditions.  As you can see, what the skill does really isn't related to how it triggers.  There is no "Adds Status to Self" grouping or anything like that.
Title: Re: FFT Patcher .478 Source Code
Post by: Pickle Girl Fanboy on January 14, 2012, 10:21:57 PM
My last off-topic post: I bet the asm for triggers, and R/S/M's in general, is royally screwed up.
Title: Re: FFT Patcher .478 Source Code
Post by: RavenOfRazgriz on January 15, 2012, 12:40:02 AM
Hey Glain, you're the cool guy whose able to get .478 compiling correctly.  In FFTacText, it has a QuickEdit function that edits areas that appear many times over in files... but it's missing some key areas like Unit Name, Help Window editors, etc.  If I can assemble the titles of those windows and all the different files they appear in, would it be possible for you (or FDC, but he's busy enough with the ASM shit) to add QuickEdit options to FFTacText for these missing things so that trying to edit things like the tooltip that comes up when you press Select on a unit's Party Roster Number or the Unit Name List and stuff without it taking years.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on January 15, 2012, 03:58:16 AM
I'm sure it's possible... but I'll have to figure out how QuickEdit works first. I'll take a look at that while I make the edits to the flag names, etc., and see what I can do. It doesn't hurt to make the list regardless, because I'm sure I'll figure it out eventually.

EDIT: For flag names, I'm going with "Normal Attack?", "Performing", and "Countergrasp" and just hope people read the BMG. Can't do Countergraspable; it's inconsistent with things like "Counter Magic" and "Counter Flood" and I can't get those to sound right no matter what I do ("Affected by Counter Magic" is too long, etc, "Counter Magicable" is just... what?).

EDIT: I've also got ability IDs preceding ability names, like "015E Grand Cross"
Title: Re: FFT Patcher .478 Source Code
Post by: RavenOfRazgriz on January 16, 2012, 01:13:36 PM
EDIT: I've also got ability IDs preceding ability names, like "015E Grand Cross"

Means redoing my Resources.zip for Abilities, but damn that's more useful than you realize.  (When Event Editing, you play an Effect by calling its Ability ID, not its Animation ID.  Having the Ability ID right there to look at when sifting through your skills for the one you want to play will help so much when Event Editing.)

Those flag names sound fine, too.  I'll try to get that QuickEdit list stuff to you tonight.  I've been busy doing a lot of FFTPatcher work for Journey of the Five, but I'm switching over to doing Spell Quotes tonight so I'll look up all the stuff you'll need to update the QuickEdit list before I get started on those.
Title: Re: FFT Patcher .478 Source Code
Post by: RavenOfRazgriz on January 20, 2012, 05:56:18 AM
I'm posting that stuff about FFTacText now.  I'm going to put the name of the field in quotation marks, then list every file the window is listed under.  This will also include every file only listed in one window, since honestly, QuickEdit should allow you to edit all the text in the game without jumping between files hunting for shit.  Whether you feel that way as well or not, I do not know, but everything will be here regardless.



































There you go.  Personally, I feel that the Text dropdown should BE the QuickEdit menu, and all this stuff should be what you get to choose from instead.  Since there's a lot of items, maybe group them into several obvious and intuitive quickedit groups, so you pick a group, then find what you need to edit off that list.  Either way, this is all the info, do with it as you will.


Also, for .479 FFTPatcher, can you please list the Item ID of an Item/Weapon/etc next to an Item/Weapon/etc in the same way you listed Ability IDs?  Having that info at a glance would be amazing for Event Editing, since you need to know Item IDs to assign Temporary Weapons.  It's on the Wiki, but it's stupid to have to go a million places for things that should all be contained in one place, and the Wiki's much harder to make use of if you're changing lots of weapon names and such.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on January 21, 2012, 04:19:52 PM
I've got item IDs in there now.

I've spent a while trying to figure out why it was generating Gameshark codes for Propositions even when nothing was changed. There's this concept of "buggy level bonuses" that keeps being referenced, and a bit value to say whether or not the level bonuses are buggy in the ISO? It was set to true, which made the values different from the ones it thought of as the defaults, so it generated the Gameshark codes to change them; setting the flag to false makes the codes disappear.

It just seems weird. Am I missing something by just setting that flag to false and being done with it? The code's got a bunch of branching decisions based on whether or not that "buggy level bonuses" flag is set and I have no idea what it's all about.
Title: Re: FFT Patcher .478 Source Code
Post by: Pickle Girl Fanboy on January 21, 2012, 08:30:07 PM
Could you post the code?
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on January 21, 2012, 10:05:50 PM
Er... I pretty well have to post the whole document it's in; it's sprinkled throughout. If you really want it:


Sometimes it's referred to as brokenLevelBonuses. Note this line:

Code: [Select]
int levelBonusesOffset = brokenLevelBonuses ? 0x9B4 : 0x9D4;

So if brokenLevelBonuses is true then it looks at the wrong offset (0x9B4) instead of the right one (0x9D4). I don't get it.

I changed a true to a false in FFTPatch.cs to eliminate the unnecessary Gameshark codes generated (to this):

Code: [Select]
Propositions = new AllPropositions( PSXResources.Binaries.Propositions, PSXResources.Binaries.Propositions, false );
Title: Re: FFT Patcher .478 Source Code
Post by: RavenOfRazgriz on January 21, 2012, 10:31:40 PM
I'd just switch it to false and call it a day, myself.  It's highly likely that it was supposed to be false and melonhead derped it.

Also fixed that derpy typo in my previous post.  Good to hear that you have Item IDs in there now, though.  Hopefully you come through on fixing up FFTacText to be less of a piece of shit, too.  Would make life amazing.
Title: Re: FFT Patcher .478 Source Code
Post by: RavenOfRazgriz on January 23, 2012, 02:12:16 AM
Looking at the Status section now.

"Status Ignored if Mount" doesn't always display the full name.  Shorten it to "Mounting Ignores".  Same with Cancelled by Immortal, shorten it to "Immortal Cancels".  Reduce Target Priority could also trim a character and just be "Lower Target Priority?".  That last one's a bit OCD, but when I click it, a few chars off the end disappear, so shortening it as much as possible is still important.

Also, FDC, I thought you'd figured out a few more flags than this?  Huh.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on January 26, 2012, 04:01:34 AM
Re: The TacText stuff: It sounds like a really good feature to be able to get all that stuff into QuickEdit. It seems melonhead controlled this with an XML file... however, there are no good examples for me to work off of for some of the sections I'm going to have to put in there. I think I can make a pretty good stab at getting it right, but I'm going to be guessing in a lot of places and it sounds nightmarish to test. I'll get something put together before too long and upload so people can look at it, I guess. Here's hoping?
Title: Re: FFT Patcher .478 Source Code
Post by: RavenOfRazgriz on January 26, 2012, 04:05:49 AM
Hoping indeed.   I used the names of the menus inside the program to try and minimize guesswork, but I'm gonna guess they don't correspond to that XML file at all.  Heh.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on January 26, 2012, 12:44:06 PM
It's not so much that as it seems generally the names are right, but QuickEdit basically wants (file, section, offset, length) for everything being edited, and some of the sections have no offset specified whatsoever (so what is it? 0? better hope that guess is right), for example, and don't even look like other XML sections, specifying different attributes altogether.
Title: Re: FFT Patcher .478 Source Code
Post by: Choto on February 19, 2012, 02:50:39 PM
I noticed that theres a set of ability AI flags that was left out of the patcher:

0x07 - AI Behavior Flags 4?
      0x80 - Usable by AI
      0x40 - Cannot Target Enemy?
      0x20 - Cannot Target ally?
      0x10 -
      0x08 -
      0x04 -
      0x02 -
      0x01 - Can use physical Reactions?

the blank flags are not used in any skill, and may be hijacked to make custom AI behavior :). These are SA's notes, and with a quick scan of ability memory they seemed to be accurate. The only one i'm not sure about is 0x01, only because i didn't investigate exactly which abilities flag it.

Edit: Just saw where you implemented them in .479, although what/where is the 0x01 flag in .479?
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on February 29, 2012, 12:38:45 PM
Everything should be in order from where "Used by AI" starts, going from 0x80 to 0x01, so it's the bottom flag in the box that we have labelled as "Evade with Motion", which I believe is more accurate. "Can use physical reactions" sounds like the Countergrasp flag in the bottom section.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on March 24, 2012, 04:27:07 AM
What does everyone think about this version of FFTactext?

EDIT - This is in the latest FFTPatcher 0.479 attachment. Removing from this post.
Title: Re: FFT Patcher .478 Source Code
Post by: formerdeathcorps on March 24, 2012, 04:28:10 AM
What did you change?
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on March 24, 2012, 04:29:37 AM
Quick edit. Everything (basically) is now in there, and it's the default.

(Amazing response time, by the way.)
Title: Re: FFT Patcher .478 Source Code
Post by: Eternal on March 24, 2012, 04:30:11 AM
My body isn't ready for this!
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on March 24, 2012, 08:12:48 PM
All right, I'm releasing the current 0.479 suite. This should include all the edits to Patcher and Tactext.

The only thing I think we need at this point is to get all the ASM hack XML files together. I went to this thread (http://ffhacktics.com/smf/index.php?topic=8301.0), found the ones that seemed relevant, and put them in, with two new XML files (Assorted.xml and Pokeytax.xml) and I also grabbed Choto's mighty sword hack and added Choto.xml. I also added mine as Glain.xml. I don't have fdc's or the ones he'd been gathering, though... although all it amounts to is that we'd just have to add them to this archive.

I don't have whatever crazy version of Shishi was modified without being added to melonhead's source. We might want to get that code in the current project at some point. As such, the version of Shishi here is the normal melonhead 0.478 one.

Anyhow, here it is.

EDIT - 0.481 attached below... no need for this attachment.
Title: Re: FFT Patcher .478 Source Code
Post by: formerdeathcorps on March 25, 2012, 01:39:00 PM
Can you release the source code of your latest version as well?  (By the way, even though we're nowhere close to the maximum thread size limit of 48 MB, we probably should only release the source code on this thread of the latest version and the original we got from melonhead.  No need to clutter the place.)
Title: Re: FFT Patcher .478 Source Code
Post by: formerdeathcorps on March 25, 2012, 03:50:58 PM
Guys, since the "normal attack" flag is only flagged for the "Frog Attack", is it possible that's the flag that tells you if a move can be used while frogged?  (Of course, frog also whites out your skillsets so I'm not sure flagging Cure or Fire would work unless those skills were moved into the skillset called by frog.)
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on March 25, 2012, 11:06:35 PM
I made some more updates to the code, notably, FFTorgASM should now allow multiple byte variables (up to 4 bytes) by specifying the "bytes" attribute (lowercase) in a <Variable> tag. I discussed this with fdc yesterday on IRC.

I created a new Google Code page at this location (https://code.google.com/p/fftpatcher-mod/) and checked my latest version of the code in to it. You should be able to check out the code with Subversion. (I mention how I did it for the original project here (http://ffhacktics.com/smf/index.php?topic=7163.0#msg155025). Replace "lioneditor" with "fftpatcher-mod".)

I believe the first ability (0000) also has "Normal Attack?" flagged.
Title: Re: FFT Patcher .478 Source Code
Post by: formerdeathcorps on March 26, 2012, 12:40:46 AM
Quote
I believe the first ability (0000) also has "Normal Attack?" flagged.
Yeah, it does, sadly.

Another orgASM feature request: defaults.  Currently, all variables are set to zero when you open orgASM.  I want the XML file to be able to specify that a given variable defaults to a non-zero value when orgASM is opened.  With this and the ability to set words in our data structures, I should be able to eradicate any advantage of spreadsheets over orgASM except on the largest hacks.

Overall, Glain, what you've done for FFT Patcher is great.  Thanks for your work!
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on March 26, 2012, 12:58:06 AM
Thanks!

Default values should already be possible! Just specify a "default" attribute in your <Variable> tag. I noticed this functionality when going through and modifying the code.

EDIT - Though I may have to modify them to allow multiple bytes.

EDIT - Nope, I don't. It just works. Nice! \o/ ...Er, I mean... of course I spent tons of time making that work! (<_< ) (>_>)
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on April 01, 2012, 10:40:03 PM
I took fdc's version and my new compiled version (and fixed a bug) and compiled them into... 0.481! Even labels itself as such!

I separated out some of the edits to my hacks that fdc did into a different XML file (fdc_mod.xml) because they were too different from each other to really be the same hack. Both versions are selectable in those cases.

I also added R999's Shishi to the project. I don't like that it's a black box though. We need the source of it...
Title: Re: FFT Patcher .478 Source Code
Post by: formerdeathcorps on April 02, 2012, 04:16:09 PM
Your Signed Y hack would mean Fa_(MA + Y) can't take values greater than 127, which removes vanilla functionality for a variety of status magic.  That (and removing signed Y for fire / correctly setting the +/- stats for formulas like Yell) was the reason why I "fixed" your hack in the first place.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on April 02, 2012, 05:08:32 PM
Actually... no, I don't really understand. The only way sign extension on a byte load could change the value of the resulting register is if the value was > 127. These are the affected vanilla abilities:

00C5 Speed Ruin (Y=250)
00C6 Power Ruin (Y=250)
00C7 Mind Ruin   (Y=250)

I don't see any others. What's all this about fire, and stat increments becoming decrements, etc? Are you saying that the Y value (0x801938fa) gets overwritten in a formula (to suddenly be > 127 when it wasn't originally), then loaded in as a signed value?
Title: Re: FFT Patcher .478 Source Code
Post by: formerdeathcorps on April 02, 2012, 06:37:11 PM
Let's say someone makes a fire spell with Y = 130.  After all the stat multipliers, they have 5 MA.

5 * 130 unsigned = 650 (even with mult rather than multu)
5 * 130 signed = 5 * -126 (mult) = 5 * 0xFFFF FF7E (mflo) = 0xFFFF FD76 (sh as damage) = 0xFD76.  In the HP subtraction phase, the halfword is processed so it cannot be negative (andi 0x7FFF so it becomes 0x7D76) and then the minimum is taken between it and 999 (meaning the final HP damage is 999).  Thus, loading signed values on Y for attack formulas like Fire or Choco Meteor can cause inaccurate results.

Furthermore, making Y signed or unsigned has no effect on the status +/- formulas because in every stat change formula exists a line (andi 0x007F or ori 0x0080) that forces the result to be positive or negative.  All numbers above 0x80 constitute +Stats and all numbers below 0x80 constitute -Stats, but it doesn't follow sign conventions in that 0x81 means +1 Stat and 0x01 means -1 Stat.  My revision addressed this fact by deleting the force-fit line of code.  Of course, my revision does not work well with vanilla defaults (since you'd then have to change accumulate / yell / cheer up / scream / gather power by adding 128).

As for status formulas, that was a bad accusation on my part.  I forgot that the status formulas are MA + X, not Y.
Title: Re: FFT Patcher .478 Source Code
Post by: Choto on April 03, 2012, 01:50:57 PM
Hey Glain, 2 things

the Mighty Sword has XX% chance to break appears in the Razele file as well as the Choto file. It's also got a bug, FDC found a bug in it a lil while ago, here's a fixed version:



Also, I'm not sure if there's a death counter edit hack around but i thought some patches used it. Could you include that one in there if its floating around? Thanks!
Title: Re: FFT Patcher .478 Source Code
Post by: formerdeathcorps on April 03, 2012, 10:14:35 PM
Choto, that's because I overrode Razele's original.  Your version is better.  As a result, Choco.html does not need to exist since its data was incorporated into a larger file.  As for the bug, I incorporated the fixed version on Razele's (as well as another little tidbit), but it's probably not fixed in Choto.html since Glain probably just added my files of the .480 build to the files of his .479 build.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on April 03, 2012, 10:22:59 PM
There was a Choto.xml in your archive (FFTPatcher480.rar), fdc. D:

I'm trying to keep the hacks in the correct xml file with the actual author. I figure if someone has a problem/suggestion regarding one, they can find the XML file it's in and contact the person.

...Well, that won't work with some people because they aren't around anymore, but I figure it at least makes sense. That's one of the reasons I wanted to separate out the edits you made to my hacks into an XML file, because it had changed them enough that I didn't understand what they were doing anymore and I couldn't answer for them (and I want to be able to for everything in my XML file). I could be nuts... it just seemed reasonable to me.

So my vote would be to move the fixed version to Choto.xml and take it out of Razele.xml.
Title: Re: FFT Patcher .478 Source Code
Post by: formerdeathcorps on April 03, 2012, 10:36:25 PM
There was a Choto.xml in your archive (FFTPatcher480.rar), fdc. D:
Oops.  Sorry for blaming you there.

I'm trying to keep the hacks in the correct xml file with the actual author. I figure if someone has a problem/suggestion regarding one, they can find the XML file it's in and contact the person.

...Well, that won't work with some people because they aren't around anymore, but I figure it at least makes sense. That's one of the reasons I wanted to separate out the edits you made to my hacks into an XML file, because it had changed them enough that I didn't understand what they were doing anymore and I couldn't answer for them (and I want to be able to for everything in my XML file). I could be nuts... it just seemed reasonable to me.

So my vote would be to move the fixed version to Choto.xml and take it out of Razele.xml.
Problem is, if we did that, Razele.xml would literally have nothing left because this contrasts with how I edited the hacks.  If you look closely at any of the 457 FFTP files, you'll see hacks by FFM, me, or Pride mixed in with edited versions of code made by Xif, nates, or Razele.  These edits were done to increase the number editable bug-free features so I had to merge similar hacks.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on April 03, 2012, 10:43:30 PM
Hmm... I see. No problem. That seems to work. Either way is fine.

I think I found another problem with a Razele hack. "Require Sword - Require Weapons" is editing BATTLE.BIN, but it's supposed to be SCUS.
Title: Re: FFT Patcher .478 Source Code
Post by: formerdeathcorps on April 03, 2012, 10:47:25 PM
Yeah, that's me being dumb.  Feel free to fix that and re-upload 480.
Title: Re: FFT Patcher .478 Source Code
Post by: formerdeathcorps on April 04, 2012, 06:57:39 PM
All right, I think I found my copy of R999's Source Code changes.
Title: Re: FFT Patcher .478 Source Code
Post by: Eternal on April 05, 2012, 08:16:43 PM
Glain, could you put the ID -after- the skill/item name? It makes it hard to type things in if you don't know the hex for everything.
Title: Re: FFT Patcher .478 Source Code
Post by: RavenOfRazgriz on April 06, 2012, 02:16:06 AM
Glain, could you put the ID -after- the skill/item name? It makes it hard to type things in if you don't know the hex for everything.

You would need to widen the listboxes considerably for this, else the hex would be pushed off the page and be useless.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on April 07, 2012, 01:39:22 AM
I think I can alter the listbox itself to change what the type-ahead does. I don't really want to put the hex to the right because it breaks the convention.

I put in the R999 changes to Shishi. From what fdc uploaded, I took the two that seemed the most current/correct (there were three sets of the same two files), and imported them into the project... however, that only got me some of the functionality. I had to do a few things myself to get things to the same point. Not sure why that is but it seems to work now, so future Shishi versions should have those features (Quick reimport with Ctrl+R; frame numbers don't change when changing sprites).



I also did something... interesting with FFTorgASM. I've been importing some of my MHA code into the FFTP project... Now why would I do that? I present... an epic tale of patching ASM!

Here's a hack I'm going to have in my XML file. This is a bit different from a previous hack because it checks item type instead of item number... but what's interesting is the way it looks in the XML:


Heh heh. As for the pseudoinstructions here (li and move), so far I'm only allowing them if they map one-to-one to an instruction, but I may put in support for multi-instruction ones. You can also safely assume variables are patched in after the code itself, so you can write code and then just overwrite it with the variable, instead of trying to fool with the <Variable> and <Location> tags so they match up exactly, as I do here.
Title: Re: FFT Patcher .478 Source Code
Post by: Pride on April 07, 2012, 02:36:40 AM
/me opens spoiler and reacts
(http://i221.photobucket.com/albums/dd289/Pride_Nick/Al-bundy-ed-oneill-animated-gif-2.gif)

Also the inventory section in the patcher does not work, would you be able to fix this?
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on April 07, 2012, 03:26:23 AM
D:

I thought I fixed that a few months ago (the posts are earlier in this thread). Is it back to not working somehow or are you just not using one of our newer versions?
Title: Re: FFT Patcher .478 Source Code
Post by: Pride on April 07, 2012, 04:20:02 AM
I must not be using a newer version... I'll double check later

Edit: It works I must have accidently patched with .457 or something. :x Sorry for the scare
Title: Re: FFT Patcher .478 Source Code
Post by: Kourama on April 10, 2012, 12:34:33 PM
Will most of the FFT Patcher changes you have made work in WotL?

Also Eternal was nice enough to supply me with a copy of his .fftext file for WotL KO because of the restrictions to patching the WotL version. Is there a way to add an option to FFTactext to remove the kanji code for the PSP version?
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on April 10, 2012, 03:31:35 PM
The PSP version doesn't have the expanded QuickEdit for TacText, at least as of yet. Adding it in would basically consist of mindlessly editing an XML file. If anyone's interested I can probably send the file and what you'd need to do.

I believe FFTorgASM hardcodes PSX values (locations of files in the ISO, etc) in a few places. Current ASM hacks don't work for PSP anyway.

Other than that, most changes should also apply to PSP. Pretty much every change to Patcher/Shishi should.

Is there a way to delete all the kanji? Probably... there usually is... but I might have to know each specific section that would have to be blanked.
Title: Re: FFT Patcher .478 Source Code
Post by: Kourama on April 11, 2012, 12:52:52 AM
Good to know. I knew about the asm hacks though.
Title: Re: FFT Patcher .478 Source Code
Post by: MysticKnightFF5 on April 14, 2012, 12:01:56 AM
Could we get some ctrl + v and ctrl + c all up in this shit?
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on April 14, 2012, 01:23:02 AM
Er... what specifically should be copy-pasteable that isn't?
Title: Re: FFT Patcher .478 Source Code
Post by: MysticKnightFF5 on April 15, 2012, 12:18:45 AM
No no no, not adding in copy/pasta, just adding a shortcut to it.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on April 15, 2012, 02:39:49 AM
Well okay, so you're saying there are places where you can copy/paste but you can't use ctrl+c and ctrl+v? Where is that?
Title: Re: FFT Patcher .478 Source Code
Post by: MysticKnightFF5 on April 15, 2012, 04:03:43 AM
In no areas can I use ctrl + c and ctrl + v.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on April 15, 2012, 04:27:07 AM
Strange. Textboxes should allow that by default. It works for me.
Title: Re: FFT Patcher .478 Source Code
Post by: MysticKnightFF5 on April 15, 2012, 04:28:25 AM
No, in FFTPatcher itself, for the cloning and pasting, not for FFTactext.
Title: Re: FFT Patcher .478 Source Code
Post by: formerdeathcorps on April 15, 2012, 08:17:32 AM
Can't you just right click on a selection and select copy difference / copy all?  I recall that working for spells and ENTDs.
Title: Re: FFT Patcher .478 Source Code
Post by: Choto on April 15, 2012, 05:04:41 PM
I have a question about XML and the patcher resources files.

About the resource files, i know you can generate a resources.zip, and then edit the words contained in those files, but then what do you have to do to apply those changes to the patcher. Where does the patcher application look to display that information?

About XML, I was wondering how they work in general. All I know is that they follow a certain format and apply changes, but i have no clue actually what they are or how they're used in a general sense. I'm guessing they're used by the main program, be it patcher, fftorgasm, etc.?

Thanks!
Title: Re: FFT Patcher .478 Source Code
Post by: MysticKnightFF5 on April 15, 2012, 06:43:32 PM
You can, but did I say you couldn't? It's too slow to do that in masses.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on April 15, 2012, 08:59:21 PM
I see what you mean now about copy/paste. For the record, it helps to be specific about these things.

I might be able to implement that... it comes down to trapping ctrl+c and ctrl+v and calling the appropriate copy/paste functions in the various tabs. Abilities have multiple paste options though... so I'd probably make ctrl+v be Paste All.

For the resource files, I believe all you have to do is re-zip your edits into Resources.zip and make sure it's in the same directory as the executable. FFTP looks for a Resources.zip in its main directory, and if it finds one, uses that instead of the standard naming.

XML is just a convenient format to represent data as a string of characters ("string" data type). Since it's a standard format, there are common functions already written that can be used by programs to parse XML and to return the data inside of it. There really isn't anything more to it than that. It's simply data. It's up to the program to use that data for something. FFTorgASM is set up to look at all *.xml files in a directory and load in everything in a <Patch> tag as a patch. It parses the tags to figure out what needs to be patched in the disc image and where.
Title: Re: FFT Patcher .478 Source Code
Post by: Choto on April 15, 2012, 11:22:51 PM
exactly what I was looking for, thanks much Glain!
Title: Re: FFT Patcher .478 Source Code
Post by: Pickle Girl Fanboy on April 16, 2012, 06:01:52 PM
@Glain:
Could you add the ability to edit things that don't matter in the game, to FFTPatcher?  Like the unused ability data for R/S/M abilties, as well as HP and MP bonuses to Shields?

Because a lot of that stuff depends on hard-coded offsets (and tables), and as those offsets are discovered and documented, we gain the ability to trade R/S/M abilities for more Action abilities, and the ability to modify the mechanics of the abilities in hard-coded skillsets (such as Item, Charge, Jump, Throw, Draw Out, and Math Skill).
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on April 16, 2012, 07:00:34 PM
That data doesn't exist, as far as I'm aware. The ability bytes mean different things based on what kind of ability you're looking at. Some have less data than others. (See SA's Data Locations.txt)

FFTPatcher generally presents all the data it can pull in for a specific item, whether we know what it means or not. It wouldn't really know how to hide 'irrelevant' data.
Title: Re: FFT Patcher .478 Source Code
Post by: Pickle Girl Fanboy on April 16, 2012, 07:31:17 PM
I know that the HP and MP bonuses exist for shields, because someone talked about it, and about how you can edit them via hex editor.  I don't know about the rest - I simply assumed that the R/S/M and Item/Charge/Jump/Throw/Math Skill were the same.

If you can give me an address for where these things are in Battle.bin or SCUS, then I can check for myself.
Title: Re: FFT Patcher .478 Source Code
Post by: Pride on April 16, 2012, 07:33:47 PM
80062eb8 - Item Data Start (12 bytes each)
Correct me if I'm wrong, but I'm pretty sure bytes x06 and x0b are not found in the patcher?

Edit: You can search PGF but the data does not exist to give HP/MP bonus to shields.
The information above and below is the entire weapon data you can find, which after it starts the Inflict Status data. Minus -0xf800 to get to the SCUS offset.
Title: Re: FFT Patcher .478 Source Code
Post by: Pickle Girl Fanboy on April 16, 2012, 07:36:16 PM
Code: [Select]
RAM to SCUS_942.21: Subtract 0xF800
RAM to BATTLE.BIN: Subtract 0x67000
I ssume that is SCUS_942.21, correct?

0x536B8 in SCUS, if correct.
341688 in decimal.

12 offsets
256 entries
3072 bytes total

341688 in decimal.  First byte.
344760 in decimal.  Last byte.

0x536B8
0x542B8

Wait a minute, why am I doing this when I can look up the Gameshark Handbook by Aerostar?
Title: Re: FFT Patcher .478 Source Code
Post by: Pride on April 16, 2012, 07:43:15 PM
Yes, that is in SCUS
Title: Re: FFT Patcher .478 Source Code
Post by: Pickle Girl Fanboy on April 16, 2012, 07:50:44 PM
Code: [Select]
-===============-
EQUIPMENT BYTES I
-===============-

Thanks to NeoKamek for figuring a lot of these out, especially the
graphics!

BASEADDR +0 :  palette \  Best to just look these up in the table to
BASEADDR +1 :  graphic /  get the custom palette and graphic you want.

BASEADDR +2 :  weapon power / predicted evade%
                again, each weapon has its own entry so you can just
                look in the table to mimic any weapon you want.

BASEADDR +3 :  equipment type graphic:
               01 = Dagger           12 = Cloth
               02 = Ninja Sword      13 = Shield
               03 = Sword            14 = Helmet
               04 = Knight Sword     15 = Hat
               05 = Katana           16 = Ribbon
               06 = Axe              17 = Armor
               07 = Rod              18 = Clothes
               08 = Staff            19 = Robe
               09 = Flail            1A = Shoes
               0A = Gun              1B = Gauntlet
               0B = Crossbow         1C = Ring
               0C = Bow              1D = Armlet
               0D = Harp             1E = Mantle
               0E = Dictionary       1F = Perfume
               0F = Spear            20 = Shuriken
               10 = Stick            21 = Ball
               11 = Bag              22 = Chemist item

BASEADDR +4 :  identification number

BASEADDR +5 :  type of equipment (same digits as BASEADDR +3)

BASEADDR +6 :  always 0

BASEADDR +7 :  extra effects (again, just look in the table
               at the item whose effect you want to mimic)
               Some new ones discovered by NeoKamek:
               73 = Move +1, Jump +2
               84 = Move +2, Jump +9, PA +92
               85 = Move +2, Jump +3
               89 = Move +6, Jump +7, PA +92
               8F = Move +0
               91 = Move +8

BASEADDR +8 :  price, low byte
BASEADDR +9 :  price, high byte

BASEADDR +A :  when enemies start to carry the item
               01 - 0E = at progressive points through the game
               14 = never

BASEADDR +B :  always 0


(weapons I)

  BASEADDR   +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B
+------------------------------------------------+-----------------+
| 30062EB8 | 00 00 00 80 00 00 00 00 00 00 00 00 | <BLANK>         |
+----------+-------------------------------------+-----------------+
| 30062EC4 | 00 01 01 80 01 01 00 00 64 00 01 00 | Dagger          |
| 30062ED0 | 00 02 03 80 02 01 00 00 F4 01 02 00 | Mythril Knife   |
| 30062EDC | 00 04 07 80 03 01 00 00 20 03 03 00 | Blind Knife     |
| 30062EE8 | 02 06 0B 80 04 01 00 00 DC 05 04 00 | Mage Masher     |
| 30062EF4 | 04 01 0E 80 05 01 00 00 08 07 06 00 | Platina Dagger  |
| 30062F00 | 00 03 15 80 06 01 00 00 B8 0B 0A 00 | Main Gauche     |
| 30062F0C | 04 05 19 80 07 01 00 00 A0 0F 0B 00 | Orichalcum      |
| 30062F18 | 00 06 1D 80 08 01 00 00 88 13 0C 00 | Assassin Dagger |
| 30062F24 | 04 02 21 80 09 01 00 00 40 1F 0E 00 | Air Knife       |
| 30062F30 | 02 04 5F 82 0A 01 00 00 E0 2E 14 00 | Zorlin Shape    |
+----------+-------------------------------------+-----------------+
| 30062F3C | 00 07 0A 80 0B 02 00 00 B8 0B 09 00 | Hidden Knife    |
| 30062F48 | 00 09 0D 80 0C 02 00 00 88 13 0A 00 | Ninja Knife     |
| 30062F54 | 00 08 0F 80 0D 02 00 00 58 1B 0B 00 | Short Edge      |
| 30062F60 | 02 07 16 80 0E 02 00 00 10 27 0C 00 | Ninja Edge      |
| 30062F6C | 04 08 1B 80 0F 02 00 00 80 3E 0D 00 | Spell Edge      |
| 30062F78 | 04 07 5F 82 10 02 00 00 0A 00 14 00 | Sasuke Knife    |
| 30062F84 | 0D 0A 60 82 11 02 00 00 0A 00 14 00 | Iga Knife       |
| 30062F90 | 0B 0B 60 82 12 02 00 00 0A 00 14 00 | Koga Knife      |
+----------+-------------------------------------+-----------------+
| 30062F9C | 00 0C 01 80 13 03 00 00 C8 00 01 00 | Broad Sword     |
| 30062FA8 | 00 0D 04 80 14 03 00 00 F4 01 02 00 | Long Sword      |
| 30062FB4 | 02 0E 07 80 15 03 00 00 84 03 03 00 | Iron Sword      |
| 30062FC0 | 02 0F 09 80 16 03 00 00 40 06 04 00 | Mythril Sword   |
| 30062FCC | 03 0E 0C 82 17 03 00 00 C4 09 05 00 | Blood Sword     |
| 30062FD8 | 01 10 0F 80 18 03 00 00 E4 0C 06 00 | Coral Sword     |
| 30062FE4 | 03 0F 15 80 19 03 00 00 88 13 09 00 | Ancient Sword   |
| 30062FF0 | 04 0C 17 80 1A 03 00 00 88 13 0A 00 | Sleep Sword     |
| 30062FFC | 04 11 1C 80 1B 03 00 00 F8 2A 0C 00 | Platinum Sword  |
| 30063008 | 00 12 1A 80 1C 03 00 00 40 1F 0B 00 | Diamond Sword   |
| 30063014 | 01 0D 22 80 1D 03 00 00 B0 36 0D 00 | Ice Brand       |
| 30063020 | 04 13 25 80 1E 03 00 01 20 4E 0E 00 | Rune Blade      |
| 3006302C | 03 14 5F 82 1F 03 00 00 0A 00 14 00 | Nagrarock       |
| 30063038 | 01 15 60 82 20 03 00 00 0A 00 14 00 | Materia Blade   |
+----------+-------------------------------------+-----------------+
| 30063044 | 03 16 5C 82 21 04 00 00 40 9C 14 00 | Defender        |
| 30063050 | 00 17 5F 82 22 04 00 02 0A 00 14 00 | Save the Queen  |
| 3006305C | 03 18 60 82 23 04 00 03 0A 00 14 00 | Excalibur       |
| 30063068 | 04 19 61 82 24 04 00 04 0A 00 14 00 | Ragnarok        |
| 30063074 | 04 16 62 82 25 04 00 05 0A 00 14 00 | Chaos Blade     |
+----------+-------------------------------------+-----------------+
| 30063080 | 00 1A 09 80 26 05 00 00 40 06 07 00 | Asura Knife     |
| 3006308C | 01 1B 0C 80 27 05 00 00 B8 0B 07 00 | Koutetsu Knife  |
| 30063098 | 01 1C 0F 80 28 05 00 00 88 13 08 00 | Bizen Boat      |
| 300630A4 | 04 1A 15 80 29 05 00 00 58 1B 09 00 | Murasame        |
| 300630B0 | 04 1D 18 80 2A 05 00 00 40 1F 0A 00 | Heaven's Cloud  |
| 300630BC | 05 1C 1B 80 2B 05 00 00 10 27 0C 00 | Kiyomori        |
| 300630C8 | 03 1E 1E 80 2C 05 00 00 98 3A 0D 00 | Muramasa        |
| 300630D4 | 05 1F 21 80 2D 05 00 00 F0 55 0E 00 | Kikuichimoji    |
| 300630E0 | 05 1B 5F 82 2E 05 00 00 0A 00 14 00 | Masamune        |
| 300630EC | 03 1A 60 82 2F 05 00 00 0A 00 14 00 | Chirijiraden    |
+----------+-------------------------------------+-----------------+
| 300630F8 | 00 20 04 80 30 06 00 00 DC 05 04 00 | Battle Axe      |
| 30063104 | 0F 21 0C 80 31 06 00 00 A0 0F 07 00 | Giant Axe       |
| 30063110 | 05 22 1F 80 32 06 00 00 E0 2E 0A 00 | Slasher         |
+----------+-------------------------------------+-----------------+
| 3006311C | 05 23 01 80 33 07 00 00 C8 00 01 00 | Rod             |
| 30063128 | 02 25 05 80 34 07 00 06 90 01 03 00 | Thunder Rod     |
| 30063134 | 06 24 05 80 35 07 00 07 90 01 03 00 | Flame Rod       |
| 30063140 | 01 25 05 80 36 07 00 08 90 01 03 00 | Ice Rod         |
| 3006314C | 06 24 0C 80 37 07 00 00 F4 01 06 00 | Poison Rod      |
| 30063158 | 00 26 17 80 38 07 00 09 40 1F 0B 00 | Wizard Rod      |
| 30063164 | 07 24 5F 82 39 07 00 00 E0 2E 14 00 | Dragon Rod      |
| 30063170 | 03 25 60 82 3A 07 00 49 0A 00 14 00 | Faith Rod       |
+----------+-------------------------------------+-----------------+
| 3006317C | 03 27 01 80 3B 08 00 00 78 00 01 00 | Oak Staff       |
| 30063188 | 02 27 05 80 3C 08 00 00 20 03 03 00 | White Staff     |
| 30063194 | 00 28 09 82 3D 08 00 00 A0 0F 04 00 | Healing Staff   |
| 300631A0 | 01 27 0C 80 3E 08 00 00 98 08 06 00 | Rainbow Staff   |
| 300631AC | 03 29 0F 80 3F 08 00 0A A0 0F 08 00 | Wizard Staff    |
| 300631B8 | 02 29 18 80 40 08 00 00 58 1B 0B 00 | Gold Staff      |
| 300631C4 | 00 2A 5F 82 41 08 00 0B 0A 00 14 00 | Mace of Zeus    |
| 300631D0 | 02 2A 60 82 42 08 00 00 0A 00 14 00 | Sage Staff      |
+----------+-------------------------------------+-----------------+
| 300631DC | 02 2B 0A 80 43 09 00 00 B0 04 08 00 | Flail           |
| 300631E8 | 01 2B 14 80 44 09 00 00 A0 0F 0A 00 | Flame Whip      |
| 300631F4 | 00 2B 20 80 45 09 00 00 28 23 0C 00 | Morning Star    |
| 30063200 | 03 2B 5A 82 46 09 00 00 40 9C 14 00 | Scorpion Tail   |
+----------+-------------------------------------+-----------------+
| 3006320C | 05 2C 0B 82 47 0A 00 00 88 13 07 00 | Romanda Gun     |
| 30063218 | 07 2C 0F 82 48 0A 00 00 98 3A 0A 00 | Mythril Gun     |
| 30063224 | 00 2D 5F 82 49 0A 00 48 0A 00 14 00 | Stone Gun       |
| 30063230 | 03 2E 5B 82 4A 0A 00 00 0A 00 14 00 | Blaze Gun       |
| 3006323C | 05 2E 5C 82 4B 0A 00 00 0A 00 14 00 | Glacier Gun     |
| 30063248 | 07 2E 5D 82 4C 0A 00 00 0A 00 14 00 | Blast Gun       |
+----------+-------------------------------------+-----------------+
| 30063254 | 03 2F 01 80 4D 0B 00 00 90 01 01 00 | Bow Gun         |
| 30063260 | 01 2F 05 82 4E 0B 00 00 DC 05 04 00 | Night Killer    |
| 3006326C | 07 2F 0B 80 4F 0B 00 00 D0 07 07 00 | Cross Bow       |
| 30063278 | 06 30 0E 80 50 0B 00 00 A0 0F 09 00 | Poison Bow      |
| 30063284 | 07 30 18 80 51 0B 00 00 40 1F 0B 00 | Hunting Bow     |
| 30063290 | 02 30 21 82 52 0B 00 00 20 4E 0E 00 | Gastrafitis     |
+----------+-------------------------------------+-----------------+
| 3006329C | 03 31 02 80 53 0C 00 00 20 03 03 00 | Long Bow        |
| 300632A8 | 02 31 06 80 54 0C 00 00 DC 05 04 00 | Silver Bow      |
| 300632B4 | 05 31 0B 80 55 0C 00 00 D0 07 05 00 | Ice Bow         |
| 300632C0 | 00 32 0F 80 56 0C 00 00 B8 0B 07 00 | Lightning Bow   |
| 300632CC | 07 31 1B 80 57 0C 00 00 40 1F 0B 00 | Windslash Bow   |
| 300632D8 | 07 33 14 80 58 0C 00 00 88 13 09 00 | Mythril Bow     |
| 300632E4 | 01 33 25 80 59 0C 00 00 F0 55 0E 00 | Ultimus Bow     |
| 300632F0 | 03 34 34 82 5A 0C 00 00 0A 00 14 00 | Yoichi Bow      |
| 300632FC | 05 35 35 82 5B 0C 00 00 0A 00 14 00 | Perseus Bow     |
+----------+-------------------------------------+-----------------+
| 30063308 | 03 36 0D 80 5C 0D 00 00 88 13 07 00 | Ramia Harp      |
| 30063314 | 06 36 19 80 5D 0D 00 00 10 27 0B 00 | Bloody Strings  |
| 30063320 | 02 36 24 82 5E 0D 00 00 30 75 14 00 | Fairy Harp      |
+----------+-------------------------------------+-----------------+
| 3006332C | 02 37 0D 80 5F 0E 00 00 B8 0B 07 00 | Battle Dict     |
| 30063338 | 07 37 17 80 60 0E 00 00 70 17 0A 00 | Monster Dict    |
| 30063344 | 05 37 22 80 61 0E 00 00 10 27 0B 00 | Papyrus Plate   |
| 30063350 | 03 37 5F 82 62 0E 00 00 30 75 14 00 | Madlemgen       |
+----------+-------------------------------------+-----------------+
| 3006335C | 02 38 0C 80 63 0F 00 00 E8 03 05 00 | Javelin         |
| 30063368 | 01 3B 10 80 64 0F 00 00 D0 07 07 00 | Spear           |
| 30063374 | 04 39 15 80 65 0F 00 00 94 11 09 00 | Mythril Spear   |
| 30063380 | 07 3B 19 80 66 0F 00 00 58 1B 0B 00 | Partisan        |
| 3006338C | 04 3A 1D 80 67 0F 00 00 10 27 0E 00 | Oberisk         |
| 30063398 | 02 3C 5F 82 68 0F 00 00 A0 8C 14 00 | Holy Lance      |
| 300633A4 | 05 38 60 82 69 0F 00 00 E0 AB 14 00 | Dragon Whisker  |
| 300633B0 | 06 3C 61 82 6A 0F 00 00 E8 03 14 00 | Javelin         |
+----------+-------------------------------------+-----------------+
| 300633BC | 00 3D 09 80 6B 10 00 00 E8 03 06 00 | Cypress Rod     |
| 300633C8 | 07 3E 0D 80 6C 10 00 00 78 05 07 00 | Battle Bamboo   |
| 300633D4 | 02 3D 15 80 6D 10 00 00 60 09 09 00 | Musk Rod        |
| 300633E0 | 01 3E 18 80 6E 10 00 00 A0 0F 0A 00 | Iron Fan        |
| 300633EC | 03 3F 1B 80 6F 10 00 00 4C 1D 0B 00 | Gokuu Rod       |
| 300633F8 | 06 40 5F 82 70 10 00 00 10 27 14 00 | Ivory Rod       |
| 30063404 | 00 3F 28 80 71 10 00 00 20 4E 0E 00 | Octagon Rod     |
| 30063410 | 03 41 60 82 72 10 00 00 88 90 14 00 | Whale Whisker   |
+----------+-------------------------------------+-----------------+
| 3006341C | 02 42 50 82 73 11 00 0C 08 CF 09 00 | C Bag           |
| 30063428 | 07 42 51 82 74 11 00 00 60 EA 14 00 | FS Bag          |
| 30063434 | 05 42 52 82 75 11 00 0D 20 CB 0B 00 | P Bag           |
| 30063440 | 01 42 53 82 76 11 00 0E 90 E2 0E 00 | H Bag           |
+----------+-------------------------------------+-----------------+
| 3006344C | 05 43 18 80 77 12 00 00 58 1B 0A 00 | Persia          |
| 30063458 | 07 44 1D 80 78 12 00 00 98 3A 0C 00 | Cashmere        |
| 30063464 | 06 43 5F 82 79 12 00 00 40 9C 14 00 | Ryozan Silk     |
+----------+-------------------------------------+-----------------+
| 30063470 | 00 45 01 80 7A 20 00 00 32 00 05 00 | Shuriken        |
| 3006347C | 03 45 12 80 7B 20 00 00 2C 01 0A 00 | Magic Shuriken  |
| 30063488 | 01 45 21 80 7C 20 00 00 E8 03 0D 00 | Yagyu Darkness  |
+----------+-------------------------------------+-----------------+
| 30063494 | 03 46 01 80 7D 21 00 00 FA 00 07 00 | Fire Ball       |
| 300634A0 | 05 46 12 80 7E 21 00 00 FA 00 07 00 | Water Ball      |
| 300634AC | 02 46 1D 80 7F 21 00 00 FA 00 07 00 | Lightning Ball  |
+----------+-------------------------------------+-----------------+


(shields I)

  BASEADDR   +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B
+----------+-------------------------------------+-----------------+
| 300634B8 | 00 47 01 40 00 13 00 00 90 01 01 00 | Escutcheon      |
| 300634C4 | 02 4C 03 40 01 13 00 00 BC 02 03 00 | Buckler         |
| 300634D0 | 01 48 06 40 02 13 00 00 B0 04 04 00 | Bronze Shield   |
| 300634DC | 07 4C 09 40 03 13 00 00 40 06 05 00 | Round Shield    |
| 300634E8 | 05 4A 0C 40 04 13 00 00 C4 09 06 00 | Mythril Shield  |
| 300634F4 | 00 4E 0F 40 05 13 00 00 AC 0D 07 00 | Gold Shield     |
| 30063500 | 01 49 16 40 06 13 00 0F 70 17 09 00 | Ice Shield      |
| 3006350C | 03 4F 16 40 07 13 00 10 64 19 09 00 | Flame Shield    |
| 30063518 | 03 49 16 40 08 13 00 11 10 27 0A 00 | Aegis Shield    |
| 30063524 | 05 4D 19 40 09 13 00 00 E0 2E 0B 00 | Diamond Shield  |
| 30063530 | 01 4A 1D 40 0A 13 00 00 80 3E 0D 00 | Platina Shield  |
| 3006353C | 01 4D 24 40 0B 13 00 00 08 52 0E 00 | Crystal Shield  |
| 30063548 | 05 49 24 42 0C 13 00 00 0A 00 14 00 | Genji Shield    |
| 30063554 | 01 4C 27 42 0D 13 00 12 0A 00 14 00 | Kaiser Plate    |
| 30063560 | 03 4B 28 42 0E 13 00 13 0A 00 14 00 | Venetian Shield |
| 3006356C | 07 4E 32 42 0F 13 00 00 90 01 14 00 | Escutcheon      |
+----------+-------------------------------------+-----------------+


(armor I)

  BASEADDR   +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B
+----------+-------------------------------------+-----------------+
| 30063578 | 00 50 01 20 00 14 00 00 C8 00 01 00 | Leather Helmet  |
| 30063584 | 0D 51 04 20 01 14 00 00 F4 01 02 00 | Bronze Helmet   |
| 30063590 | 09 51 07 20 02 14 00 00 E8 03 03 00 | Iron Helmet     |
| 3006359C | 0B 52 09 20 03 14 00 00 DC 05 05 00 | Barbuta         |
| 300635A8 | 0A 53 0C 20 04 14 00 00 34 08 06 00 | Mythril Helmet  |
| 300635B4 | 00 53 0F 20 05 14 00 00 F0 0A 07 00 | Gold Helmet     |
| 300635C0 | 0D 54 11 20 06 14 00 00 A0 0F 08 00 | Cross Helmet    |
| 300635CC | 0C 55 16 20 07 14 00 00 70 17 0A 00 | Diamond Helmet  |
| 300635D8 | 0A 56 19 20 08 14 00 00 40 1F 0C 00 | Platina Helmet  |
| 300635E4 | 0B 57 1D 20 09 14 00 00 10 27 0C 00 | Circlet         |
| 300635F0 | 09 55 1B 20 0A 14 00 00 B0 36 0E 00 | Crystal Helmet  |
| 300635FC | 0C 58 24 22 0B 14 00 00 0A 00 14 00 | Genji Helmet    |
| 30063608 | 09 59 28 22 0C 14 00 14 0A 00 14 00 | Grand Helmet    |
+----------+-------------------------------------+-----------------+
| 30063614 | 0B 5A 01 20 0D 15 00 00 96 00 01 00 | Leather Hat     |
| 30063620 | 0D 5B 04 20 0E 15 00 00 5E 01 02 00 | Feather Hat     |
| 3006362C | 0C 5C 07 20 0F 15 00 00 20 03 03 00 | Red Hood        |
| 30063638 | 0A 5D 0A 20 10 15 00 15 B0 04 05 00 | Headgear        |
| 30063644 | 0C 5E 0D 20 11 15 00 16 08 07 06 00 | Triangle Hat    |
| 30063650 | 0B 5F 10 20 12 15 00 17 B8 0B 07 00 | Green Beret     |
| 3006365C | 02 60 15 20 13 15 00 18 88 13 09 00 | Twist Headband  |
| 30063668 | 0B 61 18 20 14 15 00 19 70 17 0A 00 | Holy Miter      |
| 30063674 | 0F 5C 1B 20 15 15 00 00 58 1B 0B 00 | Black Hood      |
| 30063680 | 0B 62 20 20 16 15 00 1A E0 2E 0C 00 | Golden Hairpin  |
| 3006368C | 0D 63 26 20 17 15 00 1B 80 3E 0E 00 | Flash Hat       |
| 30063698 | 09 5F 2E 20 18 15 00 1C B8 88 0F 00 | Thief Hat       |
+----------+-------------------------------------+-----------------+
| 300636A4 | 0B 64 32 22 19 16 00 45 20 4E 14 00 | Cachusha        |
| 300636B0 | 0C 65 33 22 1A 16 00 46 20 4E 14 00 | Barette         |
| 300636BC | 0B 66 34 22 1B 16 00 47 60 EA 14 00 | Ribbon          |
+----------+-------------------------------------+-----------------+
| 300636C8 | 00 6A 01 10 1C 17 00 00 C8 00 01 00 | Leather Armor   |
| 300636D4 | 0B 6B 04 10 1D 17 00 00 58 02 02 00 | Linen Cuirass   |
| 300636E0 | 0E 67 06 10 1E 17 00 00 20 03 03 00 | Bronze Armor    |
| 300636EC | 03 6C 08 10 1F 17 00 00 14 05 04 00 | Chain Mail      |
| 300636F8 | 09 67 0B 10 20 17 00 00 D0 07 05 00 | Mythril Armor   |
| 30063704 | 00 68 0E 10 21 17 00 00 B8 0B 06 00 | Plate Mail      |
| 30063710 | 02 68 11 10 22 17 00 00 10 0E 07 00 | Gold Armor      |
| 3006371C | 0A 69 16 10 23 17 00 00 70 17 0A 00 | Diamond Armor   |
| 30063728 | 08 6D 1A 10 24 17 00 00 28 23 0C 00 | Platina Armor   |
| 30063734 | 08 6E 1E 10 25 17 00 00 C8 32 0D 00 | Carabini Mail   |
| 30063740 | 05 69 25 10 26 17 00 00 38 4A 0E 00 | Crystal Mail    |
| 3006374C | 03 6F 25 12 27 17 00 00 0A 00 14 00 | Genji Armor     |
| 30063758 | 03 70 27 12 28 17 00 1D 50 46 0E 00 | Reflect Mail    |
| 30063764 | 0D 71 2D 12 29 17 00 00 0A 00 14 00 | Maximillian     |
+----------+-------------------------------------+-----------------+
| 30063770 | 06 74 01 10 2A 18 00 00 96 00 01 00 | Clothes         |
| 3006377C | 03 75 03 10 2B 18 00 00 2C 01 02 00 | Leather Outfit  |
| 30063788 | 02 76 05 10 2C 18 00 00 F4 01 03 00 | Leather Vest    |
| 30063794 | 06 77 07 10 2D 18 00 00 84 03 04 00 | Chain Vest      |
| 300637A0 | 04 73 0A 10 2E 18 00 00 DC 05 05 00 | Mythril Vest    |
| 300637AC | 0B 73 0C 10 2F 18 00 00 40 06 06 00 | Adaman Vest     |
| 300637B8 | 03 78 0E 10 30 18 00 00 6C 07 07 00 | Wizard Outfit   |
| 300637C4 | 01 79 11 10 31 18 00 00 C4 09 08 00 | Brigandine      |
| 300637D0 | 00 7A 15 10 32 18 00 1E A0 0F 0A 00 | Judo Outfit     |
| 300637DC | 03 7B 19 10 33 18 00 1F 58 1B 0B 00 | Power Sleeve    |
| 300637E8 | 0B 7C 1D 10 34 18 00 20 10 27 0D 00 | Earth Clothes   |
| 300637F4 | 03 72 23 12 35 18 00 21 0A 00 14 00 | Secret Clothes  |
| 30063800 | 0B 72 25 10 36 18 00 22 E0 2E 0E 00 | Black Costume   |
| 3006380C | 03 7D 32 12 37 18 00 23 80 BB 14 00 | Rubber Costume  |
+----------+-------------------------------------+-----------------+
| 30063818 | 06 7E 03 10 38 19 00 00 B0 04 03 00 | Linen Robe      |
| 30063824 | 01 7E 05 10 39 19 00 00 60 09 04 00 | Silk Robe       |
| 30063830 | 0B 7F 0B 10 3A 19 00 24 A0 0F 07 00 | Wizard Robe     |
| 3006383C | 0B 80 10 12 3B 19 00 25 88 13 0A 00 | Chameleon Robe  |
| 30063848 | 0C 81 1A 10 3C 19 00 26 28 23 0B 00 | White Robe      |
| 30063854 | 0C 82 1F 10 3D 19 00 27 C8 32 0C 00 | Black Robe      |
| 30063860 | 0D 83 26 10 3E 19 00 28 30 75 0E 00 | Light Robe      |
| 3006386C | 0D 7F 2D 12 3F 19 00 29 0A 00 14 00 | Robe of Lords   |
+----------+-------------------------------------+-----------------+


(accessories I)

  BASEADDR   +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B
+----------+-------------------------------------+-----------------+
| 30063878 | 00 84 0A 08 00 1A 00 2A E8 03 02 00 | Battle Boots    |
| 30063884 | 00 85 14 08 01 1A 00 2B B0 04 05 00 | Spike Shoes     |
| 30063890 | 01 86 1E 08 02 1A 00 2C 88 13 0A 00 | Germinas Boots  |
| 3006389C | 01 87 05 0A 03 1A 00 2D DC 05 07 00 | Rubber Shoes    |
| 300638A8 | 02 88 32 0A 04 1A 00 2E C4 09 09 00 | Feather Boots   |
| 300638B4 | 05 89 1E 0A 05 1A 00 2F 58 1B 0C 00 | Sprint Shoes    |
| 300638C0 | 03 8A 28 0A 06 1A 00 30 10 27 0E 00 | Red Shoes       |
+----------+-------------------------------------+-----------------+
| 300638CC | 00 8B 14 08 07 1B 00 31 88 13 06 00 | Power Wrist     |
| 300638D8 | 03 8C 32 0A 08 1B 00 32 0A 00 14 00 | Genji Gauntlet  |
| 300638E4 | 03 8D 23 08 09 1B 00 33 20 4E 09 00 | Magic Gauntlet  |
| 300638F0 | 04 8E 3C 08 0A 1B 00 34 50 C3 0C 00 | Bracer          |
+----------+-------------------------------------+-----------------+
| 300638FC | 00 8F 32 0A 0B 1C 00 35 10 27 09 00 | Reflect Ring    |
| 30063908 | 06 8F 19 08 0C 1C 00 36 88 13 07 00 | Defense Ring    |
| 30063914 | 00 90 19 08 0D 1C 00 37 10 27 0B 00 | Magic Ring      |
| 30063920 | 04 90 05 0A 0E 1C 00 38 0A 00 14 00 | Cursed Ring     |
| 3006392C | 08 91 19 0A 0F 1C 00 39 20 4E 0D 00 | Angel Ring      |
+----------+-------------------------------------+-----------------+
| 30063938 | 04 92 1A 08 10 1D 00 3A 88 13 08 00 | Diamond Armlet  |
| 30063944 | 0B 93 19 08 11 1D 00 3B 10 27 0A 00 | Jade Armlet     |
| 30063950 | 00 94 19 08 12 1D 00 3C 98 3A 0B 00 | 108 Gems        |
| 3006395C | 0B 95 19 08 13 1D 00 3D 10 27 09 00 | N-Kai Armlet    |
| 30063968 | 06 96 19 08 14 1D 00 3E 58 1B 07 00 | Defense Armlet  |
+----------+-------------------------------------+-----------------+
| 30063974 | 09 97 0A 08 15 1E 00 00 2C 01 03 00 | Small Mantle    |
| 30063980 | 0E 98 14 08 16 1E 00 00 20 03 05 00 | Leather Mantle  |
| 3006398C | 0D 99 1E 08 17 1E 00 3F D0 07 07 00 | Wizard Mantle   |
| 30063998 | 0B 9A 28 08 18 1E 00 00 40 1F 0A 00 | Elf Mantle      |
| 300639A4 | 0E 9B 31 08 19 1E 00 00 98 3A 0C 00 | Dracula Mantle  |
| 300639B0 | 0D 9C 32 08 1A 1E 00 00 20 4E 0E 00 | Feather Mantle  |
| 300639BC | 0E 9D 05 0A 1B 1E 00 40 0A 00 14 00 | Vanish Mantle   |
+----------+-------------------------------------+-----------------+
| 300639C8 | 0B 9E 05 0A 1C 1F 00 41 60 EA 14 00 | Chantage        |
| 300639D4 | 0D 9F 05 0A 1D 1F 00 42 60 EA 14 00 | Cherche         |
| 300639E0 | 02 A0 05 0A 1E 1F 00 43 60 EA 14 00 | Setiemson       |
| 300639EC | 08 A1 05 0A 1F 1F 00 44 60 EA 14 00 | Salty Rage      |
+----------+-------------------------------------+-----------------+


(items I)

  BASEADDR   +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B
+----------+-------------------------------------+-----------------+
| 300639F8 | 0D A2 01 02 00 22 00 00 32 00 01 00 | Potion          |
| 30063A04 | 0D B0 02 02 01 22 00 00 C8 00 03 00 | Hi-Potion       |
| 30063A10 | 0D B1 03 02 02 22 00 00 BC 02 09 00 | X-Potion        |
| 30063A1C | 0B A5 04 02 03 22 00 00 C8 00 07 00 | Ether           |
| 30063A28 | 0B A6 05 02 04 22 00 00 58 02 0B 00 | Hi-Ether        |
| 30063A34 | 0B A7 0E 02 0D 22 00 00 0A 00 14 00 | Elixir          |
| 30063A40 | 0C A8 06 02 05 22 00 00 32 00 01 00 | Antidote        |
| 30063A4C | 0E A9 07 02 06 22 00 00 32 00 01 00 | Eye Drop        |
| 30063A58 | 0B AA 08 02 07 22 00 00 32 00 02 00 | Echo Grass      |
| 30063A64 | 09 AB 09 02 08 22 00 00 32 00 02 00 | Maiden's Kiss   |
| 30063A70 | 0D AC 0A 02 09 22 00 00 64 00 02 00 | Soft            |
| 30063A7C | 09 AD 0B 02 0A 22 00 00 D0 07 05 00 | Holy Water      |
| 30063A88 | 0B AE 0C 02 0B 22 00 00 5E 01 07 00 | Remedy          |
| 30063A94 | 0E AF 0D 02 0C 22 00 00 2C 01 01 00 | Phoenix Down    |
+----------+-------------------------------------+-----------------+
| 30063AA0 | 00 00 00 02 00 00 00 00 00 00 00 00 | <BLANK>         |
| 30063AAC | 00 00 00 02 00 00 00 00 00 00 00 00 | <BLANK>         |
+----------+-------------------------------------+-----------------+

Code: [Select]
-=============-
SHIELD BYTES II
-=============-

BASEADDR +1 : Physical S-Evade
BASEADDR +2 : Magical S-Evade

  BASEADDR   +0 +1
+----------+-------+-----------------+
| 30063EB8 | 0A 03 | Escutcheon      |
| 30063EBA | 0D 03 | Buckler         |
| 30063EBC | 10 00 | Bronze Shield   |
| 30063EBE | 13 00 | Round Shield    |
| 30063EC0 | 16 05 | Mythril Shield  |
| 30063EC2 | 19 00 | Gold Shield     |
| 30063EC4 | 1C 00 | Ice Shield      |
| 30063EC6 | 1F 00 | Flame Shield    |
| 30063EC8 | 0A 32 | Aegis Shield    |
| 30063ECA | 22 0F | Diamond Shield  |
| 30063ECC | 25 0A | Platina Shield  |
| 30063ECE | 28 0F | Crystal Shield  |
| 30063ED0 | 2B 00 | Genji Shield    |
| 30063ED2 | 2E 14 | Kaiser Plate    |
| 30063ED4 | 32 19 | Venetian Shield |
| 30063ED6 | 4B 32 | Escutcheon      |
+----------+-------+-----------------+

Code: [Select]
-============-
ARMOR BYTES II
-============-

BASEADDR +0 :  HP to add
BASEADDR +1 :  MP to add

  BASEADDR   +0 +1
+----------+-------+-----------------+
| 30063ED8 | 0A 00 | Leather Helmet  |
| 30063EDA | 14 00 | Bronze Helmet   |
| 30063EDC | 1E 00 | Iron Helmet     |
| 30063EDE | 28 00 | Barbuta         |
| 30063EE0 | 32 00 | Mythril Helmet  |
| 30063EE2 | 3C 00 | Gold Helmet     |
| 30063EE4 | 46 00 | Cross Helmet    |
| 30063EE6 | 50 00 | Diamond Helmet  |
| 30063EE8 | 5A 00 | Platina Helmet  |
| 30063EEA | 64 00 | Circlet         |
| 30063EEC | 78 00 | Crystal Helmet  |
| 30063EEE | 82 00 | Genji Helmet    |
| 30063EF0 | 96 00 | Grand Helmet    |
+----------+-------+-----------------+
| 30063EF2 | 08 00 | Leather Hat     |
| 30063EF4 | 10 05 | Feather Hat     |
| 30063EF6 | 18 08 | Red Hood        |
| 30063EF8 | 20 00 | Headgear        |
| 30063EFA | 28 0C | Triangle Hat    |
| 30063EFC | 30 00 | Green Beret     |
| 30063EFE | 38 00 | Twist Headband  |
| 30063F00 | 40 14 | Holy Miter      |
| 30063F02 | 48 00 | Black Hood      |
| 30063F04 | 50 32 | Golden Hairpin  |
| 30063F06 | 58 0F | Flash Hat       |
| 30063F08 | 64 00 | Thief Hat       |
+----------+-------+-----------------+
| 30063F0A | 14 00 | Cachusha        |
| 30063F0C | 14 00 | Barette         |
| 30063F0E | 0A 00 | Ribbon          |
+----------+-------+-----------------+
| 30063F10 | 0A 00 | Leather Armor   |
| 30063F12 | 14 00 | Linen Cuirass   |
| 30063F14 | 1E 00 | Bronze Armor    |
| 30063F16 | 28 00 | Chain Mail      |
| 30063F18 | 32 00 | Mythril Armor   |
| 30063F1A | 3C 00 | Plate Mail      |
| 30063F1C | 46 00 | Gold Armor      |
| 30063F1E | 50 00 | Diamond Armor   |
| 30063F20 | 5A 00 | Platina Armor   |
| 30063F22 | 64 00 | Carabini Mail   |
| 30063F24 | 6E 00 | Crystal Mail    |
| 30063F26 | 96 00 | Genji Armor     |
| 30063F28 | 82 00 | Reflect Mail    |
| 30063F2A | C8 00 | Maximillian     |
+----------+-------+-----------------+
| 30063F2C | 05 00 | Clothes         |
| 30063F2E | 0A 00 | Leather Outfit  |
| 30063F30 | 12 00 | Leather Vest    |
| 30063F32 | 18 00 | Chain Vest      |
| 30063F34 | 1E 00 | Mythril Vest    |
| 30063F36 | 24 00 | Adaman Vest     |
| 30063F38 | 2A 0F | Wizard Outfit   |
| 30063F3A | 32 00 | Brigandine      |
| 30063F3C | 3C 00 | Judo Outfit     |
| 30063F3E | 46 00 | Power Sleeve    |
| 30063F40 | 55 0A | Earth Clothes   |
| 30063F42 | 14 00 | Secret Clothes  |
| 30063F44 | 64 00 | Black Costume   |
| 30063F46 | 96 1E | Rubber Costume  |
+----------+-------+-----------------+
| 30063F48 | 0A 0A | Linen Robe      |
| 30063F4A | 14 10 | Silk Robe       |
| 30063F4C | 1E 16 | Wizard Robe     |
| 30063F4E | 28 1C | Chameleon Robe  |
| 30063F50 | 32 22 | White Robe      |
| 30063F52 | 3C 1E | Black Robe      |
| 30063F54 | 4B 32 | Light Robe      |
| 30063F56 | 64 50 | Robe of Lords   |
+----------+-------+-----------------+]

Looks like I was wrong about shields boosting HP and MP.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on April 16, 2012, 08:24:16 PM
Pride, I think you're right about the 7th and 12th bytes in the item data... they're not in FFTP. Although those bytes always seem to be zero anyway, it seems that there is indeed some data not in FFTP...

...but the data PGF's talking about really doesn't exist. I just checked the ability data and found...

0x5fbf0 - Ability data 2 (normal abilities)
0x61010 - Item ability data

After the item data are data for other abilities (such as R/S/M, which have only one byte). That means that the abilities that have the "full" information are the ones between 0x5fbf0 and 0x61010. That section is 14 (0x0E) bytes per ability.

Byte length = 0x61010 - 0x5fbf0 = 0x1420 bytes
Number of abilities in section = 0x1420 / 0x0E = 0x170 abilities

That's exactly the number of abilities that have the "full" data in FFTP (0x000 Attack - 0x16F Frog Attack). That section isn't big enough to store any more. So... R/S/M doesn't have that data.
Title: Re: FFT Patcher .478 Source Code
Post by: Pride on April 16, 2012, 08:31:04 PM
Would it be difficult to add those two bytes in the patcher? Always 0 but its nice to have something free located in the data itself to add something custom, such as an item defense system.
Title: Re: FFT Patcher .478 Source Code
Post by: Pickle Girl Fanboy on April 16, 2012, 09:35:58 PM
I was wrong in the specifics, but the reason why I wanted it was so this stuff could be used for ASM hacks, and be easily editable in FFTPatcher, without requiring a custom table.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on April 17, 2012, 02:58:53 AM
Right, I understand. Unfortunately there's no ability data for R/S/M to put into FFTPatcher, but it is a good idea to add things into Patcher where we can, if the data exists and Patcher isn't showing it.

To that end... I did wire up Unknown1 (0x06) and Unknown2 (0x0B) as spinners (textboxes with up/down arrows) into the Item section. melonhead had already accounted for their existence (even came up with the awesome names for them), but just didn't show them and/or make them changeable on the form.
Title: Re: FFT Patcher .478 Source Code
Post by: Eternal on April 17, 2012, 03:02:56 AM
I know we discussed this before about the items having two bytes or however they're hardcoded, but I can't recall exactly if you said someone could make the Patcher place WotL Multiplayer items inside ENTDs/Move-Finds/Poaches. If that could be done, I think it's something that should be looked into.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on April 17, 2012, 05:02:40 AM
No, it's not that easy. The data fields are only one byte big. Therefore, they can't accept WotL exclusive items.

The only way you could do it is through ASM hacking... and you'd probably have to use kanji space to redo the item ID arrays for all of those sections. Either that, or find a flag to set that means "This item ID is actually 0x100 + whatever it says!"
Title: Re: FFT Patcher .478 Source Code
Post by: Pride on April 17, 2012, 06:38:58 AM
Is the fourth byte in this data also missing in the patcher?

80063ab8 - Weapon Secondary Data
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on April 17, 2012, 01:45:56 PM
It looks like it. I'll make a spinner for that too.

EDIT - Added it in to my build. The default seems to always be 0xFF.
Title: Re: FFT Patcher .478 Source Code
Post by: Pickle Girl Fanboy on April 20, 2012, 09:40:52 PM
Could you add map previews for ENTD and Treasure/Trap editing, to FFTPatcher?

http://ffhacktics.com/smf/index.php?topic=5660

It doesn't need to be the actual maps, it just needs to be a visual representation of the following:
*height
*unpassable terrain
*1st and 2nd levels where applicable
*water and water depth where applicable
*X and Y axises

Bonus points if it displays where you placed your enemy units in the ENTD section, and where you placed your traps/treasures in the trap/treasure section.

There will be cake if it takes this data from the actual maps themselves, so that people can add their own custom maps to an FFT disc image and have FFTPatcher grab the above data from those maps.

Because, spreadsheets are really lame for previewing maps.  Honestly.
Title: Re: FFT Patcher .478 Source Code
Post by: Elric on April 20, 2012, 09:52:35 PM
This would actually be pretty cool to see happen, tho I dunno the amount of work it would take to do.

(Tho I see it being much more useful if many of the current maps didn't have incorrect values on the FFH main page :P)
Title: Re: FFT Patcher .478 Source Code
Post by: Eternal on April 20, 2012, 10:31:18 PM
While we're on the topic of what-ifs, would there be a way to add a feature that highlights when two units of the same ENTD are on the same tile?
Title: Re: FFT Patcher .478 Source Code
Post by: Pickle Girl Fanboy on April 20, 2012, 11:30:34 PM
While we're on the topic of what-ifs, would there be a way to add a feature that highlights when two units of the same ENTD are on the same tile?
Highlight them both in the ENTD character selection box with, say, yellow; when they are on the same tile, and when you click on one of them?

Or show all occupied tiles/squares/panels on the preview, and then show which units inhabit that square when you click on it?

Which is a better idea?
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on April 21, 2012, 01:11:01 AM
I don't know how to read the map files. Even if I did, we'd be looking at (for each ENTD):

1. Search through ATTACK.OUT until you find this ENTD being referenced
2. Load the map ID from that entry in ATTACK.OUT (without regard to whether or not it actually is referenced anywhere)
3. Load the map data from the appropriate file(s) (???)
4. Formulate and implement an algorithm to somehow show all that map data you mentioned. I really have no idea how the upper level / lower level stuff would work.
5. Find a place to actually put it on the form.

...Ack.
Alternatively, I could just display an image, if the image was for the right map file, and an appropriate image exists. Probably wouldn't show where you put treasure, etc though.

Highlighting names in the ENTD: It sounds doable, although it adds processing.
Title: Re: FFT Patcher .478 Source Code
Post by: Pickle Girl Fanboy on April 21, 2012, 08:57:34 PM
Well, could you create some kind of XML crap that can be edited for people who make custom maps, which they can replace themselves (or someone can write a python script to scan their custom maps, and create the XML)?  FFTPatcher will then use this XML to create the preview, with selectable squares/panels/tiles?

Also, where is the ATTACK.OUT editor?  Would it be a good idea to integrate it - and other tools - into the FFTPatcher suite?
Title: Re: FFT Patcher .478 Source Code
Post by: LastingDawn on April 23, 2012, 07:24:33 PM
A true successor to FFT Patcher! I am glad to see you taking up the mantle of this Glain! These improvements seem really nice!
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on April 23, 2012, 08:56:56 PM
Thanks!

Er, but if you're referring to the most recent suggestions, it's really ambitious and I'm not sure I'm doing that stuff...
Title: Re: FFT Patcher .478 Source Code
Post by: Pickle Girl Fanboy on April 23, 2012, 10:24:27 PM
The code for grabbing these things will probably be a pain in the ass, and you have to know how FFTPatcher gets at files that are in the disc image, so I assume that's what you consider ambitious.  The actual preview only needs to be a 2D grid, made up of color-coded squares with numbers on them.
Title: Re: FFT Patcher .478 Source Code
Post by: LastingDawn on April 24, 2012, 01:59:10 AM
Ah no, I'm referring to the work you've already accomplished. The other stuff if it can be done would just be a topping to the cake.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on April 24, 2012, 02:18:15 PM
LD: Thanks! Glad to hear I'm doing useful stuff!

PGF: Generating the map previews themselves in XML seems pretty laborious (though that wouldn't require modifying code, thus doesn't have to be done by me). I still don't like the idea of searching attack.out to figure out which ENTD ties to which map, as it seems needlessly complicated. (Not to mention, taking the first match seems hokey... what if it's an unused entry?) Maybe yet another XML file tying ENTD to map ID would be useful.

Generating the preview... I guess I just need to experiment with Winforms. I'd have to check the form controls to see if there's something that would let me generate an image-type thing that I could just edit freely (from the code).

You'd also have to have a way to separate upper level from lower level, at least for squares that have both, and define them separately in the XML, as well as a good way to display them.

I actually think integrating the attack.out editor into FFTP is a really good idea... it just seems really difficult. Particularly the image preview thing that you can rotate/etc in the top right.
Title: Re: FFT Patcher .478 Source Code
Post by: Pickle Girl Fanboy on April 24, 2012, 07:17:37 PM
You'd also have to have a way to separate upper level from lower level, at least for squares that have both, and define them separately in the XML, as well as a good way to display them.
No you don't.  Download my spreadsheet and look at how I do it.

http://ffhacktics.com/smf/index.php?topic=5660.0

Or check out the screencaps here:
http://ffhacktics.com/smf/index.php?topic=8735.0
(height of top level)/(height of bottom level)
12/4  /*An example*/

If bottom level is Water, then make background color blue, and change layout as such:
(height of top level)/((height of bottom level)-(depth of bottom level))
9.5/2-2  /*An example*/

If one level is unpassable, then make the level that is unpassable have red text, and give the tile a yellow background.

I actually think integrating the attack.out editor into FFTP is a really good idea... it just seems really difficult. Particularly the image preview thing that you can rotate/etc in the top right.
I was wondering about that, because:
1. You'd have everything a person needs to hack FFT in one package,
2. Improvements to FFTPatcher's code would become improvements to everything that shares that code.
Title: Re: FFT Patcher .478 Source Code
Post by: Elric on April 24, 2012, 07:18:11 PM
Maybe I'm misunderstanding, but wouldn't linking Map ID's to specific ENTD's also only be useful for Vanilla mods?

I mean we already have a map section on the FFH home page that has both the Top and normal map views.
Plus we have Ganesha for anyone that really wants to know the terrain heights.

Like you mentioned, it seems like it might be a bit more work then it is worth. But then again I would say the same
about adding the attack.out editor.  The GUI for that already works quite well, the only thing with attack.out that could use
a easier interface would be the Attack.out Conditions sheet that Xif made, since as of now it is still a spreadsheet,
but even that isn't to hard to manage on it's own.

Something I would like to see tho (for vanilla modders) would be a update to the Resources.zip that would give the correct ENTD names
since some of them aren't actually correct, which has caused some confusion in the help section from time to time.

EDIT:
1. You'd have everything a person needs to hack FFT in one package,

Not really, you would have everything that someone needs to make a vanilla mod. and Not even really all of that... Since most people use thing's like ALMA and such.
To have everything a person needs for a full hack you would also need to implement Worldmap 1.00 and several other tools.
Title: Re: FFT Patcher .478 Source Code
Post by: Pickle Girl Fanboy on April 24, 2012, 07:25:49 PM
Maybe I'm misunderstanding, but wouldn't linking Map ID's to specific ENTD's also only be useful for Vanilla mods?
Yeah, that's why I want it to NOT be hardcoded.  If there was some kind of XML map_resources.zip you could replace, that would generate the previews, that would be good for non-standard map mods.

I mean we already have a map section on the FFH home page that has both the Top and normal map views.
Plus we have Ganesha for anyone that really wants to know the terrain heights.
The x and y values of those maps don't correspond to the true x and y values used in the game.  And opening Ganesha (which uses an incredible amount of RAM) every time you want to edit ENTD or Treasures/Traps isn't feasible - does Ganesha even show x and y values?  How would you know where the enemies are being placed?  How do you know you're not placing them on an obstacle, or in a river (if they have Cannot Enter Water)?
Title: Re: FFT Patcher .478 Source Code
Post by: Pickle Girl Fanboy on April 24, 2012, 07:30:36 PM
Yes they do. I have made over 60 events using these x,y from the main page and they work fine on all but 2 maps. Not sure where you are basing this info off of
*tries to remember why he didn't use those maps (it's been a few years)*
*looks at those maps*
They don't clearly demonstrate which tiles are obstacles.
Also, I don't like downloading and renaming all those web pages, so I can view the first image.  Assuming that the formatting stays intact when downloaded (very doubtful).

http://ffhacktics.com/maps.php?id=12
^Outside of Lionel Castle being the worst offender.
Title: Re: FFT Patcher .478 Source Code
Post by: Elric on April 24, 2012, 07:31:51 PM
The x and y values of those maps don't correspond to the true x and y values used in the game.  And opening Ganesha (which uses an incredible amount of RAM) every time you want to edit ENTD or Treasures/Traps isn't feasible - does Ganesha even show x and y values?  How would you know where the enemies are being placed?  How do you know you're not placing them on an obstacle, or in a river (if they have Cannot Enter Water)?

Yes they do. I have made over 60 events using these x,y from the main page and they work fine on all but 2 maps. Not sure where you are basing this info off of. Also, the maps clearly show all the terrain. And unless something is unpassable, which is usually more then obvious, they can be places wherever you choose without issue. That why they can choose it.

I guess the main issue is that you for some reason seem to think that the x,y on the main page are incorrect, when they are indeed not. Only Lionel Office is off by -1 x,y and the Pub is off by -1 Y.. That's it

And no Ganesha doesn't show X/Y it shows the map. But for someone that really cannot figure out the levels on the maps we already have (dunno why) that would be an option.

As I said, maybe I'm just misunderstanding the purpose of this. For which i apologize.
Title: Re: FFT Patcher .478 Source Code
Post by: Pickle Girl Fanboy on April 24, 2012, 07:33:05 PM
Could you NOT delete your posts in non-spam topics?
Title: Re: FFT Patcher .478 Source Code
Post by: Elric on April 24, 2012, 07:34:48 PM
I was trying to edit it and accidentally deleted it instead and if you look at the one you just replied after, you would see that everything i said in the first one remains in the one i editing and posted again

But way to fuckin flip out over it without even checking first. Bravo on that.
Title: Re: FFT Patcher .478 Source Code
Post by: Pickle Girl Fanboy on April 24, 2012, 07:37:24 PM
If you consider that a "fuckin flip out", then you don't know me very well. ;P

There's no way to save the map images in those web pages.  They seem to be a product of some kind of PHP magic.  So, the person I should be talking to is Xif, I guess.
Title: Re: FFT Patcher .478 Source Code
Post by: Elric on April 24, 2012, 07:38:52 PM
that may be the case, but all those maps are also viewable in EVSP

and I may have misspoken by calling it flipping out, but my edit was posted more then a minute before you said that :P So there WAS time to see that I fixed my error of delting it by mistake (since I've never intentionally delete a reply and normally edit them when needed)
Title: Re: FFT Patcher .478 Source Code
Post by: Pickle Girl Fanboy on April 24, 2012, 07:39:23 PM
What's EVSP?
Title: Re: FFT Patcher .478 Source Code
Post by: Elric on April 24, 2012, 07:41:01 PM
Easy Vent Super Perfect
Title: Re: FFT Patcher .478 Source Code
Post by: Pickle Girl Fanboy on April 24, 2012, 07:41:55 PM
Linux user here - EVSP is a Visual Basic program, and will not work on Linux or Mac.

http://www.mono-project.com/Visual_Basic
^There is a Linux Visual Basic compiler, but your code probably contains calls to Windows specific libraries.  So EVSP is conceivably cross-platform, but probably not, in practice.  This ins't really your fault, because IIRC the Mono cross-platform library is a pain in the ass.
Title: Re: FFT Patcher .478 Source Code
Post by: Eternal on April 24, 2012, 07:45:45 PM
The world does not revolve around Linux users. Don't expect everyone to bend to your whims just because you can't run a certain program.
Title: Re: FFT Patcher .478 Source Code
Post by: Pickle Girl Fanboy on April 24, 2012, 07:46:54 PM
How did this become about my whims?  Didn't you want these features yourself a few posts ago?  And now you're against them?  WTF is going on here?
Title: Re: FFT Patcher .478 Source Code
Post by: Eternal on April 24, 2012, 07:47:53 PM
You're coming off as overly pushy. That's the problem.
Title: Re: FFT Patcher .478 Source Code
Post by: Pickle Girl Fanboy on April 24, 2012, 07:49:32 PM
You're coming off as overly pushy. That's the problem.
Okay then.  Could you say so, next time?  Like, Warn me, instead of posting something like this:

The world does not revolve around Linux users. Don't expect everyone to bend to your whims just because you can't run a certain program.

Getting warned doesn't really bother me (I won't raegquit, I'll just stop whatever it offensive thing I'm doing), but ambiguity does fuck me up, because I don't process it well.  I need to have rules, because I understand rules, and will follow them perfectly.

Also, Xifanie PM'd me the link to the images used in the maps section.
http://ffhacktics.com/maps/
When I start learning a programming language, I'll make a cross-platform tool for previewing maps.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on April 24, 2012, 08:12:13 PM
Elric, the latest FFTP attached to this thread (this post (http://ffhacktics.com/smf/index.php?topic=7163.60#msg171009)) should have updated ENTD names. I changed a bunch of them for the very reason you're describing. Of course, the attack.out editor still has a bunch of wrong ones, but the ones in FFTP itself should be better.
Title: Re: FFT Patcher .478 Source Code
Post by: Elric on April 24, 2012, 08:39:31 PM
Ah very good to know Glain! This will definitely help me out a bit
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on April 28, 2012, 02:58:05 PM
All right, I've added enough features at this point to release a new version, I think. (Rather than just talking about how I have the features on my computer). So, here it is!

Here are the features in .482:

* FFTPatcher can now edit the Unknown 1 (0x06) and Unknown 2 (0x0b) item bytes, as well as Unknown in Weapon Secondary Data (0x03).
* The ENTD in FFTPatcher should display rows that have location conflicts (Same X/Y/UpperLevel) in red (for any units that are not Randomly Present or Sprite Set 00).
* Ctrl+C, Ctrl+V should now work in FFTPatcher in any place where you can right-click and copy, right-click and paste. I didn't add copy/paste to any area that didn't already have it, however.
* The lists of abilities/jobs/items/etc (on the left) in FFTPatcher should now support a type-ahead that will select the first matching list item as you type its name. The hex prefix should be ignored, so for example, if you type "Gran" it will select "015E Grand Cross". You can delete characters from the type-ahead with backspace, or clear it with ESC and start again.
* Added some hacks to FFTorgASM, notably adding Choto's remove zodiac compat hack (I had to restrain myself from deleting that leading nop :)) and fixing a Razele hack, as well as adding some hacks of my own.
* Added a defense (damage percentage reduction) hack to FFTorgASM based on the item 0x06 and 0x0b bytes. (It sounded like a good idea, Pride :D)
* Shishi should have the R999 changes.

* FFTorgASM can now understand ASM and encode/patch it directly! Specify mode="ASM" in a <Location> tag to use ASM instead of the hex encoding. Currently, ASM mode is available for any <Location> tags where the file is specified as SCUS_942_21, BATTLE_BIN, or WORLD_WORLD_BIN. That covers the vast majority of ASM hacks. Support can be added for other files if we know their file-to-RAM offsets.
* Additionally, FFTorgASM can support many psuedoinstructons even if they take multiple lines. The list of psuedoinstructions here (http://en.wikipedia.org/wiki/MIPS_architecture) should mostly be supported. You can also do fun things like lw r2,0x80192d90 and lbu r3,0x801908cc(r4), although these commands always generate the entire address, so this will be less efficient in cases where you can reuse part of the address. Those two statements would become 5 lines of regular ASM, but this example can be done in 4. As a sidenote, these pseudoinstruction patterns are very apparent in FFT's ASM code. Check MassHexASM (also being updated now) to see how these encode/decode.

...I believe that's everything!
Title: Re: FFT Patcher .478 Source Code
Post by: formerdeathcorps on April 28, 2012, 04:48:12 PM
Which Razele hack is it?
Title: Re: FFT Patcher .478 Source Code
Post by: Pride on April 28, 2012, 07:31:13 PM
Awesome ^__^

/me downloads both
Title: Re: FFT Patcher .478 Source Code
Post by: Eternal on April 28, 2012, 07:32:19 PM
I love you Glain. That is all. My only gripe is I'd like it if the Patcher showed if units are on the same X,Y even if they're Randomly Present. Still though, amazing work. :D
Title: Re: FFT Patcher .478 Source Code
Post by: Elric on April 28, 2012, 09:12:45 PM
@Eternal
If they are randomly present you shouldnt have any issues really :P Or atleast from how i understand it, since they at called are different parts in the event.
Often times Not present or randomly present units will just have a starting location of 0,0 since they are moved via a warpunit command and then drawn to the map
in a location different from their ENTD location anyway (atleast in vanilla anyway)

@Glain
Awesome job on this man! I'm gonna check it out some more today  :mrgreen: Loving all these updates
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on April 28, 2012, 10:50:43 PM
Thanks a lot guys!

fdc: I changed "Require Sword - Require Weapons" to edit SCUS instead of BATTLE.BIN. We discussed it earlier in the thread here (http://ffhacktics.com/smf/index.php?topic=7163.80#msg171106). I just never did fix it until now.

Eternal: If you show the conflicts even with Randomly Present, you get tons of red even in vanilla ENTDs. I dunno, that just didn't seem right to me.
Title: Re: FFT Patcher .478 Source Code
Post by: Pickle Girl Fanboy on April 28, 2012, 11:05:18 PM
I think that Eternal means you display Red if there's a conflict (no "Randomly Present"), and then display another color if they're on the same tile, and there's no conflict - just so he can know the maximum possible number of enemies in a battle.
Title: Re: FFT Patcher .478 Source Code
Post by: Choto on April 29, 2012, 04:30:46 PM
Three Cheers for Glain and Item Defense!

Also, do we know exactly what "Second Table" corresponds to in the patcher? I see that the values correspond to all weapons... all shields... all armors... etc. But I'm wondering what they're actually used for in game.
Clarified by Pride, Thanks!

Also, What are the "Sprite Hacks?"
Title: Re: FFT Patcher .478 Source Code
Post by: LastingDawn on April 30, 2012, 02:29:36 AM
Great work! Everything seems to be working up to code!
Title: Re: FFT Patcher .478 Source Code
Post by: Choto on May 01, 2012, 04:53:01 AM
not sure if this one fell through the cracks, but i think its worth putting in there for the next build. Death to monk over-poweredness.

Martial arts is 25% PA boost instead of 50%

Not sure if you saw my question earlier but i'll re-ask it because i dont want it to be lost in the mix, what exactly do the "Sprite Hacks" do?
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on May 02, 2012, 12:09:52 AM
Were the sprite hacks added into the default XML for FFTorgASM recently? If so, I think fdc might know what they are, but I'm not sure.
Title: Re: FFT Patcher .478 Source Code
Post by: formerdeathcorps on May 02, 2012, 10:55:07 AM
I think they're the ones made by Xif that let you use all 8 palettes.
Title: Re: FFT Patcher .478 Source Code
Post by: Pickle Girl Fanboy on May 02, 2012, 09:53:27 PM
Off-Topic: Do those hacks work, bug-free?  Because that's awesome.
Title: Re: FFT Patcher .478 Source Code
Post by: Elric on May 04, 2012, 01:32:30 AM
AFAIK the palette hack works, since I use it in events to make 2 versions of the same non-generic sprite have different palettes, but if this is the
one I'm thinking of, it caused bugs when picking up the crystals/chests of the higher numbered palettes (6-8 ?)
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on May 06, 2012, 03:00:41 PM
Pride pointed out a problem with the ASM encoder in MHA; since the one in FFTorgASM uses the same one, I'm also patching it here. I'm just calling this 482 v2.
Title: Re: FFT Patcher .478 Source Code
Post by: RavenOfRazgriz on August 05, 2012, 06:49:06 AM
Getting some serious bugs with the FFTacText.  I need to do further investigation tomorrow, but it seems that the Ability Names that are supposed to display overhead are being written as blank text data and the Ability Name list is being written to the Post Action Battle Messages because I'm getting things like Brave Up displaying "Death" after use and Break skills displaying "Slow", etc.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on August 15, 2012, 07:05:42 PM
Can we come up with a reproducible scenario for this?
Title: Re: FFT Patcher .478 Source Code
Post by: RavenOfRazgriz on August 15, 2012, 07:50:47 PM
For reference, I fixed this by patching the same .ffttext file with FFTacText .457.  I can edit in .482 but it seems I need to use .457 to patch things after I finish doing my edits.  Either my FFTacText glitched the fuck out from the fact I'd basically rewritten everything inside it, or there's an error in the writing-to-game procedure.

Also, unrelated, not sure if this is true for other versions of OrgASM, but with .482 OrgASM, once I apply ASMs to an ISO, it won't allow me to choose new ASMs and apply them to the ISO without restarting the program.  Visually, I can click the boxes, choose a new ISO to patch, etc., so it looks like it works... but if you actually check the ISO, no edit has been made with your new choices.
Title: Re: FFT Patcher .478 Source Code
Post by: Xifanie on August 15, 2012, 08:24:41 PM
Glain, could you tell me how to setup my Windows to edit FFTP's source? I want to add the MON SHP + SEQ to finally allow spriters to test their monster sprites in shishi. I have already messed with those file format in the past btw.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on August 16, 2012, 03:32:13 AM
I just uploaded the current FFTP source to the Google code page I made for it (I have a separate one from melonhead's original) at http://code.google.com/p/fftpatcher-mod/downloads/list

You basically just need to open the .sln file with a C# IDE. I'm using SharpDevelop, as it's open source. When you compile the project, it builds all the EXEs at once (Patcher, Tactext, FFTorgASM, Shishi), and you navigate to that folder into the bin/ directory to find it. Generally it's bin/x86/Debug in each project folder, I believe.

In theory, you should be able to use source control like SVN to check out all the source code, but I'm having some issues with that, because I used SVN to check out from melonhead's project when I started updating FFTP, and I think SVN still thinks the two are tied together even though I've separated them. So anyway, for now I just uploaded the source as a zip file.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on August 17, 2012, 05:23:10 AM
For reference, I fixed this by patching the same .ffttext file with FFTacText .457.  I can edit in .482 but it seems I need to use .457 to patch things after I finish doing my edits.  Either my FFTacText glitched the fuck out from the fact I'd basically rewritten everything inside it, or there's an error in the writing-to-game procedure.

Also, unrelated, not sure if this is true for other versions of OrgASM, but with .482 OrgASM, once I apply ASMs to an ISO, it won't allow me to choose new ASMs and apply them to the ISO without restarting the program.  Visually, I can click the boxes, choose a new ISO to patch, etc., so it looks like it works... but if you actually check the ISO, no edit has been made with your new choices.

I've heard .457 is the only one that does the PSP changes correctly, too. Maybe there was something changed between .457 and .478 that did something weird when you have large amounts of text changed? The only thing I really changed in the later versions of Tactext was QuickEdit, and that just tells TacText what to change without modifying the patching process, so if that part works I would assume it's a problem from before I started doing anything with it, though I haven't really done all that much testing myself.

That's interesting about orgASM too. I'm not sure I noticed, but then again, I usually just open, select ASMs, patch ISO, and close...
Title: Re: FFT Patcher .478 Source Code
Post by: Eternal on September 21, 2012, 12:36:28 AM
So, random thought. Is there any way we could get a Copy Item function in the next update, if/when that happens?
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on September 21, 2012, 02:29:32 PM
Probably! Copy/pasting one item over another, with ctrl+c/ctrl+v support, like in other sections?

Sounds good.  I haven't edited FFTP code in a while but this certainly sounds doable.  If I get a few more feature suggestions I could make a sizable update out of this; otherwise I guess I could do an update with just this in it (I don't really know of anything else to put in... maybe I just need more suggestions).
Title: Re: FFT Patcher .478 Source Code
Post by: Eternal on September 21, 2012, 07:59:09 PM
Exactly that. I know it'd save me a lot of time, at least.
Title: Re: FFT Patcher .478 Source Code
Post by: Desocupado on September 22, 2012, 01:22:22 AM
We really could use a rename feature for stuff inside the patcher.
(i.e. let me rename the displayed name on the patcher, so skill 002 isn't referenced as "Cure 2/Cura")
Title: Re: FFT Patcher .478 Source Code
Post by: RavenOfRazgriz on September 22, 2012, 02:22:32 AM
Export Resources.zip and edit the files inside it.
Title: Re: FFT Patcher .478 Source Code
Post by: Choto on April 18, 2013, 03:43:09 PM
Apparently the unknown flag under hit allies is "Top down targeting" as referenced by SA:

00179360: 10c00006 beq r6,r0,0x 0017937c      Branch if Top-down Targeting = False
00179364: 00e4102a slt r2,r7,r4
00179368: 14400003 bne r2,r0,0x 00179378      Branch if Low Height < High Height
0017936c: 00000000 nop            (basically target from top down)

Although i'm not exactly sure what this does, just figured i'd make a note of it. It's in the "Check vertical tolerance and if tiles can be chosen" routine: http://ffhacktics.com/wiki/Check_Vert_Tolerance_and_if_Tiles_can_be_Chosen
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on April 26, 2013, 05:02:29 PM
Working list for the next version:

More copy/paste functionality (Items, Animations, Monster Skills, Action Menus, Status Effects, Inflict Statuses, Poaching, Move-Find Item, Propositions)
Rename flag under Hit Allies? (Need to trace routine / decipher what it really does)
Label/group AI bytes in ENTD based on Raven's post (http://ffhacktics.com/smf/index.php?topic=9618.0)
Add one to IDs in Shishi sprite dropdown
Display Shishi frame/animation number in hex
ASM patcher offset mode attribute
Add Effect dropdown to more abilities (Items, Other?)
Fix Proposition default values for level bonuses
Proposition Entries should display * next to name if changed

That's actually still not too much stuff.  I guess "Fix TacText" would be pretty high up on the list, but I'm not really sure what its deal is.  My best bet might be to just try to analyze what was changed in TacText between .457 and .479.  Also, the PSP apparently has problems with everything past .457?

Edit: Updating this post to make my list into a working list for the next version.  I'll update it periodically and bold things that (I think) I have working in my local build.
Title: Re: FFT Patcher .478 Source Code
Post by: Eternal on April 26, 2013, 05:41:00 PM
IIRC, I used the latest Tactext for KO PSP, and it worked fine. You just need to cut away a ton of Kanji and shorten some text in certain files.

Can we incorporate Raven's AI findings into the next version somehow?
Title: Re: FFT Patcher .478 Source Code
Post by: Choto on April 26, 2013, 07:16:59 PM
Should we add one to all the IDs in Shishi so they match the ones in FFTP?


YES. This would actually be supremely helpful to the stuff i'm decoding right now :)
Title: Re: FFT Patcher .478 Source Code
Post by: Choto on April 27, 2013, 09:25:12 PM
pardon the doublepost, just wanted to make sure you saw it :P.

One more request to make the frame/animation numbers display in hex instead of decimal. It would also help with the misc data/animation stuff i'm looking into. I won't be heartbroken if it's not implemented though.. Thanks!

Edit: I mean in ShiShi, not FFTP
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on April 28, 2013, 05:21:10 AM
I've updated my previous post to make it a working list based on the items mentioned here that I'll update as I do things.  Displaying the frame/animation numbers in hex sounds fine, as I imagine nobody relies on those numbers being base 10?
Title: Re: FFT Patcher .478 Source Code
Post by: Choto on April 28, 2013, 04:21:57 PM
Just out of curiousity, what would it take to put weapon sheet frames and animations in there? How do they do it for Type 1 and type 2?
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on April 28, 2013, 06:38:38 PM
Those sound like good questions... I really don't know much of anything about how that works.
Title: Re: FFT Patcher .478 Source Code
Post by: Choto on April 30, 2013, 06:00:26 PM
Just to pack more onto your workload :P The effects tied to item abilities could be added in a drop down menu for their respective abilities like the rest of them. They're actually in the same table of effect ID values. Those would be good to include. Here's my hack that edits those values for referece:

Note: There's an extra 0x0800 flag set with the effect ID for item abilities. There's a routine that checks the flag and returns wether or not it's present in the effect.. so it must serve some kind of function for item abilities.

Title: Re: FFT Patcher .478 Source Code
Post by: Glain on April 30, 2013, 10:45:03 PM
I don't think I understand the difference between this and changing the value of the Effect dropdown in the Abilities tab for those abilities.
Title: Re: FFT Patcher .478 Source Code
Post by: RavenOfRazgriz on April 30, 2013, 10:47:24 PM
Those Abilities don't have an Effect dropdown in the Abilities tab, just an "Item Use" dropdown that says which Item slot each ability is tied to.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on April 30, 2013, 11:02:41 PM
Ah, I see!  The Effect doesn't seem to be editable for the entire ability range from 0x170 - 0x1A5.  Should it be added for all of them, or is there some reason to restrict it to just item abilities?
Title: Re: FFT Patcher .478 Source Code
Post by: RavenOfRazgriz on April 30, 2013, 11:12:24 PM
None of the other skills actually have an animation.

Charge is a weapon attack, Jump is basically a weapon attack with a different string of animation bytes for the unit in question, same with Throw except it animates the item being Thrown as a projective, Math Skill calls entire different abilities and uses those animations.  I'm not sure changing their animations would even DO anything other than maybe crash the game horrifically?  You'd probably want to do a lot of testing with that before making them editable in FFTPatcher.
Title: Re: FFT Patcher .478 Source Code
Post by: Choto on May 01, 2013, 02:07:32 AM
All of those abilities are actually part of the same big table referenced by ability ID. So you can give any ability up to the first support ability an effect. Charge, Jump, etc. are all FFFF. At the end of the table after reaction abilities is actually some event effects.. perhaps those abilities are called in events or something to play the effect. I'm sure they behave in some funny ways though. Like I know all jump abilities default to a certain one regardless of the distance. Items should be safe though =)
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on May 01, 2013, 11:00:47 PM
Is that portion of the effects table (for item abilities) the same in PSP as it is in PSX?  I'm currently operating under the assumption that it is.

Edit: I found the same sequence in the PSP version's EBOOT.BIN.  It looks like they're identical.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on May 03, 2013, 03:56:02 AM
How's this for the ENTD unit view with some new labels/organization?

Title: Re: FFT Patcher .478 Source Code
Post by: Eternal on May 03, 2013, 07:08:11 AM
I love you, Glain.
Title: Re: FFT Patcher .478 Source Code
Post by: RavenOfRazgriz on May 03, 2013, 09:30:20 AM
Needs better space management.

Move the Equipment section under the Skills section.  Move the AI section to the right of the Abilities and Equipment sections, so that the bottom of the AI box is in-line with the bottom of the Equipment box.  Move the Spoils and Unknown boxes into the now-empty space above the AI box.

This would conserve a lot of vertical space on-screen (good for people with small monitors) and minimize the amount of wasted "white" space on the interface.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on May 03, 2013, 12:39:44 PM
Something like so?

Edit: It looks like the AI box has some blank space at the bottom, so I'd probably shrink it a bit and move Spoils/Unknown down slightly so the top of those boxes match vertically with Skills.

Title: Re: FFT Patcher .478 Source Code
Post by: Glain on May 08, 2013, 03:08:39 AM
Also, unrelated, not sure if this is true for other versions of OrgASM, but with .482 OrgASM, once I apply ASMs to an ISO, it won't allow me to choose new ASMs and apply them to the ISO without restarting the program.  Visually, I can click the boxes, choose a new ISO to patch, etc., so it looks like it works... but if you actually check the ISO, no edit has been made with your new choices.

9 month old quote \o/

I just failed to reproduce this.  Do you have a specific case?
Title: Re: FFT Patcher .478 Source Code
Post by: RavenOfRazgriz on May 08, 2013, 05:48:11 AM
That quote doesn't quite describe it properly.

I can USE the program correctly, but when I re-apply the ASMs, nothing actually HAPPENS on the ISO.  It's like once I choose ASMs and apply to ISO once, those settings become "locked" and nothing I change on the Interface seems to matter.  I had it happen a lot when working with the Journey of the Five ISO and trying to debug various versions of custom ASMs we have.
Title: Re: FFT Patcher .478 Source Code
Post by: Choto on May 08, 2013, 12:46:07 PM
I can vouch for this happening too. Pick ASM --> patch ASM--> pick new ASM --> patch new ASM --> new ASM's no work.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on May 08, 2013, 01:59:26 PM
You wouldn't happen to remember specific hacks that cause it to happen? :D

I only tried it on two simple hacks (apply one, then the other), but both of the hacks seemed to be applied when I tried it.
Title: Re: FFT Patcher .478 Source Code
Post by: Choto on May 31, 2013, 11:29:37 PM
2 things, I tried recreating that bug but I couldn't either.. maybe it got fixed inadvertently between versions or something?

Also, could you send me the updated source code for FFTP? I decided to switch my project to C# as it seems alot easier to work with in terms of syntax and... the set of commands.. whatever you would call it lol. Thanks!
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on June 16, 2013, 05:38:58 AM
Since I've effectively frozen the feature list for the next version, I figure I can upload my current version as a release candidate.  This hasn't been tested extensively, so use at your own risk, but testing is, of course, welcome.  The changelog is this post (http://ffhacktics.com/smf/index.php?topic=7163.msg187642#msg187642), earlier in the thread.

I've uploaded the current .483 release candidate source to the Google code page at: http://code.google.com/p/fftpatcher-mod/downloads/list.

(Oops, didn't see your post until now, Choto)

Bugs so far
Faith in spell damage calculations becomes XX% hack with default (Glain.xml) writes to wrong battle.bin location (ack) (Should be 1201F8, not 1201F9).
Shishi form size is too small and you can't scroll down to edit the dropdowns, etc.!
Offset mode attribute in ASM patcher wasn't having any effect

Edit - Uploading my latest version that should fix all the bugs above.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on August 24, 2013, 02:14:56 AM
I've edited the latest post with my latest version that should fix the bugs discovered so far.  Has there been anything else?
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on August 31, 2013, 08:44:24 PM
This is my post for laying out progress/strategies/notes for fixing FFTactext to work like .457 does.

My idea is to find the revision that broke FFTactext, figure out what's different between it and the previous version, and reverse those changes in the current version to end up with the correct logic.

I should be able to find all the changes to FFTP between .457 and .478 by looking at melonhead's revisions on his Google code page for FFTP (http://code.google.com/p/lioneditor/source/list)

These are the revisions that seem relevant so far:
r467 "Change EventUnit initial facings to N-S-E-W" (Changes DTE-related FFTactext logic)
r468 "Write DTE Charmap directly to PSX ISO" (Lots of FFTactext changes) (Doesn't seem to compile)
r469 "Fix some bugs in TextCompression" (Many FFTactext changes)
r470 "bunch crap" (Lots of changes in general, including to FFTactext) (Crash seems to happen in this revision)
r477 "Upgrade solution to vs2010" (Contains various FFTactext changes)

Here's my current strategy for finding the revision that broke FFTactext:

Verify that I can get a specific revision of the code from SVN (Command is: svn checkout http://lioneditor.googlecode.com/svn/branches/imageEditorv2@revision)
Get an ISO that requires [.457?] TacText to patch properly (Jot5)
Compute hash value (MD5) of the ISO (Also do binary diffs)
Get the .ffttext file that works in [.457?], but not .478
Make two copies of the ISO, and patch one with .457, then the other with .478
Verify that the .457-patched ISO has same hash values as original ISO, and that the .478-patched ISO doesn't (No hash values are ever the same.)
Delete the .478-patched version and re-copy the original

For each revision being inspected:
  Get the revision from SVN
  Patch the copy with this revision's version of FFTactext
  Check to see if the produced ISO is different
  Delete the newly patched version and re-copy the original


Current Status
I can't get a version that patches into a working ISO, or anything resembling the original.  Tactext from SVN revision 457 causes the same problem (at least if the DLL I'm copying is right) and so does the "457" that I downloaded (and they produce different ISOs...)

Update: Raven's version of .457 is the same .457 that I already had (which isn't the same as revision 457), and also produces a bad ISO.  It seems as if there must be something wrong with my bin/cue files, but all I did was apply the Jot5 PPF... unless my original image is bad. (But why does the "original" PPF-patched Jot5 work for me then?)

Title: Re: FFT Patcher .478 Source Code
Post by: Glain on December 26, 2013, 07:00:19 PM
If 483 RC v2 is working we can probably just release it as 483 and worry about Tactext later (484 perhaps).  I think 483 v2 is the latest of what I've got, I don't think I've had any other bug reports on it that I can remember, and it's been long enough since I looked at it that trying to figure out what's wrong with Tactext again would require me to basically look at it from the start anyhow
Title: Re: FFT Patcher .478 Source Code
Post by: formerdeathcorps on January 13, 2014, 02:11:51 AM
Glain, some of the hacks currently in development will involve FFTPatcher as an editing tool for their custom hacks.  IN other words, someone may want to use FFTPatcher, but change X and Y to be a list of flags rather than unsigned bytes.  Another example would be someone wanting WotL's job requirement table in vanilla (which would require you to have the offset of said table be variable).  In other words, can you increase the flexibility of FFTPatcher's editing abilities (by adding more things editable in resources.zip) for the next version of the program?
Title: Re: FFT Patcher .478 Source Code
Post by: Elric on February 03, 2014, 10:24:35 PM
I've rewritten the EventNames.xml for the Resources.zip

This will give the ENTD's the correct names based on their Event Names. I've also labeled
the Bravestory events as BS, as the Bravestory uses sometimes different ENTD's when re-watching
scenes. You will notice either "and BS" which means that the ENTD is the same for the Event and
Bravestory, or "BS" which means that the ENTD is for Bravestory only. If you see one without BS,
it means that that ENTD is not linked to the Bravestory.

Title: Re: FFT Patcher .478 Source Code
Post by: Angel on February 03, 2014, 10:54:58 PM
This is fantastically wonderful! Thank you so much for this~
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on February 06, 2014, 11:01:43 PM
I'm uploading the latest version of the 483 RC 2 source with Elric's event name edit baked in.  (That was for the PSX version, right?)
Apparently I can't use the Google code page to create downloads anymore, so I added it here...
https://docs.google.com/file/d/0B2RNjWD9GTwlOXFDODdqN0pER28/edit?pli=1
Title: Re: FFT Patcher .478 Source Code
Post by: Elric on February 07, 2014, 12:45:11 AM
It is indeed for the PSX :P
Title: Re: FFT Patcher .478 Source Code
Post by: A Blood Red Fox on March 13, 2014, 04:57:58 PM
Using version 482_V2 of Shishi, it is impossible to view the third image in "Other Images", and gives this error: http://i.imgur.com/S5u9LGC.jpg

It is also impossible to "Dump all images". The program will dump the first two, then when it gets to the third image it spits out the error and hangs up on it. So it never progresses beyond the third image.
Title: Re: FFT Patcher .478 Source Code
Post by: Elric on March 13, 2014, 05:20:04 PM
Correct, this has been an error for a long time.

A lot of the other images that aren't viewable are winning conditions
which is explained in my tutorial.

One of them is also the worldmap Ramza.
Title: Re: FFT Patcher .478 Source Code
Post by: Grond on March 27, 2014, 11:24:15 PM
Great job on keeping the patcher suite maintained, but there are a few things in FFTPatcher that I think need addressing:

The "Ability Animations" (middle option) in the BATTLE.BIN patching subsection in the Patch PSX ISO dialog erroneously reverts the data at 0x2d3e6-2d40f (at least) back to vanilla defaults. This is actually the first few lines of the in-battle weapon & shield graphics & palette data and should not be overwritten. Please fix this if possible.

Also, could the deep blue "changes highlighting" in the program be made a bit less dark/intense (or make the color user-selectable)? It's too heavily contrasting IMO.

One last thing: would it be too much trouble to add an extra confirmation step (that defaults to No/Cancel) when saving a .fftpatch in a different format (PSX vs PSP) than the format it currently is in?

Thanks in advance.
Title: Re: FFT Patcher .478 Source Code
Post by: Choto on April 24, 2014, 03:25:53 PM
Grond - late response but I'm doing some work on the FFTP tools, i'll try to address the things that you mentioned. The data being overwritten is kind of a big deal so i'll try to fix that.

Elric/SA - Do you know where worldmap Ramza is in the iso? I'd like to see if I can get him viewable in ShiShi. Also if there's any other images that shishi won't load, I can try to add these into it.
Title: Re: FFT Patcher .478 Source Code
Post by: Celdia on April 24, 2014, 04:57:29 PM
If you could find a way to make Shishi load FRAME.BIN, that would be amazing. Sadly I have fuck-all to give you towards finding useful data in there that isn't already in some tutorial thread I made for it.
Title: Re: FFT Patcher .478 Source Code
Post by: Elric on April 24, 2014, 05:41:00 PM
@ Choto, worldmap Ramza is located in WLDMES.BIN. Secondadvent has more info on that.

Also, in case you see this before I talk to you,

Title: Re: FFT Patcher .478 Source Code
Post by: Darkholme on April 30, 2014, 07:17:09 PM
Alrighty.

So, I've just downloaded the newest source code, 0.483RC2, which was posted recently in the thread. Up until now I've been working with the 0.478 with WoTL names copy, which I'm not entirely sure where I downloaded.

I find myself wanting to familiarize myself with the project and get involved. I've got a BSC in Computer Science, and I've been working in the industry for 2 years, during which experience my has been largely in PHP, C#, and Java.

I've been an infrequent user of this forum, but I have contributed a few things here and there.

That said:
Can I get a bit of a summary of how FFTPatcher works? I know you have indexed much of FFT, and that FFTPatcher makes ASM changes to the program.

That said, I'm also looking for a to-do-list for FFTPatcher. Does one exist?

I have some ideas of things that I think could make FFTPatcher better, but depending on the current to do list, they may not be what I would want to work on first.

Do you have a functional code library that can do gets and pulls? like an SVN or Github type of setup?
@Glain: Actually, I would love to sit down and talk to you about some of this stuff in a quicker fashion than on the forum. Could you PM me an alternate means of contact? Skype would be good. I can also do SMS (I use an Android Phone with DeskSMS installed, so I can send texts from my PC).
Title: Re: FFT Patcher .478 Source Code
Post by: Choto on May 01, 2014, 01:02:07 AM
I don't really have much time to go into detail, my schedule is crazy atm with finals coming up other fun RL stuff. I have been playing with the source code for the past couple of weeks though. Glain is more knowledgeable than me with it, and tbh if you have alot of experience in C# you could probably figure the code out better than I could.

Our main form of real-time communication is IRC. Like I said I have barely any time to go into detail right now but pop on and maybe I can fill you in on a couple of things.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on May 01, 2014, 11:42:59 PM
Yeah, I'll try to jump on IRC more regularly so we can discuss.  It's nice to see more interest in maintaining FFTP!  Since more people are starting to work on it, we need to figure out what we're going to do for source control.  Melonhead (the original author) had it on SVN, but since then I've basically just been making modifications on my local machine and uploading the source as a zip file or what have you as necessary.  So yes, we'll need to come up with a solution for that.

That random gear hack (http://ffhacktics.com/smf/index.php?topic=6971.0) that you helped with the concept for was my first ASM hack for the site (and my first post here).  It's been a while!

FFTPatcher (the program itself) doesn't edit ASM; it's more for editing static data in the ISO, and it does use hardcoded addresses.  I'm not entirely sure how it handles different kinds of disc images.  That said, the entire FFTPatcher source includes several different editing programs, including the ASM patcher.

There have been some ideas floating around here for features; there are also a few times I've raised some questions about what would be useful.  Mostly I've been using this thread to keep track of requests, etc.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on July 11, 2014, 03:43:19 AM
I took what I have for 483 R2 and put it out on github here (https://github.com/Glain/FFTPatcher).  I was able to set up Visual Studio to work with it by installing update 4 for VS2012 and the git tools for visual studio, then played around with it a bit and got it to work with my repository.

We should be able to use this for source control.  I spent a while clearing out all the files we didn't need for source control (bin/obj folders, the old .svn folders, and the resources archives), and I think we should avoid committing those files.  If you want to make edits, I think you'll have to make a github account and I can add it as a contributor, and you can link that to your IDE when you connect to the repository.

It would be good if we could get the latest changes into the repository (Choto's edits, once they're working, and maybe lirmont's font updates?) and then use that as a base going forward so we can keep things organized and potentially work on things at the same time.

Maybe play around with it and see if you can connect to the repository from your IDE, and if so I can set it up so your accounts are contributors on the project and we can try getting the edits in there!
Title: Re: FFT Patcher .478 Source Code
Post by: Choto on July 12, 2014, 12:19:08 AM
Thanks much for doing that Glain. I may not get to it for a little while though. Summer job is keeping me busy and the fall looks even busier. But once I get through with the JoT5 hacks i'll move to this!
Title: Re: FFT Patcher .478 Source Code
Post by: Choto on July 27, 2014, 04:15:52 PM
Ok Glain, I was doing some work with the effects editor and I wound up having to update to visual studio 2013 anyway, so now I just need to find out how to connect to git and I should be good to go. I read into it a little bit but again, time is not on my side. Hopefully I'll be able to do this soon and we can get to work :)

Note to self/Glain: Make a note about not being able to switch the skillset of generic human jobs. Rufio said it breaks stuff.
Title: Re: FFT Patcher .478 Source Code
Post by: Choto on November 16, 2014, 03:21:06 PM
Triple post like a boss.

Glain! I managed to connect to GIT finally. I uploaded a commented change to the beginning of FFTPatcher -->Editors-->AllAbilitiesEditor

So I guess now it's just... make your changes and make sure they work before pushing to the repository? Anything else I should be aware of?
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on November 29, 2014, 12:58:13 AM
Looks like I successfully got your changes.  I went into the git shell and just ran "git pull" from my local FFTP project directory and it got your change.  I'm not sure how to do a pull from visual studio... it looks like you can commit from there though.

From what I can tell, "pull" is supposed to get the latest changes from the repository and merge them into your local workspace.  So I'd say that when you're ready to make changes to the repository, do a pull to make sure you have the latest version of everything, and resolve any conflicts that may arise (there probably won't be any most of the time, but when two users edit the same file it can get a bit interesting) before doing the commit.

I think that's about it.
Title: Re: FFT Patcher .478 Source Code
Post by: Xifanie on December 13, 2014, 03:56:37 PM
Does this thing even read FileList.txt?

I tried adding new files to it:
0001685 , >:\EVENT\UNIT2.BIN
0001717 , >:\EVENT\UNIT3.BIN
0001749 , >:\EVENT\WLDFACE2.BIN
0001813 , >:\EVENT\WLDFACE3.BIN

Saved, imported the file back... and nothing. FFTOrgASM was completely ignoring the new settings. I also tried changing the offset of an existing file, and the data was still written at the old offset.

I tried editing Jobs.xml and imported that; it worked just fine.

I really wish I could add my own files... this would save me a lot of trouble. Then again I guess I can write past an file up to my new files. Not the best, but could work.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on December 14, 2014, 02:55:56 AM
It doesn't look like anything in FFTP actually reads FileList.txt, no.  I did find a constant in the code for it (in Resources.cs), but nothing seems to reference the constant.
FFTorgASM seems to translate what's in the File attribute of the <Location> tag by parsing the value to a constant in the Sectors enum:

Code: [Select]
sector = (PsxIso.Sectors)Enum.Parse( typeof( PsxIso.Sectors ), fileAttribute.InnerText )

If we wanted new files to be recognized, I suppose we'd have to modify the Sectors enum, or change the code to look at the text file (if it couldn't find the file in the enum?).  I actually wasn't even aware that the text file existed.

And yeah, I doubt anything would stop you from just writing past the end of a file into another file, although it seems the positions of sectors in the ISO may change based on the ISO type... (see IsoPatch.cs)
Title: Re: FFT Patcher .478 Source Code
Post by: Grond on May 15, 2015, 01:17:00 AM
Posting these two patches in here as requested.
Code: [Select]
<Patch name="Half of MP multiplies MP cost by XX / 128">
<Description>Make sure to fill in both X values for the drop-down box below
(with the same value; one affects displayed MP cost and the other affects actual MP cost).

90% is X = 74
83% is X = 6B
80% is X = 67
75% is X = 60
70% is X = 5A
66% is X = 56
60% is X = 4D
50% is X = 40 (default)
40% is X = 34
33% is X = 2B
30% is X = 27
25% is X = 20
20% is X = 1A
17% is X = 16
10% is X = 0D
If you want the multiplier to be greater than 100%, add 0x80 to the above number.</Description>
<Location file="BATTLE_BIN" offset="f2f90">
f800a88f
0d009190
05000011
</Location>
<Variable name="X" file="BATTLE_BIN" offset="f2f9c"/>
<Location file="BATTLE_BIN" offset="f2f9d">
  000234
19005100
00000000
12100000
c2890200
92060608
00000000
</Location>
<Location file="BATTLE_BIN" offset="f3000">
80004230
06004010
00000000
</Location>
<Variable name="X" file="BATTLE_BIN" offset="f300c"/>
<Location file="BATTLE_BIN" offset="f300d">
  000234
00000000
19004400
12100000
c2210200
dcf60508
00000000
</Location>
<Location file="BATTLE_BIN" offset="116b60">
00680508
00000000
00000000
00000000
</Location>
<Location file="BATTLE_BIN" offset="11aa34">
e4670508
00000000
00000000
00000000
00000000
</Location>
</Patch>

Code: [Select]
<Patch name="Short Charge multiplies ability CT by XX / 128">
<Description>Make sure to fill in both X values for the drop-down box below
(with the same value; one affects displayed CT and the other affects actual CT).

90% is X = 74
83% is X = 6B
80% is X = 67
75% is X = 60
70% is X = 5A
66% is X = 56
60% is X = 4D
50% is X = 40 (default)
40% is X = 34
33% is X = 2B
30% is X = 27
25% is X = 20
20% is X = 1A
17% is X = 16
10% is X = 0D
If you want the multiplier to be greater than 100%, add 0x80 to the above number.</Description>
<Location file="BATTLE_BIN" offset="f3028">
f000a98f
01000234
05002215
</Location>
<Variable name="X" file="BATTLE_BIN" offset="f3034"/>
<Location file="BATTLE_BIN" offset="f3035">
  000234
19005000
00000000
12100000
c2810200
9d060608
00000000
</Location>
<Location file="BATTLE_BIN" offset="f3050">
05004010
</Location>
<Variable name="X" file="BATTLE_BIN" offset="f3054"/>
<Location file="BATTLE_BIN" offset="f3055">
  000234
19005200
00000000
12100000
c2910200
1cf20508
00000000
</Location>
<Location file="BATTLE_BIN" offset="115864">
14680508
00000000
00000000
</Location>
<Location file="BATTLE_BIN" offset="11aa6c">
0a680508
00000000
00000000
00000000
00000000
</Location>
</Patch>
Title: Re: FFT Patcher .478 Source Code
Post by: Choto on December 14, 2015, 02:50:01 AM
Okay, been a long time. I've been playing with the patcher source code over the past year or so and added some stuff. I'm hoping there aren't too many issues and please let me know if there are, and I will fix them up if possible. I don't have an extensive changelog but here's the general rundown:

FFTOrgASM
-The program now loads all files into a listbox on the left hand side. There's also an "All" option to view a master list of all patches in all files. When the patch button is clicked, it will patch whatever patches are selected in the right hand side listbox. This means if you select patches in "All" and then switch to a specific file and patch from there, only the patches from that file will be applied.
-The program now reports any file that did not load correctly because of formatting errors. It also tells you generally where the error is, but in a dumb way unfortunately.
-The program now patches to savestates. It won't patch to any file that's not loaded into the RAM of the savestate already though. You have to patch iso for that.
-The conflict checker is built in just for convenience.
-I've tried to compile all the ASM's i could into the default hacks, so there should be some more in there along with fixed versions.

FFTPatcher
-Now Patches to SaveState same as FFTorgASM
-Item Effects are now editable.. I can't remember if they were or not in the last version.

ShiShiSpriteEditor
-MON, RUKA, and both of Altima's forms animations are viewable.
-WEP frames and animations are viewable... but I'm pretty sure they don't load correctly.

FFTacText
-I think I messed with this a little bit looking for the .dte error but didn't get anywhere. I recommend using the last known working version which I think is the one included in .457?

I think that's all. May not be perfect or have bugs but I hope it helps. I didn't want it to continue sitting on my hard drive out of reach of people who could use it. Let me know if you encounter bugs and I'll try to list them and fix them.

Edits: Seems like Jumza is having trouble opening them. I should mention that you need to update your .net framework to 4.5 for the new FFTorgASM.
Title: Re: FFT Patcher .478 Source Code
Post by: Jumza on December 14, 2015, 03:13:42 AM
That's totally sick dude! I'll try this out ASAP and let you know what I find!
Title: Re: FFT Patcher .478 Source Code
Post by: Xifanie on December 14, 2015, 12:34:10 PM
Really nice stuff, although I wish you would've also included Throw/Jump/Math Skill Effects as those are still useable in events without sacrificing an active ability slot. :p

Omg @ Shishi: How the hell did you figure out the SEQ format? I was never able to.
Spriters gonna be happy!
Title: Re: FFT Patcher .478 Source Code
Post by: Elric on December 14, 2015, 12:37:39 PM
Dat Choto though <3
Title: Re: FFT Patcher .478 Source Code
Post by: Valkirst on December 15, 2015, 03:39:59 AM
These are fantastic updates, I really could use the animations for those other sprites.  :mrgreen:
Title: Re: FFT Patcher .478 Source Code
Post by: Argy on December 15, 2015, 04:31:18 PM
Great work Choto!! Choto, is there anything he can't do!! Keep up the great work.
Title: Re: FFT Patcher .478 Source Code
Post by: nitwit on July 21, 2016, 02:20:58 AM
Necrobump, but could someone put this link in the first post?

https://github.com/Glain/FFTPatcher

@Maintainers: if I were to add an optional frame for previewing ability damage and hit percentage as you modify the x/y values for it, and a frame that previews stats at specific levels you can choose as you modify growth and multipliers, how would you prefer it done?  Not saying that I'll do it, but I've been thinking about it.
Title: Re: FFT Patcher .478 Source Code
Post by: Darkholme on July 31, 2016, 10:02:41 PM
FFTPatcher is now on GitHub.

Nice, about time!

I see some updates have been made, So, when is the next release going to be? And where are the compiled uploads on there like most other GitHub repos?

The newest one I've got a is 0.489
Title: Re: FFT Patcher .478 Source Code
Post by: Elric on August 01, 2016, 01:36:57 AM
It's been on github for over 2 years.
Title: Re: FFT Patcher .478 Source Code
Post by: Darkholme on August 03, 2016, 03:28:42 AM
Oh. I remember people talking about it a few years back (probably 2011 or so), and then I thought nothing came of it.
Title: Re: FFT Patcher .478 Source Code
Post by: Emmy on September 18, 2016, 07:53:20 PM
Reporting a bug with FFTorgasm's Conflict Checker.  I had 2 hacks that were written to the same location that the program didn't pick up on.  Any chance of a fix of this?

Here's an example of 2 conflicting hacks it doesn't pick up on:



Note how they both write to 0x11f204
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on October 02, 2016, 07:24:37 PM
*Whistles*
Title: Re: FFT Patcher .478 Source Code
Post by: Elric on October 02, 2016, 09:08:45 PM
Whoa great job Glain! Are you planning to make anything else avaliable in shishi, and when can we expect the next update?
Title: Re: FFT Patcher .478 Source Code
Post by: Argy on October 03, 2016, 06:29:12 PM
Wow Glain. That is brilliant. Keep up the good work. The amount of time that this will save will be brilliant!!
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on October 04, 2016, 01:13:25 AM
I can see what other files I may be able to add in there... I'm currently experimenting with EVTCHR and EVTFACE, which would have to be split into sections in Shishi. Are there any specific files that we want to see added in there?

I should mention that I changed the way Shishi deals with 4bpp (16 color) paletted bitmaps in the Other Images section, because the way it was working before was... strange, to say the least. (Exporting the images as GIFs, getting the background color wrong, saving the palette in an arbitrary/random order, oh my!) 

You'll see in the screenshots that there's a "Palette" dropdown for FRAME.BIN and ITEM.BIN. Shishi now imports or exports those images into 4bpp paletted bitmaps with whatever palette you selected, and the imported/exported file should only have that one palette in it. I experimented with allowing an option that would allow you to have all the palette data in one bitmap, but there's really no way to specify multiple palettes in a bitmap as far as I'm aware. We could provide an option to download as an 8bpp (256 color) paletted bitmap, which would allow you to cram all the colors of 16 palettes into one huge 256-color palette, but the image would always display in the first palette, the exported image data would be double the size, and you're still out of luck if you go beyond 16 palettes (FRAME.BIN, for example, has 22), so I didn't want to go there.

As for an update, I've already updated the Git repository, so in theory anyone could check it out whenever, but you may have to compile the code first.  I could do a local build and release it whenever, really.
Title: Re: FFT Patcher .478 Source Code
Post by: Argy on October 09, 2016, 09:41:30 AM
Glain, a local build would be absolutely brilliant. (I was looking for it on GitHub and couldn't find it. It's just me!!) I have been using Tilemolester for a while and its hard playing with the palettes).

The beautiful thing will be, being able to use Graphics Gale and change the type of sword for example and then recolor it to suit. I am sure this is true for quite a few people. Also being able to make quick changes in the FRAME.BIN as well, will be nice.

Once again, well done on this. :) 
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on October 16, 2016, 06:14:50 PM
All right, so I'm now releasing FFTPatcher suite v0.491, which includes all my recent changes to Shishi, as well as a few other changes! I made a release for it on the online repository here (https://github.com/Glain/FFTPatcher/releases/tag/v0.491), which also includes the release notes. Tell me what you think and let me know if you find anything wrong with it!
Title: Re: FFT Patcher .478 Source Code
Post by: Argy on October 16, 2016, 06:34:25 PM
Argy quietly downloads......
Title: Re: FFT Patcher .478 Source Code
Post by: Emmy on October 16, 2016, 07:21:04 PM
Quote
Removed the checkboxes. They had no purpose (and took a long time to render when switching tabs!)

Thank you for this! :)

Quote
Fixed various issues with the ASM encoder.

Does this include the bug that I found where 2 hacks that are incompatible with each other might not be found by the Conflict checker?

Anyway thank you for the new Patcher! :)
Title: Re: FFT Patcher .478 Source Code
Post by: Xifanie on October 16, 2016, 07:37:52 PM
The conflict checker was made by Choto. The encoder is what turns ASM into hex. If you look at Glain's xml file you'll see all his hacks are stored as ASM in it. He coded that feature entirely on his own as melonhead did not.

*checks out the new shishi*

EDIT: ALL the new features! I really love the ability to easily individually import/export EVTCHRs, BONUS.BINs, And the option to import individual UNIT.BIN frames is pretty awesome too. It all seems to work very well.   :mrgreen:
And I'm really REALLY happy that you separated the ITEM.BIN "Orbonne Monastery" from the maps list. We could never tell which one was which and that was really annoying. (And I do like that ITEM.BIN still has the Orbonne Monastery part since it's part of the same image, and that suits my purposes)

I'm surprised some old issues still persist though:

Those improvements really kick ass though. We've been wanting for them for a long time. \o/
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on October 16, 2016, 10:14:56 PM
Thanks! Glad to hear it's working for you!

Thanks for the feedback as well about some problems with the OPNTEX and OPNBK images. I hadn't looked at some of that image data closely. I've updated the release to fix those issues!
Title: Re: FFT Patcher .478 Source Code
Post by: Elric on October 19, 2016, 10:25:43 AM
Great job Glain, I tested it with WotL (for some ungodly reason) and it turns out you are missing a few EVTCHR, there are 2 or 3 more sheets that extend past the PSX version of EVTCHR.BIN which are used for Luso and Balthier.

Also there seems to be a lot of blank space in many of the images for the PSP version.
Title: Re: FFT Patcher .478 Source Code
Post by: CONMAN on October 19, 2016, 09:38:24 PM
Just wanted to say thanks a bunch Glain!  This update makes modding a lot easier!
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on October 19, 2016, 10:11:55 PM
Thanks, glad to hear it!

I added the additional EVTCHRs to the PSP version and updated the release... I think there were six additional EVTCHRs.  And yeah... I noticed that about the image sizes too, where the images had a lot of blank space, but it was that way in the older versions of Shishi as well, and I assume that's just the way those images are in the PSP version for whatever reason.  Some of the PSP images also use a different transparent color and even different color depth than the PSX version.
Title: Re: FFT Patcher .478 Source Code
Post by: Xifanie on October 19, 2016, 10:23:51 PM
I'm not one who's really using FFTPatcher all that much, but I know that looking at a heavily altered mod's FFTP data, such as JotF, there's blue everywhere... it's pointless and irritating. In fact, I'm not even sure why the "blueing" is there to start with, and I kinda wish it were gone?

And a personal request: in the credits, edit this appropriately >_>; "ZodiacFFTM: For his awesome Excel spreadsheets on which this application was based"
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on October 22, 2016, 01:32:51 AM
All right, so I've updated the release yet again with those changes as well.

The way I handled the colors for modified values was to make them configurable by adding a Settings.xml.  Set the UseModifiedColor node Value attribute to false if you don't want the colors changed at all, or you can configure the foreground and background colors used by editing the RGB values.  I also changed the default color to be lighter and hopefully not contrast as much.
Title: Re: FFT Patcher .478 Source Code
Post by: Xifanie on October 22, 2016, 01:44:02 AM
Hell yeah Glain, you're the best! :D
That bothered me for years!
Title: Re: FFT Patcher .478 Source Code
Post by: Xifanie on October 22, 2016, 07:48:51 AM
One small issue with this new feature; FFTOrgASM tries to parse Settings.xml. Might want to have FFTPatcher parse it as xml while the extension isn't xml? Idunno.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on October 22, 2016, 04:42:56 PM
Thanks! :D
Okay, so I dealt with the new issue by moving all the XML patches to their own XmlPatches directory, and that's the directory that gets scanned now.  New release up yet again!
Title: Re: FFT Patcher .478 Source Code
Post by: Xifanie on October 22, 2016, 04:58:51 PM
Actually, I think I prefer it that way. Less clutter. Good idea Glain!
Title: Re: FFT Patcher .478 Source Code
Post by: Xifanie on October 23, 2016, 01:27:07 PM
Actually, while we're on the subject of improving FFTPatcher...
Abilities 0x017E to 0x01A5 are missing the ability to edit their effect
The 0x0800 flag is "animate effect on item impact". I can't put it in a better way... it's used by chemist items and Ninja balls, yet just makes the game hang if you try to get it to work with anything that doesn't use an item.

Otherwise you already fixed the animation tab...

The "Monster Skills" tab says "Beastmaster" in the PSX version

On the "Move-Find Item" tab, looking at the code, the first flag 0x80 would be "Higher Elevation" not "No Activation"
Title: Re: FFT Patcher .478 Source Code
Post by: Elric on October 26, 2016, 11:00:55 AM
A couple more things Glain,

1) Are you sure that WLDFACE4.BIN holds the images you have associated with it in Shishi? From my understanding WLDFACE4 is unused, and EVGRP doesn't even require you to load WLDFACE4 to see those images IIRC.

2) While I can add in different memory card images now, they don't seem to work. If I load from one of my saves, I can save all 15 slots on the memory card (or even a new memory card) but in the memory card screen after ejecting the disc (I'm using pSX) it still shows all the old images?

Hoping you can get that fixed since Twin just spent a bunch of time making our new memory card icons for Jot5 :(
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on October 26, 2016, 11:22:11 PM
1) Yeah, I mean, the image data in the WLDFACE4.BIN section is pulling from there. And yeah, it's duplicate data. It's just a copy of the final 40 entries of WLDFACE.BIN, and probably doesn't get used for anything. But yes, Shishi is pulling that image data from the sector enumerated as EVENT_WLDFACE4_BIN (6314), which to my understanding is where WLDFACE4.BIN is. (WLDFACE.BIN is at sector 6330, so it's not just looking at the end of that file.)

2) I... am not sure why that doesn't work. I mean, if you open your disc image in Shishi and it pulls in the new memcard images, they must have been changed in your disc image's CARD.OUT file (you could verify this by exporting the file and checking the differences with the original). Why that wouldn't correspond to the images actually changing in the memory card screen is another question... do we know when the image to be saved to the memcard is loaded from the disc image? Could it be saving an image that it already loaded before the change was made in Shishi?
Title: Re: FFT Patcher .478 Source Code
Post by: Xifanie on January 01, 2017, 02:03:46 PM
I was wondering... what is DefaultHacks.xml?

One of Razele's hacks is present in DefaultHacks.xml, but not Razele.xml.
One of Razele's hacks has the same hack in DefaultHacks.xml AND Razele.xml, but they're different versions and there's no way to tell which is the good one!

I'm just trying to make some sense out of all this because I think ASM hacks in FFTOrgASM requires one hell of a makeover. I really, really want to be able to group hacks by category, such as [Formula], [QoL] (Quality of Life), [RSM] and so on.

I was thinking of either manually adding those tags in the patch name and have the "All" section automatically reorganize in alphabetical order, or implement a tag feature.

I was also thinking about adding an Author tag, but that's not as important.

Code: [Select]
<Patch name="Cross Skip v3" tags="Quality of Life, SpeedUp" authors="Xifanie">
<Description>Holding X (Cross button), will fly you through dialog text as if you were mashing the button.&#13;&#10;&#13;&#10;by Xifanie</Description>
<Location file="BATTLE_BIN" offset="CA6C4">
1780023C
D097428C
CE400508
0480033C
</Location>
<Location file="BATTLE_BIN" offset="CA33C">
D3400508
</Location>
<Location file="BATTLE_BIN" offset="C8BC8">
EC400508
0480023C
</Location>
<Location file="BATTLE_BIN" offset="CB6F0">
DC400508
032C0500
40000831
02000015
25400000
A800A897
1780013C
D4DA37A4
D6DA3EA4
D8DA30A4
E0DA22A4
E2DA23A4
</Location>
<Location file="EVENT_ETC_OUT" offset="210">
E040050C
1780013C
</Location>
<Location file="EVENT_ETC_OUT" offset="258">
E040050C
1780013C
</Location>
<Location file="EVENT_ETC_OUT" offset="2A0">
E040050C
1780013C
</Location>
<Location file="EVENT_ETC_OUT" offset="2E4">
E040050C
1780013C
</Location>
<Location file="EVENT_ETC_OUT" offset="320">
E040050C
1780013C
</Location>
<Location file="BATTLE_BIN" offset="E9338">
4459638C
20014230
40006330
B5C50408
25104300
0480023C
4459428C
6400278D
40004230
02004010
FC00E230
03004734
D1C40408
00000000
0480083C
4459088D
BEC90408
00000000
54E4238C
00000000
07006014
0480023C
4459428C
00000000
40004230
02004010
00000000
FF7F1026
0800E003
3840228C
4459428C
00000000
40004230
04004010
1680023C
25A80000
1780013C
04A420A4
F4BE0408
885F428C
</Location>
</Patch>
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on January 02, 2017, 06:24:37 AM
Yeah, I don't really know what's going on with the organization of the hacks.  Not sure about DefaultHacks.xml either.  I basically just left it using the same scheme it already was.

I suppose the hacks could be organized however; a tag system could be a good idea, although I wonder how it would work in the interface.  Would there be a pre-set list of tags you could select?  Maybe you could search by tag?  Would the left menu be a list of tags instead of file names?

Since we're working with XML files here, in true XML fashion, when you have more than one element that can be specified in a category, instead of doing something like tags="Quality of Life, SpeedUp" it would probably be this sort of thing as a child node:

<Tags>
  <Tag>QoL</Tag>
  <Tag>SpeedUp</Tag>
</Tags>

Same for authors, if you wanted to support specifying more than one.
Title: Re: FFT Patcher .478 Source Code
Post by: Xifanie on January 02, 2017, 06:46:44 AM
I suppose we should go with standard XML, yeah. Just never been a fan of the format. :p
I don't think I'd have too much trouble adding Tags/Authors support to my hack spreadsheet in that format, thankfully.

I was thinking of grouping by tags, and leaving the option to view individual files at the bottom... although I don't see how it would be all that useful after everything would be ordered by tags. It could be useful until we manage to more or less implement and standardize the tag system, so that everything is finally nicely ordered.

I also had another silly thought: adding a credits generator button. Copying to clipboard the list of authors and their relevant hacks so that you can easily copy/paste into your mod's main topic.
But you know, that would just be giving in to human laziness. :/
Using a hack is not nearly as hard as making it... you'd think people would at least try to properly credit people for their work, but instead it's only a minority that does. Sad.

Which makes me think: prior to the current release, my XML had Choto's Mime hack in it, and fdc completely removed my Weapon Strike Fix hack (which was a misnomer, I'll admit), to replace it with his Elemental Fix hack thing, which COMPLETELY disables the features that I've built in MY hack (which allows to choose between weapon/ability elementals). Yeah, when I learned that, I was pretty fucking pissed. So I bet people have not used my hack in years because it was gone.

Thanks a lot fdc :|
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on January 09, 2017, 02:12:50 AM
Hmm... yeah :/  ASM hacks shouldn't be disappearing like that.

I have a feeling that most people just wouldn't press the credits generator button if it existed :D although who knows.

Are the XML patch files that are in the current release the right ones or are there some updated ones that I should replace in the source?
Title: Re: FFT Patcher .478 Source Code
Post by: Xifanie on January 09, 2017, 06:15:21 PM
They probably wouldn't press the button; just wishful thinking.

The xml files are fine AFAIK. I just don't know where DefaultHacks.xml came from; it wasn't there in .489.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on January 09, 2017, 11:52:29 PM
I think I know what happened with DefaultHacks.xml.  It's been in the source forever, but it wasn't being included in the released builds because it was set to not copy to the output directory.  At some point, perhaps around the .491 release, I probably noticed it wasn't being copied and figured it was supposed to be, so it was included in 491.

DefaultHacks.xml seems like mostly an old version of Razele.xml, but there are a few (broken with load delay issues) hacks in DefaultHacks.xml that don't seem to have an equivalent in Razele.xml, namely:

Defending reduces physical damage by 25%
Float weak against Wind; Oil weak against Fire
Formula 4E hack

That said, they'd have to be rewritten anyway to work correctly.  I suppose they could either be fixed and included in Razele.xml or just deleted from the source.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on January 11, 2017, 11:29:37 PM
I'm now releasing FFTPatcher suite v0.492! It includes... mostly a bunch of changes to FFTorgASM, but I think I've fixed some pretty signficant things with it, including the intermittent problem where it sometimes wouldn't patch, the problem with variable values sometimes being wrong, and the form resizing problem.  It also now checks for potential ASM hazards within patches and highlights ones that have them in red.  I also included a few other small changes. 

I added another release on the online repository for 0.492 here (https://github.com/Glain/FFTPatcher/releases/tag/v0.492), which also includes the release notes!  Let me know what you think and/or if you find any bugs!

(Edit: MassHexASM (http://ffhacktics.com/smf/index.php?topic=7130.0) has also been updated with the latest ASM encoder/decoder changes.)
Title: Re: FFT Patcher .478 Source Code
Post by: Emmy on February 02, 2017, 05:10:58 PM
So I'm confused.. Don't see any reason why these 2 hacks would conflict unless I'm looking over something incredibly dumb, but conflict checker has them marked as conflict:

http://i.imgur.com/ksvtv5d.jpg

http://pastebin.com/Uquz01eP
Title: Re: FFT Patcher .478 Source Code
Post by: Xifanie on February 02, 2017, 11:09:47 PM
They don't.

It's probably checking:
[116B6C - 116B70] VS [116B70 - 116B78]

instead of:
[116B6C - 116B6F] VS [116B70 - 116B77].

Thus creating an imaginary conflict.
Title: Re: FFT Patcher .478 Source Code
Post by: RavenOfRazgriz on April 01, 2017, 12:39:24 AM
Since Glain develops this from time to time, here's some requests/suggestions for whatever future updates may come:

FFT OrgASM:
The left window which lists the .xml files - please make this control behave more like its counterpart on the right - a checkbox where you can click to show the contents of every .xml you're interested in on the right, with an "All" option that checks all the options for you.  The current method is nice but also a bit obnoxious at times - especially because it doesn't default to "All" being loaded, nor can you load an option by clicking the white space next to the .xml's name.  A checkbox setup similar to the method used to choose which hacks are going to be applied would streamline what you've done greatly.

ShiShi:
I know this one's probably obnoxious, but at some point, can the default resources for ShiShi use base-0 for the listings of Character Sprites, Formation Sprites, etc.?  Not only are things like UWEntries base-0, but even the values shown in FFTPatcher are base-0, as one might expect the game data itself to be, etc.  ShiShi is the odd exception that indexes all these things in base-1 and it requires constant mental conversion if you're, say, debugging a list of changes to UWEntries.  It's not a big deal for a user only making one or two changes but its obnoxious for anyone attempting anything on a larger scale.

Otherwise I really like what I've seen from .492 so far.  Good work.  Both of my suggestions are mainly just usability quibbles, really.
Title: Re: FFT Patcher .478 Source Code
Post by: Raijinili on April 01, 2017, 12:44:40 AM
I suppose the hacks could be organized however; a tag system could be a good idea, although I wonder how it would work in the interface.  Would there be a pre-set list of tags you could select?  Maybe you could search by tag?  Would the left menu be a list of tags instead of file names?

Since we're working with XML files here, in true XML fashion, when you have more than one element that can be specified in a category, instead of doing something like tags="Quality of Life, SpeedUp" it would probably be this sort of thing as a child node:

<Tags>
  <Tag>QoL</Tag>
  <Tag>SpeedUp</Tag>
</Tags>

Same for authors, if you wanted to support specifying more than one.

I had the same thoughts (about authors and tags), but why is a <Tags> wrapper needed? Is this some XML style thing I'll regret asking about?

Another feature I wanted was `endian="little"` (or "big" or "auto") for the locations.
Title: Re: FFT Patcher .478 Source Code
Post by: Emmy on April 19, 2017, 04:34:41 PM
Suggestion: Any chance that you can make Patcher more consistent with its use of hex and decimal values?  Ideal: an option to toggle between use of hex/decimal values for all boxes under "file" (where the program will convert between them if you click the other option).  If that's not possible, make it only use hex?
Title: Re: FFT Patcher .478 Source Code
Post by: RavenOfRazgriz on April 19, 2017, 05:31:05 PM
Suggestion: Any chance that you can make Patcher more consistent with its use of hex and decimal values?  Ideal: an option to toggle between use of hex/decimal values for all boxes under "file" (where the program will convert between them if you click the other option).  If that's not possible, make it only use hex?

Standard form for tools like FFTPatcher is to use Decimal for known values (ie Multipliers and Growths on jobs, X/Y tile locations, etc.) and Hex for index values (Sprite ID, Unit ID, Job ID, Skillset ID, Item ID, Ability ID, etc.).  The problem with FFTPatcher is that it isn't always consistent even on these rules.  It's been a long time since I've reached my fist into the guts, so I can't think of examples off the top of my head, but I remember it having issues in not always consistently casting data types in the GUI following this rule.  If those could get fixed, it would be nice, but someone would have to dig through FFTPatcher and find all the examples of stuff that needs fixing since Glain just inherited Melonhead's mess.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on April 25, 2017, 03:45:40 PM
I know this one's probably obnoxious, but at some point, can the default resources for ShiShi use base-0 for the listings of Character Sprites, Formation Sprites, etc.?  Not only are things like UWEntries base-0, but even the values shown in FFTPatcher are base-0, as one might expect the game data itself to be, etc.  ShiShi is the odd exception that indexes all these things in base-1 and it requires constant mental conversion if you're, say, debugging a list of changes to UWEntries.  It's not a big deal for a user only making one or two changes but its obnoxious for anyone attempting anything on a larger scale.

I took a look at this - to be clear, this is for the dropdown in the Other Images section where you select a specific image inside a category?

The general format of an entry in that dropdown is "{LeadingNumber} - {Name}".  If {Name} isn't specified for a specific entry in the source XML file, then {Name} uses the format "{CategoryName} ({TrailingNumber})"

I could change {LeadingNumber} to two-digit hex starting at 0, which would be more in line with what FFTP does (and UWEntries, for that matter).  As for {TrailingNumber}, I could also change that to start at 0, but maybe leave it decimal.

Some directly specified {Name} values within the input XML contain their own specific numbers starting at 1 (e.g. WLDTEX1).  Not sure if those would be worth changing.

To be consistent, I could also use base-0 for the Palette dropdown in the same section.

Standard form for tools like FFTPatcher is to use Decimal for known values (ie Multipliers and Growths on jobs, X/Y tile locations, etc.) and Hex for index values (Sprite ID, Unit ID, Job ID, Skillset ID, Item ID, Ability ID, etc.).  The problem with FFTPatcher is that it isn't always consistent even on these rules.  It's been a long time since I've reached my fist into the guts, so I can't think of examples off the top of my head, but I remember it having issues in not always consistently casting data types in the GUI following this rule.  If those could get fixed, it would be nice, but someone would have to dig through FFTPatcher and find all the examples of stuff that needs fixing since Glain just inherited Melonhead's mess.

Right, this is how I understand the general idea as well.  I don't like the idea of having a universal toggle. (IDs in decimal are fine, but why display something like Evade % in hex?) If it's not consistent in places, we can change specific values as they come up.  I don't know of any off the top of my head, so as you've said, somebody would have to find the values they want changed and list them out.

Another feature I wanted was `endian="little"` (or "big" or "auto") for the locations.

Is there a practical application behind this?

This would require some way to separate the bytes into groups to then apply the byte ordering on.  We could either use a delimiter between groups (the delimiter could just be a newline), or require a specified, uniform number of bytes per group.

If implemented, the only thing this would do is check for endian="big" and if so, reverse the bytes in each group.

I had the same thoughts (about authors and tags), but why is a <Tags> wrapper needed? Is this some XML style thing I'll regret asking about?

It's just standard XML format.  It would allow for more information to be added to the tags per item if necessary, although maybe that isn't needed.
It could be done as CSV (comma separated) within an attribute as well, as was first suggested.  That can get dicey if you want to put a comma inside a tag name, but the same can be said for < and > characters inside XML tags (although you can escape those using CDATA).
Title: Re: FFT Patcher .478 Source Code
Post by: RavenOfRazgriz on April 25, 2017, 05:21:53 PM
I took a look at this - to be clear, this is for the dropdown in the Other Images section where you select a specific image inside a category?
Actually, never mind this one.  I was talking about the main Sprite page, but I apparently still had a .482 FFTPatcher loaded when posting this.  I just checked and it's fixed in both .491 and .492.
Title: Re: FFT Patcher .478 Source Code
Post by: secondadvent on May 08, 2017, 11:53:20 PM
The unknown flags in shishi are actually for the sprite's "height" value - most units are 36 (3 tiles), Altima 1 is 60 (5 tiles) and Altima 2 is 120 (10 tiles) tall. This affects things like arrow arcing and deciding where a unit can pass on the map if there's a spot where there's a higher tile on the same X/Y (like in the cases of bridges).
Title: Re: FFT Patcher .478 Source Code
Post by: Elric on May 09, 2017, 01:17:29 AM
The unknown flags in shishi are actually for the sprite's "height" value - most units are 36 (3 tiles), Altima 1 is 60 (5 tiles) and Altima 2 is 120 (10 tiles) tall. This affects things like arrow arcing and deciding where a unit can pass on the map if there's a spot where there's a higher tile on the same X/Y (like in the cases of bridges).

You always know when SA makes it post it's gonna be good. He's almost up to 20! That's almost 2.25 per year! Woo!
Title: Re: FFT Patcher .478 Source Code
Post by: RavenCurow on April 25, 2018, 04:05:17 AM
Should I post anything I find wrong with the FFTPatcher in here or is that somewhere else now? I know this page is almost a year old, but it seems to be the continued thread for it. I just noticed a couple things in the patcher that are incorrect and may be confusing to new people using it that wouldn't otherwise know.

1. Formula 1F for Malak's Un-Truth skills shows an incorrect formula. In patch it shows,
1F Dmg_((100-CasF)*(100-TarF)*(MA+Y)*Ma/2)

which is incorrect and Malak would be breaking all kinds of damage limits if it were correct lol. The correct formula is as follows,

1F Dmg_((1-CasF/100)*(1-TarF/100)*((MA+Y)*Ma/2).

2. I've found that in the tips box for the Faith forumla it lists F as F=CasF*TarF/100^2 which is also incorrect.
The faith formula is actually F=(CasF/100)*(TarF/100)

I'm not sure if someone has already pointed this out somewhere in here as I didn't thoroughly look through the other pages. I just figured I wouldn't mention it in case it hadn't. If it has then you can ignore this.
Title: Re: FFT Patcher .478 Source Code
Post by: Xifanie on April 25, 2018, 09:49:59 AM
I mean, you're not wrong, but you're also not right...

In PSX games and thus FFT, floating points do not exist. So 99/100 (or 0.99) is 0.

I know that the faith formula is wrong in that regard, but from a mathematical perspective, your "correct" formula is the same thing as mine... Maybe you forgot about the priority of operations that you learned in school? Exponents come before nearly much anything else.

The issue is that I never based the formulas off actual code. Someone would really need to go through all the documented code and properly document all the ability/weapon formulas, but no one has ever done it in the 10 years FFH has existed, so I doubt it will ever happen.
Title: Re: FFT Patcher .478 Source Code
Post by: RavenCurow on April 25, 2018, 10:49:21 AM
You are right! Haha! Don't I look the fool now. I forgot to do the exponent on the faith formula first. So the only one wrong is the un-truth formula, and since floating points don't work then my formula probably isn't correct from a code stand point either.

I understand where you are coming from. I didn't make the post as a criticism, but rather a bug report. Just a small thing that is easily fixed through the resources.zip for one that knows what they are doing. I already corrected it for my download, but thought I'd throw it out there for a future update if and when that happens.
Title: Re: FFT Patcher .478 Source Code
Post by: Raijinili on June 02, 2018, 05:05:11 AM
As far as I know, continued development on FFTPatcher (if any) will be at the GitHub repo (https://github.com/Glain/FFTPatcher). Bug reports should probably go on the bug tracker there (https://github.com/Glain/FFTPatcher/issues).
Title: Re: FFT Patcher .478 Source Code
Post by: Elric on September 13, 2018, 02:20:41 PM
I'm not git savy.

Anyway, there appears to be another issue. In the Bonus.bin, in shishi, in Number 2, for Elidibs, it has the "This Game is Complete!" instead of "This Battle is Complete!" I'm 99% certain that the former is supposed to be on the Altima one, not Elidibs.

Edit: Another issue. Map 120 doesn't show up in the list for the other images in shishi. In previous versions it was called "(Garbled name) -- Sloped Checkboard" which came after Checkboard Wall Waterland. In the newer shishi, Checkboard Wall Waterland is the last one displayed to edit. This is an issue since we use a ASM for TLW to copy another map onto this location so that we can have it show a different name due to how one of the battles in TLW was done.
Title: Re: FFT Patcher .478 Source Code
Post by: Glain on September 13, 2018, 06:21:23 PM
Regarding BONUS.BIN: All the images in that file are found by Shishi using the same procedure; there's nothing different about image number 2.  Seems farfetched that part of the image would be right and another part wouldn't.

As for maps, it appears that the number is off by one in the XML file.  Try finding /Resources/PSXFiles.xml within the FFTP directory, and edit this line (line 2439):
<Repeat Number="119" Offset="2560"> and change the Number from 119 to 120.


EDIT: Apparently I'm full of it and that file is compiled directly into the Shishi EXE so you can't edit it! Here's an updated EXE.
EDIT: It's also stored as plain ASCII text in the EXE so you could hex edit it.
Title: Re: FFT Patcher .478 Source Code
Post by: Elric on September 14, 2018, 04:32:28 AM
Thank you!
Title: Re: FFT Patcher .478 Source Code
Post by: Elric on September 14, 2018, 12:51:45 PM
As for the bonus.bin thing, i found it weird as well, but during my last playthru, i noticed that it didnt say "this game is complete" as it should, and instead says "this battle is complete" am i mistaken that it should be at the end of the altima battle and not the DD?

I watched some LPs that show that is should show on the Altima battle, but on the old winningconditions.bmp file i had from Xif, it shows the same way it does in shishi, so I'm going to assume I derped something in the displayed conditions at the end of the altima battle and that this has nothing to do with shishi