• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
March 28, 2024, 12:38:49 pm

News:

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


FFT Patcher (.497)

Started by formerdeathcorps, May 14, 2011, 03:57:55 am

Glain

Beta v5!

Introducing EntryEdit!
    * Edits Battle Conditionals, World Conditionals, and Events.  Loads/saves to patch files, script files, disc images, and pSX save states!
    * Customizable by editing EntryEdit.exe.config and associated XML files.  Defaults are vanilla, but has pre-built support for Event Instruction Upgrade by setting "ModSuffix" to "Upgrade" in the config file.

FFTP suite now includes MassHexASM.

FFTPatcher, FFTactext, and EntryEdit can open patch files directly (.fftpatch, .ffttext, .eepatch) via command line.  Also works with file association in the file explorer.
Icons added for FFTPatcher, FFTactext, and FFTorgASM.
Version number of the FFTP suite now displayed in the title bar.

FFTactext:
    * When importing ISO, no longer loads additional entries per section.
    * When importing ISO, uses non-DTE character map for sections with DTE disabled (such as all OPEN.LZW sections by default).

ASM Encoder/Decoder:
    * Now replaces labels and equivalences in reverse order of name length to avoid replacing partial names.
  • Modding version: Other/Unknown

darkskyx

I have this error everytime I try to patch: "An error of type System.UnauthorizedAccessException occurred: Incorrect permissions".
I think the problem is from the new Windows 10 update, specifically Windows Defender. I know it because on my PC I couldn't use some program functions but when I disabled it on the registry I started to be able to use them. But with the new update version I can no longer do that. Do you know a fix for this?
  • Modding version: WotL

✪ Emergence 2 for PSP (EN/ES) - Play it now! ✪
A vanilla+ experience for PSP. Actual patch: 1.0+. More fixes in v1.1!
  • Discord username: darkskyx#9825

EnderC

Quote from: darkskyx on December 20, 2020, 12:58:27 amI have this error everytime I try to patch: "An error of type System.UnauthorizedAccessException occurred: Incorrect permissions".

This is speculation, but make sure you've placed the tools in a location where your user has full control over the contents in Windows' Properties > Security tab under Permissions.

I would expect to see something like this if you unzipped the tools into a protected folder like, say C:\Program Files.
  • Modding version: PSX
  • Discord username: EnderC

darkskyx

December 31, 2020, 05:37:37 am #303 Last Edit: January 21, 2021, 06:34:24 pm by darkskyx
Quote from: EnderC on December 30, 2020, 04:45:50 pmThis is speculation, but make sure you've placed the tools in a location where your user has full control over the contents in Windows' Properties > Security tab under Permissions.

I would expect to see something like this if you unzipped the tools into a protected folder like, say C:\Program Files.
It was not placed in a protected folder, I have it on a folder on my Desktop. Anyway, I "fixed" it by not installing the new update.

P.S: Maybe someone wants a solution for problems like the file not opening, but if you have problems with that, it can be your antivirus. Just add as exception in the folder and the files.
  • Modding version: WotL

✪ Emergence 2 for PSP (EN/ES) - Play it now! ✪
A vanilla+ experience for PSP. Actual patch: 1.0+. More fixes in v1.1!
  • Discord username: darkskyx#9825

nitwit

Quote from: darkskyx on December 31, 2020, 05:37:37 amIt was not placed in a protected folder, I have it on a folder on my Desktop. Anyway, I "fixed" it by not installing the new update.
In my experience, anything outside of the system and program files folders gives me a warning when I try to execute it.

I use this to add apps to the Windows start menu:
https://www.windowscentral.com/add-app-shortcuts-start-menu-manually-windows-10

I also use Open-Shell as a replacement for the Windows start menu.

3lric

I've never had an issue with FFTP on Vista, 7 or 10, in any folder, regardless of UAC settings...
  • Modding version: PSX

Glain

January 07, 2021, 12:37:26 pm #306 Last Edit: January 10, 2021, 11:33:16 pm by Glain Reason: Updating to new version with fixes
Beta v6:


Command line patching is now supported for FFTPatcher, FFTactext, FFTorgASM, and EntryEdit by using command line arguments "-patch" and then specifying the patch file and disc image (or pSX savestate).  There is generally no output on a successful run (unless FFTorgASM is warning that files appearing in patches are either unsupported or not present in the specified savestate), and an error message can appear in the console if there is a problem.  If the program opens up its normal window, then there was something wrong with the passed arguments (file(s) not found, etc.) 
    By default, the console does not wait for the program(s) to finish, because they aren't configured as console applications.  Using "start /wait" will make the console wait.
   
    Examples:
        start /wait "Patch" FFTPatcher -patch patchfile.fftpatch fft.iso
        start /wait "Patch" FFTactext -patch patchfile.ffttext fft.iso
        start /wait "Patch" FFTorgASM -patch patchfile.xml fft.iso
        start /wait "Patch" EntryEdit -patch patchfile.eepatch fft.iso

FFTPatcher:
    *  Enabled editing ability effects for all applicable abilities.
    *  View stat form now uses correct Monster average Raw MP.

FFTorgASM:
    *  Now displays patch descriptions in a more natural way, with better handling of whitespace.
    *  Persistent labels can now be referenced anywhere in a patch, even if they are defined in later Location tags.
    *  Save Patch XML option now updates variable values and doesn't write out blank Location tags.
    *  Spacebar can check/uncheck patches again, if the selection cache for the type ahead is empty (ESC to clear).
    *  Variables can now be declared with symbol="true" and no accompanying file, sector, or offset.  These variables would then only be referenced as macros in ASM blocks.
    *  Added a "hidden" attribute for patches (true or false, default false).

ASMEncoder:   
    *  Added support for .if, .else, .endif preprocessing commands.  Skips lines if condition is not met.  Blocks can contain multiple lines, and nesting is possible.
        Example:
            .if    >, %ChangePartyLevelRandom, 0
                srl    t3, t2, 4
            .else
                move    t3, t1
            .endif

    *  Fixed an issue where using the "load immediate" pseudo (li) with a label could cause addresses to be calculated incorrectly.  Using li with a label will now always cause it to expand to two instructions.


** Updated with additional fixes (thanks Cerabow and EnderC for reporting issues):

    FFTPatcher:
        *  Fixed context menu exception when clicking out of bounds in a data grid view (Action Menus, Monster Skills, Poaching tabs)
        *  Fixed an exception that occurred when setting an item to use an ability with an ID > 0x7F, where the ID would erroneously be used in a reference to the Status Infliction list.
        *  Selected entries for Inflict Status and Item Attributes tabs refresh when the tabs are clicked, so that they display the current correct information for which Items or Abilities are linked to each.
  • Modding version: Other/Unknown

Squaresoft

Quote from: Glain on January 07, 2021, 12:37:26 pmBeta v6:
Amazing work! the Stat Viewer is a life saver.

Minor things I noticed in V6:
•Equip Katana says "Equip Knife". A Samurai is  performing a Seppuku right now with that knife, haha.
  • Modding version: PSX

darkskyx

Quote from: Glain on January 07, 2021, 12:37:26 pmBeta v6:


The stat scaling viewer is so good! But I have a question, because I'm not sure if it's a bug or not:

How do the Growth HP/MP/etc works? For example, if I use 9 HP growth I got better late game result than using 11 (397 HP at lvl 99 vs 468 HP). And that's weird because I remember to test that down a little and the scaling was not like this. But if this is correct, I have been using wrong the growth stat. And that is not very intuitive... I'm so confused.

Also, I didn't knew the multiplier also affected basic stats (I though it was only for items, skills...), but it makes sense for Speed and others. A mini-explanation in that part of the program would be grateful.
  • Modding version: WotL

✪ Emergence 2 for PSP (EN/ES) - Play it now! ✪
A vanilla+ experience for PSP. Actual patch: 1.0+. More fixes in v1.1!
  • Discord username: darkskyx#9825

Nyzer

For that, it'd be best to refer to GameFAQs' battle mechanics guide. The short version of the stat growth rating is that that number is not how much the growth rate has added to it, or is multiplied by - it's a divisor for the growth formula.

The higher it is, the more the number is divided, the less there is added to the Raw Stat total, the longer it takes to reach the next breakpoint for a +1 in the stat.
  • Modding version: Other/Unknown

Squaresoft

BTW, is there an option to export/import specific tab changes? Like items/skills.

Or any method where I could do it with an excel and the patch file or something.

Would really appreciate that information.
  • Modding version: PSX

Raijinili

Quote from: darkskyx on January 21, 2021, 08:01:14 pmHow do the Growth HP/MP/etc works?

I call it growth impedance, because higher values REDUCE growth. Also, you should know that job multipliers ONLY work on naked stats, not gear stats.

Let's take two jobs:
Thief: 50 MAC (MA impedance), 60% MA multiplier.
Mime: 40 MAC, 115% MA multiplier.
Check these in FFTPatcher.

A level 1 Female unit has 5.0 MA, and level 1 Male has 4.0 MA. These are the internal raw values, before considering job multiplier and equipment. (Technically, it's stored as a fraction over 2^14. This method of storing a non-whole number is called fixed-point notation.)

Here are the MA values at level 1:
Thief-F: floor(5.0 * 60%) = 3 MA
Mime-F: floor(5.0 * 115%) = floor(5.75) = 5 MA
Thief-M: floor(4.0 * 60%) = floor(2.4) = 2 MA
Mime-M: floor(4.0 * 115%) = floor(4.6) = 4 MA


If you know the rawMA at level 1, here's how you calculate the rawMA at any level LVL, given the MAC. (There is a slight overestimate here due to rounding.)
rawMA_LVL = rawMA_1 * (1 + (LVL-1)/(MAC+1))

Here are the raw MA values at level 99 (ignoring job multiplier):
Thief-F: 5.0 * (1 + 98/51) = ~14.61
Mime-F: 5.0 * (1 + 98/41) = ~16.95
Thief-M: 4.0 * (1 + 98/51) = ~11.69
Mime-M: 4.0 * (1 + 98/41) = ~13.56



But here's a more intuitive way of working with it: You gain your level 1 rawMA every MAC+1 levels.

Mime-F has 5.0 MA and 40 MAC, so every 41 levels, it gains another 5.0 MA (minus a bit, due to rounding):
lv=1: 5.0 rawMA
lv=42: 10.0
lv=83: 15.0

Thief-F has 50 MAC, so it takes 51 levels to double MA:
lv=1: 5.0 rawMA
lv=52: 10.0
lv=103: 15.0

Red Dragon has 6 MAC, so it gains its level 1 MA every 7 levels (1, 8, 15, etc.). Since Monsters have randomized stats, I can't calculate the exact raw MA values.


It's important to know that raw stat, job growth, and job multiplier are all multiplicative, so you can calculate each one independent of the other two. That means the Male will ALWAYS have 80% (before the final rounding) of the Female's MA, as long as they have the same job growth history.
  • Modding version: Other/Unknown

nitwit

February 15, 2021, 07:09:05 am #312 Last Edit: February 15, 2021, 07:28:21 am by nitwit
Bug report for FFTPatcher v0.493.

In Gameshark tab of same, checkmarking all of item 0x00's shop availability flags displays the following code:
"Store Inventories
D0067000 8A44
8018D840 FFFF

While gathering addresses of FFTPatcher's data tables, I attempted to verify the shop inventory by editing it in the pSXfin memory viewer. On testing the shop inventory data does not start at 0x8018d840. Instead it starts at 0x8018d844. You can verify this in anywhere (I tested it in Igros) with the following code, which unchecks all the shop availability checkboxes for "0x01 Dagger", making it unavailable.
D0067000 8A44
8018d846 0000

Or you can go into a shop, verify a dagger appears, go to addresses 8018d846 and 8018d847, set their values to zero, and then press left or right until you return the weapon purchase submenu to find that daggers aren't available for purchase.

Glain

Quote from: nitwit on February 15, 2021, 07:09:05 amOn testing the shop inventory data does not start at 0x8018d840. Instead it starts at 0x8018d844.

Good catch.  It was writing to the correct location when patching the ISO (0xAD844 in WORLD.BIN) but to the wrong corresponding RAM location for Gameshark codes.  I've checked in a fix to the source control to correct the offset.
  • Modding version: Other/Unknown

nitwit

Quote from: Glain on February 15, 2021, 02:04:02 pmGood catch.  It was writing to the correct location when patching the ISO (0xAD844 in WORLD.BIN) but to the wrong corresponding RAM location for Gameshark codes.  I've checked in a fix to the source control to correct the offset.
I saw your revision and can now more easily grab gameshark/RAM addresses for everything FFTPatcher edits, but where can I find the disc files/addresses for the same? A search of 0xAD844 and it's base 10 equivalent in the FFTPatcher suite repo returns nothing.

Glain

Quote from: nitwit on February 15, 2021, 09:08:47 pmI saw your revision and can now more easily grab gameshark/RAM addresses for everything FFTPatcher edits, but where can I find the disc files/addresses for the same? A search of 0xAD844 and it's base 10 equivalent in the FFTPatcher suite repo returns nothing.

I don't know what the GitHub search is doing or why it doesn't return results, but this is the file.
  • Modding version: Other/Unknown

---HattoriIga---

Hello, this Entry Edit tool is very good, I liked it a lot. magnificent work, just not being able to open battle conditionals of the path of the elric TLW 1.06 of the error stating: the key provided was not present in the dictionary.

Again thanks for that wonderful tool good job  :D
  • Modding version: PSX

Glain

February 26, 2021, 01:51:09 am #317 Last Edit: February 26, 2021, 02:32:41 am by Glain
Thanks! Glad to hear you like the tool!

In the case of TLW, it looks like the battle conditionals and scenarios were rearranged, and EntryEdit's XML files are based on vanilla's order. This error is happening because the program is trying to look up the names of battle conditional sets that don't exist in vanilla. I've put in a patch that will fix that particular problem in the next version.

In the meantime, the simplest fix is probably to take the ConditionalSets.xml file in the EntryData subfolder of the application directory, copy it into the same directory, name the copy ConditionalSetsTLW.xml, and add a bunch of entries to the end of the new XML file, like so:

    <Entry hex="0092" name="New Set" />
    <Entry hex="0093" name="New Set" />
    <Entry hex="0094" name="New Set" />
    <Entry hex="0095" name="New Set" />
    <Entry hex="0096" name="New Set" />
    <Entry hex="0097" name="New Set" />
    <Entry hex="0098" name="New Set" />
    <Entry hex="0099" name="New Set" />
    <Entry hex="009A" name="New Set" />
    <Entry hex="009B" name="New Set" />
    <Entry hex="009C" name="New Set" />
    <Entry hex="009D" name="New Set" />
    <Entry hex="009E" name="New Set" />
    <Entry hex="009F" name="New Set" />
    <Entry hex="00A0" name="New Set" />
    <Entry hex="00A1" name="New Set" />
    <Entry hex="00A2" name="New Set" />
    <Entry hex="00A3" name="New Set" />
    <Entry hex="00A4" name="New Set" />
    <Entry hex="00A5" name="New Set" />

Then open the EntryEdit.exe.config file and change the ModSuffix value to TLW.  The new line would look like this:

<add key="ModSuffix" value="TLW" />

With that, the data should load and the program shouldn't crash... but the names of the scenarios and conditionals won't make much sense like this. Ideally we would create a separate set of XML files that would contain the correct names for TLW.
  • Modding version: Other/Unknown

Dokurider

I'm gonna post this here so Glain doesn't forget again.
In Ability Flags 1, 0x80/0x40 are actually Target All Allies and Target All Enemies respectively...but both are bugged. Actually they're disabled on purpose and you can reenable both of them with a single line edit. I made a video showing off what it was supposed to do.


And here's the hack if you need to test it.
https://ffhacktics.com/smf/index.php?topic=10381.msg218982#msg218982

nitwit

Quote from: Dokurider on May 31, 2021, 01:28:45 pmI'm gonna post this here so Glain doesn't forget again.
In Ability Flags 1, 0x80/0x40 are actually Target All Allies and Target All Enemies respectively...but both are bugged. Actually they're disabled on purpose and you can reenable both of them with a single line edit. I made a video showing off what it was supposed to do.

And here's the hack if you need to test it.
https://ffhacktics.com/smf/index.php?topic=10381.msg218982#msg218982
Isn't that just... maximum range, and the flags for only target allies and self-target allowed? Perhaps they disabled it because it's redundant (while also ignoring all the other redundancies and hard-coded behaviors)? Am I mistaken?

It's still cool though.