• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
May 18, 2024, 09:22:21 pm

News:

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


Show posts

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

Messages - Nax

21


Hello there,

We've been working on a War of the Lions ModLoader named Chantage for a few weeks now.
Chantage is a mod loader for FFT: WotL, as well as an API to make mods play together nicely.
Mods are loaded from the memory stick at runtime, instead of needing to be patched
Right now the API is in a very early stage and cannot be used by mods directly, but basic mod loading work!

Because chantage is language-agnostic, you can develop mods in other languages than assembly. Chantage itself is made in C, and it's also possible to make mods in C++, or any language that can interface with C. It is still possible to make pure-assembly mods or to mix languages if you need to for some reason.

Rationale
Because chantage can run mods off the memory stick, and because it offers a common API to write mods against, it will eventually be possible to create mods that were thought to be impossible to make, such as:

* Creating new items/jobs/...
* Interfacing these items/jobs with the ENTD
* Adding new maps
* etc.

Usage
Right now you must patch your ISO in order to load chantage itself. However, future versions will allow for alternative ways to load the mod loader, such as cheat codes (for cwcheats or similar) or a PSP plugin. This would make it possible to run chantage mods with an actual UMD.

To install chantage:
* Download and extract the zip file
* Apply chantage.ppf to a clean, EBOOT-Decrypted US iso.
* Copy the whole PSP folder from the zip file to your memory stick.

How to install mods
* Copy the mod's .prx file into /PSP/GAME/ULUS10297/mods
* Open /PSP/GAME/ULUS10297/mods.txt with a text editor of your choice
* Append the name of the mod's .prx file at the end of that file

For example, to install a mod named abc.prx, copy it inside /PSP/GAME/ULUS10297/mods, then append "abc.prx" without quotes to /PSP/GAME/ULUS10297/mods.txt, on it's own line.

The chantage .zip includes slowdown_fix.prx, a chantage-compatible version of the popular slowdown fix.

Creating mods
Will be updated once the API is ready.

Credits
Thanks a lot to Quantumpencil & dzhu.

Download
You can find chantage (pre-)releases on GitHub: https://github.com/FFT-Hackers/chantage/releases
22
QuoteThink you could manage to pull the Onion Knight set into the game? (I know, an impossibility since it can't be thrown like the weapons, but still.)


The mod does not only handle throwable stuff: since version 0.2.0, MP-Only equipment can be stolen from high level enemies.
The only MP-Only stuff that isn't obtainable in this mod are the Onion Knight set (minus the sword) and the fell swords.

They have the same problem: they cannot be equipped by anyone but their signature jobs, and there are no random OK or DK, ever.
And no, fell swords are not regular swords (like the onion sword) or knight sword, so they cannot be thrown.

I am going to include them eventually (maybe via Poach or otherwise) but I haven't figured out exactly how yet.

QuoteIf it's true, you may be the first fully successful person to bring at least a part of the Multiplayer-exclusive items into Single Player.


Looks like it  ;)
Making ninjas throw the weapons was not too hard, but making enemies be generated with MP stuff was very tedious, and I ended up having to patch the whole equipment generation routine.

QuoteOh, and you're also working at the Safeguard problem. I'm doing that work too on an editor, I'm yet to test the patch against Elmdore in the Riovanes Roof fight.


Not sure what you mean by that, as my patch does not touch Safeguard. I guess you mean that my patch provides a workaround for the fact you cannot steal the Genji gear anymore? Then yeah.
23
I did not have to remove any item, that's kind of the point.
I patched the game code so it handles the 16 bit items ID more gracefully.
24
I'm in too!  :o
25
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.
26
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!
27
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).
28
I created this tool to work around the fact that it's problematic to run FFTPatcher on non-windows system.
I didn't have time to make a Linux build but it should be easy.
29
Hello,

I just finished building this simple tool: https://github.com/Nax/FFT_Decrypt/releases

It can be used to decrypt EBOOT.BIN in-place in the WotL iso.
The main use case would be to implement this suggestion.

It's very simple: you select your ISO and click "decrypt" to decrypt EBOOT.BIN inside.
The tool will warn you if the ISO is not a valid WotL image. Also, it will warn you if it's already decrypted (but you can force the decryption anyway).

It work on E and U ISOs.

Enjoy!

30
It's a bit more complicated than that.

1. Some of the code in the PSP version is totally different (like the graphical system, but also file loading and stuff like that)
2. Some of the code has been altered, to implement the new items, jobs...
3. Ignoring the two precedent points, you would still only be able to relocate very simple hacks. Any ASM that need to add code will be complicated to relocate automagically.
4. Even if you could do all that, it's still a different game. The old ASM hacks could (and will) cause issues, for example, bad interactions with the new items (because of uint8s)/the new jobs, the spritesheet issue, etc etc.

You would definitely succeed with simple asm hacks, but for the simple ones, it may be easier to just port them by hand. For the most complex ones, you would want to port them by hand anyway to make sure they're correct.

However, you're right about one thing: it is viable to grep for matching binary sequences to find some offsets. That would help you find some matching offsets before exploring the differences and patching by hand, essentially leveraging the PSX documentation.
31
So I made this small tool to help with the decryption: https://github.com/Nax/FFT_Decrypt.
It's compatible with WotL E and U, and should work on any platform that support C (read: virtually any).

I will add a small Qt-based GUI and release prebuilt binaries for Linux/Mac/Windows ASAP.

Maybe we should make a custom version of ppf-o-matic that automatically decrypt the ISO if it's not already decrypted, apply the patch, and then (optionally) regenerate EBOOT.BIN from BOOT.BIN, so as to keep compatibility with the old patches and improve ease of use. Would that be useful to the community?
32
Decrypting the FFT ISO is a very simple task, so I should probably make a cross-platform decryption tool then.
33
Right now it seems most (if not all) of the PPFs on the forums are made against the retail WotL ISO.
This is rather infortunate, because patches that touch EBOOT.BIN have to decrypt it first.
This means that every single patch has the whole unencrypted EBOOT.BIN embedded as a difference.

This is troublesome because it makes conflicts virtually guaranteed on every patch.
While workarounds exists (such as rebuilding EBOOT.BIN from BOOT.BIN and hoping this one did patch properly), it's error-prone and unreliable.

I suggest we make our PPFs against an unencrypted, but otherwise clean WotL image, such as the one that can be generated from FFTPatcher.

It makes the diff much, much smaller. Also, it should make applying multiple patches work out of the box for the vast majority of them.
Of course it would require end users to actually unencrypt their ISO, but with FFTPatcher this is absolutely painless.

As an example, the famous Slowdown Fix, which is 4034291 bytes long (or about 3.84 MiB) becomes 120 bytes long using this method.
For reference, you will find this patch attached.
34
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).

EDIT 2: The 0.3.0 patch was corrupted due to a stupid PPSSPP bug, please use 0.2.0 in the meantime.