• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
March 28, 2024, 01:51:40 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!


ALMA 4: Excalibur grants Forever: Orlandu

Started by pokeytax, February 07, 2011, 06:01:18 pm

pokeytax

February 07, 2011, 06:01:18 pm Last Edit: February 02, 2013, 03:16:06 pm by pokeytax

v 4.2
- PA/MA/SP buffs and debuffs now properly persist through item breaks, level ups, and everything else that triggers an ALMA check.

v 4.15
- 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.

v 4.14
- Attribute offsets finally shipshape, I think. A preview issue and ALMAscript issue fixed.

v 4.13
- More bugs fixed with attribute offsets, and an HP overflow-ish issue resolved.

v 4.12
- Attribute summary added.

v 4.11
- 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.

v 4.10
- 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.

v 4.04
- 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.

v 4.03
- 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.

v 4.02
- 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.

v 4.01
- 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.

v 4.00
- 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.



v 3.32
- Fixed a minor bug where Lucavi gained 50 MA when any attributes applied - no biggie!

v 3.31
- Skillsets were broken, again? Really? I must have accidentally reverted to a previous version when adding previewability. Anyway they work now (hopefully).

v 3.3
- Added previewability for constant stat bumps on items.

v 3.2
- A somehow overlooked fatal bug with skillsets was fixed.

v 3.1
- A couple ugly bugs fixed with movement abilities.

v 3.0
- Skillset hack implemented: R/S/M can change the "Act" menu.
- Movement abilities can be disabled, allowing use of the slot for other purposes.
- "Equip Gear" support abilities and grayed-out support abilities for certain classes can be edited.
- The "Att. Summary" tab summarizes what your attributes do.

v 2.0
- pSXfin's persnickety attitude toward loads in delay slots has been catered to. This should be a stable release.
- Attributes rearranged for byte alignment. Don't be alarmed if the hex data seems out of order.
- Several bugs fixed, including one with "+C" entry.
- Useless Attributes II tab consolidated into Attributes.

v 1.e
- Patch currently working in ePSXe but not pSX. Yeah, I know, it's not good. I'm working on it, but I'm putting it out for now.
- Conditions on passives!
- Minimum class multipliers (HPM, etc.)
- Active R/S/M can be granted.
- Lucavi/??? stats no longer capped at 999.
- A few spreadsheet bugs caught.


ALMA: Ability-Linked Multiplier Attributes

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.

Technical Notes:
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).

Thanks to:
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.
  • Modding version: PSX

RavenOfRazgriz

I do think you went a bit made in coding something completely ridiculous and amazing.

Lots of fun features, though I don't know how much of this I could see myself using.  Others are probably drooling over some of the stuff here already... but as you can probably guess, I'm far more looking forward to your To-Do List and seeing this thing smashed with tons and tons of efficiency hammers.

Very nice work so far though.

formerdeathcorps

You added signed loading to HP/MP bonuses?  Unless you made that a halfword, you can't add more than 128 HP/MP to a unit.  Personally, heavy armor and very powerful magical vests should add more than that.

EDIT: This is precisely why I didn't do that in my hack.
The destruction of the will is the rape of the mind.
The dogmas of every era are nothing but the fantasies of those in power; their dreams are our waking nightmares.

pokeytax

Quote from: formerdeathcorps on February 07, 2011, 06:27:34 pm
You added signed loading to HP/MP bonuses?  Unless you made that a halfword, you can't add more than 128 HP/MP to a unit.  Personally, heavy armor and very powerful magical vests should add more than that.


This is a separate subroutine from the normal flow of item stats and item attribute. It is essentially a second layer of item attribute. Just give the heavy armor 220 HP via FFTPatcher. It's more for adding HP to weapons/shields/accessories/abilities, in which case I figured the flexibility of negatives beat the benefits of higher positives.
  • Modding version: PSX

philsov

downloading now.

I will soon puke in hacking goodness that this provides.  

Balance kryponite is a very accurate way to describe this juicy, lucious hack.

Edit:  Just had to look up the topic title.  Very clever and very fitting.

Edit2:  Random spreadsheet suggestions/notes:

1) Re-introduce cell outlines in the attributes section on the next update
2) If I want to toggle something in the attribute columns, like, always: float or half: fire... what do I type?
3) When I opened it up, I wasn't given the warning about this containing macros.  Likely a non issue, but I'm so accustomed to spreadsheets from this site having that quality.  You sure you didn't miss something? ;)
4) I can ignore the CODE sheet and just straight patch with OrgASM, yes?
4a) I just took this for a small test drive.  Set the HP+C attributes of 50 to 20, 51 to 10, and 52 to 5.  Assigned these to random movement abilities (move on lava, move in water, walk on water) on the equipped abilities sheet, and... none of them worked.  I know the previews messed up, but this is equipping any of these abilities, exiting formation and checking again, and then going into a random with no results in either the PBF or the actual battle.
Just another rebel plotting rebellion.

pokeytax

Hmmmm... working fine for me. I attached the .xml I'm using. Don't beat your head against it, it should be working perfectly and if it's not I need to simplify it.

2) Type the number 1.
3) It uses DEC2HEX and HEX2DEC from the Analysis Toolkit, is all.
4) Of course - in fact, this probably works better than the spreadsheet for small values of hack. Honestly, I don't have a functional Excel w/Toolkit at home and I've done most of the testing by hand entry.

Here is the layout of the hack:

SCUS_942_21 0x4D02C: branch
WORLD.BIN 0x671F8: main routine
WORLD.BIN 0x68000: lookup table <--- B2:B227 goes here

0-FF: items
100-157: active R/S/M (by byte, but 01 is first and 0x80 is last)
158-16F: reserved dead space for now
170-337: learned abilities
338-387: job levels

WORLD.BIN 0x68400: attribute data <--- B229:B252 goes here
BATTLE.BIN 0xF2FB8: main routine
BATTLE.BIN 0xF3500: lookup table <--- B2:B227 goes here
BATTLE.BIN 0xF3900: attribute data <--- B229:B252 goes here


  • Modding version: PSX

Eternal

I have absolutely no idea how to use this, but it looks good nonetheless. I'll mess around with this tonight. Good work! :D
  • Modding version: PSX & WotL
"You, no less human than we? Ha! Now there's a beastly thought. You've been less than we from the moment your baseborn father fell upon your mother in whatever gutter saw you sired! You've been chattel since you came into the world drenched in common blood!"
  • Discord username: eternal248#1817

Desocupado

So could we easily have the FF V system?
Where equiping Black Magic increases your magic multiplier, if you set it as a secondary skillset?
  • Modding version: PSX

formerdeathcorps

February 08, 2011, 05:33:23 am #8 Last Edit: February 08, 2011, 05:33:59 am by formerdeathcorps
Quote from: Desocupado on February 08, 2011, 05:05:59 am
So could we easily have the FF V system?
Where equiping Black Magic increases your magic multiplier, if you set it as a secondary skillset?


Eventually.  It currently changes it if you have it unlocked, or if your BM job level exceeds X.  There's currently no requirements on active skillsets (primary or secondary).
The destruction of the will is the rape of the mind.
The dogmas of every era are nothing but the fantasies of those in power; their dreams are our waking nightmares.

philsov

QuoteHmmmm... working fine for me.. 


I'm an idiot :).  I just realized that I need to update the xml myself -_-.

Notepad suffices for xml editing, ya?
Just another rebel plotting rebellion.

Eternal

If you have Excel, you can just edit the .xml in that, I think. It works for editing Patcher names, at least.
  • Modding version: PSX & WotL
"You, no less human than we? Ha! Now there's a beastly thought. You've been less than we from the moment your baseborn father fell upon your mother in whatever gutter saw you sired! You've been chattel since you came into the world drenched in common blood!"
  • Discord username: eternal248#1817

philsov

well I edit patcher names with notepad :).  I just want to make sure I don't mess up with an automatic linebreak or something.
Just another rebel plotting rebellion.

Pickle Girl Fanboy

Vanya will ****ing love this.  Freelancer HO!

And holy hell you outdid yourself with this one.  This is so much more functionality.

pokeytax

I updated the OP with a new spreadsheet that is hopefully less like pulling teeth. The attributes sheet has been replaced with an attributes sheet that isn't terrible, and copy-pasting code has been replaced with a button that spits out an .xml file.
  • Modding version: PSX

Vanya

  • Modding version: Other/Unknown
¯\(°_0)/¯

philsov

Quote from: pokeytax on February 08, 2011, 06:21:07 pm
I updated the OP with a new spreadsheet that is hopefully less like pulling teeth. The attributes sheet has been replaced with an attributes sheet that isn't terrible, and copy-pasting code has been replaced with a button that spits out an .xml file.


And it looks glorious
Just another rebel plotting rebellion.

pokeytax

Okay, uploaded a new new version that fixes a bug with negative stat boosts and removes an entire useless tab I somehow didn't get rid of before now.

The next version will try to add the major missing parts I see - minimum HPM/MPM/PAM/MAM/SPM (e.g. get the higher of current job MA or 60%/70%/80%/90% of Wizard MA), attributes adding R/S/M (e.g. Potion Belt accessory adds Throw Item, learning Two Swords gives permanent Two Swords), and conditions on learned ability/job level attributes (passives are for active job and/or active secondary only, passives only apply to Squires).

So here are my questions:

1) Is there any other functionality anyone wants (that's attached to this hack, I'm working on the other stuff)? Might not be doable, or out of the scope of the hack, but it won't hurt to ask.

2) What is a good way to set conditions on passive abilities?

My plan is to hardcode a few different schemes:

- always active
- active job = XX (e.g. Squire)
- active job = passive's job
- active secondary = passive's job

and make any combo of these selectable separately for learned abilities and for job levels, so you could have spending JP on A/R/S/M increment only active job stats/innates and job levels increment Freelancer + secondary skillset stats/innates, or vice versa.

3) I don't know much about skillsets. If I have an uber-generic, is an advanced patch going to give them skillsets outside 05-17 as secondaries, or can I count on those numbers being the same equippable secondaries that I can associate to Archer and Lancer passives, gutted and remodeled though they may be?
  • Modding version: PSX

RavenOfRazgriz

Can you clarify that last bit about passives some more?

1) Nothing that's not already on the To-Do List.  You know which ones I want the most.

2) Those ways seem fine.  They're the most intuitive options, at least.

3) I don't know what you mean in terms of "uber-generic", but if it helps your query, I know I do personally intend to use skillsets beyond 5-17 as generic unit skillsets due to some incredible bullshit I'm going to be performing with the Generic Skillset Hack.  This bullshit doesn't quite cover everything I need it to though, and ALMA does nothing to help the matter in this regard.  If you want to try aiding me in using huge amounts of smoke and mirrors to pull something very amazing off, I can either PM you or post in your other thread, but either way I'd still be using post-17 skillsets personally because of the hardcoding on Item, Draw Out, Throw, and Elemental.

pokeytax

Passives: Yes, this is awfully confusing. There are two things the game keeps track of, learned abilities and job levels, which I'm lumping together as "passive" abilities. If I can confirm that the game sets the three learned abilities bytes to $FFFFFF as a Mastered! flag for all classes, I guess that counts too.

I don't think it's flexible enough to apply the same scheme of those four to all of these; to roughly replicate FFV, for example, you need to have Mastered! flags add traits on scheme 2, abilities add traits on scheme 3, and job levels add traits on scheme 4. I want to leave the option for someone to have more than one system of passive bonuses going at once.

Quote from: RavenOfRazgriz on February 11, 2011, 08:40:34 pmeither way I'd still be using post-17 skillsets personally because of the hardcoding on Item, Draw Out, Throw, and Elemental.


Yeah, that's what I wanted to know, just what secondaries an endgame unit can equip. I'll probably just let people manually attach a secondary to a class. It never hurts to post a request, that way anyone else who sees it and has an idea might give it a go. (I'm not as cunning as Xifanie and FDC though.)
  • Modding version: PSX

RavenOfRazgriz

February 11, 2011, 10:51:48 pm #19 Last Edit: February 11, 2011, 10:52:18 pm by RavenOfRazgriz
Quote from: pokeytax on February 11, 2011, 10:08:39 pmYeah, that's what I wanted to know, just what secondaries an endgame unit can equip. I'll probably just let people manually attach a secondary to a class. It never hurts to post a request, that way anyone else who sees it and has an idea might give it a go. (I'm not as cunning as Xifanie and FDC though.)


I see.  Basically, I'll be using the Generic Skillset Fix to allow the "main" skillset of Chemist, Samurai, Geomancer, Ninja, and Lancer become empty skillsets by having them reference 05 Basic Skill, then using bullshit that calls those "old" skillsets elsewhere.

If you want a short version of what I'd need in a request form, it'd be gutting existing Support or Movement Abilities I no longer need and coding them to call a specific skillset or command instead.  I can give you more details in your other thread if you want to try it, since it's not within ALMA's scope.