• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
November 10, 2024, 02:23:23 pm

News:

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


[WotL][PoC] Chantage, a War of the Lions ModLoader

Started by Nax, July 15, 2018, 05:56:18 pm

Nax



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

Quantumpencil

July 15, 2018, 06:11:41 pm #1 Last Edit: July 16, 2018, 12:54:25 pm by Quantumpencil
Magnificent work my dear friend! RIP PSX  :lol:

We've also done a fair bit of work reverse engineering the WotL ISO and will be documenting that, and soon we'll be creating C++ functions for overwriting specific sub-routines at run-time without needing to worry about memory constraints (well, within reason).

The age of WotL is beginning  :lol:
  • Modding version: WotL
Modding version: WotL

3lric

RIP PSX?

I kinda doubt it. Maybe when all existing tools and ASMs work on the PSP version locations, but even then...

Cool concept though
  • Modding version: PSX

Quantumpencil

July 16, 2018, 01:06:58 am #3 Last Edit: July 16, 2018, 12:55:03 pm by Quantumpencil
Obviously a bit of hyperbole there, but there are some considerable advantages of this approach(allocating new memory at run-time/loading functions there and relocating the games original routines) over any tool that patches the actual ISO

By allocating new memory for mods at run-time and re-pointing WotL's original routines, essentially any function in the game can be replaced without having to try and manually "fit" the ASM into the same space or jump around between subs to use the padding space.

It also means new weapons, enemies, items, or formulas etc can be added to the game without destroying old ones and without having to patch the ISO at all (other than the original patch needed to load chantage) as the in memory structs containing their associated data can be re-located at run-time and extended.

Moreover with a map of the original games routines (currently a WIP, but all of the formula routines and most of the one dealing with items I've disassembled, and Nax ahs hit a lot of the graphical/AI code) a high-level programming API can be built around this procedure; methods for doing things like adding an item or an enemy can be re-usable function calls depending on core chantage utils that accept their parameters, relocate the relevant struct inside memory and add the resulting items/formulas/enemies to the struct.
  • Modding version: WotL
Modding version: WotL

Angel

I'm all for people actually working on tools for WotL. You will never know the frustration of ten years worth of trying to explain to every single new user why their hopes and dreams for modding WotL can't come true with mouse clicks. Ten years of trying to explain that they would have a much easier time if they just used the PSX version. Ten years of them stubbornly refusing to touch PSX, and then disappearing when they realize we weren't lying.

I won't hate on this at all. Keep it up, and I hope it pans out.
  • Modding version: PSX
* Angel should quit being a lazy bitch
<@Elric> I agree to that as well

nyanyame nyanyajuu nyanyado no nyarabide nyakunyaku inyanyaku nyanyahan nyanyadai nyannyaku nyarabete nyaganyagame
At the end of the day, are we not all trapped inside lemons?

Nax

I understand the frustration. I've lurked over this forum for years before registering, and I've certainly seen a fair share of people wanting to do WotL, before being discouraged by the lack of proper tooling (except for patcher). That's part of why I joined :)


Nax

We're working on a FFTPatcher-like tool compatible with Chantage too.

Heisho

This is excellent news dude. I suppouse that the slowdown fix will also work along this. Now if only the sound could be just like thw psx version.
  • Modding version: PSX
Grrr, arwg, hiss, and some other zombie noises...
  • Discord username: Heisho

Nax

Yes, we have a .prx version of the slowdown fix that is compatible already.
What's the problem with the sound in the PSP version? I'm not aware of that.

Nyzer

  • Modding version: Other/Unknown

Nax



It also works on macOS, albeit being quite ugly (yet).

Argy

Really well done Nax!! This is impressive. Can you make changes to the weapon flavour text as well?
  • Modding version: PSX
Kotetsu Quad Killer!!

Heisho

Quote from: Nax on August 17, 2018, 09:53:28 pm
Yes, we have a .prx version of the slowdown fix that is compatible already.
What's the problem with the sound in the PSP version? I'm not aware of that.


The sound effects are suppoused to be the same although they sound a little different, like when you play the game on a PS2 with fast disc settings and smooth graphics. It's no a lot of change but is noticeable. Anyway this sounds excelent, if you guys make a way that the hacks of PSX (ASM, events, etc) can work with this it would be great.

Great job anyway. Keep it up!
  • Modding version: PSX
Grrr, arwg, hiss, and some other zombie noises...
  • Discord username: Heisho

Nax

@Argy: You mean the description, like it appears on the last screenshot? Eventually yes. Right now it does nothing.

@Heisho: I barely played the PSX version, so I never noticed about the sound. Will see what I can do but I have a metric fuckton of higher priority stuff to do before  :o

Angel

From my understanding, the sound is not realistically fixable. Sound emulation for PlayStation is about as far off the mark as video emulation is for Nintendo 64. Compare Queklain's transformation event on a real PlayStation to any emulator or port of the game for a particularly obvious example.

There was a small group taking a dedicated look at the sound inaccuracy of PlayStation emulators, and made some nice progress in a short period, but then they just went silent (no pun). Even then, it's not going to help the PSP any.
  • Modding version: PSX
* Angel should quit being a lazy bitch
<@Elric> I agree to that as well

nyanyame nyanyajuu nyanyado no nyarabide nyakunyaku inyanyaku nyanyahan nyanyadai nyannyaku nyarabete nyaganyagame
At the end of the day, are we not all trapped inside lemons?

Nax

Ok, so from your responses and what I gathered on the internet, it looks like the core problem is that the sound effects are in MIDI, and the MIDI synthetiser on the PSP and the PSX are vastly different.

Maybe we could just load wav files from the memory stick instead, fixing this issue. Are there any accurate .wav versions of the sound effects somewhere? I've seen there are wav sound effects on the ffhacktics website itself, but are those accurate?

Xifanie

No, they're not accurate.

I do have an adapter that allows me to record audio from my PSX to my computer, but it would still take a lot of time to rip everything, to the point that I feel this solution is a bit absurd... recording every song and every sound effect in the game? Ouch. We don't even know where the regular, non-ability sound effects are stored. Could you even make a wav file loop?

  • Modding version: PSX
Love what you're seeing? https://supportus.ffhacktics.com/ 💜 it's really appreciated

Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

Valkirst

This may sound trite but I wish there was an up-vote or a like button on the forum but, really that's just a lazy facsimile to words of encouragement! Please keep at it, I love it when I see this forum popping full of life. 🤘
  • Modding version: PSX
Completed Sprites
  • Discord username: Valkirst

Nax

Thanks a lot, much appreciated  :D

The project is still up and running, it just takes a lot of time. We are (still) working on custom items. It basically work but there is a lot of work to be done to adapt the animation code, inventory code and everything related to saving.