ALMA: Ability-Linked Multiplier Attributes
- PA/MA/SP buffs and debuffs now properly persist through item breaks, level ups, and everything else that triggers an ALMA check.
- ALMA's internal equipment Judge no longer throws red cards at the enemies (and dumps their stuff in your inventory).
- Some usability upgrades in progress, e.g. a Text tab so things are named correctly for your patch.
- Attribute offsets finally shipshape, I think. A preview issue and ALMAscript issue fixed.
- More bugs fixed with attribute offsets, and an HP overflow-ish issue resolved.
- Attribute summary added.
- Females can now equip bags/ribbons/perfume.
- SP/PA/MA bonuses and MOV/JMP/WP bonuses are no longer jumbled together.
- Statuses should work better.
- Disabling Move +1/2/3 and Jump +1/2/3 should work now.
- Well, got to release sometime. I wouldn't call this reliable but it's only half broken now.
- The skillset hack especially should be less broken, and finally handles equality checks as well as flags.
- This version should theoretically be good enough to be released as ALMA 4, if not ALMA 4.1. But I plan some more testing so don't hold me to that.
- It includes the old ALMA 3 disables and skillset hack, as well as limited preview.
- Some bugs were due to this code brushing against the end of the kanji table/freespace. I've temporarily moved it (so the hack functions) to the SentinelBlade/VincentCraven block, like a huge jerk, but I'm going to have to come up with a permanent solution, 'cause that's obviously not cool.
- That leaves limited preview and the ALMA 3 skillsets/disables as missing pieces.
- Changed layout so users can better avoid the acres of space wasted on passives.
- Fixed some more known issues like HP overflow at 32768 and stat buffs/debuffs not working. Getting closer to a release that's strictly superior to ALMA 3.
- Fixed a herd of bugs (RSM & traits not working, ALMAscript set up unintuitively, some attributes wonky...). This will continue for a while longer.
- Improved the ALMAscript description so that it's barely usable.
- Set bonuses implemented. An item can belong to two sets (or count twice for one set), e.g. Masamune can be in set 01 ("Genji") and set 05 ("katanas").
- Job level bonuses scrapped and replaced with simple attributes attached to jobs and secondaries. The replaced functionality will be available in ALMAscript.
- Identity attributes; e.g. Ramza (not uberSquire) gains Gained JP Up, Mustadio (not Engineer) gains Equip Gun.
- Revamped passives to work with RAD. Knight ability A4 can apply a passive to Knights and freelancers, A5 can apply to Knights and Battle Skill secondary, and A6 can apply to Knights only. There is more flexibility to give special characters global passives in their base class.
- Added "natural" stat boosts, which are affected by HPM/MPM/PAM/MAM/SPM.
- Added percentage stat multipliers for people who hate the number sixty.
- Fixed the issue where several low multipliers were all rounded down to zero instead of compounding.
- Added bonuses/multipliers for wonky stuff like evasion stats which may or may not work.
- Added brave/faith modification to attributes. YOU MUST DISABLE PERMANENT BRAVE/FAITH MODIFICATION. YOU SHOULD PROBABLY DISABLE IN-BATTLE BRAVE/FAITH MODIFICATION.
- Added the ability to strip RSM/status/elements (e.g. Flame Shield grants Absorb:Fire and Weak:Water, removes Absorb:Water).
- Added the ability to disable, enable, and disable with extreme prejudice equipment types, in that order. Example:
Knights can equip Swords.
If White Magic secondary disables Swords, Knight/White Magic cannot equip Swords.
Knight/White Magic/Equip Sword can equip Swords.
If the shield Escutcheon III hard disables all weapons, Knight/Equip Sword cannot equip Swords.
- There is an equipment check which enforces Two Swords/equipment restrictions, so stuff like Merit Awards and offhand daggers that grant Two Swords should be okay now. Two Hands might still be iffy, we'll see.
- Attributes have limited space now. Attributes 50-77 are "long" and can hold sixteen mods. Attributes 78-EF are "short" and can hold four mods.
- Attributes can be chained together; attribute 50 can hold fifteen mods and then call attribute 51, which can hold fifteen mods and then call attribute 52 to accommodate whatever monstrosities are required. (But don't have attribute 52 call attribute 50...)
- ALMAscript is going to be rad when it's done, but it's not. I'll tease it when it is.
In a nutshell, the ALMA hack lets you modify stats, status, elements, innates, and equipment availability based on a unit's loadout.
ALMA adds a new set of 160 ALMA attributes. ALMA attributes are a lot like item attributes, but they can do more; multiply stats, decrement stats, remove and grant equips or RSM, add Faith.
You can assign a multiplier attribute, or an existing item attribute to a ton of things, like jobs, known abilities, equipped R/S/M, and more.
These extra attributes are "add-ons", operating in addition to ordinary functioning - items still retain their FFTPatcher stats and item attribute, abilities still do what they normally do.Instructions:
- Enter your changes into ALMA 4.xls.
- Copy and paste the entire 'XML' tab to a text file and save it as "ALMA 4.xml".
- Patch via FFTorgASM.Known Issues:
- The item preview only works for flat increments/decrements of HP/MP/SP/PA/MA/MOV/JMP.
- WP and evasion modifiers are not yet functional in battle (right now the game overwrites these with actual equipment data).
- The hack is shoddily written, as the code is still in debug mode. It takes a ludicrous amount of allocated space in both BATTLE.BIN and WORLD.BIN, and even with better writing it'll still be quite large. There are no guarantees this is 100% stable. Let me know when you find a reproducible bug or crash.To-Do:
- Finish R/S/M disables.
- Add previewability.
- Put off rounding down until the end, so several small multipliers can combine to add +1 PA. - Revamp the ARH to allow use of Jump/Charge/Math Skill. - Add RAD support to passives. - Add basic scripting.
This patch branches from SCUS to BATTLE.BIN or WORLD.BIN depending on the unit ID. At the point I chose (RAM 0x5c82c, right after item attributes) unit ID (r17) is either a 0x19**** (in battle, BATTLE.BIN loaded), 0x1d**** (pre-battle placement, still BATTLE.BIN loaded), or 0x1f**** (world map formation, WORLD.BIN loaded - probably a temp location). So by branching based on unit ID, I was able to effectively add space to SCUS - the HP > min HP? and MP > min MP? checks the branch overwrites are duplicated in the routine.
I will document and post my code for this (although it's hideous; among other things, the SCUS branch takes almost twice the space it needs, and there are ton of hastily-inserted nops in the routine because I didn't know what load delay was until debugging).
FDC, for where to patch the SCUS code I needed
Xifanie, for the ASM tutorial and the ARH hack
posters to the request thread, for tossing out ideas which led to this
Questions/comments/suggestions/scoldings solicited! This is not a finished product, it just finally stopped crashing. Right now it is a raw lump of pure functionality, so if you have an idea to make it more useful for your patch, or especially more useful in general, post it. I am going to relax a while but I'll be taking notes.