Please login or register.

Login with username, password and session length
Advanced search  

News:

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

Pages: [1]
Nax [Posts: 11]
  • View Profile
  • Nax.io
  • share
  • [February 02, 2018, 11:18:02 PM]
Multiplayer Content Availability Patch [0.3.0]
« on: February 02, 2018, 11:18:02 PM »
Multiplayer Content Availability Patch





Hi Guys,

I just finished the first version of this patch and thought you may enjoy it.
The Multiplayer Content Availability Patch aims to bring the new WotL multiplayer-exclusive items to singleplayer.

This patch should only be applied to an US iso.

As of now, every item but the fell swords and the onion stuff (minus the onion sword) can be obtained.

Some of the items can be obtained by catching them from high level ninjas, the other by stealing them from high-level ennemies.
This patch aims to be as vanilla as possible, but certain changes to the old items were unavoidable (see changes).

Changes from vanilla WotL:

PSP Items:
 * Moonblade can be thrown by level 97 ninjas
 * Onion Sword can be thrown by level 98+ ninjas
 * Francisca can be thrown by level 92-95 ninjas
 * Golden Axe can be thrown by level 95+ ninjas
 * Orochi can be thrown by level 97 ninjas
 * Moonsilk Blade can be thrown by level 98+ ninjas
 * Vesper can be thrown by level 96+ ninjas
 * Durandal can be thrown by level 97 ninjas
 * Gae Bolg can be thrown by level 95 ninjas
 * Gungnir can be thrown by level 96 ninjas
 * All other items can be stolen

PSX Items:
 * Sasuke's Blade is now thrown by level 94 ninjas
 * Koga Blade is now thrown by level 95 ninjas
 * Save the Queen is now thrown by level 94 ninjas
 * Excalibur is now thrown by level 95 ninjas
 * Ragnarok is now thrown by level 96 ninjas
 * Holy Lance is now thrown by level 93 ninjas
 * Dragon Whisker is now thrown by level 94 ninjas
 * The genji items can be stolen

Changelog:
 * 0.1.0: Initial version, with the ninja throwing PSP stuff
 * 0.2.0: Updated the patch so ennemies start with PSP stuff equipped.
 * 0.3.0: Limited the generation of PSP-exclusive items, as way too many ennemies started with a full gear of them.

Technical Details:

For the ninja throwing, the patch modifies the following instructions:
At 0x89B1A58, change sb to sh.
At 0x89B1028, change lb to lh.
At 0x89b1030, change the immediate 0x100 to 0x13C.

The first two changes are necessary to make the throw command 16-bit aware on the AI side.
The last change is necessary to make the AI consider the new items as potentially throwable.
Please note that the first two changes are technically unsafe, as we move 16 bits in and out a field supposed to hold 8. However, the byte immediately after the thrown item field seems unused, so this should not cause issues.

For the enemies equipped items, I had to change way too many instructions to list them all, but it was mainly a matter of rewritting the AI equipement selection routine, and patching a lot of instructions that masked registers to 8 bits, so they mask them to 16 bits instead.

Have fun  ;)

EDIT: Added an alterative PPF based on a decrypted ISO. It is much smaller and work out of the box with other patches (like the slowdown fix).
« Last Edit: February 18, 2018, 07:04:03 PM by Nax »
    • Modding version: WotL
  • Quantumpencil [Posts: 6]
    • View Profile
    • share
    • [February 04, 2018, 01:13:22 AM]
    Re: Multiplayer Content Availability Patch
    « Reply #1 on: February 04, 2018, 01:13:22 AM »
    This is great!

    I wonder how difficult it would be to perform a similar hack for move-find-item rewards?

    It might be possible to modify the 3rd and 4th bytes of each maps 16 byte move-find-item field to instead be one 2-byte value representing the 2-byte item type; I'm not sure where the routine that reads those bytes from battle.bin lives, though. If any of the four bytes which hold a maps move-find-item ids are followed by unused bytes, it might be possible to do something like this there as well.

    This is pretty exciting.

    • Modding version: WotL
  • Modding version: WotL
    Nax [Posts: 11]
    • View Profile
    • Nax.io
    • share
    • [February 04, 2018, 01:34:40 AM]
    Re: Multiplayer Content Availability Patch
    « Reply #2 on: February 04, 2018, 01:34:40 AM »
    Thanks!

    I am pretty sure it would be possible to find unused bytes and/or to make clever use of masking to encode the 9th item ID bit into the X/Y coords.
    However, it would be harder than the ninja trick. The ninja trick work because the "Currently considered best item to throw" temporary variable is on the stack, between two 16 bits vars, or at least I think that's the case.
    Because there are no unaligned access on MIPS, this 8 bit value had to be aligned on 16 bits, thus giving us new itemID compatibility for free.

    I will surely check for a Move-Find Item "Treasure Hunter" patch, but right now the most promising target is enemy generation.
    The "ninja trick" work on the enemy initial equipement generation too, due to an oversight. There is a buffer for candidate items allocated on the stack, but it's way too big: the game just don't have enough same-type items for a buffer overflow to happen, even with 16 bit IDs, so it should be safe. It's just quite long to patch, as the item ID is masked with 0xFF a bunch of times, and I also have to patch the item-stack increments (by 2 instead of one) and selection logic (so it doesn't just fall between two i16 IDs). I expect to produce a working version of this in a few hours. This would allow us to get every item but the fell swords (cannot be thrown, cannot be equipped by non-DK) and the onion stuff (cannot be equipped by non-OK, but the sword can be obtained via ninjas).
    Nax [Posts: 11]
    • View Profile
    • Nax.io
    • share
    • [February 04, 2018, 06:26:06 PM]
    Re: Multiplayer Content Availability Patch [0.2.0]
    « Reply #3 on: February 04, 2018, 06:26:06 PM »
    Done! The updated patch is attached to the first message.
    Now the only missing items are the fell swords and the onion set minus the sword.

    The planned way to make them available will be via Poach, but I'm open to suggestions!
    Quantumpencil [Posts: 6]
    • View Profile
    • share
    • [February 04, 2018, 07:35:08 PM]
    Re: Multiplayer Content Availability Patch [0.2.0]
    « Reply #4 on: February 04, 2018, 07:35:08 PM »
    Amazing work man

    This makes one real advantage for the PSP version, since we now have the extra item slots to work with.

    I'm eagerly awaiting your next release.

    • Modding version: WotL
  • Modding version: WotL
    Wolfhart [Posts: 1]
    • View Profile
    • share
    • [February 05, 2018, 05:18:16 PM]
    Re: Multiplayer Content Availability Patch [0.2.0]
    « Reply #5 on: February 05, 2018, 05:18:16 PM »
    Awesome work. I thought I won't plat FFT again anytime soon. You just made start it again. Thank you.
    Nax [Posts: 11]
    • View Profile
    • Nax.io
    • share
    • [February 18, 2018, 07:06:35 PM]
    Re: Multiplayer Content Availability Patch [0.3.0]
    « Reply #6 on: February 18, 2018, 07:06:35 PM »
    Upgraded the mod to 0.3.0

    Now there is a 7 out of 8 chance that PSP items are ignored for enemy gear generation, independant for every item slot.
    Pages: [1]